// DO NOT EDIT ! // This file was generated automatically from 'src/mako/api/lib.rs.in.mako' // DO NOT EDIT ! extern crate hyper; extern crate serde; extern crate serde_json; extern crate yup_oauth2 as oauth2; extern crate mime; extern crate url; mod cmn; use std::collections::HashMap; use std::cell::RefCell; use std::borrow::BorrowMut; use std::default::Default; use std::collections::BTreeMap; use serde_json as json; use std::io; use std::fs; use std::thread::sleep; use std::time::Duration; pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, ErrorResponse, remove_json_null_values}; // ############## // UTILITIES ### // ############ /// Identifies the an OAuth2 authorization scope. /// A scope is needed when requesting an /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { /// View private information of your YouTube channel relevant during the audit process with a YouTube partner PartnerChannelAudit, /// View your YouTube account Readonly, /// Manage your YouTube account Full, /// Manage your YouTube account ForceSsl, /// View and manage your assets and associated content on YouTube Partner, /// Manage your YouTube videos Upload, } impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { Scope::PartnerChannelAudit => "https://www.googleapis.com/auth/youtubepartner-channel-audit", Scope::Readonly => "https://www.googleapis.com/auth/youtube.readonly", Scope::Full => "https://www.googleapis.com/auth/youtube", Scope::ForceSsl => "https://www.googleapis.com/auth/youtube.force-ssl", Scope::Partner => "https://www.googleapis.com/auth/youtubepartner", Scope::Upload => "https://www.googleapis.com/auth/youtube.upload", } } } impl Default for Scope { fn default() -> Scope { Scope::Readonly } } // ######## // HUB ### // ###### /// Central instance to access all YouTube related resource activities /// /// # Examples /// /// Instantiate a new hub /// /// ```test_harness,no_run /// extern crate hyper; /// extern crate yup_oauth2 as oauth2; /// extern crate google_youtube3 as youtube3; /// use youtube3::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; /// use youtube3::YouTube; /// /// // Get an ApplicationSecret instance by some means. It contains the `client_id` and /// // `client_secret`, among other things. /// let secret: ApplicationSecret = Default::default(); /// // Instantiate the authenticator. It will choose a suitable authentication flow for you, /// // unless you replace `None` with the desired Flow. /// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about /// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and /// // retrieve them from storage. /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); /// let mut hub = YouTube::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.videos().list("part") /// .video_category_id("labore") /// .region_code("sea") /// .page_token("nonumy") /// .on_behalf_of_content_owner("dolores") /// .my_rating("gubergren") /// .max_results(6) /// .locale("aliquyam") /// .id("ea") /// .hl("no") /// .chart("justo") /// .doit(); /// /// match result { /// Err(e) => match e { /// // The Error enum provides details about what exactly happened. /// // You can also just use its `Debug`, `Display` or `Error` traits /// Error::HttpError(_) /// |Error::MissingAPIKey /// |Error::MissingToken(_) /// |Error::Cancelled /// |Error::UploadSizeLimitExceeded(_, _) /// |Error::Failure(_) /// |Error::BadRequest(_) /// |Error::FieldClash(_) /// |Error::JsonDecodeError(_, _) => println!("{}", e), /// }, /// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` pub struct YouTube { client: RefCell, auth: RefCell, _user_agent: String, } impl<'a, C, A> Hub for YouTube {} impl<'a, C, A> YouTube where C: BorrowMut, A: oauth2::GetToken { pub fn new(client: C, authenticator: A) -> YouTube { YouTube { client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/0.1.14".to_string(), } } pub fn activities(&'a self) -> ActivityMethods<'a, C, A> { ActivityMethods { hub: &self } } pub fn captions(&'a self) -> CaptionMethods<'a, C, A> { CaptionMethods { hub: &self } } pub fn channel_banners(&'a self) -> ChannelBannerMethods<'a, C, A> { ChannelBannerMethods { hub: &self } } pub fn channel_sections(&'a self) -> ChannelSectionMethods<'a, C, A> { ChannelSectionMethods { hub: &self } } pub fn channels(&'a self) -> ChannelMethods<'a, C, A> { ChannelMethods { hub: &self } } pub fn comment_threads(&'a self) -> CommentThreadMethods<'a, C, A> { CommentThreadMethods { hub: &self } } pub fn comments(&'a self) -> CommentMethods<'a, C, A> { CommentMethods { hub: &self } } pub fn fan_funding_events(&'a self) -> FanFundingEventMethods<'a, C, A> { FanFundingEventMethods { hub: &self } } pub fn guide_categories(&'a self) -> GuideCategoryMethods<'a, C, A> { GuideCategoryMethods { hub: &self } } pub fn i18n_languages(&'a self) -> I18nLanguageMethods<'a, C, A> { I18nLanguageMethods { hub: &self } } pub fn i18n_regions(&'a self) -> I18nRegionMethods<'a, C, A> { I18nRegionMethods { hub: &self } } pub fn live_broadcasts(&'a self) -> LiveBroadcastMethods<'a, C, A> { LiveBroadcastMethods { hub: &self } } pub fn live_chat_bans(&'a self) -> LiveChatBanMethods<'a, C, A> { LiveChatBanMethods { hub: &self } } pub fn live_chat_messages(&'a self) -> LiveChatMessageMethods<'a, C, A> { LiveChatMessageMethods { hub: &self } } pub fn live_chat_moderators(&'a self) -> LiveChatModeratorMethods<'a, C, A> { LiveChatModeratorMethods { hub: &self } } pub fn live_streams(&'a self) -> LiveStreamMethods<'a, C, A> { LiveStreamMethods { hub: &self } } pub fn playlist_items(&'a self) -> PlaylistItemMethods<'a, C, A> { PlaylistItemMethods { hub: &self } } pub fn playlists(&'a self) -> PlaylistMethods<'a, C, A> { PlaylistMethods { hub: &self } } pub fn search(&'a self) -> SearchMethods<'a, C, A> { SearchMethods { hub: &self } } pub fn sponsors(&'a self) -> SponsorMethods<'a, C, A> { SponsorMethods { hub: &self } } pub fn subscriptions(&'a self) -> SubscriptionMethods<'a, C, A> { SubscriptionMethods { hub: &self } } pub fn thumbnails(&'a self) -> ThumbnailMethods<'a, C, A> { ThumbnailMethods { hub: &self } } pub fn video_abuse_report_reasons(&'a self) -> VideoAbuseReportReasonMethods<'a, C, A> { VideoAbuseReportReasonMethods { hub: &self } } pub fn video_categories(&'a self) -> VideoCategoryMethods<'a, C, A> { VideoCategoryMethods { hub: &self } } pub fn videos(&'a self) -> VideoMethods<'a, C, A> { VideoMethods { hub: &self } } pub fn watermarks(&'a self) -> WatermarkMethods<'a, C, A> { WatermarkMethods { hub: &self } } /// Set the user-agent header field to use in all requests to the server. /// It defaults to `google-api-rust-client/0.1.14`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { let prev = self._user_agent.clone(); self._user_agent = agent_name; prev } } // ############ // SCHEMAS ### // ########## /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list subscriptions](struct.SubscriptionListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubscriptionListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#subscriptionListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of subscriptions that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for SubscriptionListResponse {} impl ToParts for SubscriptionListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// Describes original video file properties, including technical details about audio and video streams, but also metadata information like content length, digitization time, or geotagging information. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoFileDetails { /// The uploaded video file's combined (video and audio) bitrate in bits per second. #[serde(rename="bitrateBps")] pub bitrate_bps: Option, /// The uploaded video file's container format. pub container: Option, /// Geographic coordinates that identify the place where the uploaded video was recorded. Coordinates are defined using WGS 84. #[serde(rename="recordingLocation")] pub recording_location: Option, /// The uploaded file's type as detected by YouTube's video processing engine. Currently, YouTube only processes video files, but this field is present whether a video file or another type of file was uploaded. #[serde(rename="fileType")] pub file_type: Option, /// The date and time when the uploaded video file was created. The value is specified in ISO 8601 format. Currently, the following ISO 8601 formats are supported: /// - Date only: YYYY-MM-DD /// - Naive time: YYYY-MM-DDTHH:MM:SS /// - Time with timezone: YYYY-MM-DDTHH:MM:SS+HH:MM #[serde(rename="creationTime")] pub creation_time: Option, /// The length of the uploaded video in milliseconds. #[serde(rename="durationMs")] pub duration_ms: Option, /// The uploaded file's name. This field is present whether a video file or another type of file was uploaded. #[serde(rename="fileName")] pub file_name: Option, /// The uploaded file's size in bytes. This field is present whether a video file or another type of file was uploaded. #[serde(rename="fileSize")] pub file_size: Option, /// A list of video streams contained in the uploaded video file. Each item in the list contains detailed metadata about a video stream. #[serde(rename="videoStreams")] pub video_streams: Option>, /// A list of audio streams contained in the uploaded video file. Each item in the list contains detailed metadata about an audio stream. #[serde(rename="audioStreams")] pub audio_streams: Option>, } impl Part for VideoFileDetails {} /// Basic details about a playlist, including title, description and thumbnails. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistSnippet { /// The playlist's description. pub description: Option, /// The playlist's title. pub title: Option, /// The ID that YouTube uses to uniquely identify the channel that published the playlist. #[serde(rename="channelId")] pub channel_id: Option, /// The date and time that the playlist was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// Keyword tags associated with the playlist. pub tags: Option>, /// The channel title of the channel that the video belongs to. #[serde(rename="channelTitle")] pub channel_title: Option, /// The language of the playlist's default title and description. #[serde(rename="defaultLanguage")] pub default_language: Option, /// Localized title and description, read-only. pub localized: Option, /// A map of thumbnail images associated with the playlist. 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, } impl Part for PlaylistSnippet {} /// The auditDetails object encapsulates channel data that is relevant for YouTube Partners during the audit process. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelAuditDetails { /// Whether or not the channel has any copyright strikes. #[serde(rename="copyrightStrikesGoodStanding")] pub copyright_strikes_good_standing: Option, /// 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, /// Describes the general state of the channel. This field will always show if there are any issues whatsoever with the channel. Currently this field represents the result of the logical and operation over the community guidelines good standing, the copyright strikes good standing and the content ID claims good standing, but this may change in the future. #[serde(rename="overallGoodStanding")] pub overall_good_standing: Option, } impl Part for ChannelAuditDetails {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [set thumbnails](struct.ThumbnailSetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ThumbnailSetResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of thumbnails. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#thumbnailSetResponse". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl ResponseResult for ThumbnailSetResponse {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SponsorSnippet { /// Details about the sponsor. #[serde(rename="sponsorDetails")] pub sponsor_details: Option, /// The id of the channel being sponsored. #[serde(rename="channelId")] pub channel_id: Option, /// The date and time when the user became a sponsor. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="sponsorSince")] pub sponsor_since: Option, } impl Part for SponsorSnippet {} /// Branding properties for the channel view. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSettings { /// Specifies the channel description. pub description: Option, /// Specifies the channel title. pub title: Option, /// The country of the channel. pub country: Option, /// Whether the tab to browse the videos should be displayed. #[serde(rename="showBrowseView")] pub show_browse_view: Option, /// Title for the featured channels tab. #[serde(rename="featuredChannelsTitle")] pub featured_channels_title: Option, /// no description provided #[serde(rename="defaultLanguage")] pub default_language: Option, /// The trailer of the channel, for users that are not subscribers. #[serde(rename="unsubscribedTrailer")] pub unsubscribed_trailer: Option, /// The list of featured channels. #[serde(rename="featuredChannelsUrls")] pub featured_channels_urls: Option>, /// A prominent color that can be rendered on this channel page. #[serde(rename="profileColor")] pub profile_color: Option, /// Which content tab users should see when viewing the channel. #[serde(rename="defaultTab")] pub default_tab: 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, /// Lists keywords associated with the channel, comma-separated. pub keywords: Option, /// Whether related channels should be proposed. #[serde(rename="showRelatedChannels")] pub show_related_channels: 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, } impl Part for ChannelSettings {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatPollEditedDetails { /// no description provided pub items: Option>, /// no description provided pub prompt: Option, /// no description provided pub id: Option, } impl Part for LiveChatPollEditedDetails {} /// Brief description of the live stream cdn settings. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CdnSettings { /// The resolution of the inbound video data. pub resolution: Option, /// The format of the video stream that you are sending to Youtube. pub format: 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 frame rate of the inbound video data. #[serde(rename="frameRate")] pub frame_rate: Option, /// The method or protocol used to transmit the video stream. #[serde(rename="ingestionType")] pub ingestion_type: Option, } impl Part for CdnSettings {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageDeletedDetails { /// no description provided #[serde(rename="deletedMessageId")] pub deleted_message_id: Option, } impl Part for LiveChatMessageDeletedDetails {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list video abuse report reasons](struct.VideoAbuseReportReasonListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoAbuseReportReasonListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of valid abuse reasons that are used with video.ReportAbuse. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#videoAbuseReportReasonListResponse". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl ResponseResult for VideoAbuseReportReasonListResponse {} impl ToParts for VideoAbuseReportReasonListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.items.is_some() { r = r + "items,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Details about a resource which was added to a channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for ActivityContentDetailsChannelItem {} /// Basic details about an i18n language, such as language code and human-readable name. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nLanguageSnippet { /// The human-readable name of the language in the language itself. pub name: Option, /// A short BCP-47 code that uniquely identifies a language. pub hl: Option, } impl Part for I18nLanguageSnippet {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoRating { /// no description provided pub rating: Option, /// no description provided #[serde(rename="videoId")] pub video_id: Option, } impl Part for VideoRating {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list i18n regions](struct.I18nRegionListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nRegionListResponse { /// 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, /// Etag of this resource. pub etag: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl ResponseResult for I18nRegionListResponse {} impl ToParts for I18nRegionListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.items.is_some() { r = r + "items,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// A fanFundingEvent resource represents a fan funding event on a YouTube channel. Fan funding events occur when a user gives one-time monetary support to the channel owner. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list fan funding events](struct.FanFundingEventListCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FanFundingEvent { /// The snippet object contains basic details about the fan funding event. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#fanFundingEvent". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the fan funding event. pub id: Option, } impl Resource for FanFundingEvent {} impl ToParts for FanFundingEvent { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatTextMessageDetails { /// The user's message. #[serde(rename="messageText")] pub message_text: Option, } impl Part for LiveChatTextMessageDetails {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list playlists](struct.PlaylistListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of playlists that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for PlaylistListResponse {} impl ToParts for PlaylistListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// 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. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for ChannelConversionPing {} /// Describes an invideo promotion campaign consisting of multiple promoted items. A campaign belongs to a single channel_id. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoPromotion { /// The default temporal position within the video where the promoted item will be displayed. Can be overriden by more specific timing in the item. #[serde(rename="defaultTiming")] pub default_timing: Option, /// List of promoted items in decreasing priority. pub items: Option>, /// Indicates whether the channel's promotional campaign uses "smart timing." This feature attempts to show promotions at a point in the video when they are more likely to be clicked and less likely to disrupt the viewing experience. This feature also picks up a single promotion to show on each video. #[serde(rename="useSmartTiming")] pub use_smart_timing: Option, /// The spatial position within the video where the promoted item will be displayed. pub position: Option, } impl Part for InvideoPromotion {} /// A playlistItem resource identifies another resource, such as a video, that is included in a playlist. In addition, the playlistItem resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. /// /// YouTube uses playlists to identify special collections of videos for a channel, such as: /// - uploaded videos /// - favorite videos /// - positively rated (liked) videos /// - watch history /// - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. /// /// You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. For example, if a user gives a positive rating to a video, you would insert that video into the liked videos playlist for that user's channel. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [insert playlist items](struct.PlaylistItemInsertCall.html) (request|response) /// * [update playlist items](struct.PlaylistItemUpdateCall.html) (request|response) /// * [list playlist items](struct.PlaylistItemListCall.html) (none) /// * [delete playlist items](struct.PlaylistItemDeleteCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItem { /// The status object contains information about the playlist item's privacy status. pub status: Option, /// The snippet object contains basic details about the playlist item, such as its title and position in the playlist. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItem". pub kind: Option, /// Etag of this resource. pub etag: Option, /// 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, /// The ID that YouTube uses to uniquely identify the playlist item. pub id: Option, } impl RequestValue for PlaylistItem {} impl Resource for PlaylistItem {} impl ResponseResult for PlaylistItem {} impl ToParts for PlaylistItem { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.status.is_some() { r = r + "status,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// Freebase topic information related to the channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelTopicDetails { /// 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>, } impl Part for ChannelTopicDetails {} /// A i18nRegion resource identifies a region where YouTube is available. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list i18n regions](struct.I18nRegionListCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nRegion { /// The snippet object contains basic details about the i18n region, such as region code and human-readable name. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nRegion". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the i18n region. pub id: Option, } impl Resource for I18nRegion {} impl ToParts for I18nRegion { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// Internal representation of thumbnails for a YouTube resource. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ThumbnailDetails { /// The default image for this resource. pub default: Option, /// The high quality image for this resource. pub high: Option, /// The medium quality image for this resource. pub medium: Option, /// The maximum resolution quality image for this resource. pub maxres: Option, /// The standard quality image for this resource. pub standard: Option, } impl Part for ThumbnailDetails {} /// Details about monetization of a YouTube Video. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoMonetizationDetails { /// The value of access indicates whether the video can be monetized or not. pub access: Option, } impl Part for VideoMonetizationDetails {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelContentDetailsRelatedPlaylists { /// The ID of the playlist that contains the channel"s uploaded videos. Use the videos.insert method to upload new videos and the videos.delete method to delete previously uploaded videos. pub uploads: Option, /// The ID of the playlist that contains the channel"s watch history. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list. #[serde(rename="watchHistory")] pub watch_history: Option, /// The ID of the playlist that contains the channel"s liked videos. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list. pub likes: Option, /// The ID of the playlist that contains the channel"s favorite videos. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list. pub favorites: Option, /// The ID of the playlist that contains the channel"s watch later playlist. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list. #[serde(rename="watchLater")] pub watch_later: Option, } impl NestedType for ChannelContentDetailsRelatedPlaylists {} impl Part for ChannelContentDetailsRelatedPlaylists {} /// Basic details about a video category, such as its localized title. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoAbuseReportReasonSnippet { /// The secondary reasons associated with this reason, if any are available. (There might be 0 or more.) #[serde(rename="secondaryReasons")] pub secondary_reasons: Option>, /// The localized label belonging to this abuse report reason. pub label: Option, } impl Part for VideoAbuseReportReasonSnippet {} /// Describes processing status and progress and availability of some other Video resource parts. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoProcessingDetails { /// This value indicates whether file details are available for the uploaded video. You can retrieve a video's file details by requesting the fileDetails part in your videos.list() request. #[serde(rename="fileDetailsAvailability")] pub file_details_availability: Option, /// This value indicates whether video editing suggestions, which might improve video quality or the playback experience, are available for the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. #[serde(rename="editorSuggestionsAvailability")] pub editor_suggestions_availability: Option, /// The video's processing status. This value indicates whether YouTube was able to process the video or if the video is still being processed. #[serde(rename="processingStatus")] pub processing_status: Option, /// This value indicates whether the video processing engine has generated suggestions that might improve YouTube's ability to process the the video, warnings that explain video processing problems, or errors that cause video processing problems. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. #[serde(rename="processingIssuesAvailability")] pub processing_issues_availability: Option, /// The reason that YouTube failed to process the video. This property will only have a value if the processingStatus property's value is failed. #[serde(rename="processingFailureReason")] pub processing_failure_reason: Option, /// This value indicates whether thumbnail images have been generated for the video. #[serde(rename="thumbnailsAvailability")] pub thumbnails_availability: Option, /// The processingProgress object contains information about the progress YouTube has made in processing the video. The values are really only relevant if the video's processing status is processing. #[serde(rename="processingProgress")] pub processing_progress: Option, /// This value indicates whether keyword (tag) suggestions are available for the video. Tags can be added to a video's metadata to make it easier for other users to find the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. #[serde(rename="tagSuggestionsAvailability")] pub tag_suggestions_availability: Option, } impl Part for VideoProcessingDetails {} /// The conversionPings object encapsulates information about conversion pings that need to be respected by the channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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>, } impl Part for ChannelConversionPings {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoAbuseReportSecondaryReason { /// The ID of this abuse report secondary reason. pub id: Option, /// The localized label for this abuse report secondary reason. pub label: Option, } impl Part for VideoAbuseReportSecondaryReason {} /// Details about the content to witch a subscription refers. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubscriptionContentDetails { /// The number of new items in the subscription since its content was last read. #[serde(rename="newItemCount")] pub new_item_count: Option, /// The type of activity this subscription is for (only uploads, everything). #[serde(rename="activityType")] pub activity_type: Option, /// The approximate number of items that the subscription points to. #[serde(rename="totalItemCount")] pub total_item_count: Option, } impl Part for SubscriptionContentDetails {} /// A liveChatMessage resource represents a chat message in a YouTube Live Chat. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [delete live chat messages](struct.LiveChatMessageDeleteCall.html) (none) /// * [list live chat messages](struct.LiveChatMessageListCall.html) (none) /// * [insert live chat messages](struct.LiveChatMessageInsertCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessage { /// The snippet object contains basic details about the message. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The authorDetails object contains basic details about the user that posted this message. #[serde(rename="authorDetails")] pub author_details: Option, /// The ID that YouTube assigns to uniquely identify the message. pub id: Option, } impl RequestValue for LiveChatMessage {} impl Resource for LiveChatMessage {} impl ResponseResult for LiveChatMessage {} impl ToParts for LiveChatMessage { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.author_details.is_some() { r = r + "authorDetails,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list channel sections](struct.ChannelSectionListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionListResponse { /// 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, /// Etag of this resource. pub etag: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl ResponseResult for ChannelSectionListResponse {} impl ToParts for ChannelSectionListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.items.is_some() { r = r + "items,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Comments written in (direct or indirect) reply to the top level comment. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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>, } impl Part for CommentThreadReplies {} /// DEPRECATED Region restriction of the video. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoContentDetailsRegionRestriction { /// A list of region codes that identify countries where the video is viewable. If this property is present and a country is not listed in its value, then the video is blocked from appearing in that country. If this property is present and contains an empty list, the video is blocked in all countries. pub allowed: Option>, /// A list of region codes that identify countries where the video is blocked. If this property is present and a country is not listed in its value, then the video is viewable in that country. If this property is present and contains an empty list, the video is viewable in all countries. pub blocked: Option>, } impl Part for VideoContentDetailsRegionRestriction {} /// Basic details about a subscription, including title, description and thumbnails of the subscribed item. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubscriptionSnippet { /// The subscription's details. pub description: Option, /// The subscription's title. pub title: Option, /// The id object contains information about the channel that the user subscribed to. #[serde(rename="resourceId")] pub resource_id: Option, /// A map of thumbnail images associated with the video. 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 ID that YouTube uses to uniquely identify the subscriber's channel. #[serde(rename="channelId")] pub channel_id: Option, /// The date and time that the subscription was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// Channel title for the channel that the subscription belongs to. #[serde(rename="channelTitle")] pub channel_title: Option, } impl Part for SubscriptionSnippet {} /// Basic details about a caption track, such as its language and name. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CaptionSnippet { /// The caption track's status. pub status: 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, /// The type of audio track associated with the caption track. #[serde(rename="audioTrackType")] pub audio_track_type: Option, /// The language of the caption track. The property value is a BCP-47 language tag. pub language: Option, /// The ID that YouTube uses to uniquely identify the video associated with the caption track. #[serde(rename="videoId")] pub video_id: 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. #[serde(rename="isDraft")] pub is_draft: 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, /// The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="lastUpdated")] pub last_updated: Option, /// The caption track's type. #[serde(rename="trackKind")] pub track_kind: 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 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, /// The name of the caption track. The name is intended to be visible to the user as an option during playback. pub name: Option, } impl Part for CaptionSnippet {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageRetractedDetails { /// no description provided #[serde(rename="retractedMessageId")] pub retracted_message_id: Option, } impl Part for LiveChatMessageRetractedDetails {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list live chat messages](struct.LiveChatMessageListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessageListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of live chat messages. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, /// The date and time when the underlying stream went offline. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="offlineAt")] pub offline_at: Option, } impl ResponseResult for LiveChatMessageListResponse {} impl ToParts for LiveChatMessageListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.polling_interval_millis.is_some() { r = r + "pollingIntervalMillis,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.offline_at.is_some() { r = r + "offlineAt,"; } r.pop(); r } } /// Basic details about an i18n region, such as region code and human-readable name. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for I18nRegionSnippet {} /// Details about a social network post. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsSocial { /// The resourceId object encapsulates information that identifies the resource associated with a social network post. #[serde(rename="resourceId")] pub resource_id: Option, /// An image of the post's author. #[serde(rename="imageUrl")] pub image_url: Option, /// The name of the social network. #[serde(rename="type")] pub type_: Option, /// The URL of the social network post. #[serde(rename="referenceUrl")] pub reference_url: Option, /// The author of the social network post. pub author: Option, } impl Part for ActivityContentDetailsSocial {} /// Information about a resource that received a comment. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for ActivityContentDetailsComment {} /// Basic details about a guide category. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GuideCategorySnippet { /// no description provided #[serde(rename="channelId")] pub channel_id: Option, /// Description of the guide category. pub title: Option, } impl Part for GuideCategorySnippet {} /// Basic details about a video, including title, description, uploader, thumbnails and category. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoSnippet { /// The video's description. pub description: Option, /// A list of keyword tags associated with the video. Tags may contain spaces. pub tags: Option>, /// The default_audio_language property specifies the language spoken in the video's default audio track. #[serde(rename="defaultAudioLanguage")] pub default_audio_language: Option, /// The ID that YouTube uses to uniquely identify the channel that the video was uploaded to. #[serde(rename="channelId")] pub channel_id: Option, /// The date and time that the video was uploaded. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// Indicates if the video is an upcoming/active live broadcast. Or it's "none" if the video is not an upcoming/active live broadcast. #[serde(rename="liveBroadcastContent")] pub live_broadcast_content: Option, /// The language of the videos's default snippet. #[serde(rename="defaultLanguage")] pub default_language: Option, /// A map of thumbnail images associated with the video. 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 video's title. pub title: Option, /// The YouTube video category associated with the video. #[serde(rename="categoryId")] pub category_id: Option, /// Localized snippet selected with the hl parameter. If no such localization exists, this field is populated with the default snippet. (Read-only) pub localized: Option, /// Channel title for the channel that the video belongs to. #[serde(rename="channelTitle")] pub channel_title: Option, } impl Part for VideoSnippet {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageSnippet { /// 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, /// no description provided #[serde(rename="messageRetractedDetails")] pub message_retracted_details: 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, /// The date and time when the message was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// no description provided #[serde(rename="userBannedDetails")] pub user_banned_details: Option, /// no description provided #[serde(rename="liveChatId")] pub live_chat_id: Option, /// 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 messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action #[serde(rename="authorChannelId")] pub author_channel_id: Option, /// no description provided #[serde(rename="pollEditedDetails")] pub poll_edited_details: Option, /// Details about the text message, this is only set if the type is 'textMessageEvent'. #[serde(rename="textMessageDetails")] pub text_message_details: Option, /// no description provided #[serde(rename="messageDeletedDetails")] pub message_deleted_details: Option, /// no description provided #[serde(rename="pollVotedDetails")] pub poll_voted_details: Option, /// no description provided #[serde(rename="pollOpenedDetails")] pub poll_opened_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="pollClosedDetails")] pub poll_closed_details: Option, } impl Part for LiveChatMessageSnippet {} /// Detailed settings of a stream. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamContentDetails { /// 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, /// The ingestion URL where the closed captions of this stream are sent. #[serde(rename="closedCaptionsIngestionUrl")] pub closed_captions_ingestion_url: Option, } impl Part for LiveStreamContentDetails {} /// A guideCategory resource identifies a category that YouTube algorithmically assigns based on a channel's content or other indicators, such as the channel's popularity. The list is similar to video categories, with the difference being that a video's uploader can assign a video category but only YouTube can assign a channel category. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GuideCategory { /// The snippet object contains basic details about the category, such as its title. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#guideCategory". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the guide category. pub id: Option, } impl Part for GuideCategory {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelProfileDetails { /// The YouTube channel ID. #[serde(rename="channelId")] pub channel_id: Option, /// The channel's display name. #[serde(rename="displayName")] pub display_name: Option, /// The channel's URL. #[serde(rename="channelUrl")] pub channel_url: Option, /// The channels's avatar URL. #[serde(rename="profileImageUrl")] pub profile_image_url: Option, } impl Part for ChannelProfileDetails {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list i18n languages](struct.I18nLanguageListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nLanguageListResponse { /// 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, /// Etag of this resource. pub etag: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl ResponseResult for I18nLanguageListResponse {} impl ToParts for I18nLanguageListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.items.is_some() { r = r + "items,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Information about a channel that a user subscribed to. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for ActivityContentDetailsSubscription {} /// Information about a video stream. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoFileDetailsVideoStream { /// The video stream's bitrate, in bits per second. #[serde(rename="bitrateBps")] pub bitrate_bps: Option, /// A value that uniquely identifies a video vendor. Typically, the value is a four-letter vendor code. pub vendor: Option, /// The video codec that the stream uses. pub codec: Option, /// The encoded video content's width in pixels. You can calculate the video's encoding aspect ratio as width_pixels / height_pixels. #[serde(rename="widthPixels")] pub width_pixels: Option, /// The encoded video content's height in pixels. #[serde(rename="heightPixels")] pub height_pixels: Option, /// The video content's display aspect ratio, which specifies the aspect ratio in which the video should be displayed. #[serde(rename="aspectRatio")] pub aspect_ratio: Option, /// The amount that YouTube needs to rotate the original source content to properly display the video. pub rotation: Option, /// The video stream's frame rate, in frames per second. #[serde(rename="frameRateFps")] pub frame_rate_fps: Option, } impl Part for VideoFileDetailsVideoStream {} /// A thumbnail is an image representing a YouTube resource. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [set thumbnails](struct.ThumbnailSetCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Thumbnail { /// The thumbnail image's URL. pub url: Option, /// (Optional) Width of the thumbnail image. pub width: Option, /// (Optional) Height of the thumbnail image. pub height: Option, } impl Resource for Thumbnail {} /// A channel resource contains information about a YouTube channel. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list channels](struct.ChannelListCall.html) (none) /// * [update channels](struct.ChannelUpdateCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Channel { /// The status object encapsulates information about the privacy status of the channel. pub status: Option, /// The invideoPromotion object encapsulates information about promotion campaign associated with the channel. #[serde(rename="invideoPromotion")] pub invideo_promotion: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channel". pub kind: Option, /// The statistics object encapsulates statistics for the channel. pub statistics: 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 topicDetails object encapsulates information about Freebase topics associated with the channel. #[serde(rename="topicDetails")] pub topic_details: Option, /// The contentDetails object encapsulates information about the channel's content. #[serde(rename="contentDetails")] pub content_details: Option, /// The brandingSettings object encapsulates information about the branding of the channel. #[serde(rename="brandingSettings")] pub branding_settings: Option, /// The conversionPings object encapsulates information about conversion pings that need to be respected by the channel. #[serde(rename="conversionPings")] pub conversion_pings: Option, /// The snippet object contains basic details about the channel, such as its title, description, and thumbnail images. pub snippet: Option, /// The auditionDetails object encapsulates channel data that is relevant for YouTube Partners during the audition process. #[serde(rename="auditDetails")] pub audit_details: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the channel. pub id: Option, /// Localizations for different languages pub localizations: Option>, } impl RequestValue for Channel {} impl Resource for Channel {} impl ResponseResult for Channel {} impl ToParts for Channel { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.status.is_some() { r = r + "status,"; } if self.invideo_promotion.is_some() { r = r + "invideoPromotion,"; } if self.kind.is_some() { r = r + "kind,"; } if self.statistics.is_some() { r = r + "statistics,"; } if self.content_owner_details.is_some() { r = r + "contentOwnerDetails,"; } if self.topic_details.is_some() { r = r + "topicDetails,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.branding_settings.is_some() { r = r + "brandingSettings,"; } if self.conversion_pings.is_some() { r = r + "conversionPings,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.audit_details.is_some() { r = r + "auditDetails,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.localizations.is_some() { r = r + "localizations,"; } r.pop(); r } } /// Channel localization setting /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for ChannelLocalization {} /// Statistics about the live broadcast. These represent a snapshot of the values at the time of the request. Statistics are only returned for live broadcasts. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastStatistics { /// The number of viewers currently watching the broadcast. The property and its value will be present if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video. Note that YouTube stops tracking the number of concurrent viewers for a broadcast when the broadcast ends. So, this property would not identify the number of viewers watching an archived video of a live broadcast that already ended. #[serde(rename="concurrentViewers")] pub concurrent_viewers: Option, /// 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, } impl Part for LiveBroadcastStatistics {} /// A search result contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchResult { /// The snippet object contains basic details about a search result, such as its title or description. For example, if the search result is a video, then the title will be the video's title and the description will be the video's description. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#searchResult". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The id object contains information that can be used to uniquely identify the resource that matches the search request. pub id: Option, } impl Part for SearchResult {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list video categories](struct.VideoCategoryListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoCategoryListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#videoCategoryListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of video categories that can be associated with YouTube videos. In this map, the video category ID is the map key, and its value is the corresponding videoCategory resource. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for VideoCategoryListResponse {} impl ToParts for VideoCategoryListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// A liveChatBan resource represents a ban for a YouTube live chat. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [insert live chat bans](struct.LiveChatBanInsertCall.html) (request|response) /// * [delete live chat bans](struct.LiveChatBanDeleteCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatBan { /// The snippet object contains basic details about the ban. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatBan". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the ban. pub id: Option, } impl RequestValue for LiveChatBan {} impl Resource for LiveChatBan {} impl ResponseResult for LiveChatBan {} impl ToParts for LiveChatBan { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// Video processing progress and completion time estimate. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoProcessingDetailsProcessingProgress { /// An estimate of the amount of time, in millseconds, that YouTube needs to finish processing the video. #[serde(rename="timeLeftMs")] pub time_left_ms: Option, /// The number of parts of the video that YouTube has already processed. You can estimate the percentage of the video that YouTube has already processed by calculating: /// 100 * parts_processed / parts_total /// /// Note that since the estimated number of parts could increase without a corresponding increase in the number of parts that have already been processed, it is possible that the calculated progress could periodically decrease while YouTube processes a video. #[serde(rename="partsProcessed")] pub parts_processed: Option, /// An estimate of the total number of parts that need to be processed for the video. The number may be updated with more precise estimates while YouTube processes the video. #[serde(rename="partsTotal")] pub parts_total: Option, } impl Part for VideoProcessingDetailsProcessingProgress {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list videos](struct.VideoListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#videoListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of videos that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for VideoListResponse {} impl ToParts for VideoListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LanguageTag { /// no description provided pub value: Option, } impl Part for LanguageTag {} /// A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [insert subscriptions](struct.SubscriptionInsertCall.html) (request|response) /// * [list subscriptions](struct.SubscriptionListCall.html) (none) /// * [delete subscriptions](struct.SubscriptionDeleteCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Subscription { /// The snippet object contains basic details about the subscription, including its title and the channel that the user subscribed to. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#subscription". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The contentDetails object contains basic statistics about the subscription. #[serde(rename="contentDetails")] pub content_details: Option, /// The subscriberSnippet object contains basic details about the sbuscriber. #[serde(rename="subscriberSnippet")] pub subscriber_snippet: Option, /// The ID that YouTube uses to uniquely identify the subscription. pub id: Option, } impl RequestValue for Subscription {} impl Resource for Subscription {} impl ResponseResult for Subscription {} impl ToParts for Subscription { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.subscriber_snippet.is_some() { r = r + "subscriberSnippet,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamSnippet { /// no description provided #[serde(rename="isDefaultStream")] pub is_default_stream: Option, /// 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, /// The date and time that the stream was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// The stream's title. The value must be between 1 and 128 characters long. pub title: Option, } impl Part for LiveStreamSnippet {} /// JSON template for the status part of a channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelStatus { /// Privacy status of the channel. #[serde(rename="privacyStatus")] pub privacy_status: Option, /// 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 #[serde(rename="longUploadsStatus")] pub long_uploads_status: Option, } impl Part for ChannelStatus {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list channels](struct.ChannelListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of channels that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for ChannelListResponse {} impl ToParts for ChannelListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [delete channel sections](struct.ChannelSectionDeleteCall.html) (none) /// * [update channel sections](struct.ChannelSectionUpdateCall.html) (request|response) /// * [list channel sections](struct.ChannelSectionListCall.html) (none) /// * [insert channel sections](struct.ChannelSectionInsertCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSection { /// The snippet object contains basic details about the channel section, such as its type, style and title. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelSection". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The targeting object contains basic targeting settings about the channel section. pub targeting: Option, /// 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, /// The ID that YouTube uses to uniquely identify the channel section. pub id: Option, /// Localizations for different languages pub localizations: Option>, } impl RequestValue for ChannelSection {} impl Resource for ChannelSection {} impl ResponseResult for ChannelSection {} impl ToParts for ChannelSection { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.targeting.is_some() { r = r + "targeting,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.id.is_some() { r = r + "id,"; } if self.localizations.is_some() { r = r + "localizations,"; } r.pop(); r } } /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatFanFundingEventDetails { /// The currency in which the fund was made. pub currency: Option, /// 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, /// The comment added by the user to this fan funding event. #[serde(rename="userComment")] pub user_comment: Option, } impl Part for LiveChatFanFundingEventDetails {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list live broadcasts](struct.LiveBroadcastListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveBroadcastListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of broadcasts that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for LiveBroadcastListResponse {} impl ToParts for LiveBroadcastListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list captions](struct.CaptionListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CaptionListResponse { /// 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, /// Etag of this resource. pub etag: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl ResponseResult for CaptionListResponse {} impl ToParts for CaptionListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.items.is_some() { r = r + "items,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Brief description of the live stream status. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamStatus { /// no description provided #[serde(rename="streamStatus")] pub stream_status: Option, /// The health status of the stream. #[serde(rename="healthStatus")] pub health_status: Option, } impl Part for LiveStreamStatus {} /// Ratings schemes. The country-specific ratings are mostly for movies and shows. NEXT_ID: 68 /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ContentRating { /// A rating that YouTube uses to identify age-restricted content. #[serde(rename="ytRating")] pub yt_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 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, /// The video's rating in Switzerland. #[serde(rename="chfilmRating")] pub chfilm_rating: Option, /// The video's rating from Taiwan's Ministry of Culture (文化部). #[serde(rename="moctwRating")] pub moctw_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 in Peru. #[serde(rename="pefilmRating")] pub pefilm_rating: Option, /// Reasons that explain why the video received its DJCQT (Brazil) rating. #[serde(rename="djctqRatingReasons")] pub djctq_rating_reasons: 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 in Israel. #[serde(rename="ilfilmRating")] pub ilfilm_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 Freiwillige Selbstkontrolle der Filmwirtschaft (FSK - Germany) rating. #[serde(rename="fskRating")] pub fsk_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 Departamento de Justiça, Classificação, Qualificação e Títulos (DJCQT - Brazil) rating. #[serde(rename="djctqRating")] pub djctq_rating: Option, /// The video's rating from Hong Kong's Office for Film, Newspaper and Article Administration. #[serde(rename="fcoRating")] pub fco_rating: Option, /// The video's rating from Medietilsynet, the Norwegian Media Authority. #[serde(rename="medietilsynetRating")] pub medietilsynet_rating: Option, /// The video's rating in Greece. #[serde(rename="grfilmRating")] pub grfilm_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 Indonesia's Lembaga Sensor Film. #[serde(rename="lsfRating")] pub lsf_rating: Option, /// This property has been deprecated. Use the contentDetails.contentRating.cncRating instead. #[serde(rename="fmocRating")] pub fmoc_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 Portugal's Comissão de Classificação de Espect´culos. #[serde(rename="cceRating")] pub cce_rating: Option, /// The video's rating from the Nacionãlais Kino centrs (National Film Centre of Latvia). #[serde(rename="nkclvRating")] pub nkclv_rating: 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 from South Africa's Film and Publication Board. #[serde(rename="fpbRating")] pub fpb_rating: Option, /// The video's rating in Iceland. #[serde(rename="smaisRating")] pub smais_rating: Option, /// The video's Canadian Home Video Rating System (CHVRS) rating. #[serde(rename="chvrsRating")] pub chvrs_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 Ministerio de Cultura (Colombia) rating. #[serde(rename="mocRating")] pub moc_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 from Malaysia's Film Censorship Board. #[serde(rename="fcbmRating")] pub fcbm_rating: Option, /// voor de Classificatie van Audiovisuele Media (Netherlands). #[serde(rename="kijkwijzerRating")] pub kijkwijzer_rating: Option, /// Rating system in France - Commission de classification cinematographique #[serde(rename="cncRating")] pub cnc_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 Nigeria's National Film and Video Censors Board. #[serde(rename="nfvcbRating")] pub nfvcb_rating: Option, /// The video's rating in Venezuela. #[serde(rename="resorteviolenciaRating")] pub resorteviolencia_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 Office of Film and Literature Classification (OFLC - New Zealand) rating. #[serde(rename="oflcRating")] pub oflc_rating: Option, /// The video's TV Parental Guidelines (TVPG) rating. #[serde(rename="tvpgRating")] pub tvpg_rating: Option, /// The video's rating from the Bulgarian National Film Center. #[serde(rename="nfrcRating")] pub nfrc_rating: Option, /// The video's rating from Malta's Film Age-Classification Board. #[serde(rename="mccaaRating")] pub mccaa_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 the Ministero dei Beni e delle Attività Culturali e del Turismo (Italy). #[serde(rename="mibacRating")] pub mibac_rating: Option, /// The video's British Board of Film Classification (BBFC) rating. #[serde(rename="bbfcRating")] pub bbfc_rating: Option, /// The video's rating in Egypt. #[serde(rename="egfilmRating")] pub egfilm_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 in Poland. #[serde(rename="nbcplRating")] pub nbcpl_rating: Option, /// The video's rating from the Maldives National Bureau of Classification. #[serde(rename="nbcRating")] pub nbc_rating: Option, /// The video's Motion Picture Association of America (MPAA) rating. #[serde(rename="mpaaRating")] pub mpaa_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 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 in Estonia. #[serde(rename="eefilmRating")] pub eefilm_rating: Option, /// The video's rating in the Czech Republic. #[serde(rename="czfilmRating")] pub czfilm_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 from the Kenya Film Classification Board. #[serde(rename="kfcbRating")] pub kfcb_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 Anatel (Asociación Nacional de Televisión) rating for Chilean television. #[serde(rename="anatelRating")] pub anatel_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 rating from Statens medieråd (Sweden's National Media Council). #[serde(rename="smsaRating")] pub smsa_rating: Option, /// The video's rating from Romania's CONSILIUL NATIONAL AL AUDIOVIZUALULUI (CNA). #[serde(rename="cnaRating")] pub cna_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 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 in Slovakia. #[serde(rename="skfilmRating")] pub skfilm_rating: Option, /// The video's rating from Finland's Kansallinen Audiovisuaalinen Instituutti (National Audiovisual Institute). #[serde(rename="mekuRating")] pub meku_rating: Option, } impl Part for ContentRating {} /// ChannelSection targeting setting. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionTargeting { /// The language the channel section is targeting. pub languages: Option>, /// The region the channel section is targeting. pub regions: Option>, /// The country the channel section is targeting. pub countries: Option>, } impl Part for ChannelSectionTargeting {} /// Branding properties for images associated with the channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImageSettings { /// 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, /// Banner image. Mobile size (640x175). #[serde(rename="bannerMobileImageUrl")] pub banner_mobile_image_url: 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. #[serde(rename="smallBrandedBannerImageUrl")] pub small_branded_banner_image_url: Option, /// Banner image. Tablet size high resolution (2276x377). #[serde(rename="bannerTabletHdImageUrl")] pub banner_tablet_hd_image_url: Option, /// Banner image. Tablet size low resolution (1138x188). #[serde(rename="bannerTabletLowImageUrl")] pub banner_tablet_low_image_url: Option, /// Banner image. Mobile size medium/high resolution (960x263). #[serde(rename="bannerMobileMediumHdImageUrl")] pub banner_mobile_medium_hd_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, /// Banner image. Mobile size high resolution (1440x395). #[serde(rename="bannerMobileExtraHdImageUrl")] pub banner_mobile_extra_hd_image_url: Option, /// Banner image. Tablet size (1707x283). #[serde(rename="bannerTabletImageUrl")] pub banner_tablet_image_url: Option, /// Banner image. Mobile size low resolution (320x88). #[serde(rename="bannerMobileLowImageUrl")] pub banner_mobile_low_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. Tablet size extra high resolution (2560x424). #[serde(rename="bannerTabletExtraHdImageUrl")] pub banner_tablet_extra_hd_image_url: 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, /// Banner image. TV size high resolution (1920x1080). #[serde(rename="bannerTvHighImageUrl")] pub banner_tv_high_image_url: Option, /// 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, /// The image map script for the small banner image. #[serde(rename="smallBrandedBannerImageImapScript")] pub small_branded_banner_image_imap_script: Option, /// Banner image. Desktop size (1060x175). #[serde(rename="bannerImageUrl")] pub banner_image_url: Option, /// Banner image. Mobile size high resolution (1280x360). #[serde(rename="bannerMobileHdImageUrl")] pub banner_mobile_hd_image_url: Option, /// This is used only in update requests; if it's set, we use this URL to generate all of the above banner URLs. #[serde(rename="bannerExternalUrl")] pub banner_external_url: Option, /// 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="watchIconImageUrl")] pub watch_icon_image_url: Option, } impl Part for ImageSettings {} /// Details about a resource which is being promoted. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsPromotedItem { /// 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 URL the client should fetch to request a promoted item. #[serde(rename="adTag")] pub ad_tag: 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 URL the client should ping to indicate that the user was shown this promoted item. #[serde(rename="creativeViewUrl")] pub creative_view_url: Option, /// The ID that YouTube uses to uniquely identify the promoted video. #[serde(rename="videoId")] pub video_id: Option, /// The text description to accompany the promoted item. #[serde(rename="descriptionText")] pub description_text: 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 URL the client should ping to indicate that the user clicked through on this promoted item. #[serde(rename="clickTrackingUrl")] pub click_tracking_url: Option, } impl Part for ActivityContentDetailsPromotedItem {} /// A comment represents a single YouTube comment. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [insert comments](struct.CommentInsertCall.html) (request|response) /// * [set moderation status comments](struct.CommentSetModerationStatuCall.html) (none) /// * [update comments](struct.CommentUpdateCall.html) (request|response) /// * [delete comments](struct.CommentDeleteCall.html) (none) /// * [mark as spam comments](struct.CommentMarkAsSpamCall.html) (none) /// * [list comments](struct.CommentListCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Comment { /// The snippet object contains basic details about the comment. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#comment". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the comment. pub id: Option, } impl RequestValue for Comment {} impl Resource for Comment {} impl ResponseResult for Comment {} impl ToParts for Comment { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [update captions](struct.CaptionUpdateCall.html) (request|response) /// * [list captions](struct.CaptionListCall.html) (none) /// * [delete captions](struct.CaptionDeleteCall.html) (none) /// * [insert captions](struct.CaptionInsertCall.html) (request|response) /// * [download captions](struct.CaptionDownloadCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Caption { /// The snippet object contains basic details about the caption. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#caption". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the caption track. pub id: Option, } impl RequestValue for Caption {} impl Resource for Caption {} impl ResponseResult for Caption {} impl ToParts for Caption { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// Details about a channel bulletin post. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsBulletin { /// The resourceId object contains information that identifies the resource associated with a bulletin post. #[serde(rename="resourceId")] pub resource_id: Option, } impl Part for ActivityContentDetailsBulletin {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LocalizedString { /// no description provided pub language: Option, /// no description provided pub value: Option, } impl Part for LocalizedString {} /// Information about an audio stream. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoFileDetailsAudioStream { /// The audio stream's bitrate, in bits per second. #[serde(rename="bitrateBps")] pub bitrate_bps: Option, /// The audio codec that the stream uses. pub codec: Option, /// A value that uniquely identifies a video vendor. Typically, the value is a four-letter vendor code. pub vendor: Option, /// The number of audio channels that the stream contains. #[serde(rename="channelCount")] pub channel_count: Option, } impl Part for VideoFileDetailsAudioStream {} /// Describes information necessary for ingesting an RTMP or an HTTP stream. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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 HTTP or RTMP stream name that YouTube assigns to the video stream. #[serde(rename="streamName")] pub stream_name: 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, } impl Part for IngestionInfo {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatPollOpenedDetails { /// no description provided pub items: Option>, /// no description provided pub prompt: Option, /// no description provided pub id: Option, } impl Part for LiveChatPollOpenedDetails {} /// A videoCategory resource identifies a category that has been or could be associated with uploaded videos. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoCategory { /// The snippet object contains basic details about the video category, including its title. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#videoCategory". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the video category. pub id: Option, } impl Part for VideoCategory {} /// Basic details about a playlist, including title, description and thumbnails. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, /// The item's description. pub description: Option, /// The item's title. pub title: 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, /// The ID that YouTube uses to uniquely identify the playlist that the playlist item is in. #[serde(rename="playlistId")] pub playlist_id: Option, /// The date and time that the item was added to the playlist. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// Channel title for the channel that the playlist item belongs to. #[serde(rename="channelTitle")] pub channel_title: 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, /// 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, } impl Part for PlaylistItemSnippet {} /// Information about a video that was marked as a favorite video. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for ActivityContentDetailsFavorite {} /// A single tag suggestion with it's relevance information. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoSuggestionsTagSuggestion { /// A set of video categories for which the tag is relevant. You can use this information to display appropriate tag suggestions based on the video category that the video uploader associates with the video. By default, tag suggestions are relevant for all categories if there are no restricts defined for the keyword. #[serde(rename="categoryRestricts")] pub category_restricts: Option>, /// The keyword tag suggested for the video. pub tag: Option, } impl Part for VideoSuggestionsTagSuggestion {} /// A channel banner returned as the response to a channel_banner.insert call. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [insert channel banners](struct.ChannelBannerInsertCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelBannerResource { /// The URL of this banner image. pub url: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelBannerResource". pub kind: Option, /// Etag of this resource. pub etag: Option, } impl RequestValue for ChannelBannerResource {} impl ResponseResult for ChannelBannerResource {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistContentDetails { /// The number of videos in the playlist. #[serde(rename="itemCount")] pub item_count: Option, } impl Part for PlaylistContentDetails {} /// Paging details for lists of resources, including total number of items available and number of resources returned in a single page. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for PageInfo {} /// Information about a resource that received a positive (like) rating. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for ActivityContentDetailsLike {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, /// 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, } impl Part for LiveChatUserBannedMessageDetails {} /// A playlist resource represents a YouTube playlist. A playlist is a collection of videos that can be viewed sequentially and shared with other users. A playlist can contain up to 200 videos, and YouTube does not limit the number of playlists that each user creates. By default, playlists are publicly visible to other users, but playlists can be public or private. /// /// YouTube also uses playlists to identify special collections of videos for a channel, such as: /// - uploaded videos /// - favorite videos /// - positively rated (liked) videos /// - watch history /// - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. /// /// You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [insert playlists](struct.PlaylistInsertCall.html) (request|response) /// * [delete playlists](struct.PlaylistDeleteCall.html) (none) /// * [list playlists](struct.PlaylistListCall.html) (none) /// * [update playlists](struct.PlaylistUpdateCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Playlist { /// The status object contains status information for the playlist. pub status: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlist". pub kind: Option, /// The contentDetails object contains information like video count. #[serde(rename="contentDetails")] pub content_details: Option, /// The snippet object contains basic details about the playlist, such as its title and description. pub snippet: Option, /// The player object contains information that you would use to play the playlist in an embedded player. pub player: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the playlist. pub id: Option, /// Localizations for different languages pub localizations: Option>, } impl RequestValue for Playlist {} impl Resource for Playlist {} impl ResponseResult for Playlist {} impl ToParts for Playlist { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.status.is_some() { r = r + "status,"; } if self.kind.is_some() { r = r + "kind,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.player.is_some() { r = r + "player,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.localizations.is_some() { r = r + "localizations,"; } r.pop(); r } } /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list playlist items](struct.PlaylistItemListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItemListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItemListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of playlist items that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for PlaylistItemListResponse {} impl ToParts for PlaylistItemListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// A pair Property / Value. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PropertyValue { /// A property. pub property: Option, /// The property's value. pub value: Option, } impl Part for PropertyValue {} /// Describes a temporal position of a visual widget inside a video. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoTiming { /// 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, /// 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, /// 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, } impl Part for InvideoTiming {} /// ChannelSection localization setting /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionLocalization { /// The localized strings for channel section's title. pub title: Option, } impl Part for ChannelSectionLocalization {} /// A live stream describes a live ingestion point. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [delete live streams](struct.LiveStreamDeleteCall.html) (none) /// * [update live streams](struct.LiveStreamUpdateCall.html) (request|response) /// * [list live streams](struct.LiveStreamListCall.html) (none) /// * [insert live streams](struct.LiveStreamInsertCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStream { /// The status object contains information about live stream's status. pub status: Option, /// The snippet object contains basic details about the stream, including its channel, title, and description. pub snippet: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStream". pub kind: Option, /// Etag of this resource. pub etag: Option, /// The content_details object contains information about the stream, including the closed captions ingestion URL. #[serde(rename="contentDetails")] pub content_details: Option, /// 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 ID that YouTube assigns to uniquely identify the stream. pub id: Option, } impl RequestValue for LiveStream {} impl Resource for LiveStream {} impl ResponseResult for LiveStream {} impl ToParts for LiveStream { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.status.is_some() { r = r + "status,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.kind.is_some() { r = r + "kind,"; } if self.etag.is_some() { r = r + "etag,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.cdn.is_some() { r = r + "cdn,"; } if self.id.is_some() { r = r + "id,"; } r.pop(); r } } /// Information about a new playlist item. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsPlaylistItem { /// The resourceId object contains information about the resource that was added to the playlist. #[serde(rename="resourceId")] pub resource_id: Option, /// 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, } impl Part for ActivityContentDetailsPlaylistItem {} /// Basic details about an activity, including title, description, thumbnails, activity type and group. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivitySnippet { /// 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 ID that YouTube uses to uniquely identify the channel associated with the activity. #[serde(rename="channelId")] pub channel_id: Option, /// The date and time that the video was uploaded. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// Channel title for the channel responsible for this activity #[serde(rename="channelTitle")] pub channel_title: Option, /// The type of activity that the resource describes. #[serde(rename="type")] pub type_: 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 description of the resource primarily associated with the activity. pub description: Option, } impl Part for ActivitySnippet {} /// Basic details about a comment, such as its author and text. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentSnippet { /// Link to the author's YouTube channel, if any. #[serde(rename="authorChannelUrl")] pub author_channel_url: 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 ID of the video the comment refers to, if any. #[serde(rename="videoId")] pub video_id: Option, /// The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="publishedAt")] pub published_at: Option, /// The total number of likes this comment has received. #[serde(rename="likeCount")] pub like_count: Option, /// Whether the current viewer can rate this comment. #[serde(rename="canRate")] pub can_rate: Option, /// The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="updatedAt")] pub updated_at: Option, /// The URL for the avatar of the user who posted the comment. #[serde(rename="authorProfileImageUrl")] pub author_profile_image_url: Option, /// Link to the author's Google+ profile, if any. #[serde(rename="authorGoogleplusProfileUrl")] pub author_googleplus_profile_url: 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 name of the user who posted the comment. #[serde(rename="authorDisplayName")] pub author_display_name: 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, /// 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 id of the author's YouTube channel, if any. #[serde(rename="authorChannelId")] pub author_channel_id: Option, /// The unique id of the parent comment, only set for replies. #[serde(rename="parentId")] pub parent_id: 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, } impl Part for CommentSnippet {} /// Statistics about the video, such as the number of times the video was viewed or liked. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoStatistics { /// The number of comments for the video. #[serde(rename="commentCount")] pub comment_count: Option, /// The number of times the video has been viewed. #[serde(rename="viewCount")] pub view_count: Option, /// The number of users who currently have the video marked as a favorite video. #[serde(rename="favoriteCount")] pub favorite_count: Option, /// The number of users who have indicated that they disliked the video by giving it a negative rating. #[serde(rename="dislikeCount")] pub dislike_count: Option, /// The number of users who have indicated that they liked the video by giving it a positive rating. #[serde(rename="likeCount")] pub like_count: Option, } impl Part for VideoStatistics {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageAuthorDetails { /// 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, /// The YouTube channel ID. #[serde(rename="channelId")] pub channel_id: Option, /// Whether the author is a sponsor of the live chat. #[serde(rename="isChatSponsor")] pub is_chat_sponsor: Option, /// The channels's avatar URL. #[serde(rename="profileImageUrl")] pub profile_image_url: Option, /// Whether the author is the owner of the live chat. #[serde(rename="isChatOwner")] pub is_chat_owner: Option, /// The channel's URL. #[serde(rename="channelUrl")] pub channel_url: Option, /// Whether the author's identity has been verified by YouTube. #[serde(rename="isVerified")] pub is_verified: Option, } impl Part for LiveChatMessageAuthorDetails {} /// Details about a channelsection, including playlists and channels. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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>, } impl Part for ChannelSectionContentDetails {} /// Describes a single promoted item. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PromotedItem { /// The temporal position within the video where the promoted item will be displayed. If present, it overrides the default timing. pub timing: Option, /// If true, the content owner's name will be used when displaying the promotion. This field can only be set when the update is made on behalf of the content owner. #[serde(rename="promotedByContentOwner")] pub promoted_by_content_owner: Option, /// A custom message to display for this promotion. This field is currently ignored unless the promoted item is a website. #[serde(rename="customMessage")] pub custom_message: Option, /// Identifies the promoted item. pub id: Option, } impl Part for PromotedItem {} /// Branding properties of a YouTube channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelBrandingSettings { /// Branding properties for branding images. pub image: Option, /// Branding properties for the watch page. pub watch: Option, /// Branding properties for the channel view. pub channel: Option, /// Additional experimental branding properties. pub hints: Option>, } impl Part for ChannelBrandingSettings {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatPollClosedDetails { /// The id of the poll that was closed. #[serde(rename="pollId")] pub poll_id: Option, } impl Part for LiveChatPollClosedDetails {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [set watermarks](struct.WatermarkSetCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoBranding { /// no description provided #[serde(rename="targetChannelId")] pub target_channel_id: Option, /// no description provided pub position: Option, /// no description provided #[serde(rename="imageUrl")] pub image_url: Option, /// no description provided pub timing: Option, /// no description provided #[serde(rename="imageBytes")] pub image_bytes: Option, } impl RequestValue for InvideoBranding {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list comments](struct.CommentListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of comments that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: Option, /// no description provided #[serde(rename="pageInfo")] pub page_info: Option, } impl ResponseResult for CommentListResponse {} impl ToParts for CommentListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list live streams](struct.LiveStreamListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStreamListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of live streams that match the request criteria. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for LiveStreamListResponse {} impl ToParts for LiveStreamListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, /// The chat this ban is pertinent to. #[serde(rename="liveChatId")] pub live_chat_id: Option, /// no description provided #[serde(rename="bannedUserDetails")] pub banned_user_details: Option, /// The type of ban. #[serde(rename="type")] pub type_: Option, } impl Part for LiveChatBanSnippet {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list guide categories](struct.GuideCategoryListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GuideCategoryListResponse { /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: 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, /// Identifies what kind of resource this is. Value: the fixed string "youtube#guideCategoryListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, /// A list of categories that can be associated with YouTube channels. In this map, the category ID is the map key, and its value is the corresponding guideCategory resource. pub items: Option>, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// Etag of this resource. pub etag: 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="pageInfo")] pub page_info: Option, } impl ResponseResult for GuideCategoryListResponse {} impl ToParts for GuideCategoryListResponse { /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or /// the parts you want to see in the server response. fn to_parts(&self) -> String { let mut r = String::new(); if self.event_id.is_some() { r = r + "eventId,"; } if self.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.kind.is_some() { r = r + "kind,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } if self.items.is_some() { r = r + "items,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.etag.is_some() { r = r + "etag,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } r.pop(); r } } /// Basic details about a channel section, including title, style and position. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionSnippet { /// The style of the channel section. pub style: Option, /// Localized title, read-only. pub localized: Option, /// The channel section's title for multiple_playlists and multiple_channels. pub title: Option, /// The position of the channel section in the channel. pub position: Option, /// The ID that YouTube uses to uniquely identify the channel that published the channel section. #[serde(rename="channelId")] pub channel_id: Option, /// The type of the channel section. #[serde(rename="type")] pub type_: Option, /// The language of the channel section's default title and description. #[serde(rename="defaultLanguage")] pub default_language: Option, } impl Part for ChannelSectionSnippet {} /// Details about the content of a channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelContentDetails { /// no description provided #[serde(rename="relatedPlaylists")] pub related_playlists: Option, /// The googlePlusUserId object identifies the Google+ profile ID associated with this channel. #[serde(rename="googlePlusUserId")] pub google_plus_user_id: Option, } impl Part for ChannelContentDetails {} /// Stub token pagination template to suppress results. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TokenPagination; impl Part for TokenPagination {} /// Rights management policy for YouTube resources. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccessPolicy { /// A list of region codes that identify countries where the default policy do not apply. pub exception: Option>, /// The value of allowed indicates whether the access to the policy is allowed or denied by default. pub allowed: Option, } impl Part for AccessPolicy {} /// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [report abuse videos](struct.VideoReportAbuseCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoAbuseReport { /// The specific, or secondary, reason that this content is abusive (if available). The value is an abuse report reason ID that is a valid secondary reason for the primary reason. #[serde(rename="secondaryReasonId")] pub secondary_reason_id: Option, /// The high-level, or primary, reason that the content is abusive. The value is an abuse report reason ID. #[serde(rename="reasonId")] pub reason_id: Option, /// Additional comments regarding the abuse report. pub comments: Option, /// The language that the content was viewed in. pub language: Option, /// The ID that YouTube uses to uniquely identify the video. #[serde(rename="videoId")] pub video_id: Option, } impl RequestValue for VideoAbuseReport {} /// Information that identifies the recommended resource. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetailsRecommendation { /// The resourceId object contains information that identifies the recommended resource. #[serde(rename="resourceId")] pub resource_id: Option, /// The reason that the resource is recommended to the user. pub reason: Option, /// The seedResourceId object contains information about the resource that caused the recommendation. #[serde(rename="seedResourceId")] pub seed_resource_id: Option, } impl Part for ActivityContentDetailsRecommendation {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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, } impl Part for LiveChatModeratorSnippet {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatPollItem { /// no description provided #[serde(rename="itemId")] pub item_id: Option, /// Plain text description of the item. pub description: Option, } impl Part for LiveChatPollItem {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItemContentDetails { /// 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 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, /// 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, } impl Part for PlaylistItemContentDetails {} /// The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[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 of when the channel was linked to the content owner. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. #[serde(rename="timeLinked")] pub time_linked: Option, } impl Part for ChannelContentOwnerDetails {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastStatus { /// The broadcast's recording status. #[serde(rename="recordingStatus")] pub recording_status: 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 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, } impl Part for LiveBroadcastStatus {} /// Geographical coordinates of a point, in WGS84. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GeoPoint { /// Latitude in degrees. pub latitude: Option, /// Altitude above the reference ellipsoid, in meters. pub altitude: Option, /// Longitude in degrees. pub longitude: Option, } impl Part for GeoPoint {} /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoAgeGating { /// Age-restricted trailers. For redband trailers and adult-rated video-games. Only users aged 18+ can view the content. The the field is true the content is restricted to viewers aged 18+. Otherwise The field won't be present. pub restricted: Option, /// Indicates whether or not the video has alcoholic beverage content. Only users of legal purchasing age in a particular country, as identified by ICAP, can view the content. #[serde(rename="alcoholContent")] pub alcohol_content: Option, /// Video game rating, if any. #[serde(rename="videoGameRating")] pub video_game_rating: Option, } impl Part for VideoAgeGating {} /// Player to be used for a video playback. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoPlayer { /// An