| 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; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 final commons.ApiRequester _requester; | 40 final commons.ApiRequester _requester; |
| 41 | 41 |
| 42 EncodedFullHashesResourceApi(commons.ApiRequester client) : | 42 EncodedFullHashesResourceApi(commons.ApiRequester client) : |
| 43 _requester = client; | 43 _requester = client; |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * Request parameters: | 46 * Request parameters: |
| 47 * | 47 * |
| 48 * [encodedRequest] - A serialized FindFullHashesRequest proto. | 48 * [encodedRequest] - A serialized FindFullHashesRequest proto. |
| 49 * | 49 * |
| 50 * [clientVersion] - The version of the client implementation. |
| 51 * |
| 50 * [clientId] - A client ID that (hopefully) uniquely identifies the client | 52 * [clientId] - A client ID that (hopefully) uniquely identifies the client |
| 51 * implementation | 53 * implementation |
| 52 * of the Safe Browsing API. | 54 * of the Safe Browsing API. |
| 53 * | 55 * |
| 54 * [clientVersion] - The version of the client implementation. | |
| 55 * | |
| 56 * Completes with a [FindFullHashesResponse]. | 56 * Completes with a [FindFullHashesResponse]. |
| 57 * | 57 * |
| 58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 59 * error. | 59 * error. |
| 60 * | 60 * |
| 61 * If the used [http.Client] completes with an error when making a REST call, | 61 * If the used [http.Client] completes with an error when making a REST call, |
| 62 * this method will complete with the same error. | 62 * this method will complete with the same error. |
| 63 */ | 63 */ |
| 64 async.Future<FindFullHashesResponse> get(core.String encodedRequest, {core.Str
ing clientId, core.String clientVersion}) { | 64 async.Future<FindFullHashesResponse> get(core.String encodedRequest, {core.Str
ing clientVersion, core.String clientId}) { |
| 65 var _url = null; | 65 var _url = null; |
| 66 var _queryParams = new core.Map(); | 66 var _queryParams = new core.Map(); |
| 67 var _uploadMedia = null; | 67 var _uploadMedia = null; |
| 68 var _uploadOptions = null; | 68 var _uploadOptions = null; |
| 69 var _downloadOptions = commons.DownloadOptions.Metadata; | 69 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 70 var _body = null; | 70 var _body = null; |
| 71 | 71 |
| 72 if (encodedRequest == null) { | 72 if (encodedRequest == null) { |
| 73 throw new core.ArgumentError("Parameter encodedRequest is required."); | 73 throw new core.ArgumentError("Parameter encodedRequest is required."); |
| 74 } | 74 } |
| 75 if (clientVersion != null) { |
| 76 _queryParams["clientVersion"] = [clientVersion]; |
| 77 } |
| 75 if (clientId != null) { | 78 if (clientId != null) { |
| 76 _queryParams["clientId"] = [clientId]; | 79 _queryParams["clientId"] = [clientId]; |
| 77 } | 80 } |
| 78 if (clientVersion != null) { | |
| 79 _queryParams["clientVersion"] = [clientVersion]; | |
| 80 } | |
| 81 | 81 |
| 82 _url = 'v4/encodedFullHashes/' + commons.Escaper.ecapeVariable('$encodedRequ
est'); | 82 _url = 'v4/encodedFullHashes/' + commons.Escaper.ecapeVariable('$encodedRequ
est'); |
| 83 | 83 |
| 84 var _response = _requester.request(_url, | 84 var _response = _requester.request(_url, |
| 85 "GET", | 85 "GET", |
| 86 body: _body, | 86 body: _body, |
| 87 queryParams: _queryParams, | 87 queryParams: _queryParams, |
| 88 uploadOptions: _uploadOptions, | 88 uploadOptions: _uploadOptions, |
| 89 uploadMedia: _uploadMedia, | 89 uploadMedia: _uploadMedia, |
| 90 downloadOptions: _downloadOptions); | 90 downloadOptions: _downloadOptions); |
| 91 return _response.then((data) => new FindFullHashesResponse.fromJson(data)); | 91 return _response.then((data) => new FindFullHashesResponse.fromJson(data)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } | 94 } |
| 95 | 95 |
| 96 | 96 |
| 97 class EncodedUpdatesResourceApi { | 97 class EncodedUpdatesResourceApi { |
| 98 final commons.ApiRequester _requester; | 98 final commons.ApiRequester _requester; |
| 99 | 99 |
| 100 EncodedUpdatesResourceApi(commons.ApiRequester client) : | 100 EncodedUpdatesResourceApi(commons.ApiRequester client) : |
| 101 _requester = client; | 101 _requester = client; |
| 102 | 102 |
| 103 /** | 103 /** |
| 104 * Request parameters: | 104 * Request parameters: |
| 105 * | 105 * |
| 106 * [encodedRequest] - A serialized FetchThreatListUpdatesRequest proto. | 106 * [encodedRequest] - A serialized FetchThreatListUpdatesRequest proto. |
| 107 * | 107 * |
| 108 * [clientVersion] - The version of the client implementation. |
| 109 * |
| 108 * [clientId] - A client ID that uniquely identifies the client implementation | 110 * [clientId] - A client ID that uniquely identifies the client implementation |
| 109 * of the Safe | 111 * of the Safe |
| 110 * Browsing API. | 112 * Browsing API. |
| 111 * | 113 * |
| 112 * [clientVersion] - The version of the client implementation. | |
| 113 * | |
| 114 * Completes with a [FetchThreatListUpdatesResponse]. | 114 * Completes with a [FetchThreatListUpdatesResponse]. |
| 115 * | 115 * |
| 116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 117 * error. | 117 * error. |
| 118 * | 118 * |
| 119 * If the used [http.Client] completes with an error when making a REST call, | 119 * If the used [http.Client] completes with an error when making a REST call, |
| 120 * this method will complete with the same error. | 120 * this method will complete with the same error. |
| 121 */ | 121 */ |
| 122 async.Future<FetchThreatListUpdatesResponse> get(core.String encodedRequest, {
core.String clientId, core.String clientVersion}) { | 122 async.Future<FetchThreatListUpdatesResponse> get(core.String encodedRequest, {
core.String clientVersion, core.String clientId}) { |
| 123 var _url = null; | 123 var _url = null; |
| 124 var _queryParams = new core.Map(); | 124 var _queryParams = new core.Map(); |
| 125 var _uploadMedia = null; | 125 var _uploadMedia = null; |
| 126 var _uploadOptions = null; | 126 var _uploadOptions = null; |
| 127 var _downloadOptions = commons.DownloadOptions.Metadata; | 127 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 128 var _body = null; | 128 var _body = null; |
| 129 | 129 |
| 130 if (encodedRequest == null) { | 130 if (encodedRequest == null) { |
| 131 throw new core.ArgumentError("Parameter encodedRequest is required."); | 131 throw new core.ArgumentError("Parameter encodedRequest is required."); |
| 132 } | 132 } |
| 133 if (clientVersion != null) { |
| 134 _queryParams["clientVersion"] = [clientVersion]; |
| 135 } |
| 133 if (clientId != null) { | 136 if (clientId != null) { |
| 134 _queryParams["clientId"] = [clientId]; | 137 _queryParams["clientId"] = [clientId]; |
| 135 } | 138 } |
| 136 if (clientVersion != null) { | |
| 137 _queryParams["clientVersion"] = [clientVersion]; | |
| 138 } | |
| 139 | 139 |
| 140 _url = 'v4/encodedUpdates/' + commons.Escaper.ecapeVariable('$encodedRequest
'); | 140 _url = 'v4/encodedUpdates/' + commons.Escaper.ecapeVariable('$encodedRequest
'); |
| 141 | 141 |
| 142 var _response = _requester.request(_url, | 142 var _response = _requester.request(_url, |
| 143 "GET", | 143 "GET", |
| 144 body: _body, | 144 body: _body, |
| 145 queryParams: _queryParams, | 145 queryParams: _queryParams, |
| 146 uploadOptions: _uploadOptions, | 146 uploadOptions: _uploadOptions, |
| 147 uploadMedia: _uploadMedia, | 147 uploadMedia: _uploadMedia, |
| 148 downloadOptions: _downloadOptions); | 148 downloadOptions: _downloadOptions); |
| (...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1489 } | 1489 } |
| 1490 if (threatEntryType != null) { | 1490 if (threatEntryType != null) { |
| 1491 _json["threatEntryType"] = threatEntryType; | 1491 _json["threatEntryType"] = threatEntryType; |
| 1492 } | 1492 } |
| 1493 if (threatType != null) { | 1493 if (threatType != null) { |
| 1494 _json["threatType"] = threatType; | 1494 _json["threatType"] = threatType; |
| 1495 } | 1495 } |
| 1496 return _json; | 1496 return _json; |
| 1497 } | 1497 } |
| 1498 } | 1498 } |
| OLD | NEW |