diff --git a/gen/youtube3/Cargo.toml b/gen/youtube3/Cargo.toml index af76ee32d9..43db71ed5b 100644 --- a/gen/youtube3/Cargo.toml +++ b/gen/youtube3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-youtube3" -version = "4.0.1+20220303" +version = "5.0.2-beta-1+20220303" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/youtube3" homepage = "https://developers.google.com/youtube/" -documentation = "https://docs.rs/google-youtube3/4.0.1+20220303" +documentation = "https://docs.rs/google-youtube3/5.0.2-beta-1+20220303" license = "MIT" keywords = ["youtube", "google", "protocol", "web", "api"] autobins = false @@ -17,13 +17,13 @@ edition = "2018" [dependencies] +anyhow = "^ 1.0" hyper-rustls = "0.23.0" -mime = "^ 0.2.0" -serde = "^ 1.0" +mime = "^ 0.3.0" +serde = { version = "^ 1.0", features = ["derive"] } serde_json = "^ 1.0" -serde_derive = "^ 1.0" -yup-oauth2 = "^ 7.0" itertools = "^ 0.10" +google-apis-common = { path = "../../google-apis-common", version = "5.0.1" } hyper = "^ 0.14" http = "^0.2" tokio = "^1.0" @@ -32,3 +32,6 @@ url = "= 1.7" +[features] +yup-oauth2 = ["google-apis-common/yup-oauth2"] +default = ["yup-oauth2"] diff --git a/gen/youtube3/README.md b/gen/youtube3/README.md index e621c43988..415e0516e0 100644 --- a/gen/youtube3/README.md +++ b/gen/youtube3/README.md @@ -5,88 +5,88 @@ DO NOT EDIT ! --> The `google-youtube3` library allows access to all features of the *Google YouTube* service. -This documentation was generated from *YouTube* crate version *4.0.1+20220303*, where *20220303* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v4.0.1*. +This documentation was generated from *YouTube* crate version *5.0.2-beta-1+20220303*, where *20220303* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.2-beta-1*. Everything else about the *YouTube* *v3* API can be found at the [official documentation site](https://developers.google.com/youtube/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/YouTube) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/YouTube) ... -* [abuse reports](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::AbuseReport) - * [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::AbuseReportInsertCall) -* [activities](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Activity) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ActivityListCall) -* [captions](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Caption) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionDeleteCall), [*download*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionDownloadCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionListCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionUpdateCall) +* [abuse reports](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::AbuseReport) + * [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::AbuseReportInsertCall) +* [activities](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Activity) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ActivityListCall) +* [captions](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Caption) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionDeleteCall), [*download*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionDownloadCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionListCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionUpdateCall) * channel banners - * [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelBannerInsertCall) -* [channel sections](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelSection) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelSectionDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelSectionInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelSectionListCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelSectionUpdateCall) -* [channels](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Channel) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelListCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelUpdateCall) -* [comment threads](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentThread) - * [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentThreadInsertCall) and [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentThreadListCall) -* [comments](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Comment) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentListCall), [*mark as spam*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentMarkAsSpamCall), [*set moderation status*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentSetModerationStatuCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CommentUpdateCall) -* [i18n languages](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::I18nLanguage) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::I18nLanguageListCall) -* [i18n regions](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::I18nRegion) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::I18nRegionListCall) -* [live broadcasts](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveBroadcast) - * [*bind*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveBroadcastBindCall), [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveBroadcastDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveBroadcastInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveBroadcastListCall), [*transition*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveBroadcastTransitionCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveBroadcastUpdateCall) -* [live chat bans](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatBan) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatBanDeleteCall) and [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatBanInsertCall) -* [live chat messages](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatMessage) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatMessageDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatMessageInsertCall) and [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatMessageListCall) -* [live chat moderators](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatModerator) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatModeratorDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatModeratorInsertCall) and [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveChatModeratorListCall) -* [live streams](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveStream) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveStreamDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveStreamInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveStreamListCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::LiveStreamUpdateCall) -* [members](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Member) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::MemberListCall) -* [memberships levels](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::MembershipsLevel) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::MembershipsLevelListCall) -* [playlist items](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistItem) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistItemDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistItemInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistItemListCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistItemUpdateCall) -* [playlists](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Playlist) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistListCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::PlaylistUpdateCall) + * [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelBannerInsertCall) +* [channel sections](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelSection) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelSectionDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelSectionInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelSectionListCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelSectionUpdateCall) +* [channels](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Channel) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelListCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelUpdateCall) +* [comment threads](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentThread) + * [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentThreadInsertCall) and [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentThreadListCall) +* [comments](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Comment) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentListCall), [*mark as spam*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentMarkAsSpamCall), [*set moderation status*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentSetModerationStatuCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CommentUpdateCall) +* [i18n languages](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::I18nLanguage) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::I18nLanguageListCall) +* [i18n regions](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::I18nRegion) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::I18nRegionListCall) +* [live broadcasts](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveBroadcast) + * [*bind*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveBroadcastBindCall), [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveBroadcastDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveBroadcastInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveBroadcastListCall), [*transition*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveBroadcastTransitionCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveBroadcastUpdateCall) +* [live chat bans](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatBan) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatBanDeleteCall) and [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatBanInsertCall) +* [live chat messages](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatMessage) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatMessageDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatMessageInsertCall) and [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatMessageListCall) +* [live chat moderators](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatModerator) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatModeratorDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatModeratorInsertCall) and [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveChatModeratorListCall) +* [live streams](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveStream) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveStreamDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveStreamInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveStreamListCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::LiveStreamUpdateCall) +* [members](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Member) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::MemberListCall) +* [memberships levels](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::MembershipsLevel) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::MembershipsLevelListCall) +* [playlist items](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistItem) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistItemDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistItemInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistItemListCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistItemUpdateCall) +* [playlists](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Playlist) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistListCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::PlaylistUpdateCall) * search - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::SearchListCall) -* [subscriptions](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Subscription) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::SubscriptionDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::SubscriptionInsertCall) and [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::SubscriptionListCall) -* [super chat events](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::SuperChatEvent) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::SuperChatEventListCall) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::SearchListCall) +* [subscriptions](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Subscription) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::SubscriptionDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::SubscriptionInsertCall) and [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::SubscriptionListCall) +* [super chat events](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::SuperChatEvent) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::SuperChatEventListCall) * tests - * [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::TestInsertCall) -* [third party links](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ThirdPartyLink) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ThirdPartyLinkDeleteCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ThirdPartyLinkInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ThirdPartyLinkListCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ThirdPartyLinkUpdateCall) -* [thumbnails](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Thumbnail) - * [*set*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ThumbnailSetCall) -* [video abuse report reasons](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoAbuseReportReason) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoAbuseReportReasonListCall) -* [video categories](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoCategory) - * [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoCategoryListCall) -* [videos](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::Video) - * [*delete*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoDeleteCall), [*get rating*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoGetRatingCall), [*insert*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoInsertCall), [*list*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoListCall), [*rate*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoRateCall), [*report abuse*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoReportAbuseCall) and [*update*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoUpdateCall) + * [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::TestInsertCall) +* [third party links](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ThirdPartyLink) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ThirdPartyLinkDeleteCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ThirdPartyLinkInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ThirdPartyLinkListCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ThirdPartyLinkUpdateCall) +* [thumbnails](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Thumbnail) + * [*set*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ThumbnailSetCall) +* [video abuse report reasons](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoAbuseReportReason) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoAbuseReportReasonListCall) +* [video categories](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoCategory) + * [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoCategoryListCall) +* [videos](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::Video) + * [*delete*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoDeleteCall), [*get rating*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoGetRatingCall), [*insert*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoInsertCall), [*list*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoListCall), [*rate*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoRateCall), [*report abuse*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoReportAbuseCall) and [*update*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoUpdateCall) * watermarks - * [*set*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::WatermarkSetCall) and [*unset*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::WatermarkUnsetCall) + * [*set*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::WatermarkSetCall) and [*unset*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::WatermarkUnsetCall) * youtube - * [*v3 update comment threads*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::YoutubeV3UpdateCommentThreadCall) + * [*v3 update comment threads*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::YoutubeV3UpdateCommentThreadCall) Upload supported by ... -* [*insert captions*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionInsertCall) -* [*update captions*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionUpdateCall) -* [*insert channel banners*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ChannelBannerInsertCall) -* [*set thumbnails*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::ThumbnailSetCall) -* [*insert videos*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::VideoInsertCall) -* [*set watermarks*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::WatermarkSetCall) +* [*insert captions*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionInsertCall) +* [*update captions*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionUpdateCall) +* [*insert channel banners*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ChannelBannerInsertCall) +* [*set thumbnails*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::ThumbnailSetCall) +* [*insert videos*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::VideoInsertCall) +* [*set watermarks*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::WatermarkSetCall) Download supported by ... -* [*download captions*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/api::CaptionDownloadCall) +* [*download captions*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/api::CaptionDownloadCall) @@ -94,17 +94,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/YouTube)** +* **[Hub](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/YouTube)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::MethodsBuilder) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::CallBuilder) -* **[Resources](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Resource)** + * creates [*Method Builders*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::MethodsBuilder) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::CallBuilder) +* **[Resources](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Resource)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Part)** + * **[Parts](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Part)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::CallBuilder)** +* **[Activities](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::CallBuilder)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -153,7 +153,7 @@ extern crate hyper_rustls; extern crate google_youtube3 as youtube3; use youtube3::{Result, Error}; use std::default::Default; -use youtube3::{YouTube, oauth2, hyper, hyper_rustls}; +use youtube3::{YouTube, oauth2, hyper, hyper_rustls, chrono, FieldMask}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. @@ -207,17 +207,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Result) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Result) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. ## Uploads and Downloads -If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Result), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Result), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::ResponseResult), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::ResponseResult), it will return that by default. You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making this call: `.param("alt", "media")`. @@ -227,29 +227,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Delegate) to the -[Method Builder](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::CallBuilder) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Delegate) to the +[Method Builder](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::CallBuilder) before making the final `doit()` call. Respective methods will be called to provide progress information, as well as determine whether the system should retry on failure. -The [delegate trait](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Delegate) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Delegate) is default-implemented, allowing you to customize it with minimal effort. ## Optional Parts in Server-Requests -All structures provided by this library are made to be [encodable](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::RequestValue) and -[decodable](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [encodable](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::RequestValue) and +[decodable](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::Part) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::Part) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods. These will always take a single argument, for which the following statements are true. * [PODs][wiki-pod] are handed by copy * strings are passed as `&str` -* [request values](https://docs.rs/google-youtube3/4.0.1+20220303/google_youtube3/client::RequestValue) are moved +* [request values](https://docs.rs/google-youtube3/5.0.2-beta-1+20220303/google_youtube3/client::RequestValue) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/youtube3/src/api.rs b/gen/youtube3/src/api.rs index afcb964d51..629939fd2d 100644 --- a/gen/youtube3/src/api.rs +++ b/gen/youtube3/src/api.rs @@ -1,19 +1,20 @@ use std::collections::HashMap; use std::cell::RefCell; use std::default::Default; -use std::collections::BTreeMap; +use std::collections::BTreeSet; use std::error::Error as StdError; use serde_json as json; use std::io; use std::fs; use std::mem; -use std::thread::sleep; -use http::Uri; use hyper::client::connect; use tokio::io::{AsyncRead, AsyncWrite}; +use tokio::time::sleep; use tower_service; -use crate::client; +use serde::{Serialize, Deserialize}; + +use crate::{client, client::GetToken, client::serde_with}; // ############## // UTILITIES ### @@ -85,7 +86,7 @@ impl Default for Scope { /// use youtube3::{Result, Error}; /// # async fn dox() { /// use std::default::Default; -/// use youtube3::{YouTube, oauth2, hyper, hyper_rustls}; +/// use youtube3::{YouTube, oauth2, hyper, hyper_rustls, chrono, FieldMask}; /// /// // Get an ApplicationSecret instance by some means. It contains the `client_id` and /// // `client_secret`, among other things. @@ -140,7 +141,7 @@ impl Default for Scope { #[derive(Clone)] pub struct YouTube { pub client: hyper::Client, - pub auth: oauth2::authenticator::Authenticator, + pub auth: Box, _user_agent: String, _base_url: String, _root_url: String, @@ -150,11 +151,11 @@ impl<'a, S> client::Hub for YouTube {} impl<'a, S> YouTube { - pub fn new(client: hyper::Client, authenticator: oauth2::authenticator::Authenticator) -> YouTube { + pub fn new(client: hyper::Client, auth: A) -> YouTube { YouTube { client, - auth: authenticator, - _user_agent: "google-api-rust-client/4.0.1".to_string(), + auth: Box::new(auth), + _user_agent: "google-api-rust-client/5.0.2-beta-1".to_string(), _base_url: "https://youtube.googleapis.com/".to_string(), _root_url: "https://youtube.googleapis.com/".to_string(), } @@ -252,7 +253,7 @@ impl<'a, S> YouTube { } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/4.0.1`. + /// It defaults to `google-api-rust-client/5.0.2-beta-1`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -289,17 +290,22 @@ impl<'a, S> YouTube { /// /// * [insert abuse reports](AbuseReportInsertCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AbuseReport { /// no description provided #[serde(rename="abuseTypes")] + pub abuse_types: Option>, /// no description provided + pub description: Option, /// no description provided #[serde(rename="relatedEntities")] + pub related_entities: Option>, /// no description provided + pub subject: Option, } @@ -326,9 +332,11 @@ impl client::ToParts for AbuseReport { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AbuseType { /// no description provided + pub id: Option, } @@ -339,11 +347,14 @@ impl client::Part for AbuseType {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccessPolicy { /// The value of allowed indicates whether the access to the policy is allowed or denied by default. + pub allowed: Option, /// A list of region codes that identify countries where the default policy do not apply. + pub exception: Option>, } @@ -354,18 +365,24 @@ impl client::Part for AccessPolicy {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activity { /// The contentDetails object contains information about the content associated with the activity. For example, if the snippet.type value is videoRated, then the contentDetails object's content identifies the rated video. #[serde(rename="contentDetails")] + pub content_details: Option, /// Etag of this resource + pub etag: Option, /// The ID that YouTube uses to uniquely identify the activity. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#activity". + pub kind: Option, /// The snippet object contains basic details about the activity, including the activity's type and group ID. + pub snippet: Option, } @@ -376,32 +393,44 @@ impl client::Part for Activity {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetails { /// The bulletin object contains details about a channel bulletin post. This object is only present if the snippet.type is bulletin. + pub bulletin: Option, /// The channelItem object contains details about a resource which was added to a channel. This property is only present if the snippet.type is channelItem. #[serde(rename="channelItem")] + pub channel_item: Option, /// The comment object contains information about a resource that received a comment. This property is only present if the snippet.type is comment. + pub comment: Option, /// The favorite object contains information about a video that was marked as a favorite video. This property is only present if the snippet.type is favorite. + pub favorite: Option, /// The like object contains information about a resource that received a positive (like) rating. This property is only present if the snippet.type is like. + pub like: Option, /// The playlistItem object contains information about a new playlist item. This property is only present if the snippet.type is playlistItem. #[serde(rename="playlistItem")] + pub playlist_item: Option, /// The promotedItem object contains details about a resource which is being promoted. This property is only present if the snippet.type is promotedItem. #[serde(rename="promotedItem")] + pub promoted_item: Option, /// The recommendation object contains information about a recommended resource. This property is only present if the snippet.type is recommendation. + pub recommendation: Option, /// The social object contains details about a social network post. This property is only present if the snippet.type is social. + pub social: Option, /// The subscription object contains information about a channel that a user subscribed to. This property is only present if the snippet.type is subscription. + pub subscription: Option, /// The upload object contains information about the uploaded video. This property is only present if the snippet.type is upload. + pub upload: Option, } @@ -412,10 +441,12 @@ impl client::Part for ActivityContentDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsBulletin { /// The resourceId object contains information that identifies the resource associated with a bulletin post. @mutable youtube.activities.insert #[serde(rename="resourceId")] + pub resource_id: Option, } @@ -426,10 +457,12 @@ impl client::Part for ActivityContentDetailsBulletin {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsChannelItem { /// The resourceId object contains information that identifies the resource that was added to the channel. #[serde(rename="resourceId")] + pub resource_id: Option, } @@ -440,10 +473,12 @@ impl client::Part for ActivityContentDetailsChannelItem {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsComment { /// The resourceId object contains information that identifies the resource associated with the comment. #[serde(rename="resourceId")] + pub resource_id: Option, } @@ -454,10 +489,12 @@ impl client::Part for ActivityContentDetailsComment {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsFavorite { /// The resourceId object contains information that identifies the resource that was marked as a favorite. #[serde(rename="resourceId")] + pub resource_id: Option, } @@ -468,10 +505,12 @@ impl client::Part for ActivityContentDetailsFavorite {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsLike { /// The resourceId object contains information that identifies the rated resource. #[serde(rename="resourceId")] + pub resource_id: Option, } @@ -482,16 +521,20 @@ impl client::Part for ActivityContentDetailsLike {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsPlaylistItem { /// The value that YouTube uses to uniquely identify the playlist. #[serde(rename="playlistId")] + pub playlist_id: Option, /// ID of the item within the playlist. #[serde(rename="playlistItemId")] + pub playlist_item_id: Option, /// The resourceId object contains information about the resource that was added to the playlist. #[serde(rename="resourceId")] + pub resource_id: Option, } @@ -502,37 +545,48 @@ impl client::Part for ActivityContentDetailsPlaylistItem {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsPromotedItem { /// The URL the client should fetch to request a promoted item. #[serde(rename="adTag")] + pub ad_tag: Option, /// The URL the client should ping to indicate that the user clicked through on this promoted item. #[serde(rename="clickTrackingUrl")] + pub click_tracking_url: Option, /// The URL the client should ping to indicate that the user was shown this promoted item. #[serde(rename="creativeViewUrl")] + pub creative_view_url: Option, /// The type of call-to-action, a message to the user indicating action that can be taken. #[serde(rename="ctaType")] + pub cta_type: Option, /// The custom call-to-action button text. If specified, it will override the default button text for the cta_type. #[serde(rename="customCtaButtonText")] + pub custom_cta_button_text: Option, /// The text description to accompany the promoted item. #[serde(rename="descriptionText")] + pub description_text: Option, /// The URL the client should direct the user to, if the user chooses to visit the advertiser's website. #[serde(rename="destinationUrl")] + pub destination_url: Option, /// The list of forecasting URLs. The client should ping all of these URLs when a promoted item is not available, to indicate that a promoted item could have been shown. #[serde(rename="forecastingUrl")] + pub forecasting_url: Option>, /// The list of impression URLs. The client should ping all of these URLs to indicate that the user was shown this promoted item. #[serde(rename="impressionUrl")] + pub impression_url: Option>, /// The ID that YouTube uses to uniquely identify the promoted video. #[serde(rename="videoId")] + pub video_id: Option, } @@ -543,15 +597,19 @@ impl client::Part for ActivityContentDetailsPromotedItem {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsRecommendation { /// The reason that the resource is recommended to the user. + pub reason: Option, /// The resourceId object contains information that identifies the recommended resource. #[serde(rename="resourceId")] + pub resource_id: Option, /// The seedResourceId object contains information about the resource that caused the recommendation. #[serde(rename="seedResourceId")] + pub seed_resource_id: Option, } @@ -562,21 +620,27 @@ impl client::Part for ActivityContentDetailsRecommendation {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsSocial { /// The author of the social network post. + pub author: Option, /// An image of the post's author. #[serde(rename="imageUrl")] + pub image_url: Option, /// The URL of the social network post. #[serde(rename="referenceUrl")] + pub reference_url: Option, /// The resourceId object encapsulates information that identifies the resource associated with a social network post. #[serde(rename="resourceId")] + pub resource_id: Option, /// The name of the social network. #[serde(rename="type")] + pub type_: Option, } @@ -587,10 +651,12 @@ impl client::Part for ActivityContentDetailsSocial {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsSubscription { /// The resourceId object contains information that identifies the resource that the user subscribed to. #[serde(rename="resourceId")] + pub resource_id: Option, } @@ -601,10 +667,12 @@ impl client::Part for ActivityContentDetailsSubscription {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsUpload { /// The ID that YouTube uses to uniquely identify the uploaded video. #[serde(rename="videoId")] + pub video_id: Option, } @@ -620,31 +688,41 @@ impl client::Part for ActivityContentDetailsUpload {} /// /// * [list activities](ActivityListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// no description provided + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#activityListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] + pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -674,28 +752,37 @@ impl client::ToParts for ActivityListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivitySnippet { /// The ID that YouTube uses to uniquely identify the channel associated with the activity. #[serde(rename="channelId")] + pub channel_id: Option, /// Channel title for the channel responsible for this activity #[serde(rename="channelTitle")] + pub channel_title: Option, /// The description of the resource primarily associated with the activity. @mutable youtube.activities.insert + pub description: Option, /// The group ID associated with the activity. A group ID identifies user events that are associated with the same user and resource. For example, if a user rates a video and marks the same video as a favorite, the entries for those events would have the same group ID in the user's activity feed. In your user interface, you can avoid repetition by grouping events with the same groupId value. #[serde(rename="groupId")] + pub group_id: Option, /// The date and time that the video was uploaded. #[serde(rename="publishedAt")] - pub published_at: Option, + + pub published_at: Option>, /// A map of thumbnail images associated with the resource that is primarily associated with the activity. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. + pub thumbnails: Option, /// The title of the resource primarily associated with the activity. + pub title: Option, /// The type of activity that the resource describes. #[serde(rename="type")] + pub type_: Option, } @@ -715,15 +802,20 @@ impl client::Part for ActivitySnippet {} /// * [list captions](CaptionListCall) (none) /// * [update captions](CaptionUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Caption { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the caption track. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#caption". + pub kind: Option, /// The snippet object contains basic details about the caption. + pub snippet: Option, } @@ -755,19 +847,25 @@ impl client::ToParts for Caption { /// /// * [list captions](CaptionListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CaptionListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of captions that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#captionListResponse". + pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -793,43 +891,57 @@ impl client::ToParts for CaptionListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CaptionSnippet { /// The type of audio track associated with the caption track. #[serde(rename="audioTrackType")] + pub audio_track_type: Option, /// The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. #[serde(rename="failureReason")] + pub failure_reason: Option, /// Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. #[serde(rename="isAutoSynced")] + pub is_auto_synced: Option, /// Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. #[serde(rename="isCC")] + pub is_cc: Option, /// Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update #[serde(rename="isDraft")] + pub is_draft: Option, /// Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false. #[serde(rename="isEasyReader")] + pub is_easy_reader: Option, /// Indicates whether the caption track uses large text for the vision-impaired. The default value is false. #[serde(rename="isLarge")] + pub is_large: Option, /// The language of the caption track. The property value is a BCP-47 language tag. + pub language: Option, /// The date and time when the caption track was last updated. #[serde(rename="lastUpdated")] - pub last_updated: Option, + + pub last_updated: Option>, /// The name of the caption track. The name is intended to be visible to the user as an option during playback. + pub name: Option, /// The caption track's status. + pub status: Option, /// The caption track's type. #[serde(rename="trackKind")] + pub track_kind: Option, /// The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert #[serde(rename="videoId")] + pub video_id: Option, } @@ -840,20 +952,26 @@ impl client::Part for CaptionSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CdnSettings { /// The format of the video stream that you are sending to Youtube. + pub format: Option, /// The frame rate of the inbound video data. #[serde(rename="frameRate")] + pub frame_rate: Option, /// The ingestionInfo object contains information that YouTube provides that you need to transmit your RTMP or HTTP stream to YouTube. #[serde(rename="ingestionInfo")] + pub ingestion_info: Option, /// The method or protocol used to transmit the video stream. #[serde(rename="ingestionType")] + pub ingestion_type: Option, /// The resolution of the inbound video data. + pub resolution: Option, } @@ -870,39 +988,53 @@ impl client::Part for CdnSettings {} /// * [list channels](ChannelListCall) (none) /// * [update channels](ChannelUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Channel { /// The auditionDetails object encapsulates channel data that is relevant for YouTube Partners during the audition process. #[serde(rename="auditDetails")] + pub audit_details: Option, /// The brandingSettings object encapsulates information about the branding of the channel. #[serde(rename="brandingSettings")] + pub branding_settings: Option, /// The contentDetails object encapsulates information about the channel's content. #[serde(rename="contentDetails")] + pub content_details: Option, /// The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel. #[serde(rename="contentOwnerDetails")] + pub content_owner_details: Option, /// The conversionPings object encapsulates information about conversion pings that need to be respected by the channel. #[serde(rename="conversionPings")] + pub conversion_pings: Option, /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the channel. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channel". + pub kind: Option, /// Localizations for different languages + pub localizations: Option>, /// The snippet object contains basic details about the channel, such as its title, description, and thumbnail images. + pub snippet: Option, /// The statistics object encapsulates statistics for the channel. + pub statistics: Option, /// The status object encapsulates information about the privacy status of the channel. + pub status: Option, /// The topicDetails object encapsulates information about Freebase topics associated with the channel. #[serde(rename="topicDetails")] + pub topic_details: Option, } @@ -938,16 +1070,20 @@ impl client::ToParts for Channel { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelAuditDetails { /// Whether or not the channel respects the community guidelines. #[serde(rename="communityGuidelinesGoodStanding")] + pub community_guidelines_good_standing: Option, /// Whether or not the channel has any unresolved claims. #[serde(rename="contentIdClaimsGoodStanding")] + pub content_id_claims_good_standing: Option, /// Whether or not the channel has any copyright strikes. #[serde(rename="copyrightStrikesGoodStanding")] + pub copyright_strikes_good_standing: Option, } @@ -963,13 +1099,17 @@ impl client::Part for ChannelAuditDetails {} /// /// * [insert channel banners](ChannelBannerInsertCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelBannerResource { /// no description provided + pub etag: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelBannerResource". + pub kind: Option, /// The URL of this banner image. + pub url: Option, } @@ -981,15 +1121,20 @@ impl client::ResponseResult for ChannelBannerResource {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelBrandingSettings { /// Branding properties for the channel view. + pub channel: Option, /// Additional experimental branding properties. + pub hints: Option>, /// Branding properties for branding images. + pub image: Option, /// Branding properties for the watch page. + pub watch: Option, } @@ -1000,10 +1145,12 @@ impl client::Part for ChannelBrandingSettings {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelContentDetails { /// no description provided #[serde(rename="relatedPlaylists")] + pub related_playlists: Option, } @@ -1014,14 +1161,17 @@ impl client::Part for ChannelContentDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelContentOwnerDetails { /// The ID of the content owner linked to the channel. #[serde(rename="contentOwner")] + pub content_owner: Option, /// The date and time when the channel was linked to the content owner. #[serde(rename="timeLinked")] - pub time_linked: Option, + + pub time_linked: Option>, } impl client::Part for ChannelContentOwnerDetails {} @@ -1031,12 +1181,15 @@ impl client::Part for ChannelContentOwnerDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelConversionPing { /// Defines the context of the ping. + pub context: Option, /// The url (without the schema) that the player shall send the ping to. It's at caller's descretion to decide which schema to use (http vs https) Example of a returned url: //googleads.g.doubleclick.net/pagead/ viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must append biscotti authentication (ms param in case of mobile, for example) to this ping. #[serde(rename="conversionUrl")] + pub conversion_url: Option, } @@ -1047,9 +1200,11 @@ impl client::Part for ChannelConversionPing {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelConversionPings { /// Pings that the app shall fire (authenticated by biscotti cookie). Each ping has a context, in which the app must fire the ping, and a url identifying the ping. + pub pings: Option>, } @@ -1065,31 +1220,41 @@ impl client::Part for ChannelConversionPings {} /// /// * [list channels](ChannelListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// no description provided + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] + pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -1119,11 +1284,14 @@ impl client::ToParts for ChannelListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelLocalization { /// The localized strings for channel's description. + pub description: Option, /// The localized strings for channel's title. + pub title: Option, } @@ -1134,19 +1302,24 @@ impl client::Part for ChannelLocalization {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelProfileDetails { /// The YouTube channel ID. #[serde(rename="channelId")] + pub channel_id: Option, /// The channel's URL. #[serde(rename="channelUrl")] + pub channel_url: Option, /// The channel's display name. #[serde(rename="displayName")] + pub display_name: Option, /// The channels's avatar URL. #[serde(rename="profileImageUrl")] + pub profile_image_url: Option, } @@ -1165,22 +1338,30 @@ impl client::Part for ChannelProfileDetails {} /// * [list channel sections](ChannelSectionListCall) (none) /// * [update channel sections](ChannelSectionUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSection { /// The contentDetails object contains details about the channel section content, such as a list of playlists or channels featured in the section. #[serde(rename="contentDetails")] + pub content_details: Option, /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the channel section. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelSection". + pub kind: Option, /// Localizations for different languages + pub localizations: Option>, /// The snippet object contains basic details about the channel section, such as its type, style and title. + pub snippet: Option, /// The targeting object contains basic targeting settings about the channel section. + pub targeting: Option, } @@ -1210,11 +1391,14 @@ impl client::ToParts for ChannelSection { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionContentDetails { /// The channel ids for type multiple_channels. + pub channels: Option>, /// The playlist ids for type single_playlist and multiple_playlists. For singlePlaylist, only one playlistId is allowed. + pub playlists: Option>, } @@ -1230,19 +1414,25 @@ impl client::Part for ChannelSectionContentDetails {} /// /// * [list channel sections](ChannelSectionListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of ChannelSections that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelSectionListResponse". + pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -1268,9 +1458,11 @@ impl client::ToParts for ChannelSectionListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionLocalization { /// The localized strings for channel section's title. + pub title: Option, } @@ -1281,24 +1473,32 @@ impl client::Part for ChannelSectionLocalization {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionSnippet { /// The ID that YouTube uses to uniquely identify the channel that published the channel section. #[serde(rename="channelId")] + pub channel_id: Option, /// The language of the channel section's default title and description. #[serde(rename="defaultLanguage")] + pub default_language: Option, /// Localized title, read-only. + pub localized: Option, /// The position of the channel section in the channel. + pub position: Option, /// The style of the channel section. + pub style: Option, /// The channel section's title for multiple_playlists and multiple_channels. + pub title: Option, /// The type of the channel section. #[serde(rename="type")] + pub type_: Option, } @@ -1309,13 +1509,17 @@ impl client::Part for ChannelSectionSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionTargeting { /// The country the channel section is targeting. + pub countries: Option>, /// The language the channel section is targeting. + pub languages: Option>, /// The region the channel section is targeting. + pub regions: Option>, } @@ -1326,45 +1530,60 @@ impl client::Part for ChannelSectionTargeting {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSettings { /// The country of the channel. + pub country: Option, /// no description provided #[serde(rename="defaultLanguage")] + pub default_language: Option, /// Which content tab users should see when viewing the channel. #[serde(rename="defaultTab")] + pub default_tab: Option, /// Specifies the channel description. + pub description: Option, /// Title for the featured channels tab. #[serde(rename="featuredChannelsTitle")] + pub featured_channels_title: Option, /// The list of featured channels. #[serde(rename="featuredChannelsUrls")] + pub featured_channels_urls: Option>, /// Lists keywords associated with the channel, comma-separated. + pub keywords: Option, /// Whether user-submitted comments left on the channel page need to be approved by the channel owner to be publicly visible. #[serde(rename="moderateComments")] + pub moderate_comments: Option, /// A prominent color that can be rendered on this channel page. #[serde(rename="profileColor")] + pub profile_color: Option, /// Whether the tab to browse the videos should be displayed. #[serde(rename="showBrowseView")] + pub show_browse_view: Option, /// Whether related channels should be proposed. #[serde(rename="showRelatedChannels")] + pub show_related_channels: Option, /// Specifies the channel title. + pub title: Option, /// The ID for a Google Analytics account to track and measure traffic to the channels. #[serde(rename="trackingAnalyticsAccountId")] + pub tracking_analytics_account_id: Option, /// The trailer of the channel, for users that are not subscribers. #[serde(rename="unsubscribedTrailer")] + pub unsubscribed_trailer: Option, } @@ -1375,26 +1594,35 @@ impl client::Part for ChannelSettings {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSnippet { /// The country of the channel. + pub country: Option, /// The custom url of the channel. #[serde(rename="customUrl")] + pub custom_url: Option, /// The language of the channel's default title and description. #[serde(rename="defaultLanguage")] + pub default_language: Option, /// The description of the channel. + pub description: Option, /// Localized title and description, read-only. + pub localized: Option, /// The date and time that the channel was created. #[serde(rename="publishedAt")] - pub published_at: Option, + + pub published_at: Option>, /// A map of thumbnail images associated with the channel. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. When displaying thumbnails in your application, make sure that your code uses the image URLs exactly as they are returned in API responses. For example, your application should not use the http domain instead of the https domain in a URL returned in an API response. Beginning in July 2018, channel thumbnail URLs will only be available in the https domain, which is how the URLs appear in API responses. After that time, you might see broken images in your application if it tries to load YouTube images from the http domain. Thumbnail images might be empty for newly created channels and might take up to one day to populate. + pub thumbnails: Option, /// The channel's title. + pub title: Option, } @@ -1405,23 +1633,33 @@ impl client::Part for ChannelSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelStatistics { /// The number of comments for the channel. #[serde(rename="commentCount")] - pub comment_count: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub comment_count: Option, /// Whether or not the number of subscribers is shown for this user. #[serde(rename="hiddenSubscriberCount")] + pub hidden_subscriber_count: Option, /// The number of subscribers that the channel has. #[serde(rename="subscriberCount")] - pub subscriber_count: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub subscriber_count: Option, /// The number of videos uploaded to the channel. #[serde(rename="videoCount")] - pub video_count: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub video_count: Option, /// The number of times the channel has been viewed. #[serde(rename="viewCount")] - pub view_count: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub view_count: Option, } impl client::Part for ChannelStatistics {} @@ -1431,22 +1669,28 @@ impl client::Part for ChannelStatistics {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelStatus { /// If true, then the user is linked to either a YouTube username or G+ account. Otherwise, the user doesn't have a public YouTube identity. #[serde(rename="isLinked")] + pub is_linked: Option, /// The long uploads status of this channel. See https://support.google.com/youtube/answer/71673 for more information. #[serde(rename="longUploadsStatus")] + pub long_uploads_status: Option, /// no description provided #[serde(rename="madeForKids")] + pub made_for_kids: Option, /// Privacy status of the channel. #[serde(rename="privacyStatus")] + pub privacy_status: Option, /// no description provided #[serde(rename="selfDeclaredMadeForKids")] + pub self_declared_made_for_kids: Option, } @@ -1457,13 +1701,16 @@ impl client::Part for ChannelStatus {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelToStoreLinkDetails { /// Name of the store. #[serde(rename="storeName")] + pub store_name: Option, /// Landing page of the store. #[serde(rename="storeUrl")] + pub store_url: Option, } @@ -1474,13 +1721,16 @@ impl client::Part for ChannelToStoreLinkDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelTopicDetails { /// A list of Wikipedia URLs that describe the channel's content. #[serde(rename="topicCategories")] + pub topic_categories: Option>, /// A list of Freebase topic IDs associated with the channel. You can retrieve information about each topic using the Freebase Topic API. #[serde(rename="topicIds")] + pub topic_ids: Option>, } @@ -1501,15 +1751,20 @@ impl client::Part for ChannelTopicDetails {} /// * [set moderation status comments](CommentSetModerationStatuCall) (none) /// * [update comments](CommentUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Comment { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the comment. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#comment". + pub kind: Option, /// The snippet object contains basic details about the comment. + pub snippet: Option, } @@ -1541,28 +1796,37 @@ impl client::ToParts for Comment { /// /// * [list comments](CommentListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of comments that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -1591,52 +1855,68 @@ impl client::ToParts for CommentListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentSnippet { /// no description provided #[serde(rename="authorChannelId")] + pub author_channel_id: Option, /// Link to the author's YouTube channel, if any. #[serde(rename="authorChannelUrl")] + pub author_channel_url: Option, /// The name of the user who posted the comment. #[serde(rename="authorDisplayName")] + pub author_display_name: Option, /// The URL for the avatar of the user who posted the comment. #[serde(rename="authorProfileImageUrl")] + pub author_profile_image_url: Option, /// Whether the current viewer can rate this comment. #[serde(rename="canRate")] + pub can_rate: Option, /// The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel. #[serde(rename="channelId")] + pub channel_id: Option, /// The total number of likes this comment has received. #[serde(rename="likeCount")] + pub like_count: Option, /// The comment's moderation status. Will not be set if the comments were requested through the id filter. #[serde(rename="moderationStatus")] + pub moderation_status: Option, /// The unique id of the parent comment, only set for replies. #[serde(rename="parentId")] + pub parent_id: Option, /// The date and time when the comment was originally published. #[serde(rename="publishedAt")] - pub published_at: Option, + + pub published_at: Option>, /// The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc. #[serde(rename="textDisplay")] + pub text_display: Option, /// The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author. #[serde(rename="textOriginal")] + pub text_original: Option, /// The date and time when the comment was last updated. #[serde(rename="updatedAt")] - pub updated_at: Option, + + pub updated_at: Option>, /// The ID of the video the comment refers to, if any. #[serde(rename="videoId")] + pub video_id: Option, /// The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future. #[serde(rename="viewerRating")] + pub viewer_rating: Option, } @@ -1647,9 +1927,11 @@ impl client::Part for CommentSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentSnippetAuthorChannelId { /// no description provided + pub value: Option, } @@ -1667,17 +1949,23 @@ impl client::Part for CommentSnippetAuthorChannelId {} /// * [list comment threads](CommentThreadListCall) (none) /// * [v3 update comment threads youtube](YoutubeV3UpdateCommentThreadCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentThread { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the comment thread. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#commentThread". + pub kind: Option, /// The replies object contains a limited number of replies (if any) to the top level comment found in the snippet. + pub replies: Option, /// The snippet object contains basic details about the comment thread and also the top level comment. + pub snippet: Option, } @@ -1710,28 +1998,37 @@ impl client::ToParts for CommentThread { /// /// * [list comment threads](CommentThreadListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentThreadListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of comment threads that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#commentThreadListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -1760,9 +2057,11 @@ impl client::ToParts for CommentThreadListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentThreadReplies { /// A limited number of replies. Unless the number of replies returned equals total_reply_count in the snippet the returned replies are only a subset of the total number of replies. + pub comments: Option>, } @@ -1773,25 +2072,32 @@ impl client::Part for CommentThreadReplies {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentThreadSnippet { /// Whether the current viewer of the thread can reply to it. This is viewer specific - other viewers may see a different value for this field. #[serde(rename="canReply")] + pub can_reply: Option, /// The YouTube channel the comments in the thread refer to or the channel with the video the comments refer to. If video_id isn't set the comments refer to the channel itself. #[serde(rename="channelId")] + pub channel_id: Option, /// Whether the thread (and therefore all its comments) is visible to all YouTube users. #[serde(rename="isPublic")] + pub is_public: Option, /// The top level comment of this thread. #[serde(rename="topLevelComment")] + pub top_level_comment: Option, /// The total number of replies (not including the top level comment). #[serde(rename="totalReplyCount")] + pub total_reply_count: Option, /// The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment. #[serde(rename="videoId")] + pub video_id: Option, } @@ -1802,220 +2108,292 @@ impl client::Part for CommentThreadSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ContentRating { /// The video's Australian Classification Board (ACB) or Australian Communications and Media Authority (ACMA) rating. ACMA ratings are used to classify children's television programming. #[serde(rename="acbRating")] + pub acb_rating: Option, /// The video's rating from Italy's Autorità per le Garanzie nelle Comunicazioni (AGCOM). #[serde(rename="agcomRating")] + pub agcom_rating: Option, /// The video's Anatel (Asociación Nacional de Televisión) rating for Chilean television. #[serde(rename="anatelRating")] + pub anatel_rating: Option, /// The video's British Board of Film Classification (BBFC) rating. #[serde(rename="bbfcRating")] + pub bbfc_rating: Option, /// The video's rating from Thailand's Board of Film and Video Censors. #[serde(rename="bfvcRating")] + pub bfvc_rating: Option, /// The video's rating from the Austrian Board of Media Classification (Bundesministerium für Unterricht, Kunst und Kultur). #[serde(rename="bmukkRating")] + pub bmukk_rating: Option, /// Rating system for Canadian TV - Canadian TV Classification System The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian English-language broadcasts. For more information, see the Canadian Broadcast Standards Council website. #[serde(rename="catvRating")] + pub catv_rating: Option, /// The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian French-language broadcasts. For more information, see the Canadian Broadcast Standards Council website. #[serde(rename="catvfrRating")] + pub catvfr_rating: Option, /// The video's Central Board of Film Certification (CBFC - India) rating. #[serde(rename="cbfcRating")] + pub cbfc_rating: Option, /// The video's Consejo de Calificación Cinematográfica (Chile) rating. #[serde(rename="cccRating")] + pub ccc_rating: Option, /// The video's rating from Portugal's Comissão de Classificação de Espect´culos. #[serde(rename="cceRating")] + pub cce_rating: Option, /// The video's rating in Switzerland. #[serde(rename="chfilmRating")] + pub chfilm_rating: Option, /// The video's Canadian Home Video Rating System (CHVRS) rating. #[serde(rename="chvrsRating")] + pub chvrs_rating: Option, /// The video's rating from the Commission de Contrôle des Films (Belgium). #[serde(rename="cicfRating")] + pub cicf_rating: Option, /// The video's rating from Romania's CONSILIUL NATIONAL AL AUDIOVIZUALULUI (CNA). #[serde(rename="cnaRating")] + pub cna_rating: Option, /// Rating system in France - Commission de classification cinematographique #[serde(rename="cncRating")] + pub cnc_rating: Option, /// The video's rating from France's Conseil supérieur de l’audiovisuel, which rates broadcast content. #[serde(rename="csaRating")] + pub csa_rating: Option, /// The video's rating from Luxembourg's Commission de surveillance de la classification des films (CSCF). #[serde(rename="cscfRating")] + pub cscf_rating: Option, /// The video's rating in the Czech Republic. #[serde(rename="czfilmRating")] + pub czfilm_rating: Option, /// The video's Departamento de Justiça, Classificação, Qualificação e Títulos (DJCQT - Brazil) rating. #[serde(rename="djctqRating")] + pub djctq_rating: Option, /// Reasons that explain why the video received its DJCQT (Brazil) rating. #[serde(rename="djctqRatingReasons")] + pub djctq_rating_reasons: Option>, /// Rating system in Turkey - Evaluation and Classification Board of the Ministry of Culture and Tourism #[serde(rename="ecbmctRating")] + pub ecbmct_rating: Option, /// The video's rating in Estonia. #[serde(rename="eefilmRating")] + pub eefilm_rating: Option, /// The video's rating in Egypt. #[serde(rename="egfilmRating")] + pub egfilm_rating: Option, /// The video's Eirin (映倫) rating. Eirin is the Japanese rating system. #[serde(rename="eirinRating")] + pub eirin_rating: Option, /// The video's rating from Malaysia's Film Censorship Board. #[serde(rename="fcbmRating")] + pub fcbm_rating: Option, /// The video's rating from Hong Kong's Office for Film, Newspaper and Article Administration. #[serde(rename="fcoRating")] + pub fco_rating: Option, /// This property has been deprecated. Use the contentDetails.contentRating.cncRating instead. #[serde(rename="fmocRating")] + pub fmoc_rating: Option, /// The video's rating from South Africa's Film and Publication Board. #[serde(rename="fpbRating")] + pub fpb_rating: Option, /// Reasons that explain why the video received its FPB (South Africa) rating. #[serde(rename="fpbRatingReasons")] + pub fpb_rating_reasons: Option>, /// The video's Freiwillige Selbstkontrolle der Filmwirtschaft (FSK - Germany) rating. #[serde(rename="fskRating")] + pub fsk_rating: Option, /// The video's rating in Greece. #[serde(rename="grfilmRating")] + pub grfilm_rating: Option, /// The video's Instituto de la Cinematografía y de las Artes Audiovisuales (ICAA - Spain) rating. #[serde(rename="icaaRating")] + pub icaa_rating: Option, /// The video's Irish Film Classification Office (IFCO - Ireland) rating. See the IFCO website for more information. #[serde(rename="ifcoRating")] + pub ifco_rating: Option, /// The video's rating in Israel. #[serde(rename="ilfilmRating")] + pub ilfilm_rating: Option, /// The video's INCAA (Instituto Nacional de Cine y Artes Audiovisuales - Argentina) rating. #[serde(rename="incaaRating")] + pub incaa_rating: Option, /// The video's rating from the Kenya Film Classification Board. #[serde(rename="kfcbRating")] + pub kfcb_rating: Option, /// The video's NICAM/Kijkwijzer rating from the Nederlands Instituut voor de Classificatie van Audiovisuele Media (Netherlands). #[serde(rename="kijkwijzerRating")] + pub kijkwijzer_rating: Option, /// The video's Korea Media Rating Board (영상물등급위원회) rating. The KMRB rates videos in South Korea. #[serde(rename="kmrbRating")] + pub kmrb_rating: Option, /// The video's rating from Indonesia's Lembaga Sensor Film. #[serde(rename="lsfRating")] + pub lsf_rating: Option, /// The video's rating from Malta's Film Age-Classification Board. #[serde(rename="mccaaRating")] + pub mccaa_rating: Option, /// The video's rating from the Danish Film Institute's (Det Danske Filminstitut) Media Council for Children and Young People. #[serde(rename="mccypRating")] + pub mccyp_rating: Option, /// The video's rating system for Vietnam - MCST #[serde(rename="mcstRating")] + pub mcst_rating: Option, /// The video's rating from Singapore's Media Development Authority (MDA) and, specifically, it's Board of Film Censors (BFC). #[serde(rename="mdaRating")] + pub mda_rating: Option, /// The video's rating from Medietilsynet, the Norwegian Media Authority. #[serde(rename="medietilsynetRating")] + pub medietilsynet_rating: Option, /// The video's rating from Finland's Kansallinen Audiovisuaalinen Instituutti (National Audiovisual Institute). #[serde(rename="mekuRating")] + pub meku_rating: Option, /// The rating system for MENA countries, a clone of MPAA. It is needed to prevent titles go live w/o additional QC check, since some of them can be inappropriate for the countries at all. See b/33408548 for more details. #[serde(rename="menaMpaaRating")] + pub mena_mpaa_rating: Option, /// The video's rating from the Ministero dei Beni e delle Attività Culturali e del Turismo (Italy). #[serde(rename="mibacRating")] + pub mibac_rating: Option, /// The video's Ministerio de Cultura (Colombia) rating. #[serde(rename="mocRating")] + pub moc_rating: Option, /// The video's rating from Taiwan's Ministry of Culture (文化部). #[serde(rename="moctwRating")] + pub moctw_rating: Option, /// The video's Motion Picture Association of America (MPAA) rating. #[serde(rename="mpaaRating")] + pub mpaa_rating: Option, /// The rating system for trailer, DVD, and Ad in the US. See http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html. #[serde(rename="mpaatRating")] + pub mpaat_rating: Option, /// The video's rating from the Movie and Television Review and Classification Board (Philippines). #[serde(rename="mtrcbRating")] + pub mtrcb_rating: Option, /// The video's rating from the Maldives National Bureau of Classification. #[serde(rename="nbcRating")] + pub nbc_rating: Option, /// The video's rating in Poland. #[serde(rename="nbcplRating")] + pub nbcpl_rating: Option, /// The video's rating from the Bulgarian National Film Center. #[serde(rename="nfrcRating")] + pub nfrc_rating: Option, /// The video's rating from Nigeria's National Film and Video Censors Board. #[serde(rename="nfvcbRating")] + pub nfvcb_rating: Option, /// The video's rating from the Nacionãlais Kino centrs (National Film Centre of Latvia). #[serde(rename="nkclvRating")] + pub nkclv_rating: Option, /// The National Media Council ratings system for United Arab Emirates. #[serde(rename="nmcRating")] + pub nmc_rating: Option, /// The video's Office of Film and Literature Classification (OFLC - New Zealand) rating. #[serde(rename="oflcRating")] + pub oflc_rating: Option, /// The video's rating in Peru. #[serde(rename="pefilmRating")] + pub pefilm_rating: Option, /// The video's rating from the Hungarian Nemzeti Filmiroda, the Rating Committee of the National Office of Film. #[serde(rename="rcnofRating")] + pub rcnof_rating: Option, /// The video's rating in Venezuela. #[serde(rename="resorteviolenciaRating")] + pub resorteviolencia_rating: Option, /// The video's General Directorate of Radio, Television and Cinematography (Mexico) rating. #[serde(rename="rtcRating")] + pub rtc_rating: Option, /// The video's rating from Ireland's Raidió Teilifís Éireann. #[serde(rename="rteRating")] + pub rte_rating: Option, /// The video's National Film Registry of the Russian Federation (MKRF - Russia) rating. #[serde(rename="russiaRating")] + pub russia_rating: Option, /// The video's rating in Slovakia. #[serde(rename="skfilmRating")] + pub skfilm_rating: Option, /// The video's rating in Iceland. #[serde(rename="smaisRating")] + pub smais_rating: Option, /// The video's rating from Statens medieråd (Sweden's National Media Council). #[serde(rename="smsaRating")] + pub smsa_rating: Option, /// The video's TV Parental Guidelines (TVPG) rating. #[serde(rename="tvpgRating")] + pub tvpg_rating: Option, /// A rating that YouTube uses to identify age-restricted content. #[serde(rename="ytRating")] + pub yt_rating: Option, } @@ -2026,14 +2404,18 @@ impl client::Part for ContentRating {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Entity { /// no description provided + pub id: Option, /// no description provided #[serde(rename="typeId")] + pub type_id: Option, /// no description provided + pub url: Option, } @@ -2044,13 +2426,17 @@ impl client::Part for Entity {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GeoPoint { /// Altitude above the reference ellipsoid, in meters. + pub altitude: Option, /// Latitude in degrees. + pub latitude: Option, /// Longitude in degrees. + pub longitude: Option, } @@ -2066,15 +2452,20 @@ impl client::Part for GeoPoint {} /// /// * [list i18n languages](I18nLanguageListCall) (none) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nLanguage { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the i18n language. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nLanguage". + pub kind: Option, /// The snippet object contains basic details about the i18n language, such as language code and human-readable name. + pub snippet: Option, } @@ -2104,19 +2495,25 @@ impl client::ToParts for I18nLanguage { /// /// * [list i18n languages](I18nLanguageListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nLanguageListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of supported i18n languages. In this map, the i18n language ID is the map key, and its value is the corresponding i18nLanguage resource. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nLanguageListResponse". + pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -2142,11 +2539,14 @@ impl client::ToParts for I18nLanguageListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nLanguageSnippet { /// A short BCP-47 code that uniquely identifies a language. + pub hl: Option, /// The human-readable name of the language in the language itself. + pub name: Option, } @@ -2162,15 +2562,20 @@ impl client::Part for I18nLanguageSnippet {} /// /// * [list i18n regions](I18nRegionListCall) (none) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nRegion { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the i18n region. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nRegion". + pub kind: Option, /// The snippet object contains basic details about the i18n region, such as region code and human-readable name. + pub snippet: Option, } @@ -2200,19 +2605,25 @@ impl client::ToParts for I18nRegion { /// /// * [list i18n regions](I18nRegionListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nRegionListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of regions where YouTube is available. In this map, the i18n region ID is the map key, and its value is the corresponding i18nRegion resource. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nRegionListResponse". + pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -2238,11 +2649,14 @@ impl client::ToParts for I18nRegionListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nRegionSnippet { /// The region code as a 2-letter ISO country code. + pub gl: Option, /// The human-readable name of the region. + pub name: Option, } @@ -2253,73 +2667,96 @@ impl client::Part for I18nRegionSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImageSettings { /// The URL for the background image shown on the video watch page. The image should be 1200px by 615px, with a maximum file size of 128k. #[serde(rename="backgroundImageUrl")] + pub background_image_url: Option, /// This is generated when a ChannelBanner.Insert request has succeeded for the given channel. #[serde(rename="bannerExternalUrl")] + pub banner_external_url: Option, /// Banner image. Desktop size (1060x175). #[serde(rename="bannerImageUrl")] + pub banner_image_url: Option, /// Banner image. Mobile size high resolution (1440x395). #[serde(rename="bannerMobileExtraHdImageUrl")] + pub banner_mobile_extra_hd_image_url: Option, /// Banner image. Mobile size high resolution (1280x360). #[serde(rename="bannerMobileHdImageUrl")] + pub banner_mobile_hd_image_url: Option, /// Banner image. Mobile size (640x175). #[serde(rename="bannerMobileImageUrl")] + pub banner_mobile_image_url: Option, /// Banner image. Mobile size low resolution (320x88). #[serde(rename="bannerMobileLowImageUrl")] + pub banner_mobile_low_image_url: Option, /// Banner image. Mobile size medium/high resolution (960x263). #[serde(rename="bannerMobileMediumHdImageUrl")] + pub banner_mobile_medium_hd_image_url: Option, /// Banner image. Tablet size extra high resolution (2560x424). #[serde(rename="bannerTabletExtraHdImageUrl")] + pub banner_tablet_extra_hd_image_url: Option, /// Banner image. Tablet size high resolution (2276x377). #[serde(rename="bannerTabletHdImageUrl")] + pub banner_tablet_hd_image_url: Option, /// Banner image. Tablet size (1707x283). #[serde(rename="bannerTabletImageUrl")] + pub banner_tablet_image_url: Option, /// Banner image. Tablet size low resolution (1138x188). #[serde(rename="bannerTabletLowImageUrl")] + pub banner_tablet_low_image_url: Option, /// Banner image. TV size high resolution (1920x1080). #[serde(rename="bannerTvHighImageUrl")] + pub banner_tv_high_image_url: Option, /// Banner image. TV size extra high resolution (2120x1192). #[serde(rename="bannerTvImageUrl")] + pub banner_tv_image_url: Option, /// Banner image. TV size low resolution (854x480). #[serde(rename="bannerTvLowImageUrl")] + pub banner_tv_low_image_url: Option, /// Banner image. TV size medium resolution (1280x720). #[serde(rename="bannerTvMediumImageUrl")] + pub banner_tv_medium_image_url: Option, /// The image map script for the large banner image. #[serde(rename="largeBrandedBannerImageImapScript")] + pub large_branded_banner_image_imap_script: Option, /// The URL for the 854px by 70px image that appears below the video player in the expanded video view of the video watch page. #[serde(rename="largeBrandedBannerImageUrl")] + pub large_branded_banner_image_url: Option, /// The image map script for the small banner image. #[serde(rename="smallBrandedBannerImageImapScript")] + pub small_branded_banner_image_imap_script: Option, /// The URL for the 640px by 70px banner image that appears below the video player in the default view of the video watch page. The URL for the image that appears above the top-left corner of the video player. This is a 25-pixel-high image with a flexible width that cannot exceed 170 pixels. #[serde(rename="smallBrandedBannerImageUrl")] + pub small_branded_banner_image_url: Option, /// The URL for a 1px by 1px tracking pixel that can be used to collect statistics for views of the channel or video pages. #[serde(rename="trackingImageUrl")] + pub tracking_image_url: Option, /// no description provided #[serde(rename="watchIconImageUrl")] + pub watch_icon_image_url: Option, } @@ -2330,22 +2767,28 @@ impl client::Part for ImageSettings {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct IngestionInfo { /// The backup ingestion URL that you should use to stream video to YouTube. You have the option of simultaneously streaming the content that you are sending to the ingestionAddress to this URL. #[serde(rename="backupIngestionAddress")] + pub backup_ingestion_address: Option, /// The primary ingestion URL that you should use to stream video to YouTube. You must stream video to this URL. Depending on which application or tool you use to encode your video stream, you may need to enter the stream URL and stream name separately or you may need to concatenate them in the following format: *STREAM_URL/STREAM_NAME* #[serde(rename="ingestionAddress")] + pub ingestion_address: Option, /// This ingestion url may be used instead of backupIngestionAddress in order to stream via RTMPS. Not applicable to non-RTMP streams. #[serde(rename="rtmpsBackupIngestionAddress")] + pub rtmps_backup_ingestion_address: Option, /// This ingestion url may be used instead of ingestionAddress in order to stream via RTMPS. Not applicable to non-RTMP streams. #[serde(rename="rtmpsIngestionAddress")] + pub rtmps_ingestion_address: Option, /// The stream name that YouTube assigns to the video stream. #[serde(rename="streamName")] + pub stream_name: Option, } @@ -2361,20 +2804,27 @@ impl client::Part for IngestionInfo {} /// /// * [set watermarks](WatermarkSetCall) (request) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoBranding { /// The bytes the uploaded image. Only used in api to youtube communication. #[serde(rename="imageBytes")] - pub image_bytes: Option, + + #[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")] + pub image_bytes: Option>, /// The url of the uploaded image. Only used in apiary to api communication. #[serde(rename="imageUrl")] + pub image_url: Option, /// The spatial position within the video where the branding watermark will be displayed. + pub position: Option, /// The channel to which this branding links. If not present it defaults to the current channel. #[serde(rename="targetChannelId")] + pub target_channel_id: Option, /// The temporal position within the video where watermark will be displayed. + pub timing: Option, } @@ -2385,13 +2835,16 @@ impl client::RequestValue for InvideoBranding {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoPosition { /// Describes in which corner of the video the visual widget will appear. #[serde(rename="cornerPosition")] + pub corner_position: Option, /// Defines the position type. #[serde(rename="type")] + pub type_: Option, } @@ -2402,16 +2855,22 @@ impl client::Part for InvideoPosition {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoTiming { /// Defines the duration in milliseconds for which the promotion should be displayed. If missing, the client should use the default. #[serde(rename="durationMs")] - pub duration_ms: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub duration_ms: Option, /// Defines the time at which the promotion will appear. Depending on the value of type the value of the offsetMs field will represent a time offset from the start or from the end of the video, expressed in milliseconds. #[serde(rename="offsetMs")] - pub offset_ms: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub offset_ms: Option, /// Describes a timing type. If the value is offsetFromStart, then the offsetMs field represents an offset from the start of the video. If the value is offsetFromEnd, then the offsetMs field represents an offset from the end of the video. #[serde(rename="type")] + pub type_: Option, } @@ -2422,9 +2881,11 @@ impl client::Part for InvideoTiming {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LanguageTag { /// no description provided + pub value: Option, } @@ -2435,10 +2896,12 @@ impl client::Part for LanguageTag {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LevelDetails { /// The name that should be used when referring to this level. #[serde(rename="displayName")] + pub display_name: Option, } @@ -2459,22 +2922,30 @@ impl client::Part for LevelDetails {} /// * [transition live broadcasts](LiveBroadcastTransitionCall) (response) /// * [update live broadcasts](LiveBroadcastUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcast { /// The contentDetails object contains information about the event's video content, such as whether the content can be shown in an embedded video player or if it will be archived and therefore available for viewing after the event has concluded. #[serde(rename="contentDetails")] + pub content_details: Option, /// Etag of this resource. + pub etag: Option, /// The ID that YouTube assigns to uniquely identify the broadcast. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveBroadcast". + pub kind: Option, /// The snippet object contains basic details about the event, including its title, description, start time, and end time. + pub snippet: Option, /// The statistics object contains info about the event's current stats. These include concurrent viewers and total chat count. Statistics can change (in either direction) during the lifetime of an event. Statistics are only returned while the event is live. + pub statistics: Option, /// The status object contains information about the event's status. + pub status: Option, } @@ -2504,56 +2975,75 @@ impl client::ToParts for LiveBroadcast { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastContentDetails { /// This value uniquely identifies the live stream bound to the broadcast. #[serde(rename="boundStreamId")] + pub bound_stream_id: Option, /// The date and time that the live stream referenced by boundStreamId was last updated. #[serde(rename="boundStreamLastUpdateTimeMs")] - pub bound_stream_last_update_time_ms: Option, + + pub bound_stream_last_update_time_ms: Option>, /// no description provided #[serde(rename="closedCaptionsType")] + pub closed_captions_type: Option, /// This setting indicates whether auto start is enabled for this broadcast. The default value for this property is false. This setting can only be used by Events. #[serde(rename="enableAutoStart")] + pub enable_auto_start: Option, /// This setting indicates whether auto stop is enabled for this broadcast. The default value for this property is false. This setting can only be used by Events. #[serde(rename="enableAutoStop")] + pub enable_auto_stop: Option, /// This setting indicates whether HTTP POST closed captioning is enabled for this broadcast. The ingestion URL of the closed captions is returned through the liveStreams API. This is mutually exclusive with using the closed_captions_type property, and is equivalent to setting closed_captions_type to CLOSED_CAPTIONS_HTTP_POST. #[serde(rename="enableClosedCaptions")] + pub enable_closed_captions: Option, /// This setting indicates whether YouTube should enable content encryption for the broadcast. #[serde(rename="enableContentEncryption")] + pub enable_content_encryption: Option, /// This setting determines whether viewers can access DVR controls while watching the video. DVR controls enable the viewer to control the video playback experience by pausing, rewinding, or fast forwarding content. The default value for this property is true. *Important:* You must set the value to true and also set the enableArchive property's value to true if you want to make playback available immediately after the broadcast ends. #[serde(rename="enableDvr")] + pub enable_dvr: Option, /// This setting indicates whether the broadcast video can be played in an embedded player. If you choose to archive the video (using the enableArchive property), this setting will also apply to the archived video. #[serde(rename="enableEmbed")] + pub enable_embed: Option, /// Indicates whether this broadcast has low latency enabled. #[serde(rename="enableLowLatency")] + pub enable_low_latency: Option, /// If both this and enable_low_latency are set, they must match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW should have enable_low_latency omitted. #[serde(rename="latencyPreference")] + pub latency_preference: Option, /// The mesh for projecting the video if projection is mesh. The mesh value must be a UTF-8 string containing the base-64 encoding of 3D mesh data that follows the Spherical Video V2 RFC specification for an mshp box, excluding the box size and type but including the following four reserved zero bytes for the version and flags. - pub mesh: Option, + + #[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")] + pub mesh: Option>, /// The monitorStream object contains information about the monitor stream, which the broadcaster can use to review the event content before the broadcast stream is shown publicly. #[serde(rename="monitorStream")] + pub monitor_stream: Option, /// The projection format of this broadcast. This defaults to rectangular. + pub projection: Option, /// Automatically start recording after the event goes live. The default value for this property is true. *Important:* You must also set the enableDvr property's value to true if you want the playback to be available immediately after the broadcast ends. If you set this property's value to true but do not also set the enableDvr property to true, there may be a delay of around one day before the archived video will be available for playback. #[serde(rename="recordFromStart")] + pub record_from_start: Option, /// This setting indicates whether the broadcast should automatically begin with an in-stream slate when you update the broadcast's status to live. After updating the status, you then need to send a liveCuepoints.insert request that sets the cuepoint's eventState to end to remove the in-stream slate and make your broadcast stream visible to viewers. #[serde(rename="startWithSlate")] + pub start_with_slate: Option, /// The 3D stereo layout of this broadcast. This defaults to mono. #[serde(rename="stereoLayout")] + pub stereo_layout: Option, } @@ -2569,31 +3059,41 @@ impl client::Part for LiveBroadcastContentDetails {} /// /// * [list live broadcasts](LiveBroadcastListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of broadcasts that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveBroadcastListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] + pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -2623,37 +3123,49 @@ impl client::ToParts for LiveBroadcastListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastSnippet { /// The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete. #[serde(rename="actualEndTime")] - pub actual_end_time: Option, + + pub actual_end_time: Option>, /// The date and time that the broadcast actually started. This information is only available once the broadcast's state is live. #[serde(rename="actualStartTime")] - pub actual_start_time: Option, + + pub actual_start_time: Option>, /// The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast. #[serde(rename="channelId")] + pub channel_id: Option, /// The broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting the description field of the corresponding video resource. + pub description: Option, /// Indicates whether this broadcast is the default broadcast. Internal only. #[serde(rename="isDefaultBroadcast")] + pub is_default_broadcast: Option, /// The id of the live chat for this broadcast. #[serde(rename="liveChatId")] + pub live_chat_id: Option, /// The date and time that the broadcast was added to YouTube's live broadcast schedule. #[serde(rename="publishedAt")] - pub published_at: Option, + + pub published_at: Option>, /// The date and time that the broadcast is scheduled to end. #[serde(rename="scheduledEndTime")] - pub scheduled_end_time: Option, + + pub scheduled_end_time: Option>, /// The date and time that the broadcast is scheduled to start. #[serde(rename="scheduledStartTime")] - pub scheduled_start_time: Option, + + pub scheduled_start_time: Option>, /// A map of thumbnail images associated with the broadcast. For each nested object in this object, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. + pub thumbnails: Option, /// The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the title field of the corresponding video resource. + pub title: Option, } @@ -2664,11 +3176,14 @@ impl client::Part for LiveBroadcastSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastStatistics { /// The total number of live chat messages currently on the broadcast. The property and its value will be present if the broadcast is public, has the live chat feature enabled, and has at least one message. Note that this field will not be filled after the broadcast ends. So this property would not identify the number of chat messages for an archived video of a completed live broadcast. #[serde(rename="totalChatCount")] - pub total_chat_count: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub total_chat_count: Option, } impl client::Part for LiveBroadcastStatistics {} @@ -2678,25 +3193,32 @@ impl client::Part for LiveBroadcastStatistics {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastStatus { /// The broadcast's status. The status can be updated using the API's liveBroadcasts.transition method. #[serde(rename="lifeCycleStatus")] + pub life_cycle_status: Option, /// Priority of the live broadcast event (internal state). #[serde(rename="liveBroadcastPriority")] + pub live_broadcast_priority: Option, /// Whether the broadcast is made for kids or not, decided by YouTube instead of the creator. This field is read only. #[serde(rename="madeForKids")] + pub made_for_kids: Option, /// The broadcast's privacy status. Note that the broadcast represents exactly one YouTube video, so the privacy settings are identical to those supported for videos. In addition, you can set this field by modifying the broadcast resource or by setting the privacyStatus field of the corresponding video resource. #[serde(rename="privacyStatus")] + pub privacy_status: Option, /// The broadcast's recording status. #[serde(rename="recordingStatus")] + pub recording_status: Option, /// This field will be set to True if the creator declares the broadcast to be kids only: go/live-cw-work. #[serde(rename="selfDeclaredMadeForKids")] + pub self_declared_made_for_kids: Option, } @@ -2713,15 +3235,20 @@ impl client::Part for LiveBroadcastStatus {} /// * [delete live chat bans](LiveChatBanDeleteCall) (none) /// * [insert live chat bans](LiveChatBanInsertCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatBan { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube assigns to uniquely identify the ban. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string `"youtube#liveChatBan"`. + pub kind: Option, /// The `snippet` object contains basic details about the ban. + pub snippet: Option, } @@ -2748,19 +3275,25 @@ impl client::ToParts for LiveChatBan { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatBanSnippet { /// The duration of a ban, only filled if the ban has type TEMPORARY. #[serde(rename="banDurationSeconds")] - pub ban_duration_seconds: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub ban_duration_seconds: Option, /// no description provided #[serde(rename="bannedUserDetails")] + pub banned_user_details: Option, /// The chat this ban is pertinent to. #[serde(rename="liveChatId")] + pub live_chat_id: Option, /// The type of ban. #[serde(rename="type")] + pub type_: Option, } @@ -2771,18 +3304,24 @@ impl client::Part for LiveChatBanSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatFanFundingEventDetails { /// A rendered string that displays the fund amount and currency to the user. #[serde(rename="amountDisplayString")] + pub amount_display_string: Option, /// The amount of the fund. #[serde(rename="amountMicros")] - pub amount_micros: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub amount_micros: Option, /// The currency in which the fund was made. + pub currency: Option, /// The comment added by the user to this fan funding event. #[serde(rename="userComment")] + pub user_comment: Option, } @@ -2793,16 +3332,20 @@ impl client::Part for LiveChatFanFundingEventDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMemberMilestoneChatDetails { /// The name of the Level at which the viever is a member. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled. #[serde(rename="memberLevelName")] + pub member_level_name: Option, /// The total amount of months (rounded up) the viewer has been a member that granted them this Member Milestone Chat. This is the same number of months as is being displayed to YouTube users. #[serde(rename="memberMonth")] + pub member_month: Option, /// The comment added by the member to this Member Milestone Chat. This field is empty for messages without a comment from the member. #[serde(rename="userComment")] + pub user_comment: Option, } @@ -2820,18 +3363,24 @@ impl client::Part for LiveChatMemberMilestoneChatDetails {} /// * [insert live chat messages](LiveChatMessageInsertCall) (request|response) /// * [list live chat messages](LiveChatMessageListCall) (none) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessage { /// The authorDetails object contains basic details about the user that posted this message. #[serde(rename="authorDetails")] + pub author_details: Option, /// Etag of this resource. + pub etag: Option, /// The ID that YouTube assigns to uniquely identify the message. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage". + pub kind: Option, /// The snippet object contains basic details about the message. + pub snippet: Option, } @@ -2859,31 +3408,40 @@ impl client::ToParts for LiveChatMessage { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageAuthorDetails { /// The YouTube channel ID. #[serde(rename="channelId")] + pub channel_id: Option, /// The channel's URL. #[serde(rename="channelUrl")] + pub channel_url: Option, /// The channel's display name. #[serde(rename="displayName")] + pub display_name: Option, /// Whether the author is a moderator of the live chat. #[serde(rename="isChatModerator")] + pub is_chat_moderator: Option, /// Whether the author is the owner of the live chat. #[serde(rename="isChatOwner")] + pub is_chat_owner: Option, /// Whether the author is a sponsor of the live chat. #[serde(rename="isChatSponsor")] + pub is_chat_sponsor: Option, /// Whether the author's identity has been verified by YouTube. #[serde(rename="isVerified")] + pub is_verified: Option, /// The channels's avatar URL. #[serde(rename="profileImageUrl")] + pub profile_image_url: Option, } @@ -2894,10 +3452,12 @@ impl client::Part for LiveChatMessageAuthorDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageDeletedDetails { /// no description provided #[serde(rename="deletedMessageId")] + pub deleted_message_id: Option, } @@ -2913,34 +3473,45 @@ impl client::Part for LiveChatMessageDeletedDetails {} /// /// * [list live chat messages](LiveChatMessageListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// no description provided + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessageListResponse". + pub kind: Option, /// no description provided #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// The date and time when the underlying stream went offline. #[serde(rename="offlineAt")] - pub offline_at: Option, + + pub offline_at: Option>, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// The amount of time the client should wait before polling again. #[serde(rename="pollingIntervalMillis")] + pub polling_interval_millis: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -2971,10 +3542,12 @@ impl client::ToParts for LiveChatMessageListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageRetractedDetails { /// no description provided #[serde(rename="retractedMessageId")] + pub retracted_message_id: Option, } @@ -2985,52 +3558,68 @@ impl client::Part for LiveChatMessageRetractedDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageSnippet { /// The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor memberMilestoneChatEvent - the member that sent the message messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase superStickerEvent - the user that made the purchase #[serde(rename="authorChannelId")] + pub author_channel_id: Option, /// Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent. #[serde(rename="displayMessage")] + pub display_message: Option, /// Details about the funding event, this is only set if the type is 'fanFundingEvent'. #[serde(rename="fanFundingEventDetails")] + pub fan_funding_event_details: Option, /// Whether the message has display content that should be displayed to users. #[serde(rename="hasDisplayContent")] + pub has_display_content: Option, /// no description provided #[serde(rename="liveChatId")] + pub live_chat_id: Option, /// Details about the Member Milestone Chat event, this is only set if the type is 'memberMilestoneChatEvent'. #[serde(rename="memberMilestoneChatDetails")] + pub member_milestone_chat_details: Option, /// no description provided #[serde(rename="messageDeletedDetails")] + pub message_deleted_details: Option, /// no description provided #[serde(rename="messageRetractedDetails")] + pub message_retracted_details: Option, /// Details about the New Member Announcement event, this is only set if the type is 'newSponsorEvent'. Please note that "member" is the new term for "sponsor". #[serde(rename="newSponsorDetails")] + pub new_sponsor_details: Option, /// The date and time when the message was orignally published. #[serde(rename="publishedAt")] - pub published_at: Option, + + pub published_at: Option>, /// Details about the Super Chat event, this is only set if the type is 'superChatEvent'. #[serde(rename="superChatDetails")] + pub super_chat_details: Option, /// Details about the Super Sticker event, this is only set if the type is 'superStickerEvent'. #[serde(rename="superStickerDetails")] + pub super_sticker_details: Option, /// Details about the text message, this is only set if the type is 'textMessageEvent'. #[serde(rename="textMessageDetails")] + pub text_message_details: Option, /// The type of message, this will always be present, it determines the contents of the message as well as which fields will be present. #[serde(rename="type")] + pub type_: Option, /// no description provided #[serde(rename="userBannedDetails")] + pub user_banned_details: Option, } @@ -3048,15 +3637,20 @@ impl client::Part for LiveChatMessageSnippet {} /// * [insert live chat moderators](LiveChatModeratorInsertCall) (request|response) /// * [list live chat moderators](LiveChatModeratorListCall) (none) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatModerator { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube assigns to uniquely identify the moderator. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatModerator". + pub kind: Option, /// The snippet object contains basic details about the moderator. + pub snippet: Option, } @@ -3088,31 +3682,41 @@ impl client::ToParts for LiveChatModerator { /// /// * [list live chat moderators](LiveChatModeratorListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatModeratorListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of moderators that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatModeratorListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] + pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -3142,13 +3746,16 @@ impl client::ToParts for LiveChatModeratorListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatModeratorSnippet { /// The ID of the live chat this moderator can act on. #[serde(rename="liveChatId")] + pub live_chat_id: Option, /// Details about the moderator. #[serde(rename="moderatorDetails")] + pub moderator_details: Option, } @@ -3159,13 +3766,16 @@ impl client::Part for LiveChatModeratorSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatNewSponsorDetails { /// If the viewer just had upgraded from a lower level. For viewers that were not members at the time of purchase, this field is false. #[serde(rename="isUpgrade")] + pub is_upgrade: Option, /// The name of the Level that the viewer just had joined. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled. #[serde(rename="memberLevelName")] + pub member_level_name: Option, } @@ -3176,20 +3786,27 @@ impl client::Part for LiveChatNewSponsorDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatSuperChatDetails { /// A rendered string that displays the fund amount and currency to the user. #[serde(rename="amountDisplayString")] + pub amount_display_string: Option, /// The amount purchased by the user, in micros (1,750,000 micros = 1.75). #[serde(rename="amountMicros")] - pub amount_micros: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub amount_micros: Option, /// The currency in which the purchase was made. + pub currency: Option, /// The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1. + pub tier: Option, /// The comment added by the user to this Super Chat event. #[serde(rename="userComment")] + pub user_comment: Option, } @@ -3200,20 +3817,27 @@ impl client::Part for LiveChatSuperChatDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatSuperStickerDetails { /// A rendered string that displays the fund amount and currency to the user. #[serde(rename="amountDisplayString")] + pub amount_display_string: Option, /// The amount purchased by the user, in micros (1,750,000 micros = 1.75). #[serde(rename="amountMicros")] - pub amount_micros: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub amount_micros: Option, /// The currency in which the purchase was made. + pub currency: Option, /// Information about the Super Sticker. #[serde(rename="superStickerMetadata")] + pub super_sticker_metadata: Option, /// The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1. + pub tier: Option, } @@ -3224,10 +3848,12 @@ impl client::Part for LiveChatSuperStickerDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatTextMessageDetails { /// The user's message. #[serde(rename="messageText")] + pub message_text: Option, } @@ -3238,16 +3864,21 @@ impl client::Part for LiveChatTextMessageDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatUserBannedMessageDetails { /// The duration of the ban. This property is only present if the banType is temporary. #[serde(rename="banDurationSeconds")] - pub ban_duration_seconds: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub ban_duration_seconds: Option, /// The type of ban. #[serde(rename="banType")] + pub ban_type: Option, /// The details of the user that was banned. #[serde(rename="bannedUserDetails")] + pub banned_user_details: Option, } @@ -3266,22 +3897,30 @@ impl client::Part for LiveChatUserBannedMessageDetails {} /// * [list live streams](LiveStreamListCall) (none) /// * [update live streams](LiveStreamUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStream { /// The cdn object defines the live stream's content delivery network (CDN) settings. These settings provide details about the manner in which you stream your content to YouTube. + pub cdn: Option, /// The content_details object contains information about the stream, including the closed captions ingestion URL. #[serde(rename="contentDetails")] + pub content_details: Option, /// Etag of this resource. + pub etag: Option, /// The ID that YouTube assigns to uniquely identify the stream. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStream". + pub kind: Option, /// The snippet object contains basic details about the stream, including its channel, title, and description. + pub snippet: Option, /// The status object contains information about live stream's status. + pub status: Option, } @@ -3311,16 +3950,21 @@ impl client::ToParts for LiveStream { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamConfigurationIssue { /// The long-form description of the issue and how to resolve it. + pub description: Option, /// The short-form reason for this issue. + pub reason: Option, /// How severe this issue is to the stream. + pub severity: Option, /// The kind of error happening. #[serde(rename="type")] + pub type_: Option, } @@ -3331,13 +3975,16 @@ impl client::Part for LiveStreamConfigurationIssue {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamContentDetails { /// The ingestion URL where the closed captions of this stream are sent. #[serde(rename="closedCaptionsIngestionUrl")] + pub closed_captions_ingestion_url: Option, /// Indicates whether the stream is reusable, which means that it can be bound to multiple broadcasts. It is common for broadcasters to reuse the same stream for many different broadcasts if those broadcasts occur at different times. If you set this value to false, then the stream will not be reusable, which means that it can only be bound to one broadcast. Non-reusable streams differ from reusable streams in the following ways: - A non-reusable stream can only be bound to one broadcast. - A non-reusable stream might be deleted by an automated process after the broadcast ends. - The liveStreams.list method does not list non-reusable streams if you call the method and set the mine parameter to true. The only way to use that method to retrieve the resource for a non-reusable stream is to use the id parameter to identify the stream. #[serde(rename="isReusable")] + pub is_reusable: Option, } @@ -3348,15 +3995,20 @@ impl client::Part for LiveStreamContentDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamHealthStatus { /// The configurations issues on this stream #[serde(rename="configurationIssues")] + pub configuration_issues: Option>, /// The last time this status was updated (in seconds) #[serde(rename="lastUpdateTimeSeconds")] - pub last_update_time_seconds: Option, + + #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] + pub last_update_time_seconds: Option, /// The status code of this stream + pub status: Option, } @@ -3372,31 +4024,41 @@ impl client::Part for LiveStreamHealthStatus {} /// /// * [list live streams](LiveStreamListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of live streams that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStreamListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// no description provided #[serde(rename="pageInfo")] + pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] + pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -3426,20 +4088,26 @@ impl client::ToParts for LiveStreamListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamSnippet { /// The ID that YouTube uses to uniquely identify the channel that is transmitting the stream. #[serde(rename="channelId")] + pub channel_id: Option, /// The stream's description. The value cannot be longer than 10000 characters. + pub description: Option, /// no description provided #[serde(rename="isDefaultStream")] + pub is_default_stream: Option, /// The date and time that the stream was created. #[serde(rename="publishedAt")] - pub published_at: Option, + + pub published_at: Option>, /// The stream's title. The value must be between 1 and 128 characters long. + pub title: Option, } @@ -3450,13 +4118,16 @@ impl client::Part for LiveStreamSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamStatus { /// The health status of the stream. #[serde(rename="healthStatus")] + pub health_status: Option, /// no description provided #[serde(rename="streamStatus")] + pub stream_status: Option, } @@ -3467,14 +4138,18 @@ impl client::Part for LiveStreamStatus {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LocalizedProperty { /// no description provided + pub default: Option, /// The language of the default property. #[serde(rename="defaultLanguage")] + pub default_language: Option, /// no description provided + pub localized: Option>, } @@ -3485,11 +4160,14 @@ impl client::Part for LocalizedProperty {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LocalizedString { /// no description provided + pub language: Option, /// no description provided + pub value: Option, } @@ -3505,13 +4183,17 @@ impl client::Part for LocalizedString {} /// /// * [list members](MemberListCall) (none) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Member { /// Etag of this resource. + pub etag: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#member". + pub kind: Option, /// The snippet object contains basic details about the member. + pub snippet: Option, } @@ -3540,28 +4222,37 @@ impl client::ToParts for Member { /// /// * [list members](MemberListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MemberListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of members that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#memberListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// no description provided #[serde(rename="pageInfo")] + pub page_info: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -3590,16 +4281,20 @@ impl client::ToParts for MemberListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MemberSnippet { /// The id of the channel that's offering memberships. #[serde(rename="creatorChannelId")] + pub creator_channel_id: Option, /// Details about the member. #[serde(rename="memberDetails")] + pub member_details: Option, /// Details about the user's membership. #[serde(rename="membershipsDetails")] + pub memberships_details: Option, } @@ -3610,22 +4305,28 @@ impl client::Part for MemberSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsDetails { /// Ids of all levels that the user has access to. This includes the currently active level and all other levels that are included because of a higher purchase. #[serde(rename="accessibleLevels")] + pub accessible_levels: Option>, /// Id of the highest level that the user has access to at the moment. #[serde(rename="highestAccessibleLevel")] + pub highest_accessible_level: Option, /// Display name for the highest level that the user has access to at the moment. #[serde(rename="highestAccessibleLevelDisplayName")] + pub highest_accessible_level_display_name: Option, /// Data about memberships duration without taking into consideration pricing levels. #[serde(rename="membershipsDuration")] + pub memberships_duration: Option, /// Data about memberships duration on particular pricing levels. #[serde(rename="membershipsDurationAtLevels")] + pub memberships_duration_at_levels: Option>, } @@ -3636,13 +4337,16 @@ impl client::Part for MembershipsDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsDuration { /// The date and time when the user became a continuous member across all levels. #[serde(rename="memberSince")] + pub member_since: Option, /// The cumulative time the user has been a member across all levels in complete months (the time is rounded down to the nearest integer). #[serde(rename="memberTotalDurationMonths")] + pub member_total_duration_months: Option, } @@ -3653,15 +4357,19 @@ impl client::Part for MembershipsDuration {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsDurationAtLevel { /// Pricing level ID. + pub level: Option, /// The date and time when the user became a continuous member for the given level. #[serde(rename="memberSince")] + pub member_since: Option, /// The cumulative time the user has been a member for the given level in complete months (the time is rounded down to the nearest integer). #[serde(rename="memberTotalDurationMonths")] + pub member_total_duration_months: Option, } @@ -3677,15 +4385,20 @@ impl client::Part for MembershipsDurationAtLevel {} /// /// * [list memberships levels](MembershipsLevelListCall) (none) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsLevel { /// Etag of this resource. + pub etag: Option, /// The ID that YouTube assigns to uniquely identify the memberships level. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#membershipsLevelListResponse". + pub kind: Option, /// The snippet object contains basic details about the level. + pub snippet: Option, } @@ -3715,19 +4428,25 @@ impl client::ToParts for MembershipsLevel { /// /// * [list memberships levels](MembershipsLevelListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsLevelListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of pricing levels offered by a creator to the fans. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#membershipsLevelListResponse". + pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -3753,13 +4472,16 @@ impl client::ToParts for MembershipsLevelListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsLevelSnippet { /// The id of the channel that's offering channel memberships. #[serde(rename="creatorChannelId")] + pub creator_channel_id: Option, /// Details about the pricing level. #[serde(rename="levelDetails")] + pub level_details: Option, } @@ -3770,16 +4492,20 @@ impl client::Part for MembershipsLevelSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonitorStreamInfo { /// If you have set the enableMonitorStream property to true, then this property determines the length of the live broadcast delay. #[serde(rename="broadcastStreamDelayMs")] + pub broadcast_stream_delay_ms: Option, /// HTML code that embeds a player that plays the monitor stream. #[serde(rename="embedHtml")] + pub embed_html: Option, /// This value determines whether the monitor stream is enabled for the broadcast. If the monitor stream is enabled, then YouTube will broadcast the event content on a special stream intended only for the broadcaster's consumption. The broadcaster can use the stream to review the event content and also to identify the optimal times to insert cuepoints. You need to set this value to true if you intend to have a broadcast delay for your event. *Note:* This property cannot be updated once the broadcast is in the testing or live state. #[serde(rename="enableMonitorStream")] + pub enable_monitor_stream: Option, } @@ -3790,13 +4516,16 @@ impl client::Part for MonitorStreamInfo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PageInfo { /// The number of results included in the API response. #[serde(rename="resultsPerPage")] + pub results_per_page: Option, /// The total number of results in the result set. #[serde(rename="totalResults")] + pub total_results: Option, } @@ -3815,24 +4544,33 @@ impl client::Part for PageInfo {} /// * [list playlists](PlaylistListCall) (none) /// * [update playlists](PlaylistUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Playlist { /// The contentDetails object contains information like video count. #[serde(rename="contentDetails")] + pub content_details: Option, /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the playlist. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlist". + pub kind: Option, /// Localizations for different languages + pub localizations: Option>, /// The player object contains information that you would use to play the playlist in an embedded player. + pub player: Option, /// The snippet object contains basic details about the playlist, such as its title and description. + pub snippet: Option, /// The status object contains status information for the playlist. + pub status: Option, } @@ -3863,10 +4601,12 @@ impl client::ToParts for Playlist { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistContentDetails { /// The number of videos in the playlist. #[serde(rename="itemCount")] + pub item_count: Option, } @@ -3885,20 +4625,27 @@ impl client::Part for PlaylistContentDetails {} /// * [list playlist items](PlaylistItemListCall) (none) /// * [update playlist items](PlaylistItemUpdateCall) (request|response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItem { /// The contentDetails object is included in the resource if the included item is a YouTube video. The object contains additional information about the video. #[serde(rename="contentDetails")] + pub content_details: Option, /// Etag of this resource. + pub etag: Option, /// The ID that YouTube uses to uniquely identify the playlist item. + pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItem". + pub kind: Option, /// The snippet object contains basic details about the playlist item, such as its title and position in the playlist. + pub snippet: Option, /// The status object contains information about the playlist item's privacy status. + pub status: Option, } @@ -3927,22 +4674,28 @@ impl client::ToParts for PlaylistItem { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItemContentDetails { /// The time, measured in seconds from the start of the video, when the video should stop playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) By default, assume that the video.endTime is the end of the video. #[serde(rename="endAt")] + pub end_at: Option, /// A user-generated note for this item. + pub note: Option, /// The time, measured in seconds from the start of the video, when the video should start playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) The default value is 0. #[serde(rename="startAt")] + pub start_at: Option, /// The ID that YouTube uses to uniquely identify a video. To retrieve the video resource, set the id query parameter to this value in your API request. #[serde(rename="videoId")] + pub video_id: Option, /// The date and time that the video was published to YouTube. #[serde(rename="videoPublishedAt")] - pub video_published_at: Option, + + pub video_published_at: Option>, } impl client::Part for PlaylistItemContentDetails {} @@ -3957,31 +4710,41 @@ impl client::Part for PlaylistItemContentDetails {} /// /// * [list playlist items](PlaylistItemListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItemListResponse { /// no description provided + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of playlist items that match the request criteria. + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItemListResponse". Etag of this resource. + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] + pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -4011,36 +4774,48 @@ impl client::ToParts for PlaylistItemListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItemSnippet { /// The ID that YouTube uses to uniquely identify the user that added the item to the playlist. #[serde(rename="channelId")] + pub channel_id: Option, /// Channel title for the channel that the playlist item belongs to. #[serde(rename="channelTitle")] + pub channel_title: Option, /// The item's description. + pub description: Option, /// The ID that YouTube uses to uniquely identify thGe playlist that the playlist item is in. #[serde(rename="playlistId")] + pub playlist_id: Option, /// The order in which the item appears in the playlist. The value uses a zero-based index, so the first item has a position of 0, the second item has a position of 1, and so forth. + pub position: Option, /// The date and time that the item was added to the playlist. #[serde(rename="publishedAt")] - pub published_at: Option, + + pub published_at: Option>, /// The id object contains information that can be used to uniquely identify the resource that is included in the playlist as the playlist item. #[serde(rename="resourceId")] + pub resource_id: Option, /// A map of thumbnail images associated with the playlist item. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. + pub thumbnails: Option, /// The item's title. + pub title: Option, /// Channel id for the channel this video belongs to. #[serde(rename="videoOwnerChannelId")] + pub video_owner_channel_id: Option, /// Channel title for the channel this video belongs to. #[serde(rename="videoOwnerChannelTitle")] + pub video_owner_channel_title: Option, } @@ -4051,10 +4826,12 @@ impl client::Part for PlaylistItemSnippet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItemStatus { /// This resource's privacy status. #[serde(rename="privacyStatus")] + pub privacy_status: Option, } @@ -4070,31 +4847,41 @@ impl client::Part for PlaylistItemStatus {} /// /// * [list playlists](PlaylistListCall) (response) /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistListResponse { /// Etag of this resource. + pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] + pub event_id: Option, /// A list of playlists that match the request criteria + pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistListResponse". + pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] + pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] + pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] + pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] + pub visitor_id: Option, } @@ -4124,11 +4911,14 @@ impl client::ToParts for PlaylistListResponse { /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistLocalization { /// The localized strings for playlist's description. + pub description: Option, /// The localized strings for playlist's title. + pub title: Option, } @@ -4139,10 +4929,12 @@ impl client::Part for PlaylistLocalization {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// +#[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistPlayer { /// An