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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 * [createdAfter] - If set, only reports created after the specified date/time | 324 * [createdAfter] - If set, only reports created after the specified date/time |
325 * are returned. | 325 * are returned. |
326 * | 326 * |
327 * [startTimeAtOrAfter] - If set, only reports whose start time is greater | |
328 * than or equal the | |
329 * specified date/time are returned. | |
330 * | |
331 * [pageToken] - A token identifying a page of results the server should | 327 * [pageToken] - A token identifying a page of results the server should |
332 * return. Typically, | 328 * return. Typically, |
333 * this is the value of | 329 * this is the value of |
334 * ListReportsResponse.next_page_token | 330 * ListReportsResponse.next_page_token |
335 * returned in response to the previous call to the `ListReports` method. | 331 * returned in response to the previous call to the `ListReports` method. |
336 * | 332 * |
| 333 * [startTimeAtOrAfter] - If set, only reports whose start time is greater |
| 334 * than or equal the |
| 335 * specified date/time are returned. |
| 336 * |
337 * [pageSize] - Requested page size. Server may return fewer report types than | 337 * [pageSize] - Requested page size. Server may return fewer report types than |
338 * requested. | 338 * requested. |
339 * If unspecified, server will pick an appropriate default. | 339 * If unspecified, server will pick an appropriate default. |
340 * | 340 * |
341 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | 341 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf |
342 * the user is acting on. If | 342 * the user is acting on. If |
343 * not set, the user is acting for himself (his own channel). | 343 * not set, the user is acting for himself (his own channel). |
344 * | 344 * |
345 * [startTimeBefore] - If set, only reports whose start time is smaller than | 345 * [startTimeBefore] - If set, only reports whose start time is smaller than |
346 * the specified | 346 * the specified |
347 * date/time are returned. | 347 * date/time are returned. |
348 * | 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 created
After, core.String startTimeAtOrAfter, core.String pageToken, core.int pageSize,
core.String onBehalfOfContentOwner, core.String startTimeBefore}) { | 357 async.Future<ListReportsResponse> list(core.String jobId, {core.String created
After, core.String pageToken, core.String startTimeAtOrAfter, core.int pageSize,
core.String onBehalfOfContentOwner, core.String startTimeBefore}) { |
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 (createdAfter != null) { | 368 if (createdAfter != null) { |
369 _queryParams["createdAfter"] = [createdAfter]; | 369 _queryParams["createdAfter"] = [createdAfter]; |
370 } | 370 } |
| 371 if (pageToken != null) { |
| 372 _queryParams["pageToken"] = [pageToken]; |
| 373 } |
371 if (startTimeAtOrAfter != null) { | 374 if (startTimeAtOrAfter != null) { |
372 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; | 375 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; |
373 } | 376 } |
374 if (pageToken != null) { | |
375 _queryParams["pageToken"] = [pageToken]; | |
376 } | |
377 if (pageSize != null) { | 377 if (pageSize != null) { |
378 _queryParams["pageSize"] = ["${pageSize}"]; | 378 _queryParams["pageSize"] = ["${pageSize}"]; |
379 } | 379 } |
380 if (onBehalfOfContentOwner != null) { | 380 if (onBehalfOfContentOwner != null) { |
381 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 381 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
382 } | 382 } |
383 if (startTimeBefore != null) { | 383 if (startTimeBefore != null) { |
384 _queryParams["startTimeBefore"] = [startTimeBefore]; | 384 _queryParams["startTimeBefore"] = [startTimeBefore]; |
385 } | 385 } |
386 | 386 |
(...skipping 82 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 * [includeSystemManaged] - If set to true, also system-managed report types | 483 * [includeSystemManaged] - If set to true, also system-managed report types |
480 * will be returned; | 484 * will be returned; |
481 * otherwise only the report types that can be used to create new reporting | 485 * otherwise only the report types that can be used to create new reporting |
482 * jobs will be returned. | 486 * jobs will be returned. |
483 * | 487 * |
484 * [pageToken] - A token identifying a page of results the server should | 488 * [pageToken] - A token identifying a page of results the server should |
485 * return. Typically, | 489 * return. Typically, |
486 * this is the value of | 490 * this is the value of |
487 * ListReportTypesResponse.next_page_token | 491 * ListReportTypesResponse.next_page_token |
488 * returned in response to the previous call to the `ListReportTypes` method. | 492 * returned in response to the previous call to the `ListReportTypes` method. |
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.bool includeSystemManaged, co
re.String pageToken, core.int pageSize, core.String onBehalfOfContentOwner}) { | 506 async.Future<ListReportTypesResponse> list({core.String onBehalfOfContentOwner
, core.bool includeSystemManaged, core.String pageToken, 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 (includeSystemManaged != null) { | 517 if (includeSystemManaged != null) { |
515 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; | 518 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; |
516 } | 519 } |
517 if (pageToken != null) { | 520 if (pageToken != null) { |
518 _queryParams["pageToken"] = [pageToken]; | 521 _queryParams["pageToken"] = [pageToken]; |
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 |