diff --git a/.gitignore b/.gitignore index cda5827075..62fb81bec7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.timestamp .pyenv *.pyc **target/ diff --git a/Makefile b/Makefile index b2cf58591a..f7f3df6798 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: json-to-xml clean help api-deps rebuild-apis license +.PHONY: json-to-xml clean help api-deps regen-apis license .SUFFIXES: include Makefile.helpers @@ -11,12 +11,13 @@ MAKO_RENDER := etc/bin/mako-render TPL := $(PYTHON) $(MAKO_RENDER) MAKO_SRC = src/mako +RUST_SRC = src/rust API_DEPS_TPL = $(MAKO_SRC)/deps.mako API_DEPS = .api.deps API_SHARED_INFO = etc/api/shared.yaml API_JSON_FILES = $(shell find etc -type f -name '*-api.json') MAKO_LIB_DIR = $(MAKO_SRC)/lib -MAKO_LIB_FILES = $(shell find $(MAKO_LIB_DIR) -type f -name '*.mako' -or -name '*.py') +MAKO_LIB_FILES = $(shell find $(MAKO_LIB_DIR) -type f -name '*.*') help: $(info using template engine: '$(TPL)') @@ -24,7 +25,7 @@ help: $(info Targets) $(info help - print this help) $(info api-deps - generate a file to tell make what API file dependencies will be) - $(info rebuild-apis - clear out all generated apis, and regenerate them) + $(info regen-apis - clear out all generated apis, and regenerate them) $(info help-api - show all api targets to build individually) $(info license - regenerate the main license file) @@ -35,18 +36,18 @@ $(PYTHON): $(MAKO_RENDER): $(PYTHON) $(API_DEPS): $(API_SHARED_INFO) $(API_DEPS_TPL) $(MAKO_LIB_FILES) $(MAKO_RENDER) - PYTHONPATH=$(MAKO_LIB_DIR) $(TPL) --template-dir '.' -io $(API_DEPS_TPL) --data-files $(API_SHARED_INFO) > $@ + PYTHONPATH=$(MAKO_LIB_DIR) $(TPL) --template-dir '.' -io $(API_DEPS_TPL)=$@ --data-files $(API_SHARED_INFO) api-deps: $(API_DEPS) include $(API_DEPS) LICENSE.md: $(MAKO_SRC)/LICENSE.md.mako $(API_SHARED_INFO) - $(TPL) -io $<=$@ --data-files $(API_SHARED_INFO) + PYTHONPATH=$(MAKO_LIB_DIR) $(TPL) -io $<=$@ --data-files $(API_SHARED_INFO) license: LICENSE.md -rebuild-apis: clean-apis apis license +regen-apis: clean-apis apis license clean: clean-apis -rm -Rf $(VENV_DIR) diff --git a/etc/api/shared.yaml b/etc/api/shared.yaml index 8c5f288c22..e5fbfff4f7 100644 --- a/etc/api/shared.yaml +++ b/etc/api/shared.yaml @@ -13,6 +13,9 @@ api: - name: youtube version: v3 base_path: "etc/api" + terms: + # how to actually do something with the API + action: do templates: # all output directories are relative to the one set for the respective API - source: README.md diff --git a/gen/youtube3/LICENSE.md b/gen/youtube3/LICENSE.md new file mode 100644 index 0000000000..ae22e6ec52 --- /dev/null +++ b/gen/youtube3/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015` `Sebastian Thiel` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/youtube3/README.md b/gen/youtube3/README.md new file mode 100644 index 0000000000..9ff8020c6c --- /dev/null +++ b/gen/youtube3/README.md @@ -0,0 +1,84 @@ + +The `youtube3` library allows access to all features of *YouTube*. + +# Features + +Handle the following *Resources* with ease ... + +* activities (*insert* and *list*) +* channel banners (*insert*) +* channel sections (*delete*, *insert*, *list* and *update*) +* channels (*list* and *update*) +* guide categories (*list*) +* i18n languages (*list*) +* i18n regions (*list*) +* live broadcasts (*bind*, *control*, *delete*, *insert*, *list*, *transition* and *update*) +* live streams (*delete*, *insert*, *list* and *update*) +* playlist items (*delete*, *insert*, *list* and *update*) +* playlists (*delete*, *insert*, *list* and *update*) +* search (*list*) +* subscriptions (*delete*, *insert* and *list*) +* thumbnails (*set*) +* video categories (*list*) +* videos (*delete*, *getRating*, *insert*, *list*, *rate* and *update*) +* watermarks (*set* and *unset*) + +# Structure of this Library + +The API is structured into the following primary items: + +* **Hub** + * a central object to maintain state and allow accessing all *Activities* +* **Resources** + * primary types that you can apply *Activities* to + * a collection of properties and *Parts* + * **Parts** + * a collection of properties + * never directly used in *Activities* +* **Activities** + * operations to apply to *Resources* + +Generally speaking, you can invoke *Activities* like this: + +```Rust,ignore +let r = hub.resource().activity(...).do() +``` + +Or specifically ... + +```ignore +let r = hub.videos().rate(...).do() +let r = hub.videos().getRating(...).do() +let r = hub.videos().list(...).do() +let r = hub.videos().insert(...).do() +let r = hub.videos().update(...).do() +let r = hub.videos().delete(...).do() +``` + +The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +supports various methods to configure the impending operation. It is made such that all required arguments have to be +specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +The `do()` method performs the actual communication with the server and returns the respective result. + +# Usage (*TODO*) + +## Instantiating the Hub + +## About error handling + +## About costumization + +[builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +[google-go-api]: https://github.com/google/google-api-go-client + + +# License +The **youtube3** library was generated by Sebastian Thiel, and is placed +under the *MIT* license. +You can read the full text at the repository's [license file][repo-license]. + +[repo-license]: https://github.com/Byron/google-apis-rsLICENSE.md diff --git a/gen/youtube3/cargo.toml b/gen/youtube3/cargo.toml new file mode 100644 index 0000000000..d2769a03e1 --- /dev/null +++ b/gen/youtube3/cargo.toml @@ -0,0 +1,26 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "youtube3" +version = "0.0.1" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with YouTube (protocol v3)" +repository = "https://github.com/Byron/google-apis-rs/gen/youtube3/.timestamp" +homepage = "https://developers.google.com/youtube/v3" +documentation = "http://byron.github.io/google-apis-rs" +license = "MIT" +keywords = ["youtube", "google", "protocol", "web", "api"] + +[dependencies] +# Just to get hyper to work ! +openssl = "= 0.4.3" +# Just to get hyper to work ! +cookie = "= 0.1.13" +hyper = "*" +rustc-serialize = "*" +yup-oauth2 = "*" + +[dev-dependencies] +yup-hyper-mock = "*" diff --git a/gen/youtube3/src/cmn.rs b/gen/youtube3/src/cmn.rs new file mode 100644 index 0000000000..ccbad6cc41 --- /dev/null +++ b/gen/youtube3/src/cmn.rs @@ -0,0 +1,21 @@ +// COPY OF 'src/rust/cmn.rs' +// DO NOT EDIT +use std::marker::MarkerTrait; + +/// Identifies types which can be inserted and deleted. +/// Types with this trait are most commonly used by clients of this API. +pub trait Resource: MarkerTrait {} + +/// Identifies types which are used in API responses. +pub trait ResponseResult: MarkerTrait {} + +/// Identifies types which are used in API requests. +pub trait RequestResult: MarkerTrait {} + +/// Identifies types which are only used as part of other types, which +/// usually are carrying the `Resource` trait. +pub trait Part: MarkerTrait {} + +/// Identifies types which are only used by other types internally. +/// They have no special meaning, this trait just marks them for completeness. +pub trait NestedType: MarkerTrait {} diff --git a/gen/youtube3/src/lib.rs b/gen/youtube3/src/lib.rs new file mode 100644 index 0000000000..b7f40d6b0c --- /dev/null +++ b/gen/youtube3/src/lib.rs @@ -0,0 +1,2948 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/lib.rs.mako' +// DO NOT EDIT ! + +//! # Features +//! +//! Handle the following *Resources* with ease ... +//! +//! * activities (*insert* and *list*) +//! * channel banners (*insert*) +//! * channel sections (*delete*, *insert*, *list* and *update*) +//! * channels (*list* and *update*) +//! * guide categories (*list*) +//! * i18n languages (*list*) +//! * i18n regions (*list*) +//! * live broadcasts (*bind*, *control*, *delete*, *insert*, *list*, *transition* and *update*) +//! * live streams (*delete*, *insert*, *list* and *update*) +//! * playlist items (*delete*, *insert*, *list* and *update*) +//! * playlists (*delete*, *insert*, *list* and *update*) +//! * search (*list*) +//! * subscriptions (*delete*, *insert* and *list*) +//! * thumbnails (*set*) +//! * video categories (*list*) +//! * videos (*delete*, *getRating*, *insert*, *list*, *rate* and *update*) +//! * watermarks (*set* and *unset*) +//! +//! # Structure of this Library +//! +//! The API is structured into the following primary items: +//! +//! * **Hub** +//! * a central object to maintain state and allow accessing all *Activities* +//! * **Resources** +//! * primary types that you can apply *Activities* to +//! * a collection of properties and *Parts* +//! * **Parts** +//! * a collection of properties +//! * never directly used in *Activities* +//! * **Activities** +//! * operations to apply to *Resources* +//! +//! Generally speaking, you can invoke *Activities* like this: +//! +//! ```Rust,ignore +//! let r = hub.resource().activity(...).do() +//! ``` +//! +//! Or specifically ... +//! +//! ```ignore +//! let r = hub.videos().rate(...).do() +//! let r = hub.videos().getRating(...).do() +//! let r = hub.videos().list(...).do() +//! let r = hub.videos().insert(...).do() +//! let r = hub.videos().update(...).do() +//! let r = hub.videos().delete(...).do() +//! ``` +//! +//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +//! supports various methods to configure the impending operation. It is made such that all required arguments have to be +//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +//! The `do()` method performs the actual communication with the server and returns the respective result. +//! +//! # Usage (*TODO*) +//! +//! ## Instantiating the Hub +//! +//! ## About error handling +//! +//! ## About costumization +//! +//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +//! [google-go-api]: https://github.com/google/google-api-go-client +//! +//! +//! +#![feature(core)] +#![allow(non_snake_case)] + +extern crate "rustc-serialize" as rustc_serialize; +extern crate "yup-oauth2" as oauth2; + +mod cmn; + +use std::collections::HashMap; + +pub use cmn::{Resource, Part, ResponseResult, RequestResult, NestedType}; + +// ############ +// SCHEMAS ### +// ########## +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoConversionPings { + /// Pings that the app shall fire for a video (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: Vec, +} + +impl Part for VideoConversionPings {} + +/// 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 (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct SubscriptionListResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + pub nextPageToken: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#subscriptionListResponse". + pub kind: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, + /// A list of subscriptions that match the request criteria. + pub items: Vec, + /// no description provided + pub tokenPagination: Option, + /// Etag of this resource. + pub etag: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. + pub prevPageToken: Option, + /// no description provided + pub pageInfo: Option, +} + +impl ResponseResult for SubscriptionListResponse {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ActivityContentDetailsLike { + /// The resourceId object contains information that identifies the rated resource. + pub resourceId: Option, +} + +impl Part for ActivityContentDetailsLike {} + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct LiveBroadcastSnippet { + /// The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub actualEndTime: 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, + /// 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, + /// The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast. + pub channelId: Option, + /// The date and time that the broadcast was added to YouTube's live broadcast schedule. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub publishedAt: Option, + /// The date and time that the broadcast is scheduled to start. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub scheduledStartTime: Option, + /// The date and time that the broadcast actually started. This information is only available once the broadcast's state is live. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub actualStartTime: Option, + /// The date and time that the broadcast is scheduled to end. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub scheduledEndTime: 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, +} + +impl Part for LiveBroadcastSnippet {} + +/// Describes original video file properties, including technical details about audio and video streams, but also metadata information like content length, digitization time, or geotagging information. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoFileDetails { + /// The uploaded video file's combined (video and audio) bitrate in bits per second. + pub bitrateBps: Option, + /// The uploaded video file's container format. + pub container: Option, + /// Geographic coordinates that identify the place where the uploaded video was recorded. Coordinates are defined using WGS 84. + pub recordingLocation: Option, + /// The uploaded file's type as detected by YouTube's video processing engine. Currently, YouTube only processes video files, but this field is present whether a video file or another type of file was uploaded. + pub fileType: Option, + /// The date and time when the uploaded video file was created. The value is specified in ISO 8601 format. Currently, the following ISO 8601 formats are supported: +/// - Date only: YYYY-MM-DD +/// - Naive time: YYYY-MM-DDTHH:MM:SS +/// - Time with timezone: YYYY-MM-DDTHH:MM:SS+HH:MM + pub creationTime: Option, + /// The length of the uploaded video in milliseconds. + pub durationMs: Option, + /// The uploaded file's name. This field is present whether a video file or another type of file was uploaded. + pub fileName: Option, + /// The uploaded file's size in bytes. This field is present whether a video file or another type of file was uploaded. + pub fileSize: Option, + /// A list of video streams contained in the uploaded video file. Each item in the list contains detailed metadata about a video stream. + pub videoStreams: Vec, + /// A list of audio streams contained in the uploaded video file. Each item in the list contains detailed metadata about an audio stream. + pub audioStreams: Vec, +} + +impl Part for VideoFileDetails {} + +/// Playlist localization setting +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PlaylistLocalization { + /// The localized strings for playlist's description. + pub description: Option, + /// The localized strings for playlist's title. + pub title: Option, +} + +impl Part for PlaylistLocalization {} + +/// A playlist resource represents a YouTube playlist. A playlist is a collection of videos that can be viewed sequentially and shared with other users. A playlist can contain up to 200 videos, and YouTube does not limit the number of playlists that each user creates. By default, playlists are publicly visible to other users, but playlists can be public or private. +/// +/// YouTube also uses playlists to identify special collections of videos for a channel, such as: +/// - uploaded videos +/// - favorite videos +/// - positively rated (liked) videos +/// - watch history +/// - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. +/// +/// You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * insert (request|response) +/// * delete (none) +/// * list (none) +/// * update (request|response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct Playlist { + /// The status object contains status information for the playlist. + pub status: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlist". + pub kind: Option, + /// The contentDetails object contains information like video count. + pub contentDetails: Option, + /// The snippet object contains basic details about the playlist, such as its title and description. + pub snippet: Option, + /// The player object contains information that you would use to play the playlist in an embedded player. + pub player: Option, + /// Etag of this resource. + pub etag: Option, + /// The ID that YouTube uses to uniquely identify the playlist. + pub id: Option, + /// Localizations for different languages + pub localizations: HashMap, +} + +impl RequestResult for Playlist {} +impl Resource for Playlist {} +impl ResponseResult for Playlist {} + +/// 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 (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PlaylistItemListResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + pub nextPageToken: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItemListResponse". + pub kind: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, + /// A list of playlist items that match the request criteria. + pub items: Vec, + /// no description provided + pub tokenPagination: Option, + /// Etag of this resource. + pub etag: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. + pub prevPageToken: Option, + /// no description provided + pub pageInfo: Option, +} + +impl ResponseResult for PlaylistItemListResponse {} + +/// A pair Property / Value. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PropertyValue { + /// A property. + pub property: Option, + /// The property's value. + pub value: Option, +} + +impl Part for PropertyValue {} + +/// Describes a temporal position of a visual widget inside a video. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct InvideoTiming { + /// Defines the time at which the promotion will appear. Depending on the value of type the value of the offsetMs field will represent a time offset from the start or from the end of the video, expressed in milliseconds. + pub offsetMs: 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. + pub type_: Option, + /// Defines the duration in milliseconds for which the promotion should be displayed. If missing, the client should use the default. + pub durationMs: Option, +} + +impl Part for InvideoTiming {} + +/// Basic details about a playlist, including title, description and thumbnails. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PlaylistSnippet { + /// The playlist's description. + pub description: Option, + /// Keyword tags associated with the playlist. + pub tags: Vec, + /// The ID that YouTube uses to uniquely identify the channel that published the playlist. + pub channelId: Option, + /// The date and time that the playlist was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub publishedAt: Option, + /// The channel title of the channel that the video belongs to. + pub channelTitle: Option, + /// The playlist's title. + pub title: Option, + /// The language of the playlist's default title and description. + pub defaultLanguage: Option, + /// Localized title and description, read-only. + pub localized: Option, + /// A map of thumbnail images associated with the playlist. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. + pub thumbnails: Option, +} + +impl Part for PlaylistSnippet {} + +/// The auditDetails object encapsulates channel data that is relevant for YouTube Partners during the audit process. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ChannelAuditDetails { + /// Whether or not the channel has any copyright strikes. + pub copyrightStrikesGoodStanding: Option, + /// Whether or not the channel respects the community guidelines. + pub communityGuidelinesGoodStanding: Option, + /// Whether or not the channel has any unresolved claims. + pub contentIdClaimsGoodStanding: Option, + /// Describes the general state of the channel. This field will always show if there are any issues whatsoever with the channel. Currently this field represents the result of the logical and operation over the community guidelines good standing, the copyright strikes good standing and the content ID claims good standing, but this may change in the future. + pub overallGoodStanding: Option, +} + +impl Part for ChannelAuditDetails {} + +/// 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*). +/// +/// * update (request|response) +/// * insert (request|response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct LiveStream { + /// The status object contains information about live stream's status. + pub status: Option, + /// The snippet object contains basic details about the stream, including its channel, title, and description. + pub snippet: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStream". + pub kind: Option, + /// Etag of this resource. + pub etag: Option, + /// The content_details object contains information about the stream, including the closed captions ingestion URL. + pub contentDetails: Option, + /// The cdn object defines the live stream's content delivery network (CDN) settings. These settings provide details about the manner in which you stream your content to YouTube. + pub cdn: Option, + /// The ID that YouTube assigns to uniquely identify the stream. + pub id: Option, +} + +impl RequestResult for LiveStream {} +impl Resource for LiveStream {} +impl ResponseResult for LiveStream {} + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * set (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ThumbnailSetResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: Option, + /// A list of thumbnails. + pub items: Vec, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#thumbnailSetResponse". + pub kind: Option, + /// Etag of this resource. + pub etag: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, +} + +impl ResponseResult for ThumbnailSetResponse {} + +/// Information about the uploaded video. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ActivityContentDetailsUpload { + /// The ID that YouTube uses to uniquely identify the uploaded video. + pub videoId: Option, +} + +impl Part for ActivityContentDetailsUpload {} + +/// Branding properties for the channel view. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ChannelSettings { + /// Specifies the channel description. + pub description: Option, + /// Specifies the channel title. + pub title: Option, + /// Whether user-submitted comments left on the channel page need to be approved by the channel owner to be publicly visible. + pub moderateComments: Option, + /// Whether the tab to browse the videos should be displayed. + pub showBrowseView: Option, + /// Title for the featured channels tab. + pub featuredChannelsTitle: Option, + /// no description provided + pub defaultLanguage: Option, + /// The trailer of the channel, for users that are not subscribers. + pub unsubscribedTrailer: Option, + /// The list of featured channels. + pub featuredChannelsUrls: Vec, + /// A prominent color that can be rendered on this channel page. + pub profileColor: Option, + /// Which content tab users should see when viewing the channel. + pub defaultTab: Option, + /// Lists keywords associated with the channel, comma-separated. + pub keywords: Option, + /// Whether related channels should be proposed. + pub showRelatedChannels: Option, + /// The ID for a Google Analytics account to track and measure traffic to the channels. + pub trackingAnalyticsAccountId: Option, +} + +impl Part for ChannelSettings {} + +/// Statistics about the video, such as the number of times the video was viewed or liked. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoStatistics { + /// The number of comments for the video. + pub commentCount: Option, + /// The number of times the video has been viewed. + pub viewCount: Option, + /// The number of users who currently have the video marked as a favorite video. + pub favoriteCount: Option, + /// The number of users who have indicated that they disliked the video by giving it a negative rating. + pub dislikeCount: Option, + /// The number of users who have indicated that they liked the video by giving it a positive rating. + pub likeCount: Option, +} + +impl Part for VideoStatistics {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct CdnSettings { + /// The format of the video stream that you are sending to Youtube. + pub format: Option, + /// The ingestionInfo object contains information that YouTube provides that you need to transmit your RTMP or HTTP stream to YouTube. + pub ingestionInfo: Option, + /// The method or protocol used to transmit the video stream. + pub ingestionType: Option, +} + +impl Part for CdnSettings {} + +/// 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*). +/// +/// * getRating (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoGetRatingResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: Option, + /// A list of ratings that match the request criteria. + pub items: Vec, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#videoGetRatingResponse". + pub kind: Option, + /// Etag of this resource. + pub etag: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, +} + +impl ResponseResult for VideoGetRatingResponse {} + +/// Basic details about a video category, such as its localized title. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoCategorySnippet { + /// no description provided + pub assignable: Option, + /// The YouTube channel that created the video category. + pub channelId: Option, + /// The video category's title. + pub title: Option, +} + +impl Part for VideoCategorySnippet {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ActivityContentDetailsChannelItem { + /// The resourceId object contains information that identifies the resource that was added to the channel. + pub resourceId: Option, +} + +impl Part for ActivityContentDetailsChannelItem {} + +/// Basic details about an i18n language, such as language code and human-readable name. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct I18nLanguageSnippet { + /// The human-readable name of the language in the language itself. + pub name: Option, + /// A short BCP-47 code that uniquely identifies a language. + pub hl: Option, +} + +impl Part for I18nLanguageSnippet {} + +/// Basic details about a subscription, including title, description and thumbnails of the subscribed item. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct SubscriptionSnippet { + /// A map of thumbnail images associated with the video. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. + pub thumbnails: Option, + /// The subscription's title. + pub title: Option, + /// The id object contains information about the channel that the user subscribed to. + pub resourceId: Option, + /// The subscription's details. + pub description: Option, + /// The ID that YouTube uses to uniquely identify the subscriber's channel. + pub channelId: Option, + /// The date and time that the subscription was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub publishedAt: Option, + /// Channel title for the channel that the subscription belongs to. + pub channelTitle: Option, +} + +impl Part for SubscriptionSnippet {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ChannelSectionContentDetails { + /// The channel ids for type multiple_channels. + pub channels: Vec, + /// The playlist ids for type single_playlist and multiple_playlists. For singlePlaylist, only one playlistId is allowed. + pub playlists: Vec, +} + +impl 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 (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct I18nRegionListResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: 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: Vec, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nRegionListResponse". + pub kind: Option, + /// Etag of this resource. + pub etag: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, +} + +impl ResponseResult for I18nRegionListResponse {} + +/// 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 (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct LiveStreamListResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + pub nextPageToken: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#liveStreamListResponse". + pub kind: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, + /// A list of live streams that match the request criteria. + pub items: Vec, + /// no description provided + pub tokenPagination: Option, + /// Etag of this resource. + pub etag: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. + pub prevPageToken: Option, + /// no description provided + pub pageInfo: Option, +} + +impl ResponseResult for LiveStreamListResponse {} + +/// Describes a single promoted item. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PromotedItem { + /// The temporal position within the video where the promoted item will be displayed. If present, it overrides the default timing. + pub timing: Option, + /// If true, the content owner's name will be used when displaying the promotion. This field can only be set when the update is made on behalf of the content owner. + pub promotedByContentOwner: Option, + /// A custom message to display for this promotion. This field is currently ignored unless the promoted item is a website. + pub customMessage: Option, + /// Identifies the promoted item. + pub id: Option, +} + +impl Part for PromotedItem {} + +/// Branding properties of a YouTube channel. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ChannelBrandingSettings { + /// Branding properties for branding images. + pub image: Option, + /// Branding properties for the watch page. + pub watch: Option, + /// Branding properties for the channel view. + pub channel: Option, + /// Additional experimental branding properties. + pub hints: Vec, +} + +impl Part for ChannelBrandingSettings {} + +/// 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 (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PlaylistListResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + pub nextPageToken: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistListResponse". + pub kind: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, + /// A list of playlists that match the request criteria. + pub items: Vec, + /// no description provided + pub tokenPagination: Option, + /// Etag of this resource. + pub etag: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. + pub prevPageToken: Option, + /// no description provided + pub pageInfo: Option, +} + +impl ResponseResult for PlaylistListResponse {} + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * set (request) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct InvideoBranding { + /// no description provided + pub targetChannelId: Option, + /// no description provided + pub position: Option, + /// no description provided + pub imageUrl: Option, + /// no description provided + pub timing: Option, + /// no description provided + pub imageBytes: Option, +} + +impl RequestResult for InvideoBranding {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PlaylistItemStatus { + /// This resource's privacy status. + pub privacyStatus: Option, +} + +impl Part for PlaylistItemStatus {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +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. + pub conversionUrl: Option, +} + +impl Part for ChannelConversionPing {} + +/// Describes an invideo promotion campaign consisting of multiple promoted items. A campaign belongs to a single channel_id. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct InvideoPromotion { + /// The default temporal position within the video where the promoted item will be displayed. Can be overriden by more specific timing in the item. + pub defaultTiming: Option, + /// List of promoted items in decreasing priority. + pub items: Vec, + /// Indicates whether the channel's promotional campaign uses "smart timing." This feature attempts to show promotions at a point in the video when they are more likely to be clicked and less likely to disrupt the viewing experience. This feature also picks up a single promotion to show on each video. + pub useSmartTiming: Option, + /// The spatial position within the video where the promoted item will be displayed. + pub position: Option, +} + +impl Part for InvideoPromotion {} + +/// A playlistItem resource identifies another resource, such as a video, that is included in a playlist. In addition, the playlistItem resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. +/// +/// YouTube uses playlists to identify special collections of videos for a channel, such as: +/// - uploaded videos +/// - favorite videos +/// - positively rated (liked) videos +/// - watch history +/// - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. +/// +/// You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. For example, if a user gives a positive rating to a video, you would insert that video into the liked videos playlist for that user's channel. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * insert (request|response) +/// * update (request|response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PlaylistItem { + /// The status object contains information about the playlist item's privacy status. + pub status: Option, + /// The snippet object contains basic details about the playlist item, such as its title and position in the playlist. + pub snippet: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItem". + pub kind: Option, + /// Etag of this resource. + pub etag: Option, + /// The contentDetails object is included in the resource if the included item is a YouTube video. The object contains additional information about the video. + pub contentDetails: Option, + /// The ID that YouTube uses to uniquely identify the playlist item. + pub id: Option, +} + +impl RequestResult for PlaylistItem {} +impl Resource for PlaylistItem {} +impl ResponseResult for PlaylistItem {} + +/// 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 (response) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct GuideCategoryListResponse { + /// Serialized EventId of the request which produced this response. + pub eventId: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + pub nextPageToken: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#guideCategoryListResponse". + pub kind: Option, + /// The visitorId identifies the visitor. + pub visitorId: Option, + /// A list of categories that can be associated with YouTube channels. In this map, the category ID is the map key, and its value is the corresponding guideCategory resource. + pub items: Vec, + /// no description provided + pub tokenPagination: Option, + /// Etag of this resource. + pub etag: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. + pub prevPageToken: Option, + /// no description provided + pub pageInfo: Option, +} + +impl ResponseResult for GuideCategoryListResponse {} + +/// Localized versions of certain video properties (e.g. title). +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoLocalization { + /// Localized version of the video's description. + pub description: Option, + /// Localized version of the video's title. + pub title: Option, +} + +impl Part for VideoLocalization {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ChannelSectionSnippet { + /// The style of the channel section. + pub style: Option, + /// Localized title, read-only. + pub localized: Option, + /// The channel section's title for multiple_playlists and multiple_channels. + pub title: Option, + /// The position of the channel section in the channel. + pub position: Option, + /// The ID that YouTube uses to uniquely identify the channel that published the channel section. + pub channelId: Option, + /// The type of the channel section. + pub type_: Option, + /// The language of the channel section's default title and description. + pub defaultLanguage: Option, +} + +impl Part for ChannelSectionSnippet {} + +/// Details about the content of a channel. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ChannelContentDetails { + /// no description provided + pub relatedPlaylists: HashMap, + /// The googlePlusUserId object identifies the Google+ profile ID associated with this channel. + pub googlePlusUserId: Option, +} + +impl Part for ChannelContentDetails {} + +/// Stub token pagination template to suppress results. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct TokenPagination; + +impl Part for TokenPagination {} + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct PlaylistItemContentDetails { + /// A user-generated note for this item. + pub note: Option, + /// The time, measured in seconds from the start of the video, when the video should start playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) The default value is 0. + pub startAt: Option, + /// The time, measured in seconds from the start of the video, when the video should stop playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) By default, assume that the video.endTime is the end of the video. + pub endAt: 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. + pub videoId: Option, +} + +impl Part for PlaylistItemContentDetails {} + +/// Internal representation of thumbnails for a YouTube resource. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ThumbnailDetails { + /// The default image for this resource. + pub default: Option, + /// The high quality image for this resource. + pub high: Option, + /// The medium quality image for this resource. + pub medium: Option, + /// The maximum resolution quality image for this resource. + pub maxres: Option, + /// The standard quality image for this resource. + pub standard: Option, +} + +impl Part for ThumbnailDetails {} + +/// Details about monetization of a YouTube Video. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoMonetizationDetails { + /// The value of access indicates whether the video can be monetized or not. + pub access: Option, +} + +impl Part for VideoMonetizationDetails {} + +/// Information that identifies the recommended resource. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ActivityContentDetailsRecommendation { + /// The resourceId object contains information that identifies the recommended resource. + pub resourceId: Option, + /// The reason that the resource is recommended to the user. + pub reason: Option, + /// The seedResourceId object contains information about the resource that caused the recommendation. + pub seedResourceId: Option, +} + +impl Part for ActivityContentDetailsRecommendation {} + +/// Recording information associated with the video. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoRecordingDetails { + /// The date and time when the video was recorded. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sssZ) format. + pub recordingDate: Option, + /// The text description of the location where the video was recorded. + pub locationDescription: Option, + /// The geolocation information associated with the video. + pub location: Option, +} + +impl Part for VideoRecordingDetails {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ActivityContentDetailsSubscription { + /// The resourceId object contains information that identifies the resource that the user subscribed to. + pub resourceId: Option, +} + +impl Part for ActivityContentDetailsSubscription {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +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: Vec, +} + +impl Part for ChannelConversionPings {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ActivityContentDetails { + /// 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 playlistItem object contains information about a new playlist item. This property is only present if the snippet.type is playlistItem. + pub playlistItem: 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 promotedItem object contains details about a resource which is being promoted. This property is only present if the snippet.type is promotedItem. + pub promotedItem: 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 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 upload object contains information about the uploaded video. This property is only present if the snippet.type is upload. + pub upload: 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 channelItem object contains details about a resource which was added to a channel. This property is only present if the snippet.type is channelItem. + pub channelItem: Option, + /// 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 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, +} + +impl Part for ActivityContentDetails {} + +/// A i18nRegion resource identifies a region where YouTube is available. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct I18nRegion { + /// The snippet object contains basic details about the i18n region, such as region code and human-readable name. + pub snippet: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#i18nRegion". + pub kind: Option, + /// Etag of this resource. + pub etag: Option, + /// The ID that YouTube uses to uniquely identify the i18n region. + pub id: Option, +} + +impl Part for I18nRegion {} + +/// 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(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct ChannelContentOwnerDetails { + /// The ID of the content owner linked to the channel. + pub contentOwner: Option, + /// The date and time of when the channel was linked to the content owner. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + pub timeLinked: Option, +} + +impl Part for ChannelContentOwnerDetails {} + +/// Describes processing status and progress and availability of some other Video resource parts. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoProcessingDetails { + /// This value indicates whether file details are available for the uploaded video. You can retrieve a video's file details by requesting the fileDetails part in your videos.list() request. + pub fileDetailsAvailability: Option, + /// This value indicates whether video editing suggestions, which might improve video quality or the playback experience, are available for the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. + pub editorSuggestionsAvailability: Option, + /// The video's processing status. This value indicates whether YouTube was able to process the video or if the video is still being processed. + pub processingStatus: Option, + /// This value indicates whether the video processing engine has generated suggestions that might improve YouTube's ability to process the the video, warnings that explain video processing problems, or errors that cause video processing problems. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. + pub processingIssuesAvailability: Option, + /// The reason that YouTube failed to process the video. This property will only have a value if the processingStatus property's value is failed. + pub processingFailureReason: Option, + /// This value indicates whether thumbnail images have been generated for the video. + pub thumbnailsAvailability: Option, + /// The processingProgress object contains information about the progress YouTube has made in processing the video. The values are really only relevant if the video's processing status is processing. + pub processingProgress: Option, + /// This value indicates whether keyword (tag) suggestions are available for the video. Tags can be added to a video's metadata to make it easier for other users to find the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. + pub tagSuggestionsAvailability: Option, +} + +impl Part for VideoProcessingDetails {} + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct LiveBroadcastStatus { + /// The broadcast's recording status. + pub recordingStatus: 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. + pub privacyStatus: Option, + /// The broadcast's status. The status can be updated using the API's liveBroadcasts.transition method. + pub lifeCycleStatus: Option, + /// Priority of the live broadcast event (internal state). + pub liveBroadcastPriority: Option, +} + +impl Part for LiveBroadcastStatus {} + +/// Details about the content to witch a subscription refers. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct SubscriptionContentDetails { + /// The number of new items in the subscription since its content was last read. + pub newItemCount: Option, + /// The type of activity this subscription is for (only uploads, everything). + pub activityType: Option, + /// The approximate number of items that the subscription points to. + pub totalItemCount: Option, +} + +impl Part for SubscriptionContentDetails {} + +/// A video resource represents a 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*). +/// +/// * rate (none) +/// * getRating (none) +/// * list (none) +/// * insert (request|response) +/// * update (request|response) +/// * delete (none) +/// +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct Video { + /// The status object contains information about the video's uploading, processing, and privacy statuses. + pub status: Option, + /// The topicDetails object encapsulates information about Freebase topics associated with the video. + pub topicDetails: Option, + /// The monetizationDetails object encapsulates information about the monetization status of the video. + pub monetizationDetails: Option, + /// The suggestions object encapsulates suggestions that identify opportunities to improve the video quality or the metadata for the uploaded video. This data can only be retrieved by the video owner. + pub suggestions: Option, + /// Age restriction details related to a video. + pub ageGating: Option, + /// The fileDetails object encapsulates information about the video file that was uploaded to YouTube, including the file's resolution, duration, audio and video codecs, stream bitrates, and more. This data can only be retrieved by the video owner. + pub fileDetails: Option, + /// The player object contains information that you would use to play the video in an embedded player. + pub player: Option, + /// The ID that YouTube uses to uniquely identify the video. + pub id: Option, + /// List with all localizations. + pub localizations: HashMap, + /// The liveStreamingDetails object contains metadata about a live video broadcast. The object will only be present in a video resource if the video is an upcoming, live, or completed live broadcast. + pub liveStreamingDetails: Option, + /// The processingProgress object encapsulates information about YouTube's progress in processing the uploaded video file. The properties in the object identify the current processing status and an estimate of the time remaining until YouTube finishes processing the video. This part also indicates whether different types of data or content, such as file details or thumbnail images, are available for the video. +/// +/// The processingProgress object is designed to be polled so that the video uploaded can track the progress that YouTube has made in processing the uploaded video file. This data can only be retrieved by the video owner. + pub processingDetails: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#video". + pub kind: Option, + /// The statistics object contains statistics about the video. + pub statistics: Option, + /// The contentDetails object contains information about the video content, including the length of the video and its aspect ratio. + pub contentDetails: Option, + /// The conversionPings object encapsulates information about url pings that need to be respected by the App in different video contexts. + pub conversionPings: Option, + /// The snippet object contains basic details about the video, such as its title, description, and category. + pub snippet: Option, + /// Etag of this resource. + pub etag: Option, + /// The projectDetails object contains information about the project specific video metadata. + pub projectDetails: Option, + /// The recordingDetails object encapsulates information about the location, date and address where the video was recorded. + pub recordingDetails: Option, +} + +impl RequestResult for Video {} +impl Resource for Video {} +impl ResponseResult for Video {} + +/// Geographical coordinates of a point, in WGS84. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct GeoPoint { + /// Latitude in degrees. + pub latitude: Option, + /// Altitude above the reference ellipsoid, in meters. + pub altitude: Option, + /// Longitude in degrees. + pub longitude: Option, +} + +impl Part for GeoPoint {} + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoAgeGating { + /// Age-restricted trailers. For redband trailers and adult-rated video-games. Only users aged 18+ can view the content. The the field is true the content is restricted to viewers aged 18+. Otherwise The field won't be present. + pub restricted: Option, + /// Indicates whether or not the video has alcoholic beverage content. Only users of legal purchasing age in a particular country, as identified by ICAP, can view the content. + pub alcoholContent: Option, + /// Video game rating, if any. + pub videoGameRating: Option, +} + +impl Part for VideoAgeGating {} + +/// Player to be used for a video playback. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(RustcEncodable, RustcDecodable, Default, Clone)] +pub struct VideoPlayer { + /// An