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...) 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 * |
117 * [pageSize] - Maximum number of product statuses to return in the response, | 119 * [pageSize] - Maximum number of product statuses to return in the response, |
118 * used for | 120 * used for |
119 * paging. | 121 * paging. |
120 * | 122 * |
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.int pageSize
, core.String pageToken}) { | 131 async.Future<ListProductsResponse> list(core.String parent, {core.String pageT
oken, core.int pageSize}) { |
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 (pageToken != null) { |
| 143 _queryParams["pageToken"] = [pageToken]; |
| 144 } |
142 if (pageSize != null) { | 145 if (pageSize != null) { |
143 _queryParams["pageSize"] = ["${pageSize}"]; | 146 _queryParams["pageSize"] = ["${pageSize}"]; |
144 } | 147 } |
145 if (pageToken != null) { | |
146 _queryParams["pageToken"] = [pageToken]; | |
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 340 matching lines...) Loading... |
498 } | 498 } |
499 if (targetCountry != null) { | 499 if (targetCountry != null) { |
500 _json["targetCountry"] = targetCountry; | 500 _json["targetCountry"] = targetCountry; |
501 } | 501 } |
502 if (uploadedAttributes != null) { | 502 if (uploadedAttributes != null) { |
503 _json["uploadedAttributes"] = (uploadedAttributes).toJson(); | 503 _json["uploadedAttributes"] = (uploadedAttributes).toJson(); |
504 } | 504 } |
505 return _json; | 505 return _json; |
506 } | 506 } |
507 } | 507 } |
OLD | NEW |