| 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.customsearch.v1; | 3 library googleapis.customsearch.v1; |
| 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' |
| 13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client customsearch/v1'; | 15 const core.String USER_AGENT = 'dart-api-client customsearch/v1'; |
| 16 | 16 |
| 17 /** Searches over a website or collection of websites */ | 17 /// Searches over a website or collection of websites |
| 18 class CustomsearchApi { | 18 class CustomsearchApi { |
| 19 | |
| 20 final commons.ApiRequester _requester; | 19 final commons.ApiRequester _requester; |
| 21 | 20 |
| 22 CseResourceApi get cse => new CseResourceApi(_requester); | 21 CseResourceApi get cse => new CseResourceApi(_requester); |
| 23 | 22 |
| 24 CustomsearchApi(http.Client client, {core.String rootUrl: "https://www.googlea
pis.com/", core.String servicePath: "customsearch/"}) : | 23 CustomsearchApi(http.Client client, |
| 25 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 24 {core.String rootUrl: "https://www.googleapis.com/", |
| 25 core.String servicePath: "customsearch/"}) |
| 26 : _requester = |
| 27 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 26 } | 28 } |
| 27 | 29 |
| 28 | |
| 29 class CseResourceApi { | 30 class CseResourceApi { |
| 30 final commons.ApiRequester _requester; | 31 final commons.ApiRequester _requester; |
| 31 | 32 |
| 32 CseResourceApi(commons.ApiRequester client) : | 33 CseResourceApi(commons.ApiRequester client) : _requester = client; |
| 33 _requester = client; | 34 |
| 34 | 35 /// Returns metadata about the search performed, metadata about the custom |
| 35 /** | 36 /// search engine used for the search, and the search results. |
| 36 * Returns metadata about the search performed, metadata about the custom | 37 /// |
| 37 * search engine used for the search, and the search results. | 38 /// Request parameters: |
| 38 * | 39 /// |
| 39 * Request parameters: | 40 /// [q] - Query |
| 40 * | 41 /// |
| 41 * [q] - Query | 42 /// [c2coff] - Turns off the translation between zh-CN and zh-TW. |
| 42 * | 43 /// |
| 43 * [c2coff] - Turns off the translation between zh-CN and zh-TW. | 44 /// [cr] - Country restrict(s). |
| 44 * | 45 /// |
| 45 * [cr] - Country restrict(s). | 46 /// [cx] - The custom search engine ID to scope this search query |
| 46 * | 47 /// |
| 47 * [cx] - The custom search engine ID to scope this search query | 48 /// [dateRestrict] - Specifies all search results are from a time period |
| 48 * | 49 /// |
| 49 * [dateRestrict] - Specifies all search results are from a time period | 50 /// [exactTerms] - Identifies a phrase that all documents in the search |
| 50 * | 51 /// results must contain |
| 51 * [exactTerms] - Identifies a phrase that all documents in the search results | 52 /// |
| 52 * must contain | 53 /// [excludeTerms] - Identifies a word or phrase that should not appear in |
| 53 * | 54 /// any documents in the search results |
| 54 * [excludeTerms] - Identifies a word or phrase that should not appear in any | 55 /// |
| 55 * documents in the search results | 56 /// [fileType] - Returns images of a specified type. Some of the allowed |
| 56 * | 57 /// values are: bmp, gif, png, jpg, svg, pdf, ... |
| 57 * [fileType] - Returns images of a specified type. Some of the allowed values | 58 /// |
| 58 * are: bmp, gif, png, jpg, svg, pdf, ... | 59 /// [filter] - Controls turning on or off the duplicate content filter. |
| 59 * | 60 /// Possible string values are: |
| 60 * [filter] - Controls turning on or off the duplicate content filter. | 61 /// - "0" : Turns off duplicate content filter. |
| 61 * Possible string values are: | 62 /// - "1" : Turns on duplicate content filter. |
| 62 * - "0" : Turns off duplicate content filter. | 63 /// |
| 63 * - "1" : Turns on duplicate content filter. | 64 /// [gl] - Geolocation of end user. |
| 64 * | 65 /// |
| 65 * [gl] - Geolocation of end user. | 66 /// [googlehost] - The local Google domain to use to perform the search. |
| 66 * | 67 /// |
| 67 * [googlehost] - The local Google domain to use to perform the search. | 68 /// [highRange] - Creates a range in form as_nlo value..as_nhi value and |
| 68 * | 69 /// attempts to append it to query |
| 69 * [highRange] - Creates a range in form as_nlo value..as_nhi value and | 70 /// |
| 70 * attempts to append it to query | 71 /// [hl] - Sets the user interface language. |
| 71 * | 72 /// |
| 72 * [hl] - Sets the user interface language. | 73 /// [hq] - Appends the extra query terms to the query. |
| 73 * | 74 /// |
| 74 * [hq] - Appends the extra query terms to the query. | 75 /// [imgColorType] - Returns black and white, grayscale, or color images: |
| 75 * | 76 /// mono, gray, and color. |
| 76 * [imgColorType] - Returns black and white, grayscale, or color images: mono, | 77 /// Possible string values are: |
| 77 * gray, and color. | 78 /// - "color" : color |
| 78 * Possible string values are: | 79 /// - "gray" : gray |
| 79 * - "color" : color | 80 /// - "mono" : mono |
| 80 * - "gray" : gray | 81 /// |
| 81 * - "mono" : mono | 82 /// [imgDominantColor] - Returns images of a specific dominant color: yellow, |
| 82 * | 83 /// green, teal, blue, purple, pink, white, gray, black and brown. |
| 83 * [imgDominantColor] - Returns images of a specific dominant color: yellow, | 84 /// Possible string values are: |
| 84 * green, teal, blue, purple, pink, white, gray, black and brown. | 85 /// - "black" : black |
| 85 * Possible string values are: | 86 /// - "blue" : blue |
| 86 * - "black" : black | 87 /// - "brown" : brown |
| 87 * - "blue" : blue | 88 /// - "gray" : gray |
| 88 * - "brown" : brown | 89 /// - "green" : green |
| 89 * - "gray" : gray | 90 /// - "pink" : pink |
| 90 * - "green" : green | 91 /// - "purple" : purple |
| 91 * - "pink" : pink | 92 /// - "teal" : teal |
| 92 * - "purple" : purple | 93 /// - "white" : white |
| 93 * - "teal" : teal | 94 /// - "yellow" : yellow |
| 94 * - "white" : white | 95 /// |
| 95 * - "yellow" : yellow | 96 /// [imgSize] - Returns images of a specified size, where size can be one of: |
| 96 * | 97 /// icon, small, medium, large, xlarge, xxlarge, and huge. |
| 97 * [imgSize] - Returns images of a specified size, where size can be one of: | 98 /// Possible string values are: |
| 98 * icon, small, medium, large, xlarge, xxlarge, and huge. | 99 /// - "huge" : huge |
| 99 * Possible string values are: | 100 /// - "icon" : icon |
| 100 * - "huge" : huge | 101 /// - "large" : large |
| 101 * - "icon" : icon | 102 /// - "medium" : medium |
| 102 * - "large" : large | 103 /// - "small" : small |
| 103 * - "medium" : medium | 104 /// - "xlarge" : xlarge |
| 104 * - "small" : small | 105 /// - "xxlarge" : xxlarge |
| 105 * - "xlarge" : xlarge | 106 /// |
| 106 * - "xxlarge" : xxlarge | 107 /// [imgType] - Returns images of a type, which can be one of: clipart, face, |
| 107 * | 108 /// lineart, news, and photo. |
| 108 * [imgType] - Returns images of a type, which can be one of: clipart, face, | 109 /// Possible string values are: |
| 109 * lineart, news, and photo. | 110 /// - "clipart" : clipart |
| 110 * Possible string values are: | 111 /// - "face" : face |
| 111 * - "clipart" : clipart | 112 /// - "lineart" : lineart |
| 112 * - "face" : face | 113 /// - "news" : news |
| 113 * - "lineart" : lineart | 114 /// - "photo" : photo |
| 114 * - "news" : news | 115 /// |
| 115 * - "photo" : photo | 116 /// [linkSite] - Specifies that all search results should contain a link to a |
| 116 * | 117 /// particular URL |
| 117 * [linkSite] - Specifies that all search results should contain a link to a | 118 /// |
| 118 * particular URL | 119 /// [lowRange] - Creates a range in form as_nlo value..as_nhi value and |
| 119 * | 120 /// attempts to append it to query |
| 120 * [lowRange] - Creates a range in form as_nlo value..as_nhi value and | 121 /// |
| 121 * attempts to append it to query | 122 /// [lr] - The language restriction for the search results |
| 122 * | 123 /// Possible string values are: |
| 123 * [lr] - The language restriction for the search results | 124 /// - "lang_ar" : Arabic |
| 124 * Possible string values are: | 125 /// - "lang_bg" : Bulgarian |
| 125 * - "lang_ar" : Arabic | 126 /// - "lang_ca" : Catalan |
| 126 * - "lang_bg" : Bulgarian | 127 /// - "lang_cs" : Czech |
| 127 * - "lang_ca" : Catalan | 128 /// - "lang_da" : Danish |
| 128 * - "lang_cs" : Czech | 129 /// - "lang_de" : German |
| 129 * - "lang_da" : Danish | 130 /// - "lang_el" : Greek |
| 130 * - "lang_de" : German | 131 /// - "lang_en" : English |
| 131 * - "lang_el" : Greek | 132 /// - "lang_es" : Spanish |
| 132 * - "lang_en" : English | 133 /// - "lang_et" : Estonian |
| 133 * - "lang_es" : Spanish | 134 /// - "lang_fi" : Finnish |
| 134 * - "lang_et" : Estonian | 135 /// - "lang_fr" : French |
| 135 * - "lang_fi" : Finnish | 136 /// - "lang_hr" : Croatian |
| 136 * - "lang_fr" : French | 137 /// - "lang_hu" : Hungarian |
| 137 * - "lang_hr" : Croatian | 138 /// - "lang_id" : Indonesian |
| 138 * - "lang_hu" : Hungarian | 139 /// - "lang_is" : Icelandic |
| 139 * - "lang_id" : Indonesian | 140 /// - "lang_it" : Italian |
| 140 * - "lang_is" : Icelandic | 141 /// - "lang_iw" : Hebrew |
| 141 * - "lang_it" : Italian | 142 /// - "lang_ja" : Japanese |
| 142 * - "lang_iw" : Hebrew | 143 /// - "lang_ko" : Korean |
| 143 * - "lang_ja" : Japanese | 144 /// - "lang_lt" : Lithuanian |
| 144 * - "lang_ko" : Korean | 145 /// - "lang_lv" : Latvian |
| 145 * - "lang_lt" : Lithuanian | 146 /// - "lang_nl" : Dutch |
| 146 * - "lang_lv" : Latvian | 147 /// - "lang_no" : Norwegian |
| 147 * - "lang_nl" : Dutch | 148 /// - "lang_pl" : Polish |
| 148 * - "lang_no" : Norwegian | 149 /// - "lang_pt" : Portuguese |
| 149 * - "lang_pl" : Polish | 150 /// - "lang_ro" : Romanian |
| 150 * - "lang_pt" : Portuguese | 151 /// - "lang_ru" : Russian |
| 151 * - "lang_ro" : Romanian | 152 /// - "lang_sk" : Slovak |
| 152 * - "lang_ru" : Russian | 153 /// - "lang_sl" : Slovenian |
| 153 * - "lang_sk" : Slovak | 154 /// - "lang_sr" : Serbian |
| 154 * - "lang_sl" : Slovenian | 155 /// - "lang_sv" : Swedish |
| 155 * - "lang_sr" : Serbian | 156 /// - "lang_tr" : Turkish |
| 156 * - "lang_sv" : Swedish | 157 /// - "lang_zh-CN" : Chinese (Simplified) |
| 157 * - "lang_tr" : Turkish | 158 /// - "lang_zh-TW" : Chinese (Traditional) |
| 158 * - "lang_zh-CN" : Chinese (Simplified) | 159 /// |
| 159 * - "lang_zh-TW" : Chinese (Traditional) | 160 /// [num] - Number of search results to return |
| 160 * | 161 /// |
| 161 * [num] - Number of search results to return | 162 /// [orTerms] - Provides additional search terms to check for in a document, |
| 162 * | 163 /// where each document in the search results must contain at least one of |
| 163 * [orTerms] - Provides additional search terms to check for in a document, | 164 /// the additional search terms |
| 164 * where each document in the search results must contain at least one of the | 165 /// |
| 165 * additional search terms | 166 /// [relatedSite] - Specifies that all search results should be pages that |
| 166 * | 167 /// are related to the specified URL |
| 167 * [relatedSite] - Specifies that all search results should be pages that are | 168 /// |
| 168 * related to the specified URL | 169 /// [rights] - Filters based on licensing. Supported values include: |
| 169 * | 170 /// cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, |
| 170 * [rights] - Filters based on licensing. Supported values include: | 171 /// cc_nonderived and combinations of these. |
| 171 * cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, | 172 /// |
| 172 * cc_nonderived and combinations of these. | 173 /// [safe] - Search safety level |
| 173 * | 174 /// Possible string values are: |
| 174 * [safe] - Search safety level | 175 /// - "high" : Enables highest level of safe search filtering. |
| 175 * Possible string values are: | 176 /// - "medium" : Enables moderate safe search filtering. |
| 176 * - "high" : Enables highest level of safe search filtering. | 177 /// - "off" : Disables safe search filtering. |
| 177 * - "medium" : Enables moderate safe search filtering. | 178 /// |
| 178 * - "off" : Disables safe search filtering. | 179 /// [searchType] - Specifies the search type: image. |
| 179 * | 180 /// Possible string values are: |
| 180 * [searchType] - Specifies the search type: image. | 181 /// - "image" : custom image search |
| 181 * Possible string values are: | 182 /// |
| 182 * - "image" : custom image search | 183 /// [siteSearch] - Specifies all search results should be pages from a given |
| 183 * | 184 /// site |
| 184 * [siteSearch] - Specifies all search results should be pages from a given | 185 /// |
| 185 * site | 186 /// [siteSearchFilter] - Controls whether to include or exclude results from |
| 186 * | 187 /// the site named in the as_sitesearch parameter |
| 187 * [siteSearchFilter] - Controls whether to include or exclude results from | 188 /// Possible string values are: |
| 188 * the site named in the as_sitesearch parameter | 189 /// - "e" : exclude |
| 189 * Possible string values are: | 190 /// - "i" : include |
| 190 * - "e" : exclude | 191 /// |
| 191 * - "i" : include | 192 /// [sort] - The sort expression to apply to the results |
| 192 * | 193 /// |
| 193 * [sort] - The sort expression to apply to the results | 194 /// [start] - The index of the first result to return |
| 194 * | 195 /// |
| 195 * [start] - The index of the first result to return | 196 /// Completes with a [Search]. |
| 196 * | 197 /// |
| 197 * Completes with a [Search]. | 198 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 198 * | 199 /// an error. |
| 199 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 200 /// |
| 200 * error. | 201 /// If the used [http.Client] completes with an error when making a REST |
| 201 * | 202 /// call, this method will complete with the same error. |
| 202 * If the used [http.Client] completes with an error when making a REST call, | 203 async.Future<Search> list(core.String q, |
| 203 * this method will complete with the same error. | 204 {core.String c2coff, |
| 204 */ | 205 core.String cr, |
| 205 async.Future<Search> list(core.String q, {core.String c2coff, core.String cr,
core.String cx, core.String dateRestrict, core.String exactTerms, core.String ex
cludeTerms, core.String fileType, core.String filter, core.String gl, core.Strin
g googlehost, core.String highRange, core.String hl, core.String hq, core.String
imgColorType, core.String imgDominantColor, core.String imgSize, core.String im
gType, core.String linkSite, core.String lowRange, core.String lr, core.int num,
core.String orTerms, core.String relatedSite, core.String rights, core.String s
afe, core.String searchType, core.String siteSearch, core.String siteSearchFilte
r, core.String sort, core.int start}) { | 206 core.String cx, |
| 207 core.String dateRestrict, |
| 208 core.String exactTerms, |
| 209 core.String excludeTerms, |
| 210 core.String fileType, |
| 211 core.String filter, |
| 212 core.String gl, |
| 213 core.String googlehost, |
| 214 core.String highRange, |
| 215 core.String hl, |
| 216 core.String hq, |
| 217 core.String imgColorType, |
| 218 core.String imgDominantColor, |
| 219 core.String imgSize, |
| 220 core.String imgType, |
| 221 core.String linkSite, |
| 222 core.String lowRange, |
| 223 core.String lr, |
| 224 core.int num, |
| 225 core.String orTerms, |
| 226 core.String relatedSite, |
| 227 core.String rights, |
| 228 core.String safe, |
| 229 core.String searchType, |
| 230 core.String siteSearch, |
| 231 core.String siteSearchFilter, |
| 232 core.String sort, |
| 233 core.int start}) { |
| 206 var _url = null; | 234 var _url = null; |
| 207 var _queryParams = new core.Map(); | 235 var _queryParams = new core.Map(); |
| 208 var _uploadMedia = null; | 236 var _uploadMedia = null; |
| 209 var _uploadOptions = null; | 237 var _uploadOptions = null; |
| 210 var _downloadOptions = commons.DownloadOptions.Metadata; | 238 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 211 var _body = null; | 239 var _body = null; |
| 212 | 240 |
| 213 if (q == null) { | 241 if (q == null) { |
| 214 throw new core.ArgumentError("Parameter q is required."); | 242 throw new core.ArgumentError("Parameter q is required."); |
| 215 } | 243 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 328 } |
| 301 if (sort != null) { | 329 if (sort != null) { |
| 302 _queryParams["sort"] = [sort]; | 330 _queryParams["sort"] = [sort]; |
| 303 } | 331 } |
| 304 if (start != null) { | 332 if (start != null) { |
| 305 _queryParams["start"] = ["${start}"]; | 333 _queryParams["start"] = ["${start}"]; |
| 306 } | 334 } |
| 307 | 335 |
| 308 _url = 'v1'; | 336 _url = 'v1'; |
| 309 | 337 |
| 310 var _response = _requester.request(_url, | 338 var _response = _requester.request(_url, "GET", |
| 311 "GET", | 339 body: _body, |
| 312 body: _body, | 340 queryParams: _queryParams, |
| 313 queryParams: _queryParams, | 341 uploadOptions: _uploadOptions, |
| 314 uploadOptions: _uploadOptions, | 342 uploadMedia: _uploadMedia, |
| 315 uploadMedia: _uploadMedia, | 343 downloadOptions: _downloadOptions); |
| 316 downloadOptions: _downloadOptions); | |
| 317 return _response.then((data) => new Search.fromJson(data)); | 344 return _response.then((data) => new Search.fromJson(data)); |
| 318 } | 345 } |
| 319 | |
| 320 } | 346 } |
| 321 | 347 |
| 322 | |
| 323 | |
| 324 class ContextFacets { | 348 class ContextFacets { |
| 325 core.String anchor; | 349 core.String anchor; |
| 326 core.String label; | 350 core.String label; |
| 327 core.String labelWithOp; | 351 core.String labelWithOp; |
| 328 | 352 |
| 329 ContextFacets(); | 353 ContextFacets(); |
| 330 | 354 |
| 331 ContextFacets.fromJson(core.Map _json) { | 355 ContextFacets.fromJson(core.Map _json) { |
| 332 if (_json.containsKey("anchor")) { | 356 if (_json.containsKey("anchor")) { |
| 333 anchor = _json["anchor"]; | 357 anchor = _json["anchor"]; |
| 334 } | 358 } |
| 335 if (_json.containsKey("label")) { | 359 if (_json.containsKey("label")) { |
| 336 label = _json["label"]; | 360 label = _json["label"]; |
| 337 } | 361 } |
| 338 if (_json.containsKey("label_with_op")) { | 362 if (_json.containsKey("label_with_op")) { |
| 339 labelWithOp = _json["label_with_op"]; | 363 labelWithOp = _json["label_with_op"]; |
| 340 } | 364 } |
| 341 } | 365 } |
| 342 | 366 |
| 343 core.Map<core.String, core.Object> toJson() { | 367 core.Map<core.String, core.Object> toJson() { |
| 344 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 368 final core.Map<core.String, core.Object> _json = |
| 369 new core.Map<core.String, core.Object>(); |
| 345 if (anchor != null) { | 370 if (anchor != null) { |
| 346 _json["anchor"] = anchor; | 371 _json["anchor"] = anchor; |
| 347 } | 372 } |
| 348 if (label != null) { | 373 if (label != null) { |
| 349 _json["label"] = label; | 374 _json["label"] = label; |
| 350 } | 375 } |
| 351 if (labelWithOp != null) { | 376 if (labelWithOp != null) { |
| 352 _json["label_with_op"] = labelWithOp; | 377 _json["label_with_op"] = labelWithOp; |
| 353 } | 378 } |
| 354 return _json; | 379 return _json; |
| 355 } | 380 } |
| 356 } | 381 } |
| 357 | 382 |
| 358 class Context { | 383 class Context { |
| 359 core.List<core.List<ContextFacets>> facets; | 384 core.List<core.List<ContextFacets>> facets; |
| 360 core.String title; | 385 core.String title; |
| 361 | 386 |
| 362 Context(); | 387 Context(); |
| 363 | 388 |
| 364 Context.fromJson(core.Map _json) { | 389 Context.fromJson(core.Map _json) { |
| 365 if (_json.containsKey("facets")) { | 390 if (_json.containsKey("facets")) { |
| 366 facets = _json["facets"].map((value) => value.map((value) => new ContextFa
cets.fromJson(value)).toList()).toList(); | 391 facets = _json["facets"] |
| 392 .map((value) => |
| 393 value.map((value) => new ContextFacets.fromJson(value)).toList()) |
| 394 .toList(); |
| 367 } | 395 } |
| 368 if (_json.containsKey("title")) { | 396 if (_json.containsKey("title")) { |
| 369 title = _json["title"]; | 397 title = _json["title"]; |
| 370 } | 398 } |
| 371 } | 399 } |
| 372 | 400 |
| 373 core.Map<core.String, core.Object> toJson() { | 401 core.Map<core.String, core.Object> toJson() { |
| 374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 402 final core.Map<core.String, core.Object> _json = |
| 403 new core.Map<core.String, core.Object>(); |
| 375 if (facets != null) { | 404 if (facets != null) { |
| 376 _json["facets"] = facets.map((value) => value.map((value) => (value).toJso
n()).toList()).toList(); | 405 _json["facets"] = facets |
| 406 .map((value) => value.map((value) => (value).toJson()).toList()) |
| 407 .toList(); |
| 377 } | 408 } |
| 378 if (title != null) { | 409 if (title != null) { |
| 379 _json["title"] = title; | 410 _json["title"] = title; |
| 380 } | 411 } |
| 381 return _json; | 412 return _json; |
| 382 } | 413 } |
| 383 } | 414 } |
| 384 | 415 |
| 385 class PromotionBodyLines { | 416 class PromotionBodyLines { |
| 386 core.String htmlTitle; | 417 core.String htmlTitle; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 399 } | 430 } |
| 400 if (_json.containsKey("title")) { | 431 if (_json.containsKey("title")) { |
| 401 title = _json["title"]; | 432 title = _json["title"]; |
| 402 } | 433 } |
| 403 if (_json.containsKey("url")) { | 434 if (_json.containsKey("url")) { |
| 404 url = _json["url"]; | 435 url = _json["url"]; |
| 405 } | 436 } |
| 406 } | 437 } |
| 407 | 438 |
| 408 core.Map<core.String, core.Object> toJson() { | 439 core.Map<core.String, core.Object> toJson() { |
| 409 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 440 final core.Map<core.String, core.Object> _json = |
| 441 new core.Map<core.String, core.Object>(); |
| 410 if (htmlTitle != null) { | 442 if (htmlTitle != null) { |
| 411 _json["htmlTitle"] = htmlTitle; | 443 _json["htmlTitle"] = htmlTitle; |
| 412 } | 444 } |
| 413 if (link != null) { | 445 if (link != null) { |
| 414 _json["link"] = link; | 446 _json["link"] = link; |
| 415 } | 447 } |
| 416 if (title != null) { | 448 if (title != null) { |
| 417 _json["title"] = title; | 449 _json["title"] = title; |
| 418 } | 450 } |
| 419 if (url != null) { | 451 if (url != null) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 436 } | 468 } |
| 437 if (_json.containsKey("source")) { | 469 if (_json.containsKey("source")) { |
| 438 source = _json["source"]; | 470 source = _json["source"]; |
| 439 } | 471 } |
| 440 if (_json.containsKey("width")) { | 472 if (_json.containsKey("width")) { |
| 441 width = _json["width"]; | 473 width = _json["width"]; |
| 442 } | 474 } |
| 443 } | 475 } |
| 444 | 476 |
| 445 core.Map<core.String, core.Object> toJson() { | 477 core.Map<core.String, core.Object> toJson() { |
| 446 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 478 final core.Map<core.String, core.Object> _json = |
| 479 new core.Map<core.String, core.Object>(); |
| 447 if (height != null) { | 480 if (height != null) { |
| 448 _json["height"] = height; | 481 _json["height"] = height; |
| 449 } | 482 } |
| 450 if (source != null) { | 483 if (source != null) { |
| 451 _json["source"] = source; | 484 _json["source"] = source; |
| 452 } | 485 } |
| 453 if (width != null) { | 486 if (width != null) { |
| 454 _json["width"] = width; | 487 _json["width"] = width; |
| 455 } | 488 } |
| 456 return _json; | 489 return _json; |
| 457 } | 490 } |
| 458 } | 491 } |
| 459 | 492 |
| 460 class Promotion { | 493 class Promotion { |
| 461 core.List<PromotionBodyLines> bodyLines; | 494 core.List<PromotionBodyLines> bodyLines; |
| 462 core.String displayLink; | 495 core.String displayLink; |
| 463 core.String htmlTitle; | 496 core.String htmlTitle; |
| 464 PromotionImage image; | 497 PromotionImage image; |
| 465 core.String link; | 498 core.String link; |
| 466 core.String title; | 499 core.String title; |
| 467 | 500 |
| 468 Promotion(); | 501 Promotion(); |
| 469 | 502 |
| 470 Promotion.fromJson(core.Map _json) { | 503 Promotion.fromJson(core.Map _json) { |
| 471 if (_json.containsKey("bodyLines")) { | 504 if (_json.containsKey("bodyLines")) { |
| 472 bodyLines = _json["bodyLines"].map((value) => new PromotionBodyLines.fromJ
son(value)).toList(); | 505 bodyLines = _json["bodyLines"] |
| 506 .map((value) => new PromotionBodyLines.fromJson(value)) |
| 507 .toList(); |
| 473 } | 508 } |
| 474 if (_json.containsKey("displayLink")) { | 509 if (_json.containsKey("displayLink")) { |
| 475 displayLink = _json["displayLink"]; | 510 displayLink = _json["displayLink"]; |
| 476 } | 511 } |
| 477 if (_json.containsKey("htmlTitle")) { | 512 if (_json.containsKey("htmlTitle")) { |
| 478 htmlTitle = _json["htmlTitle"]; | 513 htmlTitle = _json["htmlTitle"]; |
| 479 } | 514 } |
| 480 if (_json.containsKey("image")) { | 515 if (_json.containsKey("image")) { |
| 481 image = new PromotionImage.fromJson(_json["image"]); | 516 image = new PromotionImage.fromJson(_json["image"]); |
| 482 } | 517 } |
| 483 if (_json.containsKey("link")) { | 518 if (_json.containsKey("link")) { |
| 484 link = _json["link"]; | 519 link = _json["link"]; |
| 485 } | 520 } |
| 486 if (_json.containsKey("title")) { | 521 if (_json.containsKey("title")) { |
| 487 title = _json["title"]; | 522 title = _json["title"]; |
| 488 } | 523 } |
| 489 } | 524 } |
| 490 | 525 |
| 491 core.Map<core.String, core.Object> toJson() { | 526 core.Map<core.String, core.Object> toJson() { |
| 492 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 527 final core.Map<core.String, core.Object> _json = |
| 528 new core.Map<core.String, core.Object>(); |
| 493 if (bodyLines != null) { | 529 if (bodyLines != null) { |
| 494 _json["bodyLines"] = bodyLines.map((value) => (value).toJson()).toList(); | 530 _json["bodyLines"] = bodyLines.map((value) => (value).toJson()).toList(); |
| 495 } | 531 } |
| 496 if (displayLink != null) { | 532 if (displayLink != null) { |
| 497 _json["displayLink"] = displayLink; | 533 _json["displayLink"] = displayLink; |
| 498 } | 534 } |
| 499 if (htmlTitle != null) { | 535 if (htmlTitle != null) { |
| 500 _json["htmlTitle"] = htmlTitle; | 536 _json["htmlTitle"] = htmlTitle; |
| 501 } | 537 } |
| 502 if (image != null) { | 538 if (image != null) { |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 } | 693 } |
| 658 if (_json.containsKey("title")) { | 694 if (_json.containsKey("title")) { |
| 659 title = _json["title"]; | 695 title = _json["title"]; |
| 660 } | 696 } |
| 661 if (_json.containsKey("totalResults")) { | 697 if (_json.containsKey("totalResults")) { |
| 662 totalResults = _json["totalResults"]; | 698 totalResults = _json["totalResults"]; |
| 663 } | 699 } |
| 664 } | 700 } |
| 665 | 701 |
| 666 core.Map<core.String, core.Object> toJson() { | 702 core.Map<core.String, core.Object> toJson() { |
| 667 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 703 final core.Map<core.String, core.Object> _json = |
| 704 new core.Map<core.String, core.Object>(); |
| 668 if (count != null) { | 705 if (count != null) { |
| 669 _json["count"] = count; | 706 _json["count"] = count; |
| 670 } | 707 } |
| 671 if (cr != null) { | 708 if (cr != null) { |
| 672 _json["cr"] = cr; | 709 _json["cr"] = cr; |
| 673 } | 710 } |
| 674 if (cx != null) { | 711 if (cx != null) { |
| 675 _json["cx"] = cx; | 712 _json["cx"] = cx; |
| 676 } | 713 } |
| 677 if (dateRestrict != null) { | 714 if (dateRestrict != null) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 } | 843 } |
| 807 if (_json.containsKey("thumbnailWidth")) { | 844 if (_json.containsKey("thumbnailWidth")) { |
| 808 thumbnailWidth = _json["thumbnailWidth"]; | 845 thumbnailWidth = _json["thumbnailWidth"]; |
| 809 } | 846 } |
| 810 if (_json.containsKey("width")) { | 847 if (_json.containsKey("width")) { |
| 811 width = _json["width"]; | 848 width = _json["width"]; |
| 812 } | 849 } |
| 813 } | 850 } |
| 814 | 851 |
| 815 core.Map<core.String, core.Object> toJson() { | 852 core.Map<core.String, core.Object> toJson() { |
| 816 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 853 final core.Map<core.String, core.Object> _json = |
| 854 new core.Map<core.String, core.Object>(); |
| 817 if (byteSize != null) { | 855 if (byteSize != null) { |
| 818 _json["byteSize"] = byteSize; | 856 _json["byteSize"] = byteSize; |
| 819 } | 857 } |
| 820 if (contextLink != null) { | 858 if (contextLink != null) { |
| 821 _json["contextLink"] = contextLink; | 859 _json["contextLink"] = contextLink; |
| 822 } | 860 } |
| 823 if (height != null) { | 861 if (height != null) { |
| 824 _json["height"] = height; | 862 _json["height"] = height; |
| 825 } | 863 } |
| 826 if (thumbnailHeight != null) { | 864 if (thumbnailHeight != null) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 852 } | 890 } |
| 853 if (_json.containsKey("label_with_op")) { | 891 if (_json.containsKey("label_with_op")) { |
| 854 labelWithOp = _json["label_with_op"]; | 892 labelWithOp = _json["label_with_op"]; |
| 855 } | 893 } |
| 856 if (_json.containsKey("name")) { | 894 if (_json.containsKey("name")) { |
| 857 name = _json["name"]; | 895 name = _json["name"]; |
| 858 } | 896 } |
| 859 } | 897 } |
| 860 | 898 |
| 861 core.Map<core.String, core.Object> toJson() { | 899 core.Map<core.String, core.Object> toJson() { |
| 862 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 900 final core.Map<core.String, core.Object> _json = |
| 901 new core.Map<core.String, core.Object>(); |
| 863 if (displayName != null) { | 902 if (displayName != null) { |
| 864 _json["displayName"] = displayName; | 903 _json["displayName"] = displayName; |
| 865 } | 904 } |
| 866 if (labelWithOp != null) { | 905 if (labelWithOp != null) { |
| 867 _json["label_with_op"] = labelWithOp; | 906 _json["label_with_op"] = labelWithOp; |
| 868 } | 907 } |
| 869 if (name != null) { | 908 if (name != null) { |
| 870 _json["name"] = name; | 909 _json["name"] = name; |
| 871 } | 910 } |
| 872 return _json; | 911 return _json; |
| 873 } | 912 } |
| 874 } | 913 } |
| 875 | 914 |
| 876 class Result { | 915 class Result { |
| 877 core.String cacheId; | 916 core.String cacheId; |
| 878 core.String displayLink; | 917 core.String displayLink; |
| 879 core.String fileFormat; | 918 core.String fileFormat; |
| 880 core.String formattedUrl; | 919 core.String formattedUrl; |
| 881 core.String htmlFormattedUrl; | 920 core.String htmlFormattedUrl; |
| 882 core.String htmlSnippet; | 921 core.String htmlSnippet; |
| 883 core.String htmlTitle; | 922 core.String htmlTitle; |
| 884 ResultImage image; | 923 ResultImage image; |
| 885 core.String kind; | 924 core.String kind; |
| 886 core.List<ResultLabels> labels; | 925 core.List<ResultLabels> labels; |
| 887 core.String link; | 926 core.String link; |
| 888 core.String mime; | 927 core.String mime; |
| 889 /** | 928 |
| 890 * | 929 /// |
| 891 * | 930 /// |
| 892 * The values for Object must be JSON objects. It can consist of `num`, | 931 /// The values for Object must be JSON objects. It can consist of `num`, |
| 893 * `String`, `bool` and `null` as well as `Map` and `List` values. | 932 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 894 */ | |
| 895 core.Map<core.String, core.List<core.Map<core.String, core.Object>>> pagemap; | 933 core.Map<core.String, core.List<core.Map<core.String, core.Object>>> pagemap; |
| 896 core.String snippet; | 934 core.String snippet; |
| 897 core.String title; | 935 core.String title; |
| 898 | 936 |
| 899 Result(); | 937 Result(); |
| 900 | 938 |
| 901 Result.fromJson(core.Map _json) { | 939 Result.fromJson(core.Map _json) { |
| 902 if (_json.containsKey("cacheId")) { | 940 if (_json.containsKey("cacheId")) { |
| 903 cacheId = _json["cacheId"]; | 941 cacheId = _json["cacheId"]; |
| 904 } | 942 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 920 if (_json.containsKey("htmlTitle")) { | 958 if (_json.containsKey("htmlTitle")) { |
| 921 htmlTitle = _json["htmlTitle"]; | 959 htmlTitle = _json["htmlTitle"]; |
| 922 } | 960 } |
| 923 if (_json.containsKey("image")) { | 961 if (_json.containsKey("image")) { |
| 924 image = new ResultImage.fromJson(_json["image"]); | 962 image = new ResultImage.fromJson(_json["image"]); |
| 925 } | 963 } |
| 926 if (_json.containsKey("kind")) { | 964 if (_json.containsKey("kind")) { |
| 927 kind = _json["kind"]; | 965 kind = _json["kind"]; |
| 928 } | 966 } |
| 929 if (_json.containsKey("labels")) { | 967 if (_json.containsKey("labels")) { |
| 930 labels = _json["labels"].map((value) => new ResultLabels.fromJson(value)).
toList(); | 968 labels = _json["labels"] |
| 969 .map((value) => new ResultLabels.fromJson(value)) |
| 970 .toList(); |
| 931 } | 971 } |
| 932 if (_json.containsKey("link")) { | 972 if (_json.containsKey("link")) { |
| 933 link = _json["link"]; | 973 link = _json["link"]; |
| 934 } | 974 } |
| 935 if (_json.containsKey("mime")) { | 975 if (_json.containsKey("mime")) { |
| 936 mime = _json["mime"]; | 976 mime = _json["mime"]; |
| 937 } | 977 } |
| 938 if (_json.containsKey("pagemap")) { | 978 if (_json.containsKey("pagemap")) { |
| 939 pagemap = _json["pagemap"]; | 979 pagemap = _json["pagemap"]; |
| 940 } | 980 } |
| 941 if (_json.containsKey("snippet")) { | 981 if (_json.containsKey("snippet")) { |
| 942 snippet = _json["snippet"]; | 982 snippet = _json["snippet"]; |
| 943 } | 983 } |
| 944 if (_json.containsKey("title")) { | 984 if (_json.containsKey("title")) { |
| 945 title = _json["title"]; | 985 title = _json["title"]; |
| 946 } | 986 } |
| 947 } | 987 } |
| 948 | 988 |
| 949 core.Map<core.String, core.Object> toJson() { | 989 core.Map<core.String, core.Object> toJson() { |
| 950 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 990 final core.Map<core.String, core.Object> _json = |
| 991 new core.Map<core.String, core.Object>(); |
| 951 if (cacheId != null) { | 992 if (cacheId != null) { |
| 952 _json["cacheId"] = cacheId; | 993 _json["cacheId"] = cacheId; |
| 953 } | 994 } |
| 954 if (displayLink != null) { | 995 if (displayLink != null) { |
| 955 _json["displayLink"] = displayLink; | 996 _json["displayLink"] = displayLink; |
| 956 } | 997 } |
| 957 if (fileFormat != null) { | 998 if (fileFormat != null) { |
| 958 _json["fileFormat"] = fileFormat; | 999 _json["fileFormat"] = fileFormat; |
| 959 } | 1000 } |
| 960 if (formattedUrl != null) { | 1001 if (formattedUrl != null) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 } | 1055 } |
| 1015 if (_json.containsKey("searchTime")) { | 1056 if (_json.containsKey("searchTime")) { |
| 1016 searchTime = _json["searchTime"]; | 1057 searchTime = _json["searchTime"]; |
| 1017 } | 1058 } |
| 1018 if (_json.containsKey("totalResults")) { | 1059 if (_json.containsKey("totalResults")) { |
| 1019 totalResults = _json["totalResults"]; | 1060 totalResults = _json["totalResults"]; |
| 1020 } | 1061 } |
| 1021 } | 1062 } |
| 1022 | 1063 |
| 1023 core.Map<core.String, core.Object> toJson() { | 1064 core.Map<core.String, core.Object> toJson() { |
| 1024 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1065 final core.Map<core.String, core.Object> _json = |
| 1066 new core.Map<core.String, core.Object>(); |
| 1025 if (formattedSearchTime != null) { | 1067 if (formattedSearchTime != null) { |
| 1026 _json["formattedSearchTime"] = formattedSearchTime; | 1068 _json["formattedSearchTime"] = formattedSearchTime; |
| 1027 } | 1069 } |
| 1028 if (formattedTotalResults != null) { | 1070 if (formattedTotalResults != null) { |
| 1029 _json["formattedTotalResults"] = formattedTotalResults; | 1071 _json["formattedTotalResults"] = formattedTotalResults; |
| 1030 } | 1072 } |
| 1031 if (searchTime != null) { | 1073 if (searchTime != null) { |
| 1032 _json["searchTime"] = searchTime; | 1074 _json["searchTime"] = searchTime; |
| 1033 } | 1075 } |
| 1034 if (totalResults != null) { | 1076 if (totalResults != null) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1047 SearchSpelling.fromJson(core.Map _json) { | 1089 SearchSpelling.fromJson(core.Map _json) { |
| 1048 if (_json.containsKey("correctedQuery")) { | 1090 if (_json.containsKey("correctedQuery")) { |
| 1049 correctedQuery = _json["correctedQuery"]; | 1091 correctedQuery = _json["correctedQuery"]; |
| 1050 } | 1092 } |
| 1051 if (_json.containsKey("htmlCorrectedQuery")) { | 1093 if (_json.containsKey("htmlCorrectedQuery")) { |
| 1052 htmlCorrectedQuery = _json["htmlCorrectedQuery"]; | 1094 htmlCorrectedQuery = _json["htmlCorrectedQuery"]; |
| 1053 } | 1095 } |
| 1054 } | 1096 } |
| 1055 | 1097 |
| 1056 core.Map<core.String, core.Object> toJson() { | 1098 core.Map<core.String, core.Object> toJson() { |
| 1057 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1099 final core.Map<core.String, core.Object> _json = |
| 1100 new core.Map<core.String, core.Object>(); |
| 1058 if (correctedQuery != null) { | 1101 if (correctedQuery != null) { |
| 1059 _json["correctedQuery"] = correctedQuery; | 1102 _json["correctedQuery"] = correctedQuery; |
| 1060 } | 1103 } |
| 1061 if (htmlCorrectedQuery != null) { | 1104 if (htmlCorrectedQuery != null) { |
| 1062 _json["htmlCorrectedQuery"] = htmlCorrectedQuery; | 1105 _json["htmlCorrectedQuery"] = htmlCorrectedQuery; |
| 1063 } | 1106 } |
| 1064 return _json; | 1107 return _json; |
| 1065 } | 1108 } |
| 1066 } | 1109 } |
| 1067 | 1110 |
| 1068 class SearchUrl { | 1111 class SearchUrl { |
| 1069 core.String template; | 1112 core.String template; |
| 1070 core.String type; | 1113 core.String type; |
| 1071 | 1114 |
| 1072 SearchUrl(); | 1115 SearchUrl(); |
| 1073 | 1116 |
| 1074 SearchUrl.fromJson(core.Map _json) { | 1117 SearchUrl.fromJson(core.Map _json) { |
| 1075 if (_json.containsKey("template")) { | 1118 if (_json.containsKey("template")) { |
| 1076 template = _json["template"]; | 1119 template = _json["template"]; |
| 1077 } | 1120 } |
| 1078 if (_json.containsKey("type")) { | 1121 if (_json.containsKey("type")) { |
| 1079 type = _json["type"]; | 1122 type = _json["type"]; |
| 1080 } | 1123 } |
| 1081 } | 1124 } |
| 1082 | 1125 |
| 1083 core.Map<core.String, core.Object> toJson() { | 1126 core.Map<core.String, core.Object> toJson() { |
| 1084 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1127 final core.Map<core.String, core.Object> _json = |
| 1128 new core.Map<core.String, core.Object>(); |
| 1085 if (template != null) { | 1129 if (template != null) { |
| 1086 _json["template"] = template; | 1130 _json["template"] = template; |
| 1087 } | 1131 } |
| 1088 if (type != null) { | 1132 if (type != null) { |
| 1089 _json["type"] = type; | 1133 _json["type"] = type; |
| 1090 } | 1134 } |
| 1091 return _json; | 1135 return _json; |
| 1092 } | 1136 } |
| 1093 } | 1137 } |
| 1094 | 1138 |
| 1095 class Search { | 1139 class Search { |
| 1096 Context context; | 1140 Context context; |
| 1097 core.List<Result> items; | 1141 core.List<Result> items; |
| 1098 core.String kind; | 1142 core.String kind; |
| 1099 core.List<Promotion> promotions; | 1143 core.List<Promotion> promotions; |
| 1100 core.Map<core.String, core.List<Query>> queries; | 1144 core.Map<core.String, core.List<Query>> queries; |
| 1101 SearchSearchInformation searchInformation; | 1145 SearchSearchInformation searchInformation; |
| 1102 SearchSpelling spelling; | 1146 SearchSpelling spelling; |
| 1103 SearchUrl url; | 1147 SearchUrl url; |
| 1104 | 1148 |
| 1105 Search(); | 1149 Search(); |
| 1106 | 1150 |
| 1107 Search.fromJson(core.Map _json) { | 1151 Search.fromJson(core.Map _json) { |
| 1108 if (_json.containsKey("context")) { | 1152 if (_json.containsKey("context")) { |
| 1109 context = new Context.fromJson(_json["context"]); | 1153 context = new Context.fromJson(_json["context"]); |
| 1110 } | 1154 } |
| 1111 if (_json.containsKey("items")) { | 1155 if (_json.containsKey("items")) { |
| 1112 items = _json["items"].map((value) => new Result.fromJson(value)).toList()
; | 1156 items = |
| 1157 _json["items"].map((value) => new Result.fromJson(value)).toList(); |
| 1113 } | 1158 } |
| 1114 if (_json.containsKey("kind")) { | 1159 if (_json.containsKey("kind")) { |
| 1115 kind = _json["kind"]; | 1160 kind = _json["kind"]; |
| 1116 } | 1161 } |
| 1117 if (_json.containsKey("promotions")) { | 1162 if (_json.containsKey("promotions")) { |
| 1118 promotions = _json["promotions"].map((value) => new Promotion.fromJson(val
ue)).toList(); | 1163 promotions = _json["promotions"] |
| 1164 .map((value) => new Promotion.fromJson(value)) |
| 1165 .toList(); |
| 1119 } | 1166 } |
| 1120 if (_json.containsKey("queries")) { | 1167 if (_json.containsKey("queries")) { |
| 1121 queries = commons.mapMap<core.List<core.Map<core.String, core.Object>>, co
re.List<Query>>(_json["queries"], (core.List<core.Map<core.String, core.Object>>
item) => item.map((value) => new Query.fromJson(value)).toList()); | 1168 queries = commons.mapMap<core.List<core.Map<core.String, core.Object>>, |
| 1169 core.List<Query>>( |
| 1170 _json["queries"], |
| 1171 (core.List<core.Map<core.String, core.Object>> item) => |
| 1172 item.map((value) => new Query.fromJson(value)).toList()); |
| 1122 } | 1173 } |
| 1123 if (_json.containsKey("searchInformation")) { | 1174 if (_json.containsKey("searchInformation")) { |
| 1124 searchInformation = new SearchSearchInformation.fromJson(_json["searchInfo
rmation"]); | 1175 searchInformation = |
| 1176 new SearchSearchInformation.fromJson(_json["searchInformation"]); |
| 1125 } | 1177 } |
| 1126 if (_json.containsKey("spelling")) { | 1178 if (_json.containsKey("spelling")) { |
| 1127 spelling = new SearchSpelling.fromJson(_json["spelling"]); | 1179 spelling = new SearchSpelling.fromJson(_json["spelling"]); |
| 1128 } | 1180 } |
| 1129 if (_json.containsKey("url")) { | 1181 if (_json.containsKey("url")) { |
| 1130 url = new SearchUrl.fromJson(_json["url"]); | 1182 url = new SearchUrl.fromJson(_json["url"]); |
| 1131 } | 1183 } |
| 1132 } | 1184 } |
| 1133 | 1185 |
| 1134 core.Map<core.String, core.Object> toJson() { | 1186 core.Map<core.String, core.Object> toJson() { |
| 1135 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1187 final core.Map<core.String, core.Object> _json = |
| 1188 new core.Map<core.String, core.Object>(); |
| 1136 if (context != null) { | 1189 if (context != null) { |
| 1137 _json["context"] = (context).toJson(); | 1190 _json["context"] = (context).toJson(); |
| 1138 } | 1191 } |
| 1139 if (items != null) { | 1192 if (items != null) { |
| 1140 _json["items"] = items.map((value) => (value).toJson()).toList(); | 1193 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1141 } | 1194 } |
| 1142 if (kind != null) { | 1195 if (kind != null) { |
| 1143 _json["kind"] = kind; | 1196 _json["kind"] = kind; |
| 1144 } | 1197 } |
| 1145 if (promotions != null) { | 1198 if (promotions != null) { |
| 1146 _json["promotions"] = promotions.map((value) => (value).toJson()).toList()
; | 1199 _json["promotions"] = |
| 1200 promotions.map((value) => (value).toJson()).toList(); |
| 1147 } | 1201 } |
| 1148 if (queries != null) { | 1202 if (queries != null) { |
| 1149 _json["queries"] = commons.mapMap<core.List<Query>, core.List<core.Map<cor
e.String, core.Object>>>(queries, (core.List<Query> item) => item.map((value) =>
(value).toJson()).toList()); | 1203 _json["queries"] = commons.mapMap<core.List<Query>, |
| 1204 core.List<core.Map<core.String, core.Object>>>( |
| 1205 queries, |
| 1206 (core.List<Query> item) => |
| 1207 item.map((value) => (value).toJson()).toList()); |
| 1150 } | 1208 } |
| 1151 if (searchInformation != null) { | 1209 if (searchInformation != null) { |
| 1152 _json["searchInformation"] = (searchInformation).toJson(); | 1210 _json["searchInformation"] = (searchInformation).toJson(); |
| 1153 } | 1211 } |
| 1154 if (spelling != null) { | 1212 if (spelling != null) { |
| 1155 _json["spelling"] = (spelling).toJson(); | 1213 _json["spelling"] = (spelling).toJson(); |
| 1156 } | 1214 } |
| 1157 if (url != null) { | 1215 if (url != null) { |
| 1158 _json["url"] = (url).toJson(); | 1216 _json["url"] = (url).toJson(); |
| 1159 } | 1217 } |
| 1160 return _json; | 1218 return _json; |
| 1161 } | 1219 } |
| 1162 } | 1220 } |
| OLD | NEW |