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.youtubereporting.v1; | 3 library googleapis.youtubereporting.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 175 matching lines...) Loading... |
186 uploadMedia: _uploadMedia, | 186 uploadMedia: _uploadMedia, |
187 downloadOptions: _downloadOptions); | 187 downloadOptions: _downloadOptions); |
188 return _response.then((data) => new Job.fromJson(data)); | 188 return _response.then((data) => new Job.fromJson(data)); |
189 } | 189 } |
190 | 190 |
191 /** | 191 /** |
192 * Lists jobs. | 192 * Lists jobs. |
193 * | 193 * |
194 * Request parameters: | 194 * Request parameters: |
195 * | 195 * |
196 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | |
197 * the user is acting on. If | |
198 * not set, the user is acting for himself (his own channel). | |
199 * | |
200 * [includeSystemManaged] - If set to true, also system-managed jobs will be | 196 * [includeSystemManaged] - If set to true, also system-managed jobs will be |
201 * returned; otherwise only | 197 * returned; otherwise only |
202 * user-created jobs will be returned. System-managed jobs can neither be | 198 * user-created jobs will be returned. System-managed jobs can neither be |
203 * modified nor deleted. | 199 * modified nor deleted. |
204 * | 200 * |
205 * [pageToken] - A token identifying a page of results the server should | 201 * [pageToken] - A token identifying a page of results the server should |
206 * return. Typically, | 202 * return. Typically, |
207 * this is the value of | 203 * this is the value of |
208 * ListReportTypesResponse.next_page_token | 204 * ListReportTypesResponse.next_page_token |
209 * returned in response to the previous call to the `ListJobs` method. | 205 * returned in response to the previous call to the `ListJobs` method. |
210 * | 206 * |
211 * [pageSize] - Requested page size. Server may return fewer jobs than | 207 * [pageSize] - Requested page size. Server may return fewer jobs than |
212 * requested. | 208 * requested. |
213 * If unspecified, server will pick an appropriate default. | 209 * If unspecified, server will pick an appropriate default. |
214 * | 210 * |
| 211 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf |
| 212 * the user is acting on. If |
| 213 * not set, the user is acting for himself (his own channel). |
| 214 * |
215 * Completes with a [ListJobsResponse]. | 215 * Completes with a [ListJobsResponse]. |
216 * | 216 * |
217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
218 * error. | 218 * error. |
219 * | 219 * |
220 * If the used [http.Client] completes with an error when making a REST call, | 220 * If the used [http.Client] completes with an error when making a REST call, |
221 * this method will complete with the same error. | 221 * this method will complete with the same error. |
222 */ | 222 */ |
223 async.Future<ListJobsResponse> list({core.String onBehalfOfContentOwner, core.
bool includeSystemManaged, core.String pageToken, core.int pageSize}) { | 223 async.Future<ListJobsResponse> list({core.bool includeSystemManaged, core.Stri
ng pageToken, core.int pageSize, core.String onBehalfOfContentOwner}) { |
224 var _url = null; | 224 var _url = null; |
225 var _queryParams = new core.Map(); | 225 var _queryParams = new core.Map(); |
226 var _uploadMedia = null; | 226 var _uploadMedia = null; |
227 var _uploadOptions = null; | 227 var _uploadOptions = null; |
228 var _downloadOptions = commons.DownloadOptions.Metadata; | 228 var _downloadOptions = commons.DownloadOptions.Metadata; |
229 var _body = null; | 229 var _body = null; |
230 | 230 |
231 if (onBehalfOfContentOwner != null) { | |
232 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | |
233 } | |
234 if (includeSystemManaged != null) { | 231 if (includeSystemManaged != null) { |
235 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; | 232 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; |
236 } | 233 } |
237 if (pageToken != null) { | 234 if (pageToken != null) { |
238 _queryParams["pageToken"] = [pageToken]; | 235 _queryParams["pageToken"] = [pageToken]; |
239 } | 236 } |
240 if (pageSize != null) { | 237 if (pageSize != null) { |
241 _queryParams["pageSize"] = ["${pageSize}"]; | 238 _queryParams["pageSize"] = ["${pageSize}"]; |
242 } | 239 } |
| 240 if (onBehalfOfContentOwner != null) { |
| 241 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 242 } |
243 | 243 |
244 _url = 'v1/jobs'; | 244 _url = 'v1/jobs'; |
245 | 245 |
246 var _response = _requester.request(_url, | 246 var _response = _requester.request(_url, |
247 "GET", | 247 "GET", |
248 body: _body, | 248 body: _body, |
249 queryParams: _queryParams, | 249 queryParams: _queryParams, |
250 uploadOptions: _uploadOptions, | 250 uploadOptions: _uploadOptions, |
251 uploadMedia: _uploadMedia, | 251 uploadMedia: _uploadMedia, |
252 downloadOptions: _downloadOptions); | 252 downloadOptions: _downloadOptions); |
(...skipping 636 matching lines...) Loading... |
889 } | 889 } |
890 if (name != null) { | 890 if (name != null) { |
891 _json["name"] = name; | 891 _json["name"] = name; |
892 } | 892 } |
893 if (systemManaged != null) { | 893 if (systemManaged != null) { |
894 _json["systemManaged"] = systemManaged; | 894 _json["systemManaged"] = systemManaged; |
895 } | 895 } |
896 return _json; | 896 return _json; |
897 } | 897 } |
898 } | 898 } |
OLD | NEW |