| 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.manufacturers.v1; | 3 library googleapis.manufacturers.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; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 uploadOptions: _uploadOptions, | 100 uploadOptions: _uploadOptions, |
| 101 uploadMedia: _uploadMedia, | 101 uploadMedia: _uploadMedia, |
| 102 downloadOptions: _downloadOptions); | 102 downloadOptions: _downloadOptions); |
| 103 return _response.then((data) => new Empty.fromJson(data)); | 103 return _response.then((data) => new Empty.fromJson(data)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 /** | 106 /** |
| 107 * Gets the product from a Manufacturer Center account, including product | 107 * Gets the product from a Manufacturer Center account, including product |
| 108 * issues. | 108 * issues. |
| 109 * | 109 * |
| 110 * A recently updated product takes some time to be processed before any | 110 * A recently updated product takes around 15 minutes to process. Changes are |
| 111 * changes are visible. While some issues may be available once the product | 111 * only visible after it has been processed. While some issues may be |
| 112 * has been processed, other issues may take days to appear. | 112 * available once the product has been processed, other issues may take days |
| 113 * to appear. |
| 113 * | 114 * |
| 114 * Request parameters: | 115 * Request parameters: |
| 115 * | 116 * |
| 116 * [parent] - Parent ID in the format `accounts/{account_id}`. | 117 * [parent] - Parent ID in the format `accounts/{account_id}`. |
| 117 * | 118 * |
| 118 * `account_id` - The ID of the Manufacturer Center account. | 119 * `account_id` - The ID of the Manufacturer Center account. |
| 119 * Value must have pattern "^accounts/[^/]+$". | 120 * Value must have pattern "^accounts/[^/]+$". |
| 120 * | 121 * |
| 121 * [name] - Name in the format | 122 * [name] - Name in the format |
| 122 * `{target_country}:{content_language}:{product_id}`. | 123 * `{target_country}:{content_language}:{product_id}`. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 /** | 170 /** |
| 170 * Lists all the products in a Manufacturer Center account. | 171 * Lists all the products in a Manufacturer Center account. |
| 171 * | 172 * |
| 172 * Request parameters: | 173 * Request parameters: |
| 173 * | 174 * |
| 174 * [parent] - Parent ID in the format `accounts/{account_id}`. | 175 * [parent] - Parent ID in the format `accounts/{account_id}`. |
| 175 * | 176 * |
| 176 * `account_id` - The ID of the Manufacturer Center account. | 177 * `account_id` - The ID of the Manufacturer Center account. |
| 177 * Value must have pattern "^accounts/[^/]+$". | 178 * Value must have pattern "^accounts/[^/]+$". |
| 178 * | 179 * |
| 180 * [pageToken] - The token returned by the previous request. |
| 181 * |
| 179 * [pageSize] - Maximum number of product statuses to return in the response, | 182 * [pageSize] - Maximum number of product statuses to return in the response, |
| 180 * used for | 183 * used for |
| 181 * paging. | 184 * paging. |
| 182 * | 185 * |
| 183 * [pageToken] - The token returned by the previous request. | |
| 184 * | |
| 185 * Completes with a [ListProductsResponse]. | 186 * Completes with a [ListProductsResponse]. |
| 186 * | 187 * |
| 187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 188 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 188 * error. | 189 * error. |
| 189 * | 190 * |
| 190 * If the used [http.Client] completes with an error when making a REST call, | 191 * If the used [http.Client] completes with an error when making a REST call, |
| 191 * this method will complete with the same error. | 192 * this method will complete with the same error. |
| 192 */ | 193 */ |
| 193 async.Future<ListProductsResponse> list(core.String parent, {core.int pageSize
, core.String pageToken}) { | 194 async.Future<ListProductsResponse> list(core.String parent, {core.String pageT
oken, core.int pageSize}) { |
| 194 var _url = null; | 195 var _url = null; |
| 195 var _queryParams = new core.Map(); | 196 var _queryParams = new core.Map(); |
| 196 var _uploadMedia = null; | 197 var _uploadMedia = null; |
| 197 var _uploadOptions = null; | 198 var _uploadOptions = null; |
| 198 var _downloadOptions = commons.DownloadOptions.Metadata; | 199 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 199 var _body = null; | 200 var _body = null; |
| 200 | 201 |
| 201 if (parent == null) { | 202 if (parent == null) { |
| 202 throw new core.ArgumentError("Parameter parent is required."); | 203 throw new core.ArgumentError("Parameter parent is required."); |
| 203 } | 204 } |
| 205 if (pageToken != null) { |
| 206 _queryParams["pageToken"] = [pageToken]; |
| 207 } |
| 204 if (pageSize != null) { | 208 if (pageSize != null) { |
| 205 _queryParams["pageSize"] = ["${pageSize}"]; | 209 _queryParams["pageSize"] = ["${pageSize}"]; |
| 206 } | 210 } |
| 207 if (pageToken != null) { | |
| 208 _queryParams["pageToken"] = [pageToken]; | |
| 209 } | |
| 210 | 211 |
| 211 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/products
'; | 212 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/products
'; |
| 212 | 213 |
| 213 var _response = _requester.request(_url, | 214 var _response = _requester.request(_url, |
| 214 "GET", | 215 "GET", |
| 215 body: _body, | 216 body: _body, |
| 216 queryParams: _queryParams, | 217 queryParams: _queryParams, |
| 217 uploadOptions: _uploadOptions, | 218 uploadOptions: _uploadOptions, |
| 218 uploadMedia: _uploadMedia, | 219 uploadMedia: _uploadMedia, |
| 219 downloadOptions: _downloadOptions); | 220 downloadOptions: _downloadOptions); |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 * The size type of the product. For more information, see | 444 * The size type of the product. For more information, see |
| 444 * https://support.google.com/manufacturers/answer/6124116#sizetype. | 445 * https://support.google.com/manufacturers/answer/6124116#sizetype. |
| 445 */ | 446 */ |
| 446 core.String sizeType; | 447 core.String sizeType; |
| 447 /** | 448 /** |
| 448 * The suggested retail price (MSRP) of the product. For more information, | 449 * The suggested retail price (MSRP) of the product. For more information, |
| 449 * see https://support.google.com/manufacturers/answer/6124116#price. | 450 * see https://support.google.com/manufacturers/answer/6124116#price. |
| 450 */ | 451 */ |
| 451 Price suggestedRetailPrice; | 452 Price suggestedRetailPrice; |
| 452 /** | 453 /** |
| 454 * The target account id. Should only be used in the accounts of the data |
| 455 * partners. |
| 456 */ |
| 457 core.String targetAccountId; |
| 458 /** |
| 453 * The theme of the product. For more information, see | 459 * The theme of the product. For more information, see |
| 454 * https://support.google.com/manufacturers/answer/6124116#theme. | 460 * https://support.google.com/manufacturers/answer/6124116#theme. |
| 455 */ | 461 */ |
| 456 core.String theme; | 462 core.String theme; |
| 457 /** | 463 /** |
| 458 * The title of the product. For more information, see | 464 * The title of the product. For more information, see |
| 459 * https://support.google.com/manufacturers/answer/6124116#title. | 465 * https://support.google.com/manufacturers/answer/6124116#title. |
| 460 */ | 466 */ |
| 461 core.String title; | 467 core.String title; |
| 462 /** | 468 /** |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 554 } |
| 549 if (_json.containsKey("sizeSystem")) { | 555 if (_json.containsKey("sizeSystem")) { |
| 550 sizeSystem = _json["sizeSystem"]; | 556 sizeSystem = _json["sizeSystem"]; |
| 551 } | 557 } |
| 552 if (_json.containsKey("sizeType")) { | 558 if (_json.containsKey("sizeType")) { |
| 553 sizeType = _json["sizeType"]; | 559 sizeType = _json["sizeType"]; |
| 554 } | 560 } |
| 555 if (_json.containsKey("suggestedRetailPrice")) { | 561 if (_json.containsKey("suggestedRetailPrice")) { |
| 556 suggestedRetailPrice = new Price.fromJson(_json["suggestedRetailPrice"]); | 562 suggestedRetailPrice = new Price.fromJson(_json["suggestedRetailPrice"]); |
| 557 } | 563 } |
| 564 if (_json.containsKey("targetAccountId")) { |
| 565 targetAccountId = _json["targetAccountId"]; |
| 566 } |
| 558 if (_json.containsKey("theme")) { | 567 if (_json.containsKey("theme")) { |
| 559 theme = _json["theme"]; | 568 theme = _json["theme"]; |
| 560 } | 569 } |
| 561 if (_json.containsKey("title")) { | 570 if (_json.containsKey("title")) { |
| 562 title = _json["title"]; | 571 title = _json["title"]; |
| 563 } | 572 } |
| 564 if (_json.containsKey("videoLink")) { | 573 if (_json.containsKey("videoLink")) { |
| 565 videoLink = _json["videoLink"]; | 574 videoLink = _json["videoLink"]; |
| 566 } | 575 } |
| 567 } | 576 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 } | 657 } |
| 649 if (sizeSystem != null) { | 658 if (sizeSystem != null) { |
| 650 _json["sizeSystem"] = sizeSystem; | 659 _json["sizeSystem"] = sizeSystem; |
| 651 } | 660 } |
| 652 if (sizeType != null) { | 661 if (sizeType != null) { |
| 653 _json["sizeType"] = sizeType; | 662 _json["sizeType"] = sizeType; |
| 654 } | 663 } |
| 655 if (suggestedRetailPrice != null) { | 664 if (suggestedRetailPrice != null) { |
| 656 _json["suggestedRetailPrice"] = (suggestedRetailPrice).toJson(); | 665 _json["suggestedRetailPrice"] = (suggestedRetailPrice).toJson(); |
| 657 } | 666 } |
| 667 if (targetAccountId != null) { |
| 668 _json["targetAccountId"] = targetAccountId; |
| 669 } |
| 658 if (theme != null) { | 670 if (theme != null) { |
| 659 _json["theme"] = theme; | 671 _json["theme"] = theme; |
| 660 } | 672 } |
| 661 if (title != null) { | 673 if (title != null) { |
| 662 _json["title"] = title; | 674 _json["title"] = title; |
| 663 } | 675 } |
| 664 if (videoLink != null) { | 676 if (videoLink != null) { |
| 665 _json["videoLink"] = videoLink; | 677 _json["videoLink"] = videoLink; |
| 666 } | 678 } |
| 667 return _json; | 679 return _json; |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 } | 1188 } |
| 1177 if (attributeValue != null) { | 1189 if (attributeValue != null) { |
| 1178 _json["attributeValue"] = attributeValue; | 1190 _json["attributeValue"] = attributeValue; |
| 1179 } | 1191 } |
| 1180 if (sectionName != null) { | 1192 if (sectionName != null) { |
| 1181 _json["sectionName"] = sectionName; | 1193 _json["sectionName"] = sectionName; |
| 1182 } | 1194 } |
| 1183 return _json; | 1195 return _json; |
| 1184 } | 1196 } |
| 1185 } | 1197 } |
| OLD | NEW |