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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 /** | 169 /** |
170 * Lists all the products in a Manufacturer Center account. | 170 * Lists all the products in a Manufacturer Center account. |
171 * | 171 * |
172 * Request parameters: | 172 * Request parameters: |
173 * | 173 * |
174 * [parent] - Parent ID in the format `accounts/{account_id}`. | 174 * [parent] - Parent ID in the format `accounts/{account_id}`. |
175 * | 175 * |
176 * `account_id` - The ID of the Manufacturer Center account. | 176 * `account_id` - The ID of the Manufacturer Center account. |
177 * Value must have pattern "^accounts/[^/]+$". | 177 * Value must have pattern "^accounts/[^/]+$". |
178 * | 178 * |
179 * [pageToken] - The token returned by the previous request. | |
180 * | |
181 * [pageSize] - Maximum number of product statuses to return in the response, | 179 * [pageSize] - Maximum number of product statuses to return in the response, |
182 * used for | 180 * used for |
183 * paging. | 181 * paging. |
184 * | 182 * |
| 183 * [pageToken] - The token returned by the previous request. |
| 184 * |
185 * Completes with a [ListProductsResponse]. | 185 * Completes with a [ListProductsResponse]. |
186 * | 186 * |
187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
188 * error. | 188 * error. |
189 * | 189 * |
190 * If the used [http.Client] completes with an error when making a REST call, | 190 * If the used [http.Client] completes with an error when making a REST call, |
191 * this method will complete with the same error. | 191 * this method will complete with the same error. |
192 */ | 192 */ |
193 async.Future<ListProductsResponse> list(core.String parent, {core.String pageT
oken, core.int pageSize}) { | 193 async.Future<ListProductsResponse> list(core.String parent, {core.int pageSize
, core.String pageToken}) { |
194 var _url = null; | 194 var _url = null; |
195 var _queryParams = new core.Map(); | 195 var _queryParams = new core.Map(); |
196 var _uploadMedia = null; | 196 var _uploadMedia = null; |
197 var _uploadOptions = null; | 197 var _uploadOptions = null; |
198 var _downloadOptions = commons.DownloadOptions.Metadata; | 198 var _downloadOptions = commons.DownloadOptions.Metadata; |
199 var _body = null; | 199 var _body = null; |
200 | 200 |
201 if (parent == null) { | 201 if (parent == null) { |
202 throw new core.ArgumentError("Parameter parent is required."); | 202 throw new core.ArgumentError("Parameter parent is required."); |
203 } | 203 } |
| 204 if (pageSize != null) { |
| 205 _queryParams["pageSize"] = ["${pageSize}"]; |
| 206 } |
204 if (pageToken != null) { | 207 if (pageToken != null) { |
205 _queryParams["pageToken"] = [pageToken]; | 208 _queryParams["pageToken"] = [pageToken]; |
206 } | 209 } |
207 if (pageSize != null) { | |
208 _queryParams["pageSize"] = ["${pageSize}"]; | |
209 } | |
210 | 210 |
211 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/products
'; | 211 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/products
'; |
212 | 212 |
213 var _response = _requester.request(_url, | 213 var _response = _requester.request(_url, |
214 "GET", | 214 "GET", |
215 body: _body, | 215 body: _body, |
216 queryParams: _queryParams, | 216 queryParams: _queryParams, |
217 uploadOptions: _uploadOptions, | 217 uploadOptions: _uploadOptions, |
218 uploadMedia: _uploadMedia, | 218 uploadMedia: _uploadMedia, |
219 downloadOptions: _downloadOptions); | 219 downloadOptions: _downloadOptions); |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 } | 1176 } |
1177 if (attributeValue != null) { | 1177 if (attributeValue != null) { |
1178 _json["attributeValue"] = attributeValue; | 1178 _json["attributeValue"] = attributeValue; |
1179 } | 1179 } |
1180 if (sectionName != null) { | 1180 if (sectionName != null) { |
1181 _json["sectionName"] = sectionName; | 1181 _json["sectionName"] = sectionName; |
1182 } | 1182 } |
1183 return _json; | 1183 return _json; |
1184 } | 1184 } |
1185 } | 1185 } |
OLD | NEW |