| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.safebrowsing.v4; | 3 library googleapis.safebrowsing.v4; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client safebrowsing/v4'; | 15 const core.String USER_AGENT = 'dart-api-client safebrowsing/v4'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Enables client applications to check web resources (most commonly URLs) | 18 * The Safe Browsing API is an experimental API that allows client applications |
| 19 * against Google-generated lists of unsafe web resources. | 19 * to check URLs against Google's constantly-updated blacklists of suspected |
| 20 * phishing and malware pages. Your client application can use the API to |
| 21 * download an encrypted table for local, client-side lookups of URLs. |
| 20 */ | 22 */ |
| 21 class SafebrowsingApi { | 23 class SafebrowsingApi { |
| 22 | 24 |
| 23 final commons.ApiRequester _requester; | 25 final commons.ApiRequester _requester; |
| 24 | 26 |
| 27 EncodedFullHashesResourceApi get encodedFullHashes => new EncodedFullHashesRes
ourceApi(_requester); |
| 28 EncodedUpdatesResourceApi get encodedUpdates => new EncodedUpdatesResourceApi(
_requester); |
| 25 FullHashesResourceApi get fullHashes => new FullHashesResourceApi(_requester); | 29 FullHashesResourceApi get fullHashes => new FullHashesResourceApi(_requester); |
| 26 ThreatListUpdatesResourceApi get threatListUpdates => new ThreatListUpdatesRes
ourceApi(_requester); | 30 ThreatListUpdatesResourceApi get threatListUpdates => new ThreatListUpdatesRes
ourceApi(_requester); |
| 27 ThreatListsResourceApi get threatLists => new ThreatListsResourceApi(_requeste
r); | 31 ThreatListsResourceApi get threatLists => new ThreatListsResourceApi(_requeste
r); |
| 28 ThreatMatchesResourceApi get threatMatches => new ThreatMatchesResourceApi(_re
quester); | 32 ThreatMatchesResourceApi get threatMatches => new ThreatMatchesResourceApi(_re
quester); |
| 29 | 33 |
| 30 SafebrowsingApi(http.Client client, {core.String rootUrl: "https://safebrowsin
g.googleapis.com/", core.String servicePath: ""}) : | 34 SafebrowsingApi(http.Client client, {core.String rootUrl: "https://safebrowsin
g.googleapis.com/", core.String servicePath: ""}) : |
| 31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 35 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 32 } | 36 } |
| 33 | 37 |
| 34 | 38 |
| 39 class EncodedFullHashesResourceApi { |
| 40 final commons.ApiRequester _requester; |
| 41 |
| 42 EncodedFullHashesResourceApi(commons.ApiRequester client) : |
| 43 _requester = client; |
| 44 |
| 45 /** |
| 46 * Request parameters: |
| 47 * |
| 48 * [encodedRequest] - A serialized FindFullHashesRequest proto. |
| 49 * |
| 50 * [clientId] - A client ID that (hopefully) uniquely identifies the client |
| 51 * implementation |
| 52 * of the Safe Browsing API. |
| 53 * |
| 54 * [clientVersion] - The version of the client implementation. |
| 55 * |
| 56 * Completes with a [FindFullHashesResponse]. |
| 57 * |
| 58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 59 * error. |
| 60 * |
| 61 * If the used [http.Client] completes with an error when making a REST call, |
| 62 * this method will complete with the same error. |
| 63 */ |
| 64 async.Future<FindFullHashesResponse> get(core.String encodedRequest, {core.Str
ing clientId, core.String clientVersion}) { |
| 65 var _url = null; |
| 66 var _queryParams = new core.Map(); |
| 67 var _uploadMedia = null; |
| 68 var _uploadOptions = null; |
| 69 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 70 var _body = null; |
| 71 |
| 72 if (encodedRequest == null) { |
| 73 throw new core.ArgumentError("Parameter encodedRequest is required."); |
| 74 } |
| 75 if (clientId != null) { |
| 76 _queryParams["clientId"] = [clientId]; |
| 77 } |
| 78 if (clientVersion != null) { |
| 79 _queryParams["clientVersion"] = [clientVersion]; |
| 80 } |
| 81 |
| 82 _url = 'v4/encodedFullHashes/' + commons.Escaper.ecapeVariable('$encodedRequ
est'); |
| 83 |
| 84 var _response = _requester.request(_url, |
| 85 "GET", |
| 86 body: _body, |
| 87 queryParams: _queryParams, |
| 88 uploadOptions: _uploadOptions, |
| 89 uploadMedia: _uploadMedia, |
| 90 downloadOptions: _downloadOptions); |
| 91 return _response.then((data) => new FindFullHashesResponse.fromJson(data)); |
| 92 } |
| 93 |
| 94 } |
| 95 |
| 96 |
| 97 class EncodedUpdatesResourceApi { |
| 98 final commons.ApiRequester _requester; |
| 99 |
| 100 EncodedUpdatesResourceApi(commons.ApiRequester client) : |
| 101 _requester = client; |
| 102 |
| 103 /** |
| 104 * Request parameters: |
| 105 * |
| 106 * [encodedRequest] - A serialized FetchThreatListUpdatesRequest proto. |
| 107 * |
| 108 * [clientVersion] - The version of the client implementation. |
| 109 * |
| 110 * [clientId] - A client ID that uniquely identifies the client implementation |
| 111 * of the Safe |
| 112 * Browsing API. |
| 113 * |
| 114 * Completes with a [FetchThreatListUpdatesResponse]. |
| 115 * |
| 116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 117 * error. |
| 118 * |
| 119 * If the used [http.Client] completes with an error when making a REST call, |
| 120 * this method will complete with the same error. |
| 121 */ |
| 122 async.Future<FetchThreatListUpdatesResponse> get(core.String encodedRequest, {
core.String clientVersion, core.String clientId}) { |
| 123 var _url = null; |
| 124 var _queryParams = new core.Map(); |
| 125 var _uploadMedia = null; |
| 126 var _uploadOptions = null; |
| 127 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 128 var _body = null; |
| 129 |
| 130 if (encodedRequest == null) { |
| 131 throw new core.ArgumentError("Parameter encodedRequest is required."); |
| 132 } |
| 133 if (clientVersion != null) { |
| 134 _queryParams["clientVersion"] = [clientVersion]; |
| 135 } |
| 136 if (clientId != null) { |
| 137 _queryParams["clientId"] = [clientId]; |
| 138 } |
| 139 |
| 140 _url = 'v4/encodedUpdates/' + commons.Escaper.ecapeVariable('$encodedRequest
'); |
| 141 |
| 142 var _response = _requester.request(_url, |
| 143 "GET", |
| 144 body: _body, |
| 145 queryParams: _queryParams, |
| 146 uploadOptions: _uploadOptions, |
| 147 uploadMedia: _uploadMedia, |
| 148 downloadOptions: _downloadOptions); |
| 149 return _response.then((data) => new FetchThreatListUpdatesResponse.fromJson(
data)); |
| 150 } |
| 151 |
| 152 } |
| 153 |
| 154 |
| 35 class FullHashesResourceApi { | 155 class FullHashesResourceApi { |
| 36 final commons.ApiRequester _requester; | 156 final commons.ApiRequester _requester; |
| 37 | 157 |
| 38 FullHashesResourceApi(commons.ApiRequester client) : | 158 FullHashesResourceApi(commons.ApiRequester client) : |
| 39 _requester = client; | 159 _requester = client; |
| 40 | 160 |
| 41 /** | 161 /** |
| 42 * Finds the full hashes that match the requested hash prefixes. | 162 * Finds the full hashes that match the requested hash prefixes. |
| 43 * | 163 * |
| 44 * [request] - The metadata request object. | 164 * [request] - The metadata request object. |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 if (clientVersion != null) { | 402 if (clientVersion != null) { |
| 283 _json["clientVersion"] = clientVersion; | 403 _json["clientVersion"] = clientVersion; |
| 284 } | 404 } |
| 285 return _json; | 405 return _json; |
| 286 } | 406 } |
| 287 } | 407 } |
| 288 | 408 |
| 289 /** The constraints for this update. */ | 409 /** The constraints for this update. */ |
| 290 class Constraints { | 410 class Constraints { |
| 291 /** | 411 /** |
| 292 * Sets the maximum number of entries that the client is willing to have in | 412 * Sets the maximum number of entries that the client is willing to have |
| 293 * the local database. This should be a power of 2 between 2**10 and 2**20. If | 413 * in the local database. This should be a power of 2 between 2**10 and |
| 294 * zero, no database size limit is set. | 414 * 2**20. If zero, no database size limit is set. |
| 295 */ | 415 */ |
| 296 core.int maxDatabaseEntries; | 416 core.int maxDatabaseEntries; |
| 297 /** | 417 /** |
| 298 * The maximum size in number of entries. The update will not contain more | 418 * The maximum size in number of entries. The update will not contain more |
| 299 * entries than this value. This should be a power of 2 between 2**10 and | 419 * entries than this value. This should be a power of 2 between 2**10 and |
| 300 * 2**20. If zero, no update size limit is set. | 420 * 2**20. If zero, no update size limit is set. |
| 301 */ | 421 */ |
| 302 core.int maxUpdateEntries; | 422 core.int maxUpdateEntries; |
| 303 /** | 423 /** |
| 304 * Requests the list for a specific geographic location. If not set the server | 424 * Requests the list for a specific geographic location. If not set the |
| 305 * may pick that value based on the user's IP address. Expects ISO 3166-1 | 425 * server may pick that value based on the user's IP address. Expects ISO |
| 306 * alpha-2 format. | 426 * 3166-1 alpha-2 format. |
| 307 */ | 427 */ |
| 308 core.String region; | 428 core.String region; |
| 309 /** The compression types supported by the client. */ | 429 /** The compression types supported by the client. */ |
| 310 core.List<core.String> supportedCompressions; | 430 core.List<core.String> supportedCompressions; |
| 311 | 431 |
| 312 Constraints(); | 432 Constraints(); |
| 313 | 433 |
| 314 Constraints.fromJson(core.Map _json) { | 434 Constraints.fromJson(core.Map _json) { |
| 315 if (_json.containsKey("maxDatabaseEntries")) { | 435 if (_json.containsKey("maxDatabaseEntries")) { |
| 316 maxDatabaseEntries = _json["maxDatabaseEntries"]; | 436 maxDatabaseEntries = _json["maxDatabaseEntries"]; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 339 } | 459 } |
| 340 if (supportedCompressions != null) { | 460 if (supportedCompressions != null) { |
| 341 _json["supportedCompressions"] = supportedCompressions; | 461 _json["supportedCompressions"] = supportedCompressions; |
| 342 } | 462 } |
| 343 return _json; | 463 return _json; |
| 344 } | 464 } |
| 345 } | 465 } |
| 346 | 466 |
| 347 /** | 467 /** |
| 348 * Describes a Safe Browsing API update request. Clients can request updates for | 468 * Describes a Safe Browsing API update request. Clients can request updates for |
| 349 * multiple lists in a single request. NOTE: Field index 2 is unused. NEXT: 4 | 469 * multiple lists in a single request. |
| 470 * NOTE: Field index 2 is unused. |
| 471 * NEXT: 5 |
| 350 */ | 472 */ |
| 351 class FetchThreatListUpdatesRequest { | 473 class FetchThreatListUpdatesRequest { |
| 352 /** The client metadata. */ | 474 /** The client metadata. */ |
| 353 ClientInfo client; | 475 ClientInfo client; |
| 354 /** The requested threat list updates. */ | 476 /** The requested threat list updates. */ |
| 355 core.List<ListUpdateRequest> listUpdateRequests; | 477 core.List<ListUpdateRequest> listUpdateRequests; |
| 356 | 478 |
| 357 FetchThreatListUpdatesRequest(); | 479 FetchThreatListUpdatesRequest(); |
| 358 | 480 |
| 359 FetchThreatListUpdatesRequest.fromJson(core.Map _json) { | 481 FetchThreatListUpdatesRequest.fromJson(core.Map _json) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 } | 526 } |
| 405 if (minimumWaitDuration != null) { | 527 if (minimumWaitDuration != null) { |
| 406 _json["minimumWaitDuration"] = minimumWaitDuration; | 528 _json["minimumWaitDuration"] = minimumWaitDuration; |
| 407 } | 529 } |
| 408 return _json; | 530 return _json; |
| 409 } | 531 } |
| 410 } | 532 } |
| 411 | 533 |
| 412 /** Request to return full hashes matched by the provided hash prefixes. */ | 534 /** Request to return full hashes matched by the provided hash prefixes. */ |
| 413 class FindFullHashesRequest { | 535 class FindFullHashesRequest { |
| 536 /** |
| 537 * Client metadata associated with callers of higher-level APIs built on top |
| 538 * of the client's implementation. |
| 539 */ |
| 540 ClientInfo apiClient; |
| 414 /** The client metadata. */ | 541 /** The client metadata. */ |
| 415 ClientInfo client; | 542 ClientInfo client; |
| 416 /** The current client states for each of the client's local threat lists. */ | 543 /** The current client states for each of the client's local threat lists. */ |
| 417 core.List<core.String> clientStates; | 544 core.List<core.String> clientStates; |
| 418 /** The lists and hashes to be checked. */ | 545 /** The lists and hashes to be checked. */ |
| 419 ThreatInfo threatInfo; | 546 ThreatInfo threatInfo; |
| 420 | 547 |
| 421 FindFullHashesRequest(); | 548 FindFullHashesRequest(); |
| 422 | 549 |
| 423 FindFullHashesRequest.fromJson(core.Map _json) { | 550 FindFullHashesRequest.fromJson(core.Map _json) { |
| 551 if (_json.containsKey("apiClient")) { |
| 552 apiClient = new ClientInfo.fromJson(_json["apiClient"]); |
| 553 } |
| 424 if (_json.containsKey("client")) { | 554 if (_json.containsKey("client")) { |
| 425 client = new ClientInfo.fromJson(_json["client"]); | 555 client = new ClientInfo.fromJson(_json["client"]); |
| 426 } | 556 } |
| 427 if (_json.containsKey("clientStates")) { | 557 if (_json.containsKey("clientStates")) { |
| 428 clientStates = _json["clientStates"]; | 558 clientStates = _json["clientStates"]; |
| 429 } | 559 } |
| 430 if (_json.containsKey("threatInfo")) { | 560 if (_json.containsKey("threatInfo")) { |
| 431 threatInfo = new ThreatInfo.fromJson(_json["threatInfo"]); | 561 threatInfo = new ThreatInfo.fromJson(_json["threatInfo"]); |
| 432 } | 562 } |
| 433 } | 563 } |
| 434 | 564 |
| 435 core.Map toJson() { | 565 core.Map toJson() { |
| 436 var _json = new core.Map(); | 566 var _json = new core.Map(); |
| 567 if (apiClient != null) { |
| 568 _json["apiClient"] = (apiClient).toJson(); |
| 569 } |
| 437 if (client != null) { | 570 if (client != null) { |
| 438 _json["client"] = (client).toJson(); | 571 _json["client"] = (client).toJson(); |
| 439 } | 572 } |
| 440 if (clientStates != null) { | 573 if (clientStates != null) { |
| 441 _json["clientStates"] = clientStates; | 574 _json["clientStates"] = clientStates; |
| 442 } | 575 } |
| 443 if (threatInfo != null) { | 576 if (threatInfo != null) { |
| 444 _json["threatInfo"] = (threatInfo).toJson(); | 577 _json["threatInfo"] = (threatInfo).toJson(); |
| 445 } | 578 } |
| 446 return _json; | 579 return _json; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 } | 696 } |
| 564 } | 697 } |
| 565 | 698 |
| 566 /** A single list update request. */ | 699 /** A single list update request. */ |
| 567 class ListUpdateRequest { | 700 class ListUpdateRequest { |
| 568 /** The constraints associated with this request. */ | 701 /** The constraints associated with this request. */ |
| 569 Constraints constraints; | 702 Constraints constraints; |
| 570 /** | 703 /** |
| 571 * The type of platform at risk by entries present in the list. | 704 * The type of platform at risk by entries present in the list. |
| 572 * Possible string values are: | 705 * Possible string values are: |
| 573 * - "PLATFORM_TYPE_UNSPECIFIED" : A PLATFORM_TYPE_UNSPECIFIED. | 706 * - "PLATFORM_TYPE_UNSPECIFIED" : Unknown platform. |
| 574 * - "WINDOWS" : A WINDOWS. | 707 * - "WINDOWS" : Threat posed to Windows. |
| 575 * - "LINUX" : A LINUX. | 708 * - "LINUX" : Threat posed to Linux. |
| 576 * - "ANDROID" : A ANDROID. | 709 * - "ANDROID" : Threat posed to Android. |
| 577 * - "OSX" : A OSX. | 710 * - "OSX" : Threat posed to OS X. |
| 578 * - "IOS" : A IOS. | 711 * - "IOS" : Threat posed to iOS. |
| 579 * - "ANY_PLATFORM" : A ANY_PLATFORM. | 712 * - "ANY_PLATFORM" : Threat posed to at least one of the defined platforms. |
| 580 * - "ALL_PLATFORMS" : A ALL_PLATFORMS. | 713 * - "ALL_PLATFORMS" : Threat posed to all defined platforms. |
| 581 * - "CHROME" : A CHROME. | 714 * - "CHROME" : Threat posed to Chrome. |
| 582 */ | 715 */ |
| 583 core.String platformType; | 716 core.String platformType; |
| 584 /** | 717 /** |
| 585 * The current state of the client for the requested list (the encrypted | 718 * The current state of the client for the requested list (the encrypted |
| 586 * client state that was received from the last successful list update). | 719 * client state that was received from the last successful list update). |
| 587 */ | 720 */ |
| 588 core.String state; | 721 core.String state; |
| 589 core.List<core.int> get stateAsBytes { | 722 core.List<core.int> get stateAsBytes { |
| 590 return convert.BASE64.decode(state); | 723 return convert.BASE64.decode(state); |
| 591 } | 724 } |
| 592 | 725 |
| 593 void set stateAsBytes(core.List<core.int> _bytes) { | 726 void set stateAsBytes(core.List<core.int> _bytes) { |
| 594 state = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "
-"); | 727 state = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "
-"); |
| 595 } | 728 } |
| 596 /** | 729 /** |
| 597 * The types of entries present in the list. | 730 * The types of entries present in the list. |
| 598 * Possible string values are: | 731 * Possible string values are: |
| 599 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : A THREAT_ENTRY_TYPE_UNSPECIFIED. | 732 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : Unspecified. |
| 600 * - "URL" : A URL. | 733 * - "URL" : A URL. |
| 601 * - "EXECUTABLE" : A EXECUTABLE. | 734 * - "EXECUTABLE" : An executable program. |
| 602 * - "IP_RANGE" : A IP_RANGE. | 735 * - "IP_RANGE" : An IP range. |
| 736 * - "CHROME_EXTENSION" : Chrome extension. |
| 737 * - "FILENAME" : Filename. |
| 738 * - "CERT" : CERT |
| 603 */ | 739 */ |
| 604 core.String threatEntryType; | 740 core.String threatEntryType; |
| 605 /** | 741 /** |
| 606 * The type of threat posed by entries present in the list. | 742 * The type of threat posed by entries present in the list. |
| 607 * Possible string values are: | 743 * Possible string values are: |
| 608 * - "THREAT_TYPE_UNSPECIFIED" : A THREAT_TYPE_UNSPECIFIED. | 744 * - "THREAT_TYPE_UNSPECIFIED" : Unknown. |
| 609 * - "MALWARE" : A MALWARE. | 745 * - "MALWARE" : Malware threat type. |
| 610 * - "SOCIAL_ENGINEERING" : A SOCIAL_ENGINEERING. | 746 * - "SOCIAL_ENGINEERING" : Social engineering threat type. |
| 611 * - "UNWANTED_SOFTWARE" : A UNWANTED_SOFTWARE. | 747 * - "UNWANTED_SOFTWARE" : Unwanted software threat type. |
| 612 * - "POTENTIALLY_HARMFUL_APPLICATION" : A POTENTIALLY_HARMFUL_APPLICATION. | 748 * - "POTENTIALLY_HARMFUL_APPLICATION" : Potentially harmful application |
| 749 * threat type. |
| 613 */ | 750 */ |
| 614 core.String threatType; | 751 core.String threatType; |
| 615 | 752 |
| 616 ListUpdateRequest(); | 753 ListUpdateRequest(); |
| 617 | 754 |
| 618 ListUpdateRequest.fromJson(core.Map _json) { | 755 ListUpdateRequest.fromJson(core.Map _json) { |
| 619 if (_json.containsKey("constraints")) { | 756 if (_json.containsKey("constraints")) { |
| 620 constraints = new Constraints.fromJson(_json["constraints"]); | 757 constraints = new Constraints.fromJson(_json["constraints"]); |
| 621 } | 758 } |
| 622 if (_json.containsKey("platformType")) { | 759 if (_json.containsKey("platformType")) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 core.List<core.int> get newClientStateAsBytes { | 811 core.List<core.int> get newClientStateAsBytes { |
| 675 return convert.BASE64.decode(newClientState); | 812 return convert.BASE64.decode(newClientState); |
| 676 } | 813 } |
| 677 | 814 |
| 678 void set newClientStateAsBytes(core.List<core.int> _bytes) { | 815 void set newClientStateAsBytes(core.List<core.int> _bytes) { |
| 679 newClientState = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA
ll("+", "-"); | 816 newClientState = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA
ll("+", "-"); |
| 680 } | 817 } |
| 681 /** | 818 /** |
| 682 * The platform type for which data is returned. | 819 * The platform type for which data is returned. |
| 683 * Possible string values are: | 820 * Possible string values are: |
| 684 * - "PLATFORM_TYPE_UNSPECIFIED" : A PLATFORM_TYPE_UNSPECIFIED. | 821 * - "PLATFORM_TYPE_UNSPECIFIED" : Unknown platform. |
| 685 * - "WINDOWS" : A WINDOWS. | 822 * - "WINDOWS" : Threat posed to Windows. |
| 686 * - "LINUX" : A LINUX. | 823 * - "LINUX" : Threat posed to Linux. |
| 687 * - "ANDROID" : A ANDROID. | 824 * - "ANDROID" : Threat posed to Android. |
| 688 * - "OSX" : A OSX. | 825 * - "OSX" : Threat posed to OS X. |
| 689 * - "IOS" : A IOS. | 826 * - "IOS" : Threat posed to iOS. |
| 690 * - "ANY_PLATFORM" : A ANY_PLATFORM. | 827 * - "ANY_PLATFORM" : Threat posed to at least one of the defined platforms. |
| 691 * - "ALL_PLATFORMS" : A ALL_PLATFORMS. | 828 * - "ALL_PLATFORMS" : Threat posed to all defined platforms. |
| 692 * - "CHROME" : A CHROME. | 829 * - "CHROME" : Threat posed to Chrome. |
| 693 */ | 830 */ |
| 694 core.String platformType; | 831 core.String platformType; |
| 695 /** | 832 /** |
| 696 * A set of entries to remove from a local threat type's list. Repeated for | 833 * A set of entries to remove from a local threat type's list. In practice, |
| 697 * the same reason as above. | 834 * this field is empty or contains exactly one ThreatEntrySet. |
| 698 */ | 835 */ |
| 699 core.List<ThreatEntrySet> removals; | 836 core.List<ThreatEntrySet> removals; |
| 700 /** | 837 /** |
| 701 * The type of response. This may indicate that an action is required by the | 838 * The type of response. This may indicate that an action is required by the |
| 702 * client when the response is received. | 839 * client when the response is received. |
| 703 * Possible string values are: | 840 * Possible string values are: |
| 704 * - "RESPONSE_TYPE_UNSPECIFIED" : A RESPONSE_TYPE_UNSPECIFIED. | 841 * - "RESPONSE_TYPE_UNSPECIFIED" : Unknown. |
| 705 * - "PARTIAL_UPDATE" : A PARTIAL_UPDATE. | 842 * - "PARTIAL_UPDATE" : Partial updates are applied to the client's existing |
| 706 * - "FULL_UPDATE" : A FULL_UPDATE. | 843 * local database. |
| 844 * - "FULL_UPDATE" : Full updates replace the client's entire local database. |
| 845 * This means |
| 846 * that either the client was seriously out-of-date or the client is |
| 847 * believed to be corrupt. |
| 707 */ | 848 */ |
| 708 core.String responseType; | 849 core.String responseType; |
| 709 /** | 850 /** |
| 710 * The format of the threats. | 851 * The format of the threats. |
| 711 * Possible string values are: | 852 * Possible string values are: |
| 712 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : A THREAT_ENTRY_TYPE_UNSPECIFIED. | 853 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : Unspecified. |
| 713 * - "URL" : A URL. | 854 * - "URL" : A URL. |
| 714 * - "EXECUTABLE" : A EXECUTABLE. | 855 * - "EXECUTABLE" : An executable program. |
| 715 * - "IP_RANGE" : A IP_RANGE. | 856 * - "IP_RANGE" : An IP range. |
| 857 * - "CHROME_EXTENSION" : Chrome extension. |
| 858 * - "FILENAME" : Filename. |
| 859 * - "CERT" : CERT |
| 716 */ | 860 */ |
| 717 core.String threatEntryType; | 861 core.String threatEntryType; |
| 718 /** | 862 /** |
| 719 * The threat type for which data is returned. | 863 * The threat type for which data is returned. |
| 720 * Possible string values are: | 864 * Possible string values are: |
| 721 * - "THREAT_TYPE_UNSPECIFIED" : A THREAT_TYPE_UNSPECIFIED. | 865 * - "THREAT_TYPE_UNSPECIFIED" : Unknown. |
| 722 * - "MALWARE" : A MALWARE. | 866 * - "MALWARE" : Malware threat type. |
| 723 * - "SOCIAL_ENGINEERING" : A SOCIAL_ENGINEERING. | 867 * - "SOCIAL_ENGINEERING" : Social engineering threat type. |
| 724 * - "UNWANTED_SOFTWARE" : A UNWANTED_SOFTWARE. | 868 * - "UNWANTED_SOFTWARE" : Unwanted software threat type. |
| 725 * - "POTENTIALLY_HARMFUL_APPLICATION" : A POTENTIALLY_HARMFUL_APPLICATION. | 869 * - "POTENTIALLY_HARMFUL_APPLICATION" : Potentially harmful application |
| 870 * threat type. |
| 726 */ | 871 */ |
| 727 core.String threatType; | 872 core.String threatType; |
| 728 | 873 |
| 729 ListUpdateResponse(); | 874 ListUpdateResponse(); |
| 730 | 875 |
| 731 ListUpdateResponse.fromJson(core.Map _json) { | 876 ListUpdateResponse.fromJson(core.Map _json) { |
| 732 if (_json.containsKey("additions")) { | 877 if (_json.containsKey("additions")) { |
| 733 additions = _json["additions"].map((value) => new ThreatEntrySet.fromJson(
value)).toList(); | 878 additions = _json["additions"].map((value) => new ThreatEntrySet.fromJson(
value)).toList(); |
| 734 } | 879 } |
| 735 if (_json.containsKey("checksum")) { | 880 if (_json.containsKey("checksum")) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 } | 925 } |
| 781 if (threatType != null) { | 926 if (threatType != null) { |
| 782 _json["threatType"] = threatType; | 927 _json["threatType"] = threatType; |
| 783 } | 928 } |
| 784 return _json; | 929 return _json; |
| 785 } | 930 } |
| 786 } | 931 } |
| 787 | 932 |
| 788 /** A single metadata entry. */ | 933 /** A single metadata entry. */ |
| 789 class MetadataEntry { | 934 class MetadataEntry { |
| 790 /** The metadata entry key. */ | 935 /** The metadata entry key. For JSON requests, the key is base64-encoded. */ |
| 791 core.String key; | 936 core.String key; |
| 792 core.List<core.int> get keyAsBytes { | 937 core.List<core.int> get keyAsBytes { |
| 793 return convert.BASE64.decode(key); | 938 return convert.BASE64.decode(key); |
| 794 } | 939 } |
| 795 | 940 |
| 796 void set keyAsBytes(core.List<core.int> _bytes) { | 941 void set keyAsBytes(core.List<core.int> _bytes) { |
| 797 key = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"
); | 942 key = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"
); |
| 798 } | 943 } |
| 799 /** The metadata entry value. */ | 944 /** |
| 945 * The metadata entry value. For JSON requests, the value is base64-encoded. |
| 946 */ |
| 800 core.String value; | 947 core.String value; |
| 801 core.List<core.int> get valueAsBytes { | 948 core.List<core.int> get valueAsBytes { |
| 802 return convert.BASE64.decode(value); | 949 return convert.BASE64.decode(value); |
| 803 } | 950 } |
| 804 | 951 |
| 805 void set valueAsBytes(core.List<core.int> _bytes) { | 952 void set valueAsBytes(core.List<core.int> _bytes) { |
| 806 value = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "
-"); | 953 value = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "
-"); |
| 807 } | 954 } |
| 808 | 955 |
| 809 MetadataEntry(); | 956 MetadataEntry(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 826 _json["value"] = value; | 973 _json["value"] = value; |
| 827 } | 974 } |
| 828 return _json; | 975 return _json; |
| 829 } | 976 } |
| 830 } | 977 } |
| 831 | 978 |
| 832 /** | 979 /** |
| 833 * The uncompressed threat entries in hash format of a particular prefix length. | 980 * The uncompressed threat entries in hash format of a particular prefix length. |
| 834 * Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 | 981 * Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 |
| 835 * bytes, but some hashes are lengthened if they collide with the hash of a | 982 * bytes, but some hashes are lengthened if they collide with the hash of a |
| 836 * popular URL. Used for sending ThreatEntrySet to clients that do not support | 983 * popular URL. |
| 837 * compression, or when sending non-4-byte hashes to clients that do support | 984 * |
| 838 * compression. | 985 * Used for sending ThreatEntrySet to clients that do not support compression, |
| 986 * or when sending non-4-byte hashes to clients that do support compression. |
| 839 */ | 987 */ |
| 840 class RawHashes { | 988 class RawHashes { |
| 841 /** | 989 /** |
| 842 * The number of bytes for each prefix encoded below. This field can be | 990 * The number of bytes for each prefix encoded below. This field can be |
| 843 * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). | 991 * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). |
| 844 */ | 992 */ |
| 845 core.int prefixSize; | 993 core.int prefixSize; |
| 846 /** | 994 /** |
| 847 * The hashes, all concatenated into one long string. Each hash has a prefix | 995 * The hashes, in binary format, concatenated into one long string. Hashes are |
| 848 * size of |prefix_size| above. Hashes are sorted in lexicographic order. | 996 * sorted in lexicographic order. For JSON API users, hashes are |
| 997 * base64-encoded. |
| 849 */ | 998 */ |
| 850 core.String rawHashes; | 999 core.String rawHashes; |
| 851 core.List<core.int> get rawHashesAsBytes { | 1000 core.List<core.int> get rawHashesAsBytes { |
| 852 return convert.BASE64.decode(rawHashes); | 1001 return convert.BASE64.decode(rawHashes); |
| 853 } | 1002 } |
| 854 | 1003 |
| 855 void set rawHashesAsBytes(core.List<core.int> _bytes) { | 1004 void set rawHashesAsBytes(core.List<core.int> _bytes) { |
| 856 rawHashes = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); | 1005 rawHashes = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
| 857 } | 1006 } |
| 858 | 1007 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 return _json; | 1115 return _json; |
| 967 } | 1116 } |
| 968 } | 1117 } |
| 969 | 1118 |
| 970 /** | 1119 /** |
| 971 * An individual threat; for example, a malicious URL or its hash | 1120 * An individual threat; for example, a malicious URL or its hash |
| 972 * representation. Only one of these fields should be set. | 1121 * representation. Only one of these fields should be set. |
| 973 */ | 1122 */ |
| 974 class ThreatEntry { | 1123 class ThreatEntry { |
| 975 /** | 1124 /** |
| 976 * The digest of an executable in SHA256 format. The API supports both binary | 1125 * The digest of an executable in SHA256 format. The API supports both |
| 977 * and hex digests. | 1126 * binary and hex digests. For JSON requests, digests are base64-encoded. |
| 978 */ | 1127 */ |
| 979 core.String digest; | 1128 core.String digest; |
| 980 core.List<core.int> get digestAsBytes { | 1129 core.List<core.int> get digestAsBytes { |
| 981 return convert.BASE64.decode(digest); | 1130 return convert.BASE64.decode(digest); |
| 982 } | 1131 } |
| 983 | 1132 |
| 984 void set digestAsBytes(core.List<core.int> _bytes) { | 1133 void set digestAsBytes(core.List<core.int> _bytes) { |
| 985 digest = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+",
"-"); | 1134 digest = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+",
"-"); |
| 986 } | 1135 } |
| 987 /** | 1136 /** |
| 988 * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 | 1137 * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 |
| 989 * hash. This field is in binary format. | 1138 * hash. This field is in binary format. For JSON requests, hashes are |
| 1139 * base64-encoded. |
| 990 */ | 1140 */ |
| 991 core.String hash; | 1141 core.String hash; |
| 992 core.List<core.int> get hashAsBytes { | 1142 core.List<core.int> get hashAsBytes { |
| 993 return convert.BASE64.decode(hash); | 1143 return convert.BASE64.decode(hash); |
| 994 } | 1144 } |
| 995 | 1145 |
| 996 void set hashAsBytes(core.List<core.int> _bytes) { | 1146 void set hashAsBytes(core.List<core.int> _bytes) { |
| 997 hash = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 1147 hash = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 998 } | 1148 } |
| 999 /** A URL. */ | 1149 /** A URL. */ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 } | 1204 } |
| 1055 | 1205 |
| 1056 /** | 1206 /** |
| 1057 * A set of threats that should be added or removed from a client's local | 1207 * A set of threats that should be added or removed from a client's local |
| 1058 * database. | 1208 * database. |
| 1059 */ | 1209 */ |
| 1060 class ThreatEntrySet { | 1210 class ThreatEntrySet { |
| 1061 /** | 1211 /** |
| 1062 * The compression type for the entries in this set. | 1212 * The compression type for the entries in this set. |
| 1063 * Possible string values are: | 1213 * Possible string values are: |
| 1064 * - "COMPRESSION_TYPE_UNSPECIFIED" : A COMPRESSION_TYPE_UNSPECIFIED. | 1214 * - "COMPRESSION_TYPE_UNSPECIFIED" : Unknown. |
| 1065 * - "RAW" : A RAW. | 1215 * - "RAW" : Raw, uncompressed data. |
| 1066 * - "RICE" : A RICE. | 1216 * - "RICE" : Rice-Golomb encoded data. |
| 1067 */ | 1217 */ |
| 1068 core.String compressionType; | 1218 core.String compressionType; |
| 1069 /** The raw SHA256-formatted entries. */ | 1219 /** The raw SHA256-formatted entries. */ |
| 1070 RawHashes rawHashes; | 1220 RawHashes rawHashes; |
| 1071 /** The raw removal indices for a local list. */ | 1221 /** The raw removal indices for a local list. */ |
| 1072 RawIndices rawIndices; | 1222 RawIndices rawIndices; |
| 1073 /** | 1223 /** |
| 1074 * The encoded 4-byte prefixes of SHA256-formatted entries, using a | 1224 * The encoded 4-byte prefixes of SHA256-formatted entries, using a |
| 1075 * Golomb-Rice encoding. | 1225 * Golomb-Rice encoding. The hashes are converted to uint32, sorted in |
| 1226 * ascending order, then delta encoded and stored as encoded_data. |
| 1076 */ | 1227 */ |
| 1077 RiceDeltaEncoding riceHashes; | 1228 RiceDeltaEncoding riceHashes; |
| 1078 /** | 1229 /** |
| 1079 * The encoded local, lexicographically-sorted list indices, using a | 1230 * The encoded local, lexicographically-sorted list indices, using a |
| 1080 * Golomb-Rice encoding. Used for sending compressed removal indices. | 1231 * Golomb-Rice encoding. Used for sending compressed removal indices. The |
| 1232 * removal indices (uint32) are sorted in ascending order, then delta encoded |
| 1233 * and stored as encoded_data. |
| 1081 */ | 1234 */ |
| 1082 RiceDeltaEncoding riceIndices; | 1235 RiceDeltaEncoding riceIndices; |
| 1083 | 1236 |
| 1084 ThreatEntrySet(); | 1237 ThreatEntrySet(); |
| 1085 | 1238 |
| 1086 ThreatEntrySet.fromJson(core.Map _json) { | 1239 ThreatEntrySet.fromJson(core.Map _json) { |
| 1087 if (_json.containsKey("compressionType")) { | 1240 if (_json.containsKey("compressionType")) { |
| 1088 compressionType = _json["compressionType"]; | 1241 compressionType = _json["compressionType"]; |
| 1089 } | 1242 } |
| 1090 if (_json.containsKey("rawHashes")) { | 1243 if (_json.containsKey("rawHashes")) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 | 1326 |
| 1174 /** | 1327 /** |
| 1175 * Describes an individual threat list. A list is defined by three parameters: | 1328 * Describes an individual threat list. A list is defined by three parameters: |
| 1176 * the type of threat posed, the type of platform targeted by the threat, and | 1329 * the type of threat posed, the type of platform targeted by the threat, and |
| 1177 * the type of entries in the list. | 1330 * the type of entries in the list. |
| 1178 */ | 1331 */ |
| 1179 class ThreatListDescriptor { | 1332 class ThreatListDescriptor { |
| 1180 /** | 1333 /** |
| 1181 * The platform type targeted by the list's entries. | 1334 * The platform type targeted by the list's entries. |
| 1182 * Possible string values are: | 1335 * Possible string values are: |
| 1183 * - "PLATFORM_TYPE_UNSPECIFIED" : A PLATFORM_TYPE_UNSPECIFIED. | 1336 * - "PLATFORM_TYPE_UNSPECIFIED" : Unknown platform. |
| 1184 * - "WINDOWS" : A WINDOWS. | 1337 * - "WINDOWS" : Threat posed to Windows. |
| 1185 * - "LINUX" : A LINUX. | 1338 * - "LINUX" : Threat posed to Linux. |
| 1186 * - "ANDROID" : A ANDROID. | 1339 * - "ANDROID" : Threat posed to Android. |
| 1187 * - "OSX" : A OSX. | 1340 * - "OSX" : Threat posed to OS X. |
| 1188 * - "IOS" : A IOS. | 1341 * - "IOS" : Threat posed to iOS. |
| 1189 * - "ANY_PLATFORM" : A ANY_PLATFORM. | 1342 * - "ANY_PLATFORM" : Threat posed to at least one of the defined platforms. |
| 1190 * - "ALL_PLATFORMS" : A ALL_PLATFORMS. | 1343 * - "ALL_PLATFORMS" : Threat posed to all defined platforms. |
| 1191 * - "CHROME" : A CHROME. | 1344 * - "CHROME" : Threat posed to Chrome. |
| 1192 */ | 1345 */ |
| 1193 core.String platformType; | 1346 core.String platformType; |
| 1194 /** | 1347 /** |
| 1195 * The entry types contained in the list. | 1348 * The entry types contained in the list. |
| 1196 * Possible string values are: | 1349 * Possible string values are: |
| 1197 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : A THREAT_ENTRY_TYPE_UNSPECIFIED. | 1350 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : Unspecified. |
| 1198 * - "URL" : A URL. | 1351 * - "URL" : A URL. |
| 1199 * - "EXECUTABLE" : A EXECUTABLE. | 1352 * - "EXECUTABLE" : An executable program. |
| 1200 * - "IP_RANGE" : A IP_RANGE. | 1353 * - "IP_RANGE" : An IP range. |
| 1354 * - "CHROME_EXTENSION" : Chrome extension. |
| 1355 * - "FILENAME" : Filename. |
| 1356 * - "CERT" : CERT |
| 1201 */ | 1357 */ |
| 1202 core.String threatEntryType; | 1358 core.String threatEntryType; |
| 1203 /** | 1359 /** |
| 1204 * The threat type posed by the list's entries. | 1360 * The threat type posed by the list's entries. |
| 1205 * Possible string values are: | 1361 * Possible string values are: |
| 1206 * - "THREAT_TYPE_UNSPECIFIED" : A THREAT_TYPE_UNSPECIFIED. | 1362 * - "THREAT_TYPE_UNSPECIFIED" : Unknown. |
| 1207 * - "MALWARE" : A MALWARE. | 1363 * - "MALWARE" : Malware threat type. |
| 1208 * - "SOCIAL_ENGINEERING" : A SOCIAL_ENGINEERING. | 1364 * - "SOCIAL_ENGINEERING" : Social engineering threat type. |
| 1209 * - "UNWANTED_SOFTWARE" : A UNWANTED_SOFTWARE. | 1365 * - "UNWANTED_SOFTWARE" : Unwanted software threat type. |
| 1210 * - "POTENTIALLY_HARMFUL_APPLICATION" : A POTENTIALLY_HARMFUL_APPLICATION. | 1366 * - "POTENTIALLY_HARMFUL_APPLICATION" : Potentially harmful application |
| 1367 * threat type. |
| 1211 */ | 1368 */ |
| 1212 core.String threatType; | 1369 core.String threatType; |
| 1213 | 1370 |
| 1214 ThreatListDescriptor(); | 1371 ThreatListDescriptor(); |
| 1215 | 1372 |
| 1216 ThreatListDescriptor.fromJson(core.Map _json) { | 1373 ThreatListDescriptor.fromJson(core.Map _json) { |
| 1217 if (_json.containsKey("platformType")) { | 1374 if (_json.containsKey("platformType")) { |
| 1218 platformType = _json["platformType"]; | 1375 platformType = _json["platformType"]; |
| 1219 } | 1376 } |
| 1220 if (_json.containsKey("threatEntryType")) { | 1377 if (_json.containsKey("threatEntryType")) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1243 /** A match when checking a threat entry in the Safe Browsing threat lists. */ | 1400 /** A match when checking a threat entry in the Safe Browsing threat lists. */ |
| 1244 class ThreatMatch { | 1401 class ThreatMatch { |
| 1245 /** | 1402 /** |
| 1246 * The cache lifetime for the returned match. Clients must not cache this | 1403 * The cache lifetime for the returned match. Clients must not cache this |
| 1247 * response for more than this duration to avoid false positives. | 1404 * response for more than this duration to avoid false positives. |
| 1248 */ | 1405 */ |
| 1249 core.String cacheDuration; | 1406 core.String cacheDuration; |
| 1250 /** | 1407 /** |
| 1251 * The platform type matching this threat. | 1408 * The platform type matching this threat. |
| 1252 * Possible string values are: | 1409 * Possible string values are: |
| 1253 * - "PLATFORM_TYPE_UNSPECIFIED" : A PLATFORM_TYPE_UNSPECIFIED. | 1410 * - "PLATFORM_TYPE_UNSPECIFIED" : Unknown platform. |
| 1254 * - "WINDOWS" : A WINDOWS. | 1411 * - "WINDOWS" : Threat posed to Windows. |
| 1255 * - "LINUX" : A LINUX. | 1412 * - "LINUX" : Threat posed to Linux. |
| 1256 * - "ANDROID" : A ANDROID. | 1413 * - "ANDROID" : Threat posed to Android. |
| 1257 * - "OSX" : A OSX. | 1414 * - "OSX" : Threat posed to OS X. |
| 1258 * - "IOS" : A IOS. | 1415 * - "IOS" : Threat posed to iOS. |
| 1259 * - "ANY_PLATFORM" : A ANY_PLATFORM. | 1416 * - "ANY_PLATFORM" : Threat posed to at least one of the defined platforms. |
| 1260 * - "ALL_PLATFORMS" : A ALL_PLATFORMS. | 1417 * - "ALL_PLATFORMS" : Threat posed to all defined platforms. |
| 1261 * - "CHROME" : A CHROME. | 1418 * - "CHROME" : Threat posed to Chrome. |
| 1262 */ | 1419 */ |
| 1263 core.String platformType; | 1420 core.String platformType; |
| 1264 /** The threat matching this threat. */ | 1421 /** The threat matching this threat. */ |
| 1265 ThreatEntry threat; | 1422 ThreatEntry threat; |
| 1266 /** Optional metadata associated with this threat. */ | 1423 /** Optional metadata associated with this threat. */ |
| 1267 ThreatEntryMetadata threatEntryMetadata; | 1424 ThreatEntryMetadata threatEntryMetadata; |
| 1268 /** | 1425 /** |
| 1269 * The threat entry type matching this threat. | 1426 * The threat entry type matching this threat. |
| 1270 * Possible string values are: | 1427 * Possible string values are: |
| 1271 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : A THREAT_ENTRY_TYPE_UNSPECIFIED. | 1428 * - "THREAT_ENTRY_TYPE_UNSPECIFIED" : Unspecified. |
| 1272 * - "URL" : A URL. | 1429 * - "URL" : A URL. |
| 1273 * - "EXECUTABLE" : A EXECUTABLE. | 1430 * - "EXECUTABLE" : An executable program. |
| 1274 * - "IP_RANGE" : A IP_RANGE. | 1431 * - "IP_RANGE" : An IP range. |
| 1432 * - "CHROME_EXTENSION" : Chrome extension. |
| 1433 * - "FILENAME" : Filename. |
| 1434 * - "CERT" : CERT |
| 1275 */ | 1435 */ |
| 1276 core.String threatEntryType; | 1436 core.String threatEntryType; |
| 1277 /** | 1437 /** |
| 1278 * The threat type matching this threat. | 1438 * The threat type matching this threat. |
| 1279 * Possible string values are: | 1439 * Possible string values are: |
| 1280 * - "THREAT_TYPE_UNSPECIFIED" : A THREAT_TYPE_UNSPECIFIED. | 1440 * - "THREAT_TYPE_UNSPECIFIED" : Unknown. |
| 1281 * - "MALWARE" : A MALWARE. | 1441 * - "MALWARE" : Malware threat type. |
| 1282 * - "SOCIAL_ENGINEERING" : A SOCIAL_ENGINEERING. | 1442 * - "SOCIAL_ENGINEERING" : Social engineering threat type. |
| 1283 * - "UNWANTED_SOFTWARE" : A UNWANTED_SOFTWARE. | 1443 * - "UNWANTED_SOFTWARE" : Unwanted software threat type. |
| 1284 * - "POTENTIALLY_HARMFUL_APPLICATION" : A POTENTIALLY_HARMFUL_APPLICATION. | 1444 * - "POTENTIALLY_HARMFUL_APPLICATION" : Potentially harmful application |
| 1445 * threat type. |
| 1285 */ | 1446 */ |
| 1286 core.String threatType; | 1447 core.String threatType; |
| 1287 | 1448 |
| 1288 ThreatMatch(); | 1449 ThreatMatch(); |
| 1289 | 1450 |
| 1290 ThreatMatch.fromJson(core.Map _json) { | 1451 ThreatMatch.fromJson(core.Map _json) { |
| 1291 if (_json.containsKey("cacheDuration")) { | 1452 if (_json.containsKey("cacheDuration")) { |
| 1292 cacheDuration = _json["cacheDuration"]; | 1453 cacheDuration = _json["cacheDuration"]; |
| 1293 } | 1454 } |
| 1294 if (_json.containsKey("platformType")) { | 1455 if (_json.containsKey("platformType")) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1324 } | 1485 } |
| 1325 if (threatEntryType != null) { | 1486 if (threatEntryType != null) { |
| 1326 _json["threatEntryType"] = threatEntryType; | 1487 _json["threatEntryType"] = threatEntryType; |
| 1327 } | 1488 } |
| 1328 if (threatType != null) { | 1489 if (threatType != null) { |
| 1329 _json["threatType"] = threatType; | 1490 _json["threatType"] = threatType; |
| 1330 } | 1491 } |
| 1331 return _json; | 1492 return _json; |
| 1332 } | 1493 } |
| 1333 } | 1494 } |
| OLD | NEW |