use std::collections::HashMap; use std::cell::RefCell; use std::default::Default; use std::collections::BTreeMap; use serde_json as json; use std::io; use std::fs; use std::mem; use std::thread::sleep; use crate::client; // ############## // 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 { /// Manage your YouTube account Full, /// See a list of your current active channel members, their current level, and when they became a member ChannelMembershipCreator, /// See, edit, and permanently delete your YouTube videos, ratings, comments and captions ForceSsl, /// View your YouTube account Readonly, /// Manage your YouTube videos Upload, /// View and manage your assets and associated content on YouTube Partner, /// View private information of your YouTube channel relevant during the audit process with a YouTube partner PartnerChannelAudit, } impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { Scope::Full => "https://www.googleapis.com/auth/youtube", Scope::ChannelMembershipCreator => "https://www.googleapis.com/auth/youtube.channel-memberships.creator", Scope::ForceSsl => "https://www.googleapis.com/auth/youtube.force-ssl", Scope::Readonly => "https://www.googleapis.com/auth/youtube.readonly", Scope::Upload => "https://www.googleapis.com/auth/youtube.upload", Scope::Partner => "https://www.googleapis.com/auth/youtubepartner", Scope::PartnerChannelAudit => "https://www.googleapis.com/auth/youtubepartner-channel-audit", } } } 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 hyper_rustls; /// extern crate yup_oauth2 as oauth2; /// extern crate google_youtube3 as youtube3; /// use youtube3::{Result, Error}; /// # async fn dox() { /// use std::default::Default; /// use oauth2; /// use youtube3::YouTube; /// /// // Get an ApplicationSecret instance by some means. It contains the `client_id` and /// // `client_secret`, among other things. /// let secret: oauth2::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 = yup_oauth2::InstalledFlowAuthenticator::builder( /// secret, /// yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, /// ).build().await.unwrap(); /// let mut hub = YouTube::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()), 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(&vec!["gubergren".into()]) /// .video_category_id("rebum.") /// .region_code("est") /// .page_token("ipsum") /// .on_behalf_of_content_owner("ipsum") /// .my_rating("est") /// .max_width(-62) /// .max_results(84) /// .max_height(-99) /// .locale("Lorem") /// .add_id("eos") /// .hl("labore") /// .chart("sed") /// .doit().await; /// /// 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::Io(_) /// |Error::MissingAPIKey /// |Error::MissingToken(_) /// |Error::Cancelled /// |Error::UploadSizeLimitExceeded(_, _) /// |Error::Failure(_) /// |Error::BadRequest(_) /// |Error::FieldClash(_) /// |Error::JsonDecodeError(_, _) => println!("{}", e), /// }, /// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` #[derive(Clone)] pub struct YouTube<> { client: hyper::Client, hyper::body::Body>, auth: oauth2::authenticator::Authenticator>, _user_agent: String, _base_url: String, _root_url: String, } impl<'a, > client::Hub for YouTube<> {} impl<'a, > YouTube<> { pub fn new(client: hyper::Client, hyper::body::Body>, authenticator: oauth2::authenticator::Authenticator>) -> YouTube<> { YouTube { client, auth: authenticator, _user_agent: "google-api-rust-client/2.0.8".to_string(), _base_url: "https://youtube.googleapis.com/".to_string(), _root_url: "https://youtube.googleapis.com/".to_string(), } } pub fn abuse_reports(&'a self) -> AbuseReportMethods<'a> { AbuseReportMethods { hub: &self } } pub fn activities(&'a self) -> ActivityMethods<'a> { ActivityMethods { hub: &self } } pub fn captions(&'a self) -> CaptionMethods<'a> { CaptionMethods { hub: &self } } pub fn channel_banners(&'a self) -> ChannelBannerMethods<'a> { ChannelBannerMethods { hub: &self } } pub fn channel_sections(&'a self) -> ChannelSectionMethods<'a> { ChannelSectionMethods { hub: &self } } pub fn channels(&'a self) -> ChannelMethods<'a> { ChannelMethods { hub: &self } } pub fn comment_threads(&'a self) -> CommentThreadMethods<'a> { CommentThreadMethods { hub: &self } } pub fn comments(&'a self) -> CommentMethods<'a> { CommentMethods { hub: &self } } pub fn i18n_languages(&'a self) -> I18nLanguageMethods<'a> { I18nLanguageMethods { hub: &self } } pub fn i18n_regions(&'a self) -> I18nRegionMethods<'a> { I18nRegionMethods { hub: &self } } pub fn live_broadcasts(&'a self) -> LiveBroadcastMethods<'a> { LiveBroadcastMethods { hub: &self } } pub fn live_chat_bans(&'a self) -> LiveChatBanMethods<'a> { LiveChatBanMethods { hub: &self } } pub fn live_chat_messages(&'a self) -> LiveChatMessageMethods<'a> { LiveChatMessageMethods { hub: &self } } pub fn live_chat_moderators(&'a self) -> LiveChatModeratorMethods<'a> { LiveChatModeratorMethods { hub: &self } } pub fn live_streams(&'a self) -> LiveStreamMethods<'a> { LiveStreamMethods { hub: &self } } pub fn members(&'a self) -> MemberMethods<'a> { MemberMethods { hub: &self } } pub fn memberships_levels(&'a self) -> MembershipsLevelMethods<'a> { MembershipsLevelMethods { hub: &self } } pub fn playlist_items(&'a self) -> PlaylistItemMethods<'a> { PlaylistItemMethods { hub: &self } } pub fn playlists(&'a self) -> PlaylistMethods<'a> { PlaylistMethods { hub: &self } } pub fn search(&'a self) -> SearchMethods<'a> { SearchMethods { hub: &self } } pub fn subscriptions(&'a self) -> SubscriptionMethods<'a> { SubscriptionMethods { hub: &self } } pub fn super_chat_events(&'a self) -> SuperChatEventMethods<'a> { SuperChatEventMethods { hub: &self } } pub fn tests(&'a self) -> TestMethods<'a> { TestMethods { hub: &self } } pub fn third_party_links(&'a self) -> ThirdPartyLinkMethods<'a> { ThirdPartyLinkMethods { hub: &self } } pub fn thumbnails(&'a self) -> ThumbnailMethods<'a> { ThumbnailMethods { hub: &self } } pub fn video_abuse_report_reasons(&'a self) -> VideoAbuseReportReasonMethods<'a> { VideoAbuseReportReasonMethods { hub: &self } } pub fn video_categories(&'a self) -> VideoCategoryMethods<'a> { VideoCategoryMethods { hub: &self } } pub fn videos(&'a self) -> VideoMethods<'a> { VideoMethods { hub: &self } } pub fn watermarks(&'a self) -> WatermarkMethods<'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/2.0.8`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { mem::replace(&mut self._user_agent, agent_name) } /// Set the base url to use in all requests to the server. /// It defaults to `https://youtube.googleapis.com/`. /// /// Returns the previously set base url. pub fn base_url(&mut self, new_base_url: String) -> String { mem::replace(&mut self._base_url, new_base_url) } /// Set the root url to use in all requests to the server. /// It defaults to `https://youtube.googleapis.com/`. /// /// Returns the previously set root url. pub fn root_url(&mut self, new_root_url: String) -> String { mem::replace(&mut self._root_url, new_root_url) } } // ############ // 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*). /// /// * [insert abuse reports](AbuseReportInsertCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AbuseReport { /// no description provided #[serde(rename="abuseTypes")] pub abuse_types: Option>, /// no description provided pub description: Option, /// no description provided #[serde(rename="relatedEntities")] pub related_entities: Option>, /// no description provided pub subject: Option, } impl client::RequestValue for AbuseReport {} impl client::Resource for AbuseReport {} impl client::ResponseResult for AbuseReport {} impl client::ToParts for AbuseReport { /// 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.abuse_types.is_some() { r = r + "abuseTypes,"; } if self.description.is_some() { r = r + "description,"; } if self.related_entities.is_some() { r = r + "relatedEntities,"; } if self.subject.is_some() { r = r + "subject,"; } 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 AbuseType { /// no description provided pub id: Option, } impl client::Part for AbuseType {} /// 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 { /// The value of allowed indicates whether the access to the policy is allowed or denied by default. pub allowed: Option, /// A list of region codes that identify countries where the default policy do not apply. pub exception: Option>, } impl client::Part for AccessPolicy {} /// An *activity* resource contains information about an action that a particular channel, or user, has taken on YouTube.The actions reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, commenting on a video, uploading a video, and so forth. Each activity resource identifies the type of action, the channel associated with the action, and the resource(s) associated with the action, such as the video that was rated or uploaded. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activity { /// The contentDetails object contains information about the content associated with the activity. For example, if the snippet.type value is videoRated, then the contentDetails object's content identifies the rated video. #[serde(rename="contentDetails")] pub content_details: Option, /// Etag of this resource pub etag: Option, /// The ID that YouTube uses to uniquely identify the activity. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#activity". pub kind: Option, /// The snippet object contains basic details about the activity, including the activity's type and group ID. pub snippet: Option, } impl client::Part for Activity {} /// Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityContentDetails { /// The bulletin object contains details about a channel bulletin post. This object is only present if the snippet.type is bulletin. pub bulletin: Option, /// The channelItem object contains details about a resource which was added to a channel. This property is only present if the snippet.type is channelItem. #[serde(rename="channelItem")] pub channel_item: Option, /// The comment object contains information about a resource that received a comment. This property is only present if the snippet.type is comment. pub comment: Option, /// The favorite object contains information about a video that was marked as a favorite video. This property is only present if the snippet.type is favorite. pub favorite: Option, /// The like object contains information about a resource that received a positive (like) rating. This property is only present if the snippet.type is like. pub like: Option, /// The playlistItem object contains information about a new playlist item. This property is only present if the snippet.type is playlistItem. #[serde(rename="playlistItem")] pub playlist_item: Option, /// The promotedItem object contains details about a resource which is being promoted. This property is only present if the snippet.type is promotedItem. #[serde(rename="promotedItem")] pub promoted_item: Option, /// The recommendation object contains information about a recommended resource. This property is only present if the snippet.type is recommendation. pub recommendation: Option, /// The social object contains details about a social network post. This property is only present if the snippet.type is social. pub social: Option, /// The subscription object contains information about a channel that a user subscribed to. This property is only present if the snippet.type is subscription. pub subscription: Option, /// The upload object contains information about the uploaded video. This property is only present if the snippet.type is upload. pub upload: Option, } impl client::Part for ActivityContentDetails {} /// 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. @mutable youtube.activities.insert #[serde(rename="resourceId")] pub resource_id: Option, } impl client::Part for ActivityContentDetailsBulletin {} /// 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 client::Part for ActivityContentDetailsChannelItem {} /// 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 client::Part for ActivityContentDetailsComment {} /// 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 client::Part for ActivityContentDetailsFavorite {} /// 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 client::Part for ActivityContentDetailsLike {} /// 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 value that YouTube uses to uniquely identify the playlist. #[serde(rename="playlistId")] pub playlist_id: Option, /// ID of the item within the playlist. #[serde(rename="playlistItemId")] pub playlist_item_id: Option, /// The resourceId object contains information about the resource that was added to the playlist. #[serde(rename="resourceId")] pub resource_id: Option, } impl client::Part for ActivityContentDetailsPlaylistItem {} /// 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 URL the client should fetch to request a promoted item. #[serde(rename="adTag")] pub ad_tag: Option, /// The URL the client should ping to indicate that the user clicked through on this promoted item. #[serde(rename="clickTrackingUrl")] pub click_tracking_url: Option, /// The URL the client should ping to indicate that the user was shown this promoted item. #[serde(rename="creativeViewUrl")] pub creative_view_url: Option, /// The type of call-to-action, a message to the user indicating action that can be taken. #[serde(rename="ctaType")] pub cta_type: Option, /// The custom call-to-action button text. If specified, it will override the default button text for the cta_type. #[serde(rename="customCtaButtonText")] pub custom_cta_button_text: Option, /// The text description to accompany the promoted item. #[serde(rename="descriptionText")] pub description_text: Option, /// The URL the client should direct the user to, if the user chooses to visit the advertiser's website. #[serde(rename="destinationUrl")] pub destination_url: Option, /// The list of forecasting URLs. The client should ping all of these URLs when a promoted item is not available, to indicate that a promoted item could have been shown. #[serde(rename="forecastingUrl")] pub forecasting_url: Option>, /// The list of impression URLs. The client should ping all of these URLs to indicate that the user was shown this promoted item. #[serde(rename="impressionUrl")] pub impression_url: Option>, /// The ID that YouTube uses to uniquely identify the promoted video. #[serde(rename="videoId")] pub video_id: Option, } impl client::Part for ActivityContentDetailsPromotedItem {} /// 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 reason that the resource is recommended to the user. pub reason: Option, /// The resourceId object contains information that identifies the recommended resource. #[serde(rename="resourceId")] pub resource_id: Option, /// The seedResourceId object contains information about the resource that caused the recommendation. #[serde(rename="seedResourceId")] pub seed_resource_id: Option, } impl client::Part for ActivityContentDetailsRecommendation {} /// 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 author of the social network post. pub author: Option, /// An image of the post's author. #[serde(rename="imageUrl")] pub image_url: Option, /// The URL of the social network post. #[serde(rename="referenceUrl")] pub reference_url: Option, /// The resourceId object encapsulates information that identifies the resource associated with a social network post. #[serde(rename="resourceId")] pub resource_id: Option, /// The name of the social network. #[serde(rename="type")] pub type_: Option, } impl client::Part for ActivityContentDetailsSocial {} /// 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 client::Part for ActivityContentDetailsSubscription {} /// Information about the uploaded 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 ActivityContentDetailsUpload { /// The ID that YouTube uses to uniquely identify the uploaded video. #[serde(rename="videoId")] pub video_id: Option, } impl client::Part for ActivityContentDetailsUpload {} /// 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 activities](ActivityListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// no description provided pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#activityListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for ActivityListResponse {} impl client::ToParts for ActivityListResponse { /// 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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Basic details about an activity, including title, description, thumbnails, activity type and group. Next ID: 12 /// /// 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 { /// The ID that YouTube uses to uniquely identify the channel associated with the activity. #[serde(rename="channelId")] pub channel_id: Option, /// Channel title for the channel responsible for this activity #[serde(rename="channelTitle")] pub channel_title: Option, /// The description of the resource primarily associated with the activity. @mutable youtube.activities.insert pub description: Option, /// The group ID associated with the activity. A group ID identifies user events that are associated with the same user and resource. For example, if a user rates a video and marks the same video as a favorite, the entries for those events would have the same group ID in the user's activity feed. In your user interface, you can avoid repetition by grouping events with the same groupId value. #[serde(rename="groupId")] pub group_id: Option, /// The date and time that the video was uploaded. #[serde(rename="publishedAt")] pub published_at: Option, /// A map of thumbnail images associated with the resource that is primarily associated with the activity. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. pub thumbnails: Option, /// The title of the resource primarily associated with the activity. pub title: Option, /// The type of activity that the resource describes. #[serde(rename="type")] pub type_: Option, } impl client::Part for ActivitySnippet {} /// 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*). /// /// * [delete captions](CaptionDeleteCall) (none) /// * [download captions](CaptionDownloadCall) (none) /// * [insert captions](CaptionInsertCall) (request|response) /// * [list captions](CaptionListCall) (none) /// * [update captions](CaptionUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Caption { /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the caption track. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#caption". pub kind: Option, /// The snippet object contains basic details about the caption. pub snippet: Option, } impl client::RequestValue for Caption {} impl client::Resource for Caption {} impl client::ResponseResult for Caption {} impl client::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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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](CaptionListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CaptionListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of captions that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#captionListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for CaptionListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// 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 type of audio track associated with the caption track. #[serde(rename="audioTrackType")] pub audio_track_type: Option, /// The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. #[serde(rename="failureReason")] pub failure_reason: Option, /// Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. #[serde(rename="isAutoSynced")] pub is_auto_synced: Option, /// Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. #[serde(rename="isCC")] pub is_cc: Option, /// Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update #[serde(rename="isDraft")] pub is_draft: Option, /// Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false. #[serde(rename="isEasyReader")] pub is_easy_reader: Option, /// Indicates whether the caption track uses large text for the vision-impaired. The default value is false. #[serde(rename="isLarge")] pub is_large: Option, /// The language of the caption track. The property value is a BCP-47 language tag. pub language: Option, /// The date and time when the caption track was last updated. #[serde(rename="lastUpdated")] pub last_updated: Option, /// The name of the caption track. The name is intended to be visible to the user as an option during playback. pub name: Option, /// The caption track's status. pub status: Option, /// The caption track's type. #[serde(rename="trackKind")] pub track_kind: Option, /// The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert #[serde(rename="videoId")] pub video_id: Option, } impl client::Part for CaptionSnippet {} /// 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 format of the video stream that you are sending to Youtube. pub format: Option, /// The frame rate of the inbound video data. #[serde(rename="frameRate")] pub frame_rate: Option, /// The ingestionInfo object contains information that YouTube provides that you need to transmit your RTMP or HTTP stream to YouTube. #[serde(rename="ingestionInfo")] pub ingestion_info: Option, /// The method or protocol used to transmit the video stream. #[serde(rename="ingestionType")] pub ingestion_type: Option, /// The resolution of the inbound video data. pub resolution: Option, } impl client::Part for CdnSettings {} /// 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](ChannelListCall) (none) /// * [update channels](ChannelUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Channel { /// The auditionDetails object encapsulates channel data that is relevant for YouTube Partners during the audition process. #[serde(rename="auditDetails")] pub audit_details: Option, /// The brandingSettings object encapsulates information about the branding of the channel. #[serde(rename="brandingSettings")] pub branding_settings: Option, /// The contentDetails object encapsulates information about the channel's content. #[serde(rename="contentDetails")] pub content_details: Option, /// The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel. #[serde(rename="contentOwnerDetails")] pub content_owner_details: Option, /// The conversionPings object encapsulates information about conversion pings that need to be respected by the channel. #[serde(rename="conversionPings")] pub conversion_pings: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the channel. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channel". pub kind: Option, /// Localizations for different languages pub localizations: Option>, /// The snippet object contains basic details about the channel, such as its title, description, and thumbnail images. pub snippet: Option, /// The statistics object encapsulates statistics for the channel. pub statistics: Option, /// The status object encapsulates information about the privacy status of the channel. pub status: Option, /// The topicDetails object encapsulates information about Freebase topics associated with the channel. #[serde(rename="topicDetails")] pub topic_details: Option, } impl client::RequestValue for Channel {} impl client::Resource for Channel {} impl client::ResponseResult for Channel {} impl client::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.audit_details.is_some() { r = r + "auditDetails,"; } if self.branding_settings.is_some() { r = r + "brandingSettings,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.content_owner_details.is_some() { r = r + "contentOwnerDetails,"; } if self.conversion_pings.is_some() { r = r + "conversionPings,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.localizations.is_some() { r = r + "localizations,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.statistics.is_some() { r = r + "statistics,"; } if self.status.is_some() { r = r + "status,"; } if self.topic_details.is_some() { r = r + "topicDetails,"; } r.pop(); r } } /// 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 respects the community guidelines. #[serde(rename="communityGuidelinesGoodStanding")] pub community_guidelines_good_standing: Option, /// Whether or not the channel has any unresolved claims. #[serde(rename="contentIdClaimsGoodStanding")] pub content_id_claims_good_standing: Option, /// Whether or not the channel has any copyright strikes. #[serde(rename="copyrightStrikesGoodStanding")] pub copyright_strikes_good_standing: Option, } impl client::Part for ChannelAuditDetails {} /// 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](ChannelBannerInsertCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelBannerResource { /// no description provided pub etag: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelBannerResource". pub kind: Option, /// The URL of this banner image. pub url: Option, } impl client::RequestValue for ChannelBannerResource {} impl client::ResponseResult for ChannelBannerResource {} /// 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 the channel view. pub channel: Option, /// Additional experimental branding properties. pub hints: Option>, /// Branding properties for branding images. pub image: Option, /// Branding properties for the watch page. pub watch: Option, } impl client::Part for ChannelBrandingSettings {} /// 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, } impl client::Part for ChannelContentDetails {} /// 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 when the channel was linked to the content owner. #[serde(rename="timeLinked")] pub time_linked: Option, } impl client::Part for ChannelContentOwnerDetails {} /// 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 client::Part for ChannelConversionPing {} /// 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 client::Part for ChannelConversionPings {} /// 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](ChannelListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// no description provided pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for ChannelListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } 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 client::Part for ChannelLocalization {} /// 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 URL. #[serde(rename="channelUrl")] pub channel_url: Option, /// The channel's display name. #[serde(rename="displayName")] pub display_name: Option, /// The channels's avatar URL. #[serde(rename="profileImageUrl")] pub profile_image_url: Option, } impl client::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*). /// /// * [delete channel sections](ChannelSectionDeleteCall) (none) /// * [insert channel sections](ChannelSectionInsertCall) (request|response) /// * [list channel sections](ChannelSectionListCall) (none) /// * [update channel sections](ChannelSectionUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSection { /// The contentDetails object contains details about the channel section content, such as a list of playlists or channels featured in the section. #[serde(rename="contentDetails")] pub content_details: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the channel section. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelSection". pub kind: Option, /// Localizations for different languages pub localizations: Option>, /// The snippet object contains basic details about the channel section, such as its type, style and title. pub snippet: Option, /// The targeting object contains basic targeting settings about the channel section. pub targeting: Option, } impl client::RequestValue for ChannelSection {} impl client::Resource for ChannelSection {} impl client::ResponseResult for ChannelSection {} impl client::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.content_details.is_some() { r = r + "contentDetails,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.localizations.is_some() { r = r + "localizations,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.targeting.is_some() { r = r + "targeting,"; } r.pop(); r } } /// 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 client::Part for ChannelSectionContentDetails {} /// 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](ChannelSectionListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelSectionListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of ChannelSections that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#channelSectionListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for ChannelSectionListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// 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 client::Part for ChannelSectionLocalization {} /// 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 ID that YouTube uses to uniquely identify the channel that published the channel section. #[serde(rename="channelId")] pub channel_id: Option, /// The language of the channel section's default title and description. #[serde(rename="defaultLanguage")] pub default_language: Option, /// Localized title, read-only. pub localized: Option, /// The position of the channel section in the channel. pub position: Option, /// The style of the channel section. pub style: Option, /// The channel section's title for multiple_playlists and multiple_channels. pub title: Option, /// The type of the channel section. #[serde(rename="type")] pub type_: Option, } impl client::Part for ChannelSectionSnippet {} /// 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 country the channel section is targeting. pub countries: Option>, /// The language the channel section is targeting. pub languages: Option>, /// The region the channel section is targeting. pub regions: Option>, } impl client::Part for ChannelSectionTargeting {} /// 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 { /// The country of the channel. pub country: Option, /// no description provided #[serde(rename="defaultLanguage")] pub default_language: Option, /// Which content tab users should see when viewing the channel. #[serde(rename="defaultTab")] pub default_tab: Option, /// Specifies the channel description. pub description: Option, /// Title for the featured channels tab. #[serde(rename="featuredChannelsTitle")] pub featured_channels_title: Option, /// The list of featured channels. #[serde(rename="featuredChannelsUrls")] pub featured_channels_urls: Option>, /// Lists keywords associated with the channel, comma-separated. pub keywords: Option, /// Whether user-submitted comments left on the channel page need to be approved by the channel owner to be publicly visible. #[serde(rename="moderateComments")] pub moderate_comments: Option, /// A prominent color that can be rendered on this channel page. #[serde(rename="profileColor")] pub profile_color: Option, /// Whether the tab to browse the videos should be displayed. #[serde(rename="showBrowseView")] pub show_browse_view: Option, /// Whether related channels should be proposed. #[serde(rename="showRelatedChannels")] pub show_related_channels: Option, /// Specifies the channel title. pub title: Option, /// The ID for a Google Analytics account to track and measure traffic to the channels. #[serde(rename="trackingAnalyticsAccountId")] pub tracking_analytics_account_id: Option, /// The trailer of the channel, for users that are not subscribers. #[serde(rename="unsubscribedTrailer")] pub unsubscribed_trailer: Option, } impl client::Part for ChannelSettings {} /// Basic details about a channel, 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 ChannelSnippet { /// The country of the channel. pub country: Option, /// The custom url of the channel. #[serde(rename="customUrl")] pub custom_url: Option, /// The language of the channel's default title and description. #[serde(rename="defaultLanguage")] pub default_language: Option, /// The description of the channel. pub description: Option, /// Localized title and description, read-only. pub localized: Option, /// The date and time that the channel was created. #[serde(rename="publishedAt")] pub published_at: Option, /// A map of thumbnail images associated with the channel. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. When displaying thumbnails in your application, make sure that your code uses the image URLs exactly as they are returned in API responses. For example, your application should not use the http domain instead of the https domain in a URL returned in an API response. Beginning in July 2018, channel thumbnail URLs will only be available in the https domain, which is how the URLs appear in API responses. After that time, you might see broken images in your application if it tries to load YouTube images from the http domain. Thumbnail images might be empty for newly created channels and might take up to one day to populate. pub thumbnails: Option, /// The channel's title. pub title: Option, } impl client::Part for ChannelSnippet {} /// Statistics about a channel: number of subscribers, number of videos in the channel, etc. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChannelStatistics { /// The number of comments for the channel. #[serde(rename="commentCount")] pub comment_count: Option, /// Whether or not the number of subscribers is shown for this user. #[serde(rename="hiddenSubscriberCount")] pub hidden_subscriber_count: Option, /// The number of subscribers that the channel has. #[serde(rename="subscriberCount")] pub subscriber_count: Option, /// The number of videos uploaded to the channel. #[serde(rename="videoCount")] pub video_count: Option, /// The number of times the channel has been viewed. #[serde(rename="viewCount")] pub view_count: Option, } impl client::Part for ChannelStatistics {} /// 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 { /// If true, then the user is linked to either a YouTube username or G+ account. Otherwise, the user doesn't have a public YouTube identity. #[serde(rename="isLinked")] pub is_linked: Option, /// The long uploads status of this channel. See https://support.google.com/youtube/answer/71673 for more information. #[serde(rename="longUploadsStatus")] pub long_uploads_status: Option, /// no description provided #[serde(rename="madeForKids")] pub made_for_kids: Option, /// Privacy status of the channel. #[serde(rename="privacyStatus")] pub privacy_status: Option, /// no description provided #[serde(rename="selfDeclaredMadeForKids")] pub self_declared_made_for_kids: Option, } impl client::Part for ChannelStatus {} /// Information specific to a store on a merchandising platform linked to 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 ChannelToStoreLinkDetails { /// Name of the store. #[serde(rename="storeName")] pub store_name: Option, /// Landing page of the store. #[serde(rename="storeUrl")] pub store_url: Option, } impl client::Part for ChannelToStoreLinkDetails {} /// 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 Wikipedia URLs that describe the channel's content. #[serde(rename="topicCategories")] pub topic_categories: Option>, /// A list of Freebase topic IDs associated with the channel. You can retrieve information about each topic using the Freebase Topic API. #[serde(rename="topicIds")] pub topic_ids: Option>, } impl client::Part for ChannelTopicDetails {} /// 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*). /// /// * [delete comments](CommentDeleteCall) (none) /// * [insert comments](CommentInsertCall) (request|response) /// * [list comments](CommentListCall) (none) /// * [mark as spam comments](CommentMarkAsSpamCall) (none) /// * [set moderation status comments](CommentSetModerationStatuCall) (none) /// * [update comments](CommentUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Comment { /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the comment. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#comment". pub kind: Option, /// The snippet object contains basic details about the comment. pub snippet: Option, } impl client::RequestValue for Comment {} impl client::Resource for Comment {} impl client::ResponseResult for Comment {} impl client::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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 comments](CommentListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of comments that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for CommentListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// 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 { /// no description provided #[serde(rename="authorChannelId")] pub author_channel_id: Option, /// Link to the author's YouTube channel, if any. #[serde(rename="authorChannelUrl")] pub author_channel_url: Option, /// The name of the user who posted the comment. #[serde(rename="authorDisplayName")] pub author_display_name: Option, /// The URL for the avatar of the user who posted the comment. #[serde(rename="authorProfileImageUrl")] pub author_profile_image_url: Option, /// Whether the current viewer can rate this comment. #[serde(rename="canRate")] pub can_rate: Option, /// The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel. #[serde(rename="channelId")] pub channel_id: Option, /// The total number of likes this comment has received. #[serde(rename="likeCount")] pub like_count: Option, /// The comment's moderation status. Will not be set if the comments were requested through the id filter. #[serde(rename="moderationStatus")] pub moderation_status: Option, /// The unique id of the parent comment, only set for replies. #[serde(rename="parentId")] pub parent_id: Option, /// The date and time when the comment was originally published. #[serde(rename="publishedAt")] pub published_at: Option, /// The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc. #[serde(rename="textDisplay")] pub text_display: Option, /// The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author. #[serde(rename="textOriginal")] pub text_original: Option, /// The date and time when the comment was last updated. #[serde(rename="updatedAt")] pub updated_at: Option, /// The ID of the video the comment refers to, if any. #[serde(rename="videoId")] pub video_id: Option, /// The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future. #[serde(rename="viewerRating")] pub viewer_rating: Option, } impl client::Part for CommentSnippet {} /// The id of the author's YouTube channel, if any. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentSnippetAuthorChannelId { /// no description provided pub value: Option, } impl client::Part for CommentSnippetAuthorChannelId {} /// A *comment thread* represents information that applies to a top level comment and all its replies. It can also include the top level comment itself and some of the replies. /// /// # 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 comment threads](CommentThreadInsertCall) (request|response) /// * [list comment threads](CommentThreadListCall) (none) /// * [update comment threads](CommentThreadUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentThread { /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the comment thread. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#commentThread". pub kind: Option, /// The replies object contains a limited number of replies (if any) to the top level comment found in the snippet. pub replies: Option, /// The snippet object contains basic details about the comment thread and also the top level comment. pub snippet: Option, } impl client::RequestValue for CommentThread {} impl client::Resource for CommentThread {} impl client::ResponseResult for CommentThread {} impl client::ToParts for CommentThread { /// 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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.replies.is_some() { r = r + "replies,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 comment threads](CommentThreadListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentThreadListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of comment threads that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#commentThreadListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for CommentThreadListResponse {} impl client::ToParts for CommentThreadListResponse { /// 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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } 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 client::Part for CommentThreadReplies {} /// Basic details about a comment thread. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentThreadSnippet { /// Whether the current viewer of the thread can reply to it. This is viewer specific - other viewers may see a different value for this field. #[serde(rename="canReply")] pub can_reply: Option, /// The YouTube channel the comments in the thread refer to or the channel with the video the comments refer to. If video_id isn't set the comments refer to the channel itself. #[serde(rename="channelId")] pub channel_id: Option, /// Whether the thread (and therefore all its comments) is visible to all YouTube users. #[serde(rename="isPublic")] pub is_public: Option, /// The top level comment of this thread. #[serde(rename="topLevelComment")] pub top_level_comment: Option, /// The total number of replies (not including the top level comment). #[serde(rename="totalReplyCount")] pub total_reply_count: Option, /// The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment. #[serde(rename="videoId")] pub video_id: Option, } impl client::Part for CommentThreadSnippet {} /// Ratings schemes. The country-specific ratings are mostly for movies and shows. LINT.IfChange /// /// 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 { /// The video's Australian Classification Board (ACB) or Australian Communications and Media Authority (ACMA) rating. ACMA ratings are used to classify children's television programming. #[serde(rename="acbRating")] pub acb_rating: Option, /// The video's rating from Italy's Autorità per le Garanzie nelle Comunicazioni (AGCOM). #[serde(rename="agcomRating")] pub agcom_rating: Option, /// The video's Anatel (Asociación Nacional de Televisión) rating for Chilean television. #[serde(rename="anatelRating")] pub anatel_rating: Option, /// The video's British Board of Film Classification (BBFC) rating. #[serde(rename="bbfcRating")] pub bbfc_rating: Option, /// The video's rating from Thailand's Board of Film and Video Censors. #[serde(rename="bfvcRating")] pub bfvc_rating: Option, /// The video's rating from the Austrian Board of Media Classification (Bundesministerium für Unterricht, Kunst und Kultur). #[serde(rename="bmukkRating")] pub bmukk_rating: Option, /// Rating system for Canadian TV - Canadian TV Classification System The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian English-language broadcasts. For more information, see the Canadian Broadcast Standards Council website. #[serde(rename="catvRating")] pub catv_rating: Option, /// The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian French-language broadcasts. For more information, see the Canadian Broadcast Standards Council website. #[serde(rename="catvfrRating")] pub catvfr_rating: Option, /// The video's Central Board of Film Certification (CBFC - India) rating. #[serde(rename="cbfcRating")] pub cbfc_rating: Option, /// The video's Consejo de Calificación Cinematográfica (Chile) rating. #[serde(rename="cccRating")] pub ccc_rating: Option, /// The video's rating from Portugal's Comissão de Classificação de Espect´culos. #[serde(rename="cceRating")] pub cce_rating: Option, /// The video's rating in Switzerland. #[serde(rename="chfilmRating")] pub chfilm_rating: Option, /// The video's Canadian Home Video Rating System (CHVRS) rating. #[serde(rename="chvrsRating")] pub chvrs_rating: Option, /// The video's rating from the Commission de Contrôle des Films (Belgium). #[serde(rename="cicfRating")] pub cicf_rating: Option, /// The video's rating from Romania's CONSILIUL NATIONAL AL AUDIOVIZUALULUI (CNA). #[serde(rename="cnaRating")] pub cna_rating: Option, /// Rating system in France - Commission de classification cinematographique #[serde(rename="cncRating")] pub cnc_rating: Option, /// The video's rating from France's Conseil supérieur de l’audiovisuel, which rates broadcast content. #[serde(rename="csaRating")] pub csa_rating: Option, /// The video's rating from Luxembourg's Commission de surveillance de la classification des films (CSCF). #[serde(rename="cscfRating")] pub cscf_rating: Option, /// The video's rating in the Czech Republic. #[serde(rename="czfilmRating")] pub czfilm_rating: Option, /// The video's Departamento de Justiça, Classificação, Qualificação e Títulos (DJCQT - Brazil) rating. #[serde(rename="djctqRating")] pub djctq_rating: Option, /// Reasons that explain why the video received its DJCQT (Brazil) rating. #[serde(rename="djctqRatingReasons")] pub djctq_rating_reasons: Option>, /// Rating system in Turkey - Evaluation and Classification Board of the Ministry of Culture and Tourism #[serde(rename="ecbmctRating")] pub ecbmct_rating: Option, /// The video's rating in Estonia. #[serde(rename="eefilmRating")] pub eefilm_rating: Option, /// The video's rating in Egypt. #[serde(rename="egfilmRating")] pub egfilm_rating: Option, /// The video's Eirin (映倫) rating. Eirin is the Japanese rating system. #[serde(rename="eirinRating")] pub eirin_rating: Option, /// The video's rating from Malaysia's Film Censorship Board. #[serde(rename="fcbmRating")] pub fcbm_rating: Option, /// The video's rating from Hong Kong's Office for Film, Newspaper and Article Administration. #[serde(rename="fcoRating")] pub fco_rating: Option, /// This property has been deprecated. Use the contentDetails.contentRating.cncRating instead. #[serde(rename="fmocRating")] pub fmoc_rating: Option, /// The video's rating from South Africa's Film and Publication Board. #[serde(rename="fpbRating")] pub fpb_rating: Option, /// Reasons that explain why the video received its FPB (South Africa) rating. #[serde(rename="fpbRatingReasons")] pub fpb_rating_reasons: Option>, /// The video's Freiwillige Selbstkontrolle der Filmwirtschaft (FSK - Germany) rating. #[serde(rename="fskRating")] pub fsk_rating: Option, /// The video's rating in Greece. #[serde(rename="grfilmRating")] pub grfilm_rating: Option, /// The video's Instituto de la Cinematografía y de las Artes Audiovisuales (ICAA - Spain) rating. #[serde(rename="icaaRating")] pub icaa_rating: Option, /// The video's Irish Film Classification Office (IFCO - Ireland) rating. See the IFCO website for more information. #[serde(rename="ifcoRating")] pub ifco_rating: Option, /// The video's rating in Israel. #[serde(rename="ilfilmRating")] pub ilfilm_rating: Option, /// The video's INCAA (Instituto Nacional de Cine y Artes Audiovisuales - Argentina) rating. #[serde(rename="incaaRating")] pub incaa_rating: Option, /// The video's rating from the Kenya Film Classification Board. #[serde(rename="kfcbRating")] pub kfcb_rating: Option, /// The video's NICAM/Kijkwijzer rating from the Nederlands Instituut voor de Classificatie van Audiovisuele Media (Netherlands). #[serde(rename="kijkwijzerRating")] pub kijkwijzer_rating: Option, /// The video's Korea Media Rating Board (영상물등급위원회) rating. The KMRB rates videos in South Korea. #[serde(rename="kmrbRating")] pub kmrb_rating: Option, /// The video's rating from Indonesia's Lembaga Sensor Film. #[serde(rename="lsfRating")] pub lsf_rating: Option, /// The video's rating from Malta's Film Age-Classification Board. #[serde(rename="mccaaRating")] pub mccaa_rating: Option, /// The video's rating from the Danish Film Institute's (Det Danske Filminstitut) Media Council for Children and Young People. #[serde(rename="mccypRating")] pub mccyp_rating: Option, /// The video's rating system for Vietnam - MCST #[serde(rename="mcstRating")] pub mcst_rating: Option, /// The video's rating from Singapore's Media Development Authority (MDA) and, specifically, it's Board of Film Censors (BFC). #[serde(rename="mdaRating")] pub mda_rating: Option, /// The video's rating from Medietilsynet, the Norwegian Media Authority. #[serde(rename="medietilsynetRating")] pub medietilsynet_rating: Option, /// The video's rating from Finland's Kansallinen Audiovisuaalinen Instituutti (National Audiovisual Institute). #[serde(rename="mekuRating")] pub meku_rating: Option, /// The rating system for MENA countries, a clone of MPAA. It is needed to prevent titles go live w/o additional QC check, since some of them can be inappropriate for the countries at all. See b/33408548 for more details. #[serde(rename="menaMpaaRating")] pub mena_mpaa_rating: Option, /// The video's rating from the Ministero dei Beni e delle Attività Culturali e del Turismo (Italy). #[serde(rename="mibacRating")] pub mibac_rating: Option, /// The video's Ministerio de Cultura (Colombia) rating. #[serde(rename="mocRating")] pub moc_rating: Option, /// The video's rating from Taiwan's Ministry of Culture (文化部). #[serde(rename="moctwRating")] pub moctw_rating: Option, /// The video's Motion Picture Association of America (MPAA) rating. #[serde(rename="mpaaRating")] pub mpaa_rating: Option, /// The rating system for trailer, DVD, and Ad in the US. See http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html. #[serde(rename="mpaatRating")] pub mpaat_rating: Option, /// The video's rating from the Movie and Television Review and Classification Board (Philippines). #[serde(rename="mtrcbRating")] pub mtrcb_rating: Option, /// The video's rating from the Maldives National Bureau of Classification. #[serde(rename="nbcRating")] pub nbc_rating: Option, /// The video's rating in Poland. #[serde(rename="nbcplRating")] pub nbcpl_rating: Option, /// The video's rating from the Bulgarian National Film Center. #[serde(rename="nfrcRating")] pub nfrc_rating: Option, /// The video's rating from Nigeria's National Film and Video Censors Board. #[serde(rename="nfvcbRating")] pub nfvcb_rating: Option, /// The video's rating from the Nacionãlais Kino centrs (National Film Centre of Latvia). #[serde(rename="nkclvRating")] pub nkclv_rating: Option, /// The National Media Council ratings system for United Arab Emirates. #[serde(rename="nmcRating")] pub nmc_rating: Option, /// The video's Office of Film and Literature Classification (OFLC - New Zealand) rating. #[serde(rename="oflcRating")] pub oflc_rating: Option, /// The video's rating in Peru. #[serde(rename="pefilmRating")] pub pefilm_rating: Option, /// The video's rating from the Hungarian Nemzeti Filmiroda, the Rating Committee of the National Office of Film. #[serde(rename="rcnofRating")] pub rcnof_rating: Option, /// The video's rating in Venezuela. #[serde(rename="resorteviolenciaRating")] pub resorteviolencia_rating: Option, /// The video's General Directorate of Radio, Television and Cinematography (Mexico) rating. #[serde(rename="rtcRating")] pub rtc_rating: Option, /// The video's rating from Ireland's Raidió Teilifís Éireann. #[serde(rename="rteRating")] pub rte_rating: Option, /// The video's National Film Registry of the Russian Federation (MKRF - Russia) rating. #[serde(rename="russiaRating")] pub russia_rating: Option, /// The video's rating in Slovakia. #[serde(rename="skfilmRating")] pub skfilm_rating: Option, /// The video's rating in Iceland. #[serde(rename="smaisRating")] pub smais_rating: Option, /// The video's rating from Statens medieråd (Sweden's National Media Council). #[serde(rename="smsaRating")] pub smsa_rating: Option, /// The video's TV Parental Guidelines (TVPG) rating. #[serde(rename="tvpgRating")] pub tvpg_rating: Option, /// A rating that YouTube uses to identify age-restricted content. #[serde(rename="ytRating")] pub yt_rating: Option, } impl client::Part for ContentRating {} /// 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 Entity { /// no description provided pub id: Option, /// no description provided #[serde(rename="typeId")] pub type_id: Option, /// no description provided pub url: Option, } impl client::Part for Entity {} /// 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 { /// Altitude above the reference ellipsoid, in meters. pub altitude: Option, /// Latitude in degrees. pub latitude: Option, /// Longitude in degrees. pub longitude: Option, } impl client::Part for GeoPoint {} /// An *i18nLanguage* resource identifies a UI language currently supported by YouTube. /// /// # 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](I18nLanguageListCall) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nLanguage { /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the i18n language. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nLanguage". pub kind: Option, /// The snippet object contains basic details about the i18n language, such as language code and human-readable name. pub snippet: Option, } impl client::Resource for I18nLanguage {} impl client::ToParts for I18nLanguage { /// 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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 i18n languages](I18nLanguageListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nLanguageListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of supported i18n languages. In this map, the i18n language ID is the map key, and its value is the corresponding i18nLanguage resource. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nLanguageListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for I18nLanguageListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// 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 { /// A short BCP-47 code that uniquely identifies a language. pub hl: Option, /// The human-readable name of the language in the language itself. pub name: Option, } impl client::Part for I18nLanguageSnippet {} /// 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](I18nRegionListCall) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nRegion { /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the i18n region. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nRegion". pub kind: Option, /// The snippet object contains basic details about the i18n region, such as region code and human-readable name. pub snippet: Option, } impl client::Resource for I18nRegion {} impl client::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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 i18n regions](I18nRegionListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct I18nRegionListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of regions where YouTube is available. In this map, the i18n region ID is the map key, and its value is the corresponding i18nRegion resource. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nRegionListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for I18nRegionListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.visitor_id.is_some() { r = r + "visitorId,"; } 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 client::Part for I18nRegionSnippet {} /// 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 { /// The URL for the background image shown on the video watch page. The image should be 1200px by 615px, with a maximum file size of 128k. #[serde(rename="backgroundImageUrl")] pub background_image_url: Option, /// This is generated when a ChannelBanner.Insert request has succeeded for the given channel. #[serde(rename="bannerExternalUrl")] pub banner_external_url: Option, /// Banner image. Desktop size (1060x175). #[serde(rename="bannerImageUrl")] pub banner_image_url: Option, /// Banner image. Mobile size high resolution (1440x395). #[serde(rename="bannerMobileExtraHdImageUrl")] pub banner_mobile_extra_hd_image_url: Option, /// Banner image. Mobile size high resolution (1280x360). #[serde(rename="bannerMobileHdImageUrl")] pub banner_mobile_hd_image_url: Option, /// Banner image. Mobile size (640x175). #[serde(rename="bannerMobileImageUrl")] pub banner_mobile_image_url: Option, /// Banner image. Mobile size low resolution (320x88). #[serde(rename="bannerMobileLowImageUrl")] pub banner_mobile_low_image_url: Option, /// Banner image. Mobile size medium/high resolution (960x263). #[serde(rename="bannerMobileMediumHdImageUrl")] pub banner_mobile_medium_hd_image_url: Option, /// Banner image. Tablet size extra high resolution (2560x424). #[serde(rename="bannerTabletExtraHdImageUrl")] pub banner_tablet_extra_hd_image_url: Option, /// Banner image. Tablet size high resolution (2276x377). #[serde(rename="bannerTabletHdImageUrl")] pub banner_tablet_hd_image_url: Option, /// Banner image. Tablet size (1707x283). #[serde(rename="bannerTabletImageUrl")] pub banner_tablet_image_url: Option, /// Banner image. Tablet size low resolution (1138x188). #[serde(rename="bannerTabletLowImageUrl")] pub banner_tablet_low_image_url: Option, /// Banner image. TV size high resolution (1920x1080). #[serde(rename="bannerTvHighImageUrl")] pub banner_tv_high_image_url: Option, /// Banner image. TV size extra high resolution (2120x1192). #[serde(rename="bannerTvImageUrl")] pub banner_tv_image_url: Option, /// Banner image. TV size low resolution (854x480). #[serde(rename="bannerTvLowImageUrl")] pub banner_tv_low_image_url: Option, /// Banner image. TV size medium resolution (1280x720). #[serde(rename="bannerTvMediumImageUrl")] pub banner_tv_medium_image_url: Option, /// The image map script for the large banner image. #[serde(rename="largeBrandedBannerImageImapScript")] pub large_branded_banner_image_imap_script: Option, /// The URL for the 854px by 70px image that appears below the video player in the expanded video view of the video watch page. #[serde(rename="largeBrandedBannerImageUrl")] pub large_branded_banner_image_url: Option, /// The image map script for the small banner image. #[serde(rename="smallBrandedBannerImageImapScript")] pub small_branded_banner_image_imap_script: Option, /// The URL for the 640px by 70px banner image that appears below the video player in the default view of the video watch page. The URL for the image that appears above the top-left corner of the video player. This is a 25-pixel-high image with a flexible width that cannot exceed 170 pixels. #[serde(rename="smallBrandedBannerImageUrl")] pub small_branded_banner_image_url: Option, /// The URL for a 1px by 1px tracking pixel that can be used to collect statistics for views of the channel or video pages. #[serde(rename="trackingImageUrl")] pub tracking_image_url: Option, /// no description provided #[serde(rename="watchIconImageUrl")] pub watch_icon_image_url: Option, } impl client::Part for ImageSettings {} /// 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 primary ingestion URL that you should use to stream video to YouTube. You must stream video to this URL. Depending on which application or tool you use to encode your video stream, you may need to enter the stream URL and stream name separately or you may need to concatenate them in the following format: *STREAM_URL/STREAM_NAME* #[serde(rename="ingestionAddress")] pub ingestion_address: Option, /// This ingestion url may be used instead of backupIngestionAddress in order to stream via RTMPS. Not applicable to non-RTMP streams. #[serde(rename="rtmpsBackupIngestionAddress")] pub rtmps_backup_ingestion_address: Option, /// This ingestion url may be used instead of ingestionAddress in order to stream via RTMPS. Not applicable to non-RTMP streams. #[serde(rename="rtmpsIngestionAddress")] pub rtmps_ingestion_address: Option, /// The HTTP or RTMP stream name that YouTube assigns to the video stream. #[serde(rename="streamName")] pub stream_name: Option, } impl client::Part for IngestionInfo {} /// LINT.IfChange Describes an invideo branding. /// /// # 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](WatermarkSetCall) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoBranding { /// The bytes the uploaded image. Only used in api to youtube communication. #[serde(rename="imageBytes")] pub image_bytes: Option, /// The url of the uploaded image. Only used in apiary to api communication. #[serde(rename="imageUrl")] pub image_url: Option, /// The spatial position within the video where the branding watermark will be displayed. pub position: Option, /// The channel to which this branding links. If not present it defaults to the current channel. #[serde(rename="targetChannelId")] pub target_channel_id: Option, /// The temporal position within the video where watermark will be displayed. pub timing: Option, } impl client::RequestValue for InvideoBranding {} /// Describes the spatial position of a visual widget inside a video. It is a union of various position types, out of which only will be set one. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InvideoPosition { /// Describes in which corner of the video the visual widget will appear. #[serde(rename="cornerPosition")] pub corner_position: Option, /// Defines the position type. #[serde(rename="type")] pub type_: Option, } impl client::Part for InvideoPosition {} /// 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 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, /// 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, } impl client::Part for InvideoTiming {} /// 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 client::Part for LanguageTag {} /// 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 LevelDetails { /// The name that should be used when referring to this level. #[serde(rename="displayName")] pub display_name: Option, } impl client::Part for LevelDetails {} /// A *liveBroadcast* resource represents an event that will be streamed, via live video, on YouTube. /// /// # 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*). /// /// * [bind live broadcasts](LiveBroadcastBindCall) (response) /// * [delete live broadcasts](LiveBroadcastDeleteCall) (none) /// * [insert live broadcasts](LiveBroadcastInsertCall) (request|response) /// * [list live broadcasts](LiveBroadcastListCall) (none) /// * [transition live broadcasts](LiveBroadcastTransitionCall) (response) /// * [update live broadcasts](LiveBroadcastUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcast { /// The contentDetails object contains information about the event's video content, such as whether the content can be shown in an embedded video player or if it will be archived and therefore available for viewing after the event has concluded. #[serde(rename="contentDetails")] pub content_details: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the broadcast. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveBroadcast". pub kind: Option, /// The snippet object contains basic details about the event, including its title, description, start time, and end time. pub snippet: Option, /// The statistics object contains info about the event's current stats. These include concurrent viewers and total chat count. Statistics can change (in either direction) during the lifetime of an event. Statistics are only returned while the event is live. pub statistics: Option, /// The status object contains information about the event's status. pub status: Option, } impl client::RequestValue for LiveBroadcast {} impl client::Resource for LiveBroadcast {} impl client::ResponseResult for LiveBroadcast {} impl client::ToParts for LiveBroadcast { /// 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.content_details.is_some() { r = r + "contentDetails,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.statistics.is_some() { r = r + "statistics,"; } if self.status.is_some() { r = r + "status,"; } r.pop(); r } } /// Detailed settings of a broadcast. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastContentDetails { /// This value uniquely identifies the live stream bound to the broadcast. #[serde(rename="boundStreamId")] pub bound_stream_id: Option, /// The date and time that the live stream referenced by boundStreamId was last updated. #[serde(rename="boundStreamLastUpdateTimeMs")] pub bound_stream_last_update_time_ms: Option, /// no description provided #[serde(rename="closedCaptionsType")] pub closed_captions_type: Option, /// This setting indicates whether auto start is enabled for this broadcast. The default value for this property is false. This setting can only be used by Events. #[serde(rename="enableAutoStart")] pub enable_auto_start: Option, /// This setting indicates whether auto stop is enabled for this broadcast. The default value for this property is false. This setting can only be used by Events. #[serde(rename="enableAutoStop")] pub enable_auto_stop: Option, /// This setting indicates whether HTTP POST closed captioning is enabled for this broadcast. The ingestion URL of the closed captions is returned through the liveStreams API. This is mutually exclusive with using the closed_captions_type property, and is equivalent to setting closed_captions_type to CLOSED_CAPTIONS_HTTP_POST. #[serde(rename="enableClosedCaptions")] pub enable_closed_captions: Option, /// This setting indicates whether YouTube should enable content encryption for the broadcast. #[serde(rename="enableContentEncryption")] pub enable_content_encryption: Option, /// This setting determines whether viewers can access DVR controls while watching the video. DVR controls enable the viewer to control the video playback experience by pausing, rewinding, or fast forwarding content. The default value for this property is true. *Important:* You must set the value to true and also set the enableArchive property's value to true if you want to make playback available immediately after the broadcast ends. #[serde(rename="enableDvr")] pub enable_dvr: Option, /// This setting indicates whether the broadcast video can be played in an embedded player. If you choose to archive the video (using the enableArchive property), this setting will also apply to the archived video. #[serde(rename="enableEmbed")] pub enable_embed: Option, /// Indicates whether this broadcast has low latency enabled. #[serde(rename="enableLowLatency")] pub enable_low_latency: Option, /// If both this and enable_low_latency are set, they must match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW should have enable_low_latency omitted. #[serde(rename="latencyPreference")] pub latency_preference: Option, /// The mesh for projecting the video if projection is mesh. The mesh value must be a UTF-8 string containing the base-64 encoding of 3D mesh data that follows the Spherical Video V2 RFC specification for an mshp box, excluding the box size and type but including the following four reserved zero bytes for the version and flags. pub mesh: Option, /// The monitorStream object contains information about the monitor stream, which the broadcaster can use to review the event content before the broadcast stream is shown publicly. #[serde(rename="monitorStream")] pub monitor_stream: Option, /// The projection format of this broadcast. This defaults to rectangular. pub projection: Option, /// Automatically start recording after the event goes live. The default value for this property is true. *Important:* You must also set the enableDvr property's value to true if you want the playback to be available immediately after the broadcast ends. If you set this property's value to true but do not also set the enableDvr property to true, there may be a delay of around one day before the archived video will be available for playback. #[serde(rename="recordFromStart")] pub record_from_start: Option, /// This setting indicates whether the broadcast should automatically begin with an in-stream slate when you update the broadcast's status to live. After updating the status, you then need to send a liveCuepoints.insert request that sets the cuepoint's eventState to end to remove the in-stream slate and make your broadcast stream visible to viewers. #[serde(rename="startWithSlate")] pub start_with_slate: Option, /// The 3D stereo layout of this broadcast. This defaults to mono. #[serde(rename="stereoLayout")] pub stereo_layout: Option, } impl client::Part for LiveBroadcastContentDetails {} /// 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](LiveBroadcastListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveBroadcastListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of broadcasts that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveBroadcastListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for LiveBroadcastListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Basic broadcast 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 LiveBroadcastSnippet { /// The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete. #[serde(rename="actualEndTime")] pub actual_end_time: Option, /// The date and time that the broadcast actually started. This information is only available once the broadcast's state is live. #[serde(rename="actualStartTime")] pub actual_start_time: Option, /// The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast. #[serde(rename="channelId")] pub channel_id: Option, /// The broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting the description field of the corresponding video resource. pub description: Option, /// Indicates whether this broadcast is the default broadcast. Internal only. #[serde(rename="isDefaultBroadcast")] pub is_default_broadcast: Option, /// The id of the live chat for this broadcast. #[serde(rename="liveChatId")] pub live_chat_id: Option, /// The date and time that the broadcast was added to YouTube's live broadcast schedule. #[serde(rename="publishedAt")] pub published_at: Option, /// The date and time that the broadcast is scheduled to start. #[serde(rename="scheduledEndTime")] pub scheduled_end_time: Option, /// The date and time that the broadcast is scheduled to end. #[serde(rename="scheduledStartTime")] pub scheduled_start_time: Option, /// A map of thumbnail images associated with the broadcast. For each nested object in this object, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. pub thumbnails: Option, /// The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the title field of the corresponding video resource. pub title: Option, } impl client::Part for LiveBroadcastSnippet {} /// 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 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 client::Part for LiveBroadcastStatistics {} /// Live broadcast state. /// /// 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 status. The status can be updated using the API's liveBroadcasts.transition method. #[serde(rename="lifeCycleStatus")] pub life_cycle_status: Option, /// Priority of the live broadcast event (internal state). #[serde(rename="liveBroadcastPriority")] pub live_broadcast_priority: Option, /// Whether the broadcast is made for kids or not, decided by YouTube instead of the creator. This field is read only. #[serde(rename="madeForKids")] pub made_for_kids: Option, /// The broadcast's privacy status. Note that the broadcast represents exactly one YouTube video, so the privacy settings are identical to those supported for videos. In addition, you can set this field by modifying the broadcast resource or by setting the privacyStatus field of the corresponding video resource. #[serde(rename="privacyStatus")] pub privacy_status: Option, /// The broadcast's recording status. #[serde(rename="recordingStatus")] pub recording_status: Option, /// This field will be set to True if the creator declares the broadcast to be kids only: go/live-cw-work. #[serde(rename="selfDeclaredMadeForKids")] pub self_declared_made_for_kids: Option, } impl client::Part for LiveBroadcastStatus {} /// 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*). /// /// * [delete live chat bans](LiveChatBanDeleteCall) (none) /// * [insert live chat bans](LiveChatBanInsertCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatBan { /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the ban. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string `"youtube#liveChatBan"`. pub kind: Option, /// The `snippet` object contains basic details about the ban. pub snippet: Option, } impl client::RequestValue for LiveChatBan {} impl client::Resource for LiveChatBan {} impl client::ResponseResult for LiveChatBan {} impl client::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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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, /// no description provided #[serde(rename="bannedUserDetails")] pub banned_user_details: Option, /// The chat this ban is pertinent to. #[serde(rename="liveChatId")] pub live_chat_id: Option, /// The type of ban. #[serde(rename="type")] pub type_: Option, } impl client::Part for LiveChatBanSnippet {} /// 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 { /// 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 currency in which the fund was made. pub currency: Option, /// The comment added by the user to this fan funding event. #[serde(rename="userComment")] pub user_comment: Option, } impl client::Part for LiveChatFanFundingEventDetails {} /// 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](LiveChatMessageDeleteCall) (none) /// * [insert live chat messages](LiveChatMessageInsertCall) (request|response) /// * [list live chat messages](LiveChatMessageListCall) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessage { /// The authorDetails object contains basic details about the user that posted this message. #[serde(rename="authorDetails")] pub author_details: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the message. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage". pub kind: Option, /// The snippet object contains basic details about the message. pub snippet: Option, } impl client::RequestValue for LiveChatMessage {} impl client::Resource for LiveChatMessage {} impl client::ResponseResult for LiveChatMessage {} impl client::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.author_details.is_some() { r = r + "authorDetails,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 LiveChatMessageAuthorDetails { /// The YouTube channel ID. #[serde(rename="channelId")] pub channel_id: Option, /// The channel's URL. #[serde(rename="channelUrl")] pub channel_url: Option, /// The channel's display name. #[serde(rename="displayName")] pub display_name: Option, /// Whether the author is a moderator of the live chat. #[serde(rename="isChatModerator")] pub is_chat_moderator: Option, /// Whether the author is the owner of the live chat. #[serde(rename="isChatOwner")] pub is_chat_owner: Option, /// Whether the author is a sponsor of the live chat. #[serde(rename="isChatSponsor")] pub is_chat_sponsor: Option, /// Whether the author's identity has been verified by YouTube. #[serde(rename="isVerified")] pub is_verified: Option, /// The channels's avatar URL. #[serde(rename="profileImageUrl")] pub profile_image_url: Option, } impl client::Part for LiveChatMessageAuthorDetails {} /// 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 client::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 live chat messages](LiveChatMessageListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// no description provided pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessageListResponse". pub kind: Option, /// no description provided #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The date and time when the underlying stream went offline. #[serde(rename="offlineAt")] pub offline_at: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// The amount of time the client should wait before polling again. #[serde(rename="pollingIntervalMillis")] pub polling_interval_millis: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for LiveChatMessageListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.offline_at.is_some() { r = r + "offlineAt,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.polling_interval_millis.is_some() { r = r + "pollingIntervalMillis,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } 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 LiveChatMessageRetractedDetails { /// no description provided #[serde(rename="retractedMessageId")] pub retracted_message_id: Option, } impl client::Part for LiveChatMessageRetractedDetails {} /// 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 { /// 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 superChatEvent - the user that made the purchase #[serde(rename="authorChannelId")] pub author_channel_id: Option, /// Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent. #[serde(rename="displayMessage")] pub display_message: Option, /// Details about the funding event, this is only set if the type is 'fanFundingEvent'. #[serde(rename="fanFundingEventDetails")] pub fan_funding_event_details: Option, /// Whether the message has display content that should be displayed to users. #[serde(rename="hasDisplayContent")] pub has_display_content: Option, /// no description provided #[serde(rename="liveChatId")] pub live_chat_id: Option, /// no description provided #[serde(rename="messageDeletedDetails")] pub message_deleted_details: Option, /// no description provided #[serde(rename="messageRetractedDetails")] pub message_retracted_details: Option, /// The date and time when the message was orignally published. #[serde(rename="publishedAt")] pub published_at: Option, /// Details about the Super Chat event, this is only set if the type is 'superChatEvent'. #[serde(rename="superChatDetails")] pub super_chat_details: Option, /// Details about the Super Sticker event, this is only set if the type is 'superStickerEvent'. #[serde(rename="superStickerDetails")] pub super_sticker_details: Option, /// Details about the text message, this is only set if the type is 'textMessageEvent'. #[serde(rename="textMessageDetails")] pub text_message_details: Option, /// The type of message, this will always be present, it determines the contents of the message as well as which fields will be present. #[serde(rename="type")] pub type_: Option, /// no description provided #[serde(rename="userBannedDetails")] pub user_banned_details: Option, } impl client::Part for LiveChatMessageSnippet {} /// A *liveChatModerator* resource represents a moderator for a YouTube live chat. A chat moderator has the ability to ban/unban users from a chat, remove message, etc. /// /// # 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 moderators](LiveChatModeratorDeleteCall) (none) /// * [insert live chat moderators](LiveChatModeratorInsertCall) (request|response) /// * [list live chat moderators](LiveChatModeratorListCall) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatModerator { /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the moderator. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatModerator". pub kind: Option, /// The snippet object contains basic details about the moderator. pub snippet: Option, } impl client::RequestValue for LiveChatModerator {} impl client::Resource for LiveChatModerator {} impl client::ResponseResult for LiveChatModerator {} impl client::ToParts for LiveChatModerator { /// 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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 chat moderators](LiveChatModeratorListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatModeratorListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of moderators that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatModeratorListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for LiveChatModeratorListResponse {} impl client::ToParts for LiveChatModeratorListResponse { /// 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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } 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 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 client::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 LiveChatSuperChatDetails { /// A rendered string that displays the fund amount and currency to the user. #[serde(rename="amountDisplayString")] pub amount_display_string: Option, /// The amount purchased by the user, in micros (1,750,000 micros = 1.75). #[serde(rename="amountMicros")] pub amount_micros: Option, /// The currency in which the purchase was made. pub currency: Option, /// The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1. pub tier: Option, /// The comment added by the user to this Super Chat event. #[serde(rename="userComment")] pub user_comment: Option, } impl client::Part for LiveChatSuperChatDetails {} /// 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 LiveChatSuperStickerDetails { /// A rendered string that displays the fund amount and currency to the user. #[serde(rename="amountDisplayString")] pub amount_display_string: Option, /// The amount purchased by the user, in micros (1,750,000 micros = 1.75). #[serde(rename="amountMicros")] pub amount_micros: Option, /// The currency in which the purchase was made. pub currency: Option, /// Information about the Super Sticker. #[serde(rename="superStickerMetadata")] pub super_sticker_metadata: Option, /// The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1. pub tier: Option, } impl client::Part for LiveChatSuperStickerDetails {} /// 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 client::Part for LiveChatTextMessageDetails {} /// 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 client::Part for LiveChatUserBannedMessageDetails {} /// 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](LiveStreamDeleteCall) (none) /// * [insert live streams](LiveStreamInsertCall) (request|response) /// * [list live streams](LiveStreamListCall) (none) /// * [update live streams](LiveStreamUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStream { /// The cdn object defines the live stream's content delivery network (CDN) settings. These settings provide details about the manner in which you stream your content to YouTube. pub cdn: Option, /// The content_details object contains information about the stream, including the closed captions ingestion URL. #[serde(rename="contentDetails")] pub content_details: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the stream. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStream". pub kind: Option, /// The snippet object contains basic details about the stream, including its channel, title, and description. pub snippet: Option, /// The status object contains information about live stream's status. pub status: Option, } impl client::RequestValue for LiveStream {} impl client::Resource for LiveStream {} impl client::ResponseResult for LiveStream {} impl client::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.cdn.is_some() { r = r + "cdn,"; } if self.content_details.is_some() { r = r + "contentDetails,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.status.is_some() { r = r + "status,"; } 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 LiveStreamConfigurationIssue { /// The long-form description of the issue and how to resolve it. pub description: Option, /// The short-form reason for this issue. pub reason: Option, /// How severe this issue is to the stream. pub severity: Option, /// The kind of error happening. #[serde(rename="type")] pub type_: Option, } impl client::Part for LiveStreamConfigurationIssue {} /// 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 { /// The ingestion URL where the closed captions of this stream are sent. #[serde(rename="closedCaptionsIngestionUrl")] pub closed_captions_ingestion_url: Option, /// Indicates whether the stream is reusable, which means that it can be bound to multiple broadcasts. It is common for broadcasters to reuse the same stream for many different broadcasts if those broadcasts occur at different times. If you set this value to false, then the stream will not be reusable, which means that it can only be bound to one broadcast. Non-reusable streams differ from reusable streams in the following ways: - A non-reusable stream can only be bound to one broadcast. - A non-reusable stream might be deleted by an automated process after the broadcast ends. - The liveStreams.list method does not list non-reusable streams if you call the method and set the mine parameter to true. The only way to use that method to retrieve the resource for a non-reusable stream is to use the id parameter to identify the stream. #[serde(rename="isReusable")] pub is_reusable: Option, } impl client::Part for LiveStreamContentDetails {} /// 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 LiveStreamHealthStatus { /// The configurations issues on this stream #[serde(rename="configurationIssues")] pub configuration_issues: Option>, /// The last time this status was updated (in seconds) #[serde(rename="lastUpdateTimeSeconds")] pub last_update_time_seconds: Option, /// The status code of this stream pub status: Option, } impl client::Part for LiveStreamHealthStatus {} /// 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](LiveStreamListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveStreamListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of live streams that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStreamListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// no description provided #[serde(rename="pageInfo")] pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for LiveStreamListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } 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 { /// The ID that YouTube uses to uniquely identify the channel that is transmitting the stream. #[serde(rename="channelId")] pub channel_id: Option, /// The stream's description. The value cannot be longer than 10000 characters. pub description: Option, /// no description provided #[serde(rename="isDefaultStream")] pub is_default_stream: Option, /// The date and time that the stream was created. #[serde(rename="publishedAt")] pub published_at: Option, /// The stream's title. The value must be between 1 and 128 characters long. pub title: Option, } impl client::Part for LiveStreamSnippet {} /// 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 { /// The health status of the stream. #[serde(rename="healthStatus")] pub health_status: Option, /// no description provided #[serde(rename="streamStatus")] pub stream_status: Option, } impl client::Part for LiveStreamStatus {} /// 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 LocalizedProperty { /// no description provided pub default: Option, /// The language of the default property. #[serde(rename="defaultLanguage")] pub default_language: Option, /// no description provided pub localized: Option>, } impl client::Part for LocalizedProperty {} /// 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 client::Part for LocalizedString {} /// A *member* resource represents a member for a YouTube channel. A member provides recurring monetary support to a creator and receives special benefits. /// /// # 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 members](MemberListCall) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Member { /// Etag of this resource. pub etag: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#member". pub kind: Option, /// The snippet object contains basic details about the member. pub snippet: Option, } impl client::Resource for Member {} impl client::ToParts for Member { /// 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.etag.is_some() { r = r + "etag,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 members](MemberListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MemberListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of members that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#memberListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// no description provided #[serde(rename="pageInfo")] pub page_info: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for MemberListResponse {} impl client::ToParts for MemberListResponse { /// 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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } 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 MemberSnippet { /// The id of the channel that's offering memberships. #[serde(rename="creatorChannelId")] pub creator_channel_id: Option, /// Details about the member. #[serde(rename="memberDetails")] pub member_details: Option, /// Details about the user's membership. #[serde(rename="membershipsDetails")] pub memberships_details: Option, } impl client::Part for MemberSnippet {} /// 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 MembershipsDetails { /// Ids of all levels that the user has access to. This includes the currently active level and all other levels that are included because of a higher purchase. #[serde(rename="accessibleLevels")] pub accessible_levels: Option>, /// Id of the highest level that the user has access to at the moment. #[serde(rename="highestAccessibleLevel")] pub highest_accessible_level: Option, /// Display name for the highest level that the user has access to at the moment. #[serde(rename="highestAccessibleLevelDisplayName")] pub highest_accessible_level_display_name: Option, /// Data about memberships duration without taking into consideration pricing levels. #[serde(rename="membershipsDuration")] pub memberships_duration: Option, /// Data about memberships duration on particular pricing levels. #[serde(rename="membershipsDurationAtLevels")] pub memberships_duration_at_levels: Option>, } impl client::Part for MembershipsDetails {} /// 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 MembershipsDuration { /// The date and time when the user became a continuous member across all levels. #[serde(rename="memberSince")] pub member_since: Option, /// The cumulative time the user has been a member across all levels in complete months (the time is rounded down to the nearest integer). #[serde(rename="memberTotalDurationMonths")] pub member_total_duration_months: Option, } impl client::Part for MembershipsDuration {} /// 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 MembershipsDurationAtLevel { /// Pricing level ID. pub level: Option, /// The date and time when the user became a continuous member for the given level. #[serde(rename="memberSince")] pub member_since: Option, /// The cumulative time the user has been a member for the given level in complete months (the time is rounded down to the nearest integer). #[serde(rename="memberTotalDurationMonths")] pub member_total_duration_months: Option, } impl client::Part for MembershipsDurationAtLevel {} /// A *membershipsLevel* resource represents an offer made by YouTube creators for their fans. Users can become members of the channel by joining one of the available levels. They will provide recurring monetary support and receives special benefits. /// /// # 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 memberships levels](MembershipsLevelListCall) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsLevel { /// Etag of this resource. pub etag: Option, /// The ID that YouTube assigns to uniquely identify the memberships level. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#membershipsLevelListResponse". pub kind: Option, /// The snippet object contains basic details about the level. pub snippet: Option, } impl client::Resource for MembershipsLevel {} impl client::ToParts for MembershipsLevel { /// 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.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } 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 memberships levels](MembershipsLevelListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MembershipsLevelListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of pricing levels offered by a creator to the fans. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#membershipsLevelListResponse". pub kind: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for MembershipsLevelListResponse {} impl client::ToParts for MembershipsLevelListResponse { /// 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.etag.is_some() { r = r + "etag,"; } 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.visitor_id.is_some() { r = r + "visitorId,"; } 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 MembershipsLevelSnippet { /// The id of the channel that's offering channel memberships. #[serde(rename="creatorChannelId")] pub creator_channel_id: Option, /// Details about the pricing level. #[serde(rename="levelDetails")] pub level_details: Option, } impl client::Part for MembershipsLevelSnippet {} /// Settings and Info of the monitor 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 MonitorStreamInfo { /// If you have set the enableMonitorStream property to true, then this property determines the length of the live broadcast delay. #[serde(rename="broadcastStreamDelayMs")] pub broadcast_stream_delay_ms: Option, /// HTML code that embeds a player that plays the monitor stream. #[serde(rename="embedHtml")] pub embed_html: Option, /// This value determines whether the monitor stream is enabled for the broadcast. If the monitor stream is enabled, then YouTube will broadcast the event content on a special stream intended only for the broadcaster's consumption. The broadcaster can use the stream to review the event content and also to identify the optimal times to insert cuepoints. You need to set this value to true if you intend to have a broadcast delay for your event. *Note:* This property cannot be updated once the broadcast is in the testing or live state. #[serde(rename="enableMonitorStream")] pub enable_monitor_stream: Option, } impl client::Part for MonitorStreamInfo {} /// 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 client::Part for PageInfo {} /// 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*). /// /// * [delete playlists](PlaylistDeleteCall) (none) /// * [insert playlists](PlaylistInsertCall) (request|response) /// * [list playlists](PlaylistListCall) (none) /// * [update playlists](PlaylistUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Playlist { /// The contentDetails object contains information like video count. #[serde(rename="contentDetails")] pub content_details: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the playlist. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlist". pub kind: Option, /// Localizations for different languages pub localizations: Option>, /// The player object contains information that you would use to play the playlist in an embedded player. pub player: Option, /// The snippet object contains basic details about the playlist, such as its title and description. pub snippet: Option, /// The status object contains status information for the playlist. pub status: Option, } impl client::RequestValue for Playlist {} impl client::Resource for Playlist {} impl client::ResponseResult for Playlist {} impl client::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.content_details.is_some() { r = r + "contentDetails,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.localizations.is_some() { r = r + "localizations,"; } if self.player.is_some() { r = r + "player,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.status.is_some() { r = r + "status,"; } 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 PlaylistContentDetails { /// The number of videos in the playlist. #[serde(rename="itemCount")] pub item_count: Option, } impl client::Part for PlaylistContentDetails {} /// 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*). /// /// * [delete playlist items](PlaylistItemDeleteCall) (none) /// * [insert playlist items](PlaylistItemInsertCall) (request|response) /// * [list playlist items](PlaylistItemListCall) (none) /// * [update playlist items](PlaylistItemUpdateCall) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItem { /// The contentDetails object is included in the resource if the included item is a YouTube video. The object contains additional information about the video. #[serde(rename="contentDetails")] pub content_details: Option, /// Etag of this resource. pub etag: Option, /// The ID that YouTube uses to uniquely identify the playlist item. pub id: Option, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItem". pub kind: Option, /// The snippet object contains basic details about the playlist item, such as its title and position in the playlist. pub snippet: Option, /// The status object contains information about the playlist item's privacy status. pub status: Option, } impl client::RequestValue for PlaylistItem {} impl client::Resource for PlaylistItem {} impl client::ResponseResult for PlaylistItem {} impl client::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.content_details.is_some() { r = r + "contentDetails,"; } if self.etag.is_some() { r = r + "etag,"; } if self.id.is_some() { r = r + "id,"; } if self.kind.is_some() { r = r + "kind,"; } if self.snippet.is_some() { r = r + "snippet,"; } if self.status.is_some() { r = r + "status,"; } 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 PlaylistItemContentDetails { /// The time, measured in seconds from the start of the video, when the video should stop playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) By default, assume that the video.endTime is the end of the video. #[serde(rename="endAt")] pub end_at: Option, /// A user-generated note for this item. pub note: Option, /// The time, measured in seconds from the start of the video, when the video should start playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) The default value is 0. #[serde(rename="startAt")] pub start_at: Option, /// The ID that YouTube uses to uniquely identify a video. To retrieve the video resource, set the id query parameter to this value in your API request. #[serde(rename="videoId")] pub video_id: Option, /// The date and time that the video was published to YouTube. #[serde(rename="videoPublishedAt")] pub video_published_at: Option, } impl client::Part for PlaylistItemContentDetails {} /// 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](PlaylistItemListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistItemListResponse { /// no description provided pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of playlist items that match the request criteria. pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItemListResponse". Etag of this resource. pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for PlaylistItemListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Basic details about a playlist, including title, description and thumbnails. Basic details of a YouTube Playlist item provided by the author. Next ID: 15 /// /// 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, /// Channel title for the channel that the playlist item belongs to. #[serde(rename="channelTitle")] pub channel_title: Option, /// The item's description. pub description: Option, /// The ID that YouTube uses to uniquely identify thGe playlist that the playlist item is in. #[serde(rename="playlistId")] pub playlist_id: Option, /// The order in which the item appears in the playlist. The value uses a zero-based index, so the first item has a position of 0, the second item has a position of 1, and so forth. pub position: Option, /// The date and time that the item was added to the playlist. #[serde(rename="publishedAt")] pub published_at: Option, /// The id object contains information that can be used to uniquely identify the resource that is included in the playlist as the playlist item. #[serde(rename="resourceId")] pub resource_id: Option, /// A map of thumbnail images associated with the playlist item. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. pub thumbnails: Option, /// The item's title. pub title: Option, /// Channel id for the channel this video belongs to. #[serde(rename="videoOwnerChannelId")] pub video_owner_channel_id: Option, /// Channel title for the channel this video belongs to. #[serde(rename="videoOwnerChannelTitle")] pub video_owner_channel_title: Option, } impl client::Part for PlaylistItemSnippet {} /// Information about the playlist item's privacy 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 PlaylistItemStatus { /// This resource's privacy status. #[serde(rename="privacyStatus")] pub privacy_status: Option, } impl client::Part for PlaylistItemStatus {} /// 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](PlaylistListCall) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlaylistListResponse { /// Etag of this resource. pub etag: Option, /// Serialized EventId of the request which produced this response. #[serde(rename="eventId")] pub event_id: Option, /// A list of playlists that match the request criteria pub items: Option>, /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistListResponse". pub kind: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// General pagination information. #[serde(rename="pageInfo")] pub page_info: Option, /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. #[serde(rename="prevPageToken")] pub prev_page_token: Option, /// no description provided #[serde(rename="tokenPagination")] pub token_pagination: Option, /// The visitorId identifies the visitor. #[serde(rename="visitorId")] pub visitor_id: Option, } impl client::ResponseResult for PlaylistListResponse {} impl client::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.etag.is_some() { r = r + "etag,"; } 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.next_page_token.is_some() { r = r + "nextPageToken,"; } if self.page_info.is_some() { r = r + "pageInfo,"; } if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } if self.token_pagination.is_some() { r = r + "tokenPagination,"; } if self.visitor_id.is_some() { r = r + "visitorId,"; } r.pop(); r } } /// Playlist 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 PlaylistLocalization { /// The localized strings for playlist's description. pub description: Option, /// The localized strings for playlist's title. pub title: Option, } impl client::Part for PlaylistLocalization {} /// 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 PlaylistPlayer { /// An