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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 196 * [pageSize] - Requested page size. Server may return fewer jobs than |
197 * requested. | 197 * requested. |
198 * If unspecified, server will pick an appropriate default. | 198 * If unspecified, server will pick an appropriate default. |
199 * | 199 * |
200 * [includeSystemManaged] - If set to true, also system-managed jobs will be | |
201 * returned; otherwise only | |
202 * user-created jobs will be returned. System-managed jobs can neither be | |
203 * modified nor deleted. | |
204 * | |
205 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | 200 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf |
206 * the user is acting on. If | 201 * the user is acting on. If |
207 * not set, the user is acting for himself (his own channel). | 202 * not set, the user is acting for himself (his own channel). |
208 * | 203 * |
209 * [pageToken] - A token identifying a page of results the server should | 204 * [pageToken] - A token identifying a page of results the server should |
210 * return. Typically, | 205 * return. Typically, |
211 * this is the value of | 206 * this is the value of |
212 * ListReportTypesResponse.next_page_token | 207 * ListReportTypesResponse.next_page_token |
213 * returned in response to the previous call to the `ListJobs` method. | 208 * returned in response to the previous call to the `ListJobs` method. |
214 * | 209 * |
| 210 * [includeSystemManaged] - If set to true, also system-managed jobs will be |
| 211 * returned; otherwise only |
| 212 * user-created jobs will be returned. System-managed jobs can neither be |
| 213 * modified nor deleted. |
| 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.bool includeSyste
mManaged, core.String onBehalfOfContentOwner, core.String pageToken}) { | 223 async.Future<ListJobsResponse> list({core.int pageSize, core.String onBehalfOf
ContentOwner, core.String pageToken, core.bool includeSystemManaged}) { |
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 (pageSize != null) { | 231 if (pageSize != null) { |
232 _queryParams["pageSize"] = ["${pageSize}"]; | 232 _queryParams["pageSize"] = ["${pageSize}"]; |
233 } | 233 } |
234 if (includeSystemManaged != null) { | |
235 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; | |
236 } | |
237 if (onBehalfOfContentOwner != null) { | 234 if (onBehalfOfContentOwner != null) { |
238 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 235 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
239 } | 236 } |
240 if (pageToken != null) { | 237 if (pageToken != null) { |
241 _queryParams["pageToken"] = [pageToken]; | 238 _queryParams["pageToken"] = [pageToken]; |
242 } | 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 * | |
328 * [startTimeAtOrAfter] - If set, only reports whose start time is greater | |
329 * than or equal the | |
330 * specified date/time are returned. | |
331 * | |
332 * [startTimeBefore] - If set, only reports whose start time is smaller than | 324 * [startTimeBefore] - If set, only reports whose start time is smaller than |
333 * the specified | 325 * the specified |
334 * date/time are returned. | 326 * date/time are returned. |
335 * | 327 * |
336 * [pageSize] - Requested page size. Server may return fewer report types than | |
337 * requested. | |
338 * If unspecified, server will pick an appropriate default. | |
339 * | |
340 * [createdAfter] - If set, only reports created after the specified date/time | 328 * [createdAfter] - If set, only reports created after the specified date/time |
341 * are returned. | 329 * are returned. |
342 * | 330 * |
| 331 * [startTimeAtOrAfter] - If set, only reports whose start time is greater |
| 332 * than or equal the |
| 333 * specified date/time are returned. |
| 334 * |
343 * [pageToken] - A token identifying a page of results the server should | 335 * [pageToken] - A token identifying a page of results the server should |
344 * return. Typically, | 336 * return. Typically, |
345 * this is the value of | 337 * this is the value of |
346 * ListReportsResponse.next_page_token | 338 * ListReportsResponse.next_page_token |
347 * returned in response to the previous call to the `ListReports` method. | 339 * returned in response to the previous call to the `ListReports` method. |
348 * | 340 * |
| 341 * [pageSize] - Requested page size. Server may return fewer report types than |
| 342 * requested. |
| 343 * If unspecified, server will pick an appropriate default. |
| 344 * |
| 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 onBehal
fOfContentOwner, core.String startTimeAtOrAfter, core.String startTimeBefore, co
re.int pageSize, core.String createdAfter, core.String pageToken}) { | 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}) { |
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 (startTimeBefore != null) { |
| 369 _queryParams["startTimeBefore"] = [startTimeBefore]; |
| 370 } |
| 371 if (createdAfter != null) { |
| 372 _queryParams["createdAfter"] = [createdAfter]; |
| 373 } |
| 374 if (startTimeAtOrAfter != null) { |
| 375 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; |
| 376 } |
| 377 if (pageToken != null) { |
| 378 _queryParams["pageToken"] = [pageToken]; |
| 379 } |
| 380 if (pageSize != null) { |
| 381 _queryParams["pageSize"] = ["${pageSize}"]; |
| 382 } |
368 if (onBehalfOfContentOwner != null) { | 383 if (onBehalfOfContentOwner != null) { |
369 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 384 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
370 } | 385 } |
371 if (startTimeAtOrAfter != null) { | |
372 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; | |
373 } | |
374 if (startTimeBefore != null) { | |
375 _queryParams["startTimeBefore"] = [startTimeBefore]; | |
376 } | |
377 if (pageSize != null) { | |
378 _queryParams["pageSize"] = ["${pageSize}"]; | |
379 } | |
380 if (createdAfter != null) { | |
381 _queryParams["createdAfter"] = [createdAfter]; | |
382 } | |
383 if (pageToken != null) { | |
384 _queryParams["pageToken"] = [pageToken]; | |
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 * [pageSize] - Requested page size. Server may return fewer report types than | |
480 * requested. | |
481 * If unspecified, server will pick an appropriate default. | |
482 * | |
483 * [includeSystemManaged] - If set to true, also system-managed report types | |
484 * will be returned; | |
485 * otherwise only the report types that can be used to create new reporting | |
486 * jobs will be returned. | |
487 * | |
488 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | |
489 * the user is acting on. If | |
490 * not set, the user is acting for himself (his own channel). | |
491 * | |
492 * [pageToken] - A token identifying a page of results the server should | 479 * [pageToken] - A token identifying a page of results the server should |
493 * return. Typically, | 480 * return. Typically, |
494 * this is the value of | 481 * this is the value of |
495 * ListReportTypesResponse.next_page_token | 482 * ListReportTypesResponse.next_page_token |
496 * returned in response to the previous call to the `ListReportTypes` method. | 483 * returned in response to the previous call to the `ListReportTypes` method. |
497 * | 484 * |
| 485 * [includeSystemManaged] - If set to true, also system-managed report types |
| 486 * will be returned; |
| 487 * otherwise only the report types that can be used to create new reporting |
| 488 * jobs will be returned. |
| 489 * |
| 490 * [pageSize] - Requested page size. Server may return fewer report types than |
| 491 * requested. |
| 492 * If unspecified, server will pick an appropriate default. |
| 493 * |
| 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.int pageSize, core.bool inclu
deSystemManaged, core.String onBehalfOfContentOwner, core.String pageToken}) { | 506 async.Future<ListReportTypesResponse> list({core.String pageToken, core.bool i
ncludeSystemManaged, core.int pageSize, core.String onBehalfOfContentOwner}) { |
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 (pageSize != null) { | 514 if (pageToken != null) { |
515 _queryParams["pageSize"] = ["${pageSize}"]; | 515 _queryParams["pageToken"] = [pageToken]; |
516 } | 516 } |
517 if (includeSystemManaged != null) { | 517 if (includeSystemManaged != null) { |
518 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; | 518 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; |
519 } | 519 } |
| 520 if (pageSize != null) { |
| 521 _queryParams["pageSize"] = ["${pageSize}"]; |
| 522 } |
520 if (onBehalfOfContentOwner != null) { | 523 if (onBehalfOfContentOwner != null) { |
521 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 524 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
522 } | 525 } |
523 if (pageToken != null) { | |
524 _queryParams["pageToken"] = [pageToken]; | |
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 |