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...) Expand 10 before | Expand all | Expand 10 after 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 * [pageSize] - Requested page size. Server may return fewer jobs than | |
197 * requested. | |
198 * If unspecified, server will pick an appropriate default. | |
199 * | |
200 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | |
201 * the user is acting on. If | |
202 * not set, the user is acting for himself (his own channel). | |
203 * | |
204 * [pageToken] - A token identifying a page of results the server should | 196 * [pageToken] - A token identifying a page of results the server should |
205 * return. Typically, | 197 * return. Typically, |
206 * this is the value of | 198 * this is the value of |
207 * ListReportTypesResponse.next_page_token | 199 * ListReportTypesResponse.next_page_token |
208 * returned in response to the previous call to the `ListJobs` method. | 200 * returned in response to the previous call to the `ListJobs` method. |
209 * | 201 * |
210 * [includeSystemManaged] - If set to true, also system-managed jobs will be | 202 * [includeSystemManaged] - If set to true, also system-managed jobs will be |
211 * returned; otherwise only | 203 * returned; otherwise only |
212 * user-created jobs will be returned. System-managed jobs can neither be | 204 * user-created jobs will be returned. System-managed jobs can neither be |
213 * modified nor deleted. | 205 * modified nor deleted. |
214 * | 206 * |
| 207 * [pageSize] - Requested page size. Server may return fewer jobs than |
| 208 * requested. |
| 209 * If unspecified, server will pick an appropriate default. |
| 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.int pageSize, core.String onBehalfOf
ContentOwner, core.String pageToken, core.bool includeSystemManaged}) { | 223 async.Future<ListJobsResponse> list({core.String pageToken, core.bool includeS
ystemManaged, 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 (pageToken != null) { |
| 232 _queryParams["pageToken"] = [pageToken]; |
| 233 } |
| 234 if (includeSystemManaged != null) { |
| 235 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; |
| 236 } |
231 if (pageSize != null) { | 237 if (pageSize != null) { |
232 _queryParams["pageSize"] = ["${pageSize}"]; | 238 _queryParams["pageSize"] = ["${pageSize}"]; |
233 } | 239 } |
234 if (onBehalfOfContentOwner != null) { | 240 if (onBehalfOfContentOwner != null) { |
235 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 241 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
236 } | 242 } |
237 if (pageToken != null) { | |
238 _queryParams["pageToken"] = [pageToken]; | |
239 } | |
240 if (includeSystemManaged != null) { | |
241 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; | |
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 314 } |
315 | 315 |
316 /** | 316 /** |
317 * Lists reports created by a specific job. | 317 * Lists reports created by a specific job. |
318 * Returns NOT_FOUND if the job does not exist. | 318 * Returns NOT_FOUND if the job does not exist. |
319 * | 319 * |
320 * Request parameters: | 320 * Request parameters: |
321 * | 321 * |
322 * [jobId] - The ID of the job. | 322 * [jobId] - The ID of the job. |
323 * | 323 * |
| 324 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf |
| 325 * the user is acting on. If |
| 326 * not set, the user is acting for himself (his own channel). |
| 327 * |
324 * [startTimeBefore] - If set, only reports whose start time is smaller than | 328 * [startTimeBefore] - If set, only reports whose start time is smaller than |
325 * the specified | 329 * the specified |
326 * date/time are returned. | 330 * date/time are returned. |
327 * | 331 * |
328 * [createdAfter] - If set, only reports created after the specified date/time | 332 * [createdAfter] - If set, only reports created after the specified date/time |
329 * are returned. | 333 * are returned. |
330 * | 334 * |
331 * [startTimeAtOrAfter] - If set, only reports whose start time is greater | 335 * [startTimeAtOrAfter] - If set, only reports whose start time is greater |
332 * than or equal the | 336 * than or equal the |
333 * specified date/time are returned. | 337 * specified date/time are returned. |
334 * | 338 * |
335 * [pageToken] - A token identifying a page of results the server should | 339 * [pageToken] - A token identifying a page of results the server should |
336 * return. Typically, | 340 * return. Typically, |
337 * this is the value of | 341 * this is the value of |
338 * ListReportsResponse.next_page_token | 342 * ListReportsResponse.next_page_token |
339 * returned in response to the previous call to the `ListReports` method. | 343 * returned in response to the previous call to the `ListReports` method. |
340 * | 344 * |
341 * [pageSize] - Requested page size. Server may return fewer report types than | 345 * [pageSize] - Requested page size. Server may return fewer report types than |
342 * requested. | 346 * requested. |
343 * If unspecified, server will pick an appropriate default. | 347 * If unspecified, server will pick an appropriate default. |
344 * | 348 * |
345 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | |
346 * the user is acting on. If | |
347 * not set, the user is acting for himself (his own channel). | |
348 * | |
349 * Completes with a [ListReportsResponse]. | 349 * Completes with a [ListReportsResponse]. |
350 * | 350 * |
351 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 351 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
352 * error. | 352 * error. |
353 * | 353 * |
354 * If the used [http.Client] completes with an error when making a REST call, | 354 * If the used [http.Client] completes with an error when making a REST call, |
355 * this method will complete with the same error. | 355 * this method will complete with the same error. |
356 */ | 356 */ |
357 async.Future<ListReportsResponse> list(core.String jobId, {core.String startTi
meBefore, core.String createdAfter, core.String startTimeAtOrAfter, core.String
pageToken, core.int pageSize, core.String onBehalfOfContentOwner}) { | 357 async.Future<ListReportsResponse> list(core.String jobId, {core.String onBehal
fOfContentOwner, core.String startTimeBefore, core.String createdAfter, core.Str
ing startTimeAtOrAfter, core.String pageToken, core.int pageSize}) { |
358 var _url = null; | 358 var _url = null; |
359 var _queryParams = new core.Map(); | 359 var _queryParams = new core.Map(); |
360 var _uploadMedia = null; | 360 var _uploadMedia = null; |
361 var _uploadOptions = null; | 361 var _uploadOptions = null; |
362 var _downloadOptions = commons.DownloadOptions.Metadata; | 362 var _downloadOptions = commons.DownloadOptions.Metadata; |
363 var _body = null; | 363 var _body = null; |
364 | 364 |
365 if (jobId == null) { | 365 if (jobId == null) { |
366 throw new core.ArgumentError("Parameter jobId is required."); | 366 throw new core.ArgumentError("Parameter jobId is required."); |
367 } | 367 } |
| 368 if (onBehalfOfContentOwner != null) { |
| 369 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 370 } |
368 if (startTimeBefore != null) { | 371 if (startTimeBefore != null) { |
369 _queryParams["startTimeBefore"] = [startTimeBefore]; | 372 _queryParams["startTimeBefore"] = [startTimeBefore]; |
370 } | 373 } |
371 if (createdAfter != null) { | 374 if (createdAfter != null) { |
372 _queryParams["createdAfter"] = [createdAfter]; | 375 _queryParams["createdAfter"] = [createdAfter]; |
373 } | 376 } |
374 if (startTimeAtOrAfter != null) { | 377 if (startTimeAtOrAfter != null) { |
375 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; | 378 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; |
376 } | 379 } |
377 if (pageToken != null) { | 380 if (pageToken != null) { |
378 _queryParams["pageToken"] = [pageToken]; | 381 _queryParams["pageToken"] = [pageToken]; |
379 } | 382 } |
380 if (pageSize != null) { | 383 if (pageSize != null) { |
381 _queryParams["pageSize"] = ["${pageSize}"]; | 384 _queryParams["pageSize"] = ["${pageSize}"]; |
382 } | 385 } |
383 if (onBehalfOfContentOwner != null) { | |
384 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | |
385 } | |
386 | 386 |
387 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId') + '/reports'; | 387 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId') + '/reports'; |
388 | 388 |
389 var _response = _requester.request(_url, | 389 var _response = _requester.request(_url, |
390 "GET", | 390 "GET", |
391 body: _body, | 391 body: _body, |
392 queryParams: _queryParams, | 392 queryParams: _queryParams, |
393 uploadOptions: _uploadOptions, | 393 uploadOptions: _uploadOptions, |
394 uploadMedia: _uploadMedia, | 394 uploadMedia: _uploadMedia, |
395 downloadOptions: _downloadOptions); | 395 downloadOptions: _downloadOptions); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 final commons.ApiRequester _requester; | 469 final commons.ApiRequester _requester; |
470 | 470 |
471 ReportTypesResourceApi(commons.ApiRequester client) : | 471 ReportTypesResourceApi(commons.ApiRequester client) : |
472 _requester = client; | 472 _requester = client; |
473 | 473 |
474 /** | 474 /** |
475 * Lists report types. | 475 * Lists report types. |
476 * | 476 * |
477 * Request parameters: | 477 * Request parameters: |
478 * | 478 * |
| 479 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf |
| 480 * the user is acting on. If |
| 481 * not set, the user is acting for himself (his own channel). |
| 482 * |
479 * [pageToken] - A token identifying a page of results the server should | 483 * [pageToken] - A token identifying a page of results the server should |
480 * return. Typically, | 484 * return. Typically, |
481 * this is the value of | 485 * this is the value of |
482 * ListReportTypesResponse.next_page_token | 486 * ListReportTypesResponse.next_page_token |
483 * returned in response to the previous call to the `ListReportTypes` method. | 487 * returned in response to the previous call to the `ListReportTypes` method. |
484 * | 488 * |
485 * [includeSystemManaged] - If set to true, also system-managed report types | 489 * [includeSystemManaged] - If set to true, also system-managed report types |
486 * will be returned; | 490 * will be returned; |
487 * otherwise only the report types that can be used to create new reporting | 491 * otherwise only the report types that can be used to create new reporting |
488 * jobs will be returned. | 492 * jobs will be returned. |
489 * | 493 * |
490 * [pageSize] - Requested page size. Server may return fewer report types than | 494 * [pageSize] - Requested page size. Server may return fewer report types than |
491 * requested. | 495 * requested. |
492 * If unspecified, server will pick an appropriate default. | 496 * If unspecified, server will pick an appropriate default. |
493 * | 497 * |
494 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | |
495 * the user is acting on. If | |
496 * not set, the user is acting for himself (his own channel). | |
497 * | |
498 * Completes with a [ListReportTypesResponse]. | 498 * Completes with a [ListReportTypesResponse]. |
499 * | 499 * |
500 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 500 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
501 * error. | 501 * error. |
502 * | 502 * |
503 * If the used [http.Client] completes with an error when making a REST call, | 503 * If the used [http.Client] completes with an error when making a REST call, |
504 * this method will complete with the same error. | 504 * this method will complete with the same error. |
505 */ | 505 */ |
506 async.Future<ListReportTypesResponse> list({core.String pageToken, core.bool i
ncludeSystemManaged, core.int pageSize, core.String onBehalfOfContentOwner}) { | 506 async.Future<ListReportTypesResponse> list({core.String onBehalfOfContentOwner
, core.String pageToken, core.bool includeSystemManaged, core.int pageSize}) { |
507 var _url = null; | 507 var _url = null; |
508 var _queryParams = new core.Map(); | 508 var _queryParams = new core.Map(); |
509 var _uploadMedia = null; | 509 var _uploadMedia = null; |
510 var _uploadOptions = null; | 510 var _uploadOptions = null; |
511 var _downloadOptions = commons.DownloadOptions.Metadata; | 511 var _downloadOptions = commons.DownloadOptions.Metadata; |
512 var _body = null; | 512 var _body = null; |
513 | 513 |
| 514 if (onBehalfOfContentOwner != null) { |
| 515 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 516 } |
514 if (pageToken != null) { | 517 if (pageToken != null) { |
515 _queryParams["pageToken"] = [pageToken]; | 518 _queryParams["pageToken"] = [pageToken]; |
516 } | 519 } |
517 if (includeSystemManaged != null) { | 520 if (includeSystemManaged != null) { |
518 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; | 521 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; |
519 } | 522 } |
520 if (pageSize != null) { | 523 if (pageSize != null) { |
521 _queryParams["pageSize"] = ["${pageSize}"]; | 524 _queryParams["pageSize"] = ["${pageSize}"]; |
522 } | 525 } |
523 if (onBehalfOfContentOwner != null) { | |
524 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | |
525 } | |
526 | 526 |
527 _url = 'v1/reportTypes'; | 527 _url = 'v1/reportTypes'; |
528 | 528 |
529 var _response = _requester.request(_url, | 529 var _response = _requester.request(_url, |
530 "GET", | 530 "GET", |
531 body: _body, | 531 body: _body, |
532 queryParams: _queryParams, | 532 queryParams: _queryParams, |
533 uploadOptions: _uploadOptions, | 533 uploadOptions: _uploadOptions, |
534 uploadMedia: _uploadMedia, | 534 uploadMedia: _uploadMedia, |
535 downloadOptions: _downloadOptions); | 535 downloadOptions: _downloadOptions); |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |