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 * [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 * |
196 * [pageToken] - A token identifying a page of results the server should | 200 * [pageToken] - A token identifying a page of results the server should |
197 * return. Typically, | 201 * return. Typically, |
198 * this is the value of | 202 * this is the value of |
199 * ListReportTypesResponse.next_page_token | 203 * ListReportTypesResponse.next_page_token |
200 * returned in response to the previous call to the `ListJobs` method. | 204 * returned in response to the previous call to the `ListJobs` method. |
201 * | 205 * |
202 * [includeSystemManaged] - If set to true, also system-managed jobs will be | 206 * [includeSystemManaged] - If set to true, also system-managed jobs will be |
203 * returned; otherwise only | 207 * returned; otherwise only |
204 * user-created jobs will be returned. System-managed jobs can neither be | 208 * user-created jobs will be returned. System-managed jobs can neither be |
205 * modified nor deleted. | 209 * modified nor deleted. |
206 * | 210 * |
207 * [pageSize] - Requested page size. Server may return fewer jobs than | 211 * [pageSize] - Requested page size. Server may return fewer jobs than |
208 * requested. | 212 * requested. |
209 * If unspecified, server will pick an appropriate default. | 213 * If unspecified, server will pick an appropriate default. |
210 * | 214 * |
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 pageToken, core.bool includeS
ystemManaged, core.int pageSize, core.String onBehalfOfContentOwner}) { | 223 async.Future<ListJobsResponse> list({core.String onBehalfOfContentOwner, core.
String pageToken, core.bool includeSystemManaged, core.int pageSize}) { |
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 } |
231 if (pageToken != null) { | 234 if (pageToken != null) { |
232 _queryParams["pageToken"] = [pageToken]; | 235 _queryParams["pageToken"] = [pageToken]; |
233 } | 236 } |
234 if (includeSystemManaged != null) { | 237 if (includeSystemManaged != null) { |
235 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; | 238 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; |
236 } | 239 } |
237 if (pageSize != null) { | 240 if (pageSize != null) { |
238 _queryParams["pageSize"] = ["${pageSize}"]; | 241 _queryParams["pageSize"] = ["${pageSize}"]; |
239 } | 242 } |
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 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 * [createdAfter] - If set, only reports created after the specified date/time |
| 325 * are returned. |
| 326 * |
| 327 * [pageToken] - A token identifying a page of results the server should |
| 328 * return. Typically, |
| 329 * this is the value of |
| 330 * ListReportsResponse.next_page_token |
| 331 * returned in response to the previous call to the `ListReports` method. |
| 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 |
| 338 * requested. |
| 339 * If unspecified, server will pick an appropriate default. |
| 340 * |
324 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf | 341 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf |
325 * the user is acting on. If | 342 * the user is acting on. If |
326 * not set, the user is acting for himself (his own channel). | 343 * not set, the user is acting for himself (his own channel). |
327 * | 344 * |
328 * [startTimeBefore] - If set, only reports whose start time is smaller than | 345 * [startTimeBefore] - If set, only reports whose start time is smaller than |
329 * the specified | 346 * the specified |
330 * date/time are returned. | 347 * date/time are returned. |
331 * | 348 * |
332 * [createdAfter] - If set, only reports created after the specified date/time | |
333 * are returned. | |
334 * | |
335 * [startTimeAtOrAfter] - If set, only reports whose start time is greater | |
336 * than or equal the | |
337 * specified date/time are returned. | |
338 * | |
339 * [pageToken] - A token identifying a page of results the server should | |
340 * return. Typically, | |
341 * this is the value of | |
342 * ListReportsResponse.next_page_token | |
343 * returned in response to the previous call to the `ListReports` method. | |
344 * | |
345 * [pageSize] - Requested page size. Server may return fewer report types than | |
346 * requested. | |
347 * If unspecified, server will pick an appropriate default. | |
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 startTimeBefore, core.String createdAfter, core.Str
ing startTimeAtOrAfter, core.String pageToken, core.int pageSize}) { | 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) { |
| 369 _queryParams["createdAfter"] = [createdAfter]; |
| 370 } |
| 371 if (pageToken != null) { |
| 372 _queryParams["pageToken"] = [pageToken]; |
| 373 } |
| 374 if (startTimeAtOrAfter != null) { |
| 375 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; |
| 376 } |
| 377 if (pageSize != null) { |
| 378 _queryParams["pageSize"] = ["${pageSize}"]; |
| 379 } |
368 if (onBehalfOfContentOwner != null) { | 380 if (onBehalfOfContentOwner != null) { |
369 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 381 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
370 } | 382 } |
371 if (startTimeBefore != null) { | 383 if (startTimeBefore != null) { |
372 _queryParams["startTimeBefore"] = [startTimeBefore]; | 384 _queryParams["startTimeBefore"] = [startTimeBefore]; |
373 } | 385 } |
374 if (createdAfter != null) { | |
375 _queryParams["createdAfter"] = [createdAfter]; | |
376 } | |
377 if (startTimeAtOrAfter != null) { | |
378 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter]; | |
379 } | |
380 if (pageToken != null) { | |
381 _queryParams["pageToken"] = [pageToken]; | |
382 } | |
383 if (pageSize != null) { | |
384 _queryParams["pageSize"] = ["${pageSize}"]; | |
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 493 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 |