| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 /** | 107 /** |
| 108 * Lists all the products in a Manufacturer Center account. | 108 * Lists all the products in a Manufacturer Center account. |
| 109 * | 109 * |
| 110 * Request parameters: | 110 * Request parameters: |
| 111 * | 111 * |
| 112 * [parent] - Parent ID in the format `accounts/{account_id}`. | 112 * [parent] - Parent ID in the format `accounts/{account_id}`. |
| 113 * | 113 * |
| 114 * `account_id` - The ID of the Manufacturer Center account. | 114 * `account_id` - The ID of the Manufacturer Center account. |
| 115 * Value must have pattern "^accounts/[^/]+$". | 115 * Value must have pattern "^accounts/[^/]+$". |
| 116 * | 116 * |
| 117 * [pageToken] - The token returned by the previous request. | |
| 118 * | |
| 119 * [pageSize] - Maximum number of product statuses to return in the response, | 117 * [pageSize] - Maximum number of product statuses to return in the response, |
| 120 * used for | 118 * used for |
| 121 * paging. | 119 * paging. |
| 122 * | 120 * |
| 121 * [pageToken] - The token returned by the previous request. |
| 122 * |
| 123 * Completes with a [ListProductsResponse]. | 123 * Completes with a [ListProductsResponse]. |
| 124 * | 124 * |
| 125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 126 * error. | 126 * error. |
| 127 * | 127 * |
| 128 * If the used [http.Client] completes with an error when making a REST call, | 128 * If the used [http.Client] completes with an error when making a REST call, |
| 129 * this method will complete with the same error. | 129 * this method will complete with the same error. |
| 130 */ | 130 */ |
| 131 async.Future<ListProductsResponse> list(core.String parent, {core.String pageT
oken, core.int pageSize}) { | 131 async.Future<ListProductsResponse> list(core.String parent, {core.int pageSize
, core.String pageToken}) { |
| 132 var _url = null; | 132 var _url = null; |
| 133 var _queryParams = new core.Map(); | 133 var _queryParams = new core.Map(); |
| 134 var _uploadMedia = null; | 134 var _uploadMedia = null; |
| 135 var _uploadOptions = null; | 135 var _uploadOptions = null; |
| 136 var _downloadOptions = commons.DownloadOptions.Metadata; | 136 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 137 var _body = null; | 137 var _body = null; |
| 138 | 138 |
| 139 if (parent == null) { | 139 if (parent == null) { |
| 140 throw new core.ArgumentError("Parameter parent is required."); | 140 throw new core.ArgumentError("Parameter parent is required."); |
| 141 } | 141 } |
| 142 if (pageSize != null) { |
| 143 _queryParams["pageSize"] = ["${pageSize}"]; |
| 144 } |
| 142 if (pageToken != null) { | 145 if (pageToken != null) { |
| 143 _queryParams["pageToken"] = [pageToken]; | 146 _queryParams["pageToken"] = [pageToken]; |
| 144 } | 147 } |
| 145 if (pageSize != null) { | |
| 146 _queryParams["pageSize"] = ["${pageSize}"]; | |
| 147 } | |
| 148 | 148 |
| 149 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/products
'; | 149 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/products
'; |
| 150 | 150 |
| 151 var _response = _requester.request(_url, | 151 var _response = _requester.request(_url, |
| 152 "GET", | 152 "GET", |
| 153 body: _body, | 153 body: _body, |
| 154 queryParams: _queryParams, | 154 queryParams: _queryParams, |
| 155 uploadOptions: _uploadOptions, | 155 uploadOptions: _uploadOptions, |
| 156 uploadMedia: _uploadMedia, | 156 uploadMedia: _uploadMedia, |
| 157 downloadOptions: _downloadOptions); | 157 downloadOptions: _downloadOptions); |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 } | 1016 } |
| 1017 if (attributeValue != null) { | 1017 if (attributeValue != null) { |
| 1018 _json["attributeValue"] = attributeValue; | 1018 _json["attributeValue"] = attributeValue; |
| 1019 } | 1019 } |
| 1020 if (sectionName != null) { | 1020 if (sectionName != null) { |
| 1021 _json["sectionName"] = sectionName; | 1021 _json["sectionName"] = sectionName; |
| 1022 } | 1022 } |
| 1023 return _json; | 1023 return _json; |
| 1024 } | 1024 } |
| 1025 } | 1025 } |
| OLD | NEW |