OLD | NEW |
(Empty) | |
| 1 library googleapis.youtube.v3; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** Programmatic access to YouTube features. */ |
| 17 class YoutubeApi { |
| 18 /** Manage your YouTube account */ |
| 19 static const YoutubeScope = "https://www.googleapis.com/auth/youtube"; |
| 20 |
| 21 /** View your YouTube account */ |
| 22 static const YoutubeReadonlyScope = "https://www.googleapis.com/auth/youtube.r
eadonly"; |
| 23 |
| 24 /** Manage your YouTube videos */ |
| 25 static const YoutubeUploadScope = "https://www.googleapis.com/auth/youtube.upl
oad"; |
| 26 |
| 27 /** View and manage your assets and associated content on YouTube */ |
| 28 static const YoutubepartnerScope = "https://www.googleapis.com/auth/youtubepar
tner"; |
| 29 |
| 30 /** |
| 31 * View private information of your YouTube channel relevant during the audit |
| 32 * process with a YouTube partner |
| 33 */ |
| 34 static const YoutubepartnerChannelAuditScope = "https://www.googleapis.com/aut
h/youtubepartner-channel-audit"; |
| 35 |
| 36 |
| 37 final common_internal.ApiRequester _requester; |
| 38 |
| 39 ActivitiesResourceApi get activities => new ActivitiesResourceApi(_requester); |
| 40 ChannelBannersResourceApi get channelBanners => new ChannelBannersResourceApi(
_requester); |
| 41 ChannelSectionsResourceApi get channelSections => new ChannelSectionsResourceA
pi(_requester); |
| 42 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
| 43 GuideCategoriesResourceApi get guideCategories => new GuideCategoriesResourceA
pi(_requester); |
| 44 I18nLanguagesResourceApi get i18nLanguages => new I18nLanguagesResourceApi(_re
quester); |
| 45 I18nRegionsResourceApi get i18nRegions => new I18nRegionsResourceApi(_requeste
r); |
| 46 LiveBroadcastsResourceApi get liveBroadcasts => new LiveBroadcastsResourceApi(
_requester); |
| 47 LiveStreamsResourceApi get liveStreams => new LiveStreamsResourceApi(_requeste
r); |
| 48 PlaylistItemsResourceApi get playlistItems => new PlaylistItemsResourceApi(_re
quester); |
| 49 PlaylistsResourceApi get playlists => new PlaylistsResourceApi(_requester); |
| 50 SearchResourceApi get search => new SearchResourceApi(_requester); |
| 51 SubscriptionsResourceApi get subscriptions => new SubscriptionsResourceApi(_re
quester); |
| 52 ThumbnailsResourceApi get thumbnails => new ThumbnailsResourceApi(_requester); |
| 53 VideoCategoriesResourceApi get videoCategories => new VideoCategoriesResourceA
pi(_requester); |
| 54 VideosResourceApi get videos => new VideosResourceApi(_requester); |
| 55 WatermarksResourceApi get watermarks => new WatermarksResourceApi(_requester); |
| 56 |
| 57 YoutubeApi(http.Client client) : |
| 58 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/youtube/v3/"); |
| 59 } |
| 60 |
| 61 |
| 62 /** Not documented yet. */ |
| 63 class ActivitiesResourceApi { |
| 64 final common_internal.ApiRequester _requester; |
| 65 |
| 66 ActivitiesResourceApi(common_internal.ApiRequester client) : |
| 67 _requester = client; |
| 68 |
| 69 /** |
| 70 * Posts a bulletin for a specific channel. (The user submitting the request |
| 71 * must be authorized to act on the channel's behalf.) |
| 72 * |
| 73 * Note: Even though an activity resource can contain information about |
| 74 * actions like a user rating a video or marking a video as a favorite, you |
| 75 * need to use other API methods to generate those activity resources. For |
| 76 * example, you would use the API's videos.rate() method to rate a video and |
| 77 * the playlistItems.insert() method to mark a video as a favorite. |
| 78 * |
| 79 * [request] - The metadata request object. |
| 80 * |
| 81 * Request parameters: |
| 82 * |
| 83 * [part] - The part parameter serves two purposes in this operation. It |
| 84 * identifies the properties that the write operation will set as well as the |
| 85 * properties that the API response will include. |
| 86 * |
| 87 * The part names that you can include in the parameter value are snippet and |
| 88 * contentDetails. |
| 89 * |
| 90 * Completes with a [Activity]. |
| 91 * |
| 92 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 93 * error. |
| 94 * |
| 95 * If the used [http.Client] completes with an error when making a REST call, |
| 96 * this method will complete with the same error. |
| 97 */ |
| 98 async.Future<Activity> insert(Activity request, core.String part) { |
| 99 var _url = null; |
| 100 var _queryParams = new core.Map(); |
| 101 var _uploadMedia = null; |
| 102 var _uploadOptions = null; |
| 103 var _downloadOptions = common.DownloadOptions.Metadata; |
| 104 var _body = null; |
| 105 |
| 106 if (request != null) { |
| 107 _body = convert.JSON.encode((request).toJson()); |
| 108 } |
| 109 if (part == null) { |
| 110 throw new core.ArgumentError("Parameter part is required."); |
| 111 } |
| 112 _queryParams["part"] = [part]; |
| 113 |
| 114 |
| 115 _url = 'activities'; |
| 116 |
| 117 var _response = _requester.request(_url, |
| 118 "POST", |
| 119 body: _body, |
| 120 queryParams: _queryParams, |
| 121 uploadOptions: _uploadOptions, |
| 122 uploadMedia: _uploadMedia, |
| 123 downloadOptions: _downloadOptions); |
| 124 return _response.then((data) => new Activity.fromJson(data)); |
| 125 } |
| 126 |
| 127 /** |
| 128 * Returns a list of channel activity events that match the request criteria. |
| 129 * For example, you can retrieve events associated with a particular channel, |
| 130 * events associated with the user's subscriptions and Google+ friends, or the |
| 131 * YouTube home page feed, which is customized for each user. |
| 132 * |
| 133 * Request parameters: |
| 134 * |
| 135 * [part] - The part parameter specifies a comma-separated list of one or more |
| 136 * activity resource properties that the API response will include. The part |
| 137 * names that you can include in the parameter value are id, snippet, and |
| 138 * contentDetails. |
| 139 * |
| 140 * If the parameter identifies a property that contains child properties, the |
| 141 * child properties will be included in the response. For example, in a |
| 142 * activity resource, the snippet property contains other properties that |
| 143 * identify the type of activity, a display title for the activity, and so |
| 144 * forth. If you set part=snippet, the API response will also contain all of |
| 145 * those nested properties. |
| 146 * |
| 147 * [channelId] - The channelId parameter specifies a unique YouTube channel |
| 148 * ID. The API will then return a list of that channel's activities. |
| 149 * |
| 150 * [home] - Set this parameter's value to true to retrieve the activity feed |
| 151 * that displays on the YouTube home page for the currently authenticated |
| 152 * user. |
| 153 * |
| 154 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 155 * items that should be returned in the result set. |
| 156 * Value must be between "0" and "50". |
| 157 * |
| 158 * [mine] - Set this parameter's value to true to retrieve a feed of the |
| 159 * authenticated user's activities. |
| 160 * |
| 161 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 162 * result set that should be returned. In an API response, the nextPageToken |
| 163 * and prevPageToken properties identify other pages that could be retrieved. |
| 164 * |
| 165 * [publishedAfter] - The publishedAfter parameter specifies the earliest date |
| 166 * and time that an activity could have occurred for that activity to be |
| 167 * included in the API response. If the parameter value specifies a day, but |
| 168 * not a time, then any activities that occurred that day will be included in |
| 169 * the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) |
| 170 * format. |
| 171 * |
| 172 * [publishedBefore] - The publishedBefore parameter specifies the date and |
| 173 * time before which an activity must have occurred for that activity to be |
| 174 * included in the API response. If the parameter value specifies a day, but |
| 175 * not a time, then any activities that occurred that day will be excluded |
| 176 * from the result set. The value is specified in ISO 8601 |
| 177 * (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 178 * |
| 179 * [regionCode] - The regionCode parameter instructs the API to return results |
| 180 * for the specified country. The parameter value is an ISO 3166-1 alpha-2 |
| 181 * country code. YouTube uses this value when the authorized user's previous |
| 182 * activity on YouTube does not provide enough information to generate the |
| 183 * activity feed. |
| 184 * |
| 185 * Completes with a [ActivityListResponse]. |
| 186 * |
| 187 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 188 * error. |
| 189 * |
| 190 * If the used [http.Client] completes with an error when making a REST call, |
| 191 * this method will complete with the same error. |
| 192 */ |
| 193 async.Future<ActivityListResponse> list(core.String part, {core.String channel
Id, core.bool home, core.int maxResults, core.bool mine, core.String pageToken,
core.DateTime publishedAfter, core.DateTime publishedBefore, core.String regionC
ode}) { |
| 194 var _url = null; |
| 195 var _queryParams = new core.Map(); |
| 196 var _uploadMedia = null; |
| 197 var _uploadOptions = null; |
| 198 var _downloadOptions = common.DownloadOptions.Metadata; |
| 199 var _body = null; |
| 200 |
| 201 if (part == null) { |
| 202 throw new core.ArgumentError("Parameter part is required."); |
| 203 } |
| 204 _queryParams["part"] = [part]; |
| 205 if (channelId != null) { |
| 206 _queryParams["channelId"] = [channelId]; |
| 207 } |
| 208 if (home != null) { |
| 209 _queryParams["home"] = ["${home}"]; |
| 210 } |
| 211 if (maxResults != null) { |
| 212 _queryParams["maxResults"] = ["${maxResults}"]; |
| 213 } |
| 214 if (mine != null) { |
| 215 _queryParams["mine"] = ["${mine}"]; |
| 216 } |
| 217 if (pageToken != null) { |
| 218 _queryParams["pageToken"] = [pageToken]; |
| 219 } |
| 220 if (publishedAfter != null) { |
| 221 _queryParams["publishedAfter"] = [(publishedAfter).toIso8601String()]; |
| 222 } |
| 223 if (publishedBefore != null) { |
| 224 _queryParams["publishedBefore"] = [(publishedBefore).toIso8601String()]; |
| 225 } |
| 226 if (regionCode != null) { |
| 227 _queryParams["regionCode"] = [regionCode]; |
| 228 } |
| 229 |
| 230 |
| 231 _url = 'activities'; |
| 232 |
| 233 var _response = _requester.request(_url, |
| 234 "GET", |
| 235 body: _body, |
| 236 queryParams: _queryParams, |
| 237 uploadOptions: _uploadOptions, |
| 238 uploadMedia: _uploadMedia, |
| 239 downloadOptions: _downloadOptions); |
| 240 return _response.then((data) => new ActivityListResponse.fromJson(data)); |
| 241 } |
| 242 |
| 243 } |
| 244 |
| 245 |
| 246 /** Not documented yet. */ |
| 247 class ChannelBannersResourceApi { |
| 248 final common_internal.ApiRequester _requester; |
| 249 |
| 250 ChannelBannersResourceApi(common_internal.ApiRequester client) : |
| 251 _requester = client; |
| 252 |
| 253 /** |
| 254 * Uploads a channel banner image to YouTube. This method represents the first |
| 255 * two steps in a three-step process to update the banner image for a channel: |
| 256 * |
| 257 * - Call the channelBanners.insert method to upload the binary image data to |
| 258 * YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 |
| 259 * pixels. |
| 260 * - Extract the url property's value from the response that the API returns |
| 261 * for step 1. |
| 262 * - Call the channels.update method to update the channel's branding |
| 263 * settings. Set the brandingSettings.image.bannerExternalUrl property's value |
| 264 * to the URL obtained in step 2. |
| 265 * |
| 266 * [request] - The metadata request object. |
| 267 * |
| 268 * Request parameters: |
| 269 * |
| 270 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 271 * YouTube content partners. |
| 272 * |
| 273 * The onBehalfOfContentOwner parameter indicates that the request's |
| 274 * authorization credentials identify a YouTube CMS user who is acting on |
| 275 * behalf of the content owner specified in the parameter value. This |
| 276 * parameter is intended for YouTube content partners that own and manage many |
| 277 * different YouTube channels. It allows content owners to authenticate once |
| 278 * and get access to all their video and channel data, without having to |
| 279 * provide authentication credentials for each individual channel. The CMS |
| 280 * account that the user authenticates with must be linked to the specified |
| 281 * YouTube content owner. |
| 282 * |
| 283 * [uploadMedia] - The media to upload. |
| 284 * |
| 285 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 286 * length being known ahead of time is only supported via resumable uploads. |
| 287 * |
| 288 * Completes with a [ChannelBannerResource]. |
| 289 * |
| 290 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 291 * error. |
| 292 * |
| 293 * If the used [http.Client] completes with an error when making a REST call, |
| 294 * this method will complete with the same error. |
| 295 */ |
| 296 async.Future<ChannelBannerResource> insert(ChannelBannerResource request, {cor
e.String onBehalfOfContentOwner, common.UploadOptions uploadOptions : common.Upl
oadOptions.Default, common.Media uploadMedia}) { |
| 297 var _url = null; |
| 298 var _queryParams = new core.Map(); |
| 299 var _uploadMedia = null; |
| 300 var _uploadOptions = null; |
| 301 var _downloadOptions = common.DownloadOptions.Metadata; |
| 302 var _body = null; |
| 303 |
| 304 if (request != null) { |
| 305 _body = convert.JSON.encode((request).toJson()); |
| 306 } |
| 307 if (onBehalfOfContentOwner != null) { |
| 308 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 309 } |
| 310 |
| 311 _uploadMedia = uploadMedia; |
| 312 _uploadOptions = uploadOptions; |
| 313 |
| 314 if (_uploadMedia == null) { |
| 315 _url = 'channelBanners/insert'; |
| 316 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 317 _url = '/resumable/upload/youtube/v3/channelBanners/insert'; |
| 318 } else { |
| 319 _url = '/upload/youtube/v3/channelBanners/insert'; |
| 320 } |
| 321 |
| 322 |
| 323 var _response = _requester.request(_url, |
| 324 "POST", |
| 325 body: _body, |
| 326 queryParams: _queryParams, |
| 327 uploadOptions: _uploadOptions, |
| 328 uploadMedia: _uploadMedia, |
| 329 downloadOptions: _downloadOptions); |
| 330 return _response.then((data) => new ChannelBannerResource.fromJson(data)); |
| 331 } |
| 332 |
| 333 } |
| 334 |
| 335 |
| 336 /** Not documented yet. */ |
| 337 class ChannelSectionsResourceApi { |
| 338 final common_internal.ApiRequester _requester; |
| 339 |
| 340 ChannelSectionsResourceApi(common_internal.ApiRequester client) : |
| 341 _requester = client; |
| 342 |
| 343 /** |
| 344 * Deletes a channelSection. |
| 345 * |
| 346 * Request parameters: |
| 347 * |
| 348 * [id] - The id parameter specifies the YouTube channelSection ID for the |
| 349 * resource that is being deleted. In a channelSection resource, the id |
| 350 * property specifies the YouTube channelSection ID. |
| 351 * |
| 352 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 353 * error. |
| 354 * |
| 355 * If the used [http.Client] completes with an error when making a REST call, |
| 356 * this method will complete with the same error. |
| 357 */ |
| 358 async.Future delete(core.String id) { |
| 359 var _url = null; |
| 360 var _queryParams = new core.Map(); |
| 361 var _uploadMedia = null; |
| 362 var _uploadOptions = null; |
| 363 var _downloadOptions = common.DownloadOptions.Metadata; |
| 364 var _body = null; |
| 365 |
| 366 if (id == null) { |
| 367 throw new core.ArgumentError("Parameter id is required."); |
| 368 } |
| 369 _queryParams["id"] = [id]; |
| 370 |
| 371 _downloadOptions = null; |
| 372 |
| 373 _url = 'channelSections'; |
| 374 |
| 375 var _response = _requester.request(_url, |
| 376 "DELETE", |
| 377 body: _body, |
| 378 queryParams: _queryParams, |
| 379 uploadOptions: _uploadOptions, |
| 380 uploadMedia: _uploadMedia, |
| 381 downloadOptions: _downloadOptions); |
| 382 return _response.then((data) => null); |
| 383 } |
| 384 |
| 385 /** |
| 386 * Adds a channelSection for the authenticated user's channel. |
| 387 * |
| 388 * [request] - The metadata request object. |
| 389 * |
| 390 * Request parameters: |
| 391 * |
| 392 * [part] - The part parameter serves two purposes in this operation. It |
| 393 * identifies the properties that the write operation will set as well as the |
| 394 * properties that the API response will include. |
| 395 * |
| 396 * The part names that you can include in the parameter value are snippet and |
| 397 * contentDetails. |
| 398 * |
| 399 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 400 * YouTube content partners. |
| 401 * |
| 402 * The onBehalfOfContentOwner parameter indicates that the request's |
| 403 * authorization credentials identify a YouTube CMS user who is acting on |
| 404 * behalf of the content owner specified in the parameter value. This |
| 405 * parameter is intended for YouTube content partners that own and manage many |
| 406 * different YouTube channels. It allows content owners to authenticate once |
| 407 * and get access to all their video and channel data, without having to |
| 408 * provide authentication credentials for each individual channel. The CMS |
| 409 * account that the user authenticates with must be linked to the specified |
| 410 * YouTube content owner. |
| 411 * |
| 412 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 413 * properly authorized request. Note: This parameter is intended exclusively |
| 414 * for YouTube content partners. |
| 415 * |
| 416 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 417 * ID of the channel to which a video is being added. This parameter is |
| 418 * required when a request specifies a value for the onBehalfOfContentOwner |
| 419 * parameter, and it can only be used in conjunction with that parameter. In |
| 420 * addition, the request must be authorized using a CMS account that is linked |
| 421 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 422 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 423 * specifies must be linked to the content owner that the |
| 424 * onBehalfOfContentOwner parameter specifies. |
| 425 * |
| 426 * This parameter is intended for YouTube content partners that own and manage |
| 427 * many different YouTube channels. It allows content owners to authenticate |
| 428 * once and perform actions on behalf of the channel specified in the |
| 429 * parameter value, without having to provide authentication credentials for |
| 430 * each separate channel. |
| 431 * |
| 432 * Completes with a [ChannelSection]. |
| 433 * |
| 434 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 435 * error. |
| 436 * |
| 437 * If the used [http.Client] completes with an error when making a REST call, |
| 438 * this method will complete with the same error. |
| 439 */ |
| 440 async.Future<ChannelSection> insert(ChannelSection request, core.String part,
{core.String onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel})
{ |
| 441 var _url = null; |
| 442 var _queryParams = new core.Map(); |
| 443 var _uploadMedia = null; |
| 444 var _uploadOptions = null; |
| 445 var _downloadOptions = common.DownloadOptions.Metadata; |
| 446 var _body = null; |
| 447 |
| 448 if (request != null) { |
| 449 _body = convert.JSON.encode((request).toJson()); |
| 450 } |
| 451 if (part == null) { |
| 452 throw new core.ArgumentError("Parameter part is required."); |
| 453 } |
| 454 _queryParams["part"] = [part]; |
| 455 if (onBehalfOfContentOwner != null) { |
| 456 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 457 } |
| 458 if (onBehalfOfContentOwnerChannel != null) { |
| 459 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 460 } |
| 461 |
| 462 |
| 463 _url = 'channelSections'; |
| 464 |
| 465 var _response = _requester.request(_url, |
| 466 "POST", |
| 467 body: _body, |
| 468 queryParams: _queryParams, |
| 469 uploadOptions: _uploadOptions, |
| 470 uploadMedia: _uploadMedia, |
| 471 downloadOptions: _downloadOptions); |
| 472 return _response.then((data) => new ChannelSection.fromJson(data)); |
| 473 } |
| 474 |
| 475 /** |
| 476 * Returns channelSection resources that match the API request criteria. |
| 477 * |
| 478 * Request parameters: |
| 479 * |
| 480 * [part] - The part parameter specifies a comma-separated list of one or more |
| 481 * channelSection resource properties that the API response will include. The |
| 482 * part names that you can include in the parameter value are id, snippet, and |
| 483 * contentDetails. |
| 484 * |
| 485 * If the parameter identifies a property that contains child properties, the |
| 486 * child properties will be included in the response. For example, in a |
| 487 * channelSection resource, the snippet property contains other properties, |
| 488 * such as a display title for the channelSection. If you set part=snippet, |
| 489 * the API response will also contain all of those nested properties. |
| 490 * |
| 491 * [channelId] - The channelId parameter specifies a YouTube channel ID. The |
| 492 * API will only return that channel's channelSections. |
| 493 * |
| 494 * [id] - The id parameter specifies a comma-separated list of the YouTube |
| 495 * channelSection ID(s) for the resource(s) that are being retrieved. In a |
| 496 * channelSection resource, the id property specifies the YouTube |
| 497 * channelSection ID. |
| 498 * |
| 499 * [mine] - Set this parameter's value to true to retrieve a feed of the |
| 500 * authenticated user's channelSections. |
| 501 * |
| 502 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 503 * YouTube content partners. |
| 504 * |
| 505 * The onBehalfOfContentOwner parameter indicates that the request's |
| 506 * authorization credentials identify a YouTube CMS user who is acting on |
| 507 * behalf of the content owner specified in the parameter value. This |
| 508 * parameter is intended for YouTube content partners that own and manage many |
| 509 * different YouTube channels. It allows content owners to authenticate once |
| 510 * and get access to all their video and channel data, without having to |
| 511 * provide authentication credentials for each individual channel. The CMS |
| 512 * account that the user authenticates with must be linked to the specified |
| 513 * YouTube content owner. |
| 514 * |
| 515 * Completes with a [ChannelSectionListResponse]. |
| 516 * |
| 517 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 518 * error. |
| 519 * |
| 520 * If the used [http.Client] completes with an error when making a REST call, |
| 521 * this method will complete with the same error. |
| 522 */ |
| 523 async.Future<ChannelSectionListResponse> list(core.String part, {core.String c
hannelId, core.String id, core.bool mine, core.String onBehalfOfContentOwner}) { |
| 524 var _url = null; |
| 525 var _queryParams = new core.Map(); |
| 526 var _uploadMedia = null; |
| 527 var _uploadOptions = null; |
| 528 var _downloadOptions = common.DownloadOptions.Metadata; |
| 529 var _body = null; |
| 530 |
| 531 if (part == null) { |
| 532 throw new core.ArgumentError("Parameter part is required."); |
| 533 } |
| 534 _queryParams["part"] = [part]; |
| 535 if (channelId != null) { |
| 536 _queryParams["channelId"] = [channelId]; |
| 537 } |
| 538 if (id != null) { |
| 539 _queryParams["id"] = [id]; |
| 540 } |
| 541 if (mine != null) { |
| 542 _queryParams["mine"] = ["${mine}"]; |
| 543 } |
| 544 if (onBehalfOfContentOwner != null) { |
| 545 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 546 } |
| 547 |
| 548 |
| 549 _url = 'channelSections'; |
| 550 |
| 551 var _response = _requester.request(_url, |
| 552 "GET", |
| 553 body: _body, |
| 554 queryParams: _queryParams, |
| 555 uploadOptions: _uploadOptions, |
| 556 uploadMedia: _uploadMedia, |
| 557 downloadOptions: _downloadOptions); |
| 558 return _response.then((data) => new ChannelSectionListResponse.fromJson(data
)); |
| 559 } |
| 560 |
| 561 /** |
| 562 * Update a channelSection. |
| 563 * |
| 564 * [request] - The metadata request object. |
| 565 * |
| 566 * Request parameters: |
| 567 * |
| 568 * [part] - The part parameter serves two purposes in this operation. It |
| 569 * identifies the properties that the write operation will set as well as the |
| 570 * properties that the API response will include. |
| 571 * |
| 572 * The part names that you can include in the parameter value are snippet and |
| 573 * contentDetails. |
| 574 * |
| 575 * Completes with a [ChannelSection]. |
| 576 * |
| 577 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 578 * error. |
| 579 * |
| 580 * If the used [http.Client] completes with an error when making a REST call, |
| 581 * this method will complete with the same error. |
| 582 */ |
| 583 async.Future<ChannelSection> update(ChannelSection request, core.String part)
{ |
| 584 var _url = null; |
| 585 var _queryParams = new core.Map(); |
| 586 var _uploadMedia = null; |
| 587 var _uploadOptions = null; |
| 588 var _downloadOptions = common.DownloadOptions.Metadata; |
| 589 var _body = null; |
| 590 |
| 591 if (request != null) { |
| 592 _body = convert.JSON.encode((request).toJson()); |
| 593 } |
| 594 if (part == null) { |
| 595 throw new core.ArgumentError("Parameter part is required."); |
| 596 } |
| 597 _queryParams["part"] = [part]; |
| 598 |
| 599 |
| 600 _url = 'channelSections'; |
| 601 |
| 602 var _response = _requester.request(_url, |
| 603 "PUT", |
| 604 body: _body, |
| 605 queryParams: _queryParams, |
| 606 uploadOptions: _uploadOptions, |
| 607 uploadMedia: _uploadMedia, |
| 608 downloadOptions: _downloadOptions); |
| 609 return _response.then((data) => new ChannelSection.fromJson(data)); |
| 610 } |
| 611 |
| 612 } |
| 613 |
| 614 |
| 615 /** Not documented yet. */ |
| 616 class ChannelsResourceApi { |
| 617 final common_internal.ApiRequester _requester; |
| 618 |
| 619 ChannelsResourceApi(common_internal.ApiRequester client) : |
| 620 _requester = client; |
| 621 |
| 622 /** |
| 623 * Returns a collection of zero or more channel resources that match the |
| 624 * request criteria. |
| 625 * |
| 626 * Request parameters: |
| 627 * |
| 628 * [part] - The part parameter specifies a comma-separated list of one or more |
| 629 * channel resource properties that the API response will include. The part |
| 630 * names that you can include in the parameter value are id, snippet, |
| 631 * contentDetails, statistics, topicDetails, and invideoPromotion. |
| 632 * |
| 633 * If the parameter identifies a property that contains child properties, the |
| 634 * child properties will be included in the response. For example, in a |
| 635 * channel resource, the contentDetails property contains other properties, |
| 636 * such as the uploads properties. As such, if you set part=contentDetails, |
| 637 * the API response will also contain all of those nested properties. |
| 638 * |
| 639 * [categoryId] - The categoryId parameter specifies a YouTube guide category, |
| 640 * thereby requesting YouTube channels associated with that category. |
| 641 * |
| 642 * [forUsername] - The forUsername parameter specifies a YouTube username, |
| 643 * thereby requesting the channel associated with that username. |
| 644 * |
| 645 * [id] - The id parameter specifies a comma-separated list of the YouTube |
| 646 * channel ID(s) for the resource(s) that are being retrieved. In a channel |
| 647 * resource, the id property specifies the channel's YouTube channel ID. |
| 648 * |
| 649 * [managedByMe] - Set this parameter's value to true to instruct the API to |
| 650 * only return channels managed by the content owner that the |
| 651 * onBehalfOfContentOwner parameter specifies. The user must be authenticated |
| 652 * as a CMS account linked to the specified content owner and |
| 653 * onBehalfOfContentOwner must be provided. |
| 654 * |
| 655 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 656 * items that should be returned in the result set. |
| 657 * Value must be between "0" and "50". |
| 658 * |
| 659 * [mine] - Set this parameter's value to true to instruct the API to only |
| 660 * return channels owned by the authenticated user. |
| 661 * |
| 662 * [mySubscribers] - Set this parameter's value to true to retrieve a list of |
| 663 * channels that subscribed to the authenticated user's channel. |
| 664 * |
| 665 * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter indicates |
| 666 * that the authenticated user is acting on behalf of the content owner |
| 667 * specified in the parameter value. This parameter is intended for YouTube |
| 668 * content partners that own and manage many different YouTube channels. It |
| 669 * allows content owners to authenticate once and get access to all their |
| 670 * video and channel data, without having to provide authentication |
| 671 * credentials for each individual channel. The actual CMS account that the |
| 672 * user authenticates with needs to be linked to the specified YouTube content |
| 673 * owner. |
| 674 * |
| 675 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 676 * result set that should be returned. In an API response, the nextPageToken |
| 677 * and prevPageToken properties identify other pages that could be retrieved. |
| 678 * |
| 679 * Completes with a [ChannelListResponse]. |
| 680 * |
| 681 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 682 * error. |
| 683 * |
| 684 * If the used [http.Client] completes with an error when making a REST call, |
| 685 * this method will complete with the same error. |
| 686 */ |
| 687 async.Future<ChannelListResponse> list(core.String part, {core.String category
Id, core.String forUsername, core.String id, core.bool managedByMe, core.int max
Results, core.bool mine, core.bool mySubscribers, core.String onBehalfOfContentO
wner, core.String pageToken}) { |
| 688 var _url = null; |
| 689 var _queryParams = new core.Map(); |
| 690 var _uploadMedia = null; |
| 691 var _uploadOptions = null; |
| 692 var _downloadOptions = common.DownloadOptions.Metadata; |
| 693 var _body = null; |
| 694 |
| 695 if (part == null) { |
| 696 throw new core.ArgumentError("Parameter part is required."); |
| 697 } |
| 698 _queryParams["part"] = [part]; |
| 699 if (categoryId != null) { |
| 700 _queryParams["categoryId"] = [categoryId]; |
| 701 } |
| 702 if (forUsername != null) { |
| 703 _queryParams["forUsername"] = [forUsername]; |
| 704 } |
| 705 if (id != null) { |
| 706 _queryParams["id"] = [id]; |
| 707 } |
| 708 if (managedByMe != null) { |
| 709 _queryParams["managedByMe"] = ["${managedByMe}"]; |
| 710 } |
| 711 if (maxResults != null) { |
| 712 _queryParams["maxResults"] = ["${maxResults}"]; |
| 713 } |
| 714 if (mine != null) { |
| 715 _queryParams["mine"] = ["${mine}"]; |
| 716 } |
| 717 if (mySubscribers != null) { |
| 718 _queryParams["mySubscribers"] = ["${mySubscribers}"]; |
| 719 } |
| 720 if (onBehalfOfContentOwner != null) { |
| 721 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 722 } |
| 723 if (pageToken != null) { |
| 724 _queryParams["pageToken"] = [pageToken]; |
| 725 } |
| 726 |
| 727 |
| 728 _url = 'channels'; |
| 729 |
| 730 var _response = _requester.request(_url, |
| 731 "GET", |
| 732 body: _body, |
| 733 queryParams: _queryParams, |
| 734 uploadOptions: _uploadOptions, |
| 735 uploadMedia: _uploadMedia, |
| 736 downloadOptions: _downloadOptions); |
| 737 return _response.then((data) => new ChannelListResponse.fromJson(data)); |
| 738 } |
| 739 |
| 740 /** |
| 741 * Updates a channel's metadata. |
| 742 * |
| 743 * [request] - The metadata request object. |
| 744 * |
| 745 * Request parameters: |
| 746 * |
| 747 * [part] - The part parameter serves two purposes in this operation. It |
| 748 * identifies the properties that the write operation will set as well as the |
| 749 * properties that the API response will include. |
| 750 * |
| 751 * The part names that you can include in the parameter value are id and |
| 752 * invideoPromotion. |
| 753 * |
| 754 * Note that this method will override the existing values for all of the |
| 755 * mutable properties that are contained in any parts that the parameter value |
| 756 * specifies. |
| 757 * |
| 758 * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter indicates |
| 759 * that the authenticated user is acting on behalf of the content owner |
| 760 * specified in the parameter value. This parameter is intended for YouTube |
| 761 * content partners that own and manage many different YouTube channels. It |
| 762 * allows content owners to authenticate once and get access to all their |
| 763 * video and channel data, without having to provide authentication |
| 764 * credentials for each individual channel. The actual CMS account that the |
| 765 * user authenticates with needs to be linked to the specified YouTube content |
| 766 * owner. |
| 767 * |
| 768 * Completes with a [Channel]. |
| 769 * |
| 770 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 771 * error. |
| 772 * |
| 773 * If the used [http.Client] completes with an error when making a REST call, |
| 774 * this method will complete with the same error. |
| 775 */ |
| 776 async.Future<Channel> update(Channel request, core.String part, {core.String o
nBehalfOfContentOwner}) { |
| 777 var _url = null; |
| 778 var _queryParams = new core.Map(); |
| 779 var _uploadMedia = null; |
| 780 var _uploadOptions = null; |
| 781 var _downloadOptions = common.DownloadOptions.Metadata; |
| 782 var _body = null; |
| 783 |
| 784 if (request != null) { |
| 785 _body = convert.JSON.encode((request).toJson()); |
| 786 } |
| 787 if (part == null) { |
| 788 throw new core.ArgumentError("Parameter part is required."); |
| 789 } |
| 790 _queryParams["part"] = [part]; |
| 791 if (onBehalfOfContentOwner != null) { |
| 792 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 793 } |
| 794 |
| 795 |
| 796 _url = 'channels'; |
| 797 |
| 798 var _response = _requester.request(_url, |
| 799 "PUT", |
| 800 body: _body, |
| 801 queryParams: _queryParams, |
| 802 uploadOptions: _uploadOptions, |
| 803 uploadMedia: _uploadMedia, |
| 804 downloadOptions: _downloadOptions); |
| 805 return _response.then((data) => new Channel.fromJson(data)); |
| 806 } |
| 807 |
| 808 } |
| 809 |
| 810 |
| 811 /** Not documented yet. */ |
| 812 class GuideCategoriesResourceApi { |
| 813 final common_internal.ApiRequester _requester; |
| 814 |
| 815 GuideCategoriesResourceApi(common_internal.ApiRequester client) : |
| 816 _requester = client; |
| 817 |
| 818 /** |
| 819 * Returns a list of categories that can be associated with YouTube channels. |
| 820 * |
| 821 * Request parameters: |
| 822 * |
| 823 * [part] - The part parameter specifies a comma-separated list of one or more |
| 824 * guideCategory resource properties that the API response will include. The |
| 825 * part names that you can include in the parameter value are id and snippet. |
| 826 * |
| 827 * If the parameter identifies a property that contains child properties, the |
| 828 * child properties will be included in the response. For example, in a |
| 829 * guideCategory resource, the snippet property contains other properties, |
| 830 * such as the category's title. If you set part=snippet, the API response |
| 831 * will also contain all of those nested properties. |
| 832 * |
| 833 * [hl] - The hl parameter specifies the language that will be used for text |
| 834 * values in the API response. |
| 835 * |
| 836 * [id] - The id parameter specifies a comma-separated list of the YouTube |
| 837 * channel category ID(s) for the resource(s) that are being retrieved. In a |
| 838 * guideCategory resource, the id property specifies the YouTube channel |
| 839 * category ID. |
| 840 * |
| 841 * [regionCode] - The regionCode parameter instructs the API to return the |
| 842 * list of guide categories available in the specified country. The parameter |
| 843 * value is an ISO 3166-1 alpha-2 country code. |
| 844 * |
| 845 * Completes with a [GuideCategoryListResponse]. |
| 846 * |
| 847 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 848 * error. |
| 849 * |
| 850 * If the used [http.Client] completes with an error when making a REST call, |
| 851 * this method will complete with the same error. |
| 852 */ |
| 853 async.Future<GuideCategoryListResponse> list(core.String part, {core.String hl
, core.String id, core.String regionCode}) { |
| 854 var _url = null; |
| 855 var _queryParams = new core.Map(); |
| 856 var _uploadMedia = null; |
| 857 var _uploadOptions = null; |
| 858 var _downloadOptions = common.DownloadOptions.Metadata; |
| 859 var _body = null; |
| 860 |
| 861 if (part == null) { |
| 862 throw new core.ArgumentError("Parameter part is required."); |
| 863 } |
| 864 _queryParams["part"] = [part]; |
| 865 if (hl != null) { |
| 866 _queryParams["hl"] = [hl]; |
| 867 } |
| 868 if (id != null) { |
| 869 _queryParams["id"] = [id]; |
| 870 } |
| 871 if (regionCode != null) { |
| 872 _queryParams["regionCode"] = [regionCode]; |
| 873 } |
| 874 |
| 875 |
| 876 _url = 'guideCategories'; |
| 877 |
| 878 var _response = _requester.request(_url, |
| 879 "GET", |
| 880 body: _body, |
| 881 queryParams: _queryParams, |
| 882 uploadOptions: _uploadOptions, |
| 883 uploadMedia: _uploadMedia, |
| 884 downloadOptions: _downloadOptions); |
| 885 return _response.then((data) => new GuideCategoryListResponse.fromJson(data)
); |
| 886 } |
| 887 |
| 888 } |
| 889 |
| 890 |
| 891 /** Not documented yet. */ |
| 892 class I18nLanguagesResourceApi { |
| 893 final common_internal.ApiRequester _requester; |
| 894 |
| 895 I18nLanguagesResourceApi(common_internal.ApiRequester client) : |
| 896 _requester = client; |
| 897 |
| 898 /** |
| 899 * Returns a list of supported languages. |
| 900 * |
| 901 * Request parameters: |
| 902 * |
| 903 * [part] - The part parameter specifies a comma-separated list of one or more |
| 904 * i18nLanguage resource properties that the API response will include. The |
| 905 * part names that you can include in the parameter value are id and snippet. |
| 906 * |
| 907 * [hl] - The hl parameter specifies the language that should be used for text |
| 908 * values in the API response. |
| 909 * |
| 910 * Completes with a [I18nLanguageListResponse]. |
| 911 * |
| 912 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 913 * error. |
| 914 * |
| 915 * If the used [http.Client] completes with an error when making a REST call, |
| 916 * this method will complete with the same error. |
| 917 */ |
| 918 async.Future<I18nLanguageListResponse> list(core.String part, {core.String hl}
) { |
| 919 var _url = null; |
| 920 var _queryParams = new core.Map(); |
| 921 var _uploadMedia = null; |
| 922 var _uploadOptions = null; |
| 923 var _downloadOptions = common.DownloadOptions.Metadata; |
| 924 var _body = null; |
| 925 |
| 926 if (part == null) { |
| 927 throw new core.ArgumentError("Parameter part is required."); |
| 928 } |
| 929 _queryParams["part"] = [part]; |
| 930 if (hl != null) { |
| 931 _queryParams["hl"] = [hl]; |
| 932 } |
| 933 |
| 934 |
| 935 _url = 'i18nLanguages'; |
| 936 |
| 937 var _response = _requester.request(_url, |
| 938 "GET", |
| 939 body: _body, |
| 940 queryParams: _queryParams, |
| 941 uploadOptions: _uploadOptions, |
| 942 uploadMedia: _uploadMedia, |
| 943 downloadOptions: _downloadOptions); |
| 944 return _response.then((data) => new I18nLanguageListResponse.fromJson(data))
; |
| 945 } |
| 946 |
| 947 } |
| 948 |
| 949 |
| 950 /** Not documented yet. */ |
| 951 class I18nRegionsResourceApi { |
| 952 final common_internal.ApiRequester _requester; |
| 953 |
| 954 I18nRegionsResourceApi(common_internal.ApiRequester client) : |
| 955 _requester = client; |
| 956 |
| 957 /** |
| 958 * Returns a list of supported regions. |
| 959 * |
| 960 * Request parameters: |
| 961 * |
| 962 * [part] - The part parameter specifies a comma-separated list of one or more |
| 963 * i18nRegion resource properties that the API response will include. The part |
| 964 * names that you can include in the parameter value are id and snippet. |
| 965 * |
| 966 * [hl] - The hl parameter specifies the language that should be used for text |
| 967 * values in the API response. |
| 968 * |
| 969 * Completes with a [I18nRegionListResponse]. |
| 970 * |
| 971 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 972 * error. |
| 973 * |
| 974 * If the used [http.Client] completes with an error when making a REST call, |
| 975 * this method will complete with the same error. |
| 976 */ |
| 977 async.Future<I18nRegionListResponse> list(core.String part, {core.String hl})
{ |
| 978 var _url = null; |
| 979 var _queryParams = new core.Map(); |
| 980 var _uploadMedia = null; |
| 981 var _uploadOptions = null; |
| 982 var _downloadOptions = common.DownloadOptions.Metadata; |
| 983 var _body = null; |
| 984 |
| 985 if (part == null) { |
| 986 throw new core.ArgumentError("Parameter part is required."); |
| 987 } |
| 988 _queryParams["part"] = [part]; |
| 989 if (hl != null) { |
| 990 _queryParams["hl"] = [hl]; |
| 991 } |
| 992 |
| 993 |
| 994 _url = 'i18nRegions'; |
| 995 |
| 996 var _response = _requester.request(_url, |
| 997 "GET", |
| 998 body: _body, |
| 999 queryParams: _queryParams, |
| 1000 uploadOptions: _uploadOptions, |
| 1001 uploadMedia: _uploadMedia, |
| 1002 downloadOptions: _downloadOptions); |
| 1003 return _response.then((data) => new I18nRegionListResponse.fromJson(data)); |
| 1004 } |
| 1005 |
| 1006 } |
| 1007 |
| 1008 |
| 1009 /** Not documented yet. */ |
| 1010 class LiveBroadcastsResourceApi { |
| 1011 final common_internal.ApiRequester _requester; |
| 1012 |
| 1013 LiveBroadcastsResourceApi(common_internal.ApiRequester client) : |
| 1014 _requester = client; |
| 1015 |
| 1016 /** |
| 1017 * Binds a YouTube broadcast to a stream or removes an existing binding |
| 1018 * between a broadcast and a stream. A broadcast can only be bound to one |
| 1019 * video stream. |
| 1020 * |
| 1021 * Request parameters: |
| 1022 * |
| 1023 * [id] - The id parameter specifies the unique ID of the broadcast that is |
| 1024 * being bound to a video stream. |
| 1025 * |
| 1026 * [part] - The part parameter specifies a comma-separated list of one or more |
| 1027 * liveBroadcast resource properties that the API response will include. The |
| 1028 * part names that you can include in the parameter value are id, snippet, |
| 1029 * contentDetails, and status. |
| 1030 * |
| 1031 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1032 * YouTube content partners. |
| 1033 * |
| 1034 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1035 * authorization credentials identify a YouTube CMS user who is acting on |
| 1036 * behalf of the content owner specified in the parameter value. This |
| 1037 * parameter is intended for YouTube content partners that own and manage many |
| 1038 * different YouTube channels. It allows content owners to authenticate once |
| 1039 * and get access to all their video and channel data, without having to |
| 1040 * provide authentication credentials for each individual channel. The CMS |
| 1041 * account that the user authenticates with must be linked to the specified |
| 1042 * YouTube content owner. |
| 1043 * |
| 1044 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1045 * properly authorized request. Note: This parameter is intended exclusively |
| 1046 * for YouTube content partners. |
| 1047 * |
| 1048 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1049 * ID of the channel to which a video is being added. This parameter is |
| 1050 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1051 * parameter, and it can only be used in conjunction with that parameter. In |
| 1052 * addition, the request must be authorized using a CMS account that is linked |
| 1053 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1054 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1055 * specifies must be linked to the content owner that the |
| 1056 * onBehalfOfContentOwner parameter specifies. |
| 1057 * |
| 1058 * This parameter is intended for YouTube content partners that own and manage |
| 1059 * many different YouTube channels. It allows content owners to authenticate |
| 1060 * once and perform actions on behalf of the channel specified in the |
| 1061 * parameter value, without having to provide authentication credentials for |
| 1062 * each separate channel. |
| 1063 * |
| 1064 * [streamId] - The streamId parameter specifies the unique ID of the video |
| 1065 * stream that is being bound to a broadcast. If this parameter is omitted, |
| 1066 * the API will remove any existing binding between the broadcast and a video |
| 1067 * stream. |
| 1068 * |
| 1069 * Completes with a [LiveBroadcast]. |
| 1070 * |
| 1071 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1072 * error. |
| 1073 * |
| 1074 * If the used [http.Client] completes with an error when making a REST call, |
| 1075 * this method will complete with the same error. |
| 1076 */ |
| 1077 async.Future<LiveBroadcast> bind(core.String id, core.String part, {core.Strin
g onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel, core.String
streamId}) { |
| 1078 var _url = null; |
| 1079 var _queryParams = new core.Map(); |
| 1080 var _uploadMedia = null; |
| 1081 var _uploadOptions = null; |
| 1082 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1083 var _body = null; |
| 1084 |
| 1085 if (id == null) { |
| 1086 throw new core.ArgumentError("Parameter id is required."); |
| 1087 } |
| 1088 _queryParams["id"] = [id]; |
| 1089 if (part == null) { |
| 1090 throw new core.ArgumentError("Parameter part is required."); |
| 1091 } |
| 1092 _queryParams["part"] = [part]; |
| 1093 if (onBehalfOfContentOwner != null) { |
| 1094 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1095 } |
| 1096 if (onBehalfOfContentOwnerChannel != null) { |
| 1097 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1098 } |
| 1099 if (streamId != null) { |
| 1100 _queryParams["streamId"] = [streamId]; |
| 1101 } |
| 1102 |
| 1103 |
| 1104 _url = 'liveBroadcasts/bind'; |
| 1105 |
| 1106 var _response = _requester.request(_url, |
| 1107 "POST", |
| 1108 body: _body, |
| 1109 queryParams: _queryParams, |
| 1110 uploadOptions: _uploadOptions, |
| 1111 uploadMedia: _uploadMedia, |
| 1112 downloadOptions: _downloadOptions); |
| 1113 return _response.then((data) => new LiveBroadcast.fromJson(data)); |
| 1114 } |
| 1115 |
| 1116 /** |
| 1117 * Controls the settings for a slate that can be displayed in the broadcast |
| 1118 * stream. |
| 1119 * |
| 1120 * Request parameters: |
| 1121 * |
| 1122 * [id] - The id parameter specifies the YouTube live broadcast ID that |
| 1123 * uniquely identifies the broadcast in which the slate is being updated. |
| 1124 * |
| 1125 * [part] - The part parameter specifies a comma-separated list of one or more |
| 1126 * liveBroadcast resource properties that the API response will include. The |
| 1127 * part names that you can include in the parameter value are id, snippet, |
| 1128 * contentDetails, and status. |
| 1129 * |
| 1130 * [displaySlate] - The displaySlate parameter specifies whether the slate is |
| 1131 * being enabled or disabled. |
| 1132 * |
| 1133 * [offsetTimeMs] - The offsetTimeMs parameter specifies a positive time |
| 1134 * offset when the specified slate change will occur. The value is measured in |
| 1135 * milliseconds from the beginning of the broadcast's monitor stream, which is |
| 1136 * the time that the testing phase for the broadcast began. Even though it is |
| 1137 * specified in milliseconds, the value is actually an approximation, and |
| 1138 * YouTube completes the requested action as closely as possible to that time. |
| 1139 * |
| 1140 * If you do not specify a value for this parameter, then YouTube performs the |
| 1141 * action as soon as possible. See the Getting started guide for more details. |
| 1142 * |
| 1143 * Important: You should only specify a value for this parameter if your |
| 1144 * broadcast stream is delayed. |
| 1145 * |
| 1146 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1147 * YouTube content partners. |
| 1148 * |
| 1149 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1150 * authorization credentials identify a YouTube CMS user who is acting on |
| 1151 * behalf of the content owner specified in the parameter value. This |
| 1152 * parameter is intended for YouTube content partners that own and manage many |
| 1153 * different YouTube channels. It allows content owners to authenticate once |
| 1154 * and get access to all their video and channel data, without having to |
| 1155 * provide authentication credentials for each individual channel. The CMS |
| 1156 * account that the user authenticates with must be linked to the specified |
| 1157 * YouTube content owner. |
| 1158 * |
| 1159 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1160 * properly authorized request. Note: This parameter is intended exclusively |
| 1161 * for YouTube content partners. |
| 1162 * |
| 1163 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1164 * ID of the channel to which a video is being added. This parameter is |
| 1165 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1166 * parameter, and it can only be used in conjunction with that parameter. In |
| 1167 * addition, the request must be authorized using a CMS account that is linked |
| 1168 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1169 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1170 * specifies must be linked to the content owner that the |
| 1171 * onBehalfOfContentOwner parameter specifies. |
| 1172 * |
| 1173 * This parameter is intended for YouTube content partners that own and manage |
| 1174 * many different YouTube channels. It allows content owners to authenticate |
| 1175 * once and perform actions on behalf of the channel specified in the |
| 1176 * parameter value, without having to provide authentication credentials for |
| 1177 * each separate channel. |
| 1178 * |
| 1179 * [walltime] - The walltime parameter specifies the wall clock time at which |
| 1180 * the specified slate change will occur. The value is specified in ISO 8601 |
| 1181 * (YYYY-MM-DDThh:mm:ss.sssZ) format. |
| 1182 * |
| 1183 * Completes with a [LiveBroadcast]. |
| 1184 * |
| 1185 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1186 * error. |
| 1187 * |
| 1188 * If the used [http.Client] completes with an error when making a REST call, |
| 1189 * this method will complete with the same error. |
| 1190 */ |
| 1191 async.Future<LiveBroadcast> control(core.String id, core.String part, {core.bo
ol displaySlate, core.String offsetTimeMs, core.String onBehalfOfContentOwner, c
ore.String onBehalfOfContentOwnerChannel, core.DateTime walltime}) { |
| 1192 var _url = null; |
| 1193 var _queryParams = new core.Map(); |
| 1194 var _uploadMedia = null; |
| 1195 var _uploadOptions = null; |
| 1196 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1197 var _body = null; |
| 1198 |
| 1199 if (id == null) { |
| 1200 throw new core.ArgumentError("Parameter id is required."); |
| 1201 } |
| 1202 _queryParams["id"] = [id]; |
| 1203 if (part == null) { |
| 1204 throw new core.ArgumentError("Parameter part is required."); |
| 1205 } |
| 1206 _queryParams["part"] = [part]; |
| 1207 if (displaySlate != null) { |
| 1208 _queryParams["displaySlate"] = ["${displaySlate}"]; |
| 1209 } |
| 1210 if (offsetTimeMs != null) { |
| 1211 _queryParams["offsetTimeMs"] = [offsetTimeMs]; |
| 1212 } |
| 1213 if (onBehalfOfContentOwner != null) { |
| 1214 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1215 } |
| 1216 if (onBehalfOfContentOwnerChannel != null) { |
| 1217 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1218 } |
| 1219 if (walltime != null) { |
| 1220 _queryParams["walltime"] = [(walltime).toIso8601String()]; |
| 1221 } |
| 1222 |
| 1223 |
| 1224 _url = 'liveBroadcasts/control'; |
| 1225 |
| 1226 var _response = _requester.request(_url, |
| 1227 "POST", |
| 1228 body: _body, |
| 1229 queryParams: _queryParams, |
| 1230 uploadOptions: _uploadOptions, |
| 1231 uploadMedia: _uploadMedia, |
| 1232 downloadOptions: _downloadOptions); |
| 1233 return _response.then((data) => new LiveBroadcast.fromJson(data)); |
| 1234 } |
| 1235 |
| 1236 /** |
| 1237 * Deletes a broadcast. |
| 1238 * |
| 1239 * Request parameters: |
| 1240 * |
| 1241 * [id] - The id parameter specifies the YouTube live broadcast ID for the |
| 1242 * resource that is being deleted. |
| 1243 * |
| 1244 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1245 * YouTube content partners. |
| 1246 * |
| 1247 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1248 * authorization credentials identify a YouTube CMS user who is acting on |
| 1249 * behalf of the content owner specified in the parameter value. This |
| 1250 * parameter is intended for YouTube content partners that own and manage many |
| 1251 * different YouTube channels. It allows content owners to authenticate once |
| 1252 * and get access to all their video and channel data, without having to |
| 1253 * provide authentication credentials for each individual channel. The CMS |
| 1254 * account that the user authenticates with must be linked to the specified |
| 1255 * YouTube content owner. |
| 1256 * |
| 1257 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1258 * properly authorized request. Note: This parameter is intended exclusively |
| 1259 * for YouTube content partners. |
| 1260 * |
| 1261 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1262 * ID of the channel to which a video is being added. This parameter is |
| 1263 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1264 * parameter, and it can only be used in conjunction with that parameter. In |
| 1265 * addition, the request must be authorized using a CMS account that is linked |
| 1266 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1267 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1268 * specifies must be linked to the content owner that the |
| 1269 * onBehalfOfContentOwner parameter specifies. |
| 1270 * |
| 1271 * This parameter is intended for YouTube content partners that own and manage |
| 1272 * many different YouTube channels. It allows content owners to authenticate |
| 1273 * once and perform actions on behalf of the channel specified in the |
| 1274 * parameter value, without having to provide authentication credentials for |
| 1275 * each separate channel. |
| 1276 * |
| 1277 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1278 * error. |
| 1279 * |
| 1280 * If the used [http.Client] completes with an error when making a REST call, |
| 1281 * this method will complete with the same error. |
| 1282 */ |
| 1283 async.Future delete(core.String id, {core.String onBehalfOfContentOwner, core.
String onBehalfOfContentOwnerChannel}) { |
| 1284 var _url = null; |
| 1285 var _queryParams = new core.Map(); |
| 1286 var _uploadMedia = null; |
| 1287 var _uploadOptions = null; |
| 1288 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1289 var _body = null; |
| 1290 |
| 1291 if (id == null) { |
| 1292 throw new core.ArgumentError("Parameter id is required."); |
| 1293 } |
| 1294 _queryParams["id"] = [id]; |
| 1295 if (onBehalfOfContentOwner != null) { |
| 1296 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1297 } |
| 1298 if (onBehalfOfContentOwnerChannel != null) { |
| 1299 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1300 } |
| 1301 |
| 1302 _downloadOptions = null; |
| 1303 |
| 1304 _url = 'liveBroadcasts'; |
| 1305 |
| 1306 var _response = _requester.request(_url, |
| 1307 "DELETE", |
| 1308 body: _body, |
| 1309 queryParams: _queryParams, |
| 1310 uploadOptions: _uploadOptions, |
| 1311 uploadMedia: _uploadMedia, |
| 1312 downloadOptions: _downloadOptions); |
| 1313 return _response.then((data) => null); |
| 1314 } |
| 1315 |
| 1316 /** |
| 1317 * Creates a broadcast. |
| 1318 * |
| 1319 * [request] - The metadata request object. |
| 1320 * |
| 1321 * Request parameters: |
| 1322 * |
| 1323 * [part] - The part parameter serves two purposes in this operation. It |
| 1324 * identifies the properties that the write operation will set as well as the |
| 1325 * properties that the API response will include. |
| 1326 * |
| 1327 * The part properties that you can include in the parameter value are id, |
| 1328 * snippet, contentDetails, and status. |
| 1329 * |
| 1330 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1331 * YouTube content partners. |
| 1332 * |
| 1333 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1334 * authorization credentials identify a YouTube CMS user who is acting on |
| 1335 * behalf of the content owner specified in the parameter value. This |
| 1336 * parameter is intended for YouTube content partners that own and manage many |
| 1337 * different YouTube channels. It allows content owners to authenticate once |
| 1338 * and get access to all their video and channel data, without having to |
| 1339 * provide authentication credentials for each individual channel. The CMS |
| 1340 * account that the user authenticates with must be linked to the specified |
| 1341 * YouTube content owner. |
| 1342 * |
| 1343 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1344 * properly authorized request. Note: This parameter is intended exclusively |
| 1345 * for YouTube content partners. |
| 1346 * |
| 1347 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1348 * ID of the channel to which a video is being added. This parameter is |
| 1349 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1350 * parameter, and it can only be used in conjunction with that parameter. In |
| 1351 * addition, the request must be authorized using a CMS account that is linked |
| 1352 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1353 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1354 * specifies must be linked to the content owner that the |
| 1355 * onBehalfOfContentOwner parameter specifies. |
| 1356 * |
| 1357 * This parameter is intended for YouTube content partners that own and manage |
| 1358 * many different YouTube channels. It allows content owners to authenticate |
| 1359 * once and perform actions on behalf of the channel specified in the |
| 1360 * parameter value, without having to provide authentication credentials for |
| 1361 * each separate channel. |
| 1362 * |
| 1363 * Completes with a [LiveBroadcast]. |
| 1364 * |
| 1365 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1366 * error. |
| 1367 * |
| 1368 * If the used [http.Client] completes with an error when making a REST call, |
| 1369 * this method will complete with the same error. |
| 1370 */ |
| 1371 async.Future<LiveBroadcast> insert(LiveBroadcast request, core.String part, {c
ore.String onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel}) { |
| 1372 var _url = null; |
| 1373 var _queryParams = new core.Map(); |
| 1374 var _uploadMedia = null; |
| 1375 var _uploadOptions = null; |
| 1376 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1377 var _body = null; |
| 1378 |
| 1379 if (request != null) { |
| 1380 _body = convert.JSON.encode((request).toJson()); |
| 1381 } |
| 1382 if (part == null) { |
| 1383 throw new core.ArgumentError("Parameter part is required."); |
| 1384 } |
| 1385 _queryParams["part"] = [part]; |
| 1386 if (onBehalfOfContentOwner != null) { |
| 1387 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1388 } |
| 1389 if (onBehalfOfContentOwnerChannel != null) { |
| 1390 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1391 } |
| 1392 |
| 1393 |
| 1394 _url = 'liveBroadcasts'; |
| 1395 |
| 1396 var _response = _requester.request(_url, |
| 1397 "POST", |
| 1398 body: _body, |
| 1399 queryParams: _queryParams, |
| 1400 uploadOptions: _uploadOptions, |
| 1401 uploadMedia: _uploadMedia, |
| 1402 downloadOptions: _downloadOptions); |
| 1403 return _response.then((data) => new LiveBroadcast.fromJson(data)); |
| 1404 } |
| 1405 |
| 1406 /** |
| 1407 * Returns a list of YouTube broadcasts that match the API request parameters. |
| 1408 * |
| 1409 * Request parameters: |
| 1410 * |
| 1411 * [part] - The part parameter specifies a comma-separated list of one or more |
| 1412 * liveBroadcast resource properties that the API response will include. The |
| 1413 * part names that you can include in the parameter value are id, snippet, |
| 1414 * contentDetails, and status. |
| 1415 * |
| 1416 * [broadcastStatus] - The broadcastStatus parameter filters the API response |
| 1417 * to only include broadcasts with the specified status. |
| 1418 * Possible string values are: |
| 1419 * - "active" : Return current live broadcasts. |
| 1420 * - "all" : Return all broadcasts. |
| 1421 * - "completed" : Return broadcasts that have already ended. |
| 1422 * - "upcoming" : Return broadcasts that have not yet started. |
| 1423 * |
| 1424 * [id] - The id parameter specifies a comma-separated list of YouTube |
| 1425 * broadcast IDs that identify the broadcasts being retrieved. In a |
| 1426 * liveBroadcast resource, the id property specifies the broadcast's ID. |
| 1427 * |
| 1428 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 1429 * items that should be returned in the result set. |
| 1430 * Value must be between "0" and "50". |
| 1431 * |
| 1432 * [mine] - The mine parameter can be used to instruct the API to only return |
| 1433 * broadcasts owned by the authenticated user. Set the parameter value to true |
| 1434 * to only retrieve your own broadcasts. |
| 1435 * |
| 1436 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1437 * YouTube content partners. |
| 1438 * |
| 1439 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1440 * authorization credentials identify a YouTube CMS user who is acting on |
| 1441 * behalf of the content owner specified in the parameter value. This |
| 1442 * parameter is intended for YouTube content partners that own and manage many |
| 1443 * different YouTube channels. It allows content owners to authenticate once |
| 1444 * and get access to all their video and channel data, without having to |
| 1445 * provide authentication credentials for each individual channel. The CMS |
| 1446 * account that the user authenticates with must be linked to the specified |
| 1447 * YouTube content owner. |
| 1448 * |
| 1449 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1450 * properly authorized request. Note: This parameter is intended exclusively |
| 1451 * for YouTube content partners. |
| 1452 * |
| 1453 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1454 * ID of the channel to which a video is being added. This parameter is |
| 1455 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1456 * parameter, and it can only be used in conjunction with that parameter. In |
| 1457 * addition, the request must be authorized using a CMS account that is linked |
| 1458 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1459 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1460 * specifies must be linked to the content owner that the |
| 1461 * onBehalfOfContentOwner parameter specifies. |
| 1462 * |
| 1463 * This parameter is intended for YouTube content partners that own and manage |
| 1464 * many different YouTube channels. It allows content owners to authenticate |
| 1465 * once and perform actions on behalf of the channel specified in the |
| 1466 * parameter value, without having to provide authentication credentials for |
| 1467 * each separate channel. |
| 1468 * |
| 1469 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 1470 * result set that should be returned. In an API response, the nextPageToken |
| 1471 * and prevPageToken properties identify other pages that could be retrieved. |
| 1472 * |
| 1473 * Completes with a [LiveBroadcastListResponse]. |
| 1474 * |
| 1475 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1476 * error. |
| 1477 * |
| 1478 * If the used [http.Client] completes with an error when making a REST call, |
| 1479 * this method will complete with the same error. |
| 1480 */ |
| 1481 async.Future<LiveBroadcastListResponse> list(core.String part, {core.String br
oadcastStatus, core.String id, core.int maxResults, core.bool mine, core.String
onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel, core.String p
ageToken}) { |
| 1482 var _url = null; |
| 1483 var _queryParams = new core.Map(); |
| 1484 var _uploadMedia = null; |
| 1485 var _uploadOptions = null; |
| 1486 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1487 var _body = null; |
| 1488 |
| 1489 if (part == null) { |
| 1490 throw new core.ArgumentError("Parameter part is required."); |
| 1491 } |
| 1492 _queryParams["part"] = [part]; |
| 1493 if (broadcastStatus != null) { |
| 1494 _queryParams["broadcastStatus"] = [broadcastStatus]; |
| 1495 } |
| 1496 if (id != null) { |
| 1497 _queryParams["id"] = [id]; |
| 1498 } |
| 1499 if (maxResults != null) { |
| 1500 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1501 } |
| 1502 if (mine != null) { |
| 1503 _queryParams["mine"] = ["${mine}"]; |
| 1504 } |
| 1505 if (onBehalfOfContentOwner != null) { |
| 1506 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1507 } |
| 1508 if (onBehalfOfContentOwnerChannel != null) { |
| 1509 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1510 } |
| 1511 if (pageToken != null) { |
| 1512 _queryParams["pageToken"] = [pageToken]; |
| 1513 } |
| 1514 |
| 1515 |
| 1516 _url = 'liveBroadcasts'; |
| 1517 |
| 1518 var _response = _requester.request(_url, |
| 1519 "GET", |
| 1520 body: _body, |
| 1521 queryParams: _queryParams, |
| 1522 uploadOptions: _uploadOptions, |
| 1523 uploadMedia: _uploadMedia, |
| 1524 downloadOptions: _downloadOptions); |
| 1525 return _response.then((data) => new LiveBroadcastListResponse.fromJson(data)
); |
| 1526 } |
| 1527 |
| 1528 /** |
| 1529 * Changes the status of a YouTube live broadcast and initiates any processes |
| 1530 * associated with the new status. For example, when you transition a |
| 1531 * broadcast's status to testing, YouTube starts to transmit video to that |
| 1532 * broadcast's monitor stream. Before calling this method, you should confirm |
| 1533 * that the value of the status.streamStatus property for the stream bound to |
| 1534 * your broadcast is active. |
| 1535 * |
| 1536 * Request parameters: |
| 1537 * |
| 1538 * [broadcastStatus] - The broadcastStatus parameter identifies the state to |
| 1539 * which the broadcast is changing. Note that to transition a broadcast to |
| 1540 * either the testing or live state, the status.streamStatus must be active |
| 1541 * for the stream that the broadcast is bound to. |
| 1542 * Possible string values are: |
| 1543 * - "complete" : The broadcast is over. YouTube stops transmitting video. |
| 1544 * - "live" : The broadcast is visible to its audience. YouTube transmits |
| 1545 * video to the broadcast's monitor stream and its broadcast stream. |
| 1546 * - "testing" : Start testing the broadcast. YouTube transmits video to the |
| 1547 * broadcast's monitor stream. Note that you can only transition a broadcast |
| 1548 * to the testing state if its |
| 1549 * contentDetails.monitorStream.enableMonitorStream property is set to true. |
| 1550 * |
| 1551 * [id] - The id parameter specifies the unique ID of the broadcast that is |
| 1552 * transitioning to another status. |
| 1553 * |
| 1554 * [part] - The part parameter specifies a comma-separated list of one or more |
| 1555 * liveBroadcast resource properties that the API response will include. The |
| 1556 * part names that you can include in the parameter value are id, snippet, |
| 1557 * contentDetails, and status. |
| 1558 * |
| 1559 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1560 * YouTube content partners. |
| 1561 * |
| 1562 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1563 * authorization credentials identify a YouTube CMS user who is acting on |
| 1564 * behalf of the content owner specified in the parameter value. This |
| 1565 * parameter is intended for YouTube content partners that own and manage many |
| 1566 * different YouTube channels. It allows content owners to authenticate once |
| 1567 * and get access to all their video and channel data, without having to |
| 1568 * provide authentication credentials for each individual channel. The CMS |
| 1569 * account that the user authenticates with must be linked to the specified |
| 1570 * YouTube content owner. |
| 1571 * |
| 1572 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1573 * properly authorized request. Note: This parameter is intended exclusively |
| 1574 * for YouTube content partners. |
| 1575 * |
| 1576 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1577 * ID of the channel to which a video is being added. This parameter is |
| 1578 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1579 * parameter, and it can only be used in conjunction with that parameter. In |
| 1580 * addition, the request must be authorized using a CMS account that is linked |
| 1581 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1582 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1583 * specifies must be linked to the content owner that the |
| 1584 * onBehalfOfContentOwner parameter specifies. |
| 1585 * |
| 1586 * This parameter is intended for YouTube content partners that own and manage |
| 1587 * many different YouTube channels. It allows content owners to authenticate |
| 1588 * once and perform actions on behalf of the channel specified in the |
| 1589 * parameter value, without having to provide authentication credentials for |
| 1590 * each separate channel. |
| 1591 * |
| 1592 * Completes with a [LiveBroadcast]. |
| 1593 * |
| 1594 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1595 * error. |
| 1596 * |
| 1597 * If the used [http.Client] completes with an error when making a REST call, |
| 1598 * this method will complete with the same error. |
| 1599 */ |
| 1600 async.Future<LiveBroadcast> transition(core.String broadcastStatus, core.Strin
g id, core.String part, {core.String onBehalfOfContentOwner, core.String onBehal
fOfContentOwnerChannel}) { |
| 1601 var _url = null; |
| 1602 var _queryParams = new core.Map(); |
| 1603 var _uploadMedia = null; |
| 1604 var _uploadOptions = null; |
| 1605 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1606 var _body = null; |
| 1607 |
| 1608 if (broadcastStatus == null) { |
| 1609 throw new core.ArgumentError("Parameter broadcastStatus is required."); |
| 1610 } |
| 1611 _queryParams["broadcastStatus"] = [broadcastStatus]; |
| 1612 if (id == null) { |
| 1613 throw new core.ArgumentError("Parameter id is required."); |
| 1614 } |
| 1615 _queryParams["id"] = [id]; |
| 1616 if (part == null) { |
| 1617 throw new core.ArgumentError("Parameter part is required."); |
| 1618 } |
| 1619 _queryParams["part"] = [part]; |
| 1620 if (onBehalfOfContentOwner != null) { |
| 1621 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1622 } |
| 1623 if (onBehalfOfContentOwnerChannel != null) { |
| 1624 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1625 } |
| 1626 |
| 1627 |
| 1628 _url = 'liveBroadcasts/transition'; |
| 1629 |
| 1630 var _response = _requester.request(_url, |
| 1631 "POST", |
| 1632 body: _body, |
| 1633 queryParams: _queryParams, |
| 1634 uploadOptions: _uploadOptions, |
| 1635 uploadMedia: _uploadMedia, |
| 1636 downloadOptions: _downloadOptions); |
| 1637 return _response.then((data) => new LiveBroadcast.fromJson(data)); |
| 1638 } |
| 1639 |
| 1640 /** |
| 1641 * Updates a broadcast. For example, you could modify the broadcast settings |
| 1642 * defined in the liveBroadcast resource's contentDetails object. |
| 1643 * |
| 1644 * [request] - The metadata request object. |
| 1645 * |
| 1646 * Request parameters: |
| 1647 * |
| 1648 * [part] - The part parameter serves two purposes in this operation. It |
| 1649 * identifies the properties that the write operation will set as well as the |
| 1650 * properties that the API response will include. |
| 1651 * |
| 1652 * The part properties that you can include in the parameter value are id, |
| 1653 * snippet, contentDetails, and status. |
| 1654 * |
| 1655 * Note that this method will override the existing values for all of the |
| 1656 * mutable properties that are contained in any parts that the parameter value |
| 1657 * specifies. For example, a broadcast's privacy status is defined in the |
| 1658 * status part. As such, if your request is updating a private or unlisted |
| 1659 * broadcast, and the request's part parameter value includes the status part, |
| 1660 * the broadcast's privacy setting will be updated to whatever value the |
| 1661 * request body specifies. If the request body does not specify a value, the |
| 1662 * existing privacy setting will be removed and the broadcast will revert to |
| 1663 * the default privacy setting. |
| 1664 * |
| 1665 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1666 * YouTube content partners. |
| 1667 * |
| 1668 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1669 * authorization credentials identify a YouTube CMS user who is acting on |
| 1670 * behalf of the content owner specified in the parameter value. This |
| 1671 * parameter is intended for YouTube content partners that own and manage many |
| 1672 * different YouTube channels. It allows content owners to authenticate once |
| 1673 * and get access to all their video and channel data, without having to |
| 1674 * provide authentication credentials for each individual channel. The CMS |
| 1675 * account that the user authenticates with must be linked to the specified |
| 1676 * YouTube content owner. |
| 1677 * |
| 1678 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1679 * properly authorized request. Note: This parameter is intended exclusively |
| 1680 * for YouTube content partners. |
| 1681 * |
| 1682 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1683 * ID of the channel to which a video is being added. This parameter is |
| 1684 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1685 * parameter, and it can only be used in conjunction with that parameter. In |
| 1686 * addition, the request must be authorized using a CMS account that is linked |
| 1687 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1688 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1689 * specifies must be linked to the content owner that the |
| 1690 * onBehalfOfContentOwner parameter specifies. |
| 1691 * |
| 1692 * This parameter is intended for YouTube content partners that own and manage |
| 1693 * many different YouTube channels. It allows content owners to authenticate |
| 1694 * once and perform actions on behalf of the channel specified in the |
| 1695 * parameter value, without having to provide authentication credentials for |
| 1696 * each separate channel. |
| 1697 * |
| 1698 * Completes with a [LiveBroadcast]. |
| 1699 * |
| 1700 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1701 * error. |
| 1702 * |
| 1703 * If the used [http.Client] completes with an error when making a REST call, |
| 1704 * this method will complete with the same error. |
| 1705 */ |
| 1706 async.Future<LiveBroadcast> update(LiveBroadcast request, core.String part, {c
ore.String onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel}) { |
| 1707 var _url = null; |
| 1708 var _queryParams = new core.Map(); |
| 1709 var _uploadMedia = null; |
| 1710 var _uploadOptions = null; |
| 1711 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1712 var _body = null; |
| 1713 |
| 1714 if (request != null) { |
| 1715 _body = convert.JSON.encode((request).toJson()); |
| 1716 } |
| 1717 if (part == null) { |
| 1718 throw new core.ArgumentError("Parameter part is required."); |
| 1719 } |
| 1720 _queryParams["part"] = [part]; |
| 1721 if (onBehalfOfContentOwner != null) { |
| 1722 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1723 } |
| 1724 if (onBehalfOfContentOwnerChannel != null) { |
| 1725 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1726 } |
| 1727 |
| 1728 |
| 1729 _url = 'liveBroadcasts'; |
| 1730 |
| 1731 var _response = _requester.request(_url, |
| 1732 "PUT", |
| 1733 body: _body, |
| 1734 queryParams: _queryParams, |
| 1735 uploadOptions: _uploadOptions, |
| 1736 uploadMedia: _uploadMedia, |
| 1737 downloadOptions: _downloadOptions); |
| 1738 return _response.then((data) => new LiveBroadcast.fromJson(data)); |
| 1739 } |
| 1740 |
| 1741 } |
| 1742 |
| 1743 |
| 1744 /** Not documented yet. */ |
| 1745 class LiveStreamsResourceApi { |
| 1746 final common_internal.ApiRequester _requester; |
| 1747 |
| 1748 LiveStreamsResourceApi(common_internal.ApiRequester client) : |
| 1749 _requester = client; |
| 1750 |
| 1751 /** |
| 1752 * Deletes a video stream. |
| 1753 * |
| 1754 * Request parameters: |
| 1755 * |
| 1756 * [id] - The id parameter specifies the YouTube live stream ID for the |
| 1757 * resource that is being deleted. |
| 1758 * |
| 1759 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1760 * YouTube content partners. |
| 1761 * |
| 1762 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1763 * authorization credentials identify a YouTube CMS user who is acting on |
| 1764 * behalf of the content owner specified in the parameter value. This |
| 1765 * parameter is intended for YouTube content partners that own and manage many |
| 1766 * different YouTube channels. It allows content owners to authenticate once |
| 1767 * and get access to all their video and channel data, without having to |
| 1768 * provide authentication credentials for each individual channel. The CMS |
| 1769 * account that the user authenticates with must be linked to the specified |
| 1770 * YouTube content owner. |
| 1771 * |
| 1772 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1773 * properly authorized request. Note: This parameter is intended exclusively |
| 1774 * for YouTube content partners. |
| 1775 * |
| 1776 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1777 * ID of the channel to which a video is being added. This parameter is |
| 1778 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1779 * parameter, and it can only be used in conjunction with that parameter. In |
| 1780 * addition, the request must be authorized using a CMS account that is linked |
| 1781 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1782 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1783 * specifies must be linked to the content owner that the |
| 1784 * onBehalfOfContentOwner parameter specifies. |
| 1785 * |
| 1786 * This parameter is intended for YouTube content partners that own and manage |
| 1787 * many different YouTube channels. It allows content owners to authenticate |
| 1788 * once and perform actions on behalf of the channel specified in the |
| 1789 * parameter value, without having to provide authentication credentials for |
| 1790 * each separate channel. |
| 1791 * |
| 1792 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1793 * error. |
| 1794 * |
| 1795 * If the used [http.Client] completes with an error when making a REST call, |
| 1796 * this method will complete with the same error. |
| 1797 */ |
| 1798 async.Future delete(core.String id, {core.String onBehalfOfContentOwner, core.
String onBehalfOfContentOwnerChannel}) { |
| 1799 var _url = null; |
| 1800 var _queryParams = new core.Map(); |
| 1801 var _uploadMedia = null; |
| 1802 var _uploadOptions = null; |
| 1803 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1804 var _body = null; |
| 1805 |
| 1806 if (id == null) { |
| 1807 throw new core.ArgumentError("Parameter id is required."); |
| 1808 } |
| 1809 _queryParams["id"] = [id]; |
| 1810 if (onBehalfOfContentOwner != null) { |
| 1811 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1812 } |
| 1813 if (onBehalfOfContentOwnerChannel != null) { |
| 1814 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1815 } |
| 1816 |
| 1817 _downloadOptions = null; |
| 1818 |
| 1819 _url = 'liveStreams'; |
| 1820 |
| 1821 var _response = _requester.request(_url, |
| 1822 "DELETE", |
| 1823 body: _body, |
| 1824 queryParams: _queryParams, |
| 1825 uploadOptions: _uploadOptions, |
| 1826 uploadMedia: _uploadMedia, |
| 1827 downloadOptions: _downloadOptions); |
| 1828 return _response.then((data) => null); |
| 1829 } |
| 1830 |
| 1831 /** |
| 1832 * Creates a video stream. The stream enables you to send your video to |
| 1833 * YouTube, which can then broadcast the video to your audience. |
| 1834 * |
| 1835 * [request] - The metadata request object. |
| 1836 * |
| 1837 * Request parameters: |
| 1838 * |
| 1839 * [part] - The part parameter serves two purposes in this operation. It |
| 1840 * identifies the properties that the write operation will set as well as the |
| 1841 * properties that the API response will include. |
| 1842 * |
| 1843 * The part properties that you can include in the parameter value are id, |
| 1844 * snippet, cdn, and status. |
| 1845 * |
| 1846 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1847 * YouTube content partners. |
| 1848 * |
| 1849 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1850 * authorization credentials identify a YouTube CMS user who is acting on |
| 1851 * behalf of the content owner specified in the parameter value. This |
| 1852 * parameter is intended for YouTube content partners that own and manage many |
| 1853 * different YouTube channels. It allows content owners to authenticate once |
| 1854 * and get access to all their video and channel data, without having to |
| 1855 * provide authentication credentials for each individual channel. The CMS |
| 1856 * account that the user authenticates with must be linked to the specified |
| 1857 * YouTube content owner. |
| 1858 * |
| 1859 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1860 * properly authorized request. Note: This parameter is intended exclusively |
| 1861 * for YouTube content partners. |
| 1862 * |
| 1863 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1864 * ID of the channel to which a video is being added. This parameter is |
| 1865 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1866 * parameter, and it can only be used in conjunction with that parameter. In |
| 1867 * addition, the request must be authorized using a CMS account that is linked |
| 1868 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1869 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1870 * specifies must be linked to the content owner that the |
| 1871 * onBehalfOfContentOwner parameter specifies. |
| 1872 * |
| 1873 * This parameter is intended for YouTube content partners that own and manage |
| 1874 * many different YouTube channels. It allows content owners to authenticate |
| 1875 * once and perform actions on behalf of the channel specified in the |
| 1876 * parameter value, without having to provide authentication credentials for |
| 1877 * each separate channel. |
| 1878 * |
| 1879 * Completes with a [LiveStream]. |
| 1880 * |
| 1881 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1882 * error. |
| 1883 * |
| 1884 * If the used [http.Client] completes with an error when making a REST call, |
| 1885 * this method will complete with the same error. |
| 1886 */ |
| 1887 async.Future<LiveStream> insert(LiveStream request, core.String part, {core.St
ring onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel}) { |
| 1888 var _url = null; |
| 1889 var _queryParams = new core.Map(); |
| 1890 var _uploadMedia = null; |
| 1891 var _uploadOptions = null; |
| 1892 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1893 var _body = null; |
| 1894 |
| 1895 if (request != null) { |
| 1896 _body = convert.JSON.encode((request).toJson()); |
| 1897 } |
| 1898 if (part == null) { |
| 1899 throw new core.ArgumentError("Parameter part is required."); |
| 1900 } |
| 1901 _queryParams["part"] = [part]; |
| 1902 if (onBehalfOfContentOwner != null) { |
| 1903 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 1904 } |
| 1905 if (onBehalfOfContentOwnerChannel != null) { |
| 1906 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 1907 } |
| 1908 |
| 1909 |
| 1910 _url = 'liveStreams'; |
| 1911 |
| 1912 var _response = _requester.request(_url, |
| 1913 "POST", |
| 1914 body: _body, |
| 1915 queryParams: _queryParams, |
| 1916 uploadOptions: _uploadOptions, |
| 1917 uploadMedia: _uploadMedia, |
| 1918 downloadOptions: _downloadOptions); |
| 1919 return _response.then((data) => new LiveStream.fromJson(data)); |
| 1920 } |
| 1921 |
| 1922 /** |
| 1923 * Returns a list of video streams that match the API request parameters. |
| 1924 * |
| 1925 * Request parameters: |
| 1926 * |
| 1927 * [part] - The part parameter specifies a comma-separated list of one or more |
| 1928 * liveStream resource properties that the API response will include. The part |
| 1929 * names that you can include in the parameter value are id, snippet, cdn, and |
| 1930 * status. |
| 1931 * |
| 1932 * [id] - The id parameter specifies a comma-separated list of YouTube stream |
| 1933 * IDs that identify the streams being retrieved. In a liveStream resource, |
| 1934 * the id property specifies the stream's ID. |
| 1935 * |
| 1936 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 1937 * items that should be returned in the result set. Acceptable values are 0 to |
| 1938 * 50, inclusive. The default value is 5. |
| 1939 * Value must be between "0" and "50". |
| 1940 * |
| 1941 * [mine] - The mine parameter can be used to instruct the API to only return |
| 1942 * streams owned by the authenticated user. Set the parameter value to true to |
| 1943 * only retrieve your own streams. |
| 1944 * |
| 1945 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 1946 * YouTube content partners. |
| 1947 * |
| 1948 * The onBehalfOfContentOwner parameter indicates that the request's |
| 1949 * authorization credentials identify a YouTube CMS user who is acting on |
| 1950 * behalf of the content owner specified in the parameter value. This |
| 1951 * parameter is intended for YouTube content partners that own and manage many |
| 1952 * different YouTube channels. It allows content owners to authenticate once |
| 1953 * and get access to all their video and channel data, without having to |
| 1954 * provide authentication credentials for each individual channel. The CMS |
| 1955 * account that the user authenticates with must be linked to the specified |
| 1956 * YouTube content owner. |
| 1957 * |
| 1958 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 1959 * properly authorized request. Note: This parameter is intended exclusively |
| 1960 * for YouTube content partners. |
| 1961 * |
| 1962 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 1963 * ID of the channel to which a video is being added. This parameter is |
| 1964 * required when a request specifies a value for the onBehalfOfContentOwner |
| 1965 * parameter, and it can only be used in conjunction with that parameter. In |
| 1966 * addition, the request must be authorized using a CMS account that is linked |
| 1967 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 1968 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 1969 * specifies must be linked to the content owner that the |
| 1970 * onBehalfOfContentOwner parameter specifies. |
| 1971 * |
| 1972 * This parameter is intended for YouTube content partners that own and manage |
| 1973 * many different YouTube channels. It allows content owners to authenticate |
| 1974 * once and perform actions on behalf of the channel specified in the |
| 1975 * parameter value, without having to provide authentication credentials for |
| 1976 * each separate channel. |
| 1977 * |
| 1978 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 1979 * result set that should be returned. In an API response, the nextPageToken |
| 1980 * and prevPageToken properties identify other pages that could be retrieved. |
| 1981 * |
| 1982 * Completes with a [LiveStreamListResponse]. |
| 1983 * |
| 1984 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1985 * error. |
| 1986 * |
| 1987 * If the used [http.Client] completes with an error when making a REST call, |
| 1988 * this method will complete with the same error. |
| 1989 */ |
| 1990 async.Future<LiveStreamListResponse> list(core.String part, {core.String id, c
ore.int maxResults, core.bool mine, core.String onBehalfOfContentOwner, core.Str
ing onBehalfOfContentOwnerChannel, core.String pageToken}) { |
| 1991 var _url = null; |
| 1992 var _queryParams = new core.Map(); |
| 1993 var _uploadMedia = null; |
| 1994 var _uploadOptions = null; |
| 1995 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1996 var _body = null; |
| 1997 |
| 1998 if (part == null) { |
| 1999 throw new core.ArgumentError("Parameter part is required."); |
| 2000 } |
| 2001 _queryParams["part"] = [part]; |
| 2002 if (id != null) { |
| 2003 _queryParams["id"] = [id]; |
| 2004 } |
| 2005 if (maxResults != null) { |
| 2006 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2007 } |
| 2008 if (mine != null) { |
| 2009 _queryParams["mine"] = ["${mine}"]; |
| 2010 } |
| 2011 if (onBehalfOfContentOwner != null) { |
| 2012 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2013 } |
| 2014 if (onBehalfOfContentOwnerChannel != null) { |
| 2015 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 2016 } |
| 2017 if (pageToken != null) { |
| 2018 _queryParams["pageToken"] = [pageToken]; |
| 2019 } |
| 2020 |
| 2021 |
| 2022 _url = 'liveStreams'; |
| 2023 |
| 2024 var _response = _requester.request(_url, |
| 2025 "GET", |
| 2026 body: _body, |
| 2027 queryParams: _queryParams, |
| 2028 uploadOptions: _uploadOptions, |
| 2029 uploadMedia: _uploadMedia, |
| 2030 downloadOptions: _downloadOptions); |
| 2031 return _response.then((data) => new LiveStreamListResponse.fromJson(data)); |
| 2032 } |
| 2033 |
| 2034 /** |
| 2035 * Updates a video stream. If the properties that you want to change cannot be |
| 2036 * updated, then you need to create a new stream with the proper settings. |
| 2037 * |
| 2038 * [request] - The metadata request object. |
| 2039 * |
| 2040 * Request parameters: |
| 2041 * |
| 2042 * [part] - The part parameter serves two purposes in this operation. It |
| 2043 * identifies the properties that the write operation will set as well as the |
| 2044 * properties that the API response will include. |
| 2045 * |
| 2046 * The part properties that you can include in the parameter value are id, |
| 2047 * snippet, cdn, and status. |
| 2048 * |
| 2049 * Note that this method will override the existing values for all of the |
| 2050 * mutable properties that are contained in any parts that the parameter value |
| 2051 * specifies. If the request body does not specify a value for a mutable |
| 2052 * property, the existing value for that property will be removed. |
| 2053 * |
| 2054 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2055 * YouTube content partners. |
| 2056 * |
| 2057 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2058 * authorization credentials identify a YouTube CMS user who is acting on |
| 2059 * behalf of the content owner specified in the parameter value. This |
| 2060 * parameter is intended for YouTube content partners that own and manage many |
| 2061 * different YouTube channels. It allows content owners to authenticate once |
| 2062 * and get access to all their video and channel data, without having to |
| 2063 * provide authentication credentials for each individual channel. The CMS |
| 2064 * account that the user authenticates with must be linked to the specified |
| 2065 * YouTube content owner. |
| 2066 * |
| 2067 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 2068 * properly authorized request. Note: This parameter is intended exclusively |
| 2069 * for YouTube content partners. |
| 2070 * |
| 2071 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 2072 * ID of the channel to which a video is being added. This parameter is |
| 2073 * required when a request specifies a value for the onBehalfOfContentOwner |
| 2074 * parameter, and it can only be used in conjunction with that parameter. In |
| 2075 * addition, the request must be authorized using a CMS account that is linked |
| 2076 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 2077 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 2078 * specifies must be linked to the content owner that the |
| 2079 * onBehalfOfContentOwner parameter specifies. |
| 2080 * |
| 2081 * This parameter is intended for YouTube content partners that own and manage |
| 2082 * many different YouTube channels. It allows content owners to authenticate |
| 2083 * once and perform actions on behalf of the channel specified in the |
| 2084 * parameter value, without having to provide authentication credentials for |
| 2085 * each separate channel. |
| 2086 * |
| 2087 * Completes with a [LiveStream]. |
| 2088 * |
| 2089 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2090 * error. |
| 2091 * |
| 2092 * If the used [http.Client] completes with an error when making a REST call, |
| 2093 * this method will complete with the same error. |
| 2094 */ |
| 2095 async.Future<LiveStream> update(LiveStream request, core.String part, {core.St
ring onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel}) { |
| 2096 var _url = null; |
| 2097 var _queryParams = new core.Map(); |
| 2098 var _uploadMedia = null; |
| 2099 var _uploadOptions = null; |
| 2100 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2101 var _body = null; |
| 2102 |
| 2103 if (request != null) { |
| 2104 _body = convert.JSON.encode((request).toJson()); |
| 2105 } |
| 2106 if (part == null) { |
| 2107 throw new core.ArgumentError("Parameter part is required."); |
| 2108 } |
| 2109 _queryParams["part"] = [part]; |
| 2110 if (onBehalfOfContentOwner != null) { |
| 2111 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2112 } |
| 2113 if (onBehalfOfContentOwnerChannel != null) { |
| 2114 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 2115 } |
| 2116 |
| 2117 |
| 2118 _url = 'liveStreams'; |
| 2119 |
| 2120 var _response = _requester.request(_url, |
| 2121 "PUT", |
| 2122 body: _body, |
| 2123 queryParams: _queryParams, |
| 2124 uploadOptions: _uploadOptions, |
| 2125 uploadMedia: _uploadMedia, |
| 2126 downloadOptions: _downloadOptions); |
| 2127 return _response.then((data) => new LiveStream.fromJson(data)); |
| 2128 } |
| 2129 |
| 2130 } |
| 2131 |
| 2132 |
| 2133 /** Not documented yet. */ |
| 2134 class PlaylistItemsResourceApi { |
| 2135 final common_internal.ApiRequester _requester; |
| 2136 |
| 2137 PlaylistItemsResourceApi(common_internal.ApiRequester client) : |
| 2138 _requester = client; |
| 2139 |
| 2140 /** |
| 2141 * Deletes a playlist item. |
| 2142 * |
| 2143 * Request parameters: |
| 2144 * |
| 2145 * [id] - The id parameter specifies the YouTube playlist item ID for the |
| 2146 * playlist item that is being deleted. In a playlistItem resource, the id |
| 2147 * property specifies the playlist item's ID. |
| 2148 * |
| 2149 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2150 * error. |
| 2151 * |
| 2152 * If the used [http.Client] completes with an error when making a REST call, |
| 2153 * this method will complete with the same error. |
| 2154 */ |
| 2155 async.Future delete(core.String id) { |
| 2156 var _url = null; |
| 2157 var _queryParams = new core.Map(); |
| 2158 var _uploadMedia = null; |
| 2159 var _uploadOptions = null; |
| 2160 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2161 var _body = null; |
| 2162 |
| 2163 if (id == null) { |
| 2164 throw new core.ArgumentError("Parameter id is required."); |
| 2165 } |
| 2166 _queryParams["id"] = [id]; |
| 2167 |
| 2168 _downloadOptions = null; |
| 2169 |
| 2170 _url = 'playlistItems'; |
| 2171 |
| 2172 var _response = _requester.request(_url, |
| 2173 "DELETE", |
| 2174 body: _body, |
| 2175 queryParams: _queryParams, |
| 2176 uploadOptions: _uploadOptions, |
| 2177 uploadMedia: _uploadMedia, |
| 2178 downloadOptions: _downloadOptions); |
| 2179 return _response.then((data) => null); |
| 2180 } |
| 2181 |
| 2182 /** |
| 2183 * Adds a resource to a playlist. |
| 2184 * |
| 2185 * [request] - The metadata request object. |
| 2186 * |
| 2187 * Request parameters: |
| 2188 * |
| 2189 * [part] - The part parameter serves two purposes in this operation. It |
| 2190 * identifies the properties that the write operation will set as well as the |
| 2191 * properties that the API response will include. |
| 2192 * |
| 2193 * The part names that you can include in the parameter value are snippet, |
| 2194 * contentDetails, and status. |
| 2195 * |
| 2196 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2197 * YouTube content partners. |
| 2198 * |
| 2199 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2200 * authorization credentials identify a YouTube CMS user who is acting on |
| 2201 * behalf of the content owner specified in the parameter value. This |
| 2202 * parameter is intended for YouTube content partners that own and manage many |
| 2203 * different YouTube channels. It allows content owners to authenticate once |
| 2204 * and get access to all their video and channel data, without having to |
| 2205 * provide authentication credentials for each individual channel. The CMS |
| 2206 * account that the user authenticates with must be linked to the specified |
| 2207 * YouTube content owner. |
| 2208 * |
| 2209 * Completes with a [PlaylistItem]. |
| 2210 * |
| 2211 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2212 * error. |
| 2213 * |
| 2214 * If the used [http.Client] completes with an error when making a REST call, |
| 2215 * this method will complete with the same error. |
| 2216 */ |
| 2217 async.Future<PlaylistItem> insert(PlaylistItem request, core.String part, {cor
e.String onBehalfOfContentOwner}) { |
| 2218 var _url = null; |
| 2219 var _queryParams = new core.Map(); |
| 2220 var _uploadMedia = null; |
| 2221 var _uploadOptions = null; |
| 2222 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2223 var _body = null; |
| 2224 |
| 2225 if (request != null) { |
| 2226 _body = convert.JSON.encode((request).toJson()); |
| 2227 } |
| 2228 if (part == null) { |
| 2229 throw new core.ArgumentError("Parameter part is required."); |
| 2230 } |
| 2231 _queryParams["part"] = [part]; |
| 2232 if (onBehalfOfContentOwner != null) { |
| 2233 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2234 } |
| 2235 |
| 2236 |
| 2237 _url = 'playlistItems'; |
| 2238 |
| 2239 var _response = _requester.request(_url, |
| 2240 "POST", |
| 2241 body: _body, |
| 2242 queryParams: _queryParams, |
| 2243 uploadOptions: _uploadOptions, |
| 2244 uploadMedia: _uploadMedia, |
| 2245 downloadOptions: _downloadOptions); |
| 2246 return _response.then((data) => new PlaylistItem.fromJson(data)); |
| 2247 } |
| 2248 |
| 2249 /** |
| 2250 * Returns a collection of playlist items that match the API request |
| 2251 * parameters. You can retrieve all of the playlist items in a specified |
| 2252 * playlist or retrieve one or more playlist items by their unique IDs. |
| 2253 * |
| 2254 * Request parameters: |
| 2255 * |
| 2256 * [part] - The part parameter specifies a comma-separated list of one or more |
| 2257 * playlistItem resource properties that the API response will include. The |
| 2258 * part names that you can include in the parameter value are id, snippet, |
| 2259 * contentDetails, and status. |
| 2260 * |
| 2261 * If the parameter identifies a property that contains child properties, the |
| 2262 * child properties will be included in the response. For example, in a |
| 2263 * playlistItem resource, the snippet property contains numerous fields, |
| 2264 * including the title, description, position, and resourceId properties. As |
| 2265 * such, if you set part=snippet, the API response will contain all of those |
| 2266 * properties. |
| 2267 * |
| 2268 * [id] - The id parameter specifies a comma-separated list of one or more |
| 2269 * unique playlist item IDs. |
| 2270 * |
| 2271 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 2272 * items that should be returned in the result set. |
| 2273 * Value must be between "0" and "50". |
| 2274 * |
| 2275 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2276 * YouTube content partners. |
| 2277 * |
| 2278 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2279 * authorization credentials identify a YouTube CMS user who is acting on |
| 2280 * behalf of the content owner specified in the parameter value. This |
| 2281 * parameter is intended for YouTube content partners that own and manage many |
| 2282 * different YouTube channels. It allows content owners to authenticate once |
| 2283 * and get access to all their video and channel data, without having to |
| 2284 * provide authentication credentials for each individual channel. The CMS |
| 2285 * account that the user authenticates with must be linked to the specified |
| 2286 * YouTube content owner. |
| 2287 * |
| 2288 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 2289 * result set that should be returned. In an API response, the nextPageToken |
| 2290 * and prevPageToken properties identify other pages that could be retrieved. |
| 2291 * |
| 2292 * [playlistId] - The playlistId parameter specifies the unique ID of the |
| 2293 * playlist for which you want to retrieve playlist items. Note that even |
| 2294 * though this is an optional parameter, every request to retrieve playlist |
| 2295 * items must specify a value for either the id parameter or the playlistId |
| 2296 * parameter. |
| 2297 * |
| 2298 * [videoId] - The videoId parameter specifies that the request should return |
| 2299 * only the playlist items that contain the specified video. |
| 2300 * |
| 2301 * Completes with a [PlaylistItemListResponse]. |
| 2302 * |
| 2303 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2304 * error. |
| 2305 * |
| 2306 * If the used [http.Client] completes with an error when making a REST call, |
| 2307 * this method will complete with the same error. |
| 2308 */ |
| 2309 async.Future<PlaylistItemListResponse> list(core.String part, {core.String id,
core.int maxResults, core.String onBehalfOfContentOwner, core.String pageToken,
core.String playlistId, core.String videoId}) { |
| 2310 var _url = null; |
| 2311 var _queryParams = new core.Map(); |
| 2312 var _uploadMedia = null; |
| 2313 var _uploadOptions = null; |
| 2314 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2315 var _body = null; |
| 2316 |
| 2317 if (part == null) { |
| 2318 throw new core.ArgumentError("Parameter part is required."); |
| 2319 } |
| 2320 _queryParams["part"] = [part]; |
| 2321 if (id != null) { |
| 2322 _queryParams["id"] = [id]; |
| 2323 } |
| 2324 if (maxResults != null) { |
| 2325 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2326 } |
| 2327 if (onBehalfOfContentOwner != null) { |
| 2328 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2329 } |
| 2330 if (pageToken != null) { |
| 2331 _queryParams["pageToken"] = [pageToken]; |
| 2332 } |
| 2333 if (playlistId != null) { |
| 2334 _queryParams["playlistId"] = [playlistId]; |
| 2335 } |
| 2336 if (videoId != null) { |
| 2337 _queryParams["videoId"] = [videoId]; |
| 2338 } |
| 2339 |
| 2340 |
| 2341 _url = 'playlistItems'; |
| 2342 |
| 2343 var _response = _requester.request(_url, |
| 2344 "GET", |
| 2345 body: _body, |
| 2346 queryParams: _queryParams, |
| 2347 uploadOptions: _uploadOptions, |
| 2348 uploadMedia: _uploadMedia, |
| 2349 downloadOptions: _downloadOptions); |
| 2350 return _response.then((data) => new PlaylistItemListResponse.fromJson(data))
; |
| 2351 } |
| 2352 |
| 2353 /** |
| 2354 * Modifies a playlist item. For example, you could update the item's position |
| 2355 * in the playlist. |
| 2356 * |
| 2357 * [request] - The metadata request object. |
| 2358 * |
| 2359 * Request parameters: |
| 2360 * |
| 2361 * [part] - The part parameter serves two purposes in this operation. It |
| 2362 * identifies the properties that the write operation will set as well as the |
| 2363 * properties that the API response will include. |
| 2364 * |
| 2365 * The part names that you can include in the parameter value are snippet, |
| 2366 * contentDetails, and status. |
| 2367 * |
| 2368 * Note that this method will override the existing values for all of the |
| 2369 * mutable properties that are contained in any parts that the parameter value |
| 2370 * specifies. For example, a playlist item can specify a start time and end |
| 2371 * time, which identify the times portion of the video that should play when |
| 2372 * users watch the video in the playlist. If your request is updating a |
| 2373 * playlist item that sets these values, and the request's part parameter |
| 2374 * value includes the contentDetails part, the playlist item's start and end |
| 2375 * times will be updated to whatever value the request body specifies. If the |
| 2376 * request body does not specify values, the existing start and end times will |
| 2377 * be removed and replaced with the default settings. |
| 2378 * |
| 2379 * Completes with a [PlaylistItem]. |
| 2380 * |
| 2381 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2382 * error. |
| 2383 * |
| 2384 * If the used [http.Client] completes with an error when making a REST call, |
| 2385 * this method will complete with the same error. |
| 2386 */ |
| 2387 async.Future<PlaylistItem> update(PlaylistItem request, core.String part) { |
| 2388 var _url = null; |
| 2389 var _queryParams = new core.Map(); |
| 2390 var _uploadMedia = null; |
| 2391 var _uploadOptions = null; |
| 2392 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2393 var _body = null; |
| 2394 |
| 2395 if (request != null) { |
| 2396 _body = convert.JSON.encode((request).toJson()); |
| 2397 } |
| 2398 if (part == null) { |
| 2399 throw new core.ArgumentError("Parameter part is required."); |
| 2400 } |
| 2401 _queryParams["part"] = [part]; |
| 2402 |
| 2403 |
| 2404 _url = 'playlistItems'; |
| 2405 |
| 2406 var _response = _requester.request(_url, |
| 2407 "PUT", |
| 2408 body: _body, |
| 2409 queryParams: _queryParams, |
| 2410 uploadOptions: _uploadOptions, |
| 2411 uploadMedia: _uploadMedia, |
| 2412 downloadOptions: _downloadOptions); |
| 2413 return _response.then((data) => new PlaylistItem.fromJson(data)); |
| 2414 } |
| 2415 |
| 2416 } |
| 2417 |
| 2418 |
| 2419 /** Not documented yet. */ |
| 2420 class PlaylistsResourceApi { |
| 2421 final common_internal.ApiRequester _requester; |
| 2422 |
| 2423 PlaylistsResourceApi(common_internal.ApiRequester client) : |
| 2424 _requester = client; |
| 2425 |
| 2426 /** |
| 2427 * Deletes a playlist. |
| 2428 * |
| 2429 * Request parameters: |
| 2430 * |
| 2431 * [id] - The id parameter specifies the YouTube playlist ID for the playlist |
| 2432 * that is being deleted. In a playlist resource, the id property specifies |
| 2433 * the playlist's ID. |
| 2434 * |
| 2435 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2436 * YouTube content partners. |
| 2437 * |
| 2438 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2439 * authorization credentials identify a YouTube CMS user who is acting on |
| 2440 * behalf of the content owner specified in the parameter value. This |
| 2441 * parameter is intended for YouTube content partners that own and manage many |
| 2442 * different YouTube channels. It allows content owners to authenticate once |
| 2443 * and get access to all their video and channel data, without having to |
| 2444 * provide authentication credentials for each individual channel. The CMS |
| 2445 * account that the user authenticates with must be linked to the specified |
| 2446 * YouTube content owner. |
| 2447 * |
| 2448 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2449 * error. |
| 2450 * |
| 2451 * If the used [http.Client] completes with an error when making a REST call, |
| 2452 * this method will complete with the same error. |
| 2453 */ |
| 2454 async.Future delete(core.String id, {core.String onBehalfOfContentOwner}) { |
| 2455 var _url = null; |
| 2456 var _queryParams = new core.Map(); |
| 2457 var _uploadMedia = null; |
| 2458 var _uploadOptions = null; |
| 2459 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2460 var _body = null; |
| 2461 |
| 2462 if (id == null) { |
| 2463 throw new core.ArgumentError("Parameter id is required."); |
| 2464 } |
| 2465 _queryParams["id"] = [id]; |
| 2466 if (onBehalfOfContentOwner != null) { |
| 2467 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2468 } |
| 2469 |
| 2470 _downloadOptions = null; |
| 2471 |
| 2472 _url = 'playlists'; |
| 2473 |
| 2474 var _response = _requester.request(_url, |
| 2475 "DELETE", |
| 2476 body: _body, |
| 2477 queryParams: _queryParams, |
| 2478 uploadOptions: _uploadOptions, |
| 2479 uploadMedia: _uploadMedia, |
| 2480 downloadOptions: _downloadOptions); |
| 2481 return _response.then((data) => null); |
| 2482 } |
| 2483 |
| 2484 /** |
| 2485 * Creates a playlist. |
| 2486 * |
| 2487 * [request] - The metadata request object. |
| 2488 * |
| 2489 * Request parameters: |
| 2490 * |
| 2491 * [part] - The part parameter serves two purposes in this operation. It |
| 2492 * identifies the properties that the write operation will set as well as the |
| 2493 * properties that the API response will include. |
| 2494 * |
| 2495 * The part names that you can include in the parameter value are snippet and |
| 2496 * status. |
| 2497 * |
| 2498 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2499 * YouTube content partners. |
| 2500 * |
| 2501 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2502 * authorization credentials identify a YouTube CMS user who is acting on |
| 2503 * behalf of the content owner specified in the parameter value. This |
| 2504 * parameter is intended for YouTube content partners that own and manage many |
| 2505 * different YouTube channels. It allows content owners to authenticate once |
| 2506 * and get access to all their video and channel data, without having to |
| 2507 * provide authentication credentials for each individual channel. The CMS |
| 2508 * account that the user authenticates with must be linked to the specified |
| 2509 * YouTube content owner. |
| 2510 * |
| 2511 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 2512 * properly authorized request. Note: This parameter is intended exclusively |
| 2513 * for YouTube content partners. |
| 2514 * |
| 2515 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 2516 * ID of the channel to which a video is being added. This parameter is |
| 2517 * required when a request specifies a value for the onBehalfOfContentOwner |
| 2518 * parameter, and it can only be used in conjunction with that parameter. In |
| 2519 * addition, the request must be authorized using a CMS account that is linked |
| 2520 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 2521 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 2522 * specifies must be linked to the content owner that the |
| 2523 * onBehalfOfContentOwner parameter specifies. |
| 2524 * |
| 2525 * This parameter is intended for YouTube content partners that own and manage |
| 2526 * many different YouTube channels. It allows content owners to authenticate |
| 2527 * once and perform actions on behalf of the channel specified in the |
| 2528 * parameter value, without having to provide authentication credentials for |
| 2529 * each separate channel. |
| 2530 * |
| 2531 * Completes with a [Playlist]. |
| 2532 * |
| 2533 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2534 * error. |
| 2535 * |
| 2536 * If the used [http.Client] completes with an error when making a REST call, |
| 2537 * this method will complete with the same error. |
| 2538 */ |
| 2539 async.Future<Playlist> insert(Playlist request, core.String part, {core.String
onBehalfOfContentOwner, core.String onBehalfOfContentOwnerChannel}) { |
| 2540 var _url = null; |
| 2541 var _queryParams = new core.Map(); |
| 2542 var _uploadMedia = null; |
| 2543 var _uploadOptions = null; |
| 2544 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2545 var _body = null; |
| 2546 |
| 2547 if (request != null) { |
| 2548 _body = convert.JSON.encode((request).toJson()); |
| 2549 } |
| 2550 if (part == null) { |
| 2551 throw new core.ArgumentError("Parameter part is required."); |
| 2552 } |
| 2553 _queryParams["part"] = [part]; |
| 2554 if (onBehalfOfContentOwner != null) { |
| 2555 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2556 } |
| 2557 if (onBehalfOfContentOwnerChannel != null) { |
| 2558 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 2559 } |
| 2560 |
| 2561 |
| 2562 _url = 'playlists'; |
| 2563 |
| 2564 var _response = _requester.request(_url, |
| 2565 "POST", |
| 2566 body: _body, |
| 2567 queryParams: _queryParams, |
| 2568 uploadOptions: _uploadOptions, |
| 2569 uploadMedia: _uploadMedia, |
| 2570 downloadOptions: _downloadOptions); |
| 2571 return _response.then((data) => new Playlist.fromJson(data)); |
| 2572 } |
| 2573 |
| 2574 /** |
| 2575 * Returns a collection of playlists that match the API request parameters. |
| 2576 * For example, you can retrieve all playlists that the authenticated user |
| 2577 * owns, or you can retrieve one or more playlists by their unique IDs. |
| 2578 * |
| 2579 * Request parameters: |
| 2580 * |
| 2581 * [part] - The part parameter specifies a comma-separated list of one or more |
| 2582 * playlist resource properties that the API response will include. The part |
| 2583 * names that you can include in the parameter value are id, snippet, status, |
| 2584 * and contentDetails. |
| 2585 * |
| 2586 * If the parameter identifies a property that contains child properties, the |
| 2587 * child properties will be included in the response. For example, in a |
| 2588 * playlist resource, the snippet property contains properties like author, |
| 2589 * title, description, tags, and timeCreated. As such, if you set |
| 2590 * part=snippet, the API response will contain all of those properties. |
| 2591 * |
| 2592 * [channelId] - This value indicates that the API should only return the |
| 2593 * specified channel's playlists. |
| 2594 * |
| 2595 * [id] - The id parameter specifies a comma-separated list of the YouTube |
| 2596 * playlist ID(s) for the resource(s) that are being retrieved. In a playlist |
| 2597 * resource, the id property specifies the playlist's YouTube playlist ID. |
| 2598 * |
| 2599 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 2600 * items that should be returned in the result set. |
| 2601 * Value must be between "0" and "50". |
| 2602 * |
| 2603 * [mine] - Set this parameter's value to true to instruct the API to only |
| 2604 * return playlists owned by the authenticated user. |
| 2605 * |
| 2606 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2607 * YouTube content partners. |
| 2608 * |
| 2609 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2610 * authorization credentials identify a YouTube CMS user who is acting on |
| 2611 * behalf of the content owner specified in the parameter value. This |
| 2612 * parameter is intended for YouTube content partners that own and manage many |
| 2613 * different YouTube channels. It allows content owners to authenticate once |
| 2614 * and get access to all their video and channel data, without having to |
| 2615 * provide authentication credentials for each individual channel. The CMS |
| 2616 * account that the user authenticates with must be linked to the specified |
| 2617 * YouTube content owner. |
| 2618 * |
| 2619 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 2620 * properly authorized request. Note: This parameter is intended exclusively |
| 2621 * for YouTube content partners. |
| 2622 * |
| 2623 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 2624 * ID of the channel to which a video is being added. This parameter is |
| 2625 * required when a request specifies a value for the onBehalfOfContentOwner |
| 2626 * parameter, and it can only be used in conjunction with that parameter. In |
| 2627 * addition, the request must be authorized using a CMS account that is linked |
| 2628 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 2629 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 2630 * specifies must be linked to the content owner that the |
| 2631 * onBehalfOfContentOwner parameter specifies. |
| 2632 * |
| 2633 * This parameter is intended for YouTube content partners that own and manage |
| 2634 * many different YouTube channels. It allows content owners to authenticate |
| 2635 * once and perform actions on behalf of the channel specified in the |
| 2636 * parameter value, without having to provide authentication credentials for |
| 2637 * each separate channel. |
| 2638 * |
| 2639 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 2640 * result set that should be returned. In an API response, the nextPageToken |
| 2641 * and prevPageToken properties identify other pages that could be retrieved. |
| 2642 * |
| 2643 * Completes with a [PlaylistListResponse]. |
| 2644 * |
| 2645 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2646 * error. |
| 2647 * |
| 2648 * If the used [http.Client] completes with an error when making a REST call, |
| 2649 * this method will complete with the same error. |
| 2650 */ |
| 2651 async.Future<PlaylistListResponse> list(core.String part, {core.String channel
Id, core.String id, core.int maxResults, core.bool mine, core.String onBehalfOfC
ontentOwner, core.String onBehalfOfContentOwnerChannel, core.String pageToken})
{ |
| 2652 var _url = null; |
| 2653 var _queryParams = new core.Map(); |
| 2654 var _uploadMedia = null; |
| 2655 var _uploadOptions = null; |
| 2656 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2657 var _body = null; |
| 2658 |
| 2659 if (part == null) { |
| 2660 throw new core.ArgumentError("Parameter part is required."); |
| 2661 } |
| 2662 _queryParams["part"] = [part]; |
| 2663 if (channelId != null) { |
| 2664 _queryParams["channelId"] = [channelId]; |
| 2665 } |
| 2666 if (id != null) { |
| 2667 _queryParams["id"] = [id]; |
| 2668 } |
| 2669 if (maxResults != null) { |
| 2670 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2671 } |
| 2672 if (mine != null) { |
| 2673 _queryParams["mine"] = ["${mine}"]; |
| 2674 } |
| 2675 if (onBehalfOfContentOwner != null) { |
| 2676 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2677 } |
| 2678 if (onBehalfOfContentOwnerChannel != null) { |
| 2679 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 2680 } |
| 2681 if (pageToken != null) { |
| 2682 _queryParams["pageToken"] = [pageToken]; |
| 2683 } |
| 2684 |
| 2685 |
| 2686 _url = 'playlists'; |
| 2687 |
| 2688 var _response = _requester.request(_url, |
| 2689 "GET", |
| 2690 body: _body, |
| 2691 queryParams: _queryParams, |
| 2692 uploadOptions: _uploadOptions, |
| 2693 uploadMedia: _uploadMedia, |
| 2694 downloadOptions: _downloadOptions); |
| 2695 return _response.then((data) => new PlaylistListResponse.fromJson(data)); |
| 2696 } |
| 2697 |
| 2698 /** |
| 2699 * Modifies a playlist. For example, you could change a playlist's title, |
| 2700 * description, or privacy status. |
| 2701 * |
| 2702 * [request] - The metadata request object. |
| 2703 * |
| 2704 * Request parameters: |
| 2705 * |
| 2706 * [part] - The part parameter serves two purposes in this operation. It |
| 2707 * identifies the properties that the write operation will set as well as the |
| 2708 * properties that the API response will include. |
| 2709 * |
| 2710 * The part names that you can include in the parameter value are snippet and |
| 2711 * status. |
| 2712 * |
| 2713 * Note that this method will override the existing values for all of the |
| 2714 * mutable properties that are contained in any parts that the parameter value |
| 2715 * specifies. For example, a playlist's privacy setting is contained in the |
| 2716 * status part. As such, if your request is updating a private playlist, and |
| 2717 * the request's part parameter value includes the status part, the playlist's |
| 2718 * privacy setting will be updated to whatever value the request body |
| 2719 * specifies. If the request body does not specify a value, the existing |
| 2720 * privacy setting will be removed and the playlist will revert to the default |
| 2721 * privacy setting. |
| 2722 * |
| 2723 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2724 * YouTube content partners. |
| 2725 * |
| 2726 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2727 * authorization credentials identify a YouTube CMS user who is acting on |
| 2728 * behalf of the content owner specified in the parameter value. This |
| 2729 * parameter is intended for YouTube content partners that own and manage many |
| 2730 * different YouTube channels. It allows content owners to authenticate once |
| 2731 * and get access to all their video and channel data, without having to |
| 2732 * provide authentication credentials for each individual channel. The CMS |
| 2733 * account that the user authenticates with must be linked to the specified |
| 2734 * YouTube content owner. |
| 2735 * |
| 2736 * Completes with a [Playlist]. |
| 2737 * |
| 2738 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2739 * error. |
| 2740 * |
| 2741 * If the used [http.Client] completes with an error when making a REST call, |
| 2742 * this method will complete with the same error. |
| 2743 */ |
| 2744 async.Future<Playlist> update(Playlist request, core.String part, {core.String
onBehalfOfContentOwner}) { |
| 2745 var _url = null; |
| 2746 var _queryParams = new core.Map(); |
| 2747 var _uploadMedia = null; |
| 2748 var _uploadOptions = null; |
| 2749 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2750 var _body = null; |
| 2751 |
| 2752 if (request != null) { |
| 2753 _body = convert.JSON.encode((request).toJson()); |
| 2754 } |
| 2755 if (part == null) { |
| 2756 throw new core.ArgumentError("Parameter part is required."); |
| 2757 } |
| 2758 _queryParams["part"] = [part]; |
| 2759 if (onBehalfOfContentOwner != null) { |
| 2760 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 2761 } |
| 2762 |
| 2763 |
| 2764 _url = 'playlists'; |
| 2765 |
| 2766 var _response = _requester.request(_url, |
| 2767 "PUT", |
| 2768 body: _body, |
| 2769 queryParams: _queryParams, |
| 2770 uploadOptions: _uploadOptions, |
| 2771 uploadMedia: _uploadMedia, |
| 2772 downloadOptions: _downloadOptions); |
| 2773 return _response.then((data) => new Playlist.fromJson(data)); |
| 2774 } |
| 2775 |
| 2776 } |
| 2777 |
| 2778 |
| 2779 /** Not documented yet. */ |
| 2780 class SearchResourceApi { |
| 2781 final common_internal.ApiRequester _requester; |
| 2782 |
| 2783 SearchResourceApi(common_internal.ApiRequester client) : |
| 2784 _requester = client; |
| 2785 |
| 2786 /** |
| 2787 * Returns a collection of search results that match the query parameters |
| 2788 * specified in the API request. By default, a search result set identifies |
| 2789 * matching video, channel, and playlist resources, but you can also configure |
| 2790 * queries to only retrieve a specific type of resource. |
| 2791 * |
| 2792 * Request parameters: |
| 2793 * |
| 2794 * [part] - The part parameter specifies a comma-separated list of one or more |
| 2795 * search resource properties that the API response will include. The part |
| 2796 * names that you can include in the parameter value are id and snippet. |
| 2797 * |
| 2798 * If the parameter identifies a property that contains child properties, the |
| 2799 * child properties will be included in the response. For example, in a search |
| 2800 * result, the snippet property contains other properties that identify the |
| 2801 * result's title, description, and so forth. If you set part=snippet, the API |
| 2802 * response will also contain all of those nested properties. |
| 2803 * |
| 2804 * [channelId] - The channelId parameter indicates that the API response |
| 2805 * should only contain resources created by the channel |
| 2806 * |
| 2807 * [channelType] - The channelType parameter lets you restrict a search to a |
| 2808 * particular type of channel. |
| 2809 * Possible string values are: |
| 2810 * - "any" : Return all channels. |
| 2811 * - "show" : Only retrieve shows. |
| 2812 * |
| 2813 * [eventType] - The eventType parameter restricts a search to broadcast |
| 2814 * events. |
| 2815 * Possible string values are: |
| 2816 * - "completed" : Only include completed broadcasts. |
| 2817 * - "live" : Only include active broadcasts. |
| 2818 * - "upcoming" : Only include upcoming broadcasts. |
| 2819 * |
| 2820 * [forContentOwner] - Note: This parameter is intended exclusively for |
| 2821 * YouTube content partners. |
| 2822 * |
| 2823 * The forContentOwner parameter restricts the search to only retrieve |
| 2824 * resources owned by the content owner specified by the |
| 2825 * onBehalfOfContentOwner parameter. The user must be authenticated using a |
| 2826 * CMS account linked to the specified content owner and |
| 2827 * onBehalfOfContentOwner must be provided. |
| 2828 * |
| 2829 * [forMine] - The forMine parameter restricts the search to only retrieve |
| 2830 * videos owned by the authenticated user. If you set this parameter to true, |
| 2831 * then the type parameter's value must also be set to video. |
| 2832 * |
| 2833 * [location] - The location parameter restricts a search to videos that have |
| 2834 * a geographical location specified in their metadata. The value is a string |
| 2835 * that specifies geographic latitude/longitude coordinates e.g. |
| 2836 * (37.42307,-122.08427) |
| 2837 * |
| 2838 * [locationRadius] - The locationRadius, in conjunction with the location |
| 2839 * parameter, defines a geographic area. If the geographic coordinates |
| 2840 * associated with a video fall within that area, then the video may be |
| 2841 * included in search results. This parameter value must be a floating point |
| 2842 * number followed by a measurement unit. Valid measurement units are m, km, |
| 2843 * ft, and mi. For example, valid parameter values include 1500m, 5km, |
| 2844 * 10000ft, and 0.75mi. The API does not support locationRadius parameter |
| 2845 * values larger than 1000 kilometers. |
| 2846 * |
| 2847 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 2848 * items that should be returned in the result set. |
| 2849 * Value must be between "0" and "50". |
| 2850 * |
| 2851 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 2852 * YouTube content partners. |
| 2853 * |
| 2854 * The onBehalfOfContentOwner parameter indicates that the request's |
| 2855 * authorization credentials identify a YouTube CMS user who is acting on |
| 2856 * behalf of the content owner specified in the parameter value. This |
| 2857 * parameter is intended for YouTube content partners that own and manage many |
| 2858 * different YouTube channels. It allows content owners to authenticate once |
| 2859 * and get access to all their video and channel data, without having to |
| 2860 * provide authentication credentials for each individual channel. The CMS |
| 2861 * account that the user authenticates with must be linked to the specified |
| 2862 * YouTube content owner. |
| 2863 * |
| 2864 * [order] - The order parameter specifies the method that will be used to |
| 2865 * order resources in the API response. |
| 2866 * Possible string values are: |
| 2867 * - "date" : Resources are sorted in reverse chronological order based on the |
| 2868 * date they were created. |
| 2869 * - "rating" : Resources are sorted from highest to lowest rating. |
| 2870 * - "relevance" : Resources are sorted based on their relevance to the search |
| 2871 * query. This is the default value for this parameter. |
| 2872 * - "title" : Resources are sorted alphabetically by title. |
| 2873 * - "videoCount" : Channels are sorted in descending order of their number of |
| 2874 * uploaded videos. |
| 2875 * - "viewCount" : Resources are sorted from highest to lowest number of |
| 2876 * views. |
| 2877 * |
| 2878 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 2879 * result set that should be returned. In an API response, the nextPageToken |
| 2880 * and prevPageToken properties identify other pages that could be retrieved. |
| 2881 * |
| 2882 * [publishedAfter] - The publishedAfter parameter indicates that the API |
| 2883 * response should only contain resources created after the specified time. |
| 2884 * The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). |
| 2885 * |
| 2886 * [publishedBefore] - The publishedBefore parameter indicates that the API |
| 2887 * response should only contain resources created before the specified time. |
| 2888 * The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). |
| 2889 * |
| 2890 * [q] - The q parameter specifies the query term to search for. |
| 2891 * |
| 2892 * [regionCode] - The regionCode parameter instructs the API to return search |
| 2893 * results for the specified country. The parameter value is an ISO 3166-1 |
| 2894 * alpha-2 country code. |
| 2895 * |
| 2896 * [relatedToVideoId] - The relatedToVideoId parameter retrieves a list of |
| 2897 * videos that are related to the video that the parameter value identifies. |
| 2898 * The parameter value must be set to a YouTube video ID and, if you are using |
| 2899 * this parameter, the type parameter must be set to video. |
| 2900 * |
| 2901 * [safeSearch] - The safeSearch parameter indicates whether the search |
| 2902 * results should include restricted content as well as standard content. |
| 2903 * Possible string values are: |
| 2904 * - "moderate" : YouTube will filter some content from search results and, at |
| 2905 * the least, will filter content that is restricted in your locale. Based on |
| 2906 * their content, search results could be removed from search results or |
| 2907 * demoted in search results. This is the default parameter value. |
| 2908 * - "none" : YouTube will not filter the search result set. |
| 2909 * - "strict" : YouTube will try to exclude all restricted content from the |
| 2910 * search result set. Based on their content, search results could be removed |
| 2911 * from search results or demoted in search results. |
| 2912 * |
| 2913 * [topicId] - The topicId parameter indicates that the API response should |
| 2914 * only contain resources associated with the specified topic. The value |
| 2915 * identifies a Freebase topic ID. |
| 2916 * |
| 2917 * [type] - The type parameter restricts a search query to only retrieve a |
| 2918 * particular type of resource. The value is a comma-separated list of |
| 2919 * resource types. |
| 2920 * |
| 2921 * [videoCaption] - The videoCaption parameter indicates whether the API |
| 2922 * should filter video search results based on whether they have captions. |
| 2923 * Possible string values are: |
| 2924 * - "any" : Do not filter results based on caption availability. |
| 2925 * - "closedCaption" : Only include videos that have captions. |
| 2926 * - "none" : Only include videos that do not have captions. |
| 2927 * |
| 2928 * [videoCategoryId] - The videoCategoryId parameter filters video search |
| 2929 * results based on their category. |
| 2930 * |
| 2931 * [videoDefinition] - The videoDefinition parameter lets you restrict a |
| 2932 * search to only include either high definition (HD) or standard definition |
| 2933 * (SD) videos. HD videos are available for playback in at least 720p, though |
| 2934 * higher resolutions, like 1080p, might also be available. |
| 2935 * Possible string values are: |
| 2936 * - "any" : Return all videos, regardless of their resolution. |
| 2937 * - "high" : Only retrieve HD videos. |
| 2938 * - "standard" : Only retrieve videos in standard definition. |
| 2939 * |
| 2940 * [videoDimension] - The videoDimension parameter lets you restrict a search |
| 2941 * to only retrieve 2D or 3D videos. |
| 2942 * Possible string values are: |
| 2943 * - "2d" : Restrict search results to exclude 3D videos. |
| 2944 * - "3d" : Restrict search results to only include 3D videos. |
| 2945 * - "any" : Include both 3D and non-3D videos in returned results. This is |
| 2946 * the default value. |
| 2947 * |
| 2948 * [videoDuration] - The videoDuration parameter filters video search results |
| 2949 * based on their duration. |
| 2950 * Possible string values are: |
| 2951 * - "any" : Do not filter video search results based on their duration. This |
| 2952 * is the default value. |
| 2953 * - "long" : Only include videos longer than 20 minutes. |
| 2954 * - "medium" : Only include videos that are between four and 20 minutes long |
| 2955 * (inclusive). |
| 2956 * - "short" : Only include videos that are less than four minutes long. |
| 2957 * |
| 2958 * [videoEmbeddable] - The videoEmbeddable parameter lets you to restrict a |
| 2959 * search to only videos that can be embedded into a webpage. |
| 2960 * Possible string values are: |
| 2961 * - "any" : Return all videos, embeddable or not. |
| 2962 * - "true" : Only retrieve embeddable videos. |
| 2963 * |
| 2964 * [videoLicense] - The videoLicense parameter filters search results to only |
| 2965 * include videos with a particular license. YouTube lets video uploaders |
| 2966 * choose to attach either the Creative Commons license or the standard |
| 2967 * YouTube license to each of their videos. |
| 2968 * Possible string values are: |
| 2969 * - "any" : Return all videos, regardless of which license they have, that |
| 2970 * match the query parameters. |
| 2971 * - "creativeCommon" : Only return videos that have a Creative Commons |
| 2972 * license. Users can reuse videos with this license in other videos that they |
| 2973 * create. Learn more. |
| 2974 * - "youtube" : Only return videos that have the standard YouTube license. |
| 2975 * |
| 2976 * [videoSyndicated] - The videoSyndicated parameter lets you to restrict a |
| 2977 * search to only videos that can be played outside youtube.com. |
| 2978 * Possible string values are: |
| 2979 * - "any" : Return all videos, syndicated or not. |
| 2980 * - "true" : Only retrieve syndicated videos. |
| 2981 * |
| 2982 * [videoType] - The videoType parameter lets you restrict a search to a |
| 2983 * particular type of videos. |
| 2984 * Possible string values are: |
| 2985 * - "any" : Return all videos. |
| 2986 * - "episode" : Only retrieve episodes of shows. |
| 2987 * - "movie" : Only retrieve movies. |
| 2988 * |
| 2989 * Completes with a [SearchListResponse]. |
| 2990 * |
| 2991 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2992 * error. |
| 2993 * |
| 2994 * If the used [http.Client] completes with an error when making a REST call, |
| 2995 * this method will complete with the same error. |
| 2996 */ |
| 2997 async.Future<SearchListResponse> list(core.String part, {core.String channelId
, core.String channelType, core.String eventType, core.bool forContentOwner, cor
e.bool forMine, core.String location, core.String locationRadius, core.int maxRe
sults, core.String onBehalfOfContentOwner, core.String order, core.String pageTo
ken, core.DateTime publishedAfter, core.DateTime publishedBefore, core.String q,
core.String regionCode, core.String relatedToVideoId, core.String safeSearch, c
ore.String topicId, core.String type, core.String videoCaption, core.String vide
oCategoryId, core.String videoDefinition, core.String videoDimension, core.Strin
g videoDuration, core.String videoEmbeddable, core.String videoLicense, core.Str
ing videoSyndicated, core.String videoType}) { |
| 2998 var _url = null; |
| 2999 var _queryParams = new core.Map(); |
| 3000 var _uploadMedia = null; |
| 3001 var _uploadOptions = null; |
| 3002 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3003 var _body = null; |
| 3004 |
| 3005 if (part == null) { |
| 3006 throw new core.ArgumentError("Parameter part is required."); |
| 3007 } |
| 3008 _queryParams["part"] = [part]; |
| 3009 if (channelId != null) { |
| 3010 _queryParams["channelId"] = [channelId]; |
| 3011 } |
| 3012 if (channelType != null) { |
| 3013 _queryParams["channelType"] = [channelType]; |
| 3014 } |
| 3015 if (eventType != null) { |
| 3016 _queryParams["eventType"] = [eventType]; |
| 3017 } |
| 3018 if (forContentOwner != null) { |
| 3019 _queryParams["forContentOwner"] = ["${forContentOwner}"]; |
| 3020 } |
| 3021 if (forMine != null) { |
| 3022 _queryParams["forMine"] = ["${forMine}"]; |
| 3023 } |
| 3024 if (location != null) { |
| 3025 _queryParams["location"] = [location]; |
| 3026 } |
| 3027 if (locationRadius != null) { |
| 3028 _queryParams["locationRadius"] = [locationRadius]; |
| 3029 } |
| 3030 if (maxResults != null) { |
| 3031 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3032 } |
| 3033 if (onBehalfOfContentOwner != null) { |
| 3034 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3035 } |
| 3036 if (order != null) { |
| 3037 _queryParams["order"] = [order]; |
| 3038 } |
| 3039 if (pageToken != null) { |
| 3040 _queryParams["pageToken"] = [pageToken]; |
| 3041 } |
| 3042 if (publishedAfter != null) { |
| 3043 _queryParams["publishedAfter"] = [(publishedAfter).toIso8601String()]; |
| 3044 } |
| 3045 if (publishedBefore != null) { |
| 3046 _queryParams["publishedBefore"] = [(publishedBefore).toIso8601String()]; |
| 3047 } |
| 3048 if (q != null) { |
| 3049 _queryParams["q"] = [q]; |
| 3050 } |
| 3051 if (regionCode != null) { |
| 3052 _queryParams["regionCode"] = [regionCode]; |
| 3053 } |
| 3054 if (relatedToVideoId != null) { |
| 3055 _queryParams["relatedToVideoId"] = [relatedToVideoId]; |
| 3056 } |
| 3057 if (safeSearch != null) { |
| 3058 _queryParams["safeSearch"] = [safeSearch]; |
| 3059 } |
| 3060 if (topicId != null) { |
| 3061 _queryParams["topicId"] = [topicId]; |
| 3062 } |
| 3063 if (type != null) { |
| 3064 _queryParams["type"] = [type]; |
| 3065 } |
| 3066 if (videoCaption != null) { |
| 3067 _queryParams["videoCaption"] = [videoCaption]; |
| 3068 } |
| 3069 if (videoCategoryId != null) { |
| 3070 _queryParams["videoCategoryId"] = [videoCategoryId]; |
| 3071 } |
| 3072 if (videoDefinition != null) { |
| 3073 _queryParams["videoDefinition"] = [videoDefinition]; |
| 3074 } |
| 3075 if (videoDimension != null) { |
| 3076 _queryParams["videoDimension"] = [videoDimension]; |
| 3077 } |
| 3078 if (videoDuration != null) { |
| 3079 _queryParams["videoDuration"] = [videoDuration]; |
| 3080 } |
| 3081 if (videoEmbeddable != null) { |
| 3082 _queryParams["videoEmbeddable"] = [videoEmbeddable]; |
| 3083 } |
| 3084 if (videoLicense != null) { |
| 3085 _queryParams["videoLicense"] = [videoLicense]; |
| 3086 } |
| 3087 if (videoSyndicated != null) { |
| 3088 _queryParams["videoSyndicated"] = [videoSyndicated]; |
| 3089 } |
| 3090 if (videoType != null) { |
| 3091 _queryParams["videoType"] = [videoType]; |
| 3092 } |
| 3093 |
| 3094 |
| 3095 _url = 'search'; |
| 3096 |
| 3097 var _response = _requester.request(_url, |
| 3098 "GET", |
| 3099 body: _body, |
| 3100 queryParams: _queryParams, |
| 3101 uploadOptions: _uploadOptions, |
| 3102 uploadMedia: _uploadMedia, |
| 3103 downloadOptions: _downloadOptions); |
| 3104 return _response.then((data) => new SearchListResponse.fromJson(data)); |
| 3105 } |
| 3106 |
| 3107 } |
| 3108 |
| 3109 |
| 3110 /** Not documented yet. */ |
| 3111 class SubscriptionsResourceApi { |
| 3112 final common_internal.ApiRequester _requester; |
| 3113 |
| 3114 SubscriptionsResourceApi(common_internal.ApiRequester client) : |
| 3115 _requester = client; |
| 3116 |
| 3117 /** |
| 3118 * Deletes a subscription. |
| 3119 * |
| 3120 * Request parameters: |
| 3121 * |
| 3122 * [id] - The id parameter specifies the YouTube subscription ID for the |
| 3123 * resource that is being deleted. In a subscription resource, the id property |
| 3124 * specifies the YouTube subscription ID. |
| 3125 * |
| 3126 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3127 * error. |
| 3128 * |
| 3129 * If the used [http.Client] completes with an error when making a REST call, |
| 3130 * this method will complete with the same error. |
| 3131 */ |
| 3132 async.Future delete(core.String id) { |
| 3133 var _url = null; |
| 3134 var _queryParams = new core.Map(); |
| 3135 var _uploadMedia = null; |
| 3136 var _uploadOptions = null; |
| 3137 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3138 var _body = null; |
| 3139 |
| 3140 if (id == null) { |
| 3141 throw new core.ArgumentError("Parameter id is required."); |
| 3142 } |
| 3143 _queryParams["id"] = [id]; |
| 3144 |
| 3145 _downloadOptions = null; |
| 3146 |
| 3147 _url = 'subscriptions'; |
| 3148 |
| 3149 var _response = _requester.request(_url, |
| 3150 "DELETE", |
| 3151 body: _body, |
| 3152 queryParams: _queryParams, |
| 3153 uploadOptions: _uploadOptions, |
| 3154 uploadMedia: _uploadMedia, |
| 3155 downloadOptions: _downloadOptions); |
| 3156 return _response.then((data) => null); |
| 3157 } |
| 3158 |
| 3159 /** |
| 3160 * Adds a subscription for the authenticated user's channel. |
| 3161 * |
| 3162 * [request] - The metadata request object. |
| 3163 * |
| 3164 * Request parameters: |
| 3165 * |
| 3166 * [part] - The part parameter serves two purposes in this operation. It |
| 3167 * identifies the properties that the write operation will set as well as the |
| 3168 * properties that the API response will include. |
| 3169 * |
| 3170 * The part names that you can include in the parameter value are snippet and |
| 3171 * contentDetails. |
| 3172 * |
| 3173 * Completes with a [Subscription]. |
| 3174 * |
| 3175 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3176 * error. |
| 3177 * |
| 3178 * If the used [http.Client] completes with an error when making a REST call, |
| 3179 * this method will complete with the same error. |
| 3180 */ |
| 3181 async.Future<Subscription> insert(Subscription request, core.String part) { |
| 3182 var _url = null; |
| 3183 var _queryParams = new core.Map(); |
| 3184 var _uploadMedia = null; |
| 3185 var _uploadOptions = null; |
| 3186 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3187 var _body = null; |
| 3188 |
| 3189 if (request != null) { |
| 3190 _body = convert.JSON.encode((request).toJson()); |
| 3191 } |
| 3192 if (part == null) { |
| 3193 throw new core.ArgumentError("Parameter part is required."); |
| 3194 } |
| 3195 _queryParams["part"] = [part]; |
| 3196 |
| 3197 |
| 3198 _url = 'subscriptions'; |
| 3199 |
| 3200 var _response = _requester.request(_url, |
| 3201 "POST", |
| 3202 body: _body, |
| 3203 queryParams: _queryParams, |
| 3204 uploadOptions: _uploadOptions, |
| 3205 uploadMedia: _uploadMedia, |
| 3206 downloadOptions: _downloadOptions); |
| 3207 return _response.then((data) => new Subscription.fromJson(data)); |
| 3208 } |
| 3209 |
| 3210 /** |
| 3211 * Returns subscription resources that match the API request criteria. |
| 3212 * |
| 3213 * Request parameters: |
| 3214 * |
| 3215 * [part] - The part parameter specifies a comma-separated list of one or more |
| 3216 * subscription resource properties that the API response will include. The |
| 3217 * part names that you can include in the parameter value are id, snippet, and |
| 3218 * contentDetails. |
| 3219 * |
| 3220 * If the parameter identifies a property that contains child properties, the |
| 3221 * child properties will be included in the response. For example, in a |
| 3222 * subscription resource, the snippet property contains other properties, such |
| 3223 * as a display title for the subscription. If you set part=snippet, the API |
| 3224 * response will also contain all of those nested properties. |
| 3225 * |
| 3226 * [channelId] - The channelId parameter specifies a YouTube channel ID. The |
| 3227 * API will only return that channel's subscriptions. |
| 3228 * |
| 3229 * [forChannelId] - The forChannelId parameter specifies a comma-separated |
| 3230 * list of channel IDs. The API response will then only contain subscriptions |
| 3231 * matching those channels. |
| 3232 * |
| 3233 * [id] - The id parameter specifies a comma-separated list of the YouTube |
| 3234 * subscription ID(s) for the resource(s) that are being retrieved. In a |
| 3235 * subscription resource, the id property specifies the YouTube subscription |
| 3236 * ID. |
| 3237 * |
| 3238 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 3239 * items that should be returned in the result set. |
| 3240 * Value must be between "0" and "50". |
| 3241 * |
| 3242 * [mine] - Set this parameter's value to true to retrieve a feed of the |
| 3243 * authenticated user's subscriptions. |
| 3244 * |
| 3245 * [mySubscribers] - Set this parameter's value to true to retrieve a feed of |
| 3246 * the subscribers of the authenticated user. |
| 3247 * |
| 3248 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 3249 * YouTube content partners. |
| 3250 * |
| 3251 * The onBehalfOfContentOwner parameter indicates that the request's |
| 3252 * authorization credentials identify a YouTube CMS user who is acting on |
| 3253 * behalf of the content owner specified in the parameter value. This |
| 3254 * parameter is intended for YouTube content partners that own and manage many |
| 3255 * different YouTube channels. It allows content owners to authenticate once |
| 3256 * and get access to all their video and channel data, without having to |
| 3257 * provide authentication credentials for each individual channel. The CMS |
| 3258 * account that the user authenticates with must be linked to the specified |
| 3259 * YouTube content owner. |
| 3260 * |
| 3261 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 3262 * properly authorized request. Note: This parameter is intended exclusively |
| 3263 * for YouTube content partners. |
| 3264 * |
| 3265 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 3266 * ID of the channel to which a video is being added. This parameter is |
| 3267 * required when a request specifies a value for the onBehalfOfContentOwner |
| 3268 * parameter, and it can only be used in conjunction with that parameter. In |
| 3269 * addition, the request must be authorized using a CMS account that is linked |
| 3270 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 3271 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 3272 * specifies must be linked to the content owner that the |
| 3273 * onBehalfOfContentOwner parameter specifies. |
| 3274 * |
| 3275 * This parameter is intended for YouTube content partners that own and manage |
| 3276 * many different YouTube channels. It allows content owners to authenticate |
| 3277 * once and perform actions on behalf of the channel specified in the |
| 3278 * parameter value, without having to provide authentication credentials for |
| 3279 * each separate channel. |
| 3280 * |
| 3281 * [order] - The order parameter specifies the method that will be used to |
| 3282 * sort resources in the API response. |
| 3283 * Possible string values are: |
| 3284 * - "alphabetical" : Sort alphabetically. |
| 3285 * - "relevance" : Sort by relevance. |
| 3286 * - "unread" : Sort by order of activity. |
| 3287 * |
| 3288 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 3289 * result set that should be returned. In an API response, the nextPageToken |
| 3290 * and prevPageToken properties identify other pages that could be retrieved. |
| 3291 * |
| 3292 * Completes with a [SubscriptionListResponse]. |
| 3293 * |
| 3294 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3295 * error. |
| 3296 * |
| 3297 * If the used [http.Client] completes with an error when making a REST call, |
| 3298 * this method will complete with the same error. |
| 3299 */ |
| 3300 async.Future<SubscriptionListResponse> list(core.String part, {core.String cha
nnelId, core.String forChannelId, core.String id, core.int maxResults, core.bool
mine, core.bool mySubscribers, core.String onBehalfOfContentOwner, core.String
onBehalfOfContentOwnerChannel, core.String order, core.String pageToken}) { |
| 3301 var _url = null; |
| 3302 var _queryParams = new core.Map(); |
| 3303 var _uploadMedia = null; |
| 3304 var _uploadOptions = null; |
| 3305 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3306 var _body = null; |
| 3307 |
| 3308 if (part == null) { |
| 3309 throw new core.ArgumentError("Parameter part is required."); |
| 3310 } |
| 3311 _queryParams["part"] = [part]; |
| 3312 if (channelId != null) { |
| 3313 _queryParams["channelId"] = [channelId]; |
| 3314 } |
| 3315 if (forChannelId != null) { |
| 3316 _queryParams["forChannelId"] = [forChannelId]; |
| 3317 } |
| 3318 if (id != null) { |
| 3319 _queryParams["id"] = [id]; |
| 3320 } |
| 3321 if (maxResults != null) { |
| 3322 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3323 } |
| 3324 if (mine != null) { |
| 3325 _queryParams["mine"] = ["${mine}"]; |
| 3326 } |
| 3327 if (mySubscribers != null) { |
| 3328 _queryParams["mySubscribers"] = ["${mySubscribers}"]; |
| 3329 } |
| 3330 if (onBehalfOfContentOwner != null) { |
| 3331 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3332 } |
| 3333 if (onBehalfOfContentOwnerChannel != null) { |
| 3334 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 3335 } |
| 3336 if (order != null) { |
| 3337 _queryParams["order"] = [order]; |
| 3338 } |
| 3339 if (pageToken != null) { |
| 3340 _queryParams["pageToken"] = [pageToken]; |
| 3341 } |
| 3342 |
| 3343 |
| 3344 _url = 'subscriptions'; |
| 3345 |
| 3346 var _response = _requester.request(_url, |
| 3347 "GET", |
| 3348 body: _body, |
| 3349 queryParams: _queryParams, |
| 3350 uploadOptions: _uploadOptions, |
| 3351 uploadMedia: _uploadMedia, |
| 3352 downloadOptions: _downloadOptions); |
| 3353 return _response.then((data) => new SubscriptionListResponse.fromJson(data))
; |
| 3354 } |
| 3355 |
| 3356 } |
| 3357 |
| 3358 |
| 3359 /** Not documented yet. */ |
| 3360 class ThumbnailsResourceApi { |
| 3361 final common_internal.ApiRequester _requester; |
| 3362 |
| 3363 ThumbnailsResourceApi(common_internal.ApiRequester client) : |
| 3364 _requester = client; |
| 3365 |
| 3366 /** |
| 3367 * Uploads a custom video thumbnail to YouTube and sets it for a video. |
| 3368 * |
| 3369 * Request parameters: |
| 3370 * |
| 3371 * [videoId] - The videoId parameter specifies a YouTube video ID for which |
| 3372 * the custom video thumbnail is being provided. |
| 3373 * |
| 3374 * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter indicates |
| 3375 * that the authenticated user is acting on behalf of the content owner |
| 3376 * specified in the parameter value. This parameter is intended for YouTube |
| 3377 * content partners that own and manage many different YouTube channels. It |
| 3378 * allows content owners to authenticate once and get access to all their |
| 3379 * video and channel data, without having to provide authentication |
| 3380 * credentials for each individual channel. The actual CMS account that the |
| 3381 * user authenticates with needs to be linked to the specified YouTube content |
| 3382 * owner. |
| 3383 * |
| 3384 * [uploadMedia] - The media to upload. |
| 3385 * |
| 3386 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 3387 * length being known ahead of time is only supported via resumable uploads. |
| 3388 * |
| 3389 * Completes with a [ThumbnailSetResponse]. |
| 3390 * |
| 3391 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3392 * error. |
| 3393 * |
| 3394 * If the used [http.Client] completes with an error when making a REST call, |
| 3395 * this method will complete with the same error. |
| 3396 */ |
| 3397 async.Future<ThumbnailSetResponse> set(core.String videoId, {core.String onBeh
alfOfContentOwner, common.UploadOptions uploadOptions : common.UploadOptions.Def
ault, common.Media uploadMedia}) { |
| 3398 var _url = null; |
| 3399 var _queryParams = new core.Map(); |
| 3400 var _uploadMedia = null; |
| 3401 var _uploadOptions = null; |
| 3402 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3403 var _body = null; |
| 3404 |
| 3405 if (videoId == null) { |
| 3406 throw new core.ArgumentError("Parameter videoId is required."); |
| 3407 } |
| 3408 _queryParams["videoId"] = [videoId]; |
| 3409 if (onBehalfOfContentOwner != null) { |
| 3410 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3411 } |
| 3412 |
| 3413 _uploadMedia = uploadMedia; |
| 3414 _uploadOptions = uploadOptions; |
| 3415 |
| 3416 if (_uploadMedia == null) { |
| 3417 _url = 'thumbnails/set'; |
| 3418 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 3419 _url = '/resumable/upload/youtube/v3/thumbnails/set'; |
| 3420 } else { |
| 3421 _url = '/upload/youtube/v3/thumbnails/set'; |
| 3422 } |
| 3423 |
| 3424 |
| 3425 var _response = _requester.request(_url, |
| 3426 "POST", |
| 3427 body: _body, |
| 3428 queryParams: _queryParams, |
| 3429 uploadOptions: _uploadOptions, |
| 3430 uploadMedia: _uploadMedia, |
| 3431 downloadOptions: _downloadOptions); |
| 3432 return _response.then((data) => new ThumbnailSetResponse.fromJson(data)); |
| 3433 } |
| 3434 |
| 3435 } |
| 3436 |
| 3437 |
| 3438 /** Not documented yet. */ |
| 3439 class VideoCategoriesResourceApi { |
| 3440 final common_internal.ApiRequester _requester; |
| 3441 |
| 3442 VideoCategoriesResourceApi(common_internal.ApiRequester client) : |
| 3443 _requester = client; |
| 3444 |
| 3445 /** |
| 3446 * Returns a list of categories that can be associated with YouTube videos. |
| 3447 * |
| 3448 * Request parameters: |
| 3449 * |
| 3450 * [part] - The part parameter specifies the videoCategory resource parts that |
| 3451 * the API response will include. Supported values are id and snippet. |
| 3452 * |
| 3453 * [hl] - The hl parameter specifies the language that should be used for text |
| 3454 * values in the API response. |
| 3455 * |
| 3456 * [id] - The id parameter specifies a comma-separated list of video category |
| 3457 * IDs for the resources that you are retrieving. |
| 3458 * |
| 3459 * [regionCode] - The regionCode parameter instructs the API to return the |
| 3460 * list of video categories available in the specified country. The parameter |
| 3461 * value is an ISO 3166-1 alpha-2 country code. |
| 3462 * |
| 3463 * Completes with a [VideoCategoryListResponse]. |
| 3464 * |
| 3465 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3466 * error. |
| 3467 * |
| 3468 * If the used [http.Client] completes with an error when making a REST call, |
| 3469 * this method will complete with the same error. |
| 3470 */ |
| 3471 async.Future<VideoCategoryListResponse> list(core.String part, {core.String hl
, core.String id, core.String regionCode}) { |
| 3472 var _url = null; |
| 3473 var _queryParams = new core.Map(); |
| 3474 var _uploadMedia = null; |
| 3475 var _uploadOptions = null; |
| 3476 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3477 var _body = null; |
| 3478 |
| 3479 if (part == null) { |
| 3480 throw new core.ArgumentError("Parameter part is required."); |
| 3481 } |
| 3482 _queryParams["part"] = [part]; |
| 3483 if (hl != null) { |
| 3484 _queryParams["hl"] = [hl]; |
| 3485 } |
| 3486 if (id != null) { |
| 3487 _queryParams["id"] = [id]; |
| 3488 } |
| 3489 if (regionCode != null) { |
| 3490 _queryParams["regionCode"] = [regionCode]; |
| 3491 } |
| 3492 |
| 3493 |
| 3494 _url = 'videoCategories'; |
| 3495 |
| 3496 var _response = _requester.request(_url, |
| 3497 "GET", |
| 3498 body: _body, |
| 3499 queryParams: _queryParams, |
| 3500 uploadOptions: _uploadOptions, |
| 3501 uploadMedia: _uploadMedia, |
| 3502 downloadOptions: _downloadOptions); |
| 3503 return _response.then((data) => new VideoCategoryListResponse.fromJson(data)
); |
| 3504 } |
| 3505 |
| 3506 } |
| 3507 |
| 3508 |
| 3509 /** Not documented yet. */ |
| 3510 class VideosResourceApi { |
| 3511 final common_internal.ApiRequester _requester; |
| 3512 |
| 3513 VideosResourceApi(common_internal.ApiRequester client) : |
| 3514 _requester = client; |
| 3515 |
| 3516 /** |
| 3517 * Deletes a YouTube video. |
| 3518 * |
| 3519 * Request parameters: |
| 3520 * |
| 3521 * [id] - The id parameter specifies the YouTube video ID for the resource |
| 3522 * that is being deleted. In a video resource, the id property specifies the |
| 3523 * video's ID. |
| 3524 * |
| 3525 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 3526 * YouTube content partners. |
| 3527 * |
| 3528 * The onBehalfOfContentOwner parameter indicates that the request's |
| 3529 * authorization credentials identify a YouTube CMS user who is acting on |
| 3530 * behalf of the content owner specified in the parameter value. This |
| 3531 * parameter is intended for YouTube content partners that own and manage many |
| 3532 * different YouTube channels. It allows content owners to authenticate once |
| 3533 * and get access to all their video and channel data, without having to |
| 3534 * provide authentication credentials for each individual channel. The actual |
| 3535 * CMS account that the user authenticates with must be linked to the |
| 3536 * specified YouTube content owner. |
| 3537 * |
| 3538 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3539 * error. |
| 3540 * |
| 3541 * If the used [http.Client] completes with an error when making a REST call, |
| 3542 * this method will complete with the same error. |
| 3543 */ |
| 3544 async.Future delete(core.String id, {core.String onBehalfOfContentOwner}) { |
| 3545 var _url = null; |
| 3546 var _queryParams = new core.Map(); |
| 3547 var _uploadMedia = null; |
| 3548 var _uploadOptions = null; |
| 3549 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3550 var _body = null; |
| 3551 |
| 3552 if (id == null) { |
| 3553 throw new core.ArgumentError("Parameter id is required."); |
| 3554 } |
| 3555 _queryParams["id"] = [id]; |
| 3556 if (onBehalfOfContentOwner != null) { |
| 3557 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3558 } |
| 3559 |
| 3560 _downloadOptions = null; |
| 3561 |
| 3562 _url = 'videos'; |
| 3563 |
| 3564 var _response = _requester.request(_url, |
| 3565 "DELETE", |
| 3566 body: _body, |
| 3567 queryParams: _queryParams, |
| 3568 uploadOptions: _uploadOptions, |
| 3569 uploadMedia: _uploadMedia, |
| 3570 downloadOptions: _downloadOptions); |
| 3571 return _response.then((data) => null); |
| 3572 } |
| 3573 |
| 3574 /** |
| 3575 * Retrieves the ratings that the authorized user gave to a list of specified |
| 3576 * videos. |
| 3577 * |
| 3578 * Request parameters: |
| 3579 * |
| 3580 * [id] - The id parameter specifies a comma-separated list of the YouTube |
| 3581 * video ID(s) for the resource(s) for which you are retrieving rating data. |
| 3582 * In a video resource, the id property specifies the video's ID. |
| 3583 * |
| 3584 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 3585 * YouTube content partners. |
| 3586 * |
| 3587 * The onBehalfOfContentOwner parameter indicates that the request's |
| 3588 * authorization credentials identify a YouTube CMS user who is acting on |
| 3589 * behalf of the content owner specified in the parameter value. This |
| 3590 * parameter is intended for YouTube content partners that own and manage many |
| 3591 * different YouTube channels. It allows content owners to authenticate once |
| 3592 * and get access to all their video and channel data, without having to |
| 3593 * provide authentication credentials for each individual channel. The CMS |
| 3594 * account that the user authenticates with must be linked to the specified |
| 3595 * YouTube content owner. |
| 3596 * |
| 3597 * Completes with a [VideoGetRatingResponse]. |
| 3598 * |
| 3599 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3600 * error. |
| 3601 * |
| 3602 * If the used [http.Client] completes with an error when making a REST call, |
| 3603 * this method will complete with the same error. |
| 3604 */ |
| 3605 async.Future<VideoGetRatingResponse> getRating(core.String id, {core.String on
BehalfOfContentOwner}) { |
| 3606 var _url = null; |
| 3607 var _queryParams = new core.Map(); |
| 3608 var _uploadMedia = null; |
| 3609 var _uploadOptions = null; |
| 3610 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3611 var _body = null; |
| 3612 |
| 3613 if (id == null) { |
| 3614 throw new core.ArgumentError("Parameter id is required."); |
| 3615 } |
| 3616 _queryParams["id"] = [id]; |
| 3617 if (onBehalfOfContentOwner != null) { |
| 3618 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3619 } |
| 3620 |
| 3621 |
| 3622 _url = 'videos/getRating'; |
| 3623 |
| 3624 var _response = _requester.request(_url, |
| 3625 "GET", |
| 3626 body: _body, |
| 3627 queryParams: _queryParams, |
| 3628 uploadOptions: _uploadOptions, |
| 3629 uploadMedia: _uploadMedia, |
| 3630 downloadOptions: _downloadOptions); |
| 3631 return _response.then((data) => new VideoGetRatingResponse.fromJson(data)); |
| 3632 } |
| 3633 |
| 3634 /** |
| 3635 * Uploads a video to YouTube and optionally sets the video's metadata. |
| 3636 * |
| 3637 * [request] - The metadata request object. |
| 3638 * |
| 3639 * Request parameters: |
| 3640 * |
| 3641 * [part] - The part parameter serves two purposes in this operation. It |
| 3642 * identifies the properties that the write operation will set as well as the |
| 3643 * properties that the API response will include. |
| 3644 * |
| 3645 * The part names that you can include in the parameter value are snippet, |
| 3646 * contentDetails, fileDetails, liveStreamingDetails, player, |
| 3647 * processingDetails, recordingDetails, statistics, status, suggestions, and |
| 3648 * topicDetails. However, not all of those parts contain properties that can |
| 3649 * be set when setting or updating a video's metadata. For example, the |
| 3650 * statistics object encapsulates statistics that YouTube calculates for a |
| 3651 * video and does not contain values that you can set or modify. If the |
| 3652 * parameter value specifies a part that does not contain mutable values, that |
| 3653 * part will still be included in the API response. |
| 3654 * |
| 3655 * [autoLevels] - The autoLevels parameter indicates whether YouTube should |
| 3656 * automatically enhance the video's lighting and color. |
| 3657 * |
| 3658 * [notifySubscribers] - The notifySubscribers parameter indicates whether |
| 3659 * YouTube should send notification to subscribers about the inserted video. |
| 3660 * |
| 3661 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 3662 * YouTube content partners. |
| 3663 * |
| 3664 * The onBehalfOfContentOwner parameter indicates that the request's |
| 3665 * authorization credentials identify a YouTube CMS user who is acting on |
| 3666 * behalf of the content owner specified in the parameter value. This |
| 3667 * parameter is intended for YouTube content partners that own and manage many |
| 3668 * different YouTube channels. It allows content owners to authenticate once |
| 3669 * and get access to all their video and channel data, without having to |
| 3670 * provide authentication credentials for each individual channel. The CMS |
| 3671 * account that the user authenticates with must be linked to the specified |
| 3672 * YouTube content owner. |
| 3673 * |
| 3674 * [onBehalfOfContentOwnerChannel] - This parameter can only be used in a |
| 3675 * properly authorized request. Note: This parameter is intended exclusively |
| 3676 * for YouTube content partners. |
| 3677 * |
| 3678 * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel |
| 3679 * ID of the channel to which a video is being added. This parameter is |
| 3680 * required when a request specifies a value for the onBehalfOfContentOwner |
| 3681 * parameter, and it can only be used in conjunction with that parameter. In |
| 3682 * addition, the request must be authorized using a CMS account that is linked |
| 3683 * to the content owner that the onBehalfOfContentOwner parameter specifies. |
| 3684 * Finally, the channel that the onBehalfOfContentOwnerChannel parameter value |
| 3685 * specifies must be linked to the content owner that the |
| 3686 * onBehalfOfContentOwner parameter specifies. |
| 3687 * |
| 3688 * This parameter is intended for YouTube content partners that own and manage |
| 3689 * many different YouTube channels. It allows content owners to authenticate |
| 3690 * once and perform actions on behalf of the channel specified in the |
| 3691 * parameter value, without having to provide authentication credentials for |
| 3692 * each separate channel. |
| 3693 * |
| 3694 * [stabilize] - The stabilize parameter indicates whether YouTube should |
| 3695 * adjust the video to remove shaky camera motions. |
| 3696 * |
| 3697 * [uploadMedia] - The media to upload. |
| 3698 * |
| 3699 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 3700 * length being known ahead of time is only supported via resumable uploads. |
| 3701 * |
| 3702 * Completes with a [Video]. |
| 3703 * |
| 3704 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3705 * error. |
| 3706 * |
| 3707 * If the used [http.Client] completes with an error when making a REST call, |
| 3708 * this method will complete with the same error. |
| 3709 */ |
| 3710 async.Future<Video> insert(Video request, core.String part, {core.bool autoLev
els, core.bool notifySubscribers, core.String onBehalfOfContentOwner, core.Strin
g onBehalfOfContentOwnerChannel, core.bool stabilize, common.UploadOptions uploa
dOptions : common.UploadOptions.Default, common.Media uploadMedia}) { |
| 3711 var _url = null; |
| 3712 var _queryParams = new core.Map(); |
| 3713 var _uploadMedia = null; |
| 3714 var _uploadOptions = null; |
| 3715 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3716 var _body = null; |
| 3717 |
| 3718 if (request != null) { |
| 3719 _body = convert.JSON.encode((request).toJson()); |
| 3720 } |
| 3721 if (part == null) { |
| 3722 throw new core.ArgumentError("Parameter part is required."); |
| 3723 } |
| 3724 _queryParams["part"] = [part]; |
| 3725 if (autoLevels != null) { |
| 3726 _queryParams["autoLevels"] = ["${autoLevels}"]; |
| 3727 } |
| 3728 if (notifySubscribers != null) { |
| 3729 _queryParams["notifySubscribers"] = ["${notifySubscribers}"]; |
| 3730 } |
| 3731 if (onBehalfOfContentOwner != null) { |
| 3732 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3733 } |
| 3734 if (onBehalfOfContentOwnerChannel != null) { |
| 3735 _queryParams["onBehalfOfContentOwnerChannel"] = [onBehalfOfContentOwnerCha
nnel]; |
| 3736 } |
| 3737 if (stabilize != null) { |
| 3738 _queryParams["stabilize"] = ["${stabilize}"]; |
| 3739 } |
| 3740 |
| 3741 _uploadMedia = uploadMedia; |
| 3742 _uploadOptions = uploadOptions; |
| 3743 |
| 3744 if (_uploadMedia == null) { |
| 3745 _url = 'videos'; |
| 3746 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 3747 _url = '/resumable/upload/youtube/v3/videos'; |
| 3748 } else { |
| 3749 _url = '/upload/youtube/v3/videos'; |
| 3750 } |
| 3751 |
| 3752 |
| 3753 var _response = _requester.request(_url, |
| 3754 "POST", |
| 3755 body: _body, |
| 3756 queryParams: _queryParams, |
| 3757 uploadOptions: _uploadOptions, |
| 3758 uploadMedia: _uploadMedia, |
| 3759 downloadOptions: _downloadOptions); |
| 3760 return _response.then((data) => new Video.fromJson(data)); |
| 3761 } |
| 3762 |
| 3763 /** |
| 3764 * Returns a list of videos that match the API request parameters. |
| 3765 * |
| 3766 * Request parameters: |
| 3767 * |
| 3768 * [part] - The part parameter specifies a comma-separated list of one or more |
| 3769 * video resource properties that the API response will include. The part |
| 3770 * names that you can include in the parameter value are id, snippet, |
| 3771 * contentDetails, fileDetails, liveStreamingDetails, player, |
| 3772 * processingDetails, recordingDetails, statistics, status, suggestions, and |
| 3773 * topicDetails. |
| 3774 * |
| 3775 * If the parameter identifies a property that contains child properties, the |
| 3776 * child properties will be included in the response. For example, in a video |
| 3777 * resource, the snippet property contains the channelId, title, description, |
| 3778 * tags, and categoryId properties. As such, if you set part=snippet, the API |
| 3779 * response will contain all of those properties. |
| 3780 * |
| 3781 * [chart] - The chart parameter identifies the chart that you want to |
| 3782 * retrieve. |
| 3783 * Possible string values are: |
| 3784 * - "mostPopular" : Return the most popular videos for the specified content |
| 3785 * region and video category. |
| 3786 * |
| 3787 * [id] - The id parameter specifies a comma-separated list of the YouTube |
| 3788 * video ID(s) for the resource(s) that are being retrieved. In a video |
| 3789 * resource, the id property specifies the video's ID. |
| 3790 * |
| 3791 * [locale] - DEPRECATED |
| 3792 * |
| 3793 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 3794 * items that should be returned in the result set. |
| 3795 * |
| 3796 * Note: This parameter is supported for use in conjunction with the myRating |
| 3797 * parameter, but it is not supported for use in conjunction with the id |
| 3798 * parameter. |
| 3799 * Value must be between "1" and "50". |
| 3800 * |
| 3801 * [myRating] - Set this parameter's value to like or dislike to instruct the |
| 3802 * API to only return videos liked or disliked by the authenticated user. |
| 3803 * Possible string values are: |
| 3804 * - "dislike" : Returns only videos disliked by the authenticated user. |
| 3805 * - "like" : Returns only video liked by the authenticated user. |
| 3806 * |
| 3807 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 3808 * YouTube content partners. |
| 3809 * |
| 3810 * The onBehalfOfContentOwner parameter indicates that the request's |
| 3811 * authorization credentials identify a YouTube CMS user who is acting on |
| 3812 * behalf of the content owner specified in the parameter value. This |
| 3813 * parameter is intended for YouTube content partners that own and manage many |
| 3814 * different YouTube channels. It allows content owners to authenticate once |
| 3815 * and get access to all their video and channel data, without having to |
| 3816 * provide authentication credentials for each individual channel. The CMS |
| 3817 * account that the user authenticates with must be linked to the specified |
| 3818 * YouTube content owner. |
| 3819 * |
| 3820 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 3821 * result set that should be returned. In an API response, the nextPageToken |
| 3822 * and prevPageToken properties identify other pages that could be retrieved. |
| 3823 * |
| 3824 * Note: This parameter is supported for use in conjunction with the myRating |
| 3825 * parameter, but it is not supported for use in conjunction with the id |
| 3826 * parameter. |
| 3827 * |
| 3828 * [regionCode] - The regionCode parameter instructs the API to select a video |
| 3829 * chart available in the specified region. This parameter can only be used in |
| 3830 * conjunction with the chart parameter. The parameter value is an ISO 3166-1 |
| 3831 * alpha-2 country code. |
| 3832 * |
| 3833 * [videoCategoryId] - The videoCategoryId parameter identifies the video |
| 3834 * category for which the chart should be retrieved. This parameter can only |
| 3835 * be used in conjunction with the chart parameter. By default, charts are not |
| 3836 * restricted to a particular category. |
| 3837 * |
| 3838 * Completes with a [VideoListResponse]. |
| 3839 * |
| 3840 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3841 * error. |
| 3842 * |
| 3843 * If the used [http.Client] completes with an error when making a REST call, |
| 3844 * this method will complete with the same error. |
| 3845 */ |
| 3846 async.Future<VideoListResponse> list(core.String part, {core.String chart, cor
e.String id, core.String locale, core.int maxResults, core.String myRating, core
.String onBehalfOfContentOwner, core.String pageToken, core.String regionCode, c
ore.String videoCategoryId}) { |
| 3847 var _url = null; |
| 3848 var _queryParams = new core.Map(); |
| 3849 var _uploadMedia = null; |
| 3850 var _uploadOptions = null; |
| 3851 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3852 var _body = null; |
| 3853 |
| 3854 if (part == null) { |
| 3855 throw new core.ArgumentError("Parameter part is required."); |
| 3856 } |
| 3857 _queryParams["part"] = [part]; |
| 3858 if (chart != null) { |
| 3859 _queryParams["chart"] = [chart]; |
| 3860 } |
| 3861 if (id != null) { |
| 3862 _queryParams["id"] = [id]; |
| 3863 } |
| 3864 if (locale != null) { |
| 3865 _queryParams["locale"] = [locale]; |
| 3866 } |
| 3867 if (maxResults != null) { |
| 3868 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3869 } |
| 3870 if (myRating != null) { |
| 3871 _queryParams["myRating"] = [myRating]; |
| 3872 } |
| 3873 if (onBehalfOfContentOwner != null) { |
| 3874 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3875 } |
| 3876 if (pageToken != null) { |
| 3877 _queryParams["pageToken"] = [pageToken]; |
| 3878 } |
| 3879 if (regionCode != null) { |
| 3880 _queryParams["regionCode"] = [regionCode]; |
| 3881 } |
| 3882 if (videoCategoryId != null) { |
| 3883 _queryParams["videoCategoryId"] = [videoCategoryId]; |
| 3884 } |
| 3885 |
| 3886 |
| 3887 _url = 'videos'; |
| 3888 |
| 3889 var _response = _requester.request(_url, |
| 3890 "GET", |
| 3891 body: _body, |
| 3892 queryParams: _queryParams, |
| 3893 uploadOptions: _uploadOptions, |
| 3894 uploadMedia: _uploadMedia, |
| 3895 downloadOptions: _downloadOptions); |
| 3896 return _response.then((data) => new VideoListResponse.fromJson(data)); |
| 3897 } |
| 3898 |
| 3899 /** |
| 3900 * Add a like or dislike rating to a video or remove a rating from a video. |
| 3901 * |
| 3902 * Request parameters: |
| 3903 * |
| 3904 * [id] - The id parameter specifies the YouTube video ID of the video that is |
| 3905 * being rated or having its rating removed. |
| 3906 * |
| 3907 * [rating] - Specifies the rating to record. |
| 3908 * Possible string values are: |
| 3909 * - "dislike" : Records that the authenticated user disliked the video. |
| 3910 * - "like" : Records that the authenticated user liked the video. |
| 3911 * - "none" : Removes any rating that the authenticated user had previously |
| 3912 * set for the video. |
| 3913 * |
| 3914 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 3915 * YouTube content partners. |
| 3916 * |
| 3917 * The onBehalfOfContentOwner parameter indicates that the request's |
| 3918 * authorization credentials identify a YouTube CMS user who is acting on |
| 3919 * behalf of the content owner specified in the parameter value. This |
| 3920 * parameter is intended for YouTube content partners that own and manage many |
| 3921 * different YouTube channels. It allows content owners to authenticate once |
| 3922 * and get access to all their video and channel data, without having to |
| 3923 * provide authentication credentials for each individual channel. The CMS |
| 3924 * account that the user authenticates with must be linked to the specified |
| 3925 * YouTube content owner. |
| 3926 * |
| 3927 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3928 * error. |
| 3929 * |
| 3930 * If the used [http.Client] completes with an error when making a REST call, |
| 3931 * this method will complete with the same error. |
| 3932 */ |
| 3933 async.Future rate(core.String id, core.String rating, {core.String onBehalfOfC
ontentOwner}) { |
| 3934 var _url = null; |
| 3935 var _queryParams = new core.Map(); |
| 3936 var _uploadMedia = null; |
| 3937 var _uploadOptions = null; |
| 3938 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3939 var _body = null; |
| 3940 |
| 3941 if (id == null) { |
| 3942 throw new core.ArgumentError("Parameter id is required."); |
| 3943 } |
| 3944 _queryParams["id"] = [id]; |
| 3945 if (rating == null) { |
| 3946 throw new core.ArgumentError("Parameter rating is required."); |
| 3947 } |
| 3948 _queryParams["rating"] = [rating]; |
| 3949 if (onBehalfOfContentOwner != null) { |
| 3950 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 3951 } |
| 3952 |
| 3953 _downloadOptions = null; |
| 3954 |
| 3955 _url = 'videos/rate'; |
| 3956 |
| 3957 var _response = _requester.request(_url, |
| 3958 "POST", |
| 3959 body: _body, |
| 3960 queryParams: _queryParams, |
| 3961 uploadOptions: _uploadOptions, |
| 3962 uploadMedia: _uploadMedia, |
| 3963 downloadOptions: _downloadOptions); |
| 3964 return _response.then((data) => null); |
| 3965 } |
| 3966 |
| 3967 /** |
| 3968 * Updates a video's metadata. |
| 3969 * |
| 3970 * [request] - The metadata request object. |
| 3971 * |
| 3972 * Request parameters: |
| 3973 * |
| 3974 * [part] - The part parameter serves two purposes in this operation. It |
| 3975 * identifies the properties that the write operation will set as well as the |
| 3976 * properties that the API response will include. |
| 3977 * |
| 3978 * The part names that you can include in the parameter value are snippet, |
| 3979 * contentDetails, fileDetails, liveStreamingDetails, player, |
| 3980 * processingDetails, recordingDetails, statistics, status, suggestions, and |
| 3981 * topicDetails. |
| 3982 * |
| 3983 * Note that this method will override the existing values for all of the |
| 3984 * mutable properties that are contained in any parts that the parameter value |
| 3985 * specifies. For example, a video's privacy setting is contained in the |
| 3986 * status part. As such, if your request is updating a private video, and the |
| 3987 * request's part parameter value includes the status part, the video's |
| 3988 * privacy setting will be updated to whatever value the request body |
| 3989 * specifies. If the request body does not specify a value, the existing |
| 3990 * privacy setting will be removed and the video will revert to the default |
| 3991 * privacy setting. |
| 3992 * |
| 3993 * In addition, not all of those parts contain properties that can be set when |
| 3994 * setting or updating a video's metadata. For example, the statistics object |
| 3995 * encapsulates statistics that YouTube calculates for a video and does not |
| 3996 * contain values that you can set or modify. If the parameter value specifies |
| 3997 * a part that does not contain mutable values, that part will still be |
| 3998 * included in the API response. |
| 3999 * |
| 4000 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 4001 * YouTube content partners. |
| 4002 * |
| 4003 * The onBehalfOfContentOwner parameter indicates that the request's |
| 4004 * authorization credentials identify a YouTube CMS user who is acting on |
| 4005 * behalf of the content owner specified in the parameter value. This |
| 4006 * parameter is intended for YouTube content partners that own and manage many |
| 4007 * different YouTube channels. It allows content owners to authenticate once |
| 4008 * and get access to all their video and channel data, without having to |
| 4009 * provide authentication credentials for each individual channel. The actual |
| 4010 * CMS account that the user authenticates with must be linked to the |
| 4011 * specified YouTube content owner. |
| 4012 * |
| 4013 * Completes with a [Video]. |
| 4014 * |
| 4015 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4016 * error. |
| 4017 * |
| 4018 * If the used [http.Client] completes with an error when making a REST call, |
| 4019 * this method will complete with the same error. |
| 4020 */ |
| 4021 async.Future<Video> update(Video request, core.String part, {core.String onBeh
alfOfContentOwner}) { |
| 4022 var _url = null; |
| 4023 var _queryParams = new core.Map(); |
| 4024 var _uploadMedia = null; |
| 4025 var _uploadOptions = null; |
| 4026 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4027 var _body = null; |
| 4028 |
| 4029 if (request != null) { |
| 4030 _body = convert.JSON.encode((request).toJson()); |
| 4031 } |
| 4032 if (part == null) { |
| 4033 throw new core.ArgumentError("Parameter part is required."); |
| 4034 } |
| 4035 _queryParams["part"] = [part]; |
| 4036 if (onBehalfOfContentOwner != null) { |
| 4037 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 4038 } |
| 4039 |
| 4040 |
| 4041 _url = 'videos'; |
| 4042 |
| 4043 var _response = _requester.request(_url, |
| 4044 "PUT", |
| 4045 body: _body, |
| 4046 queryParams: _queryParams, |
| 4047 uploadOptions: _uploadOptions, |
| 4048 uploadMedia: _uploadMedia, |
| 4049 downloadOptions: _downloadOptions); |
| 4050 return _response.then((data) => new Video.fromJson(data)); |
| 4051 } |
| 4052 |
| 4053 } |
| 4054 |
| 4055 |
| 4056 /** Not documented yet. */ |
| 4057 class WatermarksResourceApi { |
| 4058 final common_internal.ApiRequester _requester; |
| 4059 |
| 4060 WatermarksResourceApi(common_internal.ApiRequester client) : |
| 4061 _requester = client; |
| 4062 |
| 4063 /** |
| 4064 * Uploads a watermark image to YouTube and sets it for a channel. |
| 4065 * |
| 4066 * [request] - The metadata request object. |
| 4067 * |
| 4068 * Request parameters: |
| 4069 * |
| 4070 * [channelId] - The channelId parameter specifies a YouTube channel ID for |
| 4071 * which the watermark is being provided. |
| 4072 * |
| 4073 * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter indicates |
| 4074 * that the authenticated user is acting on behalf of the content owner |
| 4075 * specified in the parameter value. This parameter is intended for YouTube |
| 4076 * content partners that own and manage many different YouTube channels. It |
| 4077 * allows content owners to authenticate once and get access to all their |
| 4078 * video and channel data, without having to provide authentication |
| 4079 * credentials for each individual channel. The actual CMS account that the |
| 4080 * user authenticates with needs to be linked to the specified YouTube content |
| 4081 * owner. |
| 4082 * |
| 4083 * [uploadMedia] - The media to upload. |
| 4084 * |
| 4085 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 4086 * length being known ahead of time is only supported via resumable uploads. |
| 4087 * |
| 4088 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4089 * error. |
| 4090 * |
| 4091 * If the used [http.Client] completes with an error when making a REST call, |
| 4092 * this method will complete with the same error. |
| 4093 */ |
| 4094 async.Future set(InvideoBranding request, core.String channelId, {core.String
onBehalfOfContentOwner, common.UploadOptions uploadOptions : common.UploadOption
s.Default, common.Media uploadMedia}) { |
| 4095 var _url = null; |
| 4096 var _queryParams = new core.Map(); |
| 4097 var _uploadMedia = null; |
| 4098 var _uploadOptions = null; |
| 4099 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4100 var _body = null; |
| 4101 |
| 4102 if (request != null) { |
| 4103 _body = convert.JSON.encode((request).toJson()); |
| 4104 } |
| 4105 if (channelId == null) { |
| 4106 throw new core.ArgumentError("Parameter channelId is required."); |
| 4107 } |
| 4108 _queryParams["channelId"] = [channelId]; |
| 4109 if (onBehalfOfContentOwner != null) { |
| 4110 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 4111 } |
| 4112 |
| 4113 _uploadMedia = uploadMedia; |
| 4114 _uploadOptions = uploadOptions; |
| 4115 _downloadOptions = null; |
| 4116 |
| 4117 if (_uploadMedia == null) { |
| 4118 _url = 'watermarks/set'; |
| 4119 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 4120 _url = '/resumable/upload/youtube/v3/watermarks/set'; |
| 4121 } else { |
| 4122 _url = '/upload/youtube/v3/watermarks/set'; |
| 4123 } |
| 4124 |
| 4125 |
| 4126 var _response = _requester.request(_url, |
| 4127 "POST", |
| 4128 body: _body, |
| 4129 queryParams: _queryParams, |
| 4130 uploadOptions: _uploadOptions, |
| 4131 uploadMedia: _uploadMedia, |
| 4132 downloadOptions: _downloadOptions); |
| 4133 return _response.then((data) => null); |
| 4134 } |
| 4135 |
| 4136 /** |
| 4137 * Deletes a watermark. |
| 4138 * |
| 4139 * Request parameters: |
| 4140 * |
| 4141 * [channelId] - The channelId parameter specifies a YouTube channel ID for |
| 4142 * which the watermark is being unset. |
| 4143 * |
| 4144 * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter indicates |
| 4145 * that the authenticated user is acting on behalf of the content owner |
| 4146 * specified in the parameter value. This parameter is intended for YouTube |
| 4147 * content partners that own and manage many different YouTube channels. It |
| 4148 * allows content owners to authenticate once and get access to all their |
| 4149 * video and channel data, without having to provide authentication |
| 4150 * credentials for each individual channel. The actual CMS account that the |
| 4151 * user authenticates with needs to be linked to the specified YouTube content |
| 4152 * owner. |
| 4153 * |
| 4154 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4155 * error. |
| 4156 * |
| 4157 * If the used [http.Client] completes with an error when making a REST call, |
| 4158 * this method will complete with the same error. |
| 4159 */ |
| 4160 async.Future unset(core.String channelId, {core.String onBehalfOfContentOwner}
) { |
| 4161 var _url = null; |
| 4162 var _queryParams = new core.Map(); |
| 4163 var _uploadMedia = null; |
| 4164 var _uploadOptions = null; |
| 4165 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4166 var _body = null; |
| 4167 |
| 4168 if (channelId == null) { |
| 4169 throw new core.ArgumentError("Parameter channelId is required."); |
| 4170 } |
| 4171 _queryParams["channelId"] = [channelId]; |
| 4172 if (onBehalfOfContentOwner != null) { |
| 4173 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 4174 } |
| 4175 |
| 4176 _downloadOptions = null; |
| 4177 |
| 4178 _url = 'watermarks/unset'; |
| 4179 |
| 4180 var _response = _requester.request(_url, |
| 4181 "POST", |
| 4182 body: _body, |
| 4183 queryParams: _queryParams, |
| 4184 uploadOptions: _uploadOptions, |
| 4185 uploadMedia: _uploadMedia, |
| 4186 downloadOptions: _downloadOptions); |
| 4187 return _response.then((data) => null); |
| 4188 } |
| 4189 |
| 4190 } |
| 4191 |
| 4192 |
| 4193 |
| 4194 /** Rights management policy for YouTube resources. */ |
| 4195 class AccessPolicy { |
| 4196 /** |
| 4197 * The value of allowed indicates whether the access to the policy is allowed |
| 4198 * or denied by default. |
| 4199 */ |
| 4200 core.bool allowed; |
| 4201 |
| 4202 /** |
| 4203 * A list of region codes that identify countries where the default policy do |
| 4204 * not apply. |
| 4205 */ |
| 4206 core.List<core.String> exception; |
| 4207 |
| 4208 |
| 4209 AccessPolicy(); |
| 4210 |
| 4211 AccessPolicy.fromJson(core.Map _json) { |
| 4212 if (_json.containsKey("allowed")) { |
| 4213 allowed = _json["allowed"]; |
| 4214 } |
| 4215 if (_json.containsKey("exception")) { |
| 4216 exception = _json["exception"]; |
| 4217 } |
| 4218 } |
| 4219 |
| 4220 core.Map toJson() { |
| 4221 var _json = new core.Map(); |
| 4222 if (allowed != null) { |
| 4223 _json["allowed"] = allowed; |
| 4224 } |
| 4225 if (exception != null) { |
| 4226 _json["exception"] = exception; |
| 4227 } |
| 4228 return _json; |
| 4229 } |
| 4230 } |
| 4231 |
| 4232 |
| 4233 /** |
| 4234 * An activity resource contains information about an action that a particular |
| 4235 * channel, or user, has taken on YouTube.The actions reported in activity feeds |
| 4236 * include rating a video, sharing a video, marking a video as a favorite, |
| 4237 * commenting on a video, uploading a video, and so forth. Each activity |
| 4238 * resource identifies the type of action, the channel associated with the |
| 4239 * action, and the resource(s) associated with the action, such as the video |
| 4240 * that was rated or uploaded. |
| 4241 */ |
| 4242 class Activity { |
| 4243 /** |
| 4244 * The contentDetails object contains information about the content associated |
| 4245 * with the activity. For example, if the snippet.type value is videoRated, |
| 4246 * then the contentDetails object's content identifies the rated video. |
| 4247 */ |
| 4248 ActivityContentDetails contentDetails; |
| 4249 |
| 4250 /** Etag of this resource. */ |
| 4251 core.String etag; |
| 4252 |
| 4253 /** The ID that YouTube uses to uniquely identify the activity. */ |
| 4254 core.String id; |
| 4255 |
| 4256 /** |
| 4257 * Identifies what kind of resource this is. Value: the fixed string |
| 4258 * "youtube#activity". |
| 4259 */ |
| 4260 core.String kind; |
| 4261 |
| 4262 /** |
| 4263 * The snippet object contains basic details about the activity, including the |
| 4264 * activity's type and group ID. |
| 4265 */ |
| 4266 ActivitySnippet snippet; |
| 4267 |
| 4268 |
| 4269 Activity(); |
| 4270 |
| 4271 Activity.fromJson(core.Map _json) { |
| 4272 if (_json.containsKey("contentDetails")) { |
| 4273 contentDetails = new ActivityContentDetails.fromJson(_json["contentDetails
"]); |
| 4274 } |
| 4275 if (_json.containsKey("etag")) { |
| 4276 etag = _json["etag"]; |
| 4277 } |
| 4278 if (_json.containsKey("id")) { |
| 4279 id = _json["id"]; |
| 4280 } |
| 4281 if (_json.containsKey("kind")) { |
| 4282 kind = _json["kind"]; |
| 4283 } |
| 4284 if (_json.containsKey("snippet")) { |
| 4285 snippet = new ActivitySnippet.fromJson(_json["snippet"]); |
| 4286 } |
| 4287 } |
| 4288 |
| 4289 core.Map toJson() { |
| 4290 var _json = new core.Map(); |
| 4291 if (contentDetails != null) { |
| 4292 _json["contentDetails"] = (contentDetails).toJson(); |
| 4293 } |
| 4294 if (etag != null) { |
| 4295 _json["etag"] = etag; |
| 4296 } |
| 4297 if (id != null) { |
| 4298 _json["id"] = id; |
| 4299 } |
| 4300 if (kind != null) { |
| 4301 _json["kind"] = kind; |
| 4302 } |
| 4303 if (snippet != null) { |
| 4304 _json["snippet"] = (snippet).toJson(); |
| 4305 } |
| 4306 return _json; |
| 4307 } |
| 4308 } |
| 4309 |
| 4310 |
| 4311 /** |
| 4312 * Details about the content of an activity: the video that was shared, the |
| 4313 * channel that was subscribed to, etc. |
| 4314 */ |
| 4315 class ActivityContentDetails { |
| 4316 /** |
| 4317 * The bulletin object contains details about a channel bulletin post. This |
| 4318 * object is only present if the snippet.type is bulletin. |
| 4319 */ |
| 4320 ActivityContentDetailsBulletin bulletin; |
| 4321 |
| 4322 /** |
| 4323 * The channelItem object contains details about a resource which was added to |
| 4324 * a channel. This property is only present if the snippet.type is |
| 4325 * channelItem. |
| 4326 */ |
| 4327 ActivityContentDetailsChannelItem channelItem; |
| 4328 |
| 4329 /** |
| 4330 * The comment object contains information about a resource that received a |
| 4331 * comment. This property is only present if the snippet.type is comment. |
| 4332 */ |
| 4333 ActivityContentDetailsComment comment; |
| 4334 |
| 4335 /** |
| 4336 * The favorite object contains information about a video that was marked as a |
| 4337 * favorite video. This property is only present if the snippet.type is |
| 4338 * favorite. |
| 4339 */ |
| 4340 ActivityContentDetailsFavorite favorite; |
| 4341 |
| 4342 /** |
| 4343 * The like object contains information about a resource that received a |
| 4344 * positive (like) rating. This property is only present if the snippet.type |
| 4345 * is like. |
| 4346 */ |
| 4347 ActivityContentDetailsLike like; |
| 4348 |
| 4349 /** |
| 4350 * The playlistItem object contains information about a new playlist item. |
| 4351 * This property is only present if the snippet.type is playlistItem. |
| 4352 */ |
| 4353 ActivityContentDetailsPlaylistItem playlistItem; |
| 4354 |
| 4355 /** |
| 4356 * The promotedItem object contains details about a resource which is being |
| 4357 * promoted. This property is only present if the snippet.type is |
| 4358 * promotedItem. |
| 4359 */ |
| 4360 ActivityContentDetailsPromotedItem promotedItem; |
| 4361 |
| 4362 /** |
| 4363 * The recommendation object contains information about a recommended |
| 4364 * resource. This property is only present if the snippet.type is |
| 4365 * recommendation. |
| 4366 */ |
| 4367 ActivityContentDetailsRecommendation recommendation; |
| 4368 |
| 4369 /** |
| 4370 * The social object contains details about a social network post. This |
| 4371 * property is only present if the snippet.type is social. |
| 4372 */ |
| 4373 ActivityContentDetailsSocial social; |
| 4374 |
| 4375 /** |
| 4376 * The subscription object contains information about a channel that a user |
| 4377 * subscribed to. This property is only present if the snippet.type is |
| 4378 * subscription. |
| 4379 */ |
| 4380 ActivityContentDetailsSubscription subscription; |
| 4381 |
| 4382 /** |
| 4383 * The upload object contains information about the uploaded video. This |
| 4384 * property is only present if the snippet.type is upload. |
| 4385 */ |
| 4386 ActivityContentDetailsUpload upload; |
| 4387 |
| 4388 |
| 4389 ActivityContentDetails(); |
| 4390 |
| 4391 ActivityContentDetails.fromJson(core.Map _json) { |
| 4392 if (_json.containsKey("bulletin")) { |
| 4393 bulletin = new ActivityContentDetailsBulletin.fromJson(_json["bulletin"]); |
| 4394 } |
| 4395 if (_json.containsKey("channelItem")) { |
| 4396 channelItem = new ActivityContentDetailsChannelItem.fromJson(_json["channe
lItem"]); |
| 4397 } |
| 4398 if (_json.containsKey("comment")) { |
| 4399 comment = new ActivityContentDetailsComment.fromJson(_json["comment"]); |
| 4400 } |
| 4401 if (_json.containsKey("favorite")) { |
| 4402 favorite = new ActivityContentDetailsFavorite.fromJson(_json["favorite"]); |
| 4403 } |
| 4404 if (_json.containsKey("like")) { |
| 4405 like = new ActivityContentDetailsLike.fromJson(_json["like"]); |
| 4406 } |
| 4407 if (_json.containsKey("playlistItem")) { |
| 4408 playlistItem = new ActivityContentDetailsPlaylistItem.fromJson(_json["play
listItem"]); |
| 4409 } |
| 4410 if (_json.containsKey("promotedItem")) { |
| 4411 promotedItem = new ActivityContentDetailsPromotedItem.fromJson(_json["prom
otedItem"]); |
| 4412 } |
| 4413 if (_json.containsKey("recommendation")) { |
| 4414 recommendation = new ActivityContentDetailsRecommendation.fromJson(_json["
recommendation"]); |
| 4415 } |
| 4416 if (_json.containsKey("social")) { |
| 4417 social = new ActivityContentDetailsSocial.fromJson(_json["social"]); |
| 4418 } |
| 4419 if (_json.containsKey("subscription")) { |
| 4420 subscription = new ActivityContentDetailsSubscription.fromJson(_json["subs
cription"]); |
| 4421 } |
| 4422 if (_json.containsKey("upload")) { |
| 4423 upload = new ActivityContentDetailsUpload.fromJson(_json["upload"]); |
| 4424 } |
| 4425 } |
| 4426 |
| 4427 core.Map toJson() { |
| 4428 var _json = new core.Map(); |
| 4429 if (bulletin != null) { |
| 4430 _json["bulletin"] = (bulletin).toJson(); |
| 4431 } |
| 4432 if (channelItem != null) { |
| 4433 _json["channelItem"] = (channelItem).toJson(); |
| 4434 } |
| 4435 if (comment != null) { |
| 4436 _json["comment"] = (comment).toJson(); |
| 4437 } |
| 4438 if (favorite != null) { |
| 4439 _json["favorite"] = (favorite).toJson(); |
| 4440 } |
| 4441 if (like != null) { |
| 4442 _json["like"] = (like).toJson(); |
| 4443 } |
| 4444 if (playlistItem != null) { |
| 4445 _json["playlistItem"] = (playlistItem).toJson(); |
| 4446 } |
| 4447 if (promotedItem != null) { |
| 4448 _json["promotedItem"] = (promotedItem).toJson(); |
| 4449 } |
| 4450 if (recommendation != null) { |
| 4451 _json["recommendation"] = (recommendation).toJson(); |
| 4452 } |
| 4453 if (social != null) { |
| 4454 _json["social"] = (social).toJson(); |
| 4455 } |
| 4456 if (subscription != null) { |
| 4457 _json["subscription"] = (subscription).toJson(); |
| 4458 } |
| 4459 if (upload != null) { |
| 4460 _json["upload"] = (upload).toJson(); |
| 4461 } |
| 4462 return _json; |
| 4463 } |
| 4464 } |
| 4465 |
| 4466 |
| 4467 /** Details about a channel bulletin post. */ |
| 4468 class ActivityContentDetailsBulletin { |
| 4469 /** |
| 4470 * The resourceId object contains information that identifies the resource |
| 4471 * associated with a bulletin post. |
| 4472 */ |
| 4473 ResourceId resourceId; |
| 4474 |
| 4475 |
| 4476 ActivityContentDetailsBulletin(); |
| 4477 |
| 4478 ActivityContentDetailsBulletin.fromJson(core.Map _json) { |
| 4479 if (_json.containsKey("resourceId")) { |
| 4480 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4481 } |
| 4482 } |
| 4483 |
| 4484 core.Map toJson() { |
| 4485 var _json = new core.Map(); |
| 4486 if (resourceId != null) { |
| 4487 _json["resourceId"] = (resourceId).toJson(); |
| 4488 } |
| 4489 return _json; |
| 4490 } |
| 4491 } |
| 4492 |
| 4493 |
| 4494 /** Details about a resource which was added to a channel. */ |
| 4495 class ActivityContentDetailsChannelItem { |
| 4496 /** |
| 4497 * The resourceId object contains information that identifies the resource |
| 4498 * that was added to the channel. |
| 4499 */ |
| 4500 ResourceId resourceId; |
| 4501 |
| 4502 |
| 4503 ActivityContentDetailsChannelItem(); |
| 4504 |
| 4505 ActivityContentDetailsChannelItem.fromJson(core.Map _json) { |
| 4506 if (_json.containsKey("resourceId")) { |
| 4507 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4508 } |
| 4509 } |
| 4510 |
| 4511 core.Map toJson() { |
| 4512 var _json = new core.Map(); |
| 4513 if (resourceId != null) { |
| 4514 _json["resourceId"] = (resourceId).toJson(); |
| 4515 } |
| 4516 return _json; |
| 4517 } |
| 4518 } |
| 4519 |
| 4520 |
| 4521 /** Information about a resource that received a comment. */ |
| 4522 class ActivityContentDetailsComment { |
| 4523 /** |
| 4524 * The resourceId object contains information that identifies the resource |
| 4525 * associated with the comment. |
| 4526 */ |
| 4527 ResourceId resourceId; |
| 4528 |
| 4529 |
| 4530 ActivityContentDetailsComment(); |
| 4531 |
| 4532 ActivityContentDetailsComment.fromJson(core.Map _json) { |
| 4533 if (_json.containsKey("resourceId")) { |
| 4534 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4535 } |
| 4536 } |
| 4537 |
| 4538 core.Map toJson() { |
| 4539 var _json = new core.Map(); |
| 4540 if (resourceId != null) { |
| 4541 _json["resourceId"] = (resourceId).toJson(); |
| 4542 } |
| 4543 return _json; |
| 4544 } |
| 4545 } |
| 4546 |
| 4547 |
| 4548 /** Information about a video that was marked as a favorite video. */ |
| 4549 class ActivityContentDetailsFavorite { |
| 4550 /** |
| 4551 * The resourceId object contains information that identifies the resource |
| 4552 * that was marked as a favorite. |
| 4553 */ |
| 4554 ResourceId resourceId; |
| 4555 |
| 4556 |
| 4557 ActivityContentDetailsFavorite(); |
| 4558 |
| 4559 ActivityContentDetailsFavorite.fromJson(core.Map _json) { |
| 4560 if (_json.containsKey("resourceId")) { |
| 4561 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4562 } |
| 4563 } |
| 4564 |
| 4565 core.Map toJson() { |
| 4566 var _json = new core.Map(); |
| 4567 if (resourceId != null) { |
| 4568 _json["resourceId"] = (resourceId).toJson(); |
| 4569 } |
| 4570 return _json; |
| 4571 } |
| 4572 } |
| 4573 |
| 4574 |
| 4575 /** Information about a resource that received a positive (like) rating. */ |
| 4576 class ActivityContentDetailsLike { |
| 4577 /** |
| 4578 * The resourceId object contains information that identifies the rated |
| 4579 * resource. |
| 4580 */ |
| 4581 ResourceId resourceId; |
| 4582 |
| 4583 |
| 4584 ActivityContentDetailsLike(); |
| 4585 |
| 4586 ActivityContentDetailsLike.fromJson(core.Map _json) { |
| 4587 if (_json.containsKey("resourceId")) { |
| 4588 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4589 } |
| 4590 } |
| 4591 |
| 4592 core.Map toJson() { |
| 4593 var _json = new core.Map(); |
| 4594 if (resourceId != null) { |
| 4595 _json["resourceId"] = (resourceId).toJson(); |
| 4596 } |
| 4597 return _json; |
| 4598 } |
| 4599 } |
| 4600 |
| 4601 |
| 4602 /** Information about a new playlist item. */ |
| 4603 class ActivityContentDetailsPlaylistItem { |
| 4604 /** The value that YouTube uses to uniquely identify the playlist. */ |
| 4605 core.String playlistId; |
| 4606 |
| 4607 /** ID of the item within the playlist. */ |
| 4608 core.String playlistItemId; |
| 4609 |
| 4610 /** |
| 4611 * The resourceId object contains information about the resource that was |
| 4612 * added to the playlist. |
| 4613 */ |
| 4614 ResourceId resourceId; |
| 4615 |
| 4616 |
| 4617 ActivityContentDetailsPlaylistItem(); |
| 4618 |
| 4619 ActivityContentDetailsPlaylistItem.fromJson(core.Map _json) { |
| 4620 if (_json.containsKey("playlistId")) { |
| 4621 playlistId = _json["playlistId"]; |
| 4622 } |
| 4623 if (_json.containsKey("playlistItemId")) { |
| 4624 playlistItemId = _json["playlistItemId"]; |
| 4625 } |
| 4626 if (_json.containsKey("resourceId")) { |
| 4627 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4628 } |
| 4629 } |
| 4630 |
| 4631 core.Map toJson() { |
| 4632 var _json = new core.Map(); |
| 4633 if (playlistId != null) { |
| 4634 _json["playlistId"] = playlistId; |
| 4635 } |
| 4636 if (playlistItemId != null) { |
| 4637 _json["playlistItemId"] = playlistItemId; |
| 4638 } |
| 4639 if (resourceId != null) { |
| 4640 _json["resourceId"] = (resourceId).toJson(); |
| 4641 } |
| 4642 return _json; |
| 4643 } |
| 4644 } |
| 4645 |
| 4646 |
| 4647 /** Details about a resource which is being promoted. */ |
| 4648 class ActivityContentDetailsPromotedItem { |
| 4649 /** The URL the client should fetch to request a promoted item. */ |
| 4650 core.String adTag; |
| 4651 |
| 4652 /** |
| 4653 * The URL the client should ping to indicate that the user clicked through on |
| 4654 * this promoted item. |
| 4655 */ |
| 4656 core.String clickTrackingUrl; |
| 4657 |
| 4658 /** |
| 4659 * The URL the client should ping to indicate that the user was shown this |
| 4660 * promoted item. |
| 4661 */ |
| 4662 core.String creativeViewUrl; |
| 4663 |
| 4664 /** |
| 4665 * The type of call-to-action, a message to the user indicating action that |
| 4666 * can be taken. |
| 4667 * Possible string values are: |
| 4668 * - "unspecified" |
| 4669 * - "visitAdvertiserSite" |
| 4670 */ |
| 4671 core.String ctaType; |
| 4672 |
| 4673 /** |
| 4674 * The custom call-to-action button text. If specified, it will override the |
| 4675 * default button text for the cta_type. |
| 4676 */ |
| 4677 core.String customCtaButtonText; |
| 4678 |
| 4679 /** The text description to accompany the promoted item. */ |
| 4680 core.String descriptionText; |
| 4681 |
| 4682 /** |
| 4683 * The URL the client should direct the user to, if the user chooses to visit |
| 4684 * the advertiser's website. |
| 4685 */ |
| 4686 core.String destinationUrl; |
| 4687 |
| 4688 /** |
| 4689 * The list of forecasting URLs. The client should ping all of these URLs when |
| 4690 * a promoted item is not available, to indicate that a promoted item could |
| 4691 * have been shown. |
| 4692 */ |
| 4693 core.List<core.String> forecastingUrl; |
| 4694 |
| 4695 /** |
| 4696 * The list of impression URLs. The client should ping all of these URLs to |
| 4697 * indicate that the user was shown this promoted item. |
| 4698 */ |
| 4699 core.List<core.String> impressionUrl; |
| 4700 |
| 4701 /** The ID that YouTube uses to uniquely identify the promoted video. */ |
| 4702 core.String videoId; |
| 4703 |
| 4704 |
| 4705 ActivityContentDetailsPromotedItem(); |
| 4706 |
| 4707 ActivityContentDetailsPromotedItem.fromJson(core.Map _json) { |
| 4708 if (_json.containsKey("adTag")) { |
| 4709 adTag = _json["adTag"]; |
| 4710 } |
| 4711 if (_json.containsKey("clickTrackingUrl")) { |
| 4712 clickTrackingUrl = _json["clickTrackingUrl"]; |
| 4713 } |
| 4714 if (_json.containsKey("creativeViewUrl")) { |
| 4715 creativeViewUrl = _json["creativeViewUrl"]; |
| 4716 } |
| 4717 if (_json.containsKey("ctaType")) { |
| 4718 ctaType = _json["ctaType"]; |
| 4719 } |
| 4720 if (_json.containsKey("customCtaButtonText")) { |
| 4721 customCtaButtonText = _json["customCtaButtonText"]; |
| 4722 } |
| 4723 if (_json.containsKey("descriptionText")) { |
| 4724 descriptionText = _json["descriptionText"]; |
| 4725 } |
| 4726 if (_json.containsKey("destinationUrl")) { |
| 4727 destinationUrl = _json["destinationUrl"]; |
| 4728 } |
| 4729 if (_json.containsKey("forecastingUrl")) { |
| 4730 forecastingUrl = _json["forecastingUrl"]; |
| 4731 } |
| 4732 if (_json.containsKey("impressionUrl")) { |
| 4733 impressionUrl = _json["impressionUrl"]; |
| 4734 } |
| 4735 if (_json.containsKey("videoId")) { |
| 4736 videoId = _json["videoId"]; |
| 4737 } |
| 4738 } |
| 4739 |
| 4740 core.Map toJson() { |
| 4741 var _json = new core.Map(); |
| 4742 if (adTag != null) { |
| 4743 _json["adTag"] = adTag; |
| 4744 } |
| 4745 if (clickTrackingUrl != null) { |
| 4746 _json["clickTrackingUrl"] = clickTrackingUrl; |
| 4747 } |
| 4748 if (creativeViewUrl != null) { |
| 4749 _json["creativeViewUrl"] = creativeViewUrl; |
| 4750 } |
| 4751 if (ctaType != null) { |
| 4752 _json["ctaType"] = ctaType; |
| 4753 } |
| 4754 if (customCtaButtonText != null) { |
| 4755 _json["customCtaButtonText"] = customCtaButtonText; |
| 4756 } |
| 4757 if (descriptionText != null) { |
| 4758 _json["descriptionText"] = descriptionText; |
| 4759 } |
| 4760 if (destinationUrl != null) { |
| 4761 _json["destinationUrl"] = destinationUrl; |
| 4762 } |
| 4763 if (forecastingUrl != null) { |
| 4764 _json["forecastingUrl"] = forecastingUrl; |
| 4765 } |
| 4766 if (impressionUrl != null) { |
| 4767 _json["impressionUrl"] = impressionUrl; |
| 4768 } |
| 4769 if (videoId != null) { |
| 4770 _json["videoId"] = videoId; |
| 4771 } |
| 4772 return _json; |
| 4773 } |
| 4774 } |
| 4775 |
| 4776 |
| 4777 /** Information that identifies the recommended resource. */ |
| 4778 class ActivityContentDetailsRecommendation { |
| 4779 /** |
| 4780 * The reason that the resource is recommended to the user. |
| 4781 * Possible string values are: |
| 4782 * - "unspecified" |
| 4783 * - "videoFavorited" |
| 4784 * - "videoLiked" |
| 4785 * - "videoWatched" |
| 4786 */ |
| 4787 core.String reason; |
| 4788 |
| 4789 /** |
| 4790 * The resourceId object contains information that identifies the recommended |
| 4791 * resource. |
| 4792 */ |
| 4793 ResourceId resourceId; |
| 4794 |
| 4795 /** |
| 4796 * The seedResourceId object contains information about the resource that |
| 4797 * caused the recommendation. |
| 4798 */ |
| 4799 ResourceId seedResourceId; |
| 4800 |
| 4801 |
| 4802 ActivityContentDetailsRecommendation(); |
| 4803 |
| 4804 ActivityContentDetailsRecommendation.fromJson(core.Map _json) { |
| 4805 if (_json.containsKey("reason")) { |
| 4806 reason = _json["reason"]; |
| 4807 } |
| 4808 if (_json.containsKey("resourceId")) { |
| 4809 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4810 } |
| 4811 if (_json.containsKey("seedResourceId")) { |
| 4812 seedResourceId = new ResourceId.fromJson(_json["seedResourceId"]); |
| 4813 } |
| 4814 } |
| 4815 |
| 4816 core.Map toJson() { |
| 4817 var _json = new core.Map(); |
| 4818 if (reason != null) { |
| 4819 _json["reason"] = reason; |
| 4820 } |
| 4821 if (resourceId != null) { |
| 4822 _json["resourceId"] = (resourceId).toJson(); |
| 4823 } |
| 4824 if (seedResourceId != null) { |
| 4825 _json["seedResourceId"] = (seedResourceId).toJson(); |
| 4826 } |
| 4827 return _json; |
| 4828 } |
| 4829 } |
| 4830 |
| 4831 |
| 4832 /** Details about a social network post. */ |
| 4833 class ActivityContentDetailsSocial { |
| 4834 /** The author of the social network post. */ |
| 4835 core.String author; |
| 4836 |
| 4837 /** An image of the post's author. */ |
| 4838 core.String imageUrl; |
| 4839 |
| 4840 /** The URL of the social network post. */ |
| 4841 core.String referenceUrl; |
| 4842 |
| 4843 /** |
| 4844 * The resourceId object encapsulates information that identifies the resource |
| 4845 * associated with a social network post. |
| 4846 */ |
| 4847 ResourceId resourceId; |
| 4848 |
| 4849 /** |
| 4850 * The name of the social network. |
| 4851 * Possible string values are: |
| 4852 * - "facebook" |
| 4853 * - "googlePlus" |
| 4854 * - "twitter" |
| 4855 * - "unspecified" |
| 4856 */ |
| 4857 core.String type; |
| 4858 |
| 4859 |
| 4860 ActivityContentDetailsSocial(); |
| 4861 |
| 4862 ActivityContentDetailsSocial.fromJson(core.Map _json) { |
| 4863 if (_json.containsKey("author")) { |
| 4864 author = _json["author"]; |
| 4865 } |
| 4866 if (_json.containsKey("imageUrl")) { |
| 4867 imageUrl = _json["imageUrl"]; |
| 4868 } |
| 4869 if (_json.containsKey("referenceUrl")) { |
| 4870 referenceUrl = _json["referenceUrl"]; |
| 4871 } |
| 4872 if (_json.containsKey("resourceId")) { |
| 4873 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4874 } |
| 4875 if (_json.containsKey("type")) { |
| 4876 type = _json["type"]; |
| 4877 } |
| 4878 } |
| 4879 |
| 4880 core.Map toJson() { |
| 4881 var _json = new core.Map(); |
| 4882 if (author != null) { |
| 4883 _json["author"] = author; |
| 4884 } |
| 4885 if (imageUrl != null) { |
| 4886 _json["imageUrl"] = imageUrl; |
| 4887 } |
| 4888 if (referenceUrl != null) { |
| 4889 _json["referenceUrl"] = referenceUrl; |
| 4890 } |
| 4891 if (resourceId != null) { |
| 4892 _json["resourceId"] = (resourceId).toJson(); |
| 4893 } |
| 4894 if (type != null) { |
| 4895 _json["type"] = type; |
| 4896 } |
| 4897 return _json; |
| 4898 } |
| 4899 } |
| 4900 |
| 4901 |
| 4902 /** Information about a channel that a user subscribed to. */ |
| 4903 class ActivityContentDetailsSubscription { |
| 4904 /** |
| 4905 * The resourceId object contains information that identifies the resource |
| 4906 * that the user subscribed to. |
| 4907 */ |
| 4908 ResourceId resourceId; |
| 4909 |
| 4910 |
| 4911 ActivityContentDetailsSubscription(); |
| 4912 |
| 4913 ActivityContentDetailsSubscription.fromJson(core.Map _json) { |
| 4914 if (_json.containsKey("resourceId")) { |
| 4915 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 4916 } |
| 4917 } |
| 4918 |
| 4919 core.Map toJson() { |
| 4920 var _json = new core.Map(); |
| 4921 if (resourceId != null) { |
| 4922 _json["resourceId"] = (resourceId).toJson(); |
| 4923 } |
| 4924 return _json; |
| 4925 } |
| 4926 } |
| 4927 |
| 4928 |
| 4929 /** Information about the uploaded video. */ |
| 4930 class ActivityContentDetailsUpload { |
| 4931 /** The ID that YouTube uses to uniquely identify the uploaded video. */ |
| 4932 core.String videoId; |
| 4933 |
| 4934 |
| 4935 ActivityContentDetailsUpload(); |
| 4936 |
| 4937 ActivityContentDetailsUpload.fromJson(core.Map _json) { |
| 4938 if (_json.containsKey("videoId")) { |
| 4939 videoId = _json["videoId"]; |
| 4940 } |
| 4941 } |
| 4942 |
| 4943 core.Map toJson() { |
| 4944 var _json = new core.Map(); |
| 4945 if (videoId != null) { |
| 4946 _json["videoId"] = videoId; |
| 4947 } |
| 4948 return _json; |
| 4949 } |
| 4950 } |
| 4951 |
| 4952 |
| 4953 /** Not documented yet. */ |
| 4954 class ActivityListResponse { |
| 4955 /** Etag of this resource. */ |
| 4956 core.String etag; |
| 4957 |
| 4958 /** Serialized EventId of the request which produced this response. */ |
| 4959 core.String eventId; |
| 4960 |
| 4961 /** A list of activities, or events, that match the request criteria. */ |
| 4962 core.List<Activity> items; |
| 4963 |
| 4964 /** |
| 4965 * Identifies what kind of resource this is. Value: the fixed string |
| 4966 * "youtube#activityListResponse". |
| 4967 */ |
| 4968 core.String kind; |
| 4969 |
| 4970 /** |
| 4971 * The token that can be used as the value of the pageToken parameter to |
| 4972 * retrieve the next page in the result set. |
| 4973 */ |
| 4974 core.String nextPageToken; |
| 4975 |
| 4976 /** Not documented yet. */ |
| 4977 PageInfo pageInfo; |
| 4978 |
| 4979 /** |
| 4980 * The token that can be used as the value of the pageToken parameter to |
| 4981 * retrieve the previous page in the result set. |
| 4982 */ |
| 4983 core.String prevPageToken; |
| 4984 |
| 4985 /** Not documented yet. */ |
| 4986 TokenPagination tokenPagination; |
| 4987 |
| 4988 /** The visitorId identifies the visitor. */ |
| 4989 core.String visitorId; |
| 4990 |
| 4991 |
| 4992 ActivityListResponse(); |
| 4993 |
| 4994 ActivityListResponse.fromJson(core.Map _json) { |
| 4995 if (_json.containsKey("etag")) { |
| 4996 etag = _json["etag"]; |
| 4997 } |
| 4998 if (_json.containsKey("eventId")) { |
| 4999 eventId = _json["eventId"]; |
| 5000 } |
| 5001 if (_json.containsKey("items")) { |
| 5002 items = _json["items"].map((value) => new Activity.fromJson(value)).toList
(); |
| 5003 } |
| 5004 if (_json.containsKey("kind")) { |
| 5005 kind = _json["kind"]; |
| 5006 } |
| 5007 if (_json.containsKey("nextPageToken")) { |
| 5008 nextPageToken = _json["nextPageToken"]; |
| 5009 } |
| 5010 if (_json.containsKey("pageInfo")) { |
| 5011 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 5012 } |
| 5013 if (_json.containsKey("prevPageToken")) { |
| 5014 prevPageToken = _json["prevPageToken"]; |
| 5015 } |
| 5016 if (_json.containsKey("tokenPagination")) { |
| 5017 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 5018 } |
| 5019 if (_json.containsKey("visitorId")) { |
| 5020 visitorId = _json["visitorId"]; |
| 5021 } |
| 5022 } |
| 5023 |
| 5024 core.Map toJson() { |
| 5025 var _json = new core.Map(); |
| 5026 if (etag != null) { |
| 5027 _json["etag"] = etag; |
| 5028 } |
| 5029 if (eventId != null) { |
| 5030 _json["eventId"] = eventId; |
| 5031 } |
| 5032 if (items != null) { |
| 5033 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5034 } |
| 5035 if (kind != null) { |
| 5036 _json["kind"] = kind; |
| 5037 } |
| 5038 if (nextPageToken != null) { |
| 5039 _json["nextPageToken"] = nextPageToken; |
| 5040 } |
| 5041 if (pageInfo != null) { |
| 5042 _json["pageInfo"] = (pageInfo).toJson(); |
| 5043 } |
| 5044 if (prevPageToken != null) { |
| 5045 _json["prevPageToken"] = prevPageToken; |
| 5046 } |
| 5047 if (tokenPagination != null) { |
| 5048 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 5049 } |
| 5050 if (visitorId != null) { |
| 5051 _json["visitorId"] = visitorId; |
| 5052 } |
| 5053 return _json; |
| 5054 } |
| 5055 } |
| 5056 |
| 5057 |
| 5058 /** |
| 5059 * Basic details about an activity, including title, description, thumbnails, |
| 5060 * activity type and group. |
| 5061 */ |
| 5062 class ActivitySnippet { |
| 5063 /** |
| 5064 * The ID that YouTube uses to uniquely identify the channel associated with |
| 5065 * the activity. |
| 5066 */ |
| 5067 core.String channelId; |
| 5068 |
| 5069 /** Channel title for the channel responsible for this activity */ |
| 5070 core.String channelTitle; |
| 5071 |
| 5072 /** |
| 5073 * The description of the resource primarily associated with the activity. |
| 5074 */ |
| 5075 core.String description; |
| 5076 |
| 5077 /** |
| 5078 * The group ID associated with the activity. A group ID identifies user |
| 5079 * events that are associated with the same user and resource. For example, if |
| 5080 * a user rates a video and marks the same video as a favorite, the entries |
| 5081 * for those events would have the same group ID in the user's activity feed. |
| 5082 * In your user interface, you can avoid repetition by grouping events with |
| 5083 * the same groupId value. |
| 5084 */ |
| 5085 core.String groupId; |
| 5086 |
| 5087 /** |
| 5088 * The date and time that the video was uploaded. The value is specified in |
| 5089 * ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 5090 */ |
| 5091 core.DateTime publishedAt; |
| 5092 |
| 5093 /** |
| 5094 * A map of thumbnail images associated with the resource that is primarily |
| 5095 * associated with the activity. For each object in the map, the key is the |
| 5096 * name of the thumbnail image, and the value is an object that contains other |
| 5097 * information about the thumbnail. |
| 5098 */ |
| 5099 ThumbnailDetails thumbnails; |
| 5100 |
| 5101 /** The title of the resource primarily associated with the activity. */ |
| 5102 core.String title; |
| 5103 |
| 5104 /** |
| 5105 * The type of activity that the resource describes. |
| 5106 * Possible string values are: |
| 5107 * - "bulletin" |
| 5108 * - "channelItem" |
| 5109 * - "comment" |
| 5110 * - "favorite" |
| 5111 * - "like" |
| 5112 * - "playlistItem" |
| 5113 * - "promotedItem" |
| 5114 * - "recommendation" |
| 5115 * - "social" |
| 5116 * - "subscription" |
| 5117 * - "upload" |
| 5118 */ |
| 5119 core.String type; |
| 5120 |
| 5121 |
| 5122 ActivitySnippet(); |
| 5123 |
| 5124 ActivitySnippet.fromJson(core.Map _json) { |
| 5125 if (_json.containsKey("channelId")) { |
| 5126 channelId = _json["channelId"]; |
| 5127 } |
| 5128 if (_json.containsKey("channelTitle")) { |
| 5129 channelTitle = _json["channelTitle"]; |
| 5130 } |
| 5131 if (_json.containsKey("description")) { |
| 5132 description = _json["description"]; |
| 5133 } |
| 5134 if (_json.containsKey("groupId")) { |
| 5135 groupId = _json["groupId"]; |
| 5136 } |
| 5137 if (_json.containsKey("publishedAt")) { |
| 5138 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 5139 } |
| 5140 if (_json.containsKey("thumbnails")) { |
| 5141 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 5142 } |
| 5143 if (_json.containsKey("title")) { |
| 5144 title = _json["title"]; |
| 5145 } |
| 5146 if (_json.containsKey("type")) { |
| 5147 type = _json["type"]; |
| 5148 } |
| 5149 } |
| 5150 |
| 5151 core.Map toJson() { |
| 5152 var _json = new core.Map(); |
| 5153 if (channelId != null) { |
| 5154 _json["channelId"] = channelId; |
| 5155 } |
| 5156 if (channelTitle != null) { |
| 5157 _json["channelTitle"] = channelTitle; |
| 5158 } |
| 5159 if (description != null) { |
| 5160 _json["description"] = description; |
| 5161 } |
| 5162 if (groupId != null) { |
| 5163 _json["groupId"] = groupId; |
| 5164 } |
| 5165 if (publishedAt != null) { |
| 5166 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 5167 } |
| 5168 if (thumbnails != null) { |
| 5169 _json["thumbnails"] = (thumbnails).toJson(); |
| 5170 } |
| 5171 if (title != null) { |
| 5172 _json["title"] = title; |
| 5173 } |
| 5174 if (type != null) { |
| 5175 _json["type"] = type; |
| 5176 } |
| 5177 return _json; |
| 5178 } |
| 5179 } |
| 5180 |
| 5181 |
| 5182 /** Brief description of the live stream cdn settings. */ |
| 5183 class CdnSettings { |
| 5184 /** The format of the video stream that you are sending to Youtube. */ |
| 5185 core.String format; |
| 5186 |
| 5187 /** |
| 5188 * The ingestionInfo object contains information that YouTube provides that |
| 5189 * you need to transmit your RTMP or HTTP stream to YouTube. |
| 5190 */ |
| 5191 IngestionInfo ingestionInfo; |
| 5192 |
| 5193 /** |
| 5194 * The method or protocol used to transmit the video stream. |
| 5195 * Possible string values are: |
| 5196 * - "rtmp" |
| 5197 */ |
| 5198 core.String ingestionType; |
| 5199 |
| 5200 |
| 5201 CdnSettings(); |
| 5202 |
| 5203 CdnSettings.fromJson(core.Map _json) { |
| 5204 if (_json.containsKey("format")) { |
| 5205 format = _json["format"]; |
| 5206 } |
| 5207 if (_json.containsKey("ingestionInfo")) { |
| 5208 ingestionInfo = new IngestionInfo.fromJson(_json["ingestionInfo"]); |
| 5209 } |
| 5210 if (_json.containsKey("ingestionType")) { |
| 5211 ingestionType = _json["ingestionType"]; |
| 5212 } |
| 5213 } |
| 5214 |
| 5215 core.Map toJson() { |
| 5216 var _json = new core.Map(); |
| 5217 if (format != null) { |
| 5218 _json["format"] = format; |
| 5219 } |
| 5220 if (ingestionInfo != null) { |
| 5221 _json["ingestionInfo"] = (ingestionInfo).toJson(); |
| 5222 } |
| 5223 if (ingestionType != null) { |
| 5224 _json["ingestionType"] = ingestionType; |
| 5225 } |
| 5226 return _json; |
| 5227 } |
| 5228 } |
| 5229 |
| 5230 |
| 5231 /** A channel resource contains information about a YouTube channel. */ |
| 5232 class Channel { |
| 5233 /** |
| 5234 * The auditionDetails object encapsulates channel data that is relevant for |
| 5235 * YouTube Partners during the audition process. |
| 5236 */ |
| 5237 ChannelAuditDetails auditDetails; |
| 5238 |
| 5239 /** |
| 5240 * The brandingSettings object encapsulates information about the branding of |
| 5241 * the channel. |
| 5242 */ |
| 5243 ChannelBrandingSettings brandingSettings; |
| 5244 |
| 5245 /** |
| 5246 * The contentDetails object encapsulates information about the channel's |
| 5247 * content. |
| 5248 */ |
| 5249 ChannelContentDetails contentDetails; |
| 5250 |
| 5251 /** |
| 5252 * The contentOwnerDetails object encapsulates channel data that is relevant |
| 5253 * for YouTube Partners linked with the channel. |
| 5254 */ |
| 5255 ChannelContentOwnerDetails contentOwnerDetails; |
| 5256 |
| 5257 /** |
| 5258 * The conversionPings object encapsulates information about conversion pings |
| 5259 * that need to be respected by the channel. |
| 5260 */ |
| 5261 ChannelConversionPings conversionPings; |
| 5262 |
| 5263 /** Etag of this resource. */ |
| 5264 core.String etag; |
| 5265 |
| 5266 /** The ID that YouTube uses to uniquely identify the channel. */ |
| 5267 core.String id; |
| 5268 |
| 5269 /** |
| 5270 * The invideoPromotion object encapsulates information about promotion |
| 5271 * campaign associated with the channel. |
| 5272 */ |
| 5273 InvideoPromotion invideoPromotion; |
| 5274 |
| 5275 /** |
| 5276 * Identifies what kind of resource this is. Value: the fixed string |
| 5277 * "youtube#channel". |
| 5278 */ |
| 5279 core.String kind; |
| 5280 |
| 5281 /** |
| 5282 * The snippet object contains basic details about the channel, such as its |
| 5283 * title, description, and thumbnail images. |
| 5284 */ |
| 5285 ChannelSnippet snippet; |
| 5286 |
| 5287 /** The statistics object encapsulates statistics for the channel. */ |
| 5288 ChannelStatistics statistics; |
| 5289 |
| 5290 /** |
| 5291 * The status object encapsulates information about the privacy status of the |
| 5292 * channel. |
| 5293 */ |
| 5294 ChannelStatus status; |
| 5295 |
| 5296 /** |
| 5297 * The topicDetails object encapsulates information about Freebase topics |
| 5298 * associated with the channel. |
| 5299 */ |
| 5300 ChannelTopicDetails topicDetails; |
| 5301 |
| 5302 |
| 5303 Channel(); |
| 5304 |
| 5305 Channel.fromJson(core.Map _json) { |
| 5306 if (_json.containsKey("auditDetails")) { |
| 5307 auditDetails = new ChannelAuditDetails.fromJson(_json["auditDetails"]); |
| 5308 } |
| 5309 if (_json.containsKey("brandingSettings")) { |
| 5310 brandingSettings = new ChannelBrandingSettings.fromJson(_json["brandingSet
tings"]); |
| 5311 } |
| 5312 if (_json.containsKey("contentDetails")) { |
| 5313 contentDetails = new ChannelContentDetails.fromJson(_json["contentDetails"
]); |
| 5314 } |
| 5315 if (_json.containsKey("contentOwnerDetails")) { |
| 5316 contentOwnerDetails = new ChannelContentOwnerDetails.fromJson(_json["conte
ntOwnerDetails"]); |
| 5317 } |
| 5318 if (_json.containsKey("conversionPings")) { |
| 5319 conversionPings = new ChannelConversionPings.fromJson(_json["conversionPin
gs"]); |
| 5320 } |
| 5321 if (_json.containsKey("etag")) { |
| 5322 etag = _json["etag"]; |
| 5323 } |
| 5324 if (_json.containsKey("id")) { |
| 5325 id = _json["id"]; |
| 5326 } |
| 5327 if (_json.containsKey("invideoPromotion")) { |
| 5328 invideoPromotion = new InvideoPromotion.fromJson(_json["invideoPromotion"]
); |
| 5329 } |
| 5330 if (_json.containsKey("kind")) { |
| 5331 kind = _json["kind"]; |
| 5332 } |
| 5333 if (_json.containsKey("snippet")) { |
| 5334 snippet = new ChannelSnippet.fromJson(_json["snippet"]); |
| 5335 } |
| 5336 if (_json.containsKey("statistics")) { |
| 5337 statistics = new ChannelStatistics.fromJson(_json["statistics"]); |
| 5338 } |
| 5339 if (_json.containsKey("status")) { |
| 5340 status = new ChannelStatus.fromJson(_json["status"]); |
| 5341 } |
| 5342 if (_json.containsKey("topicDetails")) { |
| 5343 topicDetails = new ChannelTopicDetails.fromJson(_json["topicDetails"]); |
| 5344 } |
| 5345 } |
| 5346 |
| 5347 core.Map toJson() { |
| 5348 var _json = new core.Map(); |
| 5349 if (auditDetails != null) { |
| 5350 _json["auditDetails"] = (auditDetails).toJson(); |
| 5351 } |
| 5352 if (brandingSettings != null) { |
| 5353 _json["brandingSettings"] = (brandingSettings).toJson(); |
| 5354 } |
| 5355 if (contentDetails != null) { |
| 5356 _json["contentDetails"] = (contentDetails).toJson(); |
| 5357 } |
| 5358 if (contentOwnerDetails != null) { |
| 5359 _json["contentOwnerDetails"] = (contentOwnerDetails).toJson(); |
| 5360 } |
| 5361 if (conversionPings != null) { |
| 5362 _json["conversionPings"] = (conversionPings).toJson(); |
| 5363 } |
| 5364 if (etag != null) { |
| 5365 _json["etag"] = etag; |
| 5366 } |
| 5367 if (id != null) { |
| 5368 _json["id"] = id; |
| 5369 } |
| 5370 if (invideoPromotion != null) { |
| 5371 _json["invideoPromotion"] = (invideoPromotion).toJson(); |
| 5372 } |
| 5373 if (kind != null) { |
| 5374 _json["kind"] = kind; |
| 5375 } |
| 5376 if (snippet != null) { |
| 5377 _json["snippet"] = (snippet).toJson(); |
| 5378 } |
| 5379 if (statistics != null) { |
| 5380 _json["statistics"] = (statistics).toJson(); |
| 5381 } |
| 5382 if (status != null) { |
| 5383 _json["status"] = (status).toJson(); |
| 5384 } |
| 5385 if (topicDetails != null) { |
| 5386 _json["topicDetails"] = (topicDetails).toJson(); |
| 5387 } |
| 5388 return _json; |
| 5389 } |
| 5390 } |
| 5391 |
| 5392 |
| 5393 /** |
| 5394 * The auditDetails object encapsulates channel data that is relevant for |
| 5395 * YouTube Partners during the audit process. |
| 5396 */ |
| 5397 class ChannelAuditDetails { |
| 5398 /** Whether or not the channel respects the community guidelines. */ |
| 5399 core.bool communityGuidelinesGoodStanding; |
| 5400 |
| 5401 /** Whether or not the channel has any unresolved claims. */ |
| 5402 core.bool contentIdClaimsGoodStanding; |
| 5403 |
| 5404 /** Whether or not the channel has any copyright strikes. */ |
| 5405 core.bool copyrightStrikesGoodStanding; |
| 5406 |
| 5407 /** |
| 5408 * Describes the general state of the channel. This field will always show if |
| 5409 * there are any issues whatsoever with the channel. Currently this field |
| 5410 * represents the result of the logical and operation over the community |
| 5411 * guidelines good standing, the copyright strikes good standing and the |
| 5412 * content ID claims good standing, but this may change in the future. |
| 5413 */ |
| 5414 core.bool overallGoodStanding; |
| 5415 |
| 5416 |
| 5417 ChannelAuditDetails(); |
| 5418 |
| 5419 ChannelAuditDetails.fromJson(core.Map _json) { |
| 5420 if (_json.containsKey("communityGuidelinesGoodStanding")) { |
| 5421 communityGuidelinesGoodStanding = _json["communityGuidelinesGoodStanding"]
; |
| 5422 } |
| 5423 if (_json.containsKey("contentIdClaimsGoodStanding")) { |
| 5424 contentIdClaimsGoodStanding = _json["contentIdClaimsGoodStanding"]; |
| 5425 } |
| 5426 if (_json.containsKey("copyrightStrikesGoodStanding")) { |
| 5427 copyrightStrikesGoodStanding = _json["copyrightStrikesGoodStanding"]; |
| 5428 } |
| 5429 if (_json.containsKey("overallGoodStanding")) { |
| 5430 overallGoodStanding = _json["overallGoodStanding"]; |
| 5431 } |
| 5432 } |
| 5433 |
| 5434 core.Map toJson() { |
| 5435 var _json = new core.Map(); |
| 5436 if (communityGuidelinesGoodStanding != null) { |
| 5437 _json["communityGuidelinesGoodStanding"] = communityGuidelinesGoodStanding
; |
| 5438 } |
| 5439 if (contentIdClaimsGoodStanding != null) { |
| 5440 _json["contentIdClaimsGoodStanding"] = contentIdClaimsGoodStanding; |
| 5441 } |
| 5442 if (copyrightStrikesGoodStanding != null) { |
| 5443 _json["copyrightStrikesGoodStanding"] = copyrightStrikesGoodStanding; |
| 5444 } |
| 5445 if (overallGoodStanding != null) { |
| 5446 _json["overallGoodStanding"] = overallGoodStanding; |
| 5447 } |
| 5448 return _json; |
| 5449 } |
| 5450 } |
| 5451 |
| 5452 |
| 5453 /** |
| 5454 * A channel banner returned as the response to a channel_banner.insert call. |
| 5455 */ |
| 5456 class ChannelBannerResource { |
| 5457 /** Etag of this resource. */ |
| 5458 core.String etag; |
| 5459 |
| 5460 /** |
| 5461 * Identifies what kind of resource this is. Value: the fixed string |
| 5462 * "youtube#channelBannerResource". |
| 5463 */ |
| 5464 core.String kind; |
| 5465 |
| 5466 /** The URL of this banner image. */ |
| 5467 core.String url; |
| 5468 |
| 5469 |
| 5470 ChannelBannerResource(); |
| 5471 |
| 5472 ChannelBannerResource.fromJson(core.Map _json) { |
| 5473 if (_json.containsKey("etag")) { |
| 5474 etag = _json["etag"]; |
| 5475 } |
| 5476 if (_json.containsKey("kind")) { |
| 5477 kind = _json["kind"]; |
| 5478 } |
| 5479 if (_json.containsKey("url")) { |
| 5480 url = _json["url"]; |
| 5481 } |
| 5482 } |
| 5483 |
| 5484 core.Map toJson() { |
| 5485 var _json = new core.Map(); |
| 5486 if (etag != null) { |
| 5487 _json["etag"] = etag; |
| 5488 } |
| 5489 if (kind != null) { |
| 5490 _json["kind"] = kind; |
| 5491 } |
| 5492 if (url != null) { |
| 5493 _json["url"] = url; |
| 5494 } |
| 5495 return _json; |
| 5496 } |
| 5497 } |
| 5498 |
| 5499 |
| 5500 /** Branding properties of a YouTube channel. */ |
| 5501 class ChannelBrandingSettings { |
| 5502 /** Branding properties for the channel view. */ |
| 5503 ChannelSettings channel; |
| 5504 |
| 5505 /** Additional experimental branding properties. */ |
| 5506 core.List<PropertyValue> hints; |
| 5507 |
| 5508 /** Branding properties for branding images. */ |
| 5509 ImageSettings image; |
| 5510 |
| 5511 /** Branding properties for the watch page. */ |
| 5512 WatchSettings watch; |
| 5513 |
| 5514 |
| 5515 ChannelBrandingSettings(); |
| 5516 |
| 5517 ChannelBrandingSettings.fromJson(core.Map _json) { |
| 5518 if (_json.containsKey("channel")) { |
| 5519 channel = new ChannelSettings.fromJson(_json["channel"]); |
| 5520 } |
| 5521 if (_json.containsKey("hints")) { |
| 5522 hints = _json["hints"].map((value) => new PropertyValue.fromJson(value)).t
oList(); |
| 5523 } |
| 5524 if (_json.containsKey("image")) { |
| 5525 image = new ImageSettings.fromJson(_json["image"]); |
| 5526 } |
| 5527 if (_json.containsKey("watch")) { |
| 5528 watch = new WatchSettings.fromJson(_json["watch"]); |
| 5529 } |
| 5530 } |
| 5531 |
| 5532 core.Map toJson() { |
| 5533 var _json = new core.Map(); |
| 5534 if (channel != null) { |
| 5535 _json["channel"] = (channel).toJson(); |
| 5536 } |
| 5537 if (hints != null) { |
| 5538 _json["hints"] = hints.map((value) => (value).toJson()).toList(); |
| 5539 } |
| 5540 if (image != null) { |
| 5541 _json["image"] = (image).toJson(); |
| 5542 } |
| 5543 if (watch != null) { |
| 5544 _json["watch"] = (watch).toJson(); |
| 5545 } |
| 5546 return _json; |
| 5547 } |
| 5548 } |
| 5549 |
| 5550 |
| 5551 /** Not documented yet. */ |
| 5552 class ChannelContentDetailsRelatedPlaylists { |
| 5553 /** |
| 5554 * The ID of the playlist that contains the channel"s favorite videos. Use the |
| 5555 * playlistItems.insert and playlistItems.delete to add or remove items from |
| 5556 * that list. |
| 5557 */ |
| 5558 core.String favorites; |
| 5559 |
| 5560 /** |
| 5561 * The ID of the playlist that contains the channel"s liked videos. Use the |
| 5562 * playlistItems.insert and playlistItems.delete to add or remove items from |
| 5563 * that list. |
| 5564 */ |
| 5565 core.String likes; |
| 5566 |
| 5567 /** |
| 5568 * The ID of the playlist that contains the channel"s uploaded videos. Use the |
| 5569 * videos.insert method to upload new videos and the videos.delete method to |
| 5570 * delete previously uploaded videos. |
| 5571 */ |
| 5572 core.String uploads; |
| 5573 |
| 5574 /** |
| 5575 * The ID of the playlist that contains the channel"s watch history. Use the |
| 5576 * playlistItems.insert and playlistItems.delete to add or remove items from |
| 5577 * that list. |
| 5578 */ |
| 5579 core.String watchHistory; |
| 5580 |
| 5581 /** |
| 5582 * The ID of the playlist that contains the channel"s watch later playlist. |
| 5583 * Use the playlistItems.insert and playlistItems.delete to add or remove |
| 5584 * items from that list. |
| 5585 */ |
| 5586 core.String watchLater; |
| 5587 |
| 5588 |
| 5589 ChannelContentDetailsRelatedPlaylists(); |
| 5590 |
| 5591 ChannelContentDetailsRelatedPlaylists.fromJson(core.Map _json) { |
| 5592 if (_json.containsKey("favorites")) { |
| 5593 favorites = _json["favorites"]; |
| 5594 } |
| 5595 if (_json.containsKey("likes")) { |
| 5596 likes = _json["likes"]; |
| 5597 } |
| 5598 if (_json.containsKey("uploads")) { |
| 5599 uploads = _json["uploads"]; |
| 5600 } |
| 5601 if (_json.containsKey("watchHistory")) { |
| 5602 watchHistory = _json["watchHistory"]; |
| 5603 } |
| 5604 if (_json.containsKey("watchLater")) { |
| 5605 watchLater = _json["watchLater"]; |
| 5606 } |
| 5607 } |
| 5608 |
| 5609 core.Map toJson() { |
| 5610 var _json = new core.Map(); |
| 5611 if (favorites != null) { |
| 5612 _json["favorites"] = favorites; |
| 5613 } |
| 5614 if (likes != null) { |
| 5615 _json["likes"] = likes; |
| 5616 } |
| 5617 if (uploads != null) { |
| 5618 _json["uploads"] = uploads; |
| 5619 } |
| 5620 if (watchHistory != null) { |
| 5621 _json["watchHistory"] = watchHistory; |
| 5622 } |
| 5623 if (watchLater != null) { |
| 5624 _json["watchLater"] = watchLater; |
| 5625 } |
| 5626 return _json; |
| 5627 } |
| 5628 } |
| 5629 |
| 5630 |
| 5631 /** Details about the content of a channel. */ |
| 5632 class ChannelContentDetails { |
| 5633 /** |
| 5634 * The googlePlusUserId object identifies the Google+ profile ID associated |
| 5635 * with this channel. |
| 5636 */ |
| 5637 core.String googlePlusUserId; |
| 5638 |
| 5639 /** Not documented yet. */ |
| 5640 ChannelContentDetailsRelatedPlaylists relatedPlaylists; |
| 5641 |
| 5642 |
| 5643 ChannelContentDetails(); |
| 5644 |
| 5645 ChannelContentDetails.fromJson(core.Map _json) { |
| 5646 if (_json.containsKey("googlePlusUserId")) { |
| 5647 googlePlusUserId = _json["googlePlusUserId"]; |
| 5648 } |
| 5649 if (_json.containsKey("relatedPlaylists")) { |
| 5650 relatedPlaylists = new ChannelContentDetailsRelatedPlaylists.fromJson(_jso
n["relatedPlaylists"]); |
| 5651 } |
| 5652 } |
| 5653 |
| 5654 core.Map toJson() { |
| 5655 var _json = new core.Map(); |
| 5656 if (googlePlusUserId != null) { |
| 5657 _json["googlePlusUserId"] = googlePlusUserId; |
| 5658 } |
| 5659 if (relatedPlaylists != null) { |
| 5660 _json["relatedPlaylists"] = (relatedPlaylists).toJson(); |
| 5661 } |
| 5662 return _json; |
| 5663 } |
| 5664 } |
| 5665 |
| 5666 |
| 5667 /** |
| 5668 * The contentOwnerDetails object encapsulates channel data that is relevant for |
| 5669 * YouTube Partners linked with the channel. |
| 5670 */ |
| 5671 class ChannelContentOwnerDetails { |
| 5672 /** The ID of the content owner linked to the channel. */ |
| 5673 core.String contentOwner; |
| 5674 |
| 5675 /** |
| 5676 * The date and time of when the channel was linked to the content owner. The |
| 5677 * value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 5678 */ |
| 5679 core.DateTime timeLinked; |
| 5680 |
| 5681 |
| 5682 ChannelContentOwnerDetails(); |
| 5683 |
| 5684 ChannelContentOwnerDetails.fromJson(core.Map _json) { |
| 5685 if (_json.containsKey("contentOwner")) { |
| 5686 contentOwner = _json["contentOwner"]; |
| 5687 } |
| 5688 if (_json.containsKey("timeLinked")) { |
| 5689 timeLinked = core.DateTime.parse(_json["timeLinked"]); |
| 5690 } |
| 5691 } |
| 5692 |
| 5693 core.Map toJson() { |
| 5694 var _json = new core.Map(); |
| 5695 if (contentOwner != null) { |
| 5696 _json["contentOwner"] = contentOwner; |
| 5697 } |
| 5698 if (timeLinked != null) { |
| 5699 _json["timeLinked"] = (timeLinked).toIso8601String(); |
| 5700 } |
| 5701 return _json; |
| 5702 } |
| 5703 } |
| 5704 |
| 5705 |
| 5706 /** |
| 5707 * Pings that the app shall fire (authenticated by biscotti cookie). Each ping |
| 5708 * has a context, in which the app must fire the ping, and a url identifying the |
| 5709 * ping. |
| 5710 */ |
| 5711 class ChannelConversionPing { |
| 5712 /** |
| 5713 * Defines the context of the ping. |
| 5714 * Possible string values are: |
| 5715 * - "cview" |
| 5716 * - "subscribe" |
| 5717 * - "unsubscribe" |
| 5718 */ |
| 5719 core.String context; |
| 5720 |
| 5721 /** |
| 5722 * The url (without the schema) that the player shall send the ping to. It's |
| 5723 * at caller's descretion to decide which schema to use (http vs https) |
| 5724 * Example of a returned url: //googleads.g.doubleclick.net/pagead/ |
| 5725 * viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D |
| 5726 * cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must append |
| 5727 * biscotti authentication (ms param in case of mobile, for example) to this |
| 5728 * ping. |
| 5729 */ |
| 5730 core.String conversionUrl; |
| 5731 |
| 5732 |
| 5733 ChannelConversionPing(); |
| 5734 |
| 5735 ChannelConversionPing.fromJson(core.Map _json) { |
| 5736 if (_json.containsKey("context")) { |
| 5737 context = _json["context"]; |
| 5738 } |
| 5739 if (_json.containsKey("conversionUrl")) { |
| 5740 conversionUrl = _json["conversionUrl"]; |
| 5741 } |
| 5742 } |
| 5743 |
| 5744 core.Map toJson() { |
| 5745 var _json = new core.Map(); |
| 5746 if (context != null) { |
| 5747 _json["context"] = context; |
| 5748 } |
| 5749 if (conversionUrl != null) { |
| 5750 _json["conversionUrl"] = conversionUrl; |
| 5751 } |
| 5752 return _json; |
| 5753 } |
| 5754 } |
| 5755 |
| 5756 |
| 5757 /** |
| 5758 * The conversionPings object encapsulates information about conversion pings |
| 5759 * that need to be respected by the channel. |
| 5760 */ |
| 5761 class ChannelConversionPings { |
| 5762 /** |
| 5763 * Pings that the app shall fire (authenticated by biscotti cookie). Each ping |
| 5764 * has a context, in which the app must fire the ping, and a url identifying |
| 5765 * the ping. |
| 5766 */ |
| 5767 core.List<ChannelConversionPing> pings; |
| 5768 |
| 5769 |
| 5770 ChannelConversionPings(); |
| 5771 |
| 5772 ChannelConversionPings.fromJson(core.Map _json) { |
| 5773 if (_json.containsKey("pings")) { |
| 5774 pings = _json["pings"].map((value) => new ChannelConversionPing.fromJson(v
alue)).toList(); |
| 5775 } |
| 5776 } |
| 5777 |
| 5778 core.Map toJson() { |
| 5779 var _json = new core.Map(); |
| 5780 if (pings != null) { |
| 5781 _json["pings"] = pings.map((value) => (value).toJson()).toList(); |
| 5782 } |
| 5783 return _json; |
| 5784 } |
| 5785 } |
| 5786 |
| 5787 |
| 5788 /** Not documented yet. */ |
| 5789 class ChannelListResponse { |
| 5790 /** Etag of this resource. */ |
| 5791 core.String etag; |
| 5792 |
| 5793 /** Serialized EventId of the request which produced this response. */ |
| 5794 core.String eventId; |
| 5795 |
| 5796 /** A list of channels that match the request criteria. */ |
| 5797 core.List<Channel> items; |
| 5798 |
| 5799 /** |
| 5800 * Identifies what kind of resource this is. Value: the fixed string |
| 5801 * "youtube#channelListResponse". |
| 5802 */ |
| 5803 core.String kind; |
| 5804 |
| 5805 /** |
| 5806 * The token that can be used as the value of the pageToken parameter to |
| 5807 * retrieve the next page in the result set. |
| 5808 */ |
| 5809 core.String nextPageToken; |
| 5810 |
| 5811 /** Not documented yet. */ |
| 5812 PageInfo pageInfo; |
| 5813 |
| 5814 /** |
| 5815 * The token that can be used as the value of the pageToken parameter to |
| 5816 * retrieve the previous page in the result set. |
| 5817 */ |
| 5818 core.String prevPageToken; |
| 5819 |
| 5820 /** Not documented yet. */ |
| 5821 TokenPagination tokenPagination; |
| 5822 |
| 5823 /** The visitorId identifies the visitor. */ |
| 5824 core.String visitorId; |
| 5825 |
| 5826 |
| 5827 ChannelListResponse(); |
| 5828 |
| 5829 ChannelListResponse.fromJson(core.Map _json) { |
| 5830 if (_json.containsKey("etag")) { |
| 5831 etag = _json["etag"]; |
| 5832 } |
| 5833 if (_json.containsKey("eventId")) { |
| 5834 eventId = _json["eventId"]; |
| 5835 } |
| 5836 if (_json.containsKey("items")) { |
| 5837 items = _json["items"].map((value) => new Channel.fromJson(value)).toList(
); |
| 5838 } |
| 5839 if (_json.containsKey("kind")) { |
| 5840 kind = _json["kind"]; |
| 5841 } |
| 5842 if (_json.containsKey("nextPageToken")) { |
| 5843 nextPageToken = _json["nextPageToken"]; |
| 5844 } |
| 5845 if (_json.containsKey("pageInfo")) { |
| 5846 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 5847 } |
| 5848 if (_json.containsKey("prevPageToken")) { |
| 5849 prevPageToken = _json["prevPageToken"]; |
| 5850 } |
| 5851 if (_json.containsKey("tokenPagination")) { |
| 5852 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 5853 } |
| 5854 if (_json.containsKey("visitorId")) { |
| 5855 visitorId = _json["visitorId"]; |
| 5856 } |
| 5857 } |
| 5858 |
| 5859 core.Map toJson() { |
| 5860 var _json = new core.Map(); |
| 5861 if (etag != null) { |
| 5862 _json["etag"] = etag; |
| 5863 } |
| 5864 if (eventId != null) { |
| 5865 _json["eventId"] = eventId; |
| 5866 } |
| 5867 if (items != null) { |
| 5868 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5869 } |
| 5870 if (kind != null) { |
| 5871 _json["kind"] = kind; |
| 5872 } |
| 5873 if (nextPageToken != null) { |
| 5874 _json["nextPageToken"] = nextPageToken; |
| 5875 } |
| 5876 if (pageInfo != null) { |
| 5877 _json["pageInfo"] = (pageInfo).toJson(); |
| 5878 } |
| 5879 if (prevPageToken != null) { |
| 5880 _json["prevPageToken"] = prevPageToken; |
| 5881 } |
| 5882 if (tokenPagination != null) { |
| 5883 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 5884 } |
| 5885 if (visitorId != null) { |
| 5886 _json["visitorId"] = visitorId; |
| 5887 } |
| 5888 return _json; |
| 5889 } |
| 5890 } |
| 5891 |
| 5892 |
| 5893 /** |
| 5894 * TODO(lxz) follow up with adiamondstein@ to fullfill the doc before deploying |
| 5895 */ |
| 5896 class ChannelSection { |
| 5897 /** |
| 5898 * The contentDetails object contains details about the ChannelSection |
| 5899 * content, such as playlists and channels. |
| 5900 */ |
| 5901 ChannelSectionContentDetails contentDetails; |
| 5902 |
| 5903 /** Etag of this resource. */ |
| 5904 core.String etag; |
| 5905 |
| 5906 /** The ID that YouTube uses to uniquely identify the ChannelSection. */ |
| 5907 core.String id; |
| 5908 |
| 5909 /** |
| 5910 * Identifies what kind of resource this is. Value: the fixed string |
| 5911 * "youtube#channelSection". |
| 5912 */ |
| 5913 core.String kind; |
| 5914 |
| 5915 /** |
| 5916 * The snippet object contains basic details about the ChannelSection, such as |
| 5917 * its type, style and title. |
| 5918 */ |
| 5919 ChannelSectionSnippet snippet; |
| 5920 |
| 5921 |
| 5922 ChannelSection(); |
| 5923 |
| 5924 ChannelSection.fromJson(core.Map _json) { |
| 5925 if (_json.containsKey("contentDetails")) { |
| 5926 contentDetails = new ChannelSectionContentDetails.fromJson(_json["contentD
etails"]); |
| 5927 } |
| 5928 if (_json.containsKey("etag")) { |
| 5929 etag = _json["etag"]; |
| 5930 } |
| 5931 if (_json.containsKey("id")) { |
| 5932 id = _json["id"]; |
| 5933 } |
| 5934 if (_json.containsKey("kind")) { |
| 5935 kind = _json["kind"]; |
| 5936 } |
| 5937 if (_json.containsKey("snippet")) { |
| 5938 snippet = new ChannelSectionSnippet.fromJson(_json["snippet"]); |
| 5939 } |
| 5940 } |
| 5941 |
| 5942 core.Map toJson() { |
| 5943 var _json = new core.Map(); |
| 5944 if (contentDetails != null) { |
| 5945 _json["contentDetails"] = (contentDetails).toJson(); |
| 5946 } |
| 5947 if (etag != null) { |
| 5948 _json["etag"] = etag; |
| 5949 } |
| 5950 if (id != null) { |
| 5951 _json["id"] = id; |
| 5952 } |
| 5953 if (kind != null) { |
| 5954 _json["kind"] = kind; |
| 5955 } |
| 5956 if (snippet != null) { |
| 5957 _json["snippet"] = (snippet).toJson(); |
| 5958 } |
| 5959 return _json; |
| 5960 } |
| 5961 } |
| 5962 |
| 5963 |
| 5964 /** Details about a channelsection, including playlists and channels. */ |
| 5965 class ChannelSectionContentDetails { |
| 5966 /** The channel ids for type multiple_channels. */ |
| 5967 core.List<core.String> channels; |
| 5968 |
| 5969 /** |
| 5970 * The playlist ids for type single_playlist and multiple_playlists. For |
| 5971 * singlePlaylist, only one playlistId is allowed. |
| 5972 */ |
| 5973 core.List<core.String> playlists; |
| 5974 |
| 5975 |
| 5976 ChannelSectionContentDetails(); |
| 5977 |
| 5978 ChannelSectionContentDetails.fromJson(core.Map _json) { |
| 5979 if (_json.containsKey("channels")) { |
| 5980 channels = _json["channels"]; |
| 5981 } |
| 5982 if (_json.containsKey("playlists")) { |
| 5983 playlists = _json["playlists"]; |
| 5984 } |
| 5985 } |
| 5986 |
| 5987 core.Map toJson() { |
| 5988 var _json = new core.Map(); |
| 5989 if (channels != null) { |
| 5990 _json["channels"] = channels; |
| 5991 } |
| 5992 if (playlists != null) { |
| 5993 _json["playlists"] = playlists; |
| 5994 } |
| 5995 return _json; |
| 5996 } |
| 5997 } |
| 5998 |
| 5999 |
| 6000 /** Not documented yet. */ |
| 6001 class ChannelSectionListResponse { |
| 6002 /** Etag of this resource. */ |
| 6003 core.String etag; |
| 6004 |
| 6005 /** Serialized EventId of the request which produced this response. */ |
| 6006 core.String eventId; |
| 6007 |
| 6008 /** A list of ChannelSections that match the request criteria. */ |
| 6009 core.List<ChannelSection> items; |
| 6010 |
| 6011 /** |
| 6012 * Identifies what kind of resource this is. Value: the fixed string |
| 6013 * "youtube#channelSectionListResponse". |
| 6014 */ |
| 6015 core.String kind; |
| 6016 |
| 6017 /** The visitorId identifies the visitor. */ |
| 6018 core.String visitorId; |
| 6019 |
| 6020 |
| 6021 ChannelSectionListResponse(); |
| 6022 |
| 6023 ChannelSectionListResponse.fromJson(core.Map _json) { |
| 6024 if (_json.containsKey("etag")) { |
| 6025 etag = _json["etag"]; |
| 6026 } |
| 6027 if (_json.containsKey("eventId")) { |
| 6028 eventId = _json["eventId"]; |
| 6029 } |
| 6030 if (_json.containsKey("items")) { |
| 6031 items = _json["items"].map((value) => new ChannelSection.fromJson(value)).
toList(); |
| 6032 } |
| 6033 if (_json.containsKey("kind")) { |
| 6034 kind = _json["kind"]; |
| 6035 } |
| 6036 if (_json.containsKey("visitorId")) { |
| 6037 visitorId = _json["visitorId"]; |
| 6038 } |
| 6039 } |
| 6040 |
| 6041 core.Map toJson() { |
| 6042 var _json = new core.Map(); |
| 6043 if (etag != null) { |
| 6044 _json["etag"] = etag; |
| 6045 } |
| 6046 if (eventId != null) { |
| 6047 _json["eventId"] = eventId; |
| 6048 } |
| 6049 if (items != null) { |
| 6050 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6051 } |
| 6052 if (kind != null) { |
| 6053 _json["kind"] = kind; |
| 6054 } |
| 6055 if (visitorId != null) { |
| 6056 _json["visitorId"] = visitorId; |
| 6057 } |
| 6058 return _json; |
| 6059 } |
| 6060 } |
| 6061 |
| 6062 |
| 6063 /** |
| 6064 * Basic details about a channelsection, including title, style and position. |
| 6065 */ |
| 6066 class ChannelSectionSnippet { |
| 6067 /** |
| 6068 * The ID that YouTube uses to uniquely identify the channel that published |
| 6069 * the channelSection. |
| 6070 */ |
| 6071 core.String channelId; |
| 6072 |
| 6073 /** The position of the channelSection in the channel. */ |
| 6074 core.int position; |
| 6075 |
| 6076 /** |
| 6077 * The style of the channelSection. |
| 6078 * Possible string values are: |
| 6079 * - "channelsectionStyleUndefined" |
| 6080 * - "horizontalRow" |
| 6081 * - "verticalList" |
| 6082 */ |
| 6083 core.String style; |
| 6084 |
| 6085 /** |
| 6086 * The channelSection's title for multiple_playlists and multiple_channels. |
| 6087 */ |
| 6088 core.String title; |
| 6089 |
| 6090 /** |
| 6091 * The type of the channelSection. |
| 6092 * Possible string values are: |
| 6093 * - "allPlaylists" |
| 6094 * - "channelsectionTypeUndefined" |
| 6095 * - "completedEvents" |
| 6096 * - "likedPlaylists" |
| 6097 * - "likes" |
| 6098 * - "liveEvents" |
| 6099 * - "multipleChannels" |
| 6100 * - "multiplePlaylists" |
| 6101 * - "popularUploads" |
| 6102 * - "postedPlaylists" |
| 6103 * - "postedVideos" |
| 6104 * - "recentActivity" |
| 6105 * - "recentPosts" |
| 6106 * - "recentUploads" |
| 6107 * - "singlePlaylist" |
| 6108 * - "subscriptions" |
| 6109 * - "upcomingEvents" |
| 6110 */ |
| 6111 core.String type; |
| 6112 |
| 6113 |
| 6114 ChannelSectionSnippet(); |
| 6115 |
| 6116 ChannelSectionSnippet.fromJson(core.Map _json) { |
| 6117 if (_json.containsKey("channelId")) { |
| 6118 channelId = _json["channelId"]; |
| 6119 } |
| 6120 if (_json.containsKey("position")) { |
| 6121 position = _json["position"]; |
| 6122 } |
| 6123 if (_json.containsKey("style")) { |
| 6124 style = _json["style"]; |
| 6125 } |
| 6126 if (_json.containsKey("title")) { |
| 6127 title = _json["title"]; |
| 6128 } |
| 6129 if (_json.containsKey("type")) { |
| 6130 type = _json["type"]; |
| 6131 } |
| 6132 } |
| 6133 |
| 6134 core.Map toJson() { |
| 6135 var _json = new core.Map(); |
| 6136 if (channelId != null) { |
| 6137 _json["channelId"] = channelId; |
| 6138 } |
| 6139 if (position != null) { |
| 6140 _json["position"] = position; |
| 6141 } |
| 6142 if (style != null) { |
| 6143 _json["style"] = style; |
| 6144 } |
| 6145 if (title != null) { |
| 6146 _json["title"] = title; |
| 6147 } |
| 6148 if (type != null) { |
| 6149 _json["type"] = type; |
| 6150 } |
| 6151 return _json; |
| 6152 } |
| 6153 } |
| 6154 |
| 6155 |
| 6156 /** Branding properties for the channel view. */ |
| 6157 class ChannelSettings { |
| 6158 /** Which content tab users should see when viewing the channel. */ |
| 6159 core.String defaultTab; |
| 6160 |
| 6161 /** Specifies the channel description. */ |
| 6162 core.String description; |
| 6163 |
| 6164 /** Title for the featured channels tab. */ |
| 6165 core.String featuredChannelsTitle; |
| 6166 |
| 6167 /** The list of featured channels. */ |
| 6168 core.List<core.String> featuredChannelsUrls; |
| 6169 |
| 6170 /** Lists keywords associated with the channel, comma-separated. */ |
| 6171 core.String keywords; |
| 6172 |
| 6173 /** |
| 6174 * Whether user-submitted comments left on the channel page need to be |
| 6175 * approved by the channel owner to be publicly visible. |
| 6176 */ |
| 6177 core.bool moderateComments; |
| 6178 |
| 6179 /** A prominent color that can be rendered on this channel page. */ |
| 6180 core.String profileColor; |
| 6181 |
| 6182 /** Whether the tab to browse the videos should be displayed. */ |
| 6183 core.bool showBrowseView; |
| 6184 |
| 6185 /** Whether related channels should be proposed. */ |
| 6186 core.bool showRelatedChannels; |
| 6187 |
| 6188 /** Specifies the channel title. */ |
| 6189 core.String title; |
| 6190 |
| 6191 /** |
| 6192 * The ID for a Google Analytics account to track and measure traffic to the |
| 6193 * channels. |
| 6194 */ |
| 6195 core.String trackingAnalyticsAccountId; |
| 6196 |
| 6197 /** The trailer of the channel, for users that are not subscribers. */ |
| 6198 core.String unsubscribedTrailer; |
| 6199 |
| 6200 |
| 6201 ChannelSettings(); |
| 6202 |
| 6203 ChannelSettings.fromJson(core.Map _json) { |
| 6204 if (_json.containsKey("defaultTab")) { |
| 6205 defaultTab = _json["defaultTab"]; |
| 6206 } |
| 6207 if (_json.containsKey("description")) { |
| 6208 description = _json["description"]; |
| 6209 } |
| 6210 if (_json.containsKey("featuredChannelsTitle")) { |
| 6211 featuredChannelsTitle = _json["featuredChannelsTitle"]; |
| 6212 } |
| 6213 if (_json.containsKey("featuredChannelsUrls")) { |
| 6214 featuredChannelsUrls = _json["featuredChannelsUrls"]; |
| 6215 } |
| 6216 if (_json.containsKey("keywords")) { |
| 6217 keywords = _json["keywords"]; |
| 6218 } |
| 6219 if (_json.containsKey("moderateComments")) { |
| 6220 moderateComments = _json["moderateComments"]; |
| 6221 } |
| 6222 if (_json.containsKey("profileColor")) { |
| 6223 profileColor = _json["profileColor"]; |
| 6224 } |
| 6225 if (_json.containsKey("showBrowseView")) { |
| 6226 showBrowseView = _json["showBrowseView"]; |
| 6227 } |
| 6228 if (_json.containsKey("showRelatedChannels")) { |
| 6229 showRelatedChannels = _json["showRelatedChannels"]; |
| 6230 } |
| 6231 if (_json.containsKey("title")) { |
| 6232 title = _json["title"]; |
| 6233 } |
| 6234 if (_json.containsKey("trackingAnalyticsAccountId")) { |
| 6235 trackingAnalyticsAccountId = _json["trackingAnalyticsAccountId"]; |
| 6236 } |
| 6237 if (_json.containsKey("unsubscribedTrailer")) { |
| 6238 unsubscribedTrailer = _json["unsubscribedTrailer"]; |
| 6239 } |
| 6240 } |
| 6241 |
| 6242 core.Map toJson() { |
| 6243 var _json = new core.Map(); |
| 6244 if (defaultTab != null) { |
| 6245 _json["defaultTab"] = defaultTab; |
| 6246 } |
| 6247 if (description != null) { |
| 6248 _json["description"] = description; |
| 6249 } |
| 6250 if (featuredChannelsTitle != null) { |
| 6251 _json["featuredChannelsTitle"] = featuredChannelsTitle; |
| 6252 } |
| 6253 if (featuredChannelsUrls != null) { |
| 6254 _json["featuredChannelsUrls"] = featuredChannelsUrls; |
| 6255 } |
| 6256 if (keywords != null) { |
| 6257 _json["keywords"] = keywords; |
| 6258 } |
| 6259 if (moderateComments != null) { |
| 6260 _json["moderateComments"] = moderateComments; |
| 6261 } |
| 6262 if (profileColor != null) { |
| 6263 _json["profileColor"] = profileColor; |
| 6264 } |
| 6265 if (showBrowseView != null) { |
| 6266 _json["showBrowseView"] = showBrowseView; |
| 6267 } |
| 6268 if (showRelatedChannels != null) { |
| 6269 _json["showRelatedChannels"] = showRelatedChannels; |
| 6270 } |
| 6271 if (title != null) { |
| 6272 _json["title"] = title; |
| 6273 } |
| 6274 if (trackingAnalyticsAccountId != null) { |
| 6275 _json["trackingAnalyticsAccountId"] = trackingAnalyticsAccountId; |
| 6276 } |
| 6277 if (unsubscribedTrailer != null) { |
| 6278 _json["unsubscribedTrailer"] = unsubscribedTrailer; |
| 6279 } |
| 6280 return _json; |
| 6281 } |
| 6282 } |
| 6283 |
| 6284 |
| 6285 /** |
| 6286 * Basic details about a channel, including title, description and thumbnails. |
| 6287 */ |
| 6288 class ChannelSnippet { |
| 6289 /** The description of the channel. */ |
| 6290 core.String description; |
| 6291 |
| 6292 /** |
| 6293 * The date and time that the channel was created. The value is specified in |
| 6294 * ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 6295 */ |
| 6296 core.DateTime publishedAt; |
| 6297 |
| 6298 /** |
| 6299 * A map of thumbnail images associated with the channel. For each object in |
| 6300 * the map, the key is the name of the thumbnail image, and the value is an |
| 6301 * object that contains other information about the thumbnail. |
| 6302 */ |
| 6303 ThumbnailDetails thumbnails; |
| 6304 |
| 6305 /** The channel's title. */ |
| 6306 core.String title; |
| 6307 |
| 6308 |
| 6309 ChannelSnippet(); |
| 6310 |
| 6311 ChannelSnippet.fromJson(core.Map _json) { |
| 6312 if (_json.containsKey("description")) { |
| 6313 description = _json["description"]; |
| 6314 } |
| 6315 if (_json.containsKey("publishedAt")) { |
| 6316 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 6317 } |
| 6318 if (_json.containsKey("thumbnails")) { |
| 6319 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 6320 } |
| 6321 if (_json.containsKey("title")) { |
| 6322 title = _json["title"]; |
| 6323 } |
| 6324 } |
| 6325 |
| 6326 core.Map toJson() { |
| 6327 var _json = new core.Map(); |
| 6328 if (description != null) { |
| 6329 _json["description"] = description; |
| 6330 } |
| 6331 if (publishedAt != null) { |
| 6332 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 6333 } |
| 6334 if (thumbnails != null) { |
| 6335 _json["thumbnails"] = (thumbnails).toJson(); |
| 6336 } |
| 6337 if (title != null) { |
| 6338 _json["title"] = title; |
| 6339 } |
| 6340 return _json; |
| 6341 } |
| 6342 } |
| 6343 |
| 6344 |
| 6345 /** |
| 6346 * Statistics about a channel: number of subscribers, number of videos in the |
| 6347 * channel, etc. |
| 6348 */ |
| 6349 class ChannelStatistics { |
| 6350 /** The number of comments for the channel. */ |
| 6351 core.String commentCount; |
| 6352 |
| 6353 /** Whether or not the number of subscribers is shown for this user. */ |
| 6354 core.bool hiddenSubscriberCount; |
| 6355 |
| 6356 /** The number of subscribers that the channel has. */ |
| 6357 core.String subscriberCount; |
| 6358 |
| 6359 /** The number of videos uploaded to the channel. */ |
| 6360 core.String videoCount; |
| 6361 |
| 6362 /** The number of times the channel has been viewed. */ |
| 6363 core.String viewCount; |
| 6364 |
| 6365 |
| 6366 ChannelStatistics(); |
| 6367 |
| 6368 ChannelStatistics.fromJson(core.Map _json) { |
| 6369 if (_json.containsKey("commentCount")) { |
| 6370 commentCount = _json["commentCount"]; |
| 6371 } |
| 6372 if (_json.containsKey("hiddenSubscriberCount")) { |
| 6373 hiddenSubscriberCount = _json["hiddenSubscriberCount"]; |
| 6374 } |
| 6375 if (_json.containsKey("subscriberCount")) { |
| 6376 subscriberCount = _json["subscriberCount"]; |
| 6377 } |
| 6378 if (_json.containsKey("videoCount")) { |
| 6379 videoCount = _json["videoCount"]; |
| 6380 } |
| 6381 if (_json.containsKey("viewCount")) { |
| 6382 viewCount = _json["viewCount"]; |
| 6383 } |
| 6384 } |
| 6385 |
| 6386 core.Map toJson() { |
| 6387 var _json = new core.Map(); |
| 6388 if (commentCount != null) { |
| 6389 _json["commentCount"] = commentCount; |
| 6390 } |
| 6391 if (hiddenSubscriberCount != null) { |
| 6392 _json["hiddenSubscriberCount"] = hiddenSubscriberCount; |
| 6393 } |
| 6394 if (subscriberCount != null) { |
| 6395 _json["subscriberCount"] = subscriberCount; |
| 6396 } |
| 6397 if (videoCount != null) { |
| 6398 _json["videoCount"] = videoCount; |
| 6399 } |
| 6400 if (viewCount != null) { |
| 6401 _json["viewCount"] = viewCount; |
| 6402 } |
| 6403 return _json; |
| 6404 } |
| 6405 } |
| 6406 |
| 6407 |
| 6408 /** JSON template for the status part of a channel. */ |
| 6409 class ChannelStatus { |
| 6410 /** |
| 6411 * If true, then the user is linked to either a YouTube username or G+ |
| 6412 * account. Otherwise, the user doesn't have a public YouTube identity. |
| 6413 */ |
| 6414 core.bool isLinked; |
| 6415 |
| 6416 /** |
| 6417 * Privacy status of the channel. |
| 6418 * Possible string values are: |
| 6419 * - "private" |
| 6420 * - "public" |
| 6421 * - "unlisted" |
| 6422 */ |
| 6423 core.String privacyStatus; |
| 6424 |
| 6425 |
| 6426 ChannelStatus(); |
| 6427 |
| 6428 ChannelStatus.fromJson(core.Map _json) { |
| 6429 if (_json.containsKey("isLinked")) { |
| 6430 isLinked = _json["isLinked"]; |
| 6431 } |
| 6432 if (_json.containsKey("privacyStatus")) { |
| 6433 privacyStatus = _json["privacyStatus"]; |
| 6434 } |
| 6435 } |
| 6436 |
| 6437 core.Map toJson() { |
| 6438 var _json = new core.Map(); |
| 6439 if (isLinked != null) { |
| 6440 _json["isLinked"] = isLinked; |
| 6441 } |
| 6442 if (privacyStatus != null) { |
| 6443 _json["privacyStatus"] = privacyStatus; |
| 6444 } |
| 6445 return _json; |
| 6446 } |
| 6447 } |
| 6448 |
| 6449 |
| 6450 /** Freebase topic information related to the channel. */ |
| 6451 class ChannelTopicDetails { |
| 6452 /** |
| 6453 * A list of Freebase topic IDs associated with the channel. You can retrieve |
| 6454 * information about each topic using the Freebase Topic API. |
| 6455 */ |
| 6456 core.List<core.String> topicIds; |
| 6457 |
| 6458 |
| 6459 ChannelTopicDetails(); |
| 6460 |
| 6461 ChannelTopicDetails.fromJson(core.Map _json) { |
| 6462 if (_json.containsKey("topicIds")) { |
| 6463 topicIds = _json["topicIds"]; |
| 6464 } |
| 6465 } |
| 6466 |
| 6467 core.Map toJson() { |
| 6468 var _json = new core.Map(); |
| 6469 if (topicIds != null) { |
| 6470 _json["topicIds"] = topicIds; |
| 6471 } |
| 6472 return _json; |
| 6473 } |
| 6474 } |
| 6475 |
| 6476 |
| 6477 /** |
| 6478 * Ratings schemes. The country-specific ratings are mostly for movies and |
| 6479 * shows. |
| 6480 */ |
| 6481 class ContentRating { |
| 6482 /** |
| 6483 * Rating system in Australia - Australian Classification Board |
| 6484 * Possible string values are: |
| 6485 * - "acbC" |
| 6486 * - "acbE" |
| 6487 * - "acbG" |
| 6488 * - "acbM" |
| 6489 * - "acbMa15plus" |
| 6490 * - "acbP" |
| 6491 * - "acbPg" |
| 6492 * - "acbR18plus" |
| 6493 * - "acbUnrated" |
| 6494 */ |
| 6495 core.String acbRating; |
| 6496 |
| 6497 /** |
| 6498 * Rating system for Italy - Autorit� per le Garanzie nelle Comunicazioni |
| 6499 * Possible string values are: |
| 6500 * - "agcomT" |
| 6501 * - "agcomUnrated" |
| 6502 * - "agcomVm14" |
| 6503 * - "agcomVm18" |
| 6504 */ |
| 6505 core.String agcomRating; |
| 6506 |
| 6507 /** |
| 6508 * Rating system for Chile - Asociaci�n Nacional de Televisi�n |
| 6509 * Possible string values are: |
| 6510 * - "anatelA" |
| 6511 * - "anatelF" |
| 6512 * - "anatelI" |
| 6513 * - "anatelI10" |
| 6514 * - "anatelI12" |
| 6515 * - "anatelI7" |
| 6516 * - "anatelR" |
| 6517 * - "anatelUnrated" |
| 6518 */ |
| 6519 core.String anatelRating; |
| 6520 |
| 6521 /** |
| 6522 * British Board of Film Classification |
| 6523 * Possible string values are: |
| 6524 * - "bbfc12" |
| 6525 * - "bbfc12a" |
| 6526 * - "bbfc15" |
| 6527 * - "bbfc18" |
| 6528 * - "bbfcPg" |
| 6529 * - "bbfcR18" |
| 6530 * - "bbfcU" |
| 6531 * - "bbfcUnrated" |
| 6532 */ |
| 6533 core.String bbfcRating; |
| 6534 |
| 6535 /** |
| 6536 * Rating system for Thailand - Board of Filmand Video Censors |
| 6537 * Possible string values are: |
| 6538 * - "bfvc13" |
| 6539 * - "bfvc15" |
| 6540 * - "bfvc18" |
| 6541 * - "bfvc20" |
| 6542 * - "bfvcB" |
| 6543 * - "bfvcE" |
| 6544 * - "bfvcG" |
| 6545 * - "bfvcUnrated" |
| 6546 */ |
| 6547 core.String bfvcRating; |
| 6548 |
| 6549 /** |
| 6550 * Rating system for Austria - Bundesministeriums f�r Unterricht, Kunst und |
| 6551 * Kultur! |
| 6552 * Possible string values are: |
| 6553 * - "bmukk10" |
| 6554 * - "bmukk12" |
| 6555 * - "bmukk14" |
| 6556 * - "bmukk16" |
| 6557 * - "bmukk6" |
| 6558 * - "bmukk8" |
| 6559 * - "bmukkAa" |
| 6560 * - "bmukkUnrated" |
| 6561 */ |
| 6562 core.String bmukkRating; |
| 6563 |
| 6564 /** |
| 6565 * Rating system for Canadian TV - Canadian TV Classification System |
| 6566 * Possible string values are: |
| 6567 * - "catv14plus" |
| 6568 * - "catv18plus" |
| 6569 * - "catvC" |
| 6570 * - "catvC8" |
| 6571 * - "catvG" |
| 6572 * - "catvPg" |
| 6573 * - "catvUnrated" |
| 6574 */ |
| 6575 core.String catvRating; |
| 6576 |
| 6577 /** |
| 6578 * Rating system for French Canadian TV - Regie du cinema |
| 6579 * Possible string values are: |
| 6580 * - "catvfr13plus" |
| 6581 * - "catvfr16plus" |
| 6582 * - "catvfr18plus" |
| 6583 * - "catvfr8plus" |
| 6584 * - "catvfrG" |
| 6585 * - "catvfrUnrated" |
| 6586 */ |
| 6587 core.String catvfrRating; |
| 6588 |
| 6589 /** |
| 6590 * Rating system in India - Central Board of Film Certification |
| 6591 * Possible string values are: |
| 6592 * - "cbfcA" |
| 6593 * - "cbfcS" |
| 6594 * - "cbfcU" |
| 6595 * - "cbfcUA" |
| 6596 * - "cbfcUnrated" |
| 6597 */ |
| 6598 core.String cbfcRating; |
| 6599 |
| 6600 /** |
| 6601 * Rating system for Chile - Consejo de Calificaci�n Cinematogr�fica |
| 6602 * Possible string values are: |
| 6603 * - "ccc14" |
| 6604 * - "ccc18" |
| 6605 * - "ccc18s" |
| 6606 * - "ccc18v" |
| 6607 * - "ccc6" |
| 6608 * - "cccTe" |
| 6609 * - "cccUnrated" |
| 6610 */ |
| 6611 core.String cccRating; |
| 6612 |
| 6613 /** |
| 6614 * Rating system for Portugal - Comiss�o de Classifica��o de Espect�culos |
| 6615 * Possible string values are: |
| 6616 * - "cceM12" |
| 6617 * - "cceM16" |
| 6618 * - "cceM18" |
| 6619 * - "cceM4" |
| 6620 * - "cceM6" |
| 6621 * - "cceUnrated" |
| 6622 */ |
| 6623 core.String cceRating; |
| 6624 |
| 6625 /** |
| 6626 * Rating system for Switzerland - Switzerland Rating System |
| 6627 * Possible string values are: |
| 6628 * - "chfilm0" |
| 6629 * - "chfilm12" |
| 6630 * - "chfilm16" |
| 6631 * - "chfilm18" |
| 6632 * - "chfilm6" |
| 6633 * - "chfilmUnrated" |
| 6634 */ |
| 6635 core.String chfilmRating; |
| 6636 |
| 6637 /** |
| 6638 * Canadian Home Video Rating System |
| 6639 * Possible string values are: |
| 6640 * - "chvrs14a" |
| 6641 * - "chvrs18a" |
| 6642 * - "chvrsE" |
| 6643 * - "chvrsG" |
| 6644 * - "chvrsPg" |
| 6645 * - "chvrsR" |
| 6646 * - "chvrsUnrated" |
| 6647 */ |
| 6648 core.String chvrsRating; |
| 6649 |
| 6650 /** |
| 6651 * Rating system for Belgium - Belgium Rating System |
| 6652 * Possible string values are: |
| 6653 * - "cicfE" |
| 6654 * - "cicfKntEna" |
| 6655 * - "cicfKtEa" |
| 6656 * - "cicfUnrated" |
| 6657 */ |
| 6658 core.String cicfRating; |
| 6659 |
| 6660 /** |
| 6661 * Rating system for Romania - CONSILIUL NATIONAL AL AUDIOVIZUALULUI - CNA |
| 6662 * Possible string values are: |
| 6663 * - "cna12" |
| 6664 * - "cna15" |
| 6665 * - "cna18" |
| 6666 * - "cna18plus" |
| 6667 * - "cnaAp" |
| 6668 * - "cnaUnrated" |
| 6669 */ |
| 6670 core.String cnaRating; |
| 6671 |
| 6672 /** |
| 6673 * Rating system for France - Conseil sup�rieur de l?audiovisuel |
| 6674 * Possible string values are: |
| 6675 * - "csa10" |
| 6676 * - "csa12" |
| 6677 * - "csa16" |
| 6678 * - "csa18" |
| 6679 * - "csaInterdiction" |
| 6680 * - "csaUnrated" |
| 6681 */ |
| 6682 core.String csaRating; |
| 6683 |
| 6684 /** |
| 6685 * Rating system for Luxembourg - Commission de surveillance de la |
| 6686 * classification des films |
| 6687 * Possible string values are: |
| 6688 * - "cscf12" |
| 6689 * - "cscf16" |
| 6690 * - "cscf18" |
| 6691 * - "cscf6" |
| 6692 * - "cscfA" |
| 6693 * - "cscfUnrated" |
| 6694 */ |
| 6695 core.String cscfRating; |
| 6696 |
| 6697 /** |
| 6698 * Rating system for Czech republic - Czech republic Rating System |
| 6699 * Possible string values are: |
| 6700 * - "czfilm12" |
| 6701 * - "czfilm14" |
| 6702 * - "czfilm18" |
| 6703 * - "czfilmU" |
| 6704 * - "czfilmUnrated" |
| 6705 */ |
| 6706 core.String czfilmRating; |
| 6707 |
| 6708 /** |
| 6709 * Rating system in Brazil - Department of Justice, Rating, Titles and |
| 6710 * Qualification |
| 6711 * Possible string values are: |
| 6712 * - "djctq10" |
| 6713 * - "djctq12" |
| 6714 * - "djctq14" |
| 6715 * - "djctq16" |
| 6716 * - "djctq18" |
| 6717 * - "djctqL" |
| 6718 * - "djctqUnrated" |
| 6719 */ |
| 6720 core.String djctqRating; |
| 6721 |
| 6722 /** |
| 6723 * Rating system for Estonia - Estonia Rating System |
| 6724 * Possible string values are: |
| 6725 * - "eefilmK12" |
| 6726 * - "eefilmK14" |
| 6727 * - "eefilmK16" |
| 6728 * - "eefilmK6" |
| 6729 * - "eefilmL" |
| 6730 * - "eefilmMs12" |
| 6731 * - "eefilmMs6" |
| 6732 * - "eefilmPere" |
| 6733 * - "eefilmUnrated" |
| 6734 */ |
| 6735 core.String eefilmRating; |
| 6736 |
| 6737 /** |
| 6738 * Rating system for Egypt - Egypt Rating System |
| 6739 * Possible string values are: |
| 6740 * - "egfilm18" |
| 6741 * - "egfilmBn" |
| 6742 * - "egfilmGn" |
| 6743 * - "egfilmUnrated" |
| 6744 */ |
| 6745 core.String egfilmRating; |
| 6746 |
| 6747 /** |
| 6748 * Rating system in Japan - Eiga Rinri Kanri Iinkai |
| 6749 * Possible string values are: |
| 6750 * - "eirinG" |
| 6751 * - "eirinPg12" |
| 6752 * - "eirinR15plus" |
| 6753 * - "eirinR18plus" |
| 6754 * - "eirinUnrated" |
| 6755 */ |
| 6756 core.String eirinRating; |
| 6757 |
| 6758 /** |
| 6759 * Rating system for Malaysia - Film Censorship Board of Malaysia |
| 6760 * Possible string values are: |
| 6761 * - "fcbm18" |
| 6762 * - "fcbm18pa" |
| 6763 * - "fcbm18pl" |
| 6764 * - "fcbm18sg" |
| 6765 * - "fcbm18sx" |
| 6766 * - "fcbmP13" |
| 6767 * - "fcbmU" |
| 6768 * - "fcbmUnrated" |
| 6769 */ |
| 6770 core.String fcbmRating; |
| 6771 |
| 6772 /** |
| 6773 * Rating system for Hong kong - Office for Film, Newspaper and Article |
| 6774 * Administration |
| 6775 * Possible string values are: |
| 6776 * - "fcoI" |
| 6777 * - "fcoIia" |
| 6778 * - "fcoIib" |
| 6779 * - "fcoIii" |
| 6780 * - "fcoUnrated" |
| 6781 */ |
| 6782 core.String fcoRating; |
| 6783 |
| 6784 /** |
| 6785 * Rating system in France - French Minister of Culture |
| 6786 * Possible string values are: |
| 6787 * - "fmoc10" |
| 6788 * - "fmoc12" |
| 6789 * - "fmoc16" |
| 6790 * - "fmoc18" |
| 6791 * - "fmocE" |
| 6792 * - "fmocU" |
| 6793 * - "fmocUnrated" |
| 6794 */ |
| 6795 core.String fmocRating; |
| 6796 |
| 6797 /** |
| 6798 * Rating system for South africa - Film & Publication Board |
| 6799 * Possible string values are: |
| 6800 * - "fpb1012Pg" |
| 6801 * - "fpb13" |
| 6802 * - "fpb16" |
| 6803 * - "fpb18" |
| 6804 * - "fpb79Pg" |
| 6805 * - "fpbA" |
| 6806 * - "fpbPg" |
| 6807 * - "fpbUnrated" |
| 6808 * - "fpbX18" |
| 6809 * - "fpbXx" |
| 6810 */ |
| 6811 core.String fpbRating; |
| 6812 |
| 6813 /** |
| 6814 * Rating system in Germany - Voluntary Self Regulation of the Movie Industry |
| 6815 * Possible string values are: |
| 6816 * - "fsk0" |
| 6817 * - "fsk12" |
| 6818 * - "fsk16" |
| 6819 * - "fsk18" |
| 6820 * - "fsk6" |
| 6821 * - "fskUnrated" |
| 6822 */ |
| 6823 core.String fskRating; |
| 6824 |
| 6825 /** |
| 6826 * Rating system for Greece - Greece Rating System |
| 6827 * Possible string values are: |
| 6828 * - "grfilmE" |
| 6829 * - "grfilmK" |
| 6830 * - "grfilmK13" |
| 6831 * - "grfilmK17" |
| 6832 * - "grfilmUnrated" |
| 6833 */ |
| 6834 core.String grfilmRating; |
| 6835 |
| 6836 /** |
| 6837 * Rating system in Spain - Instituto de Cinematografia y de las Artes |
| 6838 * Audiovisuales |
| 6839 * Possible string values are: |
| 6840 * - "icaa12" |
| 6841 * - "icaa13" |
| 6842 * - "icaa16" |
| 6843 * - "icaa18" |
| 6844 * - "icaa7" |
| 6845 * - "icaaApta" |
| 6846 * - "icaaUnrated" |
| 6847 * - "icaaX" |
| 6848 */ |
| 6849 core.String icaaRating; |
| 6850 |
| 6851 /** |
| 6852 * Rating system in Ireland - Irish Film Classification Office |
| 6853 * Possible string values are: |
| 6854 * - "ifco12" |
| 6855 * - "ifco15" |
| 6856 * - "ifco18" |
| 6857 * - "ifcoG" |
| 6858 * - "ifcoPg" |
| 6859 * - "ifcoUnrated" |
| 6860 */ |
| 6861 core.String ifcoRating; |
| 6862 |
| 6863 /** |
| 6864 * Rating system for Israel - Israel Rating System |
| 6865 * Possible string values are: |
| 6866 * - "ilfilm12" |
| 6867 * - "ilfilm16" |
| 6868 * - "ilfilm18" |
| 6869 * - "ilfilmAa" |
| 6870 * - "ilfilmUnrated" |
| 6871 */ |
| 6872 core.String ilfilmRating; |
| 6873 |
| 6874 /** |
| 6875 * Rating system for Argentina - Instituto Nacional de Cine y Artes |
| 6876 * Audiovisuales |
| 6877 * Possible string values are: |
| 6878 * - "incaaAtp" |
| 6879 * - "incaaC" |
| 6880 * - "incaaSam13" |
| 6881 * - "incaaSam16" |
| 6882 * - "incaaSam18" |
| 6883 * - "incaaUnrated" |
| 6884 */ |
| 6885 core.String incaaRating; |
| 6886 |
| 6887 /** |
| 6888 * Rating system for Kenya - Kenya Film Classification Board |
| 6889 * Possible string values are: |
| 6890 * - "kfcb16plus" |
| 6891 * - "kfcbG" |
| 6892 * - "kfcbPg" |
| 6893 * - "kfcbR" |
| 6894 * - "kfcbUnrated" |
| 6895 */ |
| 6896 core.String kfcbRating; |
| 6897 |
| 6898 /** |
| 6899 * Rating system for Netherlands - Nederlands Instituut voor de Classificatie |
| 6900 * van Audiovisuele Media |
| 6901 * Possible string values are: |
| 6902 * - "kijkwijzer12" |
| 6903 * - "kijkwijzer16" |
| 6904 * - "kijkwijzer6" |
| 6905 * - "kijkwijzer9" |
| 6906 * - "kijkwijzerAl" |
| 6907 * - "kijkwijzerUnrated" |
| 6908 */ |
| 6909 core.String kijkwijzerRating; |
| 6910 |
| 6911 /** |
| 6912 * Rating system in South Korea - Korea Media Rating Board |
| 6913 * Possible string values are: |
| 6914 * - "kmrb12plus" |
| 6915 * - "kmrb15plus" |
| 6916 * - "kmrbAll" |
| 6917 * - "kmrbR" |
| 6918 * - "kmrbTeenr" |
| 6919 * - "kmrbUnrated" |
| 6920 */ |
| 6921 core.String kmrbRating; |
| 6922 |
| 6923 /** |
| 6924 * Rating system for Indonesia - Lembaga Sensor Film |
| 6925 * Possible string values are: |
| 6926 * - "lsfA" |
| 6927 * - "lsfBo" |
| 6928 * - "lsfD" |
| 6929 * - "lsfR" |
| 6930 * - "lsfSu" |
| 6931 * - "lsfUnrated" |
| 6932 */ |
| 6933 core.String lsfRating; |
| 6934 |
| 6935 /** |
| 6936 * Rating system for Malta - Film Age-Classification Board |
| 6937 * Possible string values are: |
| 6938 * - "mccaa12" |
| 6939 * - "mccaa12a" |
| 6940 * - "mccaa14" |
| 6941 * - "mccaa15" |
| 6942 * - "mccaa16" |
| 6943 * - "mccaa18" |
| 6944 * - "mccaaPg" |
| 6945 * - "mccaaU" |
| 6946 * - "mccaaUnrated" |
| 6947 */ |
| 6948 core.String mccaaRating; |
| 6949 |
| 6950 /** |
| 6951 * Rating system for Denmark - The Media Council for Children and Young People |
| 6952 * Possible string values are: |
| 6953 * - "mccyp11" |
| 6954 * - "mccyp15" |
| 6955 * - "mccyp7" |
| 6956 * - "mccypA" |
| 6957 * - "mccypUnrated" |
| 6958 */ |
| 6959 core.String mccypRating; |
| 6960 |
| 6961 /** |
| 6962 * Rating system for Singapore - Media Development Authority |
| 6963 * Possible string values are: |
| 6964 * - "mdaG" |
| 6965 * - "mdaM18" |
| 6966 * - "mdaNc16" |
| 6967 * - "mdaPg" |
| 6968 * - "mdaPg13" |
| 6969 * - "mdaR21" |
| 6970 * - "mdaUnrated" |
| 6971 */ |
| 6972 core.String mdaRating; |
| 6973 |
| 6974 /** |
| 6975 * Rating system for Norway - Medietilsynet |
| 6976 * Possible string values are: |
| 6977 * - "medietilsynet11" |
| 6978 * - "medietilsynet15" |
| 6979 * - "medietilsynet18" |
| 6980 * - "medietilsynet7" |
| 6981 * - "medietilsynetA" |
| 6982 * - "medietilsynetUnrated" |
| 6983 */ |
| 6984 core.String medietilsynetRating; |
| 6985 |
| 6986 /** |
| 6987 * Rating system for Finland - Finnish Centre for Media Education and |
| 6988 * Audiovisual Media |
| 6989 * Possible string values are: |
| 6990 * - "meku12" |
| 6991 * - "meku16" |
| 6992 * - "meku18" |
| 6993 * - "meku7" |
| 6994 * - "mekuS" |
| 6995 * - "mekuUnrated" |
| 6996 */ |
| 6997 core.String mekuRating; |
| 6998 |
| 6999 /** |
| 7000 * Rating system in Italy - Ministero dei Beni e delle Attivita Culturali e |
| 7001 * del Turismo |
| 7002 * Possible string values are: |
| 7003 * - "mibacT" |
| 7004 * - "mibacUnrated" |
| 7005 * - "mibacVap" |
| 7006 * - "mibacVm12" |
| 7007 * - "mibacVm14" |
| 7008 * - "mibacVm18" |
| 7009 */ |
| 7010 core.String mibacRating; |
| 7011 |
| 7012 /** |
| 7013 * Rating system for Colombia - MoC |
| 7014 * Possible string values are: |
| 7015 * - "moc12" |
| 7016 * - "moc15" |
| 7017 * - "moc18" |
| 7018 * - "moc7" |
| 7019 * - "mocBanned" |
| 7020 * - "mocE" |
| 7021 * - "mocT" |
| 7022 * - "mocUnrated" |
| 7023 * - "mocX" |
| 7024 */ |
| 7025 core.String mocRating; |
| 7026 |
| 7027 /** |
| 7028 * Rating system for Taiwan - Ministry of Culture - Tawan |
| 7029 * Possible string values are: |
| 7030 * - "moctwG" |
| 7031 * - "moctwP" |
| 7032 * - "moctwPg" |
| 7033 * - "moctwR" |
| 7034 * - "moctwUnrated" |
| 7035 */ |
| 7036 core.String moctwRating; |
| 7037 |
| 7038 /** |
| 7039 * Motion Picture Association of America rating for the content. |
| 7040 * Possible string values are: |
| 7041 * - "mpaaG" |
| 7042 * - "mpaaNc17" |
| 7043 * - "mpaaPg" |
| 7044 * - "mpaaPg13" |
| 7045 * - "mpaaR" |
| 7046 * - "mpaaUnrated" |
| 7047 */ |
| 7048 core.String mpaaRating; |
| 7049 |
| 7050 /** |
| 7051 * Rating system for Philippines - MOVIE AND TELEVISION REVIEW AND |
| 7052 * CLASSIFICATION BOARD |
| 7053 * Possible string values are: |
| 7054 * - "mtrcbG" |
| 7055 * - "mtrcbPg" |
| 7056 * - "mtrcbR13" |
| 7057 * - "mtrcbR16" |
| 7058 * - "mtrcbR18" |
| 7059 * - "mtrcbUnrated" |
| 7060 * - "mtrcbX" |
| 7061 */ |
| 7062 core.String mtrcbRating; |
| 7063 |
| 7064 /** |
| 7065 * Rating system for Maldives - National Bureau of Classification |
| 7066 * Possible string values are: |
| 7067 * - "nbc12plus" |
| 7068 * - "nbc15plus" |
| 7069 * - "nbc18plus" |
| 7070 * - "nbc18plusr" |
| 7071 * - "nbcG" |
| 7072 * - "nbcPg" |
| 7073 * - "nbcPu" |
| 7074 * - "nbcUnrated" |
| 7075 */ |
| 7076 core.String nbcRating; |
| 7077 |
| 7078 /** |
| 7079 * Rating system for Poland - National Broadcasting Council |
| 7080 * Possible string values are: |
| 7081 * - "nbcpl18plus" |
| 7082 * - "nbcplI" |
| 7083 * - "nbcplIi" |
| 7084 * - "nbcplIii" |
| 7085 * - "nbcplIv" |
| 7086 * - "nbcplUnrated" |
| 7087 */ |
| 7088 core.String nbcplRating; |
| 7089 |
| 7090 /** |
| 7091 * Rating system for Bulgaria - National Film Centre |
| 7092 * Possible string values are: |
| 7093 * - "nfrcA" |
| 7094 * - "nfrcB" |
| 7095 * - "nfrcC" |
| 7096 * - "nfrcD" |
| 7097 * - "nfrcUnrated" |
| 7098 * - "nfrcX" |
| 7099 */ |
| 7100 core.String nfrcRating; |
| 7101 |
| 7102 /** |
| 7103 * Rating system for Nigeria - National Film and Video Censors Board |
| 7104 * Possible string values are: |
| 7105 * - "nfvcb12" |
| 7106 * - "nfvcb12a" |
| 7107 * - "nfvcb15" |
| 7108 * - "nfvcb18" |
| 7109 * - "nfvcbG" |
| 7110 * - "nfvcbPg" |
| 7111 * - "nfvcbRe" |
| 7112 * - "nfvcbUnrated" |
| 7113 */ |
| 7114 core.String nfvcbRating; |
| 7115 |
| 7116 /** |
| 7117 * Rating system for Latvia - National Film Center of Latvia |
| 7118 * Possible string values are: |
| 7119 * - "nkclv12plus" |
| 7120 * - "nkclv18plus" |
| 7121 * - "nkclv7plus" |
| 7122 * - "nkclvU" |
| 7123 * - "nkclvUnrated" |
| 7124 */ |
| 7125 core.String nkclvRating; |
| 7126 |
| 7127 /** |
| 7128 * Rating system in New Zealand - Office of Film and Literature Classification |
| 7129 * Possible string values are: |
| 7130 * - "oflcG" |
| 7131 * - "oflcM" |
| 7132 * - "oflcPg" |
| 7133 * - "oflcR13" |
| 7134 * - "oflcR15" |
| 7135 * - "oflcR16" |
| 7136 * - "oflcR18" |
| 7137 * - "oflcUnrated" |
| 7138 */ |
| 7139 core.String oflcRating; |
| 7140 |
| 7141 /** |
| 7142 * Rating system for Peru - Peru Rating System |
| 7143 * Possible string values are: |
| 7144 * - "pefilm14" |
| 7145 * - "pefilm18" |
| 7146 * - "pefilmPg" |
| 7147 * - "pefilmPt" |
| 7148 * - "pefilmUnrated" |
| 7149 */ |
| 7150 core.String pefilmRating; |
| 7151 |
| 7152 /** |
| 7153 * Rating system for Hungary - Rating Committee of the National Office of Film |
| 7154 * Possible string values are: |
| 7155 * - "rcnofI" |
| 7156 * - "rcnofIi" |
| 7157 * - "rcnofIii" |
| 7158 * - "rcnofIv" |
| 7159 * - "rcnofUnrated" |
| 7160 * - "rcnofV" |
| 7161 * - "rcnofVi" |
| 7162 */ |
| 7163 core.String rcnofRating; |
| 7164 |
| 7165 /** |
| 7166 * Rating system for Venezuela - SiBCI |
| 7167 * Possible string values are: |
| 7168 * - "resorteviolenciaA" |
| 7169 * - "resorteviolenciaB" |
| 7170 * - "resorteviolenciaC" |
| 7171 * - "resorteviolenciaD" |
| 7172 * - "resorteviolenciaE" |
| 7173 * - "resorteviolenciaUnrated" |
| 7174 */ |
| 7175 core.String resorteviolenciaRating; |
| 7176 |
| 7177 /** |
| 7178 * Rating system in Mexico - General Directorate of Radio, Television and |
| 7179 * Cinematography |
| 7180 * Possible string values are: |
| 7181 * - "rtcA" |
| 7182 * - "rtcAa" |
| 7183 * - "rtcB" |
| 7184 * - "rtcB15" |
| 7185 * - "rtcC" |
| 7186 * - "rtcD" |
| 7187 * - "rtcUnrated" |
| 7188 */ |
| 7189 core.String rtcRating; |
| 7190 |
| 7191 /** |
| 7192 * Rating system for Ireland - Raidi� Teilif�s �ireann |
| 7193 * Possible string values are: |
| 7194 * - "rteCh" |
| 7195 * - "rteGa" |
| 7196 * - "rteMa" |
| 7197 * - "rtePs" |
| 7198 * - "rteUnrated" |
| 7199 */ |
| 7200 core.String rteRating; |
| 7201 |
| 7202 /** |
| 7203 * Rating system in Russia |
| 7204 * Possible string values are: |
| 7205 * - "russia0" |
| 7206 * - "russia12" |
| 7207 * - "russia16" |
| 7208 * - "russia18" |
| 7209 * - "russia6" |
| 7210 * - "russiaUnrated" |
| 7211 */ |
| 7212 core.String russiaRating; |
| 7213 |
| 7214 /** |
| 7215 * Rating system for Slovakia - Slovakia Rating System |
| 7216 * Possible string values are: |
| 7217 * - "skfilmG" |
| 7218 * - "skfilmP2" |
| 7219 * - "skfilmP5" |
| 7220 * - "skfilmP8" |
| 7221 * - "skfilmUnrated" |
| 7222 */ |
| 7223 core.String skfilmRating; |
| 7224 |
| 7225 /** |
| 7226 * Rating system for Iceland - SMAIS |
| 7227 * Possible string values are: |
| 7228 * - "smais12" |
| 7229 * - "smais14" |
| 7230 * - "smais16" |
| 7231 * - "smais18" |
| 7232 * - "smais7" |
| 7233 * - "smaisL" |
| 7234 * - "smaisUnrated" |
| 7235 */ |
| 7236 core.String smaisRating; |
| 7237 |
| 7238 /** |
| 7239 * Rating system for Sweden - Statens medier�d (National Media Council) |
| 7240 * Possible string values are: |
| 7241 * - "smsa11" |
| 7242 * - "smsa15" |
| 7243 * - "smsa7" |
| 7244 * - "smsaA" |
| 7245 * - "smsaUnrated" |
| 7246 */ |
| 7247 core.String smsaRating; |
| 7248 |
| 7249 /** |
| 7250 * TV Parental Guidelines rating of the content. |
| 7251 * Possible string values are: |
| 7252 * - "pg14" |
| 7253 * - "tvpgG" |
| 7254 * - "tvpgMa" |
| 7255 * - "tvpgPg" |
| 7256 * - "tvpgUnrated" |
| 7257 * - "tvpgY" |
| 7258 * - "tvpgY7" |
| 7259 * - "tvpgY7Fv" |
| 7260 */ |
| 7261 core.String tvpgRating; |
| 7262 |
| 7263 /** |
| 7264 * Internal YouTube rating. |
| 7265 * Possible string values are: |
| 7266 * - "ytAgeRestricted" |
| 7267 */ |
| 7268 core.String ytRating; |
| 7269 |
| 7270 |
| 7271 ContentRating(); |
| 7272 |
| 7273 ContentRating.fromJson(core.Map _json) { |
| 7274 if (_json.containsKey("acbRating")) { |
| 7275 acbRating = _json["acbRating"]; |
| 7276 } |
| 7277 if (_json.containsKey("agcomRating")) { |
| 7278 agcomRating = _json["agcomRating"]; |
| 7279 } |
| 7280 if (_json.containsKey("anatelRating")) { |
| 7281 anatelRating = _json["anatelRating"]; |
| 7282 } |
| 7283 if (_json.containsKey("bbfcRating")) { |
| 7284 bbfcRating = _json["bbfcRating"]; |
| 7285 } |
| 7286 if (_json.containsKey("bfvcRating")) { |
| 7287 bfvcRating = _json["bfvcRating"]; |
| 7288 } |
| 7289 if (_json.containsKey("bmukkRating")) { |
| 7290 bmukkRating = _json["bmukkRating"]; |
| 7291 } |
| 7292 if (_json.containsKey("catvRating")) { |
| 7293 catvRating = _json["catvRating"]; |
| 7294 } |
| 7295 if (_json.containsKey("catvfrRating")) { |
| 7296 catvfrRating = _json["catvfrRating"]; |
| 7297 } |
| 7298 if (_json.containsKey("cbfcRating")) { |
| 7299 cbfcRating = _json["cbfcRating"]; |
| 7300 } |
| 7301 if (_json.containsKey("cccRating")) { |
| 7302 cccRating = _json["cccRating"]; |
| 7303 } |
| 7304 if (_json.containsKey("cceRating")) { |
| 7305 cceRating = _json["cceRating"]; |
| 7306 } |
| 7307 if (_json.containsKey("chfilmRating")) { |
| 7308 chfilmRating = _json["chfilmRating"]; |
| 7309 } |
| 7310 if (_json.containsKey("chvrsRating")) { |
| 7311 chvrsRating = _json["chvrsRating"]; |
| 7312 } |
| 7313 if (_json.containsKey("cicfRating")) { |
| 7314 cicfRating = _json["cicfRating"]; |
| 7315 } |
| 7316 if (_json.containsKey("cnaRating")) { |
| 7317 cnaRating = _json["cnaRating"]; |
| 7318 } |
| 7319 if (_json.containsKey("csaRating")) { |
| 7320 csaRating = _json["csaRating"]; |
| 7321 } |
| 7322 if (_json.containsKey("cscfRating")) { |
| 7323 cscfRating = _json["cscfRating"]; |
| 7324 } |
| 7325 if (_json.containsKey("czfilmRating")) { |
| 7326 czfilmRating = _json["czfilmRating"]; |
| 7327 } |
| 7328 if (_json.containsKey("djctqRating")) { |
| 7329 djctqRating = _json["djctqRating"]; |
| 7330 } |
| 7331 if (_json.containsKey("eefilmRating")) { |
| 7332 eefilmRating = _json["eefilmRating"]; |
| 7333 } |
| 7334 if (_json.containsKey("egfilmRating")) { |
| 7335 egfilmRating = _json["egfilmRating"]; |
| 7336 } |
| 7337 if (_json.containsKey("eirinRating")) { |
| 7338 eirinRating = _json["eirinRating"]; |
| 7339 } |
| 7340 if (_json.containsKey("fcbmRating")) { |
| 7341 fcbmRating = _json["fcbmRating"]; |
| 7342 } |
| 7343 if (_json.containsKey("fcoRating")) { |
| 7344 fcoRating = _json["fcoRating"]; |
| 7345 } |
| 7346 if (_json.containsKey("fmocRating")) { |
| 7347 fmocRating = _json["fmocRating"]; |
| 7348 } |
| 7349 if (_json.containsKey("fpbRating")) { |
| 7350 fpbRating = _json["fpbRating"]; |
| 7351 } |
| 7352 if (_json.containsKey("fskRating")) { |
| 7353 fskRating = _json["fskRating"]; |
| 7354 } |
| 7355 if (_json.containsKey("grfilmRating")) { |
| 7356 grfilmRating = _json["grfilmRating"]; |
| 7357 } |
| 7358 if (_json.containsKey("icaaRating")) { |
| 7359 icaaRating = _json["icaaRating"]; |
| 7360 } |
| 7361 if (_json.containsKey("ifcoRating")) { |
| 7362 ifcoRating = _json["ifcoRating"]; |
| 7363 } |
| 7364 if (_json.containsKey("ilfilmRating")) { |
| 7365 ilfilmRating = _json["ilfilmRating"]; |
| 7366 } |
| 7367 if (_json.containsKey("incaaRating")) { |
| 7368 incaaRating = _json["incaaRating"]; |
| 7369 } |
| 7370 if (_json.containsKey("kfcbRating")) { |
| 7371 kfcbRating = _json["kfcbRating"]; |
| 7372 } |
| 7373 if (_json.containsKey("kijkwijzerRating")) { |
| 7374 kijkwijzerRating = _json["kijkwijzerRating"]; |
| 7375 } |
| 7376 if (_json.containsKey("kmrbRating")) { |
| 7377 kmrbRating = _json["kmrbRating"]; |
| 7378 } |
| 7379 if (_json.containsKey("lsfRating")) { |
| 7380 lsfRating = _json["lsfRating"]; |
| 7381 } |
| 7382 if (_json.containsKey("mccaaRating")) { |
| 7383 mccaaRating = _json["mccaaRating"]; |
| 7384 } |
| 7385 if (_json.containsKey("mccypRating")) { |
| 7386 mccypRating = _json["mccypRating"]; |
| 7387 } |
| 7388 if (_json.containsKey("mdaRating")) { |
| 7389 mdaRating = _json["mdaRating"]; |
| 7390 } |
| 7391 if (_json.containsKey("medietilsynetRating")) { |
| 7392 medietilsynetRating = _json["medietilsynetRating"]; |
| 7393 } |
| 7394 if (_json.containsKey("mekuRating")) { |
| 7395 mekuRating = _json["mekuRating"]; |
| 7396 } |
| 7397 if (_json.containsKey("mibacRating")) { |
| 7398 mibacRating = _json["mibacRating"]; |
| 7399 } |
| 7400 if (_json.containsKey("mocRating")) { |
| 7401 mocRating = _json["mocRating"]; |
| 7402 } |
| 7403 if (_json.containsKey("moctwRating")) { |
| 7404 moctwRating = _json["moctwRating"]; |
| 7405 } |
| 7406 if (_json.containsKey("mpaaRating")) { |
| 7407 mpaaRating = _json["mpaaRating"]; |
| 7408 } |
| 7409 if (_json.containsKey("mtrcbRating")) { |
| 7410 mtrcbRating = _json["mtrcbRating"]; |
| 7411 } |
| 7412 if (_json.containsKey("nbcRating")) { |
| 7413 nbcRating = _json["nbcRating"]; |
| 7414 } |
| 7415 if (_json.containsKey("nbcplRating")) { |
| 7416 nbcplRating = _json["nbcplRating"]; |
| 7417 } |
| 7418 if (_json.containsKey("nfrcRating")) { |
| 7419 nfrcRating = _json["nfrcRating"]; |
| 7420 } |
| 7421 if (_json.containsKey("nfvcbRating")) { |
| 7422 nfvcbRating = _json["nfvcbRating"]; |
| 7423 } |
| 7424 if (_json.containsKey("nkclvRating")) { |
| 7425 nkclvRating = _json["nkclvRating"]; |
| 7426 } |
| 7427 if (_json.containsKey("oflcRating")) { |
| 7428 oflcRating = _json["oflcRating"]; |
| 7429 } |
| 7430 if (_json.containsKey("pefilmRating")) { |
| 7431 pefilmRating = _json["pefilmRating"]; |
| 7432 } |
| 7433 if (_json.containsKey("rcnofRating")) { |
| 7434 rcnofRating = _json["rcnofRating"]; |
| 7435 } |
| 7436 if (_json.containsKey("resorteviolenciaRating")) { |
| 7437 resorteviolenciaRating = _json["resorteviolenciaRating"]; |
| 7438 } |
| 7439 if (_json.containsKey("rtcRating")) { |
| 7440 rtcRating = _json["rtcRating"]; |
| 7441 } |
| 7442 if (_json.containsKey("rteRating")) { |
| 7443 rteRating = _json["rteRating"]; |
| 7444 } |
| 7445 if (_json.containsKey("russiaRating")) { |
| 7446 russiaRating = _json["russiaRating"]; |
| 7447 } |
| 7448 if (_json.containsKey("skfilmRating")) { |
| 7449 skfilmRating = _json["skfilmRating"]; |
| 7450 } |
| 7451 if (_json.containsKey("smaisRating")) { |
| 7452 smaisRating = _json["smaisRating"]; |
| 7453 } |
| 7454 if (_json.containsKey("smsaRating")) { |
| 7455 smsaRating = _json["smsaRating"]; |
| 7456 } |
| 7457 if (_json.containsKey("tvpgRating")) { |
| 7458 tvpgRating = _json["tvpgRating"]; |
| 7459 } |
| 7460 if (_json.containsKey("ytRating")) { |
| 7461 ytRating = _json["ytRating"]; |
| 7462 } |
| 7463 } |
| 7464 |
| 7465 core.Map toJson() { |
| 7466 var _json = new core.Map(); |
| 7467 if (acbRating != null) { |
| 7468 _json["acbRating"] = acbRating; |
| 7469 } |
| 7470 if (agcomRating != null) { |
| 7471 _json["agcomRating"] = agcomRating; |
| 7472 } |
| 7473 if (anatelRating != null) { |
| 7474 _json["anatelRating"] = anatelRating; |
| 7475 } |
| 7476 if (bbfcRating != null) { |
| 7477 _json["bbfcRating"] = bbfcRating; |
| 7478 } |
| 7479 if (bfvcRating != null) { |
| 7480 _json["bfvcRating"] = bfvcRating; |
| 7481 } |
| 7482 if (bmukkRating != null) { |
| 7483 _json["bmukkRating"] = bmukkRating; |
| 7484 } |
| 7485 if (catvRating != null) { |
| 7486 _json["catvRating"] = catvRating; |
| 7487 } |
| 7488 if (catvfrRating != null) { |
| 7489 _json["catvfrRating"] = catvfrRating; |
| 7490 } |
| 7491 if (cbfcRating != null) { |
| 7492 _json["cbfcRating"] = cbfcRating; |
| 7493 } |
| 7494 if (cccRating != null) { |
| 7495 _json["cccRating"] = cccRating; |
| 7496 } |
| 7497 if (cceRating != null) { |
| 7498 _json["cceRating"] = cceRating; |
| 7499 } |
| 7500 if (chfilmRating != null) { |
| 7501 _json["chfilmRating"] = chfilmRating; |
| 7502 } |
| 7503 if (chvrsRating != null) { |
| 7504 _json["chvrsRating"] = chvrsRating; |
| 7505 } |
| 7506 if (cicfRating != null) { |
| 7507 _json["cicfRating"] = cicfRating; |
| 7508 } |
| 7509 if (cnaRating != null) { |
| 7510 _json["cnaRating"] = cnaRating; |
| 7511 } |
| 7512 if (csaRating != null) { |
| 7513 _json["csaRating"] = csaRating; |
| 7514 } |
| 7515 if (cscfRating != null) { |
| 7516 _json["cscfRating"] = cscfRating; |
| 7517 } |
| 7518 if (czfilmRating != null) { |
| 7519 _json["czfilmRating"] = czfilmRating; |
| 7520 } |
| 7521 if (djctqRating != null) { |
| 7522 _json["djctqRating"] = djctqRating; |
| 7523 } |
| 7524 if (eefilmRating != null) { |
| 7525 _json["eefilmRating"] = eefilmRating; |
| 7526 } |
| 7527 if (egfilmRating != null) { |
| 7528 _json["egfilmRating"] = egfilmRating; |
| 7529 } |
| 7530 if (eirinRating != null) { |
| 7531 _json["eirinRating"] = eirinRating; |
| 7532 } |
| 7533 if (fcbmRating != null) { |
| 7534 _json["fcbmRating"] = fcbmRating; |
| 7535 } |
| 7536 if (fcoRating != null) { |
| 7537 _json["fcoRating"] = fcoRating; |
| 7538 } |
| 7539 if (fmocRating != null) { |
| 7540 _json["fmocRating"] = fmocRating; |
| 7541 } |
| 7542 if (fpbRating != null) { |
| 7543 _json["fpbRating"] = fpbRating; |
| 7544 } |
| 7545 if (fskRating != null) { |
| 7546 _json["fskRating"] = fskRating; |
| 7547 } |
| 7548 if (grfilmRating != null) { |
| 7549 _json["grfilmRating"] = grfilmRating; |
| 7550 } |
| 7551 if (icaaRating != null) { |
| 7552 _json["icaaRating"] = icaaRating; |
| 7553 } |
| 7554 if (ifcoRating != null) { |
| 7555 _json["ifcoRating"] = ifcoRating; |
| 7556 } |
| 7557 if (ilfilmRating != null) { |
| 7558 _json["ilfilmRating"] = ilfilmRating; |
| 7559 } |
| 7560 if (incaaRating != null) { |
| 7561 _json["incaaRating"] = incaaRating; |
| 7562 } |
| 7563 if (kfcbRating != null) { |
| 7564 _json["kfcbRating"] = kfcbRating; |
| 7565 } |
| 7566 if (kijkwijzerRating != null) { |
| 7567 _json["kijkwijzerRating"] = kijkwijzerRating; |
| 7568 } |
| 7569 if (kmrbRating != null) { |
| 7570 _json["kmrbRating"] = kmrbRating; |
| 7571 } |
| 7572 if (lsfRating != null) { |
| 7573 _json["lsfRating"] = lsfRating; |
| 7574 } |
| 7575 if (mccaaRating != null) { |
| 7576 _json["mccaaRating"] = mccaaRating; |
| 7577 } |
| 7578 if (mccypRating != null) { |
| 7579 _json["mccypRating"] = mccypRating; |
| 7580 } |
| 7581 if (mdaRating != null) { |
| 7582 _json["mdaRating"] = mdaRating; |
| 7583 } |
| 7584 if (medietilsynetRating != null) { |
| 7585 _json["medietilsynetRating"] = medietilsynetRating; |
| 7586 } |
| 7587 if (mekuRating != null) { |
| 7588 _json["mekuRating"] = mekuRating; |
| 7589 } |
| 7590 if (mibacRating != null) { |
| 7591 _json["mibacRating"] = mibacRating; |
| 7592 } |
| 7593 if (mocRating != null) { |
| 7594 _json["mocRating"] = mocRating; |
| 7595 } |
| 7596 if (moctwRating != null) { |
| 7597 _json["moctwRating"] = moctwRating; |
| 7598 } |
| 7599 if (mpaaRating != null) { |
| 7600 _json["mpaaRating"] = mpaaRating; |
| 7601 } |
| 7602 if (mtrcbRating != null) { |
| 7603 _json["mtrcbRating"] = mtrcbRating; |
| 7604 } |
| 7605 if (nbcRating != null) { |
| 7606 _json["nbcRating"] = nbcRating; |
| 7607 } |
| 7608 if (nbcplRating != null) { |
| 7609 _json["nbcplRating"] = nbcplRating; |
| 7610 } |
| 7611 if (nfrcRating != null) { |
| 7612 _json["nfrcRating"] = nfrcRating; |
| 7613 } |
| 7614 if (nfvcbRating != null) { |
| 7615 _json["nfvcbRating"] = nfvcbRating; |
| 7616 } |
| 7617 if (nkclvRating != null) { |
| 7618 _json["nkclvRating"] = nkclvRating; |
| 7619 } |
| 7620 if (oflcRating != null) { |
| 7621 _json["oflcRating"] = oflcRating; |
| 7622 } |
| 7623 if (pefilmRating != null) { |
| 7624 _json["pefilmRating"] = pefilmRating; |
| 7625 } |
| 7626 if (rcnofRating != null) { |
| 7627 _json["rcnofRating"] = rcnofRating; |
| 7628 } |
| 7629 if (resorteviolenciaRating != null) { |
| 7630 _json["resorteviolenciaRating"] = resorteviolenciaRating; |
| 7631 } |
| 7632 if (rtcRating != null) { |
| 7633 _json["rtcRating"] = rtcRating; |
| 7634 } |
| 7635 if (rteRating != null) { |
| 7636 _json["rteRating"] = rteRating; |
| 7637 } |
| 7638 if (russiaRating != null) { |
| 7639 _json["russiaRating"] = russiaRating; |
| 7640 } |
| 7641 if (skfilmRating != null) { |
| 7642 _json["skfilmRating"] = skfilmRating; |
| 7643 } |
| 7644 if (smaisRating != null) { |
| 7645 _json["smaisRating"] = smaisRating; |
| 7646 } |
| 7647 if (smsaRating != null) { |
| 7648 _json["smsaRating"] = smsaRating; |
| 7649 } |
| 7650 if (tvpgRating != null) { |
| 7651 _json["tvpgRating"] = tvpgRating; |
| 7652 } |
| 7653 if (ytRating != null) { |
| 7654 _json["ytRating"] = ytRating; |
| 7655 } |
| 7656 return _json; |
| 7657 } |
| 7658 } |
| 7659 |
| 7660 |
| 7661 /** Geographical coordinates of a point, in WGS84. */ |
| 7662 class GeoPoint { |
| 7663 /** Altitude above the reference ellipsoid, in meters. */ |
| 7664 core.double altitude; |
| 7665 |
| 7666 /** Latitude in degrees. */ |
| 7667 core.double latitude; |
| 7668 |
| 7669 /** Longitude in degrees. */ |
| 7670 core.double longitude; |
| 7671 |
| 7672 |
| 7673 GeoPoint(); |
| 7674 |
| 7675 GeoPoint.fromJson(core.Map _json) { |
| 7676 if (_json.containsKey("altitude")) { |
| 7677 altitude = _json["altitude"]; |
| 7678 } |
| 7679 if (_json.containsKey("latitude")) { |
| 7680 latitude = _json["latitude"]; |
| 7681 } |
| 7682 if (_json.containsKey("longitude")) { |
| 7683 longitude = _json["longitude"]; |
| 7684 } |
| 7685 } |
| 7686 |
| 7687 core.Map toJson() { |
| 7688 var _json = new core.Map(); |
| 7689 if (altitude != null) { |
| 7690 _json["altitude"] = altitude; |
| 7691 } |
| 7692 if (latitude != null) { |
| 7693 _json["latitude"] = latitude; |
| 7694 } |
| 7695 if (longitude != null) { |
| 7696 _json["longitude"] = longitude; |
| 7697 } |
| 7698 return _json; |
| 7699 } |
| 7700 } |
| 7701 |
| 7702 |
| 7703 /** |
| 7704 * A guideCategory resource identifies a category that YouTube algorithmically |
| 7705 * assigns based on a channel's content or other indicators, such as the |
| 7706 * channel's popularity. The list is similar to video categories, with the |
| 7707 * difference being that a video's uploader can assign a video category but only |
| 7708 * YouTube can assign a channel category. |
| 7709 */ |
| 7710 class GuideCategory { |
| 7711 /** Etag of this resource. */ |
| 7712 core.String etag; |
| 7713 |
| 7714 /** The ID that YouTube uses to uniquely identify the guide category. */ |
| 7715 core.String id; |
| 7716 |
| 7717 /** |
| 7718 * Identifies what kind of resource this is. Value: the fixed string |
| 7719 * "youtube#guideCategory". |
| 7720 */ |
| 7721 core.String kind; |
| 7722 |
| 7723 /** |
| 7724 * The snippet object contains basic details about the category, such as its |
| 7725 * title. |
| 7726 */ |
| 7727 GuideCategorySnippet snippet; |
| 7728 |
| 7729 |
| 7730 GuideCategory(); |
| 7731 |
| 7732 GuideCategory.fromJson(core.Map _json) { |
| 7733 if (_json.containsKey("etag")) { |
| 7734 etag = _json["etag"]; |
| 7735 } |
| 7736 if (_json.containsKey("id")) { |
| 7737 id = _json["id"]; |
| 7738 } |
| 7739 if (_json.containsKey("kind")) { |
| 7740 kind = _json["kind"]; |
| 7741 } |
| 7742 if (_json.containsKey("snippet")) { |
| 7743 snippet = new GuideCategorySnippet.fromJson(_json["snippet"]); |
| 7744 } |
| 7745 } |
| 7746 |
| 7747 core.Map toJson() { |
| 7748 var _json = new core.Map(); |
| 7749 if (etag != null) { |
| 7750 _json["etag"] = etag; |
| 7751 } |
| 7752 if (id != null) { |
| 7753 _json["id"] = id; |
| 7754 } |
| 7755 if (kind != null) { |
| 7756 _json["kind"] = kind; |
| 7757 } |
| 7758 if (snippet != null) { |
| 7759 _json["snippet"] = (snippet).toJson(); |
| 7760 } |
| 7761 return _json; |
| 7762 } |
| 7763 } |
| 7764 |
| 7765 |
| 7766 /** Not documented yet. */ |
| 7767 class GuideCategoryListResponse { |
| 7768 /** Etag of this resource. */ |
| 7769 core.String etag; |
| 7770 |
| 7771 /** Serialized EventId of the request which produced this response. */ |
| 7772 core.String eventId; |
| 7773 |
| 7774 /** |
| 7775 * A list of categories that can be associated with YouTube channels. In this |
| 7776 * map, the category ID is the map key, and its value is the corresponding |
| 7777 * guideCategory resource. |
| 7778 */ |
| 7779 core.List<GuideCategory> items; |
| 7780 |
| 7781 /** |
| 7782 * Identifies what kind of resource this is. Value: the fixed string |
| 7783 * "youtube#guideCategoryListResponse". |
| 7784 */ |
| 7785 core.String kind; |
| 7786 |
| 7787 /** |
| 7788 * The token that can be used as the value of the pageToken parameter to |
| 7789 * retrieve the next page in the result set. |
| 7790 */ |
| 7791 core.String nextPageToken; |
| 7792 |
| 7793 /** Not documented yet. */ |
| 7794 PageInfo pageInfo; |
| 7795 |
| 7796 /** |
| 7797 * The token that can be used as the value of the pageToken parameter to |
| 7798 * retrieve the previous page in the result set. |
| 7799 */ |
| 7800 core.String prevPageToken; |
| 7801 |
| 7802 /** Not documented yet. */ |
| 7803 TokenPagination tokenPagination; |
| 7804 |
| 7805 /** The visitorId identifies the visitor. */ |
| 7806 core.String visitorId; |
| 7807 |
| 7808 |
| 7809 GuideCategoryListResponse(); |
| 7810 |
| 7811 GuideCategoryListResponse.fromJson(core.Map _json) { |
| 7812 if (_json.containsKey("etag")) { |
| 7813 etag = _json["etag"]; |
| 7814 } |
| 7815 if (_json.containsKey("eventId")) { |
| 7816 eventId = _json["eventId"]; |
| 7817 } |
| 7818 if (_json.containsKey("items")) { |
| 7819 items = _json["items"].map((value) => new GuideCategory.fromJson(value)).t
oList(); |
| 7820 } |
| 7821 if (_json.containsKey("kind")) { |
| 7822 kind = _json["kind"]; |
| 7823 } |
| 7824 if (_json.containsKey("nextPageToken")) { |
| 7825 nextPageToken = _json["nextPageToken"]; |
| 7826 } |
| 7827 if (_json.containsKey("pageInfo")) { |
| 7828 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 7829 } |
| 7830 if (_json.containsKey("prevPageToken")) { |
| 7831 prevPageToken = _json["prevPageToken"]; |
| 7832 } |
| 7833 if (_json.containsKey("tokenPagination")) { |
| 7834 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 7835 } |
| 7836 if (_json.containsKey("visitorId")) { |
| 7837 visitorId = _json["visitorId"]; |
| 7838 } |
| 7839 } |
| 7840 |
| 7841 core.Map toJson() { |
| 7842 var _json = new core.Map(); |
| 7843 if (etag != null) { |
| 7844 _json["etag"] = etag; |
| 7845 } |
| 7846 if (eventId != null) { |
| 7847 _json["eventId"] = eventId; |
| 7848 } |
| 7849 if (items != null) { |
| 7850 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 7851 } |
| 7852 if (kind != null) { |
| 7853 _json["kind"] = kind; |
| 7854 } |
| 7855 if (nextPageToken != null) { |
| 7856 _json["nextPageToken"] = nextPageToken; |
| 7857 } |
| 7858 if (pageInfo != null) { |
| 7859 _json["pageInfo"] = (pageInfo).toJson(); |
| 7860 } |
| 7861 if (prevPageToken != null) { |
| 7862 _json["prevPageToken"] = prevPageToken; |
| 7863 } |
| 7864 if (tokenPagination != null) { |
| 7865 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 7866 } |
| 7867 if (visitorId != null) { |
| 7868 _json["visitorId"] = visitorId; |
| 7869 } |
| 7870 return _json; |
| 7871 } |
| 7872 } |
| 7873 |
| 7874 |
| 7875 /** Basic details about a guide category. */ |
| 7876 class GuideCategorySnippet { |
| 7877 /** Not documented yet. */ |
| 7878 core.String channelId; |
| 7879 |
| 7880 /** Description of the guide category. */ |
| 7881 core.String title; |
| 7882 |
| 7883 |
| 7884 GuideCategorySnippet(); |
| 7885 |
| 7886 GuideCategorySnippet.fromJson(core.Map _json) { |
| 7887 if (_json.containsKey("channelId")) { |
| 7888 channelId = _json["channelId"]; |
| 7889 } |
| 7890 if (_json.containsKey("title")) { |
| 7891 title = _json["title"]; |
| 7892 } |
| 7893 } |
| 7894 |
| 7895 core.Map toJson() { |
| 7896 var _json = new core.Map(); |
| 7897 if (channelId != null) { |
| 7898 _json["channelId"] = channelId; |
| 7899 } |
| 7900 if (title != null) { |
| 7901 _json["title"] = title; |
| 7902 } |
| 7903 return _json; |
| 7904 } |
| 7905 } |
| 7906 |
| 7907 |
| 7908 /** |
| 7909 * An i18nLanguage resource identifies a UI language currently supported by |
| 7910 * YouTube. |
| 7911 */ |
| 7912 class I18nLanguage { |
| 7913 /** Etag of this resource. */ |
| 7914 core.String etag; |
| 7915 |
| 7916 /** The ID that YouTube uses to uniquely identify the i18n language. */ |
| 7917 core.String id; |
| 7918 |
| 7919 /** |
| 7920 * Identifies what kind of resource this is. Value: the fixed string |
| 7921 * "youtube#i18nLanguage". |
| 7922 */ |
| 7923 core.String kind; |
| 7924 |
| 7925 /** |
| 7926 * The snippet object contains basic details about the i18n language, such as |
| 7927 * language code and human-readable name. |
| 7928 */ |
| 7929 I18nLanguageSnippet snippet; |
| 7930 |
| 7931 |
| 7932 I18nLanguage(); |
| 7933 |
| 7934 I18nLanguage.fromJson(core.Map _json) { |
| 7935 if (_json.containsKey("etag")) { |
| 7936 etag = _json["etag"]; |
| 7937 } |
| 7938 if (_json.containsKey("id")) { |
| 7939 id = _json["id"]; |
| 7940 } |
| 7941 if (_json.containsKey("kind")) { |
| 7942 kind = _json["kind"]; |
| 7943 } |
| 7944 if (_json.containsKey("snippet")) { |
| 7945 snippet = new I18nLanguageSnippet.fromJson(_json["snippet"]); |
| 7946 } |
| 7947 } |
| 7948 |
| 7949 core.Map toJson() { |
| 7950 var _json = new core.Map(); |
| 7951 if (etag != null) { |
| 7952 _json["etag"] = etag; |
| 7953 } |
| 7954 if (id != null) { |
| 7955 _json["id"] = id; |
| 7956 } |
| 7957 if (kind != null) { |
| 7958 _json["kind"] = kind; |
| 7959 } |
| 7960 if (snippet != null) { |
| 7961 _json["snippet"] = (snippet).toJson(); |
| 7962 } |
| 7963 return _json; |
| 7964 } |
| 7965 } |
| 7966 |
| 7967 |
| 7968 /** Not documented yet. */ |
| 7969 class I18nLanguageListResponse { |
| 7970 /** Etag of this resource. */ |
| 7971 core.String etag; |
| 7972 |
| 7973 /** Serialized EventId of the request which produced this response. */ |
| 7974 core.String eventId; |
| 7975 |
| 7976 /** |
| 7977 * A list of supported i18n languages. In this map, the i18n language ID is |
| 7978 * the map key, and its value is the corresponding i18nLanguage resource. |
| 7979 */ |
| 7980 core.List<I18nLanguage> items; |
| 7981 |
| 7982 /** |
| 7983 * Identifies what kind of resource this is. Value: the fixed string |
| 7984 * "youtube#i18nLanguageListResponse". |
| 7985 */ |
| 7986 core.String kind; |
| 7987 |
| 7988 /** The visitorId identifies the visitor. */ |
| 7989 core.String visitorId; |
| 7990 |
| 7991 |
| 7992 I18nLanguageListResponse(); |
| 7993 |
| 7994 I18nLanguageListResponse.fromJson(core.Map _json) { |
| 7995 if (_json.containsKey("etag")) { |
| 7996 etag = _json["etag"]; |
| 7997 } |
| 7998 if (_json.containsKey("eventId")) { |
| 7999 eventId = _json["eventId"]; |
| 8000 } |
| 8001 if (_json.containsKey("items")) { |
| 8002 items = _json["items"].map((value) => new I18nLanguage.fromJson(value)).to
List(); |
| 8003 } |
| 8004 if (_json.containsKey("kind")) { |
| 8005 kind = _json["kind"]; |
| 8006 } |
| 8007 if (_json.containsKey("visitorId")) { |
| 8008 visitorId = _json["visitorId"]; |
| 8009 } |
| 8010 } |
| 8011 |
| 8012 core.Map toJson() { |
| 8013 var _json = new core.Map(); |
| 8014 if (etag != null) { |
| 8015 _json["etag"] = etag; |
| 8016 } |
| 8017 if (eventId != null) { |
| 8018 _json["eventId"] = eventId; |
| 8019 } |
| 8020 if (items != null) { |
| 8021 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 8022 } |
| 8023 if (kind != null) { |
| 8024 _json["kind"] = kind; |
| 8025 } |
| 8026 if (visitorId != null) { |
| 8027 _json["visitorId"] = visitorId; |
| 8028 } |
| 8029 return _json; |
| 8030 } |
| 8031 } |
| 8032 |
| 8033 |
| 8034 /** |
| 8035 * Basic details about an i18n language, such as language code and |
| 8036 * human-readable name. |
| 8037 */ |
| 8038 class I18nLanguageSnippet { |
| 8039 /** A short BCP-47 code that uniquely identifies a language. */ |
| 8040 core.String hl; |
| 8041 |
| 8042 /** The human-readable name of the language in the language itself. */ |
| 8043 core.String name; |
| 8044 |
| 8045 |
| 8046 I18nLanguageSnippet(); |
| 8047 |
| 8048 I18nLanguageSnippet.fromJson(core.Map _json) { |
| 8049 if (_json.containsKey("hl")) { |
| 8050 hl = _json["hl"]; |
| 8051 } |
| 8052 if (_json.containsKey("name")) { |
| 8053 name = _json["name"]; |
| 8054 } |
| 8055 } |
| 8056 |
| 8057 core.Map toJson() { |
| 8058 var _json = new core.Map(); |
| 8059 if (hl != null) { |
| 8060 _json["hl"] = hl; |
| 8061 } |
| 8062 if (name != null) { |
| 8063 _json["name"] = name; |
| 8064 } |
| 8065 return _json; |
| 8066 } |
| 8067 } |
| 8068 |
| 8069 |
| 8070 /** A i18nRegion resource identifies a region where YouTube is available. */ |
| 8071 class I18nRegion { |
| 8072 /** Etag of this resource. */ |
| 8073 core.String etag; |
| 8074 |
| 8075 /** The ID that YouTube uses to uniquely identify the i18n region. */ |
| 8076 core.String id; |
| 8077 |
| 8078 /** |
| 8079 * Identifies what kind of resource this is. Value: the fixed string |
| 8080 * "youtube#i18nRegion". |
| 8081 */ |
| 8082 core.String kind; |
| 8083 |
| 8084 /** |
| 8085 * The snippet object contains basic details about the i18n region, such as |
| 8086 * region code and human-readable name. |
| 8087 */ |
| 8088 I18nRegionSnippet snippet; |
| 8089 |
| 8090 |
| 8091 I18nRegion(); |
| 8092 |
| 8093 I18nRegion.fromJson(core.Map _json) { |
| 8094 if (_json.containsKey("etag")) { |
| 8095 etag = _json["etag"]; |
| 8096 } |
| 8097 if (_json.containsKey("id")) { |
| 8098 id = _json["id"]; |
| 8099 } |
| 8100 if (_json.containsKey("kind")) { |
| 8101 kind = _json["kind"]; |
| 8102 } |
| 8103 if (_json.containsKey("snippet")) { |
| 8104 snippet = new I18nRegionSnippet.fromJson(_json["snippet"]); |
| 8105 } |
| 8106 } |
| 8107 |
| 8108 core.Map toJson() { |
| 8109 var _json = new core.Map(); |
| 8110 if (etag != null) { |
| 8111 _json["etag"] = etag; |
| 8112 } |
| 8113 if (id != null) { |
| 8114 _json["id"] = id; |
| 8115 } |
| 8116 if (kind != null) { |
| 8117 _json["kind"] = kind; |
| 8118 } |
| 8119 if (snippet != null) { |
| 8120 _json["snippet"] = (snippet).toJson(); |
| 8121 } |
| 8122 return _json; |
| 8123 } |
| 8124 } |
| 8125 |
| 8126 |
| 8127 /** Not documented yet. */ |
| 8128 class I18nRegionListResponse { |
| 8129 /** Etag of this resource. */ |
| 8130 core.String etag; |
| 8131 |
| 8132 /** Serialized EventId of the request which produced this response. */ |
| 8133 core.String eventId; |
| 8134 |
| 8135 /** |
| 8136 * A list of regions where YouTube is available. In this map, the i18n region |
| 8137 * ID is the map key, and its value is the corresponding i18nRegion resource. |
| 8138 */ |
| 8139 core.List<I18nRegion> items; |
| 8140 |
| 8141 /** |
| 8142 * Identifies what kind of resource this is. Value: the fixed string |
| 8143 * "youtube#i18nRegionListResponse". |
| 8144 */ |
| 8145 core.String kind; |
| 8146 |
| 8147 /** The visitorId identifies the visitor. */ |
| 8148 core.String visitorId; |
| 8149 |
| 8150 |
| 8151 I18nRegionListResponse(); |
| 8152 |
| 8153 I18nRegionListResponse.fromJson(core.Map _json) { |
| 8154 if (_json.containsKey("etag")) { |
| 8155 etag = _json["etag"]; |
| 8156 } |
| 8157 if (_json.containsKey("eventId")) { |
| 8158 eventId = _json["eventId"]; |
| 8159 } |
| 8160 if (_json.containsKey("items")) { |
| 8161 items = _json["items"].map((value) => new I18nRegion.fromJson(value)).toLi
st(); |
| 8162 } |
| 8163 if (_json.containsKey("kind")) { |
| 8164 kind = _json["kind"]; |
| 8165 } |
| 8166 if (_json.containsKey("visitorId")) { |
| 8167 visitorId = _json["visitorId"]; |
| 8168 } |
| 8169 } |
| 8170 |
| 8171 core.Map toJson() { |
| 8172 var _json = new core.Map(); |
| 8173 if (etag != null) { |
| 8174 _json["etag"] = etag; |
| 8175 } |
| 8176 if (eventId != null) { |
| 8177 _json["eventId"] = eventId; |
| 8178 } |
| 8179 if (items != null) { |
| 8180 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 8181 } |
| 8182 if (kind != null) { |
| 8183 _json["kind"] = kind; |
| 8184 } |
| 8185 if (visitorId != null) { |
| 8186 _json["visitorId"] = visitorId; |
| 8187 } |
| 8188 return _json; |
| 8189 } |
| 8190 } |
| 8191 |
| 8192 |
| 8193 /** |
| 8194 * Basic details about an i18n region, such as region code and human-readable |
| 8195 * name. |
| 8196 */ |
| 8197 class I18nRegionSnippet { |
| 8198 /** The region code as a 2-letter ISO country code. */ |
| 8199 core.String gl; |
| 8200 |
| 8201 /** The human-readable name of the region. */ |
| 8202 core.String name; |
| 8203 |
| 8204 |
| 8205 I18nRegionSnippet(); |
| 8206 |
| 8207 I18nRegionSnippet.fromJson(core.Map _json) { |
| 8208 if (_json.containsKey("gl")) { |
| 8209 gl = _json["gl"]; |
| 8210 } |
| 8211 if (_json.containsKey("name")) { |
| 8212 name = _json["name"]; |
| 8213 } |
| 8214 } |
| 8215 |
| 8216 core.Map toJson() { |
| 8217 var _json = new core.Map(); |
| 8218 if (gl != null) { |
| 8219 _json["gl"] = gl; |
| 8220 } |
| 8221 if (name != null) { |
| 8222 _json["name"] = name; |
| 8223 } |
| 8224 return _json; |
| 8225 } |
| 8226 } |
| 8227 |
| 8228 |
| 8229 /** Branding properties for images associated with the channel. */ |
| 8230 class ImageSettings { |
| 8231 /** |
| 8232 * The URL for the background image shown on the video watch page. The image |
| 8233 * should be 1200px by 615px, with a maximum file size of 128k. |
| 8234 */ |
| 8235 LocalizedProperty backgroundImageUrl; |
| 8236 |
| 8237 /** |
| 8238 * This is used only in update requests; if it's set, we use this URL to |
| 8239 * generate all of the above banner URLs. |
| 8240 */ |
| 8241 core.String bannerExternalUrl; |
| 8242 |
| 8243 /** Banner image. Desktop size (1060x175). */ |
| 8244 core.String bannerImageUrl; |
| 8245 |
| 8246 /** Banner image. Mobile size high resolution (1440x395). */ |
| 8247 core.String bannerMobileExtraHdImageUrl; |
| 8248 |
| 8249 /** Banner image. Mobile size high resolution (1280x360). */ |
| 8250 core.String bannerMobileHdImageUrl; |
| 8251 |
| 8252 /** Banner image. Mobile size (640x175). */ |
| 8253 core.String bannerMobileImageUrl; |
| 8254 |
| 8255 /** Banner image. Mobile size low resolution (320x88). */ |
| 8256 core.String bannerMobileLowImageUrl; |
| 8257 |
| 8258 /** Banner image. Mobile size medium/high resolution (960x263). */ |
| 8259 core.String bannerMobileMediumHdImageUrl; |
| 8260 |
| 8261 /** Banner image. Tablet size extra high resolution (2560x424). */ |
| 8262 core.String bannerTabletExtraHdImageUrl; |
| 8263 |
| 8264 /** Banner image. Tablet size high resolution (2276x377). */ |
| 8265 core.String bannerTabletHdImageUrl; |
| 8266 |
| 8267 /** Banner image. Tablet size (1707x283). */ |
| 8268 core.String bannerTabletImageUrl; |
| 8269 |
| 8270 /** Banner image. Tablet size low resolution (1138x188). */ |
| 8271 core.String bannerTabletLowImageUrl; |
| 8272 |
| 8273 /** Banner image. TV size high resolution (1920x1080). */ |
| 8274 core.String bannerTvHighImageUrl; |
| 8275 |
| 8276 /** Banner image. TV size extra high resolution (2120x1192). */ |
| 8277 core.String bannerTvImageUrl; |
| 8278 |
| 8279 /** Banner image. TV size low resolution (854x480). */ |
| 8280 core.String bannerTvLowImageUrl; |
| 8281 |
| 8282 /** Banner image. TV size medium resolution (1280x720). */ |
| 8283 core.String bannerTvMediumImageUrl; |
| 8284 |
| 8285 /** The image map script for the large banner image. */ |
| 8286 LocalizedProperty largeBrandedBannerImageImapScript; |
| 8287 |
| 8288 /** |
| 8289 * The URL for the 854px by 70px image that appears below the video player in |
| 8290 * the expanded video view of the video watch page. |
| 8291 */ |
| 8292 LocalizedProperty largeBrandedBannerImageUrl; |
| 8293 |
| 8294 /** The image map script for the small banner image. */ |
| 8295 LocalizedProperty smallBrandedBannerImageImapScript; |
| 8296 |
| 8297 /** |
| 8298 * The URL for the 640px by 70px banner image that appears below the video |
| 8299 * player in the default view of the video watch page. |
| 8300 */ |
| 8301 LocalizedProperty smallBrandedBannerImageUrl; |
| 8302 |
| 8303 /** |
| 8304 * The URL for a 1px by 1px tracking pixel that can be used to collect |
| 8305 * statistics for views of the channel or video pages. |
| 8306 */ |
| 8307 core.String trackingImageUrl; |
| 8308 |
| 8309 /** |
| 8310 * The URL for the image that appears above the top-left corner of the video |
| 8311 * player. This is a 25-pixel-high image with a flexible width that cannot |
| 8312 * exceed 170 pixels. |
| 8313 */ |
| 8314 core.String watchIconImageUrl; |
| 8315 |
| 8316 |
| 8317 ImageSettings(); |
| 8318 |
| 8319 ImageSettings.fromJson(core.Map _json) { |
| 8320 if (_json.containsKey("backgroundImageUrl")) { |
| 8321 backgroundImageUrl = new LocalizedProperty.fromJson(_json["backgroundImage
Url"]); |
| 8322 } |
| 8323 if (_json.containsKey("bannerExternalUrl")) { |
| 8324 bannerExternalUrl = _json["bannerExternalUrl"]; |
| 8325 } |
| 8326 if (_json.containsKey("bannerImageUrl")) { |
| 8327 bannerImageUrl = _json["bannerImageUrl"]; |
| 8328 } |
| 8329 if (_json.containsKey("bannerMobileExtraHdImageUrl")) { |
| 8330 bannerMobileExtraHdImageUrl = _json["bannerMobileExtraHdImageUrl"]; |
| 8331 } |
| 8332 if (_json.containsKey("bannerMobileHdImageUrl")) { |
| 8333 bannerMobileHdImageUrl = _json["bannerMobileHdImageUrl"]; |
| 8334 } |
| 8335 if (_json.containsKey("bannerMobileImageUrl")) { |
| 8336 bannerMobileImageUrl = _json["bannerMobileImageUrl"]; |
| 8337 } |
| 8338 if (_json.containsKey("bannerMobileLowImageUrl")) { |
| 8339 bannerMobileLowImageUrl = _json["bannerMobileLowImageUrl"]; |
| 8340 } |
| 8341 if (_json.containsKey("bannerMobileMediumHdImageUrl")) { |
| 8342 bannerMobileMediumHdImageUrl = _json["bannerMobileMediumHdImageUrl"]; |
| 8343 } |
| 8344 if (_json.containsKey("bannerTabletExtraHdImageUrl")) { |
| 8345 bannerTabletExtraHdImageUrl = _json["bannerTabletExtraHdImageUrl"]; |
| 8346 } |
| 8347 if (_json.containsKey("bannerTabletHdImageUrl")) { |
| 8348 bannerTabletHdImageUrl = _json["bannerTabletHdImageUrl"]; |
| 8349 } |
| 8350 if (_json.containsKey("bannerTabletImageUrl")) { |
| 8351 bannerTabletImageUrl = _json["bannerTabletImageUrl"]; |
| 8352 } |
| 8353 if (_json.containsKey("bannerTabletLowImageUrl")) { |
| 8354 bannerTabletLowImageUrl = _json["bannerTabletLowImageUrl"]; |
| 8355 } |
| 8356 if (_json.containsKey("bannerTvHighImageUrl")) { |
| 8357 bannerTvHighImageUrl = _json["bannerTvHighImageUrl"]; |
| 8358 } |
| 8359 if (_json.containsKey("bannerTvImageUrl")) { |
| 8360 bannerTvImageUrl = _json["bannerTvImageUrl"]; |
| 8361 } |
| 8362 if (_json.containsKey("bannerTvLowImageUrl")) { |
| 8363 bannerTvLowImageUrl = _json["bannerTvLowImageUrl"]; |
| 8364 } |
| 8365 if (_json.containsKey("bannerTvMediumImageUrl")) { |
| 8366 bannerTvMediumImageUrl = _json["bannerTvMediumImageUrl"]; |
| 8367 } |
| 8368 if (_json.containsKey("largeBrandedBannerImageImapScript")) { |
| 8369 largeBrandedBannerImageImapScript = new LocalizedProperty.fromJson(_json["
largeBrandedBannerImageImapScript"]); |
| 8370 } |
| 8371 if (_json.containsKey("largeBrandedBannerImageUrl")) { |
| 8372 largeBrandedBannerImageUrl = new LocalizedProperty.fromJson(_json["largeBr
andedBannerImageUrl"]); |
| 8373 } |
| 8374 if (_json.containsKey("smallBrandedBannerImageImapScript")) { |
| 8375 smallBrandedBannerImageImapScript = new LocalizedProperty.fromJson(_json["
smallBrandedBannerImageImapScript"]); |
| 8376 } |
| 8377 if (_json.containsKey("smallBrandedBannerImageUrl")) { |
| 8378 smallBrandedBannerImageUrl = new LocalizedProperty.fromJson(_json["smallBr
andedBannerImageUrl"]); |
| 8379 } |
| 8380 if (_json.containsKey("trackingImageUrl")) { |
| 8381 trackingImageUrl = _json["trackingImageUrl"]; |
| 8382 } |
| 8383 if (_json.containsKey("watchIconImageUrl")) { |
| 8384 watchIconImageUrl = _json["watchIconImageUrl"]; |
| 8385 } |
| 8386 } |
| 8387 |
| 8388 core.Map toJson() { |
| 8389 var _json = new core.Map(); |
| 8390 if (backgroundImageUrl != null) { |
| 8391 _json["backgroundImageUrl"] = (backgroundImageUrl).toJson(); |
| 8392 } |
| 8393 if (bannerExternalUrl != null) { |
| 8394 _json["bannerExternalUrl"] = bannerExternalUrl; |
| 8395 } |
| 8396 if (bannerImageUrl != null) { |
| 8397 _json["bannerImageUrl"] = bannerImageUrl; |
| 8398 } |
| 8399 if (bannerMobileExtraHdImageUrl != null) { |
| 8400 _json["bannerMobileExtraHdImageUrl"] = bannerMobileExtraHdImageUrl; |
| 8401 } |
| 8402 if (bannerMobileHdImageUrl != null) { |
| 8403 _json["bannerMobileHdImageUrl"] = bannerMobileHdImageUrl; |
| 8404 } |
| 8405 if (bannerMobileImageUrl != null) { |
| 8406 _json["bannerMobileImageUrl"] = bannerMobileImageUrl; |
| 8407 } |
| 8408 if (bannerMobileLowImageUrl != null) { |
| 8409 _json["bannerMobileLowImageUrl"] = bannerMobileLowImageUrl; |
| 8410 } |
| 8411 if (bannerMobileMediumHdImageUrl != null) { |
| 8412 _json["bannerMobileMediumHdImageUrl"] = bannerMobileMediumHdImageUrl; |
| 8413 } |
| 8414 if (bannerTabletExtraHdImageUrl != null) { |
| 8415 _json["bannerTabletExtraHdImageUrl"] = bannerTabletExtraHdImageUrl; |
| 8416 } |
| 8417 if (bannerTabletHdImageUrl != null) { |
| 8418 _json["bannerTabletHdImageUrl"] = bannerTabletHdImageUrl; |
| 8419 } |
| 8420 if (bannerTabletImageUrl != null) { |
| 8421 _json["bannerTabletImageUrl"] = bannerTabletImageUrl; |
| 8422 } |
| 8423 if (bannerTabletLowImageUrl != null) { |
| 8424 _json["bannerTabletLowImageUrl"] = bannerTabletLowImageUrl; |
| 8425 } |
| 8426 if (bannerTvHighImageUrl != null) { |
| 8427 _json["bannerTvHighImageUrl"] = bannerTvHighImageUrl; |
| 8428 } |
| 8429 if (bannerTvImageUrl != null) { |
| 8430 _json["bannerTvImageUrl"] = bannerTvImageUrl; |
| 8431 } |
| 8432 if (bannerTvLowImageUrl != null) { |
| 8433 _json["bannerTvLowImageUrl"] = bannerTvLowImageUrl; |
| 8434 } |
| 8435 if (bannerTvMediumImageUrl != null) { |
| 8436 _json["bannerTvMediumImageUrl"] = bannerTvMediumImageUrl; |
| 8437 } |
| 8438 if (largeBrandedBannerImageImapScript != null) { |
| 8439 _json["largeBrandedBannerImageImapScript"] = (largeBrandedBannerImageImapS
cript).toJson(); |
| 8440 } |
| 8441 if (largeBrandedBannerImageUrl != null) { |
| 8442 _json["largeBrandedBannerImageUrl"] = (largeBrandedBannerImageUrl).toJson(
); |
| 8443 } |
| 8444 if (smallBrandedBannerImageImapScript != null) { |
| 8445 _json["smallBrandedBannerImageImapScript"] = (smallBrandedBannerImageImapS
cript).toJson(); |
| 8446 } |
| 8447 if (smallBrandedBannerImageUrl != null) { |
| 8448 _json["smallBrandedBannerImageUrl"] = (smallBrandedBannerImageUrl).toJson(
); |
| 8449 } |
| 8450 if (trackingImageUrl != null) { |
| 8451 _json["trackingImageUrl"] = trackingImageUrl; |
| 8452 } |
| 8453 if (watchIconImageUrl != null) { |
| 8454 _json["watchIconImageUrl"] = watchIconImageUrl; |
| 8455 } |
| 8456 return _json; |
| 8457 } |
| 8458 } |
| 8459 |
| 8460 |
| 8461 /** Describes information necessary for ingesting an RTMP or an HTTP stream. */ |
| 8462 class IngestionInfo { |
| 8463 /** |
| 8464 * The backup ingestion URL that you should use to stream video to YouTube. |
| 8465 * You have the option of simultaneously streaming the content that you are |
| 8466 * sending to the ingestionAddress to this URL. |
| 8467 */ |
| 8468 core.String backupIngestionAddress; |
| 8469 |
| 8470 /** |
| 8471 * The primary ingestion URL that you should use to stream video to YouTube. |
| 8472 * You must stream video to this URL. |
| 8473 * |
| 8474 * Depending on which application or tool you use to encode your video stream, |
| 8475 * you may need to enter the stream URL and stream name separately or you may |
| 8476 * need to concatenate them in the following format: |
| 8477 * |
| 8478 * STREAM_URL/STREAM_NAME |
| 8479 */ |
| 8480 core.String ingestionAddress; |
| 8481 |
| 8482 /** The HTTP or RTMP stream name that YouTube assigns to the video stream. */ |
| 8483 core.String streamName; |
| 8484 |
| 8485 |
| 8486 IngestionInfo(); |
| 8487 |
| 8488 IngestionInfo.fromJson(core.Map _json) { |
| 8489 if (_json.containsKey("backupIngestionAddress")) { |
| 8490 backupIngestionAddress = _json["backupIngestionAddress"]; |
| 8491 } |
| 8492 if (_json.containsKey("ingestionAddress")) { |
| 8493 ingestionAddress = _json["ingestionAddress"]; |
| 8494 } |
| 8495 if (_json.containsKey("streamName")) { |
| 8496 streamName = _json["streamName"]; |
| 8497 } |
| 8498 } |
| 8499 |
| 8500 core.Map toJson() { |
| 8501 var _json = new core.Map(); |
| 8502 if (backupIngestionAddress != null) { |
| 8503 _json["backupIngestionAddress"] = backupIngestionAddress; |
| 8504 } |
| 8505 if (ingestionAddress != null) { |
| 8506 _json["ingestionAddress"] = ingestionAddress; |
| 8507 } |
| 8508 if (streamName != null) { |
| 8509 _json["streamName"] = streamName; |
| 8510 } |
| 8511 return _json; |
| 8512 } |
| 8513 } |
| 8514 |
| 8515 |
| 8516 /** Not documented yet. */ |
| 8517 class InvideoBranding { |
| 8518 /** Not documented yet. */ |
| 8519 core.String imageBytes; |
| 8520 |
| 8521 core.List<core.int> get imageBytesAsBytes { |
| 8522 return crypto.CryptoUtils.base64StringToBytes(imageBytes); |
| 8523 } |
| 8524 |
| 8525 void set imageBytesAsBytes(core.List<core.int> _bytes) { |
| 8526 imageBytes = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 8527 } |
| 8528 |
| 8529 /** Not documented yet. */ |
| 8530 core.String imageUrl; |
| 8531 |
| 8532 /** Not documented yet. */ |
| 8533 InvideoPosition position; |
| 8534 |
| 8535 /** Not documented yet. */ |
| 8536 core.String targetChannelId; |
| 8537 |
| 8538 /** Not documented yet. */ |
| 8539 InvideoTiming timing; |
| 8540 |
| 8541 |
| 8542 InvideoBranding(); |
| 8543 |
| 8544 InvideoBranding.fromJson(core.Map _json) { |
| 8545 if (_json.containsKey("imageBytes")) { |
| 8546 imageBytes = _json["imageBytes"]; |
| 8547 } |
| 8548 if (_json.containsKey("imageUrl")) { |
| 8549 imageUrl = _json["imageUrl"]; |
| 8550 } |
| 8551 if (_json.containsKey("position")) { |
| 8552 position = new InvideoPosition.fromJson(_json["position"]); |
| 8553 } |
| 8554 if (_json.containsKey("targetChannelId")) { |
| 8555 targetChannelId = _json["targetChannelId"]; |
| 8556 } |
| 8557 if (_json.containsKey("timing")) { |
| 8558 timing = new InvideoTiming.fromJson(_json["timing"]); |
| 8559 } |
| 8560 } |
| 8561 |
| 8562 core.Map toJson() { |
| 8563 var _json = new core.Map(); |
| 8564 if (imageBytes != null) { |
| 8565 _json["imageBytes"] = imageBytes; |
| 8566 } |
| 8567 if (imageUrl != null) { |
| 8568 _json["imageUrl"] = imageUrl; |
| 8569 } |
| 8570 if (position != null) { |
| 8571 _json["position"] = (position).toJson(); |
| 8572 } |
| 8573 if (targetChannelId != null) { |
| 8574 _json["targetChannelId"] = targetChannelId; |
| 8575 } |
| 8576 if (timing != null) { |
| 8577 _json["timing"] = (timing).toJson(); |
| 8578 } |
| 8579 return _json; |
| 8580 } |
| 8581 } |
| 8582 |
| 8583 |
| 8584 /** |
| 8585 * Describes the spatial position of a visual widget inside a video. It is a |
| 8586 * union of various position types, out of which only will be set one. |
| 8587 */ |
| 8588 class InvideoPosition { |
| 8589 /** |
| 8590 * Describes in which corner of the video the visual widget will appear. |
| 8591 * Possible string values are: |
| 8592 * - "bottomLeft" |
| 8593 * - "bottomRight" |
| 8594 * - "topLeft" |
| 8595 * - "topRight" |
| 8596 */ |
| 8597 core.String cornerPosition; |
| 8598 |
| 8599 /** |
| 8600 * Defines the position type. |
| 8601 * Possible string values are: |
| 8602 * - "corner" |
| 8603 */ |
| 8604 core.String type; |
| 8605 |
| 8606 |
| 8607 InvideoPosition(); |
| 8608 |
| 8609 InvideoPosition.fromJson(core.Map _json) { |
| 8610 if (_json.containsKey("cornerPosition")) { |
| 8611 cornerPosition = _json["cornerPosition"]; |
| 8612 } |
| 8613 if (_json.containsKey("type")) { |
| 8614 type = _json["type"]; |
| 8615 } |
| 8616 } |
| 8617 |
| 8618 core.Map toJson() { |
| 8619 var _json = new core.Map(); |
| 8620 if (cornerPosition != null) { |
| 8621 _json["cornerPosition"] = cornerPosition; |
| 8622 } |
| 8623 if (type != null) { |
| 8624 _json["type"] = type; |
| 8625 } |
| 8626 return _json; |
| 8627 } |
| 8628 } |
| 8629 |
| 8630 |
| 8631 /** |
| 8632 * Describes an invideo promotion campaign consisting of multiple promoted |
| 8633 * items. A campaign belongs to a single channel_id. |
| 8634 */ |
| 8635 class InvideoPromotion { |
| 8636 /** |
| 8637 * The default temporal position within the video where the promoted item will |
| 8638 * be displayed. Can be overriden by more specific timing in the item. |
| 8639 */ |
| 8640 InvideoTiming defaultTiming; |
| 8641 |
| 8642 /** List of promoted items in decreasing priority. */ |
| 8643 core.List<PromotedItem> items; |
| 8644 |
| 8645 /** |
| 8646 * The spatial position within the video where the promoted item will be |
| 8647 * displayed. |
| 8648 */ |
| 8649 InvideoPosition position; |
| 8650 |
| 8651 |
| 8652 InvideoPromotion(); |
| 8653 |
| 8654 InvideoPromotion.fromJson(core.Map _json) { |
| 8655 if (_json.containsKey("defaultTiming")) { |
| 8656 defaultTiming = new InvideoTiming.fromJson(_json["defaultTiming"]); |
| 8657 } |
| 8658 if (_json.containsKey("items")) { |
| 8659 items = _json["items"].map((value) => new PromotedItem.fromJson(value)).to
List(); |
| 8660 } |
| 8661 if (_json.containsKey("position")) { |
| 8662 position = new InvideoPosition.fromJson(_json["position"]); |
| 8663 } |
| 8664 } |
| 8665 |
| 8666 core.Map toJson() { |
| 8667 var _json = new core.Map(); |
| 8668 if (defaultTiming != null) { |
| 8669 _json["defaultTiming"] = (defaultTiming).toJson(); |
| 8670 } |
| 8671 if (items != null) { |
| 8672 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 8673 } |
| 8674 if (position != null) { |
| 8675 _json["position"] = (position).toJson(); |
| 8676 } |
| 8677 return _json; |
| 8678 } |
| 8679 } |
| 8680 |
| 8681 |
| 8682 /** Describes a temporal position of a visual widget inside a video. */ |
| 8683 class InvideoTiming { |
| 8684 /** |
| 8685 * Defines the duration in milliseconds for which the promotion should be |
| 8686 * displayed. If missing, the client should use the default. |
| 8687 */ |
| 8688 core.String durationMs; |
| 8689 |
| 8690 /** |
| 8691 * Defines the time at which the promotion will appear. Depending on the value |
| 8692 * of type the value of the offsetMs field will represent a time offset from |
| 8693 * the start or from the end of the video, expressed in milliseconds. |
| 8694 */ |
| 8695 core.String offsetMs; |
| 8696 |
| 8697 /** |
| 8698 * Describes a timing type. If the value is offsetFromStart, then the offsetMs |
| 8699 * field represents an offset from the start of the video. If the value is |
| 8700 * offsetFromEnd, then the offsetMs field represents an offset from the end of |
| 8701 * the video. |
| 8702 * Possible string values are: |
| 8703 * - "offsetFromEnd" |
| 8704 * - "offsetFromStart" |
| 8705 */ |
| 8706 core.String type; |
| 8707 |
| 8708 |
| 8709 InvideoTiming(); |
| 8710 |
| 8711 InvideoTiming.fromJson(core.Map _json) { |
| 8712 if (_json.containsKey("durationMs")) { |
| 8713 durationMs = _json["durationMs"]; |
| 8714 } |
| 8715 if (_json.containsKey("offsetMs")) { |
| 8716 offsetMs = _json["offsetMs"]; |
| 8717 } |
| 8718 if (_json.containsKey("type")) { |
| 8719 type = _json["type"]; |
| 8720 } |
| 8721 } |
| 8722 |
| 8723 core.Map toJson() { |
| 8724 var _json = new core.Map(); |
| 8725 if (durationMs != null) { |
| 8726 _json["durationMs"] = durationMs; |
| 8727 } |
| 8728 if (offsetMs != null) { |
| 8729 _json["offsetMs"] = offsetMs; |
| 8730 } |
| 8731 if (type != null) { |
| 8732 _json["type"] = type; |
| 8733 } |
| 8734 return _json; |
| 8735 } |
| 8736 } |
| 8737 |
| 8738 |
| 8739 /** |
| 8740 * A liveBroadcast resource represents an event that will be streamed, via live |
| 8741 * video, on YouTube. |
| 8742 */ |
| 8743 class LiveBroadcast { |
| 8744 /** |
| 8745 * The contentDetails object contains information about the event's video |
| 8746 * content, such as whether the content can be shown in an embedded video |
| 8747 * player or if it will be archived and therefore available for viewing after |
| 8748 * the event has concluded. |
| 8749 */ |
| 8750 LiveBroadcastContentDetails contentDetails; |
| 8751 |
| 8752 /** Etag of this resource. */ |
| 8753 core.String etag; |
| 8754 |
| 8755 /** The ID that YouTube assigns to uniquely identify the broadcast. */ |
| 8756 core.String id; |
| 8757 |
| 8758 /** |
| 8759 * Identifies what kind of resource this is. Value: the fixed string |
| 8760 * "youtube#liveBroadcast". |
| 8761 */ |
| 8762 core.String kind; |
| 8763 |
| 8764 /** |
| 8765 * The snippet object contains basic details about the event, including its |
| 8766 * title, description, start time, and end time. |
| 8767 */ |
| 8768 LiveBroadcastSnippet snippet; |
| 8769 |
| 8770 /** The status object contains information about the event's status. */ |
| 8771 LiveBroadcastStatus status; |
| 8772 |
| 8773 |
| 8774 LiveBroadcast(); |
| 8775 |
| 8776 LiveBroadcast.fromJson(core.Map _json) { |
| 8777 if (_json.containsKey("contentDetails")) { |
| 8778 contentDetails = new LiveBroadcastContentDetails.fromJson(_json["contentDe
tails"]); |
| 8779 } |
| 8780 if (_json.containsKey("etag")) { |
| 8781 etag = _json["etag"]; |
| 8782 } |
| 8783 if (_json.containsKey("id")) { |
| 8784 id = _json["id"]; |
| 8785 } |
| 8786 if (_json.containsKey("kind")) { |
| 8787 kind = _json["kind"]; |
| 8788 } |
| 8789 if (_json.containsKey("snippet")) { |
| 8790 snippet = new LiveBroadcastSnippet.fromJson(_json["snippet"]); |
| 8791 } |
| 8792 if (_json.containsKey("status")) { |
| 8793 status = new LiveBroadcastStatus.fromJson(_json["status"]); |
| 8794 } |
| 8795 } |
| 8796 |
| 8797 core.Map toJson() { |
| 8798 var _json = new core.Map(); |
| 8799 if (contentDetails != null) { |
| 8800 _json["contentDetails"] = (contentDetails).toJson(); |
| 8801 } |
| 8802 if (etag != null) { |
| 8803 _json["etag"] = etag; |
| 8804 } |
| 8805 if (id != null) { |
| 8806 _json["id"] = id; |
| 8807 } |
| 8808 if (kind != null) { |
| 8809 _json["kind"] = kind; |
| 8810 } |
| 8811 if (snippet != null) { |
| 8812 _json["snippet"] = (snippet).toJson(); |
| 8813 } |
| 8814 if (status != null) { |
| 8815 _json["status"] = (status).toJson(); |
| 8816 } |
| 8817 return _json; |
| 8818 } |
| 8819 } |
| 8820 |
| 8821 |
| 8822 /** Detailed settings of a broadcast. */ |
| 8823 class LiveBroadcastContentDetails { |
| 8824 /** This value uniquely identifies the live stream bound to the broadcast. */ |
| 8825 core.String boundStreamId; |
| 8826 |
| 8827 /** |
| 8828 * This setting indicates whether closed captioning is enabled for this |
| 8829 * broadcast. The ingestion URL of the closed captions is returned through the |
| 8830 * liveStreams API. |
| 8831 */ |
| 8832 core.bool enableClosedCaptions; |
| 8833 |
| 8834 /** |
| 8835 * This setting indicates whether YouTube should enable content encryption for |
| 8836 * the broadcast. |
| 8837 */ |
| 8838 core.bool enableContentEncryption; |
| 8839 |
| 8840 /** |
| 8841 * This setting determines whether viewers can access DVR controls while |
| 8842 * watching the video. DVR controls enable the viewer to control the video |
| 8843 * playback experience by pausing, rewinding, or fast forwarding content. The |
| 8844 * default value for this property is true. |
| 8845 * |
| 8846 * |
| 8847 * |
| 8848 * Important: You must set the value to true and also set the enableArchive |
| 8849 * property's value to true if you want to make playback available immediately |
| 8850 * after the broadcast ends. |
| 8851 */ |
| 8852 core.bool enableDvr; |
| 8853 |
| 8854 /** |
| 8855 * This setting indicates whether the broadcast video can be played in an |
| 8856 * embedded player. If you choose to archive the video (using the |
| 8857 * enableArchive property), this setting will also apply to the archived |
| 8858 * video. |
| 8859 */ |
| 8860 core.bool enableEmbed; |
| 8861 |
| 8862 /** |
| 8863 * The monitorStream object contains information about the monitor stream, |
| 8864 * which the broadcaster can use to review the event content before the |
| 8865 * broadcast stream is shown publicly. |
| 8866 */ |
| 8867 MonitorStreamInfo monitorStream; |
| 8868 |
| 8869 /** |
| 8870 * Automatically start recording after the event goes live. The default value |
| 8871 * for this property is true. |
| 8872 * |
| 8873 * |
| 8874 * |
| 8875 * Important: You must also set the enableDvr property's value to true if you |
| 8876 * want the playback to be available immediately after the broadcast ends. If |
| 8877 * you set this property's value to true but do not also set the enableDvr |
| 8878 * property to true, there may be a delay of around one day before the |
| 8879 * archived video will be available for playback. |
| 8880 */ |
| 8881 core.bool recordFromStart; |
| 8882 |
| 8883 /** |
| 8884 * This setting indicates whether the broadcast should automatically begin |
| 8885 * with an in-stream slate when you update the broadcast's status to live. |
| 8886 * After updating the status, you then need to send a liveCuepoints.insert |
| 8887 * request that sets the cuepoint's eventState to end to remove the in-stream |
| 8888 * slate and make your broadcast stream visible to viewers. |
| 8889 */ |
| 8890 core.bool startWithSlate; |
| 8891 |
| 8892 |
| 8893 LiveBroadcastContentDetails(); |
| 8894 |
| 8895 LiveBroadcastContentDetails.fromJson(core.Map _json) { |
| 8896 if (_json.containsKey("boundStreamId")) { |
| 8897 boundStreamId = _json["boundStreamId"]; |
| 8898 } |
| 8899 if (_json.containsKey("enableClosedCaptions")) { |
| 8900 enableClosedCaptions = _json["enableClosedCaptions"]; |
| 8901 } |
| 8902 if (_json.containsKey("enableContentEncryption")) { |
| 8903 enableContentEncryption = _json["enableContentEncryption"]; |
| 8904 } |
| 8905 if (_json.containsKey("enableDvr")) { |
| 8906 enableDvr = _json["enableDvr"]; |
| 8907 } |
| 8908 if (_json.containsKey("enableEmbed")) { |
| 8909 enableEmbed = _json["enableEmbed"]; |
| 8910 } |
| 8911 if (_json.containsKey("monitorStream")) { |
| 8912 monitorStream = new MonitorStreamInfo.fromJson(_json["monitorStream"]); |
| 8913 } |
| 8914 if (_json.containsKey("recordFromStart")) { |
| 8915 recordFromStart = _json["recordFromStart"]; |
| 8916 } |
| 8917 if (_json.containsKey("startWithSlate")) { |
| 8918 startWithSlate = _json["startWithSlate"]; |
| 8919 } |
| 8920 } |
| 8921 |
| 8922 core.Map toJson() { |
| 8923 var _json = new core.Map(); |
| 8924 if (boundStreamId != null) { |
| 8925 _json["boundStreamId"] = boundStreamId; |
| 8926 } |
| 8927 if (enableClosedCaptions != null) { |
| 8928 _json["enableClosedCaptions"] = enableClosedCaptions; |
| 8929 } |
| 8930 if (enableContentEncryption != null) { |
| 8931 _json["enableContentEncryption"] = enableContentEncryption; |
| 8932 } |
| 8933 if (enableDvr != null) { |
| 8934 _json["enableDvr"] = enableDvr; |
| 8935 } |
| 8936 if (enableEmbed != null) { |
| 8937 _json["enableEmbed"] = enableEmbed; |
| 8938 } |
| 8939 if (monitorStream != null) { |
| 8940 _json["monitorStream"] = (monitorStream).toJson(); |
| 8941 } |
| 8942 if (recordFromStart != null) { |
| 8943 _json["recordFromStart"] = recordFromStart; |
| 8944 } |
| 8945 if (startWithSlate != null) { |
| 8946 _json["startWithSlate"] = startWithSlate; |
| 8947 } |
| 8948 return _json; |
| 8949 } |
| 8950 } |
| 8951 |
| 8952 |
| 8953 /** Not documented yet. */ |
| 8954 class LiveBroadcastListResponse { |
| 8955 /** Etag of this resource. */ |
| 8956 core.String etag; |
| 8957 |
| 8958 /** Serialized EventId of the request which produced this response. */ |
| 8959 core.String eventId; |
| 8960 |
| 8961 /** A list of broadcasts that match the request criteria. */ |
| 8962 core.List<LiveBroadcast> items; |
| 8963 |
| 8964 /** |
| 8965 * Identifies what kind of resource this is. Value: the fixed string |
| 8966 * "youtube#liveBroadcastListResponse". |
| 8967 */ |
| 8968 core.String kind; |
| 8969 |
| 8970 /** |
| 8971 * The token that can be used as the value of the pageToken parameter to |
| 8972 * retrieve the next page in the result set. |
| 8973 */ |
| 8974 core.String nextPageToken; |
| 8975 |
| 8976 /** Not documented yet. */ |
| 8977 PageInfo pageInfo; |
| 8978 |
| 8979 /** |
| 8980 * The token that can be used as the value of the pageToken parameter to |
| 8981 * retrieve the previous page in the result set. |
| 8982 */ |
| 8983 core.String prevPageToken; |
| 8984 |
| 8985 /** Not documented yet. */ |
| 8986 TokenPagination tokenPagination; |
| 8987 |
| 8988 /** The visitorId identifies the visitor. */ |
| 8989 core.String visitorId; |
| 8990 |
| 8991 |
| 8992 LiveBroadcastListResponse(); |
| 8993 |
| 8994 LiveBroadcastListResponse.fromJson(core.Map _json) { |
| 8995 if (_json.containsKey("etag")) { |
| 8996 etag = _json["etag"]; |
| 8997 } |
| 8998 if (_json.containsKey("eventId")) { |
| 8999 eventId = _json["eventId"]; |
| 9000 } |
| 9001 if (_json.containsKey("items")) { |
| 9002 items = _json["items"].map((value) => new LiveBroadcast.fromJson(value)).t
oList(); |
| 9003 } |
| 9004 if (_json.containsKey("kind")) { |
| 9005 kind = _json["kind"]; |
| 9006 } |
| 9007 if (_json.containsKey("nextPageToken")) { |
| 9008 nextPageToken = _json["nextPageToken"]; |
| 9009 } |
| 9010 if (_json.containsKey("pageInfo")) { |
| 9011 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 9012 } |
| 9013 if (_json.containsKey("prevPageToken")) { |
| 9014 prevPageToken = _json["prevPageToken"]; |
| 9015 } |
| 9016 if (_json.containsKey("tokenPagination")) { |
| 9017 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 9018 } |
| 9019 if (_json.containsKey("visitorId")) { |
| 9020 visitorId = _json["visitorId"]; |
| 9021 } |
| 9022 } |
| 9023 |
| 9024 core.Map toJson() { |
| 9025 var _json = new core.Map(); |
| 9026 if (etag != null) { |
| 9027 _json["etag"] = etag; |
| 9028 } |
| 9029 if (eventId != null) { |
| 9030 _json["eventId"] = eventId; |
| 9031 } |
| 9032 if (items != null) { |
| 9033 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9034 } |
| 9035 if (kind != null) { |
| 9036 _json["kind"] = kind; |
| 9037 } |
| 9038 if (nextPageToken != null) { |
| 9039 _json["nextPageToken"] = nextPageToken; |
| 9040 } |
| 9041 if (pageInfo != null) { |
| 9042 _json["pageInfo"] = (pageInfo).toJson(); |
| 9043 } |
| 9044 if (prevPageToken != null) { |
| 9045 _json["prevPageToken"] = prevPageToken; |
| 9046 } |
| 9047 if (tokenPagination != null) { |
| 9048 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 9049 } |
| 9050 if (visitorId != null) { |
| 9051 _json["visitorId"] = visitorId; |
| 9052 } |
| 9053 return _json; |
| 9054 } |
| 9055 } |
| 9056 |
| 9057 |
| 9058 /** Not documented yet. */ |
| 9059 class LiveBroadcastSnippet { |
| 9060 /** |
| 9061 * The date and time that the broadcast actually ended. This information is |
| 9062 * only available once the broadcast's state is complete. The value is |
| 9063 * specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 9064 */ |
| 9065 core.DateTime actualEndTime; |
| 9066 |
| 9067 /** |
| 9068 * The date and time that the broadcast actually started. This information is |
| 9069 * only available once the broadcast's state is live. The value is specified |
| 9070 * in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 9071 */ |
| 9072 core.DateTime actualStartTime; |
| 9073 |
| 9074 /** |
| 9075 * The ID that YouTube uses to uniquely identify the channel that is |
| 9076 * publishing the broadcast. |
| 9077 */ |
| 9078 core.String channelId; |
| 9079 |
| 9080 /** |
| 9081 * The broadcast's description. As with the title, you can set this field by |
| 9082 * modifying the broadcast resource or by setting the description field of the |
| 9083 * corresponding video resource. |
| 9084 */ |
| 9085 core.String description; |
| 9086 |
| 9087 /** |
| 9088 * The date and time that the broadcast was added to YouTube's live broadcast |
| 9089 * schedule. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) |
| 9090 * format. |
| 9091 */ |
| 9092 core.DateTime publishedAt; |
| 9093 |
| 9094 /** |
| 9095 * The date and time that the broadcast is scheduled to end. The value is |
| 9096 * specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 9097 */ |
| 9098 core.DateTime scheduledEndTime; |
| 9099 |
| 9100 /** |
| 9101 * The date and time that the broadcast is scheduled to start. The value is |
| 9102 * specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 9103 */ |
| 9104 core.DateTime scheduledStartTime; |
| 9105 |
| 9106 /** |
| 9107 * A map of thumbnail images associated with the broadcast. For each nested |
| 9108 * object in this object, the key is the name of the thumbnail image, and the |
| 9109 * value is an object that contains other information about the thumbnail. |
| 9110 */ |
| 9111 ThumbnailDetails thumbnails; |
| 9112 |
| 9113 /** |
| 9114 * The broadcast's title. Note that the broadcast represents exactly one |
| 9115 * YouTube video. You can set this field by modifying the broadcast resource |
| 9116 * or by setting the title field of the corresponding video resource. |
| 9117 */ |
| 9118 core.String title; |
| 9119 |
| 9120 |
| 9121 LiveBroadcastSnippet(); |
| 9122 |
| 9123 LiveBroadcastSnippet.fromJson(core.Map _json) { |
| 9124 if (_json.containsKey("actualEndTime")) { |
| 9125 actualEndTime = core.DateTime.parse(_json["actualEndTime"]); |
| 9126 } |
| 9127 if (_json.containsKey("actualStartTime")) { |
| 9128 actualStartTime = core.DateTime.parse(_json["actualStartTime"]); |
| 9129 } |
| 9130 if (_json.containsKey("channelId")) { |
| 9131 channelId = _json["channelId"]; |
| 9132 } |
| 9133 if (_json.containsKey("description")) { |
| 9134 description = _json["description"]; |
| 9135 } |
| 9136 if (_json.containsKey("publishedAt")) { |
| 9137 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 9138 } |
| 9139 if (_json.containsKey("scheduledEndTime")) { |
| 9140 scheduledEndTime = core.DateTime.parse(_json["scheduledEndTime"]); |
| 9141 } |
| 9142 if (_json.containsKey("scheduledStartTime")) { |
| 9143 scheduledStartTime = core.DateTime.parse(_json["scheduledStartTime"]); |
| 9144 } |
| 9145 if (_json.containsKey("thumbnails")) { |
| 9146 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 9147 } |
| 9148 if (_json.containsKey("title")) { |
| 9149 title = _json["title"]; |
| 9150 } |
| 9151 } |
| 9152 |
| 9153 core.Map toJson() { |
| 9154 var _json = new core.Map(); |
| 9155 if (actualEndTime != null) { |
| 9156 _json["actualEndTime"] = (actualEndTime).toIso8601String(); |
| 9157 } |
| 9158 if (actualStartTime != null) { |
| 9159 _json["actualStartTime"] = (actualStartTime).toIso8601String(); |
| 9160 } |
| 9161 if (channelId != null) { |
| 9162 _json["channelId"] = channelId; |
| 9163 } |
| 9164 if (description != null) { |
| 9165 _json["description"] = description; |
| 9166 } |
| 9167 if (publishedAt != null) { |
| 9168 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 9169 } |
| 9170 if (scheduledEndTime != null) { |
| 9171 _json["scheduledEndTime"] = (scheduledEndTime).toIso8601String(); |
| 9172 } |
| 9173 if (scheduledStartTime != null) { |
| 9174 _json["scheduledStartTime"] = (scheduledStartTime).toIso8601String(); |
| 9175 } |
| 9176 if (thumbnails != null) { |
| 9177 _json["thumbnails"] = (thumbnails).toJson(); |
| 9178 } |
| 9179 if (title != null) { |
| 9180 _json["title"] = title; |
| 9181 } |
| 9182 return _json; |
| 9183 } |
| 9184 } |
| 9185 |
| 9186 |
| 9187 /** Not documented yet. */ |
| 9188 class LiveBroadcastStatus { |
| 9189 /** |
| 9190 * The broadcast's status. The status can be updated using the API's |
| 9191 * liveBroadcasts.transition method. |
| 9192 * Possible string values are: |
| 9193 * - "abandoned" |
| 9194 * - "complete" |
| 9195 * - "completeStarting" |
| 9196 * - "created" |
| 9197 * - "live" |
| 9198 * - "liveStarting" |
| 9199 * - "ready" |
| 9200 * - "reclaimed" |
| 9201 * - "revoked" |
| 9202 * - "testStarting" |
| 9203 * - "testing" |
| 9204 */ |
| 9205 core.String lifeCycleStatus; |
| 9206 |
| 9207 /** |
| 9208 * Priority of the live broadcast event (internal state). |
| 9209 * Possible string values are: |
| 9210 * - "high" |
| 9211 * - "low" |
| 9212 * - "normal" |
| 9213 */ |
| 9214 core.String liveBroadcastPriority; |
| 9215 |
| 9216 /** |
| 9217 * The broadcast's privacy status. Note that the broadcast represents exactly |
| 9218 * one YouTube video, so the privacy settings are identical to those supported |
| 9219 * for videos. In addition, you can set this field by modifying the broadcast |
| 9220 * resource or by setting the privacyStatus field of the corresponding video |
| 9221 * resource. |
| 9222 * Possible string values are: |
| 9223 * - "private" |
| 9224 * - "public" |
| 9225 * - "unlisted" |
| 9226 */ |
| 9227 core.String privacyStatus; |
| 9228 |
| 9229 /** |
| 9230 * The broadcast's recording status. |
| 9231 * Possible string values are: |
| 9232 * - "notRecording" |
| 9233 * - "recorded" |
| 9234 * - "recording" |
| 9235 */ |
| 9236 core.String recordingStatus; |
| 9237 |
| 9238 |
| 9239 LiveBroadcastStatus(); |
| 9240 |
| 9241 LiveBroadcastStatus.fromJson(core.Map _json) { |
| 9242 if (_json.containsKey("lifeCycleStatus")) { |
| 9243 lifeCycleStatus = _json["lifeCycleStatus"]; |
| 9244 } |
| 9245 if (_json.containsKey("liveBroadcastPriority")) { |
| 9246 liveBroadcastPriority = _json["liveBroadcastPriority"]; |
| 9247 } |
| 9248 if (_json.containsKey("privacyStatus")) { |
| 9249 privacyStatus = _json["privacyStatus"]; |
| 9250 } |
| 9251 if (_json.containsKey("recordingStatus")) { |
| 9252 recordingStatus = _json["recordingStatus"]; |
| 9253 } |
| 9254 } |
| 9255 |
| 9256 core.Map toJson() { |
| 9257 var _json = new core.Map(); |
| 9258 if (lifeCycleStatus != null) { |
| 9259 _json["lifeCycleStatus"] = lifeCycleStatus; |
| 9260 } |
| 9261 if (liveBroadcastPriority != null) { |
| 9262 _json["liveBroadcastPriority"] = liveBroadcastPriority; |
| 9263 } |
| 9264 if (privacyStatus != null) { |
| 9265 _json["privacyStatus"] = privacyStatus; |
| 9266 } |
| 9267 if (recordingStatus != null) { |
| 9268 _json["recordingStatus"] = recordingStatus; |
| 9269 } |
| 9270 return _json; |
| 9271 } |
| 9272 } |
| 9273 |
| 9274 |
| 9275 /** A live stream describes a live ingestion point. */ |
| 9276 class LiveStream { |
| 9277 /** |
| 9278 * The cdn object defines the live stream's content delivery network (CDN) |
| 9279 * settings. These settings provide details about the manner in which you |
| 9280 * stream your content to YouTube. |
| 9281 */ |
| 9282 CdnSettings cdn; |
| 9283 |
| 9284 /** |
| 9285 * The content_details object contains information about the stream, including |
| 9286 * the closed captions ingestion URL. |
| 9287 */ |
| 9288 LiveStreamContentDetails contentDetails; |
| 9289 |
| 9290 /** Etag of this resource. */ |
| 9291 core.String etag; |
| 9292 |
| 9293 /** The ID that YouTube assigns to uniquely identify the stream. */ |
| 9294 core.String id; |
| 9295 |
| 9296 /** |
| 9297 * Identifies what kind of resource this is. Value: the fixed string |
| 9298 * "youtube#liveStream". |
| 9299 */ |
| 9300 core.String kind; |
| 9301 |
| 9302 /** |
| 9303 * The snippet object contains basic details about the stream, including its |
| 9304 * channel, title, and description. |
| 9305 */ |
| 9306 LiveStreamSnippet snippet; |
| 9307 |
| 9308 /** The status object contains information about live stream's status. */ |
| 9309 LiveStreamStatus status; |
| 9310 |
| 9311 |
| 9312 LiveStream(); |
| 9313 |
| 9314 LiveStream.fromJson(core.Map _json) { |
| 9315 if (_json.containsKey("cdn")) { |
| 9316 cdn = new CdnSettings.fromJson(_json["cdn"]); |
| 9317 } |
| 9318 if (_json.containsKey("contentDetails")) { |
| 9319 contentDetails = new LiveStreamContentDetails.fromJson(_json["contentDetai
ls"]); |
| 9320 } |
| 9321 if (_json.containsKey("etag")) { |
| 9322 etag = _json["etag"]; |
| 9323 } |
| 9324 if (_json.containsKey("id")) { |
| 9325 id = _json["id"]; |
| 9326 } |
| 9327 if (_json.containsKey("kind")) { |
| 9328 kind = _json["kind"]; |
| 9329 } |
| 9330 if (_json.containsKey("snippet")) { |
| 9331 snippet = new LiveStreamSnippet.fromJson(_json["snippet"]); |
| 9332 } |
| 9333 if (_json.containsKey("status")) { |
| 9334 status = new LiveStreamStatus.fromJson(_json["status"]); |
| 9335 } |
| 9336 } |
| 9337 |
| 9338 core.Map toJson() { |
| 9339 var _json = new core.Map(); |
| 9340 if (cdn != null) { |
| 9341 _json["cdn"] = (cdn).toJson(); |
| 9342 } |
| 9343 if (contentDetails != null) { |
| 9344 _json["contentDetails"] = (contentDetails).toJson(); |
| 9345 } |
| 9346 if (etag != null) { |
| 9347 _json["etag"] = etag; |
| 9348 } |
| 9349 if (id != null) { |
| 9350 _json["id"] = id; |
| 9351 } |
| 9352 if (kind != null) { |
| 9353 _json["kind"] = kind; |
| 9354 } |
| 9355 if (snippet != null) { |
| 9356 _json["snippet"] = (snippet).toJson(); |
| 9357 } |
| 9358 if (status != null) { |
| 9359 _json["status"] = (status).toJson(); |
| 9360 } |
| 9361 return _json; |
| 9362 } |
| 9363 } |
| 9364 |
| 9365 |
| 9366 /** Detailed settings of a stream. */ |
| 9367 class LiveStreamContentDetails { |
| 9368 /** The ingestion URL where the closed captions of this stream are sent. */ |
| 9369 core.String closedCaptionsIngestionUrl; |
| 9370 |
| 9371 |
| 9372 LiveStreamContentDetails(); |
| 9373 |
| 9374 LiveStreamContentDetails.fromJson(core.Map _json) { |
| 9375 if (_json.containsKey("closedCaptionsIngestionUrl")) { |
| 9376 closedCaptionsIngestionUrl = _json["closedCaptionsIngestionUrl"]; |
| 9377 } |
| 9378 } |
| 9379 |
| 9380 core.Map toJson() { |
| 9381 var _json = new core.Map(); |
| 9382 if (closedCaptionsIngestionUrl != null) { |
| 9383 _json["closedCaptionsIngestionUrl"] = closedCaptionsIngestionUrl; |
| 9384 } |
| 9385 return _json; |
| 9386 } |
| 9387 } |
| 9388 |
| 9389 |
| 9390 /** Not documented yet. */ |
| 9391 class LiveStreamListResponse { |
| 9392 /** Etag of this resource. */ |
| 9393 core.String etag; |
| 9394 |
| 9395 /** Serialized EventId of the request which produced this response. */ |
| 9396 core.String eventId; |
| 9397 |
| 9398 /** A list of live streams that match the request criteria. */ |
| 9399 core.List<LiveStream> items; |
| 9400 |
| 9401 /** |
| 9402 * Identifies what kind of resource this is. Value: the fixed string |
| 9403 * "youtube#liveStreamListResponse". |
| 9404 */ |
| 9405 core.String kind; |
| 9406 |
| 9407 /** |
| 9408 * The token that can be used as the value of the pageToken parameter to |
| 9409 * retrieve the next page in the result set. |
| 9410 */ |
| 9411 core.String nextPageToken; |
| 9412 |
| 9413 /** Not documented yet. */ |
| 9414 PageInfo pageInfo; |
| 9415 |
| 9416 /** |
| 9417 * The token that can be used as the value of the pageToken parameter to |
| 9418 * retrieve the previous page in the result set. |
| 9419 */ |
| 9420 core.String prevPageToken; |
| 9421 |
| 9422 /** Not documented yet. */ |
| 9423 TokenPagination tokenPagination; |
| 9424 |
| 9425 /** The visitorId identifies the visitor. */ |
| 9426 core.String visitorId; |
| 9427 |
| 9428 |
| 9429 LiveStreamListResponse(); |
| 9430 |
| 9431 LiveStreamListResponse.fromJson(core.Map _json) { |
| 9432 if (_json.containsKey("etag")) { |
| 9433 etag = _json["etag"]; |
| 9434 } |
| 9435 if (_json.containsKey("eventId")) { |
| 9436 eventId = _json["eventId"]; |
| 9437 } |
| 9438 if (_json.containsKey("items")) { |
| 9439 items = _json["items"].map((value) => new LiveStream.fromJson(value)).toLi
st(); |
| 9440 } |
| 9441 if (_json.containsKey("kind")) { |
| 9442 kind = _json["kind"]; |
| 9443 } |
| 9444 if (_json.containsKey("nextPageToken")) { |
| 9445 nextPageToken = _json["nextPageToken"]; |
| 9446 } |
| 9447 if (_json.containsKey("pageInfo")) { |
| 9448 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 9449 } |
| 9450 if (_json.containsKey("prevPageToken")) { |
| 9451 prevPageToken = _json["prevPageToken"]; |
| 9452 } |
| 9453 if (_json.containsKey("tokenPagination")) { |
| 9454 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 9455 } |
| 9456 if (_json.containsKey("visitorId")) { |
| 9457 visitorId = _json["visitorId"]; |
| 9458 } |
| 9459 } |
| 9460 |
| 9461 core.Map toJson() { |
| 9462 var _json = new core.Map(); |
| 9463 if (etag != null) { |
| 9464 _json["etag"] = etag; |
| 9465 } |
| 9466 if (eventId != null) { |
| 9467 _json["eventId"] = eventId; |
| 9468 } |
| 9469 if (items != null) { |
| 9470 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9471 } |
| 9472 if (kind != null) { |
| 9473 _json["kind"] = kind; |
| 9474 } |
| 9475 if (nextPageToken != null) { |
| 9476 _json["nextPageToken"] = nextPageToken; |
| 9477 } |
| 9478 if (pageInfo != null) { |
| 9479 _json["pageInfo"] = (pageInfo).toJson(); |
| 9480 } |
| 9481 if (prevPageToken != null) { |
| 9482 _json["prevPageToken"] = prevPageToken; |
| 9483 } |
| 9484 if (tokenPagination != null) { |
| 9485 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 9486 } |
| 9487 if (visitorId != null) { |
| 9488 _json["visitorId"] = visitorId; |
| 9489 } |
| 9490 return _json; |
| 9491 } |
| 9492 } |
| 9493 |
| 9494 |
| 9495 /** Not documented yet. */ |
| 9496 class LiveStreamSnippet { |
| 9497 /** |
| 9498 * The ID that YouTube uses to uniquely identify the channel that is |
| 9499 * transmitting the stream. |
| 9500 */ |
| 9501 core.String channelId; |
| 9502 |
| 9503 /** |
| 9504 * The stream's description. The value cannot be longer than 10000 characters. |
| 9505 */ |
| 9506 core.String description; |
| 9507 |
| 9508 /** |
| 9509 * The date and time that the stream was created. The value is specified in |
| 9510 * ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 9511 */ |
| 9512 core.DateTime publishedAt; |
| 9513 |
| 9514 /** |
| 9515 * The stream's title. The value must be between 1 and 128 characters long. |
| 9516 */ |
| 9517 core.String title; |
| 9518 |
| 9519 |
| 9520 LiveStreamSnippet(); |
| 9521 |
| 9522 LiveStreamSnippet.fromJson(core.Map _json) { |
| 9523 if (_json.containsKey("channelId")) { |
| 9524 channelId = _json["channelId"]; |
| 9525 } |
| 9526 if (_json.containsKey("description")) { |
| 9527 description = _json["description"]; |
| 9528 } |
| 9529 if (_json.containsKey("publishedAt")) { |
| 9530 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 9531 } |
| 9532 if (_json.containsKey("title")) { |
| 9533 title = _json["title"]; |
| 9534 } |
| 9535 } |
| 9536 |
| 9537 core.Map toJson() { |
| 9538 var _json = new core.Map(); |
| 9539 if (channelId != null) { |
| 9540 _json["channelId"] = channelId; |
| 9541 } |
| 9542 if (description != null) { |
| 9543 _json["description"] = description; |
| 9544 } |
| 9545 if (publishedAt != null) { |
| 9546 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 9547 } |
| 9548 if (title != null) { |
| 9549 _json["title"] = title; |
| 9550 } |
| 9551 return _json; |
| 9552 } |
| 9553 } |
| 9554 |
| 9555 |
| 9556 /** Brief description of the live stream status. */ |
| 9557 class LiveStreamStatus { |
| 9558 /** |
| 9559 * Not documented yet. |
| 9560 * Possible string values are: |
| 9561 * - "active" |
| 9562 * - "created" |
| 9563 * - "error" |
| 9564 * - "inactive" |
| 9565 * - "ready" |
| 9566 */ |
| 9567 core.String streamStatus; |
| 9568 |
| 9569 |
| 9570 LiveStreamStatus(); |
| 9571 |
| 9572 LiveStreamStatus.fromJson(core.Map _json) { |
| 9573 if (_json.containsKey("streamStatus")) { |
| 9574 streamStatus = _json["streamStatus"]; |
| 9575 } |
| 9576 } |
| 9577 |
| 9578 core.Map toJson() { |
| 9579 var _json = new core.Map(); |
| 9580 if (streamStatus != null) { |
| 9581 _json["streamStatus"] = streamStatus; |
| 9582 } |
| 9583 return _json; |
| 9584 } |
| 9585 } |
| 9586 |
| 9587 |
| 9588 /** Represent a property available in different languages. */ |
| 9589 class LocalizedProperty { |
| 9590 /** Default value for the localized property. */ |
| 9591 core.String default_; |
| 9592 |
| 9593 /** The localized values. */ |
| 9594 core.List<LocalizedString> localized; |
| 9595 |
| 9596 |
| 9597 LocalizedProperty(); |
| 9598 |
| 9599 LocalizedProperty.fromJson(core.Map _json) { |
| 9600 if (_json.containsKey("default")) { |
| 9601 default_ = _json["default"]; |
| 9602 } |
| 9603 if (_json.containsKey("localized")) { |
| 9604 localized = _json["localized"].map((value) => new LocalizedString.fromJson
(value)).toList(); |
| 9605 } |
| 9606 } |
| 9607 |
| 9608 core.Map toJson() { |
| 9609 var _json = new core.Map(); |
| 9610 if (default_ != null) { |
| 9611 _json["default"] = default_; |
| 9612 } |
| 9613 if (localized != null) { |
| 9614 _json["localized"] = localized.map((value) => (value).toJson()).toList(); |
| 9615 } |
| 9616 return _json; |
| 9617 } |
| 9618 } |
| 9619 |
| 9620 |
| 9621 /** A localized string. */ |
| 9622 class LocalizedString { |
| 9623 /** Language associated to this value. */ |
| 9624 core.String language; |
| 9625 |
| 9626 /** Value of the property. */ |
| 9627 core.String value; |
| 9628 |
| 9629 |
| 9630 LocalizedString(); |
| 9631 |
| 9632 LocalizedString.fromJson(core.Map _json) { |
| 9633 if (_json.containsKey("language")) { |
| 9634 language = _json["language"]; |
| 9635 } |
| 9636 if (_json.containsKey("value")) { |
| 9637 value = _json["value"]; |
| 9638 } |
| 9639 } |
| 9640 |
| 9641 core.Map toJson() { |
| 9642 var _json = new core.Map(); |
| 9643 if (language != null) { |
| 9644 _json["language"] = language; |
| 9645 } |
| 9646 if (value != null) { |
| 9647 _json["value"] = value; |
| 9648 } |
| 9649 return _json; |
| 9650 } |
| 9651 } |
| 9652 |
| 9653 |
| 9654 /** Settings and Info of the monitor stream */ |
| 9655 class MonitorStreamInfo { |
| 9656 /** |
| 9657 * If you have set the enableMonitorStream property to true, then this |
| 9658 * property determines the length of the live broadcast delay. |
| 9659 */ |
| 9660 core.int broadcastStreamDelayMs; |
| 9661 |
| 9662 /** HTML code that embeds a player that plays the monitor stream. */ |
| 9663 core.String embedHtml; |
| 9664 |
| 9665 /** |
| 9666 * This value determines whether the monitor stream is enabled for the |
| 9667 * broadcast. If the monitor stream is enabled, then YouTube will broadcast |
| 9668 * the event content on a special stream intended only for the broadcaster's |
| 9669 * consumption. The broadcaster can use the stream to review the event content |
| 9670 * and also to identify the optimal times to insert cuepoints. |
| 9671 * |
| 9672 * You need to set this value to true if you intend to have a broadcast delay |
| 9673 * for your event. |
| 9674 * |
| 9675 * Note: This property cannot be updated once the broadcast is in the testing |
| 9676 * or live state. |
| 9677 */ |
| 9678 core.bool enableMonitorStream; |
| 9679 |
| 9680 |
| 9681 MonitorStreamInfo(); |
| 9682 |
| 9683 MonitorStreamInfo.fromJson(core.Map _json) { |
| 9684 if (_json.containsKey("broadcastStreamDelayMs")) { |
| 9685 broadcastStreamDelayMs = _json["broadcastStreamDelayMs"]; |
| 9686 } |
| 9687 if (_json.containsKey("embedHtml")) { |
| 9688 embedHtml = _json["embedHtml"]; |
| 9689 } |
| 9690 if (_json.containsKey("enableMonitorStream")) { |
| 9691 enableMonitorStream = _json["enableMonitorStream"]; |
| 9692 } |
| 9693 } |
| 9694 |
| 9695 core.Map toJson() { |
| 9696 var _json = new core.Map(); |
| 9697 if (broadcastStreamDelayMs != null) { |
| 9698 _json["broadcastStreamDelayMs"] = broadcastStreamDelayMs; |
| 9699 } |
| 9700 if (embedHtml != null) { |
| 9701 _json["embedHtml"] = embedHtml; |
| 9702 } |
| 9703 if (enableMonitorStream != null) { |
| 9704 _json["enableMonitorStream"] = enableMonitorStream; |
| 9705 } |
| 9706 return _json; |
| 9707 } |
| 9708 } |
| 9709 |
| 9710 |
| 9711 /** |
| 9712 * Paging details for lists of resources, including total number of items |
| 9713 * available and number of resources returned in a single page. |
| 9714 */ |
| 9715 class PageInfo { |
| 9716 /** The number of results included in the API response. */ |
| 9717 core.int resultsPerPage; |
| 9718 |
| 9719 /** The total number of results in the result set. */ |
| 9720 core.int totalResults; |
| 9721 |
| 9722 |
| 9723 PageInfo(); |
| 9724 |
| 9725 PageInfo.fromJson(core.Map _json) { |
| 9726 if (_json.containsKey("resultsPerPage")) { |
| 9727 resultsPerPage = _json["resultsPerPage"]; |
| 9728 } |
| 9729 if (_json.containsKey("totalResults")) { |
| 9730 totalResults = _json["totalResults"]; |
| 9731 } |
| 9732 } |
| 9733 |
| 9734 core.Map toJson() { |
| 9735 var _json = new core.Map(); |
| 9736 if (resultsPerPage != null) { |
| 9737 _json["resultsPerPage"] = resultsPerPage; |
| 9738 } |
| 9739 if (totalResults != null) { |
| 9740 _json["totalResults"] = totalResults; |
| 9741 } |
| 9742 return _json; |
| 9743 } |
| 9744 } |
| 9745 |
| 9746 |
| 9747 /** |
| 9748 * A playlist resource represents a YouTube playlist. A playlist is a collection |
| 9749 * of videos that can be viewed sequentially and shared with other users. A |
| 9750 * playlist can contain up to 200 videos, and YouTube does not limit the number |
| 9751 * of playlists that each user creates. By default, playlists are publicly |
| 9752 * visible to other users, but playlists can be public or private. |
| 9753 * |
| 9754 * YouTube also uses playlists to identify special collections of videos for a |
| 9755 * channel, such as: |
| 9756 * - uploaded videos |
| 9757 * - favorite videos |
| 9758 * - positively rated (liked) videos |
| 9759 * - watch history |
| 9760 * - watch later To be more specific, these lists are associated with a |
| 9761 * channel, which is a collection of a person, group, or company's videos, |
| 9762 * playlists, and other YouTube information. You can retrieve the playlist IDs |
| 9763 * for each of these lists from the channel resource for a given channel. |
| 9764 * |
| 9765 * You can then use the playlistItems.list method to retrieve any of those |
| 9766 * lists. You can also add or remove items from those lists by calling the |
| 9767 * playlistItems.insert and playlistItems.delete methods. |
| 9768 */ |
| 9769 class Playlist { |
| 9770 /** The contentDetails object contains information like video count. */ |
| 9771 PlaylistContentDetails contentDetails; |
| 9772 |
| 9773 /** Etag of this resource. */ |
| 9774 core.String etag; |
| 9775 |
| 9776 /** The ID that YouTube uses to uniquely identify the playlist. */ |
| 9777 core.String id; |
| 9778 |
| 9779 /** |
| 9780 * Identifies what kind of resource this is. Value: the fixed string |
| 9781 * "youtube#playlist". |
| 9782 */ |
| 9783 core.String kind; |
| 9784 |
| 9785 /** |
| 9786 * The player object contains information that you would use to play the |
| 9787 * playlist in an embedded player. |
| 9788 */ |
| 9789 PlaylistPlayer player; |
| 9790 |
| 9791 /** |
| 9792 * The snippet object contains basic details about the playlist, such as its |
| 9793 * title and description. |
| 9794 */ |
| 9795 PlaylistSnippet snippet; |
| 9796 |
| 9797 /** The status object contains status information for the playlist. */ |
| 9798 PlaylistStatus status; |
| 9799 |
| 9800 |
| 9801 Playlist(); |
| 9802 |
| 9803 Playlist.fromJson(core.Map _json) { |
| 9804 if (_json.containsKey("contentDetails")) { |
| 9805 contentDetails = new PlaylistContentDetails.fromJson(_json["contentDetails
"]); |
| 9806 } |
| 9807 if (_json.containsKey("etag")) { |
| 9808 etag = _json["etag"]; |
| 9809 } |
| 9810 if (_json.containsKey("id")) { |
| 9811 id = _json["id"]; |
| 9812 } |
| 9813 if (_json.containsKey("kind")) { |
| 9814 kind = _json["kind"]; |
| 9815 } |
| 9816 if (_json.containsKey("player")) { |
| 9817 player = new PlaylistPlayer.fromJson(_json["player"]); |
| 9818 } |
| 9819 if (_json.containsKey("snippet")) { |
| 9820 snippet = new PlaylistSnippet.fromJson(_json["snippet"]); |
| 9821 } |
| 9822 if (_json.containsKey("status")) { |
| 9823 status = new PlaylistStatus.fromJson(_json["status"]); |
| 9824 } |
| 9825 } |
| 9826 |
| 9827 core.Map toJson() { |
| 9828 var _json = new core.Map(); |
| 9829 if (contentDetails != null) { |
| 9830 _json["contentDetails"] = (contentDetails).toJson(); |
| 9831 } |
| 9832 if (etag != null) { |
| 9833 _json["etag"] = etag; |
| 9834 } |
| 9835 if (id != null) { |
| 9836 _json["id"] = id; |
| 9837 } |
| 9838 if (kind != null) { |
| 9839 _json["kind"] = kind; |
| 9840 } |
| 9841 if (player != null) { |
| 9842 _json["player"] = (player).toJson(); |
| 9843 } |
| 9844 if (snippet != null) { |
| 9845 _json["snippet"] = (snippet).toJson(); |
| 9846 } |
| 9847 if (status != null) { |
| 9848 _json["status"] = (status).toJson(); |
| 9849 } |
| 9850 return _json; |
| 9851 } |
| 9852 } |
| 9853 |
| 9854 |
| 9855 /** Not documented yet. */ |
| 9856 class PlaylistContentDetails { |
| 9857 /** The number of videos in the playlist. */ |
| 9858 core.int itemCount; |
| 9859 |
| 9860 |
| 9861 PlaylistContentDetails(); |
| 9862 |
| 9863 PlaylistContentDetails.fromJson(core.Map _json) { |
| 9864 if (_json.containsKey("itemCount")) { |
| 9865 itemCount = _json["itemCount"]; |
| 9866 } |
| 9867 } |
| 9868 |
| 9869 core.Map toJson() { |
| 9870 var _json = new core.Map(); |
| 9871 if (itemCount != null) { |
| 9872 _json["itemCount"] = itemCount; |
| 9873 } |
| 9874 return _json; |
| 9875 } |
| 9876 } |
| 9877 |
| 9878 |
| 9879 /** |
| 9880 * A playlistItem resource identifies another resource, such as a video, that is |
| 9881 * included in a playlist. In addition, the playlistItem resource contains |
| 9882 * details about the included resource that pertain specifically to how that |
| 9883 * resource is used in that playlist. |
| 9884 * |
| 9885 * YouTube uses playlists to identify special collections of videos for a |
| 9886 * channel, such as: |
| 9887 * - uploaded videos |
| 9888 * - favorite videos |
| 9889 * - positively rated (liked) videos |
| 9890 * - watch history |
| 9891 * - watch later To be more specific, these lists are associated with a |
| 9892 * channel, which is a collection of a person, group, or company's videos, |
| 9893 * playlists, and other YouTube information. |
| 9894 * |
| 9895 * You can retrieve the playlist IDs for each of these lists from the channel |
| 9896 * resource for a given channel. You can then use the playlistItems.list |
| 9897 * method to retrieve any of those lists. You can also add or remove items from |
| 9898 * those lists by calling the playlistItems.insert and playlistItems.delete |
| 9899 * methods. For example, if a user gives a positive rating to a video, you would |
| 9900 * insert that video into the liked videos playlist for that user's channel. |
| 9901 */ |
| 9902 class PlaylistItem { |
| 9903 /** |
| 9904 * The contentDetails object is included in the resource if the included item |
| 9905 * is a YouTube video. The object contains additional information about the |
| 9906 * video. |
| 9907 */ |
| 9908 PlaylistItemContentDetails contentDetails; |
| 9909 |
| 9910 /** Etag of this resource. */ |
| 9911 core.String etag; |
| 9912 |
| 9913 /** The ID that YouTube uses to uniquely identify the playlist item. */ |
| 9914 core.String id; |
| 9915 |
| 9916 /** |
| 9917 * Identifies what kind of resource this is. Value: the fixed string |
| 9918 * "youtube#playlistItem". |
| 9919 */ |
| 9920 core.String kind; |
| 9921 |
| 9922 /** |
| 9923 * The snippet object contains basic details about the playlist item, such as |
| 9924 * its title and position in the playlist. |
| 9925 */ |
| 9926 PlaylistItemSnippet snippet; |
| 9927 |
| 9928 /** |
| 9929 * The status object contains information about the playlist item's privacy |
| 9930 * status. |
| 9931 */ |
| 9932 PlaylistItemStatus status; |
| 9933 |
| 9934 |
| 9935 PlaylistItem(); |
| 9936 |
| 9937 PlaylistItem.fromJson(core.Map _json) { |
| 9938 if (_json.containsKey("contentDetails")) { |
| 9939 contentDetails = new PlaylistItemContentDetails.fromJson(_json["contentDet
ails"]); |
| 9940 } |
| 9941 if (_json.containsKey("etag")) { |
| 9942 etag = _json["etag"]; |
| 9943 } |
| 9944 if (_json.containsKey("id")) { |
| 9945 id = _json["id"]; |
| 9946 } |
| 9947 if (_json.containsKey("kind")) { |
| 9948 kind = _json["kind"]; |
| 9949 } |
| 9950 if (_json.containsKey("snippet")) { |
| 9951 snippet = new PlaylistItemSnippet.fromJson(_json["snippet"]); |
| 9952 } |
| 9953 if (_json.containsKey("status")) { |
| 9954 status = new PlaylistItemStatus.fromJson(_json["status"]); |
| 9955 } |
| 9956 } |
| 9957 |
| 9958 core.Map toJson() { |
| 9959 var _json = new core.Map(); |
| 9960 if (contentDetails != null) { |
| 9961 _json["contentDetails"] = (contentDetails).toJson(); |
| 9962 } |
| 9963 if (etag != null) { |
| 9964 _json["etag"] = etag; |
| 9965 } |
| 9966 if (id != null) { |
| 9967 _json["id"] = id; |
| 9968 } |
| 9969 if (kind != null) { |
| 9970 _json["kind"] = kind; |
| 9971 } |
| 9972 if (snippet != null) { |
| 9973 _json["snippet"] = (snippet).toJson(); |
| 9974 } |
| 9975 if (status != null) { |
| 9976 _json["status"] = (status).toJson(); |
| 9977 } |
| 9978 return _json; |
| 9979 } |
| 9980 } |
| 9981 |
| 9982 |
| 9983 /** Not documented yet. */ |
| 9984 class PlaylistItemContentDetails { |
| 9985 /** |
| 9986 * The time, measured in seconds from the start of the video, when the video |
| 9987 * should stop playing. (The playlist owner can specify the times when the |
| 9988 * video should start and stop playing when the video is played in the context |
| 9989 * of the playlist.) By default, assume that the video.endTime is the end of |
| 9990 * the video. |
| 9991 */ |
| 9992 core.String endAt; |
| 9993 |
| 9994 /** A user-generated note for this item. */ |
| 9995 core.String note; |
| 9996 |
| 9997 /** |
| 9998 * The time, measured in seconds from the start of the video, when the video |
| 9999 * should start playing. (The playlist owner can specify the times when the |
| 10000 * video should start and stop playing when the video is played in the context |
| 10001 * of the playlist.) The default value is 0. |
| 10002 */ |
| 10003 core.String startAt; |
| 10004 |
| 10005 /** |
| 10006 * The ID that YouTube uses to uniquely identify a video. To retrieve the |
| 10007 * video resource, set the id query parameter to this value in your API |
| 10008 * request. |
| 10009 */ |
| 10010 core.String videoId; |
| 10011 |
| 10012 |
| 10013 PlaylistItemContentDetails(); |
| 10014 |
| 10015 PlaylistItemContentDetails.fromJson(core.Map _json) { |
| 10016 if (_json.containsKey("endAt")) { |
| 10017 endAt = _json["endAt"]; |
| 10018 } |
| 10019 if (_json.containsKey("note")) { |
| 10020 note = _json["note"]; |
| 10021 } |
| 10022 if (_json.containsKey("startAt")) { |
| 10023 startAt = _json["startAt"]; |
| 10024 } |
| 10025 if (_json.containsKey("videoId")) { |
| 10026 videoId = _json["videoId"]; |
| 10027 } |
| 10028 } |
| 10029 |
| 10030 core.Map toJson() { |
| 10031 var _json = new core.Map(); |
| 10032 if (endAt != null) { |
| 10033 _json["endAt"] = endAt; |
| 10034 } |
| 10035 if (note != null) { |
| 10036 _json["note"] = note; |
| 10037 } |
| 10038 if (startAt != null) { |
| 10039 _json["startAt"] = startAt; |
| 10040 } |
| 10041 if (videoId != null) { |
| 10042 _json["videoId"] = videoId; |
| 10043 } |
| 10044 return _json; |
| 10045 } |
| 10046 } |
| 10047 |
| 10048 |
| 10049 /** Not documented yet. */ |
| 10050 class PlaylistItemListResponse { |
| 10051 /** Etag of this resource. */ |
| 10052 core.String etag; |
| 10053 |
| 10054 /** Serialized EventId of the request which produced this response. */ |
| 10055 core.String eventId; |
| 10056 |
| 10057 /** A list of playlist items that match the request criteria. */ |
| 10058 core.List<PlaylistItem> items; |
| 10059 |
| 10060 /** |
| 10061 * Identifies what kind of resource this is. Value: the fixed string |
| 10062 * "youtube#playlistItemListResponse". |
| 10063 */ |
| 10064 core.String kind; |
| 10065 |
| 10066 /** |
| 10067 * The token that can be used as the value of the pageToken parameter to |
| 10068 * retrieve the next page in the result set. |
| 10069 */ |
| 10070 core.String nextPageToken; |
| 10071 |
| 10072 /** Not documented yet. */ |
| 10073 PageInfo pageInfo; |
| 10074 |
| 10075 /** |
| 10076 * The token that can be used as the value of the pageToken parameter to |
| 10077 * retrieve the previous page in the result set. |
| 10078 */ |
| 10079 core.String prevPageToken; |
| 10080 |
| 10081 /** Not documented yet. */ |
| 10082 TokenPagination tokenPagination; |
| 10083 |
| 10084 /** The visitorId identifies the visitor. */ |
| 10085 core.String visitorId; |
| 10086 |
| 10087 |
| 10088 PlaylistItemListResponse(); |
| 10089 |
| 10090 PlaylistItemListResponse.fromJson(core.Map _json) { |
| 10091 if (_json.containsKey("etag")) { |
| 10092 etag = _json["etag"]; |
| 10093 } |
| 10094 if (_json.containsKey("eventId")) { |
| 10095 eventId = _json["eventId"]; |
| 10096 } |
| 10097 if (_json.containsKey("items")) { |
| 10098 items = _json["items"].map((value) => new PlaylistItem.fromJson(value)).to
List(); |
| 10099 } |
| 10100 if (_json.containsKey("kind")) { |
| 10101 kind = _json["kind"]; |
| 10102 } |
| 10103 if (_json.containsKey("nextPageToken")) { |
| 10104 nextPageToken = _json["nextPageToken"]; |
| 10105 } |
| 10106 if (_json.containsKey("pageInfo")) { |
| 10107 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 10108 } |
| 10109 if (_json.containsKey("prevPageToken")) { |
| 10110 prevPageToken = _json["prevPageToken"]; |
| 10111 } |
| 10112 if (_json.containsKey("tokenPagination")) { |
| 10113 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 10114 } |
| 10115 if (_json.containsKey("visitorId")) { |
| 10116 visitorId = _json["visitorId"]; |
| 10117 } |
| 10118 } |
| 10119 |
| 10120 core.Map toJson() { |
| 10121 var _json = new core.Map(); |
| 10122 if (etag != null) { |
| 10123 _json["etag"] = etag; |
| 10124 } |
| 10125 if (eventId != null) { |
| 10126 _json["eventId"] = eventId; |
| 10127 } |
| 10128 if (items != null) { |
| 10129 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10130 } |
| 10131 if (kind != null) { |
| 10132 _json["kind"] = kind; |
| 10133 } |
| 10134 if (nextPageToken != null) { |
| 10135 _json["nextPageToken"] = nextPageToken; |
| 10136 } |
| 10137 if (pageInfo != null) { |
| 10138 _json["pageInfo"] = (pageInfo).toJson(); |
| 10139 } |
| 10140 if (prevPageToken != null) { |
| 10141 _json["prevPageToken"] = prevPageToken; |
| 10142 } |
| 10143 if (tokenPagination != null) { |
| 10144 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 10145 } |
| 10146 if (visitorId != null) { |
| 10147 _json["visitorId"] = visitorId; |
| 10148 } |
| 10149 return _json; |
| 10150 } |
| 10151 } |
| 10152 |
| 10153 |
| 10154 /** |
| 10155 * Basic details about a playlist, including title, description and thumbnails. |
| 10156 */ |
| 10157 class PlaylistItemSnippet { |
| 10158 /** |
| 10159 * The ID that YouTube uses to uniquely identify the user that added the item |
| 10160 * to the playlist. |
| 10161 */ |
| 10162 core.String channelId; |
| 10163 |
| 10164 /** Channel title for the channel that the playlist item belongs to. */ |
| 10165 core.String channelTitle; |
| 10166 |
| 10167 /** The item's description. */ |
| 10168 core.String description; |
| 10169 |
| 10170 /** |
| 10171 * The ID that YouTube uses to uniquely identify the playlist that the |
| 10172 * playlist item is in. |
| 10173 */ |
| 10174 core.String playlistId; |
| 10175 |
| 10176 /** |
| 10177 * The order in which the item appears in the playlist. The value uses a |
| 10178 * zero-based index, so the first item has a position of 0, the second item |
| 10179 * has a position of 1, and so forth. |
| 10180 */ |
| 10181 core.int position; |
| 10182 |
| 10183 /** |
| 10184 * The date and time that the item was added to the playlist. The value is |
| 10185 * specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 10186 */ |
| 10187 core.DateTime publishedAt; |
| 10188 |
| 10189 /** |
| 10190 * The id object contains information that can be used to uniquely identify |
| 10191 * the resource that is included in the playlist as the playlist item. |
| 10192 */ |
| 10193 ResourceId resourceId; |
| 10194 |
| 10195 /** |
| 10196 * A map of thumbnail images associated with the playlist item. For each |
| 10197 * object in the map, the key is the name of the thumbnail image, and the |
| 10198 * value is an object that contains other information about the thumbnail. |
| 10199 */ |
| 10200 ThumbnailDetails thumbnails; |
| 10201 |
| 10202 /** The item's title. */ |
| 10203 core.String title; |
| 10204 |
| 10205 |
| 10206 PlaylistItemSnippet(); |
| 10207 |
| 10208 PlaylistItemSnippet.fromJson(core.Map _json) { |
| 10209 if (_json.containsKey("channelId")) { |
| 10210 channelId = _json["channelId"]; |
| 10211 } |
| 10212 if (_json.containsKey("channelTitle")) { |
| 10213 channelTitle = _json["channelTitle"]; |
| 10214 } |
| 10215 if (_json.containsKey("description")) { |
| 10216 description = _json["description"]; |
| 10217 } |
| 10218 if (_json.containsKey("playlistId")) { |
| 10219 playlistId = _json["playlistId"]; |
| 10220 } |
| 10221 if (_json.containsKey("position")) { |
| 10222 position = _json["position"]; |
| 10223 } |
| 10224 if (_json.containsKey("publishedAt")) { |
| 10225 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 10226 } |
| 10227 if (_json.containsKey("resourceId")) { |
| 10228 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 10229 } |
| 10230 if (_json.containsKey("thumbnails")) { |
| 10231 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 10232 } |
| 10233 if (_json.containsKey("title")) { |
| 10234 title = _json["title"]; |
| 10235 } |
| 10236 } |
| 10237 |
| 10238 core.Map toJson() { |
| 10239 var _json = new core.Map(); |
| 10240 if (channelId != null) { |
| 10241 _json["channelId"] = channelId; |
| 10242 } |
| 10243 if (channelTitle != null) { |
| 10244 _json["channelTitle"] = channelTitle; |
| 10245 } |
| 10246 if (description != null) { |
| 10247 _json["description"] = description; |
| 10248 } |
| 10249 if (playlistId != null) { |
| 10250 _json["playlistId"] = playlistId; |
| 10251 } |
| 10252 if (position != null) { |
| 10253 _json["position"] = position; |
| 10254 } |
| 10255 if (publishedAt != null) { |
| 10256 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 10257 } |
| 10258 if (resourceId != null) { |
| 10259 _json["resourceId"] = (resourceId).toJson(); |
| 10260 } |
| 10261 if (thumbnails != null) { |
| 10262 _json["thumbnails"] = (thumbnails).toJson(); |
| 10263 } |
| 10264 if (title != null) { |
| 10265 _json["title"] = title; |
| 10266 } |
| 10267 return _json; |
| 10268 } |
| 10269 } |
| 10270 |
| 10271 |
| 10272 /** Information about the playlist item's privacy status. */ |
| 10273 class PlaylistItemStatus { |
| 10274 /** |
| 10275 * This resource's privacy status. |
| 10276 * Possible string values are: |
| 10277 * - "private" |
| 10278 * - "public" |
| 10279 * - "unlisted" |
| 10280 */ |
| 10281 core.String privacyStatus; |
| 10282 |
| 10283 |
| 10284 PlaylistItemStatus(); |
| 10285 |
| 10286 PlaylistItemStatus.fromJson(core.Map _json) { |
| 10287 if (_json.containsKey("privacyStatus")) { |
| 10288 privacyStatus = _json["privacyStatus"]; |
| 10289 } |
| 10290 } |
| 10291 |
| 10292 core.Map toJson() { |
| 10293 var _json = new core.Map(); |
| 10294 if (privacyStatus != null) { |
| 10295 _json["privacyStatus"] = privacyStatus; |
| 10296 } |
| 10297 return _json; |
| 10298 } |
| 10299 } |
| 10300 |
| 10301 |
| 10302 /** Not documented yet. */ |
| 10303 class PlaylistListResponse { |
| 10304 /** Etag of this resource. */ |
| 10305 core.String etag; |
| 10306 |
| 10307 /** Serialized EventId of the request which produced this response. */ |
| 10308 core.String eventId; |
| 10309 |
| 10310 /** A list of playlists that match the request criteria. */ |
| 10311 core.List<Playlist> items; |
| 10312 |
| 10313 /** |
| 10314 * Identifies what kind of resource this is. Value: the fixed string |
| 10315 * "youtube#playlistListResponse". |
| 10316 */ |
| 10317 core.String kind; |
| 10318 |
| 10319 /** |
| 10320 * The token that can be used as the value of the pageToken parameter to |
| 10321 * retrieve the next page in the result set. |
| 10322 */ |
| 10323 core.String nextPageToken; |
| 10324 |
| 10325 /** Not documented yet. */ |
| 10326 PageInfo pageInfo; |
| 10327 |
| 10328 /** |
| 10329 * The token that can be used as the value of the pageToken parameter to |
| 10330 * retrieve the previous page in the result set. |
| 10331 */ |
| 10332 core.String prevPageToken; |
| 10333 |
| 10334 /** Not documented yet. */ |
| 10335 TokenPagination tokenPagination; |
| 10336 |
| 10337 /** The visitorId identifies the visitor. */ |
| 10338 core.String visitorId; |
| 10339 |
| 10340 |
| 10341 PlaylistListResponse(); |
| 10342 |
| 10343 PlaylistListResponse.fromJson(core.Map _json) { |
| 10344 if (_json.containsKey("etag")) { |
| 10345 etag = _json["etag"]; |
| 10346 } |
| 10347 if (_json.containsKey("eventId")) { |
| 10348 eventId = _json["eventId"]; |
| 10349 } |
| 10350 if (_json.containsKey("items")) { |
| 10351 items = _json["items"].map((value) => new Playlist.fromJson(value)).toList
(); |
| 10352 } |
| 10353 if (_json.containsKey("kind")) { |
| 10354 kind = _json["kind"]; |
| 10355 } |
| 10356 if (_json.containsKey("nextPageToken")) { |
| 10357 nextPageToken = _json["nextPageToken"]; |
| 10358 } |
| 10359 if (_json.containsKey("pageInfo")) { |
| 10360 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 10361 } |
| 10362 if (_json.containsKey("prevPageToken")) { |
| 10363 prevPageToken = _json["prevPageToken"]; |
| 10364 } |
| 10365 if (_json.containsKey("tokenPagination")) { |
| 10366 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 10367 } |
| 10368 if (_json.containsKey("visitorId")) { |
| 10369 visitorId = _json["visitorId"]; |
| 10370 } |
| 10371 } |
| 10372 |
| 10373 core.Map toJson() { |
| 10374 var _json = new core.Map(); |
| 10375 if (etag != null) { |
| 10376 _json["etag"] = etag; |
| 10377 } |
| 10378 if (eventId != null) { |
| 10379 _json["eventId"] = eventId; |
| 10380 } |
| 10381 if (items != null) { |
| 10382 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10383 } |
| 10384 if (kind != null) { |
| 10385 _json["kind"] = kind; |
| 10386 } |
| 10387 if (nextPageToken != null) { |
| 10388 _json["nextPageToken"] = nextPageToken; |
| 10389 } |
| 10390 if (pageInfo != null) { |
| 10391 _json["pageInfo"] = (pageInfo).toJson(); |
| 10392 } |
| 10393 if (prevPageToken != null) { |
| 10394 _json["prevPageToken"] = prevPageToken; |
| 10395 } |
| 10396 if (tokenPagination != null) { |
| 10397 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 10398 } |
| 10399 if (visitorId != null) { |
| 10400 _json["visitorId"] = visitorId; |
| 10401 } |
| 10402 return _json; |
| 10403 } |
| 10404 } |
| 10405 |
| 10406 |
| 10407 /** Not documented yet. */ |
| 10408 class PlaylistPlayer { |
| 10409 /** An <iframe> tag that embeds a player that will play the playlist. */ |
| 10410 core.String embedHtml; |
| 10411 |
| 10412 |
| 10413 PlaylistPlayer(); |
| 10414 |
| 10415 PlaylistPlayer.fromJson(core.Map _json) { |
| 10416 if (_json.containsKey("embedHtml")) { |
| 10417 embedHtml = _json["embedHtml"]; |
| 10418 } |
| 10419 } |
| 10420 |
| 10421 core.Map toJson() { |
| 10422 var _json = new core.Map(); |
| 10423 if (embedHtml != null) { |
| 10424 _json["embedHtml"] = embedHtml; |
| 10425 } |
| 10426 return _json; |
| 10427 } |
| 10428 } |
| 10429 |
| 10430 |
| 10431 /** |
| 10432 * Basic details about a playlist, including title, description and thumbnails. |
| 10433 */ |
| 10434 class PlaylistSnippet { |
| 10435 /** |
| 10436 * The ID that YouTube uses to uniquely identify the channel that published |
| 10437 * the playlist. |
| 10438 */ |
| 10439 core.String channelId; |
| 10440 |
| 10441 /** The channel title of the channel that the video belongs to. */ |
| 10442 core.String channelTitle; |
| 10443 |
| 10444 /** The playlist's description. */ |
| 10445 core.String description; |
| 10446 |
| 10447 /** |
| 10448 * The date and time that the playlist was created. The value is specified in |
| 10449 * ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 10450 */ |
| 10451 core.DateTime publishedAt; |
| 10452 |
| 10453 /** Keyword tags associated with the playlist. */ |
| 10454 core.List<core.String> tags; |
| 10455 |
| 10456 /** |
| 10457 * A map of thumbnail images associated with the playlist. For each object in |
| 10458 * the map, the key is the name of the thumbnail image, and the value is an |
| 10459 * object that contains other information about the thumbnail. |
| 10460 */ |
| 10461 ThumbnailDetails thumbnails; |
| 10462 |
| 10463 /** The playlist's title. */ |
| 10464 core.String title; |
| 10465 |
| 10466 |
| 10467 PlaylistSnippet(); |
| 10468 |
| 10469 PlaylistSnippet.fromJson(core.Map _json) { |
| 10470 if (_json.containsKey("channelId")) { |
| 10471 channelId = _json["channelId"]; |
| 10472 } |
| 10473 if (_json.containsKey("channelTitle")) { |
| 10474 channelTitle = _json["channelTitle"]; |
| 10475 } |
| 10476 if (_json.containsKey("description")) { |
| 10477 description = _json["description"]; |
| 10478 } |
| 10479 if (_json.containsKey("publishedAt")) { |
| 10480 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 10481 } |
| 10482 if (_json.containsKey("tags")) { |
| 10483 tags = _json["tags"]; |
| 10484 } |
| 10485 if (_json.containsKey("thumbnails")) { |
| 10486 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 10487 } |
| 10488 if (_json.containsKey("title")) { |
| 10489 title = _json["title"]; |
| 10490 } |
| 10491 } |
| 10492 |
| 10493 core.Map toJson() { |
| 10494 var _json = new core.Map(); |
| 10495 if (channelId != null) { |
| 10496 _json["channelId"] = channelId; |
| 10497 } |
| 10498 if (channelTitle != null) { |
| 10499 _json["channelTitle"] = channelTitle; |
| 10500 } |
| 10501 if (description != null) { |
| 10502 _json["description"] = description; |
| 10503 } |
| 10504 if (publishedAt != null) { |
| 10505 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 10506 } |
| 10507 if (tags != null) { |
| 10508 _json["tags"] = tags; |
| 10509 } |
| 10510 if (thumbnails != null) { |
| 10511 _json["thumbnails"] = (thumbnails).toJson(); |
| 10512 } |
| 10513 if (title != null) { |
| 10514 _json["title"] = title; |
| 10515 } |
| 10516 return _json; |
| 10517 } |
| 10518 } |
| 10519 |
| 10520 |
| 10521 /** Not documented yet. */ |
| 10522 class PlaylistStatus { |
| 10523 /** |
| 10524 * The playlist's privacy status. |
| 10525 * Possible string values are: |
| 10526 * - "private" |
| 10527 * - "public" |
| 10528 * - "unlisted" |
| 10529 */ |
| 10530 core.String privacyStatus; |
| 10531 |
| 10532 |
| 10533 PlaylistStatus(); |
| 10534 |
| 10535 PlaylistStatus.fromJson(core.Map _json) { |
| 10536 if (_json.containsKey("privacyStatus")) { |
| 10537 privacyStatus = _json["privacyStatus"]; |
| 10538 } |
| 10539 } |
| 10540 |
| 10541 core.Map toJson() { |
| 10542 var _json = new core.Map(); |
| 10543 if (privacyStatus != null) { |
| 10544 _json["privacyStatus"] = privacyStatus; |
| 10545 } |
| 10546 return _json; |
| 10547 } |
| 10548 } |
| 10549 |
| 10550 |
| 10551 /** Describes a single promoted item. */ |
| 10552 class PromotedItem { |
| 10553 /** |
| 10554 * A custom message to display for this promotion. This field is currently |
| 10555 * ignored unless the promoted item is a website. |
| 10556 */ |
| 10557 core.String customMessage; |
| 10558 |
| 10559 /** Identifies the promoted item. */ |
| 10560 PromotedItemId id; |
| 10561 |
| 10562 /** |
| 10563 * If true, the content owner's name will be used when displaying the |
| 10564 * promotion. This field can only be set when the update is made on behalf of |
| 10565 * the content owner. |
| 10566 */ |
| 10567 core.bool promotedByContentOwner; |
| 10568 |
| 10569 /** |
| 10570 * The temporal position within the video where the promoted item will be |
| 10571 * displayed. If present, it overrides the default timing. |
| 10572 */ |
| 10573 InvideoTiming timing; |
| 10574 |
| 10575 |
| 10576 PromotedItem(); |
| 10577 |
| 10578 PromotedItem.fromJson(core.Map _json) { |
| 10579 if (_json.containsKey("customMessage")) { |
| 10580 customMessage = _json["customMessage"]; |
| 10581 } |
| 10582 if (_json.containsKey("id")) { |
| 10583 id = new PromotedItemId.fromJson(_json["id"]); |
| 10584 } |
| 10585 if (_json.containsKey("promotedByContentOwner")) { |
| 10586 promotedByContentOwner = _json["promotedByContentOwner"]; |
| 10587 } |
| 10588 if (_json.containsKey("timing")) { |
| 10589 timing = new InvideoTiming.fromJson(_json["timing"]); |
| 10590 } |
| 10591 } |
| 10592 |
| 10593 core.Map toJson() { |
| 10594 var _json = new core.Map(); |
| 10595 if (customMessage != null) { |
| 10596 _json["customMessage"] = customMessage; |
| 10597 } |
| 10598 if (id != null) { |
| 10599 _json["id"] = (id).toJson(); |
| 10600 } |
| 10601 if (promotedByContentOwner != null) { |
| 10602 _json["promotedByContentOwner"] = promotedByContentOwner; |
| 10603 } |
| 10604 if (timing != null) { |
| 10605 _json["timing"] = (timing).toJson(); |
| 10606 } |
| 10607 return _json; |
| 10608 } |
| 10609 } |
| 10610 |
| 10611 |
| 10612 /** |
| 10613 * Describes a single promoted item id. It is a union of various possible types. |
| 10614 */ |
| 10615 class PromotedItemId { |
| 10616 /** |
| 10617 * If type is recentUpload, this field identifies the channel from which to |
| 10618 * take the recent upload. If missing, the channel is assumed to be the same |
| 10619 * channel for which the invideoPromotion is set. |
| 10620 */ |
| 10621 core.String recentlyUploadedBy; |
| 10622 |
| 10623 /** |
| 10624 * Describes the type of the promoted item. |
| 10625 * Possible string values are: |
| 10626 * - "recentUpload" |
| 10627 * - "video" |
| 10628 * - "website" |
| 10629 */ |
| 10630 core.String type; |
| 10631 |
| 10632 /** |
| 10633 * If the promoted item represents a video, this field represents the unique |
| 10634 * YouTube ID identifying it. This field will be present only if type has the |
| 10635 * value video. |
| 10636 */ |
| 10637 core.String videoId; |
| 10638 |
| 10639 /** |
| 10640 * If the promoted item represents a website, this field represents the url |
| 10641 * pointing to the website. This field will be present only if type has the |
| 10642 * value website. |
| 10643 */ |
| 10644 core.String websiteUrl; |
| 10645 |
| 10646 |
| 10647 PromotedItemId(); |
| 10648 |
| 10649 PromotedItemId.fromJson(core.Map _json) { |
| 10650 if (_json.containsKey("recentlyUploadedBy")) { |
| 10651 recentlyUploadedBy = _json["recentlyUploadedBy"]; |
| 10652 } |
| 10653 if (_json.containsKey("type")) { |
| 10654 type = _json["type"]; |
| 10655 } |
| 10656 if (_json.containsKey("videoId")) { |
| 10657 videoId = _json["videoId"]; |
| 10658 } |
| 10659 if (_json.containsKey("websiteUrl")) { |
| 10660 websiteUrl = _json["websiteUrl"]; |
| 10661 } |
| 10662 } |
| 10663 |
| 10664 core.Map toJson() { |
| 10665 var _json = new core.Map(); |
| 10666 if (recentlyUploadedBy != null) { |
| 10667 _json["recentlyUploadedBy"] = recentlyUploadedBy; |
| 10668 } |
| 10669 if (type != null) { |
| 10670 _json["type"] = type; |
| 10671 } |
| 10672 if (videoId != null) { |
| 10673 _json["videoId"] = videoId; |
| 10674 } |
| 10675 if (websiteUrl != null) { |
| 10676 _json["websiteUrl"] = websiteUrl; |
| 10677 } |
| 10678 return _json; |
| 10679 } |
| 10680 } |
| 10681 |
| 10682 |
| 10683 /** A pair Property / Value. */ |
| 10684 class PropertyValue { |
| 10685 /** A property. */ |
| 10686 core.String property; |
| 10687 |
| 10688 /** The property's value. */ |
| 10689 core.String value; |
| 10690 |
| 10691 |
| 10692 PropertyValue(); |
| 10693 |
| 10694 PropertyValue.fromJson(core.Map _json) { |
| 10695 if (_json.containsKey("property")) { |
| 10696 property = _json["property"]; |
| 10697 } |
| 10698 if (_json.containsKey("value")) { |
| 10699 value = _json["value"]; |
| 10700 } |
| 10701 } |
| 10702 |
| 10703 core.Map toJson() { |
| 10704 var _json = new core.Map(); |
| 10705 if (property != null) { |
| 10706 _json["property"] = property; |
| 10707 } |
| 10708 if (value != null) { |
| 10709 _json["value"] = value; |
| 10710 } |
| 10711 return _json; |
| 10712 } |
| 10713 } |
| 10714 |
| 10715 |
| 10716 /** |
| 10717 * A resource id is a generic reference that points to another YouTube resource. |
| 10718 */ |
| 10719 class ResourceId { |
| 10720 /** |
| 10721 * The ID that YouTube uses to uniquely identify the referred resource, if |
| 10722 * that resource is a channel. This property is only present if the |
| 10723 * resourceId.kind value is youtube#channel. |
| 10724 */ |
| 10725 core.String channelId; |
| 10726 |
| 10727 /** The type of the API resource. */ |
| 10728 core.String kind; |
| 10729 |
| 10730 /** |
| 10731 * The ID that YouTube uses to uniquely identify the referred resource, if |
| 10732 * that resource is a playlist. This property is only present if the |
| 10733 * resourceId.kind value is youtube#playlist. |
| 10734 */ |
| 10735 core.String playlistId; |
| 10736 |
| 10737 /** |
| 10738 * The ID that YouTube uses to uniquely identify the referred resource, if |
| 10739 * that resource is a video. This property is only present if the |
| 10740 * resourceId.kind value is youtube#video. |
| 10741 */ |
| 10742 core.String videoId; |
| 10743 |
| 10744 |
| 10745 ResourceId(); |
| 10746 |
| 10747 ResourceId.fromJson(core.Map _json) { |
| 10748 if (_json.containsKey("channelId")) { |
| 10749 channelId = _json["channelId"]; |
| 10750 } |
| 10751 if (_json.containsKey("kind")) { |
| 10752 kind = _json["kind"]; |
| 10753 } |
| 10754 if (_json.containsKey("playlistId")) { |
| 10755 playlistId = _json["playlistId"]; |
| 10756 } |
| 10757 if (_json.containsKey("videoId")) { |
| 10758 videoId = _json["videoId"]; |
| 10759 } |
| 10760 } |
| 10761 |
| 10762 core.Map toJson() { |
| 10763 var _json = new core.Map(); |
| 10764 if (channelId != null) { |
| 10765 _json["channelId"] = channelId; |
| 10766 } |
| 10767 if (kind != null) { |
| 10768 _json["kind"] = kind; |
| 10769 } |
| 10770 if (playlistId != null) { |
| 10771 _json["playlistId"] = playlistId; |
| 10772 } |
| 10773 if (videoId != null) { |
| 10774 _json["videoId"] = videoId; |
| 10775 } |
| 10776 return _json; |
| 10777 } |
| 10778 } |
| 10779 |
| 10780 |
| 10781 /** Not documented yet. */ |
| 10782 class SearchListResponse { |
| 10783 /** Etag of this resource. */ |
| 10784 core.String etag; |
| 10785 |
| 10786 /** Serialized EventId of the request which produced this response. */ |
| 10787 core.String eventId; |
| 10788 |
| 10789 /** A list of results that match the search criteria. */ |
| 10790 core.List<SearchResult> items; |
| 10791 |
| 10792 /** |
| 10793 * Identifies what kind of resource this is. Value: the fixed string |
| 10794 * "youtube#searchListResponse". |
| 10795 */ |
| 10796 core.String kind; |
| 10797 |
| 10798 /** |
| 10799 * The token that can be used as the value of the pageToken parameter to |
| 10800 * retrieve the next page in the result set. |
| 10801 */ |
| 10802 core.String nextPageToken; |
| 10803 |
| 10804 /** Not documented yet. */ |
| 10805 PageInfo pageInfo; |
| 10806 |
| 10807 /** |
| 10808 * The token that can be used as the value of the pageToken parameter to |
| 10809 * retrieve the previous page in the result set. |
| 10810 */ |
| 10811 core.String prevPageToken; |
| 10812 |
| 10813 /** Not documented yet. */ |
| 10814 TokenPagination tokenPagination; |
| 10815 |
| 10816 /** The visitorId identifies the visitor. */ |
| 10817 core.String visitorId; |
| 10818 |
| 10819 |
| 10820 SearchListResponse(); |
| 10821 |
| 10822 SearchListResponse.fromJson(core.Map _json) { |
| 10823 if (_json.containsKey("etag")) { |
| 10824 etag = _json["etag"]; |
| 10825 } |
| 10826 if (_json.containsKey("eventId")) { |
| 10827 eventId = _json["eventId"]; |
| 10828 } |
| 10829 if (_json.containsKey("items")) { |
| 10830 items = _json["items"].map((value) => new SearchResult.fromJson(value)).to
List(); |
| 10831 } |
| 10832 if (_json.containsKey("kind")) { |
| 10833 kind = _json["kind"]; |
| 10834 } |
| 10835 if (_json.containsKey("nextPageToken")) { |
| 10836 nextPageToken = _json["nextPageToken"]; |
| 10837 } |
| 10838 if (_json.containsKey("pageInfo")) { |
| 10839 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 10840 } |
| 10841 if (_json.containsKey("prevPageToken")) { |
| 10842 prevPageToken = _json["prevPageToken"]; |
| 10843 } |
| 10844 if (_json.containsKey("tokenPagination")) { |
| 10845 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 10846 } |
| 10847 if (_json.containsKey("visitorId")) { |
| 10848 visitorId = _json["visitorId"]; |
| 10849 } |
| 10850 } |
| 10851 |
| 10852 core.Map toJson() { |
| 10853 var _json = new core.Map(); |
| 10854 if (etag != null) { |
| 10855 _json["etag"] = etag; |
| 10856 } |
| 10857 if (eventId != null) { |
| 10858 _json["eventId"] = eventId; |
| 10859 } |
| 10860 if (items != null) { |
| 10861 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10862 } |
| 10863 if (kind != null) { |
| 10864 _json["kind"] = kind; |
| 10865 } |
| 10866 if (nextPageToken != null) { |
| 10867 _json["nextPageToken"] = nextPageToken; |
| 10868 } |
| 10869 if (pageInfo != null) { |
| 10870 _json["pageInfo"] = (pageInfo).toJson(); |
| 10871 } |
| 10872 if (prevPageToken != null) { |
| 10873 _json["prevPageToken"] = prevPageToken; |
| 10874 } |
| 10875 if (tokenPagination != null) { |
| 10876 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 10877 } |
| 10878 if (visitorId != null) { |
| 10879 _json["visitorId"] = visitorId; |
| 10880 } |
| 10881 return _json; |
| 10882 } |
| 10883 } |
| 10884 |
| 10885 |
| 10886 /** |
| 10887 * A search result contains information about a YouTube video, channel, or |
| 10888 * playlist that matches the search parameters specified in an API request. |
| 10889 * While a search result points to a uniquely identifiable resource, like a |
| 10890 * video, it does not have its own persistent data. |
| 10891 */ |
| 10892 class SearchResult { |
| 10893 /** Etag of this resource. */ |
| 10894 core.String etag; |
| 10895 |
| 10896 /** |
| 10897 * The id object contains information that can be used to uniquely identify |
| 10898 * the resource that matches the search request. |
| 10899 */ |
| 10900 ResourceId id; |
| 10901 |
| 10902 /** |
| 10903 * Identifies what kind of resource this is. Value: the fixed string |
| 10904 * "youtube#searchResult". |
| 10905 */ |
| 10906 core.String kind; |
| 10907 |
| 10908 /** |
| 10909 * The snippet object contains basic details about a search result, such as |
| 10910 * its title or description. For example, if the search result is a video, |
| 10911 * then the title will be the video's title and the description will be the |
| 10912 * video's description. |
| 10913 */ |
| 10914 SearchResultSnippet snippet; |
| 10915 |
| 10916 |
| 10917 SearchResult(); |
| 10918 |
| 10919 SearchResult.fromJson(core.Map _json) { |
| 10920 if (_json.containsKey("etag")) { |
| 10921 etag = _json["etag"]; |
| 10922 } |
| 10923 if (_json.containsKey("id")) { |
| 10924 id = new ResourceId.fromJson(_json["id"]); |
| 10925 } |
| 10926 if (_json.containsKey("kind")) { |
| 10927 kind = _json["kind"]; |
| 10928 } |
| 10929 if (_json.containsKey("snippet")) { |
| 10930 snippet = new SearchResultSnippet.fromJson(_json["snippet"]); |
| 10931 } |
| 10932 } |
| 10933 |
| 10934 core.Map toJson() { |
| 10935 var _json = new core.Map(); |
| 10936 if (etag != null) { |
| 10937 _json["etag"] = etag; |
| 10938 } |
| 10939 if (id != null) { |
| 10940 _json["id"] = (id).toJson(); |
| 10941 } |
| 10942 if (kind != null) { |
| 10943 _json["kind"] = kind; |
| 10944 } |
| 10945 if (snippet != null) { |
| 10946 _json["snippet"] = (snippet).toJson(); |
| 10947 } |
| 10948 return _json; |
| 10949 } |
| 10950 } |
| 10951 |
| 10952 |
| 10953 /** |
| 10954 * Basic details about a search result, including title, description and |
| 10955 * thumbnails of the item referenced by the search result. |
| 10956 */ |
| 10957 class SearchResultSnippet { |
| 10958 /** |
| 10959 * The value that YouTube uses to uniquely identify the channel that published |
| 10960 * the resource that the search result identifies. |
| 10961 */ |
| 10962 core.String channelId; |
| 10963 |
| 10964 /** |
| 10965 * The title of the channel that published the resource that the search result |
| 10966 * identifies. |
| 10967 */ |
| 10968 core.String channelTitle; |
| 10969 |
| 10970 /** A description of the search result. */ |
| 10971 core.String description; |
| 10972 |
| 10973 /** |
| 10974 * It indicates if the resource (video or channel) has upcoming/active live |
| 10975 * broadcast content. Or it's "none" if there is not any upcoming/active live |
| 10976 * broadcasts. |
| 10977 * Possible string values are: |
| 10978 * - "live" |
| 10979 * - "none" |
| 10980 * - "upcoming" |
| 10981 */ |
| 10982 core.String liveBroadcastContent; |
| 10983 |
| 10984 /** |
| 10985 * The creation date and time of the resource that the search result |
| 10986 * identifies. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) |
| 10987 * format. |
| 10988 */ |
| 10989 core.DateTime publishedAt; |
| 10990 |
| 10991 /** |
| 10992 * A map of thumbnail images associated with the search result. For each |
| 10993 * object in the map, the key is the name of the thumbnail image, and the |
| 10994 * value is an object that contains other information about the thumbnail. |
| 10995 */ |
| 10996 ThumbnailDetails thumbnails; |
| 10997 |
| 10998 /** The title of the search result. */ |
| 10999 core.String title; |
| 11000 |
| 11001 |
| 11002 SearchResultSnippet(); |
| 11003 |
| 11004 SearchResultSnippet.fromJson(core.Map _json) { |
| 11005 if (_json.containsKey("channelId")) { |
| 11006 channelId = _json["channelId"]; |
| 11007 } |
| 11008 if (_json.containsKey("channelTitle")) { |
| 11009 channelTitle = _json["channelTitle"]; |
| 11010 } |
| 11011 if (_json.containsKey("description")) { |
| 11012 description = _json["description"]; |
| 11013 } |
| 11014 if (_json.containsKey("liveBroadcastContent")) { |
| 11015 liveBroadcastContent = _json["liveBroadcastContent"]; |
| 11016 } |
| 11017 if (_json.containsKey("publishedAt")) { |
| 11018 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 11019 } |
| 11020 if (_json.containsKey("thumbnails")) { |
| 11021 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 11022 } |
| 11023 if (_json.containsKey("title")) { |
| 11024 title = _json["title"]; |
| 11025 } |
| 11026 } |
| 11027 |
| 11028 core.Map toJson() { |
| 11029 var _json = new core.Map(); |
| 11030 if (channelId != null) { |
| 11031 _json["channelId"] = channelId; |
| 11032 } |
| 11033 if (channelTitle != null) { |
| 11034 _json["channelTitle"] = channelTitle; |
| 11035 } |
| 11036 if (description != null) { |
| 11037 _json["description"] = description; |
| 11038 } |
| 11039 if (liveBroadcastContent != null) { |
| 11040 _json["liveBroadcastContent"] = liveBroadcastContent; |
| 11041 } |
| 11042 if (publishedAt != null) { |
| 11043 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 11044 } |
| 11045 if (thumbnails != null) { |
| 11046 _json["thumbnails"] = (thumbnails).toJson(); |
| 11047 } |
| 11048 if (title != null) { |
| 11049 _json["title"] = title; |
| 11050 } |
| 11051 return _json; |
| 11052 } |
| 11053 } |
| 11054 |
| 11055 |
| 11056 /** |
| 11057 * A subscription resource contains information about a YouTube user |
| 11058 * subscription. A subscription notifies a user when new videos are added to a |
| 11059 * channel or when another user takes one of several actions on YouTube, such as |
| 11060 * uploading a video, rating a video, or commenting on a video. |
| 11061 */ |
| 11062 class Subscription { |
| 11063 /** |
| 11064 * The contentDetails object contains basic statistics about the subscription. |
| 11065 */ |
| 11066 SubscriptionContentDetails contentDetails; |
| 11067 |
| 11068 /** Etag of this resource. */ |
| 11069 core.String etag; |
| 11070 |
| 11071 /** The ID that YouTube uses to uniquely identify the subscription. */ |
| 11072 core.String id; |
| 11073 |
| 11074 /** |
| 11075 * Identifies what kind of resource this is. Value: the fixed string |
| 11076 * "youtube#subscription". |
| 11077 */ |
| 11078 core.String kind; |
| 11079 |
| 11080 /** |
| 11081 * The snippet object contains basic details about the subscription, including |
| 11082 * its title and the channel that the user subscribed to. |
| 11083 */ |
| 11084 SubscriptionSnippet snippet; |
| 11085 |
| 11086 /** |
| 11087 * The subscriberSnippet object contains basic details about the sbuscriber. |
| 11088 */ |
| 11089 SubscriptionSubscriberSnippet subscriberSnippet; |
| 11090 |
| 11091 |
| 11092 Subscription(); |
| 11093 |
| 11094 Subscription.fromJson(core.Map _json) { |
| 11095 if (_json.containsKey("contentDetails")) { |
| 11096 contentDetails = new SubscriptionContentDetails.fromJson(_json["contentDet
ails"]); |
| 11097 } |
| 11098 if (_json.containsKey("etag")) { |
| 11099 etag = _json["etag"]; |
| 11100 } |
| 11101 if (_json.containsKey("id")) { |
| 11102 id = _json["id"]; |
| 11103 } |
| 11104 if (_json.containsKey("kind")) { |
| 11105 kind = _json["kind"]; |
| 11106 } |
| 11107 if (_json.containsKey("snippet")) { |
| 11108 snippet = new SubscriptionSnippet.fromJson(_json["snippet"]); |
| 11109 } |
| 11110 if (_json.containsKey("subscriberSnippet")) { |
| 11111 subscriberSnippet = new SubscriptionSubscriberSnippet.fromJson(_json["subs
criberSnippet"]); |
| 11112 } |
| 11113 } |
| 11114 |
| 11115 core.Map toJson() { |
| 11116 var _json = new core.Map(); |
| 11117 if (contentDetails != null) { |
| 11118 _json["contentDetails"] = (contentDetails).toJson(); |
| 11119 } |
| 11120 if (etag != null) { |
| 11121 _json["etag"] = etag; |
| 11122 } |
| 11123 if (id != null) { |
| 11124 _json["id"] = id; |
| 11125 } |
| 11126 if (kind != null) { |
| 11127 _json["kind"] = kind; |
| 11128 } |
| 11129 if (snippet != null) { |
| 11130 _json["snippet"] = (snippet).toJson(); |
| 11131 } |
| 11132 if (subscriberSnippet != null) { |
| 11133 _json["subscriberSnippet"] = (subscriberSnippet).toJson(); |
| 11134 } |
| 11135 return _json; |
| 11136 } |
| 11137 } |
| 11138 |
| 11139 |
| 11140 /** Details about the content to witch a subscription refers. */ |
| 11141 class SubscriptionContentDetails { |
| 11142 /** |
| 11143 * The type of activity this subscription is for (only uploads, everything). |
| 11144 * Possible string values are: |
| 11145 * - "all" |
| 11146 * - "uploads" |
| 11147 */ |
| 11148 core.String activityType; |
| 11149 |
| 11150 /** |
| 11151 * The number of new items in the subscription since its content was last |
| 11152 * read. |
| 11153 */ |
| 11154 core.int newItemCount; |
| 11155 |
| 11156 /** The approximate number of items that the subscription points to. */ |
| 11157 core.int totalItemCount; |
| 11158 |
| 11159 |
| 11160 SubscriptionContentDetails(); |
| 11161 |
| 11162 SubscriptionContentDetails.fromJson(core.Map _json) { |
| 11163 if (_json.containsKey("activityType")) { |
| 11164 activityType = _json["activityType"]; |
| 11165 } |
| 11166 if (_json.containsKey("newItemCount")) { |
| 11167 newItemCount = _json["newItemCount"]; |
| 11168 } |
| 11169 if (_json.containsKey("totalItemCount")) { |
| 11170 totalItemCount = _json["totalItemCount"]; |
| 11171 } |
| 11172 } |
| 11173 |
| 11174 core.Map toJson() { |
| 11175 var _json = new core.Map(); |
| 11176 if (activityType != null) { |
| 11177 _json["activityType"] = activityType; |
| 11178 } |
| 11179 if (newItemCount != null) { |
| 11180 _json["newItemCount"] = newItemCount; |
| 11181 } |
| 11182 if (totalItemCount != null) { |
| 11183 _json["totalItemCount"] = totalItemCount; |
| 11184 } |
| 11185 return _json; |
| 11186 } |
| 11187 } |
| 11188 |
| 11189 |
| 11190 /** Not documented yet. */ |
| 11191 class SubscriptionListResponse { |
| 11192 /** Etag of this resource. */ |
| 11193 core.String etag; |
| 11194 |
| 11195 /** Serialized EventId of the request which produced this response. */ |
| 11196 core.String eventId; |
| 11197 |
| 11198 /** A list of subscriptions that match the request criteria. */ |
| 11199 core.List<Subscription> items; |
| 11200 |
| 11201 /** |
| 11202 * Identifies what kind of resource this is. Value: the fixed string |
| 11203 * "youtube#subscriptionListResponse". |
| 11204 */ |
| 11205 core.String kind; |
| 11206 |
| 11207 /** |
| 11208 * The token that can be used as the value of the pageToken parameter to |
| 11209 * retrieve the next page in the result set. |
| 11210 */ |
| 11211 core.String nextPageToken; |
| 11212 |
| 11213 /** Not documented yet. */ |
| 11214 PageInfo pageInfo; |
| 11215 |
| 11216 /** |
| 11217 * The token that can be used as the value of the pageToken parameter to |
| 11218 * retrieve the previous page in the result set. |
| 11219 */ |
| 11220 core.String prevPageToken; |
| 11221 |
| 11222 /** Not documented yet. */ |
| 11223 TokenPagination tokenPagination; |
| 11224 |
| 11225 /** The visitorId identifies the visitor. */ |
| 11226 core.String visitorId; |
| 11227 |
| 11228 |
| 11229 SubscriptionListResponse(); |
| 11230 |
| 11231 SubscriptionListResponse.fromJson(core.Map _json) { |
| 11232 if (_json.containsKey("etag")) { |
| 11233 etag = _json["etag"]; |
| 11234 } |
| 11235 if (_json.containsKey("eventId")) { |
| 11236 eventId = _json["eventId"]; |
| 11237 } |
| 11238 if (_json.containsKey("items")) { |
| 11239 items = _json["items"].map((value) => new Subscription.fromJson(value)).to
List(); |
| 11240 } |
| 11241 if (_json.containsKey("kind")) { |
| 11242 kind = _json["kind"]; |
| 11243 } |
| 11244 if (_json.containsKey("nextPageToken")) { |
| 11245 nextPageToken = _json["nextPageToken"]; |
| 11246 } |
| 11247 if (_json.containsKey("pageInfo")) { |
| 11248 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 11249 } |
| 11250 if (_json.containsKey("prevPageToken")) { |
| 11251 prevPageToken = _json["prevPageToken"]; |
| 11252 } |
| 11253 if (_json.containsKey("tokenPagination")) { |
| 11254 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 11255 } |
| 11256 if (_json.containsKey("visitorId")) { |
| 11257 visitorId = _json["visitorId"]; |
| 11258 } |
| 11259 } |
| 11260 |
| 11261 core.Map toJson() { |
| 11262 var _json = new core.Map(); |
| 11263 if (etag != null) { |
| 11264 _json["etag"] = etag; |
| 11265 } |
| 11266 if (eventId != null) { |
| 11267 _json["eventId"] = eventId; |
| 11268 } |
| 11269 if (items != null) { |
| 11270 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 11271 } |
| 11272 if (kind != null) { |
| 11273 _json["kind"] = kind; |
| 11274 } |
| 11275 if (nextPageToken != null) { |
| 11276 _json["nextPageToken"] = nextPageToken; |
| 11277 } |
| 11278 if (pageInfo != null) { |
| 11279 _json["pageInfo"] = (pageInfo).toJson(); |
| 11280 } |
| 11281 if (prevPageToken != null) { |
| 11282 _json["prevPageToken"] = prevPageToken; |
| 11283 } |
| 11284 if (tokenPagination != null) { |
| 11285 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 11286 } |
| 11287 if (visitorId != null) { |
| 11288 _json["visitorId"] = visitorId; |
| 11289 } |
| 11290 return _json; |
| 11291 } |
| 11292 } |
| 11293 |
| 11294 |
| 11295 /** |
| 11296 * Basic details about a subscription, including title, description and |
| 11297 * thumbnails of the subscribed item. |
| 11298 */ |
| 11299 class SubscriptionSnippet { |
| 11300 /** |
| 11301 * The ID that YouTube uses to uniquely identify the subscriber's channel. |
| 11302 */ |
| 11303 core.String channelId; |
| 11304 |
| 11305 /** Channel title for the channel that the subscription belongs to. */ |
| 11306 core.String channelTitle; |
| 11307 |
| 11308 /** The subscription's details. */ |
| 11309 core.String description; |
| 11310 |
| 11311 /** |
| 11312 * The date and time that the subscription was created. The value is specified |
| 11313 * in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 11314 */ |
| 11315 core.DateTime publishedAt; |
| 11316 |
| 11317 /** |
| 11318 * The id object contains information about the channel that the user |
| 11319 * subscribed to. |
| 11320 */ |
| 11321 ResourceId resourceId; |
| 11322 |
| 11323 /** |
| 11324 * A map of thumbnail images associated with the video. For each object in the |
| 11325 * map, the key is the name of the thumbnail image, and the value is an object |
| 11326 * that contains other information about the thumbnail. |
| 11327 */ |
| 11328 ThumbnailDetails thumbnails; |
| 11329 |
| 11330 /** The subscription's title. */ |
| 11331 core.String title; |
| 11332 |
| 11333 |
| 11334 SubscriptionSnippet(); |
| 11335 |
| 11336 SubscriptionSnippet.fromJson(core.Map _json) { |
| 11337 if (_json.containsKey("channelId")) { |
| 11338 channelId = _json["channelId"]; |
| 11339 } |
| 11340 if (_json.containsKey("channelTitle")) { |
| 11341 channelTitle = _json["channelTitle"]; |
| 11342 } |
| 11343 if (_json.containsKey("description")) { |
| 11344 description = _json["description"]; |
| 11345 } |
| 11346 if (_json.containsKey("publishedAt")) { |
| 11347 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 11348 } |
| 11349 if (_json.containsKey("resourceId")) { |
| 11350 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
| 11351 } |
| 11352 if (_json.containsKey("thumbnails")) { |
| 11353 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 11354 } |
| 11355 if (_json.containsKey("title")) { |
| 11356 title = _json["title"]; |
| 11357 } |
| 11358 } |
| 11359 |
| 11360 core.Map toJson() { |
| 11361 var _json = new core.Map(); |
| 11362 if (channelId != null) { |
| 11363 _json["channelId"] = channelId; |
| 11364 } |
| 11365 if (channelTitle != null) { |
| 11366 _json["channelTitle"] = channelTitle; |
| 11367 } |
| 11368 if (description != null) { |
| 11369 _json["description"] = description; |
| 11370 } |
| 11371 if (publishedAt != null) { |
| 11372 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 11373 } |
| 11374 if (resourceId != null) { |
| 11375 _json["resourceId"] = (resourceId).toJson(); |
| 11376 } |
| 11377 if (thumbnails != null) { |
| 11378 _json["thumbnails"] = (thumbnails).toJson(); |
| 11379 } |
| 11380 if (title != null) { |
| 11381 _json["title"] = title; |
| 11382 } |
| 11383 return _json; |
| 11384 } |
| 11385 } |
| 11386 |
| 11387 |
| 11388 /** |
| 11389 * Basic details about a subscription's subscriber including title, description, |
| 11390 * channel ID and thumbnails. |
| 11391 */ |
| 11392 class SubscriptionSubscriberSnippet { |
| 11393 /** The channel ID of the subscriber. */ |
| 11394 core.String channelId; |
| 11395 |
| 11396 /** The description of the subscriber. */ |
| 11397 core.String description; |
| 11398 |
| 11399 /** Thumbnails for this subscriber. */ |
| 11400 ThumbnailDetails thumbnails; |
| 11401 |
| 11402 /** The title of the subscriber. */ |
| 11403 core.String title; |
| 11404 |
| 11405 |
| 11406 SubscriptionSubscriberSnippet(); |
| 11407 |
| 11408 SubscriptionSubscriberSnippet.fromJson(core.Map _json) { |
| 11409 if (_json.containsKey("channelId")) { |
| 11410 channelId = _json["channelId"]; |
| 11411 } |
| 11412 if (_json.containsKey("description")) { |
| 11413 description = _json["description"]; |
| 11414 } |
| 11415 if (_json.containsKey("thumbnails")) { |
| 11416 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 11417 } |
| 11418 if (_json.containsKey("title")) { |
| 11419 title = _json["title"]; |
| 11420 } |
| 11421 } |
| 11422 |
| 11423 core.Map toJson() { |
| 11424 var _json = new core.Map(); |
| 11425 if (channelId != null) { |
| 11426 _json["channelId"] = channelId; |
| 11427 } |
| 11428 if (description != null) { |
| 11429 _json["description"] = description; |
| 11430 } |
| 11431 if (thumbnails != null) { |
| 11432 _json["thumbnails"] = (thumbnails).toJson(); |
| 11433 } |
| 11434 if (title != null) { |
| 11435 _json["title"] = title; |
| 11436 } |
| 11437 return _json; |
| 11438 } |
| 11439 } |
| 11440 |
| 11441 |
| 11442 /** A thumbnail is an image representing a YouTube resource. */ |
| 11443 class Thumbnail { |
| 11444 /** (Optional) Height of the thumbnail image. */ |
| 11445 core.int height; |
| 11446 |
| 11447 /** The thumbnail image's URL. */ |
| 11448 core.String url; |
| 11449 |
| 11450 /** (Optional) Width of the thumbnail image. */ |
| 11451 core.int width; |
| 11452 |
| 11453 |
| 11454 Thumbnail(); |
| 11455 |
| 11456 Thumbnail.fromJson(core.Map _json) { |
| 11457 if (_json.containsKey("height")) { |
| 11458 height = _json["height"]; |
| 11459 } |
| 11460 if (_json.containsKey("url")) { |
| 11461 url = _json["url"]; |
| 11462 } |
| 11463 if (_json.containsKey("width")) { |
| 11464 width = _json["width"]; |
| 11465 } |
| 11466 } |
| 11467 |
| 11468 core.Map toJson() { |
| 11469 var _json = new core.Map(); |
| 11470 if (height != null) { |
| 11471 _json["height"] = height; |
| 11472 } |
| 11473 if (url != null) { |
| 11474 _json["url"] = url; |
| 11475 } |
| 11476 if (width != null) { |
| 11477 _json["width"] = width; |
| 11478 } |
| 11479 return _json; |
| 11480 } |
| 11481 } |
| 11482 |
| 11483 |
| 11484 /** Internal representation of thumbnails for a YouTube resource. */ |
| 11485 class ThumbnailDetails { |
| 11486 /** The default image for this resource. */ |
| 11487 Thumbnail default_; |
| 11488 |
| 11489 /** The high quality image for this resource. */ |
| 11490 Thumbnail high; |
| 11491 |
| 11492 /** The maximum resolution quality image for this resource. */ |
| 11493 Thumbnail maxres; |
| 11494 |
| 11495 /** The medium quality image for this resource. */ |
| 11496 Thumbnail medium; |
| 11497 |
| 11498 /** The standard quality image for this resource. */ |
| 11499 Thumbnail standard; |
| 11500 |
| 11501 |
| 11502 ThumbnailDetails(); |
| 11503 |
| 11504 ThumbnailDetails.fromJson(core.Map _json) { |
| 11505 if (_json.containsKey("default")) { |
| 11506 default_ = new Thumbnail.fromJson(_json["default"]); |
| 11507 } |
| 11508 if (_json.containsKey("high")) { |
| 11509 high = new Thumbnail.fromJson(_json["high"]); |
| 11510 } |
| 11511 if (_json.containsKey("maxres")) { |
| 11512 maxres = new Thumbnail.fromJson(_json["maxres"]); |
| 11513 } |
| 11514 if (_json.containsKey("medium")) { |
| 11515 medium = new Thumbnail.fromJson(_json["medium"]); |
| 11516 } |
| 11517 if (_json.containsKey("standard")) { |
| 11518 standard = new Thumbnail.fromJson(_json["standard"]); |
| 11519 } |
| 11520 } |
| 11521 |
| 11522 core.Map toJson() { |
| 11523 var _json = new core.Map(); |
| 11524 if (default_ != null) { |
| 11525 _json["default"] = (default_).toJson(); |
| 11526 } |
| 11527 if (high != null) { |
| 11528 _json["high"] = (high).toJson(); |
| 11529 } |
| 11530 if (maxres != null) { |
| 11531 _json["maxres"] = (maxres).toJson(); |
| 11532 } |
| 11533 if (medium != null) { |
| 11534 _json["medium"] = (medium).toJson(); |
| 11535 } |
| 11536 if (standard != null) { |
| 11537 _json["standard"] = (standard).toJson(); |
| 11538 } |
| 11539 return _json; |
| 11540 } |
| 11541 } |
| 11542 |
| 11543 |
| 11544 /** Not documented yet. */ |
| 11545 class ThumbnailSetResponse { |
| 11546 /** Etag of this resource. */ |
| 11547 core.String etag; |
| 11548 |
| 11549 /** Serialized EventId of the request which produced this response. */ |
| 11550 core.String eventId; |
| 11551 |
| 11552 /** A list of thumbnails. */ |
| 11553 core.List<ThumbnailDetails> items; |
| 11554 |
| 11555 /** |
| 11556 * Identifies what kind of resource this is. Value: the fixed string |
| 11557 * "youtube#thumbnailSetResponse". |
| 11558 */ |
| 11559 core.String kind; |
| 11560 |
| 11561 /** The visitorId identifies the visitor. */ |
| 11562 core.String visitorId; |
| 11563 |
| 11564 |
| 11565 ThumbnailSetResponse(); |
| 11566 |
| 11567 ThumbnailSetResponse.fromJson(core.Map _json) { |
| 11568 if (_json.containsKey("etag")) { |
| 11569 etag = _json["etag"]; |
| 11570 } |
| 11571 if (_json.containsKey("eventId")) { |
| 11572 eventId = _json["eventId"]; |
| 11573 } |
| 11574 if (_json.containsKey("items")) { |
| 11575 items = _json["items"].map((value) => new ThumbnailDetails.fromJson(value)
).toList(); |
| 11576 } |
| 11577 if (_json.containsKey("kind")) { |
| 11578 kind = _json["kind"]; |
| 11579 } |
| 11580 if (_json.containsKey("visitorId")) { |
| 11581 visitorId = _json["visitorId"]; |
| 11582 } |
| 11583 } |
| 11584 |
| 11585 core.Map toJson() { |
| 11586 var _json = new core.Map(); |
| 11587 if (etag != null) { |
| 11588 _json["etag"] = etag; |
| 11589 } |
| 11590 if (eventId != null) { |
| 11591 _json["eventId"] = eventId; |
| 11592 } |
| 11593 if (items != null) { |
| 11594 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 11595 } |
| 11596 if (kind != null) { |
| 11597 _json["kind"] = kind; |
| 11598 } |
| 11599 if (visitorId != null) { |
| 11600 _json["visitorId"] = visitorId; |
| 11601 } |
| 11602 return _json; |
| 11603 } |
| 11604 } |
| 11605 |
| 11606 |
| 11607 /** Stub token pagination template to suppress results. */ |
| 11608 class TokenPagination { |
| 11609 |
| 11610 TokenPagination(); |
| 11611 |
| 11612 TokenPagination.fromJson(core.Map _json) { |
| 11613 } |
| 11614 |
| 11615 core.Map toJson() { |
| 11616 var _json = new core.Map(); |
| 11617 return _json; |
| 11618 } |
| 11619 } |
| 11620 |
| 11621 |
| 11622 /** A video resource represents a YouTube video. */ |
| 11623 class Video { |
| 11624 /** Age restriction details related to a video. */ |
| 11625 VideoAgeGating ageGating; |
| 11626 |
| 11627 /** |
| 11628 * The contentDetails object contains information about the video content, |
| 11629 * including the length of the video and its aspect ratio. |
| 11630 */ |
| 11631 VideoContentDetails contentDetails; |
| 11632 |
| 11633 /** |
| 11634 * The conversionPings object encapsulates information about url pings that |
| 11635 * need to be respected by the App in different video contexts. |
| 11636 */ |
| 11637 VideoConversionPings conversionPings; |
| 11638 |
| 11639 /** Etag of this resource. */ |
| 11640 core.String etag; |
| 11641 |
| 11642 /** |
| 11643 * The fileDetails object encapsulates information about the video file that |
| 11644 * was uploaded to YouTube, including the file's resolution, duration, audio |
| 11645 * and video codecs, stream bitrates, and more. This data can only be |
| 11646 * retrieved by the video owner. |
| 11647 */ |
| 11648 VideoFileDetails fileDetails; |
| 11649 |
| 11650 /** The ID that YouTube uses to uniquely identify the video. */ |
| 11651 core.String id; |
| 11652 |
| 11653 /** |
| 11654 * Identifies what kind of resource this is. Value: the fixed string |
| 11655 * "youtube#video". |
| 11656 */ |
| 11657 core.String kind; |
| 11658 |
| 11659 /** |
| 11660 * The liveStreamingDetails object contains metadata about a live video |
| 11661 * broadcast. The object will only be present in a video resource if the video |
| 11662 * is an upcoming, live, or completed live broadcast. |
| 11663 */ |
| 11664 VideoLiveStreamingDetails liveStreamingDetails; |
| 11665 |
| 11666 /** |
| 11667 * The monetizationDetails object encapsulates information about the |
| 11668 * monetization status of the video. |
| 11669 */ |
| 11670 VideoMonetizationDetails monetizationDetails; |
| 11671 |
| 11672 /** |
| 11673 * The player object contains information that you would use to play the video |
| 11674 * in an embedded player. |
| 11675 */ |
| 11676 VideoPlayer player; |
| 11677 |
| 11678 /** |
| 11679 * The processingProgress object encapsulates information about YouTube's |
| 11680 * progress in processing the uploaded video file. The properties in the |
| 11681 * object identify the current processing status and an estimate of the time |
| 11682 * remaining until YouTube finishes processing the video. This part also |
| 11683 * indicates whether different types of data or content, such as file details |
| 11684 * or thumbnail images, are available for the video. |
| 11685 * |
| 11686 * The processingProgress object is designed to be polled so that the video |
| 11687 * uploaded can track the progress that YouTube has made in processing the |
| 11688 * uploaded video file. This data can only be retrieved by the video owner. |
| 11689 */ |
| 11690 VideoProcessingDetails processingDetails; |
| 11691 |
| 11692 /** |
| 11693 * The projectDetails object contains information about the project specific |
| 11694 * video metadata. |
| 11695 */ |
| 11696 VideoProjectDetails projectDetails; |
| 11697 |
| 11698 /** |
| 11699 * The recordingDetails object encapsulates information about the location, |
| 11700 * date and address where the video was recorded. |
| 11701 */ |
| 11702 VideoRecordingDetails recordingDetails; |
| 11703 |
| 11704 /** |
| 11705 * The snippet object contains basic details about the video, such as its |
| 11706 * title, description, and category. |
| 11707 */ |
| 11708 VideoSnippet snippet; |
| 11709 |
| 11710 /** The statistics object contains statistics about the video. */ |
| 11711 VideoStatistics statistics; |
| 11712 |
| 11713 /** |
| 11714 * The status object contains information about the video's uploading, |
| 11715 * processing, and privacy statuses. |
| 11716 */ |
| 11717 VideoStatus status; |
| 11718 |
| 11719 /** |
| 11720 * The suggestions object encapsulates suggestions that identify opportunities |
| 11721 * to improve the video quality or the metadata for the uploaded video. This |
| 11722 * data can only be retrieved by the video owner. |
| 11723 */ |
| 11724 VideoSuggestions suggestions; |
| 11725 |
| 11726 /** |
| 11727 * The topicDetails object encapsulates information about Freebase topics |
| 11728 * associated with the video. |
| 11729 */ |
| 11730 VideoTopicDetails topicDetails; |
| 11731 |
| 11732 |
| 11733 Video(); |
| 11734 |
| 11735 Video.fromJson(core.Map _json) { |
| 11736 if (_json.containsKey("ageGating")) { |
| 11737 ageGating = new VideoAgeGating.fromJson(_json["ageGating"]); |
| 11738 } |
| 11739 if (_json.containsKey("contentDetails")) { |
| 11740 contentDetails = new VideoContentDetails.fromJson(_json["contentDetails"])
; |
| 11741 } |
| 11742 if (_json.containsKey("conversionPings")) { |
| 11743 conversionPings = new VideoConversionPings.fromJson(_json["conversionPings
"]); |
| 11744 } |
| 11745 if (_json.containsKey("etag")) { |
| 11746 etag = _json["etag"]; |
| 11747 } |
| 11748 if (_json.containsKey("fileDetails")) { |
| 11749 fileDetails = new VideoFileDetails.fromJson(_json["fileDetails"]); |
| 11750 } |
| 11751 if (_json.containsKey("id")) { |
| 11752 id = _json["id"]; |
| 11753 } |
| 11754 if (_json.containsKey("kind")) { |
| 11755 kind = _json["kind"]; |
| 11756 } |
| 11757 if (_json.containsKey("liveStreamingDetails")) { |
| 11758 liveStreamingDetails = new VideoLiveStreamingDetails.fromJson(_json["liveS
treamingDetails"]); |
| 11759 } |
| 11760 if (_json.containsKey("monetizationDetails")) { |
| 11761 monetizationDetails = new VideoMonetizationDetails.fromJson(_json["monetiz
ationDetails"]); |
| 11762 } |
| 11763 if (_json.containsKey("player")) { |
| 11764 player = new VideoPlayer.fromJson(_json["player"]); |
| 11765 } |
| 11766 if (_json.containsKey("processingDetails")) { |
| 11767 processingDetails = new VideoProcessingDetails.fromJson(_json["processingD
etails"]); |
| 11768 } |
| 11769 if (_json.containsKey("projectDetails")) { |
| 11770 projectDetails = new VideoProjectDetails.fromJson(_json["projectDetails"])
; |
| 11771 } |
| 11772 if (_json.containsKey("recordingDetails")) { |
| 11773 recordingDetails = new VideoRecordingDetails.fromJson(_json["recordingDeta
ils"]); |
| 11774 } |
| 11775 if (_json.containsKey("snippet")) { |
| 11776 snippet = new VideoSnippet.fromJson(_json["snippet"]); |
| 11777 } |
| 11778 if (_json.containsKey("statistics")) { |
| 11779 statistics = new VideoStatistics.fromJson(_json["statistics"]); |
| 11780 } |
| 11781 if (_json.containsKey("status")) { |
| 11782 status = new VideoStatus.fromJson(_json["status"]); |
| 11783 } |
| 11784 if (_json.containsKey("suggestions")) { |
| 11785 suggestions = new VideoSuggestions.fromJson(_json["suggestions"]); |
| 11786 } |
| 11787 if (_json.containsKey("topicDetails")) { |
| 11788 topicDetails = new VideoTopicDetails.fromJson(_json["topicDetails"]); |
| 11789 } |
| 11790 } |
| 11791 |
| 11792 core.Map toJson() { |
| 11793 var _json = new core.Map(); |
| 11794 if (ageGating != null) { |
| 11795 _json["ageGating"] = (ageGating).toJson(); |
| 11796 } |
| 11797 if (contentDetails != null) { |
| 11798 _json["contentDetails"] = (contentDetails).toJson(); |
| 11799 } |
| 11800 if (conversionPings != null) { |
| 11801 _json["conversionPings"] = (conversionPings).toJson(); |
| 11802 } |
| 11803 if (etag != null) { |
| 11804 _json["etag"] = etag; |
| 11805 } |
| 11806 if (fileDetails != null) { |
| 11807 _json["fileDetails"] = (fileDetails).toJson(); |
| 11808 } |
| 11809 if (id != null) { |
| 11810 _json["id"] = id; |
| 11811 } |
| 11812 if (kind != null) { |
| 11813 _json["kind"] = kind; |
| 11814 } |
| 11815 if (liveStreamingDetails != null) { |
| 11816 _json["liveStreamingDetails"] = (liveStreamingDetails).toJson(); |
| 11817 } |
| 11818 if (monetizationDetails != null) { |
| 11819 _json["monetizationDetails"] = (monetizationDetails).toJson(); |
| 11820 } |
| 11821 if (player != null) { |
| 11822 _json["player"] = (player).toJson(); |
| 11823 } |
| 11824 if (processingDetails != null) { |
| 11825 _json["processingDetails"] = (processingDetails).toJson(); |
| 11826 } |
| 11827 if (projectDetails != null) { |
| 11828 _json["projectDetails"] = (projectDetails).toJson(); |
| 11829 } |
| 11830 if (recordingDetails != null) { |
| 11831 _json["recordingDetails"] = (recordingDetails).toJson(); |
| 11832 } |
| 11833 if (snippet != null) { |
| 11834 _json["snippet"] = (snippet).toJson(); |
| 11835 } |
| 11836 if (statistics != null) { |
| 11837 _json["statistics"] = (statistics).toJson(); |
| 11838 } |
| 11839 if (status != null) { |
| 11840 _json["status"] = (status).toJson(); |
| 11841 } |
| 11842 if (suggestions != null) { |
| 11843 _json["suggestions"] = (suggestions).toJson(); |
| 11844 } |
| 11845 if (topicDetails != null) { |
| 11846 _json["topicDetails"] = (topicDetails).toJson(); |
| 11847 } |
| 11848 return _json; |
| 11849 } |
| 11850 } |
| 11851 |
| 11852 |
| 11853 /** Not documented yet. */ |
| 11854 class VideoAgeGating { |
| 11855 /** |
| 11856 * Indicates whether or not the video has alcoholic beverage content. Only |
| 11857 * users of legal purchasing age in a particular country, as identified by |
| 11858 * ICAP, can view the content. |
| 11859 */ |
| 11860 core.bool alcoholContent; |
| 11861 |
| 11862 /** |
| 11863 * Age-restricted trailers. For redband trailers and adult-rated video-games. |
| 11864 * Only users aged 18+ can view the content. The the field is true the content |
| 11865 * is restricted to viewers aged 18+. Otherwise The field won't be present. |
| 11866 */ |
| 11867 core.bool restricted; |
| 11868 |
| 11869 /** |
| 11870 * Video game rating, if any. |
| 11871 * Possible string values are: |
| 11872 * - "anyone" |
| 11873 * - "m15Plus" |
| 11874 * - "m16Plus" |
| 11875 * - "m17Plus" |
| 11876 */ |
| 11877 core.String videoGameRating; |
| 11878 |
| 11879 |
| 11880 VideoAgeGating(); |
| 11881 |
| 11882 VideoAgeGating.fromJson(core.Map _json) { |
| 11883 if (_json.containsKey("alcoholContent")) { |
| 11884 alcoholContent = _json["alcoholContent"]; |
| 11885 } |
| 11886 if (_json.containsKey("restricted")) { |
| 11887 restricted = _json["restricted"]; |
| 11888 } |
| 11889 if (_json.containsKey("videoGameRating")) { |
| 11890 videoGameRating = _json["videoGameRating"]; |
| 11891 } |
| 11892 } |
| 11893 |
| 11894 core.Map toJson() { |
| 11895 var _json = new core.Map(); |
| 11896 if (alcoholContent != null) { |
| 11897 _json["alcoholContent"] = alcoholContent; |
| 11898 } |
| 11899 if (restricted != null) { |
| 11900 _json["restricted"] = restricted; |
| 11901 } |
| 11902 if (videoGameRating != null) { |
| 11903 _json["videoGameRating"] = videoGameRating; |
| 11904 } |
| 11905 return _json; |
| 11906 } |
| 11907 } |
| 11908 |
| 11909 |
| 11910 /** |
| 11911 * A videoCategory resource identifies a category that has been or could be |
| 11912 * associated with uploaded videos. |
| 11913 */ |
| 11914 class VideoCategory { |
| 11915 /** Etag of this resource. */ |
| 11916 core.String etag; |
| 11917 |
| 11918 /** The ID that YouTube uses to uniquely identify the video category. */ |
| 11919 core.String id; |
| 11920 |
| 11921 /** |
| 11922 * Identifies what kind of resource this is. Value: the fixed string |
| 11923 * "youtube#videoCategory". |
| 11924 */ |
| 11925 core.String kind; |
| 11926 |
| 11927 /** |
| 11928 * The snippet object contains basic details about the video category, |
| 11929 * including its title. |
| 11930 */ |
| 11931 VideoCategorySnippet snippet; |
| 11932 |
| 11933 |
| 11934 VideoCategory(); |
| 11935 |
| 11936 VideoCategory.fromJson(core.Map _json) { |
| 11937 if (_json.containsKey("etag")) { |
| 11938 etag = _json["etag"]; |
| 11939 } |
| 11940 if (_json.containsKey("id")) { |
| 11941 id = _json["id"]; |
| 11942 } |
| 11943 if (_json.containsKey("kind")) { |
| 11944 kind = _json["kind"]; |
| 11945 } |
| 11946 if (_json.containsKey("snippet")) { |
| 11947 snippet = new VideoCategorySnippet.fromJson(_json["snippet"]); |
| 11948 } |
| 11949 } |
| 11950 |
| 11951 core.Map toJson() { |
| 11952 var _json = new core.Map(); |
| 11953 if (etag != null) { |
| 11954 _json["etag"] = etag; |
| 11955 } |
| 11956 if (id != null) { |
| 11957 _json["id"] = id; |
| 11958 } |
| 11959 if (kind != null) { |
| 11960 _json["kind"] = kind; |
| 11961 } |
| 11962 if (snippet != null) { |
| 11963 _json["snippet"] = (snippet).toJson(); |
| 11964 } |
| 11965 return _json; |
| 11966 } |
| 11967 } |
| 11968 |
| 11969 |
| 11970 /** Not documented yet. */ |
| 11971 class VideoCategoryListResponse { |
| 11972 /** Etag of this resource. */ |
| 11973 core.String etag; |
| 11974 |
| 11975 /** Serialized EventId of the request which produced this response. */ |
| 11976 core.String eventId; |
| 11977 |
| 11978 /** |
| 11979 * A list of video categories that can be associated with YouTube videos. In |
| 11980 * this map, the video category ID is the map key, and its value is the |
| 11981 * corresponding videoCategory resource. |
| 11982 */ |
| 11983 core.List<VideoCategory> items; |
| 11984 |
| 11985 /** |
| 11986 * Identifies what kind of resource this is. Value: the fixed string |
| 11987 * "youtube#videoCategoryListResponse". |
| 11988 */ |
| 11989 core.String kind; |
| 11990 |
| 11991 /** |
| 11992 * The token that can be used as the value of the pageToken parameter to |
| 11993 * retrieve the next page in the result set. |
| 11994 */ |
| 11995 core.String nextPageToken; |
| 11996 |
| 11997 /** Not documented yet. */ |
| 11998 PageInfo pageInfo; |
| 11999 |
| 12000 /** |
| 12001 * The token that can be used as the value of the pageToken parameter to |
| 12002 * retrieve the previous page in the result set. |
| 12003 */ |
| 12004 core.String prevPageToken; |
| 12005 |
| 12006 /** Not documented yet. */ |
| 12007 TokenPagination tokenPagination; |
| 12008 |
| 12009 /** The visitorId identifies the visitor. */ |
| 12010 core.String visitorId; |
| 12011 |
| 12012 |
| 12013 VideoCategoryListResponse(); |
| 12014 |
| 12015 VideoCategoryListResponse.fromJson(core.Map _json) { |
| 12016 if (_json.containsKey("etag")) { |
| 12017 etag = _json["etag"]; |
| 12018 } |
| 12019 if (_json.containsKey("eventId")) { |
| 12020 eventId = _json["eventId"]; |
| 12021 } |
| 12022 if (_json.containsKey("items")) { |
| 12023 items = _json["items"].map((value) => new VideoCategory.fromJson(value)).t
oList(); |
| 12024 } |
| 12025 if (_json.containsKey("kind")) { |
| 12026 kind = _json["kind"]; |
| 12027 } |
| 12028 if (_json.containsKey("nextPageToken")) { |
| 12029 nextPageToken = _json["nextPageToken"]; |
| 12030 } |
| 12031 if (_json.containsKey("pageInfo")) { |
| 12032 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 12033 } |
| 12034 if (_json.containsKey("prevPageToken")) { |
| 12035 prevPageToken = _json["prevPageToken"]; |
| 12036 } |
| 12037 if (_json.containsKey("tokenPagination")) { |
| 12038 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 12039 } |
| 12040 if (_json.containsKey("visitorId")) { |
| 12041 visitorId = _json["visitorId"]; |
| 12042 } |
| 12043 } |
| 12044 |
| 12045 core.Map toJson() { |
| 12046 var _json = new core.Map(); |
| 12047 if (etag != null) { |
| 12048 _json["etag"] = etag; |
| 12049 } |
| 12050 if (eventId != null) { |
| 12051 _json["eventId"] = eventId; |
| 12052 } |
| 12053 if (items != null) { |
| 12054 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 12055 } |
| 12056 if (kind != null) { |
| 12057 _json["kind"] = kind; |
| 12058 } |
| 12059 if (nextPageToken != null) { |
| 12060 _json["nextPageToken"] = nextPageToken; |
| 12061 } |
| 12062 if (pageInfo != null) { |
| 12063 _json["pageInfo"] = (pageInfo).toJson(); |
| 12064 } |
| 12065 if (prevPageToken != null) { |
| 12066 _json["prevPageToken"] = prevPageToken; |
| 12067 } |
| 12068 if (tokenPagination != null) { |
| 12069 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 12070 } |
| 12071 if (visitorId != null) { |
| 12072 _json["visitorId"] = visitorId; |
| 12073 } |
| 12074 return _json; |
| 12075 } |
| 12076 } |
| 12077 |
| 12078 |
| 12079 /** Basic details about a video category, such as its localized title. */ |
| 12080 class VideoCategorySnippet { |
| 12081 /** Not documented yet. */ |
| 12082 core.bool assignable; |
| 12083 |
| 12084 /** The YouTube channel that created the video category. */ |
| 12085 core.String channelId; |
| 12086 |
| 12087 /** The video category's title. */ |
| 12088 core.String title; |
| 12089 |
| 12090 |
| 12091 VideoCategorySnippet(); |
| 12092 |
| 12093 VideoCategorySnippet.fromJson(core.Map _json) { |
| 12094 if (_json.containsKey("assignable")) { |
| 12095 assignable = _json["assignable"]; |
| 12096 } |
| 12097 if (_json.containsKey("channelId")) { |
| 12098 channelId = _json["channelId"]; |
| 12099 } |
| 12100 if (_json.containsKey("title")) { |
| 12101 title = _json["title"]; |
| 12102 } |
| 12103 } |
| 12104 |
| 12105 core.Map toJson() { |
| 12106 var _json = new core.Map(); |
| 12107 if (assignable != null) { |
| 12108 _json["assignable"] = assignable; |
| 12109 } |
| 12110 if (channelId != null) { |
| 12111 _json["channelId"] = channelId; |
| 12112 } |
| 12113 if (title != null) { |
| 12114 _json["title"] = title; |
| 12115 } |
| 12116 return _json; |
| 12117 } |
| 12118 } |
| 12119 |
| 12120 |
| 12121 /** Details about the content of a YouTube Video. */ |
| 12122 class VideoContentDetails { |
| 12123 /** |
| 12124 * The value of captions indicates whether the video has captions or not. |
| 12125 * Possible string values are: |
| 12126 * - "false" |
| 12127 * - "true" |
| 12128 */ |
| 12129 core.String caption; |
| 12130 |
| 12131 /** |
| 12132 * Specifies the ratings that the video received under various rating schemes. |
| 12133 */ |
| 12134 ContentRating contentRating; |
| 12135 |
| 12136 /** |
| 12137 * The countryRestriction object contains information about the countries |
| 12138 * where a video is (or is not) viewable. |
| 12139 */ |
| 12140 AccessPolicy countryRestriction; |
| 12141 |
| 12142 /** |
| 12143 * The value of definition indicates whether the video is available in high |
| 12144 * definition or only in standard definition. |
| 12145 * Possible string values are: |
| 12146 * - "hd" |
| 12147 * - "sd" |
| 12148 */ |
| 12149 core.String definition; |
| 12150 |
| 12151 /** |
| 12152 * The value of dimension indicates whether the video is available in 3D or in |
| 12153 * 2D. |
| 12154 */ |
| 12155 core.String dimension; |
| 12156 |
| 12157 /** |
| 12158 * The length of the video. The tag value is an ISO 8601 duration in the |
| 12159 * format PT#M#S, in which the letters PT indicate that the value specifies a |
| 12160 * period of time, and the letters M and S refer to length in minutes and |
| 12161 * seconds, respectively. The # characters preceding the M and S letters are |
| 12162 * both integers that specify the number of minutes (or seconds) of the video. |
| 12163 * For example, a value of PT15M51S indicates that the video is 15 minutes and |
| 12164 * 51 seconds long. |
| 12165 */ |
| 12166 core.String duration; |
| 12167 |
| 12168 /** |
| 12169 * The value of is_license_content indicates whether the video is licensed |
| 12170 * content. |
| 12171 */ |
| 12172 core.bool licensedContent; |
| 12173 |
| 12174 /** |
| 12175 * The regionRestriction object contains information about the countries where |
| 12176 * a video is (or is not) viewable. The object will contain either the |
| 12177 * contentDetails.regionRestriction.allowed property or the |
| 12178 * contentDetails.regionRestriction.blocked property. |
| 12179 */ |
| 12180 VideoContentDetailsRegionRestriction regionRestriction; |
| 12181 |
| 12182 |
| 12183 VideoContentDetails(); |
| 12184 |
| 12185 VideoContentDetails.fromJson(core.Map _json) { |
| 12186 if (_json.containsKey("caption")) { |
| 12187 caption = _json["caption"]; |
| 12188 } |
| 12189 if (_json.containsKey("contentRating")) { |
| 12190 contentRating = new ContentRating.fromJson(_json["contentRating"]); |
| 12191 } |
| 12192 if (_json.containsKey("countryRestriction")) { |
| 12193 countryRestriction = new AccessPolicy.fromJson(_json["countryRestriction"]
); |
| 12194 } |
| 12195 if (_json.containsKey("definition")) { |
| 12196 definition = _json["definition"]; |
| 12197 } |
| 12198 if (_json.containsKey("dimension")) { |
| 12199 dimension = _json["dimension"]; |
| 12200 } |
| 12201 if (_json.containsKey("duration")) { |
| 12202 duration = _json["duration"]; |
| 12203 } |
| 12204 if (_json.containsKey("licensedContent")) { |
| 12205 licensedContent = _json["licensedContent"]; |
| 12206 } |
| 12207 if (_json.containsKey("regionRestriction")) { |
| 12208 regionRestriction = new VideoContentDetailsRegionRestriction.fromJson(_jso
n["regionRestriction"]); |
| 12209 } |
| 12210 } |
| 12211 |
| 12212 core.Map toJson() { |
| 12213 var _json = new core.Map(); |
| 12214 if (caption != null) { |
| 12215 _json["caption"] = caption; |
| 12216 } |
| 12217 if (contentRating != null) { |
| 12218 _json["contentRating"] = (contentRating).toJson(); |
| 12219 } |
| 12220 if (countryRestriction != null) { |
| 12221 _json["countryRestriction"] = (countryRestriction).toJson(); |
| 12222 } |
| 12223 if (definition != null) { |
| 12224 _json["definition"] = definition; |
| 12225 } |
| 12226 if (dimension != null) { |
| 12227 _json["dimension"] = dimension; |
| 12228 } |
| 12229 if (duration != null) { |
| 12230 _json["duration"] = duration; |
| 12231 } |
| 12232 if (licensedContent != null) { |
| 12233 _json["licensedContent"] = licensedContent; |
| 12234 } |
| 12235 if (regionRestriction != null) { |
| 12236 _json["regionRestriction"] = (regionRestriction).toJson(); |
| 12237 } |
| 12238 return _json; |
| 12239 } |
| 12240 } |
| 12241 |
| 12242 |
| 12243 /** DEPRECATED Region restriction of the video. */ |
| 12244 class VideoContentDetailsRegionRestriction { |
| 12245 /** |
| 12246 * A list of region codes that identify countries where the video is viewable. |
| 12247 * If this property is present and a country is not listed in its value, then |
| 12248 * the video is blocked from appearing in that country. If this property is |
| 12249 * present and contains an empty list, the video is blocked in all countries. |
| 12250 */ |
| 12251 core.List<core.String> allowed; |
| 12252 |
| 12253 /** |
| 12254 * A list of region codes that identify countries where the video is blocked. |
| 12255 * If this property is present and a country is not listed in its value, then |
| 12256 * the video is viewable in that country. If this property is present and |
| 12257 * contains an empty list, the video is viewable in all countries. |
| 12258 */ |
| 12259 core.List<core.String> blocked; |
| 12260 |
| 12261 |
| 12262 VideoContentDetailsRegionRestriction(); |
| 12263 |
| 12264 VideoContentDetailsRegionRestriction.fromJson(core.Map _json) { |
| 12265 if (_json.containsKey("allowed")) { |
| 12266 allowed = _json["allowed"]; |
| 12267 } |
| 12268 if (_json.containsKey("blocked")) { |
| 12269 blocked = _json["blocked"]; |
| 12270 } |
| 12271 } |
| 12272 |
| 12273 core.Map toJson() { |
| 12274 var _json = new core.Map(); |
| 12275 if (allowed != null) { |
| 12276 _json["allowed"] = allowed; |
| 12277 } |
| 12278 if (blocked != null) { |
| 12279 _json["blocked"] = blocked; |
| 12280 } |
| 12281 return _json; |
| 12282 } |
| 12283 } |
| 12284 |
| 12285 |
| 12286 /** Not documented yet. */ |
| 12287 class VideoConversionPing { |
| 12288 /** |
| 12289 * Defines the context of the ping. |
| 12290 * Possible string values are: |
| 12291 * - "comment" |
| 12292 * - "dislike" |
| 12293 * - "like" |
| 12294 * - "share" |
| 12295 */ |
| 12296 core.String context; |
| 12297 |
| 12298 /** |
| 12299 * The url (without the schema) that the app shall send the ping to. It's at |
| 12300 * caller's descretion to decide which schema to use (http vs https) Example |
| 12301 * of a returned url: //googleads.g.doubleclick.net/pagead/ |
| 12302 * viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D |
| 12303 * like%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA%3Bytvid%3DUrIaJUvIQDg&labe=default |
| 12304 * The caller must append biscotti authentication (ms param in case of mobile, |
| 12305 * for example) to this ping. |
| 12306 */ |
| 12307 core.String conversionUrl; |
| 12308 |
| 12309 |
| 12310 VideoConversionPing(); |
| 12311 |
| 12312 VideoConversionPing.fromJson(core.Map _json) { |
| 12313 if (_json.containsKey("context")) { |
| 12314 context = _json["context"]; |
| 12315 } |
| 12316 if (_json.containsKey("conversionUrl")) { |
| 12317 conversionUrl = _json["conversionUrl"]; |
| 12318 } |
| 12319 } |
| 12320 |
| 12321 core.Map toJson() { |
| 12322 var _json = new core.Map(); |
| 12323 if (context != null) { |
| 12324 _json["context"] = context; |
| 12325 } |
| 12326 if (conversionUrl != null) { |
| 12327 _json["conversionUrl"] = conversionUrl; |
| 12328 } |
| 12329 return _json; |
| 12330 } |
| 12331 } |
| 12332 |
| 12333 |
| 12334 /** Not documented yet. */ |
| 12335 class VideoConversionPings { |
| 12336 /** |
| 12337 * Pings that the app shall fire for a video (authenticated by biscotti |
| 12338 * cookie). Each ping has a context, in which the app must fire the ping, and |
| 12339 * a url identifying the ping. |
| 12340 */ |
| 12341 core.List<VideoConversionPing> pings; |
| 12342 |
| 12343 |
| 12344 VideoConversionPings(); |
| 12345 |
| 12346 VideoConversionPings.fromJson(core.Map _json) { |
| 12347 if (_json.containsKey("pings")) { |
| 12348 pings = _json["pings"].map((value) => new VideoConversionPing.fromJson(val
ue)).toList(); |
| 12349 } |
| 12350 } |
| 12351 |
| 12352 core.Map toJson() { |
| 12353 var _json = new core.Map(); |
| 12354 if (pings != null) { |
| 12355 _json["pings"] = pings.map((value) => (value).toJson()).toList(); |
| 12356 } |
| 12357 return _json; |
| 12358 } |
| 12359 } |
| 12360 |
| 12361 |
| 12362 /** |
| 12363 * Describes original video file properties, including technical details about |
| 12364 * audio and video streams, but also metadata information like content length, |
| 12365 * digitization time, or geotagging information. |
| 12366 */ |
| 12367 class VideoFileDetails { |
| 12368 /** |
| 12369 * A list of audio streams contained in the uploaded video file. Each item in |
| 12370 * the list contains detailed metadata about an audio stream. |
| 12371 */ |
| 12372 core.List<VideoFileDetailsAudioStream> audioStreams; |
| 12373 |
| 12374 /** |
| 12375 * The uploaded video file's combined (video and audio) bitrate in bits per |
| 12376 * second. |
| 12377 */ |
| 12378 core.String bitrateBps; |
| 12379 |
| 12380 /** The uploaded video file's container format. */ |
| 12381 core.String container; |
| 12382 |
| 12383 /** |
| 12384 * The date and time when the uploaded video file was created. The value is |
| 12385 * specified in ISO 8601 format. Currently, the following ISO 8601 formats are |
| 12386 * supported: |
| 12387 * - Date only: YYYY-MM-DD |
| 12388 * - Naive time: YYYY-MM-DDTHH:MM:SS |
| 12389 * - Time with timezone: YYYY-MM-DDTHH:MM:SS+HH:MM |
| 12390 */ |
| 12391 core.String creationTime; |
| 12392 |
| 12393 /** The length of the uploaded video in milliseconds. */ |
| 12394 core.String durationMs; |
| 12395 |
| 12396 /** |
| 12397 * The uploaded file's name. This field is present whether a video file or |
| 12398 * another type of file was uploaded. |
| 12399 */ |
| 12400 core.String fileName; |
| 12401 |
| 12402 /** |
| 12403 * The uploaded file's size in bytes. This field is present whether a video |
| 12404 * file or another type of file was uploaded. |
| 12405 */ |
| 12406 core.String fileSize; |
| 12407 |
| 12408 /** |
| 12409 * The uploaded file's type as detected by YouTube's video processing engine. |
| 12410 * Currently, YouTube only processes video files, but this field is present |
| 12411 * whether a video file or another type of file was uploaded. |
| 12412 * Possible string values are: |
| 12413 * - "archive" |
| 12414 * - "audio" |
| 12415 * - "document" |
| 12416 * - "image" |
| 12417 * - "other" |
| 12418 * - "project" |
| 12419 * - "video" |
| 12420 */ |
| 12421 core.String fileType; |
| 12422 |
| 12423 /** |
| 12424 * Geographic coordinates that identify the place where the uploaded video was |
| 12425 * recorded. Coordinates are defined using WGS 84. |
| 12426 */ |
| 12427 GeoPoint recordingLocation; |
| 12428 |
| 12429 /** |
| 12430 * A list of video streams contained in the uploaded video file. Each item in |
| 12431 * the list contains detailed metadata about a video stream. |
| 12432 */ |
| 12433 core.List<VideoFileDetailsVideoStream> videoStreams; |
| 12434 |
| 12435 |
| 12436 VideoFileDetails(); |
| 12437 |
| 12438 VideoFileDetails.fromJson(core.Map _json) { |
| 12439 if (_json.containsKey("audioStreams")) { |
| 12440 audioStreams = _json["audioStreams"].map((value) => new VideoFileDetailsAu
dioStream.fromJson(value)).toList(); |
| 12441 } |
| 12442 if (_json.containsKey("bitrateBps")) { |
| 12443 bitrateBps = _json["bitrateBps"]; |
| 12444 } |
| 12445 if (_json.containsKey("container")) { |
| 12446 container = _json["container"]; |
| 12447 } |
| 12448 if (_json.containsKey("creationTime")) { |
| 12449 creationTime = _json["creationTime"]; |
| 12450 } |
| 12451 if (_json.containsKey("durationMs")) { |
| 12452 durationMs = _json["durationMs"]; |
| 12453 } |
| 12454 if (_json.containsKey("fileName")) { |
| 12455 fileName = _json["fileName"]; |
| 12456 } |
| 12457 if (_json.containsKey("fileSize")) { |
| 12458 fileSize = _json["fileSize"]; |
| 12459 } |
| 12460 if (_json.containsKey("fileType")) { |
| 12461 fileType = _json["fileType"]; |
| 12462 } |
| 12463 if (_json.containsKey("recordingLocation")) { |
| 12464 recordingLocation = new GeoPoint.fromJson(_json["recordingLocation"]); |
| 12465 } |
| 12466 if (_json.containsKey("videoStreams")) { |
| 12467 videoStreams = _json["videoStreams"].map((value) => new VideoFileDetailsVi
deoStream.fromJson(value)).toList(); |
| 12468 } |
| 12469 } |
| 12470 |
| 12471 core.Map toJson() { |
| 12472 var _json = new core.Map(); |
| 12473 if (audioStreams != null) { |
| 12474 _json["audioStreams"] = audioStreams.map((value) => (value).toJson()).toLi
st(); |
| 12475 } |
| 12476 if (bitrateBps != null) { |
| 12477 _json["bitrateBps"] = bitrateBps; |
| 12478 } |
| 12479 if (container != null) { |
| 12480 _json["container"] = container; |
| 12481 } |
| 12482 if (creationTime != null) { |
| 12483 _json["creationTime"] = creationTime; |
| 12484 } |
| 12485 if (durationMs != null) { |
| 12486 _json["durationMs"] = durationMs; |
| 12487 } |
| 12488 if (fileName != null) { |
| 12489 _json["fileName"] = fileName; |
| 12490 } |
| 12491 if (fileSize != null) { |
| 12492 _json["fileSize"] = fileSize; |
| 12493 } |
| 12494 if (fileType != null) { |
| 12495 _json["fileType"] = fileType; |
| 12496 } |
| 12497 if (recordingLocation != null) { |
| 12498 _json["recordingLocation"] = (recordingLocation).toJson(); |
| 12499 } |
| 12500 if (videoStreams != null) { |
| 12501 _json["videoStreams"] = videoStreams.map((value) => (value).toJson()).toLi
st(); |
| 12502 } |
| 12503 return _json; |
| 12504 } |
| 12505 } |
| 12506 |
| 12507 |
| 12508 /** Information about an audio stream. */ |
| 12509 class VideoFileDetailsAudioStream { |
| 12510 /** The audio stream's bitrate, in bits per second. */ |
| 12511 core.String bitrateBps; |
| 12512 |
| 12513 /** The number of audio channels that the stream contains. */ |
| 12514 core.int channelCount; |
| 12515 |
| 12516 /** The audio codec that the stream uses. */ |
| 12517 core.String codec; |
| 12518 |
| 12519 /** |
| 12520 * A value that uniquely identifies a video vendor. Typically, the value is a |
| 12521 * four-letter vendor code. |
| 12522 */ |
| 12523 core.String vendor; |
| 12524 |
| 12525 |
| 12526 VideoFileDetailsAudioStream(); |
| 12527 |
| 12528 VideoFileDetailsAudioStream.fromJson(core.Map _json) { |
| 12529 if (_json.containsKey("bitrateBps")) { |
| 12530 bitrateBps = _json["bitrateBps"]; |
| 12531 } |
| 12532 if (_json.containsKey("channelCount")) { |
| 12533 channelCount = _json["channelCount"]; |
| 12534 } |
| 12535 if (_json.containsKey("codec")) { |
| 12536 codec = _json["codec"]; |
| 12537 } |
| 12538 if (_json.containsKey("vendor")) { |
| 12539 vendor = _json["vendor"]; |
| 12540 } |
| 12541 } |
| 12542 |
| 12543 core.Map toJson() { |
| 12544 var _json = new core.Map(); |
| 12545 if (bitrateBps != null) { |
| 12546 _json["bitrateBps"] = bitrateBps; |
| 12547 } |
| 12548 if (channelCount != null) { |
| 12549 _json["channelCount"] = channelCount; |
| 12550 } |
| 12551 if (codec != null) { |
| 12552 _json["codec"] = codec; |
| 12553 } |
| 12554 if (vendor != null) { |
| 12555 _json["vendor"] = vendor; |
| 12556 } |
| 12557 return _json; |
| 12558 } |
| 12559 } |
| 12560 |
| 12561 |
| 12562 /** Information about a video stream. */ |
| 12563 class VideoFileDetailsVideoStream { |
| 12564 /** |
| 12565 * The video content's display aspect ratio, which specifies the aspect ratio |
| 12566 * in which the video should be displayed. |
| 12567 */ |
| 12568 core.double aspectRatio; |
| 12569 |
| 12570 /** The video stream's bitrate, in bits per second. */ |
| 12571 core.String bitrateBps; |
| 12572 |
| 12573 /** The video codec that the stream uses. */ |
| 12574 core.String codec; |
| 12575 |
| 12576 /** The video stream's frame rate, in frames per second. */ |
| 12577 core.double frameRateFps; |
| 12578 |
| 12579 /** The encoded video content's height in pixels. */ |
| 12580 core.int heightPixels; |
| 12581 |
| 12582 /** |
| 12583 * The amount that YouTube needs to rotate the original source content to |
| 12584 * properly display the video. |
| 12585 * Possible string values are: |
| 12586 * - "clockwise" |
| 12587 * - "counterClockwise" |
| 12588 * - "none" |
| 12589 * - "other" |
| 12590 * - "upsideDown" |
| 12591 */ |
| 12592 core.String rotation; |
| 12593 |
| 12594 /** |
| 12595 * A value that uniquely identifies a video vendor. Typically, the value is a |
| 12596 * four-letter vendor code. |
| 12597 */ |
| 12598 core.String vendor; |
| 12599 |
| 12600 /** |
| 12601 * The encoded video content's width in pixels. You can calculate the video's |
| 12602 * encoding aspect ratio as width_pixels / height_pixels. |
| 12603 */ |
| 12604 core.int widthPixels; |
| 12605 |
| 12606 |
| 12607 VideoFileDetailsVideoStream(); |
| 12608 |
| 12609 VideoFileDetailsVideoStream.fromJson(core.Map _json) { |
| 12610 if (_json.containsKey("aspectRatio")) { |
| 12611 aspectRatio = _json["aspectRatio"]; |
| 12612 } |
| 12613 if (_json.containsKey("bitrateBps")) { |
| 12614 bitrateBps = _json["bitrateBps"]; |
| 12615 } |
| 12616 if (_json.containsKey("codec")) { |
| 12617 codec = _json["codec"]; |
| 12618 } |
| 12619 if (_json.containsKey("frameRateFps")) { |
| 12620 frameRateFps = _json["frameRateFps"]; |
| 12621 } |
| 12622 if (_json.containsKey("heightPixels")) { |
| 12623 heightPixels = _json["heightPixels"]; |
| 12624 } |
| 12625 if (_json.containsKey("rotation")) { |
| 12626 rotation = _json["rotation"]; |
| 12627 } |
| 12628 if (_json.containsKey("vendor")) { |
| 12629 vendor = _json["vendor"]; |
| 12630 } |
| 12631 if (_json.containsKey("widthPixels")) { |
| 12632 widthPixels = _json["widthPixels"]; |
| 12633 } |
| 12634 } |
| 12635 |
| 12636 core.Map toJson() { |
| 12637 var _json = new core.Map(); |
| 12638 if (aspectRatio != null) { |
| 12639 _json["aspectRatio"] = aspectRatio; |
| 12640 } |
| 12641 if (bitrateBps != null) { |
| 12642 _json["bitrateBps"] = bitrateBps; |
| 12643 } |
| 12644 if (codec != null) { |
| 12645 _json["codec"] = codec; |
| 12646 } |
| 12647 if (frameRateFps != null) { |
| 12648 _json["frameRateFps"] = frameRateFps; |
| 12649 } |
| 12650 if (heightPixels != null) { |
| 12651 _json["heightPixels"] = heightPixels; |
| 12652 } |
| 12653 if (rotation != null) { |
| 12654 _json["rotation"] = rotation; |
| 12655 } |
| 12656 if (vendor != null) { |
| 12657 _json["vendor"] = vendor; |
| 12658 } |
| 12659 if (widthPixels != null) { |
| 12660 _json["widthPixels"] = widthPixels; |
| 12661 } |
| 12662 return _json; |
| 12663 } |
| 12664 } |
| 12665 |
| 12666 |
| 12667 /** Not documented yet. */ |
| 12668 class VideoGetRatingResponse { |
| 12669 /** Etag of this resource. */ |
| 12670 core.String etag; |
| 12671 |
| 12672 /** A list of ratings that match the request criteria. */ |
| 12673 core.List<VideoRating> items; |
| 12674 |
| 12675 /** |
| 12676 * Identifies what kind of resource this is. Value: the fixed string |
| 12677 * "youtube#videoGetRatingResponse". |
| 12678 */ |
| 12679 core.String kind; |
| 12680 |
| 12681 |
| 12682 VideoGetRatingResponse(); |
| 12683 |
| 12684 VideoGetRatingResponse.fromJson(core.Map _json) { |
| 12685 if (_json.containsKey("etag")) { |
| 12686 etag = _json["etag"]; |
| 12687 } |
| 12688 if (_json.containsKey("items")) { |
| 12689 items = _json["items"].map((value) => new VideoRating.fromJson(value)).toL
ist(); |
| 12690 } |
| 12691 if (_json.containsKey("kind")) { |
| 12692 kind = _json["kind"]; |
| 12693 } |
| 12694 } |
| 12695 |
| 12696 core.Map toJson() { |
| 12697 var _json = new core.Map(); |
| 12698 if (etag != null) { |
| 12699 _json["etag"] = etag; |
| 12700 } |
| 12701 if (items != null) { |
| 12702 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 12703 } |
| 12704 if (kind != null) { |
| 12705 _json["kind"] = kind; |
| 12706 } |
| 12707 return _json; |
| 12708 } |
| 12709 } |
| 12710 |
| 12711 |
| 12712 /** Not documented yet. */ |
| 12713 class VideoListResponse { |
| 12714 /** Etag of this resource. */ |
| 12715 core.String etag; |
| 12716 |
| 12717 /** Serialized EventId of the request which produced this response. */ |
| 12718 core.String eventId; |
| 12719 |
| 12720 /** A list of videos that match the request criteria. */ |
| 12721 core.List<Video> items; |
| 12722 |
| 12723 /** |
| 12724 * Identifies what kind of resource this is. Value: the fixed string |
| 12725 * "youtube#videoListResponse". |
| 12726 */ |
| 12727 core.String kind; |
| 12728 |
| 12729 /** |
| 12730 * The token that can be used as the value of the pageToken parameter to |
| 12731 * retrieve the next page in the result set. |
| 12732 */ |
| 12733 core.String nextPageToken; |
| 12734 |
| 12735 /** Not documented yet. */ |
| 12736 PageInfo pageInfo; |
| 12737 |
| 12738 /** |
| 12739 * The token that can be used as the value of the pageToken parameter to |
| 12740 * retrieve the previous page in the result set. |
| 12741 */ |
| 12742 core.String prevPageToken; |
| 12743 |
| 12744 /** Not documented yet. */ |
| 12745 TokenPagination tokenPagination; |
| 12746 |
| 12747 /** The visitorId identifies the visitor. */ |
| 12748 core.String visitorId; |
| 12749 |
| 12750 |
| 12751 VideoListResponse(); |
| 12752 |
| 12753 VideoListResponse.fromJson(core.Map _json) { |
| 12754 if (_json.containsKey("etag")) { |
| 12755 etag = _json["etag"]; |
| 12756 } |
| 12757 if (_json.containsKey("eventId")) { |
| 12758 eventId = _json["eventId"]; |
| 12759 } |
| 12760 if (_json.containsKey("items")) { |
| 12761 items = _json["items"].map((value) => new Video.fromJson(value)).toList(); |
| 12762 } |
| 12763 if (_json.containsKey("kind")) { |
| 12764 kind = _json["kind"]; |
| 12765 } |
| 12766 if (_json.containsKey("nextPageToken")) { |
| 12767 nextPageToken = _json["nextPageToken"]; |
| 12768 } |
| 12769 if (_json.containsKey("pageInfo")) { |
| 12770 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 12771 } |
| 12772 if (_json.containsKey("prevPageToken")) { |
| 12773 prevPageToken = _json["prevPageToken"]; |
| 12774 } |
| 12775 if (_json.containsKey("tokenPagination")) { |
| 12776 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 12777 } |
| 12778 if (_json.containsKey("visitorId")) { |
| 12779 visitorId = _json["visitorId"]; |
| 12780 } |
| 12781 } |
| 12782 |
| 12783 core.Map toJson() { |
| 12784 var _json = new core.Map(); |
| 12785 if (etag != null) { |
| 12786 _json["etag"] = etag; |
| 12787 } |
| 12788 if (eventId != null) { |
| 12789 _json["eventId"] = eventId; |
| 12790 } |
| 12791 if (items != null) { |
| 12792 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 12793 } |
| 12794 if (kind != null) { |
| 12795 _json["kind"] = kind; |
| 12796 } |
| 12797 if (nextPageToken != null) { |
| 12798 _json["nextPageToken"] = nextPageToken; |
| 12799 } |
| 12800 if (pageInfo != null) { |
| 12801 _json["pageInfo"] = (pageInfo).toJson(); |
| 12802 } |
| 12803 if (prevPageToken != null) { |
| 12804 _json["prevPageToken"] = prevPageToken; |
| 12805 } |
| 12806 if (tokenPagination != null) { |
| 12807 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 12808 } |
| 12809 if (visitorId != null) { |
| 12810 _json["visitorId"] = visitorId; |
| 12811 } |
| 12812 return _json; |
| 12813 } |
| 12814 } |
| 12815 |
| 12816 |
| 12817 /** Details about the live streaming metadata. */ |
| 12818 class VideoLiveStreamingDetails { |
| 12819 /** |
| 12820 * The time that the broadcast actually ended. The value is specified in ISO |
| 12821 * 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. This value will not be available |
| 12822 * until the broadcast is over. |
| 12823 */ |
| 12824 core.DateTime actualEndTime; |
| 12825 |
| 12826 /** |
| 12827 * The time that the broadcast actually started. The value is specified in ISO |
| 12828 * 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. This value will not be available |
| 12829 * until the broadcast begins. |
| 12830 */ |
| 12831 core.DateTime actualStartTime; |
| 12832 |
| 12833 /** |
| 12834 * The number of viewers currently watching the broadcast. The property and |
| 12835 * its value will be present if the broadcast has current viewers and the |
| 12836 * broadcast owner has not hidden the viewcount for the video. Note that |
| 12837 * YouTube stops tracking the number of concurrent viewers for a broadcast |
| 12838 * when the broadcast ends. So, this property would not identify the number of |
| 12839 * viewers watching an archived video of a live broadcast that already ended. |
| 12840 */ |
| 12841 core.String concurrentViewers; |
| 12842 |
| 12843 /** |
| 12844 * The time that the broadcast is scheduled to end. The value is specified in |
| 12845 * ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. If the value is empty or the |
| 12846 * property is not present, then the broadcast is scheduled to continue |
| 12847 * indefinitely. |
| 12848 */ |
| 12849 core.DateTime scheduledEndTime; |
| 12850 |
| 12851 /** |
| 12852 * The time that the broadcast is scheduled to begin. The value is specified |
| 12853 * in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 12854 */ |
| 12855 core.DateTime scheduledStartTime; |
| 12856 |
| 12857 |
| 12858 VideoLiveStreamingDetails(); |
| 12859 |
| 12860 VideoLiveStreamingDetails.fromJson(core.Map _json) { |
| 12861 if (_json.containsKey("actualEndTime")) { |
| 12862 actualEndTime = core.DateTime.parse(_json["actualEndTime"]); |
| 12863 } |
| 12864 if (_json.containsKey("actualStartTime")) { |
| 12865 actualStartTime = core.DateTime.parse(_json["actualStartTime"]); |
| 12866 } |
| 12867 if (_json.containsKey("concurrentViewers")) { |
| 12868 concurrentViewers = _json["concurrentViewers"]; |
| 12869 } |
| 12870 if (_json.containsKey("scheduledEndTime")) { |
| 12871 scheduledEndTime = core.DateTime.parse(_json["scheduledEndTime"]); |
| 12872 } |
| 12873 if (_json.containsKey("scheduledStartTime")) { |
| 12874 scheduledStartTime = core.DateTime.parse(_json["scheduledStartTime"]); |
| 12875 } |
| 12876 } |
| 12877 |
| 12878 core.Map toJson() { |
| 12879 var _json = new core.Map(); |
| 12880 if (actualEndTime != null) { |
| 12881 _json["actualEndTime"] = (actualEndTime).toIso8601String(); |
| 12882 } |
| 12883 if (actualStartTime != null) { |
| 12884 _json["actualStartTime"] = (actualStartTime).toIso8601String(); |
| 12885 } |
| 12886 if (concurrentViewers != null) { |
| 12887 _json["concurrentViewers"] = concurrentViewers; |
| 12888 } |
| 12889 if (scheduledEndTime != null) { |
| 12890 _json["scheduledEndTime"] = (scheduledEndTime).toIso8601String(); |
| 12891 } |
| 12892 if (scheduledStartTime != null) { |
| 12893 _json["scheduledStartTime"] = (scheduledStartTime).toIso8601String(); |
| 12894 } |
| 12895 return _json; |
| 12896 } |
| 12897 } |
| 12898 |
| 12899 |
| 12900 /** Details about monetization of a YouTube Video. */ |
| 12901 class VideoMonetizationDetails { |
| 12902 /** |
| 12903 * The value of access indicates whether the video can be monetized or not. |
| 12904 */ |
| 12905 AccessPolicy access; |
| 12906 |
| 12907 |
| 12908 VideoMonetizationDetails(); |
| 12909 |
| 12910 VideoMonetizationDetails.fromJson(core.Map _json) { |
| 12911 if (_json.containsKey("access")) { |
| 12912 access = new AccessPolicy.fromJson(_json["access"]); |
| 12913 } |
| 12914 } |
| 12915 |
| 12916 core.Map toJson() { |
| 12917 var _json = new core.Map(); |
| 12918 if (access != null) { |
| 12919 _json["access"] = (access).toJson(); |
| 12920 } |
| 12921 return _json; |
| 12922 } |
| 12923 } |
| 12924 |
| 12925 |
| 12926 /** Player to be used for a video playback. */ |
| 12927 class VideoPlayer { |
| 12928 /** An <iframe> tag that embeds a player that will play the video. */ |
| 12929 core.String embedHtml; |
| 12930 |
| 12931 |
| 12932 VideoPlayer(); |
| 12933 |
| 12934 VideoPlayer.fromJson(core.Map _json) { |
| 12935 if (_json.containsKey("embedHtml")) { |
| 12936 embedHtml = _json["embedHtml"]; |
| 12937 } |
| 12938 } |
| 12939 |
| 12940 core.Map toJson() { |
| 12941 var _json = new core.Map(); |
| 12942 if (embedHtml != null) { |
| 12943 _json["embedHtml"] = embedHtml; |
| 12944 } |
| 12945 return _json; |
| 12946 } |
| 12947 } |
| 12948 |
| 12949 |
| 12950 /** |
| 12951 * Describes processing status and progress and availability of some other Video |
| 12952 * resource parts. |
| 12953 */ |
| 12954 class VideoProcessingDetails { |
| 12955 /** |
| 12956 * This value indicates whether video editing suggestions, which might improve |
| 12957 * video quality or the playback experience, are available for the video. You |
| 12958 * can retrieve these suggestions by requesting the suggestions part in your |
| 12959 * videos.list() request. |
| 12960 */ |
| 12961 core.String editorSuggestionsAvailability; |
| 12962 |
| 12963 /** |
| 12964 * This value indicates whether file details are available for the uploaded |
| 12965 * video. You can retrieve a video's file details by requesting the |
| 12966 * fileDetails part in your videos.list() request. |
| 12967 */ |
| 12968 core.String fileDetailsAvailability; |
| 12969 |
| 12970 /** |
| 12971 * The reason that YouTube failed to process the video. This property will |
| 12972 * only have a value if the processingStatus property's value is failed. |
| 12973 * Possible string values are: |
| 12974 * - "other" |
| 12975 * - "streamingFailed" |
| 12976 * - "transcodeFailed" |
| 12977 * - "uploadFailed" |
| 12978 */ |
| 12979 core.String processingFailureReason; |
| 12980 |
| 12981 /** |
| 12982 * This value indicates whether the video processing engine has generated |
| 12983 * suggestions that might improve YouTube's ability to process the the video, |
| 12984 * warnings that explain video processing problems, or errors that cause video |
| 12985 * processing problems. You can retrieve these suggestions by requesting the |
| 12986 * suggestions part in your videos.list() request. |
| 12987 */ |
| 12988 core.String processingIssuesAvailability; |
| 12989 |
| 12990 /** |
| 12991 * The processingProgress object contains information about the progress |
| 12992 * YouTube has made in processing the video. The values are really only |
| 12993 * relevant if the video's processing status is processing. |
| 12994 */ |
| 12995 VideoProcessingDetailsProcessingProgress processingProgress; |
| 12996 |
| 12997 /** |
| 12998 * The video's processing status. This value indicates whether YouTube was |
| 12999 * able to process the video or if the video is still being processed. |
| 13000 * Possible string values are: |
| 13001 * - "failed" |
| 13002 * - "processing" |
| 13003 * - "succeeded" |
| 13004 * - "terminated" |
| 13005 */ |
| 13006 core.String processingStatus; |
| 13007 |
| 13008 /** |
| 13009 * This value indicates whether keyword (tag) suggestions are available for |
| 13010 * the video. Tags can be added to a video's metadata to make it easier for |
| 13011 * other users to find the video. You can retrieve these suggestions by |
| 13012 * requesting the suggestions part in your videos.list() request. |
| 13013 */ |
| 13014 core.String tagSuggestionsAvailability; |
| 13015 |
| 13016 /** |
| 13017 * This value indicates whether thumbnail images have been generated for the |
| 13018 * video. |
| 13019 */ |
| 13020 core.String thumbnailsAvailability; |
| 13021 |
| 13022 |
| 13023 VideoProcessingDetails(); |
| 13024 |
| 13025 VideoProcessingDetails.fromJson(core.Map _json) { |
| 13026 if (_json.containsKey("editorSuggestionsAvailability")) { |
| 13027 editorSuggestionsAvailability = _json["editorSuggestionsAvailability"]; |
| 13028 } |
| 13029 if (_json.containsKey("fileDetailsAvailability")) { |
| 13030 fileDetailsAvailability = _json["fileDetailsAvailability"]; |
| 13031 } |
| 13032 if (_json.containsKey("processingFailureReason")) { |
| 13033 processingFailureReason = _json["processingFailureReason"]; |
| 13034 } |
| 13035 if (_json.containsKey("processingIssuesAvailability")) { |
| 13036 processingIssuesAvailability = _json["processingIssuesAvailability"]; |
| 13037 } |
| 13038 if (_json.containsKey("processingProgress")) { |
| 13039 processingProgress = new VideoProcessingDetailsProcessingProgress.fromJson
(_json["processingProgress"]); |
| 13040 } |
| 13041 if (_json.containsKey("processingStatus")) { |
| 13042 processingStatus = _json["processingStatus"]; |
| 13043 } |
| 13044 if (_json.containsKey("tagSuggestionsAvailability")) { |
| 13045 tagSuggestionsAvailability = _json["tagSuggestionsAvailability"]; |
| 13046 } |
| 13047 if (_json.containsKey("thumbnailsAvailability")) { |
| 13048 thumbnailsAvailability = _json["thumbnailsAvailability"]; |
| 13049 } |
| 13050 } |
| 13051 |
| 13052 core.Map toJson() { |
| 13053 var _json = new core.Map(); |
| 13054 if (editorSuggestionsAvailability != null) { |
| 13055 _json["editorSuggestionsAvailability"] = editorSuggestionsAvailability; |
| 13056 } |
| 13057 if (fileDetailsAvailability != null) { |
| 13058 _json["fileDetailsAvailability"] = fileDetailsAvailability; |
| 13059 } |
| 13060 if (processingFailureReason != null) { |
| 13061 _json["processingFailureReason"] = processingFailureReason; |
| 13062 } |
| 13063 if (processingIssuesAvailability != null) { |
| 13064 _json["processingIssuesAvailability"] = processingIssuesAvailability; |
| 13065 } |
| 13066 if (processingProgress != null) { |
| 13067 _json["processingProgress"] = (processingProgress).toJson(); |
| 13068 } |
| 13069 if (processingStatus != null) { |
| 13070 _json["processingStatus"] = processingStatus; |
| 13071 } |
| 13072 if (tagSuggestionsAvailability != null) { |
| 13073 _json["tagSuggestionsAvailability"] = tagSuggestionsAvailability; |
| 13074 } |
| 13075 if (thumbnailsAvailability != null) { |
| 13076 _json["thumbnailsAvailability"] = thumbnailsAvailability; |
| 13077 } |
| 13078 return _json; |
| 13079 } |
| 13080 } |
| 13081 |
| 13082 |
| 13083 /** Video processing progress and completion time estimate. */ |
| 13084 class VideoProcessingDetailsProcessingProgress { |
| 13085 /** |
| 13086 * The number of parts of the video that YouTube has already processed. You |
| 13087 * can estimate the percentage of the video that YouTube has already processed |
| 13088 * by calculating: |
| 13089 * 100 * parts_processed / parts_total |
| 13090 * |
| 13091 * Note that since the estimated number of parts could increase without a |
| 13092 * corresponding increase in the number of parts that have already been |
| 13093 * processed, it is possible that the calculated progress could periodically |
| 13094 * decrease while YouTube processes a video. |
| 13095 */ |
| 13096 core.String partsProcessed; |
| 13097 |
| 13098 /** |
| 13099 * An estimate of the total number of parts that need to be processed for the |
| 13100 * video. The number may be updated with more precise estimates while YouTube |
| 13101 * processes the video. |
| 13102 */ |
| 13103 core.String partsTotal; |
| 13104 |
| 13105 /** |
| 13106 * An estimate of the amount of time, in millseconds, that YouTube needs to |
| 13107 * finish processing the video. |
| 13108 */ |
| 13109 core.String timeLeftMs; |
| 13110 |
| 13111 |
| 13112 VideoProcessingDetailsProcessingProgress(); |
| 13113 |
| 13114 VideoProcessingDetailsProcessingProgress.fromJson(core.Map _json) { |
| 13115 if (_json.containsKey("partsProcessed")) { |
| 13116 partsProcessed = _json["partsProcessed"]; |
| 13117 } |
| 13118 if (_json.containsKey("partsTotal")) { |
| 13119 partsTotal = _json["partsTotal"]; |
| 13120 } |
| 13121 if (_json.containsKey("timeLeftMs")) { |
| 13122 timeLeftMs = _json["timeLeftMs"]; |
| 13123 } |
| 13124 } |
| 13125 |
| 13126 core.Map toJson() { |
| 13127 var _json = new core.Map(); |
| 13128 if (partsProcessed != null) { |
| 13129 _json["partsProcessed"] = partsProcessed; |
| 13130 } |
| 13131 if (partsTotal != null) { |
| 13132 _json["partsTotal"] = partsTotal; |
| 13133 } |
| 13134 if (timeLeftMs != null) { |
| 13135 _json["timeLeftMs"] = timeLeftMs; |
| 13136 } |
| 13137 return _json; |
| 13138 } |
| 13139 } |
| 13140 |
| 13141 |
| 13142 /** Project specific details about the content of a YouTube Video. */ |
| 13143 class VideoProjectDetails { |
| 13144 /** A list of project tags associated with the video during the upload. */ |
| 13145 core.List<core.String> tags; |
| 13146 |
| 13147 |
| 13148 VideoProjectDetails(); |
| 13149 |
| 13150 VideoProjectDetails.fromJson(core.Map _json) { |
| 13151 if (_json.containsKey("tags")) { |
| 13152 tags = _json["tags"]; |
| 13153 } |
| 13154 } |
| 13155 |
| 13156 core.Map toJson() { |
| 13157 var _json = new core.Map(); |
| 13158 if (tags != null) { |
| 13159 _json["tags"] = tags; |
| 13160 } |
| 13161 return _json; |
| 13162 } |
| 13163 } |
| 13164 |
| 13165 |
| 13166 /** Not documented yet. */ |
| 13167 class VideoRating { |
| 13168 /** |
| 13169 * Not documented yet. |
| 13170 * Possible string values are: |
| 13171 * - "dislike" |
| 13172 * - "like" |
| 13173 * - "none" |
| 13174 * - "unspecified" |
| 13175 */ |
| 13176 core.String rating; |
| 13177 |
| 13178 /** Not documented yet. */ |
| 13179 core.String videoId; |
| 13180 |
| 13181 |
| 13182 VideoRating(); |
| 13183 |
| 13184 VideoRating.fromJson(core.Map _json) { |
| 13185 if (_json.containsKey("rating")) { |
| 13186 rating = _json["rating"]; |
| 13187 } |
| 13188 if (_json.containsKey("videoId")) { |
| 13189 videoId = _json["videoId"]; |
| 13190 } |
| 13191 } |
| 13192 |
| 13193 core.Map toJson() { |
| 13194 var _json = new core.Map(); |
| 13195 if (rating != null) { |
| 13196 _json["rating"] = rating; |
| 13197 } |
| 13198 if (videoId != null) { |
| 13199 _json["videoId"] = videoId; |
| 13200 } |
| 13201 return _json; |
| 13202 } |
| 13203 } |
| 13204 |
| 13205 |
| 13206 /** Recording information associated with the video. */ |
| 13207 class VideoRecordingDetails { |
| 13208 /** The geolocation information associated with the video. */ |
| 13209 GeoPoint location; |
| 13210 |
| 13211 /** The text description of the location where the video was recorded. */ |
| 13212 core.String locationDescription; |
| 13213 |
| 13214 /** |
| 13215 * The date and time when the video was recorded. The value is specified in |
| 13216 * ISO 8601 (YYYY-MM-DDThh:mm:ss.sssZ) format. |
| 13217 */ |
| 13218 core.DateTime recordingDate; |
| 13219 |
| 13220 |
| 13221 VideoRecordingDetails(); |
| 13222 |
| 13223 VideoRecordingDetails.fromJson(core.Map _json) { |
| 13224 if (_json.containsKey("location")) { |
| 13225 location = new GeoPoint.fromJson(_json["location"]); |
| 13226 } |
| 13227 if (_json.containsKey("locationDescription")) { |
| 13228 locationDescription = _json["locationDescription"]; |
| 13229 } |
| 13230 if (_json.containsKey("recordingDate")) { |
| 13231 recordingDate = core.DateTime.parse(_json["recordingDate"]); |
| 13232 } |
| 13233 } |
| 13234 |
| 13235 core.Map toJson() { |
| 13236 var _json = new core.Map(); |
| 13237 if (location != null) { |
| 13238 _json["location"] = (location).toJson(); |
| 13239 } |
| 13240 if (locationDescription != null) { |
| 13241 _json["locationDescription"] = locationDescription; |
| 13242 } |
| 13243 if (recordingDate != null) { |
| 13244 _json["recordingDate"] = (recordingDate).toIso8601String(); |
| 13245 } |
| 13246 return _json; |
| 13247 } |
| 13248 } |
| 13249 |
| 13250 |
| 13251 /** |
| 13252 * Basic details about a video, including title, description, uploader, |
| 13253 * thumbnails and category. |
| 13254 */ |
| 13255 class VideoSnippet { |
| 13256 /** The YouTube video category associated with the video. */ |
| 13257 core.String categoryId; |
| 13258 |
| 13259 /** |
| 13260 * The ID that YouTube uses to uniquely identify the channel that the video |
| 13261 * was uploaded to. |
| 13262 */ |
| 13263 core.String channelId; |
| 13264 |
| 13265 /** Channel title for the channel that the video belongs to. */ |
| 13266 core.String channelTitle; |
| 13267 |
| 13268 /** The video's description. */ |
| 13269 core.String description; |
| 13270 |
| 13271 /** |
| 13272 * Indicates if the video is an upcoming/active live broadcast. Or it's "none" |
| 13273 * if the video is not an upcoming/active live broadcast. |
| 13274 * Possible string values are: |
| 13275 * - "live" |
| 13276 * - "none" |
| 13277 * - "upcoming" |
| 13278 */ |
| 13279 core.String liveBroadcastContent; |
| 13280 |
| 13281 /** |
| 13282 * The date and time that the video was uploaded. The value is specified in |
| 13283 * ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 13284 */ |
| 13285 core.DateTime publishedAt; |
| 13286 |
| 13287 /** |
| 13288 * A list of keyword tags associated with the video. Tags may contain spaces. |
| 13289 * This field is only visible to the video's uploader. |
| 13290 */ |
| 13291 core.List<core.String> tags; |
| 13292 |
| 13293 /** |
| 13294 * A map of thumbnail images associated with the video. For each object in the |
| 13295 * map, the key is the name of the thumbnail image, and the value is an object |
| 13296 * that contains other information about the thumbnail. |
| 13297 */ |
| 13298 ThumbnailDetails thumbnails; |
| 13299 |
| 13300 /** The video's title. */ |
| 13301 core.String title; |
| 13302 |
| 13303 |
| 13304 VideoSnippet(); |
| 13305 |
| 13306 VideoSnippet.fromJson(core.Map _json) { |
| 13307 if (_json.containsKey("categoryId")) { |
| 13308 categoryId = _json["categoryId"]; |
| 13309 } |
| 13310 if (_json.containsKey("channelId")) { |
| 13311 channelId = _json["channelId"]; |
| 13312 } |
| 13313 if (_json.containsKey("channelTitle")) { |
| 13314 channelTitle = _json["channelTitle"]; |
| 13315 } |
| 13316 if (_json.containsKey("description")) { |
| 13317 description = _json["description"]; |
| 13318 } |
| 13319 if (_json.containsKey("liveBroadcastContent")) { |
| 13320 liveBroadcastContent = _json["liveBroadcastContent"]; |
| 13321 } |
| 13322 if (_json.containsKey("publishedAt")) { |
| 13323 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 13324 } |
| 13325 if (_json.containsKey("tags")) { |
| 13326 tags = _json["tags"]; |
| 13327 } |
| 13328 if (_json.containsKey("thumbnails")) { |
| 13329 thumbnails = new ThumbnailDetails.fromJson(_json["thumbnails"]); |
| 13330 } |
| 13331 if (_json.containsKey("title")) { |
| 13332 title = _json["title"]; |
| 13333 } |
| 13334 } |
| 13335 |
| 13336 core.Map toJson() { |
| 13337 var _json = new core.Map(); |
| 13338 if (categoryId != null) { |
| 13339 _json["categoryId"] = categoryId; |
| 13340 } |
| 13341 if (channelId != null) { |
| 13342 _json["channelId"] = channelId; |
| 13343 } |
| 13344 if (channelTitle != null) { |
| 13345 _json["channelTitle"] = channelTitle; |
| 13346 } |
| 13347 if (description != null) { |
| 13348 _json["description"] = description; |
| 13349 } |
| 13350 if (liveBroadcastContent != null) { |
| 13351 _json["liveBroadcastContent"] = liveBroadcastContent; |
| 13352 } |
| 13353 if (publishedAt != null) { |
| 13354 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 13355 } |
| 13356 if (tags != null) { |
| 13357 _json["tags"] = tags; |
| 13358 } |
| 13359 if (thumbnails != null) { |
| 13360 _json["thumbnails"] = (thumbnails).toJson(); |
| 13361 } |
| 13362 if (title != null) { |
| 13363 _json["title"] = title; |
| 13364 } |
| 13365 return _json; |
| 13366 } |
| 13367 } |
| 13368 |
| 13369 |
| 13370 /** |
| 13371 * Statistics about the video, such as the number of times the video was viewed |
| 13372 * or liked. |
| 13373 */ |
| 13374 class VideoStatistics { |
| 13375 /** The number of comments for the video. */ |
| 13376 core.String commentCount; |
| 13377 |
| 13378 /** |
| 13379 * The number of users who have indicated that they disliked the video by |
| 13380 * giving it a negative rating. |
| 13381 */ |
| 13382 core.String dislikeCount; |
| 13383 |
| 13384 /** |
| 13385 * The number of users who currently have the video marked as a favorite |
| 13386 * video. |
| 13387 */ |
| 13388 core.String favoriteCount; |
| 13389 |
| 13390 /** |
| 13391 * The number of users who have indicated that they liked the video by giving |
| 13392 * it a positive rating. |
| 13393 */ |
| 13394 core.String likeCount; |
| 13395 |
| 13396 /** The number of times the video has been viewed. */ |
| 13397 core.String viewCount; |
| 13398 |
| 13399 |
| 13400 VideoStatistics(); |
| 13401 |
| 13402 VideoStatistics.fromJson(core.Map _json) { |
| 13403 if (_json.containsKey("commentCount")) { |
| 13404 commentCount = _json["commentCount"]; |
| 13405 } |
| 13406 if (_json.containsKey("dislikeCount")) { |
| 13407 dislikeCount = _json["dislikeCount"]; |
| 13408 } |
| 13409 if (_json.containsKey("favoriteCount")) { |
| 13410 favoriteCount = _json["favoriteCount"]; |
| 13411 } |
| 13412 if (_json.containsKey("likeCount")) { |
| 13413 likeCount = _json["likeCount"]; |
| 13414 } |
| 13415 if (_json.containsKey("viewCount")) { |
| 13416 viewCount = _json["viewCount"]; |
| 13417 } |
| 13418 } |
| 13419 |
| 13420 core.Map toJson() { |
| 13421 var _json = new core.Map(); |
| 13422 if (commentCount != null) { |
| 13423 _json["commentCount"] = commentCount; |
| 13424 } |
| 13425 if (dislikeCount != null) { |
| 13426 _json["dislikeCount"] = dislikeCount; |
| 13427 } |
| 13428 if (favoriteCount != null) { |
| 13429 _json["favoriteCount"] = favoriteCount; |
| 13430 } |
| 13431 if (likeCount != null) { |
| 13432 _json["likeCount"] = likeCount; |
| 13433 } |
| 13434 if (viewCount != null) { |
| 13435 _json["viewCount"] = viewCount; |
| 13436 } |
| 13437 return _json; |
| 13438 } |
| 13439 } |
| 13440 |
| 13441 |
| 13442 /** Basic details about a video category, such as its localized title. */ |
| 13443 class VideoStatus { |
| 13444 /** This value indicates if the video can be embedded on another website. */ |
| 13445 core.bool embeddable; |
| 13446 |
| 13447 /** |
| 13448 * This value explains why a video failed to upload. This property is only |
| 13449 * present if the uploadStatus property indicates that the upload failed. |
| 13450 * Possible string values are: |
| 13451 * - "codec" |
| 13452 * - "conversion" |
| 13453 * - "emptyFile" |
| 13454 * - "invalidFile" |
| 13455 * - "tooSmall" |
| 13456 * - "uploadAborted" |
| 13457 */ |
| 13458 core.String failureReason; |
| 13459 |
| 13460 /** |
| 13461 * The video's license. |
| 13462 * Possible string values are: |
| 13463 * - "creativeCommon" |
| 13464 * - "youtube" |
| 13465 */ |
| 13466 core.String license; |
| 13467 |
| 13468 /** |
| 13469 * The video's privacy status. |
| 13470 * Possible string values are: |
| 13471 * - "private" |
| 13472 * - "public" |
| 13473 * - "unlisted" |
| 13474 */ |
| 13475 core.String privacyStatus; |
| 13476 |
| 13477 /** |
| 13478 * This value indicates if the extended video statistics on the watch page can |
| 13479 * be viewed by everyone. Note that the view count, likes, etc will still be |
| 13480 * visible if this is disabled. |
| 13481 */ |
| 13482 core.bool publicStatsViewable; |
| 13483 |
| 13484 /** |
| 13485 * The date and time when the video is scheduled to publish. It can be set |
| 13486 * only if the privacy status of the video is private. The value is specified |
| 13487 * in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 13488 */ |
| 13489 core.DateTime publishAt; |
| 13490 |
| 13491 /** |
| 13492 * This value explains why YouTube rejected an uploaded video. This property |
| 13493 * is only present if the uploadStatus property indicates that the upload was |
| 13494 * rejected. |
| 13495 * Possible string values are: |
| 13496 * - "claim" |
| 13497 * - "copyright" |
| 13498 * - "duplicate" |
| 13499 * - "inappropriate" |
| 13500 * - "length" |
| 13501 * - "termsOfUse" |
| 13502 * - "trademark" |
| 13503 * - "uploaderAccountClosed" |
| 13504 * - "uploaderAccountSuspended" |
| 13505 */ |
| 13506 core.String rejectionReason; |
| 13507 |
| 13508 /** |
| 13509 * The status of the uploaded video. |
| 13510 * Possible string values are: |
| 13511 * - "deleted" |
| 13512 * - "failed" |
| 13513 * - "processed" |
| 13514 * - "rejected" |
| 13515 * - "uploaded" |
| 13516 */ |
| 13517 core.String uploadStatus; |
| 13518 |
| 13519 |
| 13520 VideoStatus(); |
| 13521 |
| 13522 VideoStatus.fromJson(core.Map _json) { |
| 13523 if (_json.containsKey("embeddable")) { |
| 13524 embeddable = _json["embeddable"]; |
| 13525 } |
| 13526 if (_json.containsKey("failureReason")) { |
| 13527 failureReason = _json["failureReason"]; |
| 13528 } |
| 13529 if (_json.containsKey("license")) { |
| 13530 license = _json["license"]; |
| 13531 } |
| 13532 if (_json.containsKey("privacyStatus")) { |
| 13533 privacyStatus = _json["privacyStatus"]; |
| 13534 } |
| 13535 if (_json.containsKey("publicStatsViewable")) { |
| 13536 publicStatsViewable = _json["publicStatsViewable"]; |
| 13537 } |
| 13538 if (_json.containsKey("publishAt")) { |
| 13539 publishAt = core.DateTime.parse(_json["publishAt"]); |
| 13540 } |
| 13541 if (_json.containsKey("rejectionReason")) { |
| 13542 rejectionReason = _json["rejectionReason"]; |
| 13543 } |
| 13544 if (_json.containsKey("uploadStatus")) { |
| 13545 uploadStatus = _json["uploadStatus"]; |
| 13546 } |
| 13547 } |
| 13548 |
| 13549 core.Map toJson() { |
| 13550 var _json = new core.Map(); |
| 13551 if (embeddable != null) { |
| 13552 _json["embeddable"] = embeddable; |
| 13553 } |
| 13554 if (failureReason != null) { |
| 13555 _json["failureReason"] = failureReason; |
| 13556 } |
| 13557 if (license != null) { |
| 13558 _json["license"] = license; |
| 13559 } |
| 13560 if (privacyStatus != null) { |
| 13561 _json["privacyStatus"] = privacyStatus; |
| 13562 } |
| 13563 if (publicStatsViewable != null) { |
| 13564 _json["publicStatsViewable"] = publicStatsViewable; |
| 13565 } |
| 13566 if (publishAt != null) { |
| 13567 _json["publishAt"] = (publishAt).toIso8601String(); |
| 13568 } |
| 13569 if (rejectionReason != null) { |
| 13570 _json["rejectionReason"] = rejectionReason; |
| 13571 } |
| 13572 if (uploadStatus != null) { |
| 13573 _json["uploadStatus"] = uploadStatus; |
| 13574 } |
| 13575 return _json; |
| 13576 } |
| 13577 } |
| 13578 |
| 13579 |
| 13580 /** |
| 13581 * Specifies suggestions on how to improve video content, including encoding |
| 13582 * hints, tag suggestions, and editor suggestions. |
| 13583 */ |
| 13584 class VideoSuggestions { |
| 13585 /** |
| 13586 * A list of video editing operations that might improve the video quality or |
| 13587 * playback experience of the uploaded video. |
| 13588 */ |
| 13589 core.List<core.String> editorSuggestions; |
| 13590 |
| 13591 /** |
| 13592 * A list of errors that will prevent YouTube from successfully processing the |
| 13593 * uploaded video video. These errors indicate that, regardless of the video's |
| 13594 * current processing status, eventually, that status will almost certainly be |
| 13595 * failed. |
| 13596 */ |
| 13597 core.List<core.String> processingErrors; |
| 13598 |
| 13599 /** |
| 13600 * A list of suggestions that may improve YouTube's ability to process the |
| 13601 * video. |
| 13602 */ |
| 13603 core.List<core.String> processingHints; |
| 13604 |
| 13605 /** |
| 13606 * A list of reasons why YouTube may have difficulty transcoding the uploaded |
| 13607 * video or that might result in an erroneous transcoding. These warnings are |
| 13608 * generated before YouTube actually processes the uploaded video file. In |
| 13609 * addition, they identify issues that are unlikely to cause the video |
| 13610 * processing to fail but that might cause problems such as sync issues, video |
| 13611 * artifacts, or a missing audio track. |
| 13612 */ |
| 13613 core.List<core.String> processingWarnings; |
| 13614 |
| 13615 /** |
| 13616 * A list of keyword tags that could be added to the video's metadata to |
| 13617 * increase the likelihood that users will locate your video when searching or |
| 13618 * browsing on YouTube. |
| 13619 */ |
| 13620 core.List<VideoSuggestionsTagSuggestion> tagSuggestions; |
| 13621 |
| 13622 |
| 13623 VideoSuggestions(); |
| 13624 |
| 13625 VideoSuggestions.fromJson(core.Map _json) { |
| 13626 if (_json.containsKey("editorSuggestions")) { |
| 13627 editorSuggestions = _json["editorSuggestions"]; |
| 13628 } |
| 13629 if (_json.containsKey("processingErrors")) { |
| 13630 processingErrors = _json["processingErrors"]; |
| 13631 } |
| 13632 if (_json.containsKey("processingHints")) { |
| 13633 processingHints = _json["processingHints"]; |
| 13634 } |
| 13635 if (_json.containsKey("processingWarnings")) { |
| 13636 processingWarnings = _json["processingWarnings"]; |
| 13637 } |
| 13638 if (_json.containsKey("tagSuggestions")) { |
| 13639 tagSuggestions = _json["tagSuggestions"].map((value) => new VideoSuggestio
nsTagSuggestion.fromJson(value)).toList(); |
| 13640 } |
| 13641 } |
| 13642 |
| 13643 core.Map toJson() { |
| 13644 var _json = new core.Map(); |
| 13645 if (editorSuggestions != null) { |
| 13646 _json["editorSuggestions"] = editorSuggestions; |
| 13647 } |
| 13648 if (processingErrors != null) { |
| 13649 _json["processingErrors"] = processingErrors; |
| 13650 } |
| 13651 if (processingHints != null) { |
| 13652 _json["processingHints"] = processingHints; |
| 13653 } |
| 13654 if (processingWarnings != null) { |
| 13655 _json["processingWarnings"] = processingWarnings; |
| 13656 } |
| 13657 if (tagSuggestions != null) { |
| 13658 _json["tagSuggestions"] = tagSuggestions.map((value) => (value).toJson()).
toList(); |
| 13659 } |
| 13660 return _json; |
| 13661 } |
| 13662 } |
| 13663 |
| 13664 |
| 13665 /** A single tag suggestion with it's relevance information. */ |
| 13666 class VideoSuggestionsTagSuggestion { |
| 13667 /** |
| 13668 * A set of video categories for which the tag is relevant. You can use this |
| 13669 * information to display appropriate tag suggestions based on the video |
| 13670 * category that the video uploader associates with the video. By default, tag |
| 13671 * suggestions are relevant for all categories if there are no restricts |
| 13672 * defined for the keyword. |
| 13673 */ |
| 13674 core.List<core.String> categoryRestricts; |
| 13675 |
| 13676 /** The keyword tag suggested for the video. */ |
| 13677 core.String tag; |
| 13678 |
| 13679 |
| 13680 VideoSuggestionsTagSuggestion(); |
| 13681 |
| 13682 VideoSuggestionsTagSuggestion.fromJson(core.Map _json) { |
| 13683 if (_json.containsKey("categoryRestricts")) { |
| 13684 categoryRestricts = _json["categoryRestricts"]; |
| 13685 } |
| 13686 if (_json.containsKey("tag")) { |
| 13687 tag = _json["tag"]; |
| 13688 } |
| 13689 } |
| 13690 |
| 13691 core.Map toJson() { |
| 13692 var _json = new core.Map(); |
| 13693 if (categoryRestricts != null) { |
| 13694 _json["categoryRestricts"] = categoryRestricts; |
| 13695 } |
| 13696 if (tag != null) { |
| 13697 _json["tag"] = tag; |
| 13698 } |
| 13699 return _json; |
| 13700 } |
| 13701 } |
| 13702 |
| 13703 |
| 13704 /** Freebase topic information related to the video. */ |
| 13705 class VideoTopicDetails { |
| 13706 /** |
| 13707 * Similar to topic_id, except that these topics are merely relevant to the |
| 13708 * video. These are topics that may be mentioned in, or appear in the video. |
| 13709 * You can retrieve information about each topic using Freebase Topic API. |
| 13710 */ |
| 13711 core.List<core.String> relevantTopicIds; |
| 13712 |
| 13713 /** |
| 13714 * A list of Freebase topic IDs that are centrally associated with the video. |
| 13715 * These are topics that are centrally featured in the video, and it can be |
| 13716 * said that the video is mainly about each of these. You can retrieve |
| 13717 * information about each topic using the Freebase Topic API. |
| 13718 */ |
| 13719 core.List<core.String> topicIds; |
| 13720 |
| 13721 |
| 13722 VideoTopicDetails(); |
| 13723 |
| 13724 VideoTopicDetails.fromJson(core.Map _json) { |
| 13725 if (_json.containsKey("relevantTopicIds")) { |
| 13726 relevantTopicIds = _json["relevantTopicIds"]; |
| 13727 } |
| 13728 if (_json.containsKey("topicIds")) { |
| 13729 topicIds = _json["topicIds"]; |
| 13730 } |
| 13731 } |
| 13732 |
| 13733 core.Map toJson() { |
| 13734 var _json = new core.Map(); |
| 13735 if (relevantTopicIds != null) { |
| 13736 _json["relevantTopicIds"] = relevantTopicIds; |
| 13737 } |
| 13738 if (topicIds != null) { |
| 13739 _json["topicIds"] = topicIds; |
| 13740 } |
| 13741 return _json; |
| 13742 } |
| 13743 } |
| 13744 |
| 13745 |
| 13746 /** Branding properties for the watch. */ |
| 13747 class WatchSettings { |
| 13748 /** The text color for the video watch page's branded area. */ |
| 13749 core.String backgroundColor; |
| 13750 |
| 13751 /** |
| 13752 * An ID that uniquely identifies a playlist that displays next to the video |
| 13753 * player. |
| 13754 */ |
| 13755 core.String featuredPlaylistId; |
| 13756 |
| 13757 /** The background color for the video watch page's branded area. */ |
| 13758 core.String textColor; |
| 13759 |
| 13760 |
| 13761 WatchSettings(); |
| 13762 |
| 13763 WatchSettings.fromJson(core.Map _json) { |
| 13764 if (_json.containsKey("backgroundColor")) { |
| 13765 backgroundColor = _json["backgroundColor"]; |
| 13766 } |
| 13767 if (_json.containsKey("featuredPlaylistId")) { |
| 13768 featuredPlaylistId = _json["featuredPlaylistId"]; |
| 13769 } |
| 13770 if (_json.containsKey("textColor")) { |
| 13771 textColor = _json["textColor"]; |
| 13772 } |
| 13773 } |
| 13774 |
| 13775 core.Map toJson() { |
| 13776 var _json = new core.Map(); |
| 13777 if (backgroundColor != null) { |
| 13778 _json["backgroundColor"] = backgroundColor; |
| 13779 } |
| 13780 if (featuredPlaylistId != null) { |
| 13781 _json["featuredPlaylistId"] = featuredPlaylistId; |
| 13782 } |
| 13783 if (textColor != null) { |
| 13784 _json["textColor"] = textColor; |
| 13785 } |
| 13786 return _json; |
| 13787 } |
| 13788 } |
| 13789 |
| 13790 |
OLD | NEW |