diff --git a/gen/youtube3/README.md b/gen/youtube3/README.md index 6c51dc0c99c..fdedabcb4f5 100644 --- a/gen/youtube3/README.md +++ b/gen/youtube3/README.md @@ -97,6 +97,8 @@ let mut hub = YouTube::new(hyper::Client::new(), auth); ## About Customization/Callbacks +## About Optionals in parts (needed for Json, otherwise I'd happily drop them) + [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern [google-go-api]: https://github.com/google/google-api-go-client diff --git a/gen/youtube3/src/lib.rs b/gen/youtube3/src/lib.rs index 0e096af2698..fc3a6097389 100644 --- a/gen/youtube3/src/lib.rs +++ b/gen/youtube3/src/lib.rs @@ -96,6 +96,8 @@ //! //! ## About Customization/Callbacks //! +//! ## About Optionals in parts (needed for Json, otherwise I'd happily drop them) +//! //! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern //! [google-go-api]: https://github.com/google/google-api-go-client //! @@ -4828,6 +4830,7 @@ impl<'a, C, NC, A> ActivityMethodsBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -4841,7 +4844,7 @@ impl<'a, C, NC, A> ActivityMethodsBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.i18nLanguages().list("part") +/// let mut mb = hub.i18n_languages().list("part") /// .hl("eos"); /// /// // Finally, execute your call and process the result @@ -4875,7 +4878,7 @@ impl<'a, C, NC, A> I18nLanguageListMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies a comma-separated list of one or more i18nLanguage resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. - pub fn part(&mut self, new_value: &str) -> &mut I18nLanguageListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> I18nLanguageListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -4883,7 +4886,7 @@ impl<'a, C, NC, A> I18nLanguageListMethodBuilder<'a, C, NC, A> { /// /// /// The hl parameter specifies the language that should be used for text values in the API response. - pub fn hl(&mut self, new_value: &str) -> &mut I18nLanguageListMethodBuilder<'a, C, NC, A> { + pub fn hl(mut self, new_value: &str) -> I18nLanguageListMethodBuilder<'a, C, NC, A> { self._hl = Some(new_value.to_string()); return self; } @@ -4908,6 +4911,7 @@ impl<'a, C, NC, A> I18nLanguageListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -4922,14 +4926,14 @@ impl<'a, C, NC, A> I18nLanguageListMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: ChannelBannerResource = Default::default(); -/// request.url = "Stet"; -/// request.kind = "dolor"; -/// request.etag = "sed"; +/// request.url = Some("Stet".to_string()); +/// request.kind = Some("dolor".to_string()); +/// request.etag = Some("sed".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.channelBanners().insert(&request) +/// let mut mb = hub.channel_banners().insert(&request) /// .on_behalf_of_content_owner("accusam"); /// /// // Finally, execute your call and process the result @@ -4962,7 +4966,7 @@ impl<'a, C, NC, A> ChannelBannerInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &ChannelBannerResource) -> &mut ChannelBannerInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &ChannelBannerResource) -> ChannelBannerInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -4972,7 +4976,7 @@ impl<'a, C, NC, A> ChannelBannerInsertMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ChannelBannerInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ChannelBannerInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -4993,6 +4997,7 @@ impl<'a, C, NC, A> ChannelBannerInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5006,7 +5011,7 @@ impl<'a, C, NC, A> ChannelBannerInsertMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.channelSections().list("part") +/// let mut mb = hub.channel_sections().list("part") /// .on_behalf_of_content_owner("eos") /// .mine(true) /// .id("sadipscing") @@ -5048,7 +5053,7 @@ impl<'a, C, NC, A> ChannelSectionListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more channelSection resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channelSection resource, the snippet property contains other properties, such as a display title for the channelSection. If you set part=snippet, the API response will also contain all of those nested properties. - pub fn part(&mut self, new_value: &str) -> &mut ChannelSectionListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> ChannelSectionListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -5058,7 +5063,7 @@ impl<'a, C, NC, A> ChannelSectionListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ChannelSectionListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ChannelSectionListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5066,7 +5071,7 @@ impl<'a, C, NC, A> ChannelSectionListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to retrieve a feed of the authenticated user's channelSections. - pub fn mine(&mut self, new_value: bool) -> &mut ChannelSectionListMethodBuilder<'a, C, NC, A> { + pub fn mine(mut self, new_value: bool) -> ChannelSectionListMethodBuilder<'a, C, NC, A> { self._mine = Some(new_value); return self; } @@ -5074,7 +5079,7 @@ impl<'a, C, NC, A> ChannelSectionListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of the YouTube channelSection ID(s) for the resource(s) that are being retrieved. In a channelSection resource, the id property specifies the YouTube channelSection ID. - pub fn id(&mut self, new_value: &str) -> &mut ChannelSectionListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> ChannelSectionListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -5082,7 +5087,7 @@ impl<'a, C, NC, A> ChannelSectionListMethodBuilder<'a, C, NC, A> { /// /// /// The channelId parameter specifies a YouTube channel ID. The API will only return that channel's channelSections. - pub fn channel_id(&mut self, new_value: &str) -> &mut ChannelSectionListMethodBuilder<'a, C, NC, A> { + pub fn channel_id(mut self, new_value: &str) -> ChannelSectionListMethodBuilder<'a, C, NC, A> { self._channel_id = Some(new_value.to_string()); return self; } @@ -5103,6 +5108,7 @@ impl<'a, C, NC, A> ChannelSectionListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5117,18 +5123,19 @@ impl<'a, C, NC, A> ChannelSectionListMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: ChannelSection = Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "consetetur"; -/// request.etag = "ea"; -/// request.content_details = &Default::default(); -/// // ... and so forth ... +/// request.snippet = Default::default(); +/// request.kind = Some("consetetur".to_string()); +/// request.etag = Some("ea".to_string()); +/// request.content_details = Default::default(); +/// request.id = Some("sit".to_string()); +/// request.localizations = Default::default(); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.channelSections().insert(&request) -/// .on_behalf_of_content_owner_channel("sit") -/// .on_behalf_of_content_owner("sanctus"); +/// let mut mb = hub.channel_sections().insert(&request) +/// .on_behalf_of_content_owner_channel("sanctus") +/// .on_behalf_of_content_owner("invidunt"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5162,7 +5169,7 @@ impl<'a, C, NC, A> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &ChannelSection) -> &mut ChannelSectionInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &ChannelSection) -> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -5177,7 +5184,7 @@ impl<'a, C, NC, A> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part names that you can include in the parameter value are snippet and contentDetails. - pub fn part(&mut self, new_value: &str) -> &mut ChannelSectionInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -5189,7 +5196,7 @@ impl<'a, C, NC, A> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut ChannelSectionInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -5199,7 +5206,7 @@ impl<'a, C, NC, A> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ChannelSectionInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5220,6 +5227,7 @@ impl<'a, C, NC, A> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5233,8 +5241,8 @@ impl<'a, C, NC, A> ChannelSectionInsertMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.channelSections().delete("id") -/// .on_behalf_of_content_owner("et"); +/// let mut mb = hub.channel_sections().delete("id") +/// .on_behalf_of_content_owner("sit"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5267,7 +5275,7 @@ impl<'a, C, NC, A> ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube channelSection ID for the resource that is being deleted. In a channelSection resource, the id property specifies the YouTube channelSection ID. - pub fn id(&mut self, new_value: &str) -> &mut ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -5277,7 +5285,7 @@ impl<'a, C, NC, A> ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5298,6 +5306,7 @@ impl<'a, C, NC, A> ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5312,17 +5321,18 @@ impl<'a, C, NC, A> ChannelSectionDeleteMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: ChannelSection = Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "sit"; -/// request.etag = "takimata"; -/// request.content_details = &Default::default(); -/// // ... and so forth ... +/// request.snippet = Default::default(); +/// request.kind = Some("takimata".to_string()); +/// request.etag = Some("rebum.".to_string()); +/// request.content_details = Default::default(); +/// request.id = Some("consetetur".to_string()); +/// request.localizations = Default::default(); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.channelSections().update(&request) -/// .on_behalf_of_content_owner("rebum."); +/// let mut mb = hub.channel_sections().update(&request) +/// .on_behalf_of_content_owner("elitr,"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5355,7 +5365,7 @@ impl<'a, C, NC, A> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &ChannelSection) -> &mut ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &ChannelSection) -> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -5370,7 +5380,7 @@ impl<'a, C, NC, A> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part names that you can include in the parameter value are snippet and contentDetails. - pub fn part(&mut self, new_value: &str) -> &mut ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -5380,7 +5390,7 @@ impl<'a, C, NC, A> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5401,6 +5411,7 @@ impl<'a, C, NC, A> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5414,10 +5425,10 @@ impl<'a, C, NC, A> ChannelSectionUpdateMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.guideCategories().list("part") -/// .region_code("elitr,") -/// .id("sed") -/// .hl("sea"); +/// let mut mb = hub.guide_categories().list("part") +/// .region_code("sea") +/// .id("diam") +/// .hl("clita"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5454,7 +5465,7 @@ impl<'a, C, NC, A> GuideCategoryListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more guideCategory resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a guideCategory resource, the snippet property contains other properties, such as the category's title. If you set part=snippet, the API response will also contain all of those nested properties. - pub fn part(&mut self, new_value: &str) -> &mut GuideCategoryListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> GuideCategoryListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -5462,7 +5473,7 @@ impl<'a, C, NC, A> GuideCategoryListMethodBuilder<'a, C, NC, A> { /// /// /// The regionCode parameter instructs the API to return the list of guide categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. - pub fn region_code(&mut self, new_value: &str) -> &mut GuideCategoryListMethodBuilder<'a, C, NC, A> { + pub fn region_code(mut self, new_value: &str) -> GuideCategoryListMethodBuilder<'a, C, NC, A> { self._region_code = Some(new_value.to_string()); return self; } @@ -5470,7 +5481,7 @@ impl<'a, C, NC, A> GuideCategoryListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of the YouTube channel category ID(s) for the resource(s) that are being retrieved. In a guideCategory resource, the id property specifies the YouTube channel category ID. - pub fn id(&mut self, new_value: &str) -> &mut GuideCategoryListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> GuideCategoryListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -5478,7 +5489,7 @@ impl<'a, C, NC, A> GuideCategoryListMethodBuilder<'a, C, NC, A> { /// /// /// The hl parameter specifies the language that will be used for text values in the API response. - pub fn hl(&mut self, new_value: &str) -> &mut GuideCategoryListMethodBuilder<'a, C, NC, A> { + pub fn hl(mut self, new_value: &str) -> GuideCategoryListMethodBuilder<'a, C, NC, A> { self._hl = Some(new_value.to_string()); return self; } @@ -5499,6 +5510,7 @@ impl<'a, C, NC, A> GuideCategoryListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5513,18 +5525,21 @@ impl<'a, C, NC, A> GuideCategoryListMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: Playlist = Default::default(); -/// request.status = &Default::default(); -/// request.kind = "diam"; -/// request.content_details = &Default::default(); -/// request.snippet = &Default::default(); -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.kind = Some("sed".to_string()); +/// request.content_details = Default::default(); +/// request.snippet = Default::default(); +/// request.player = Default::default(); +/// request.etag = Some("dolor".to_string()); +/// request.id = Some("labore".to_string()); +/// request.localizations = Default::default(); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.playlists().insert(&request) -/// .on_behalf_of_content_owner_channel("clita") -/// .on_behalf_of_content_owner("sed"); +/// .on_behalf_of_content_owner_channel("kasd") +/// .on_behalf_of_content_owner("elitr,"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5558,7 +5573,7 @@ impl<'a, C, NC, A> PlaylistInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &Playlist) -> &mut PlaylistInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &Playlist) -> PlaylistInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -5573,7 +5588,7 @@ impl<'a, C, NC, A> PlaylistInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part names that you can include in the parameter value are snippet and status. - pub fn part(&mut self, new_value: &str) -> &mut PlaylistInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> PlaylistInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -5585,7 +5600,7 @@ impl<'a, C, NC, A> PlaylistInsertMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut PlaylistInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> PlaylistInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -5595,7 +5610,7 @@ impl<'a, C, NC, A> PlaylistInsertMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut PlaylistInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> PlaylistInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5616,6 +5631,7 @@ impl<'a, C, NC, A> PlaylistInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5630,13 +5646,13 @@ impl<'a, C, NC, A> PlaylistInsertMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.playlists().list("part") -/// .page_token("labore") +/// .page_token("accusam") /// .on_behalf_of_content_owner_channel("kasd") -/// .on_behalf_of_content_owner("elitr,") +/// .on_behalf_of_content_owner("ea") /// .mine(true) -/// .max_results(79) -/// .id("kasd") -/// .channel_id("ea"); +/// .max_results(48) +/// .id("sadipscing") +/// .channel_id("nonumy"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5677,7 +5693,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, status, and contentDetails. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlist resource, the snippet property contains properties like author, title, description, tags, and timeCreated. As such, if you set part=snippet, the API response will contain all of those properties. - pub fn part(&mut self, new_value: &str) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -5685,7 +5701,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -5697,7 +5713,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -5707,7 +5723,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5715,7 +5731,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to instruct the API to only return playlists owned by the authenticated user. - pub fn mine(&mut self, new_value: bool) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn mine(mut self, new_value: bool) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._mine = Some(new_value); return self; } @@ -5723,7 +5739,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. - pub fn max_results(&mut self, new_value: u32) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -5731,7 +5747,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of the YouTube playlist ID(s) for the resource(s) that are being retrieved. In a playlist resource, the id property specifies the playlist's YouTube playlist ID. - pub fn id(&mut self, new_value: &str) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -5739,7 +5755,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// /// /// This value indicates that the API should only return the specified channel's playlists. - pub fn channel_id(&mut self, new_value: &str) -> &mut PlaylistListMethodBuilder<'a, C, NC, A> { + pub fn channel_id(mut self, new_value: &str) -> PlaylistListMethodBuilder<'a, C, NC, A> { self._channel_id = Some(new_value.to_string()); return self; } @@ -5760,6 +5776,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5774,7 +5791,7 @@ impl<'a, C, NC, A> PlaylistListMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.playlists().delete("id") -/// .on_behalf_of_content_owner("dolor"); +/// .on_behalf_of_content_owner("et"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5807,7 +5824,7 @@ impl<'a, C, NC, A> PlaylistDeleteMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube playlist ID for the playlist that is being deleted. In a playlist resource, the id property specifies the playlist's ID. - pub fn id(&mut self, new_value: &str) -> &mut PlaylistDeleteMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> PlaylistDeleteMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -5817,7 +5834,7 @@ impl<'a, C, NC, A> PlaylistDeleteMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut PlaylistDeleteMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> PlaylistDeleteMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5838,6 +5855,7 @@ impl<'a, C, NC, A> PlaylistDeleteMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5852,17 +5870,20 @@ impl<'a, C, NC, A> PlaylistDeleteMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: Playlist = Default::default(); -/// request.status = &Default::default(); -/// request.kind = "sadipscing"; -/// request.content_details = &Default::default(); -/// request.snippet = &Default::default(); -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.kind = Some("gubergren,".to_string()); +/// request.content_details = Default::default(); +/// request.snippet = Default::default(); +/// request.player = Default::default(); +/// request.etag = Some("diam".to_string()); +/// request.id = Some("et".to_string()); +/// request.localizations = Default::default(); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.playlists().update(&request) -/// .on_behalf_of_content_owner("nonumy"); +/// .on_behalf_of_content_owner("sanctus"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5895,7 +5916,7 @@ impl<'a, C, NC, A> PlaylistUpdateMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &Playlist) -> &mut PlaylistUpdateMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &Playlist) -> PlaylistUpdateMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -5912,7 +5933,7 @@ impl<'a, C, NC, A> PlaylistUpdateMethodBuilder<'a, C, NC, A> { /// The part names that you can include in the parameter value are snippet and status. /// /// Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist's privacy setting is contained in the status part. As such, if your request is updating a private playlist, and the request's part parameter value includes the status part, the playlist's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the playlist will revert to the default privacy setting. - pub fn part(&mut self, new_value: &str) -> &mut PlaylistUpdateMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> PlaylistUpdateMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -5922,7 +5943,7 @@ impl<'a, C, NC, A> PlaylistUpdateMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut PlaylistUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> PlaylistUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -5943,6 +5964,7 @@ impl<'a, C, NC, A> PlaylistUpdateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -5957,7 +5979,7 @@ impl<'a, C, NC, A> PlaylistUpdateMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.thumbnails().set("videoId") -/// .on_behalf_of_content_owner("et"); +/// .on_behalf_of_content_owner("consetetur"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -5990,7 +6012,7 @@ impl<'a, C, NC, A> ThumbnailSetMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The videoId parameter specifies a YouTube video ID for which the custom video thumbnail is being provided. - pub fn video_id(&mut self, new_value: &str) -> &mut ThumbnailSetMethodBuilder<'a, C, NC, A> { + pub fn video_id(mut self, new_value: &str) -> ThumbnailSetMethodBuilder<'a, C, NC, A> { self._video_id = new_value.to_string(); return self; } @@ -5998,7 +6020,7 @@ impl<'a, C, NC, A> ThumbnailSetMethodBuilder<'a, C, NC, A> { /// /// /// The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ThumbnailSetMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ThumbnailSetMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6019,6 +6041,7 @@ impl<'a, C, NC, A> ThumbnailSetMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6033,16 +6056,16 @@ impl<'a, C, NC, A> ThumbnailSetMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.videos().list("part") -/// .video_category_id("diam") -/// .region_code("et") -/// .page_token("sanctus") -/// .on_behalf_of_content_owner("sed") -/// .my_rating("consetetur") -/// .max_results(69) -/// .locale("accusam") -/// .id("amet.") -/// .hl("clita") -/// .chart("erat,"); +/// .video_category_id("accusam") +/// .region_code("amet.") +/// .page_token("clita") +/// .on_behalf_of_content_owner("erat,") +/// .my_rating("amet,") +/// .max_results(28) +/// .locale("amet.") +/// .id("erat,") +/// .hl("no") +/// .chart("est"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -6086,7 +6109,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, fileDetails, liveStreamingDetails, localizations, player, processingDetails, recordingDetails, statistics, status, suggestions, and topicDetails. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties. - pub fn part(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -6094,7 +6117,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// /// /// The videoCategoryId parameter identifies the video category for which the chart should be retrieved. This parameter can only be used in conjunction with the chart parameter. By default, charts are not restricted to a particular category. - pub fn video_category_id(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn video_category_id(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._video_category_id = Some(new_value.to_string()); return self; } @@ -6102,7 +6125,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// /// /// The regionCode parameter instructs the API to select a video chart available in the specified region. This parameter can only be used in conjunction with the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code. - pub fn region_code(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn region_code(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._region_code = Some(new_value.to_string()); return self; } @@ -6112,7 +6135,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. /// /// Note: This parameter is supported for use in conjunction with the myRating parameter, but it is not supported for use in conjunction with the id parameter. - pub fn page_token(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -6122,7 +6145,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6130,7 +6153,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to like or dislike to instruct the API to only return videos liked or disliked by the authenticated user. - pub fn my_rating(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn my_rating(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._my_rating = Some(new_value.to_string()); return self; } @@ -6140,7 +6163,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. /// /// Note: This parameter is supported for use in conjunction with the myRating parameter, but it is not supported for use in conjunction with the id parameter. - pub fn max_results(&mut self, new_value: u32) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> VideoListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -6148,7 +6171,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// /// /// DEPRECATED - pub fn locale(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn locale(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._locale = Some(new_value.to_string()); return self; } @@ -6156,7 +6179,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID. - pub fn id(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -6164,7 +6187,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// /// /// The hl parameter instructs the API to return a localized version of the video details. If localized text is nor available for the requested language, the localizations object in the API response will contain the requested information in the default language instead. The parameter value is a BCP-47 language code. Your application can determine whether the requested localization was returned by checking the value of the snippet.localized.language property in the API response. - pub fn hl(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn hl(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._hl = Some(new_value.to_string()); return self; } @@ -6172,7 +6195,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// /// /// The chart parameter identifies the chart that you want to retrieve. - pub fn chart(&mut self, new_value: &str) -> &mut VideoListMethodBuilder<'a, C, NC, A> { + pub fn chart(mut self, new_value: &str) -> VideoListMethodBuilder<'a, C, NC, A> { self._chart = Some(new_value.to_string()); return self; } @@ -6193,6 +6216,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6207,7 +6231,7 @@ impl<'a, C, NC, A> VideoListMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.videos().rate("id", "rating") -/// .on_behalf_of_content_owner("amet."); +/// .on_behalf_of_content_owner("erat,"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -6241,7 +6265,7 @@ impl<'a, C, NC, A> VideoRateMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube video ID of the video that is being rated or having its rating removed. - pub fn id(&mut self, new_value: &str) -> &mut VideoRateMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> VideoRateMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -6251,7 +6275,7 @@ impl<'a, C, NC, A> VideoRateMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// Specifies the rating to record. - pub fn rating(&mut self, new_value: &str) -> &mut VideoRateMethodBuilder<'a, C, NC, A> { + pub fn rating(mut self, new_value: &str) -> VideoRateMethodBuilder<'a, C, NC, A> { self._rating = new_value.to_string(); return self; } @@ -6261,7 +6285,7 @@ impl<'a, C, NC, A> VideoRateMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut VideoRateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> VideoRateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6282,6 +6306,7 @@ impl<'a, C, NC, A> VideoRateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6296,7 +6321,7 @@ impl<'a, C, NC, A> VideoRateMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.videos().get_rating("id") -/// .on_behalf_of_content_owner("no"); +/// .on_behalf_of_content_owner("rebum."); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -6329,7 +6354,7 @@ impl<'a, C, NC, A> VideoGetratingMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) for which you are retrieving rating data. In a video resource, the id property specifies the video's ID. - pub fn id(&mut self, new_value: &str) -> &mut VideoGetratingMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> VideoGetratingMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -6339,7 +6364,7 @@ impl<'a, C, NC, A> VideoGetratingMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut VideoGetratingMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> VideoGetratingMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6360,6 +6385,7 @@ impl<'a, C, NC, A> VideoGetratingMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6374,7 +6400,7 @@ impl<'a, C, NC, A> VideoGetratingMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.videos().delete("id") -/// .on_behalf_of_content_owner("sit"); +/// .on_behalf_of_content_owner("voluptua."); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -6407,7 +6433,7 @@ impl<'a, C, NC, A> VideoDeleteMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube video ID for the resource that is being deleted. In a video resource, the id property specifies the video's ID. - pub fn id(&mut self, new_value: &str) -> &mut VideoDeleteMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> VideoDeleteMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -6417,7 +6443,7 @@ impl<'a, C, NC, A> VideoDeleteMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut VideoDeleteMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> VideoDeleteMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6438,6 +6464,7 @@ impl<'a, C, NC, A> VideoDeleteMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6452,17 +6479,31 @@ impl<'a, C, NC, A> VideoDeleteMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: Video = Default::default(); -/// request.status = &Default::default(); -/// request.topic_details = &Default::default(); -/// request.monetization_details = &Default::default(); -/// request.suggestions = &Default::default(); -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.topic_details = Default::default(); +/// request.monetization_details = Default::default(); +/// request.suggestions = Default::default(); +/// request.age_gating = Default::default(); +/// request.file_details = Default::default(); +/// request.player = Default::default(); +/// request.id = Some("dolor".to_string()); +/// request.localizations = Default::default(); +/// request.live_streaming_details = Default::default(); +/// request.processing_details = Default::default(); +/// request.kind = Some("amet,".to_string()); +/// request.statistics = Default::default(); +/// request.content_details = Default::default(); +/// request.conversion_pings = Default::default(); +/// request.snippet = Default::default(); +/// request.etag = Some("dolore".to_string()); +/// request.project_details = Default::default(); +/// request.recording_details = Default::default(); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.videos().update(&request) -/// .on_behalf_of_content_owner("ipsum"); +/// .on_behalf_of_content_owner("At"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -6495,7 +6536,7 @@ impl<'a, C, NC, A> VideoUpdateMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &Video) -> &mut VideoUpdateMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &Video) -> VideoUpdateMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -6514,7 +6555,7 @@ impl<'a, C, NC, A> VideoUpdateMethodBuilder<'a, C, NC, A> { /// Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a video's privacy setting is contained in the status part. As such, if your request is updating a private video, and the request's part parameter value includes the status part, the video's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the video will revert to the default privacy setting. /// /// In addition, not all of those parts contain properties that can be set when setting or updating a video's metadata. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response. - pub fn part(&mut self, new_value: &str) -> &mut VideoUpdateMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> VideoUpdateMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -6524,7 +6565,7 @@ impl<'a, C, NC, A> VideoUpdateMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut VideoUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> VideoUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6545,6 +6586,7 @@ impl<'a, C, NC, A> VideoUpdateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6559,21 +6601,35 @@ impl<'a, C, NC, A> VideoUpdateMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: Video = Default::default(); -/// request.status = &Default::default(); -/// request.topic_details = &Default::default(); -/// request.monetization_details = &Default::default(); -/// request.suggestions = &Default::default(); -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.topic_details = Default::default(); +/// request.monetization_details = Default::default(); +/// request.suggestions = Default::default(); +/// request.age_gating = Default::default(); +/// request.file_details = Default::default(); +/// request.player = Default::default(); +/// request.id = Some("dolores".to_string()); +/// request.localizations = Default::default(); +/// request.live_streaming_details = Default::default(); +/// request.processing_details = Default::default(); +/// request.kind = Some("diam".to_string()); +/// request.statistics = Default::default(); +/// request.content_details = Default::default(); +/// request.conversion_pings = Default::default(); +/// request.snippet = Default::default(); +/// request.etag = Some("Lorem".to_string()); +/// request.project_details = Default::default(); +/// request.recording_details = Default::default(); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.videos().insert(&request) /// .stabilize(false) -/// .on_behalf_of_content_owner_channel("amet.") -/// .on_behalf_of_content_owner("rebum.") +/// .on_behalf_of_content_owner_channel("elitr,") +/// .on_behalf_of_content_owner("At") /// .notify_subscribers(false) -/// .auto_levels(false); +/// .auto_levels(true); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -6610,7 +6666,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &Video) -> &mut VideoInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &Video) -> VideoInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -6625,7 +6681,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part names that you can include in the parameter value are snippet, contentDetails, fileDetails, liveStreamingDetails, localizations, player, processingDetails, recordingDetails, statistics, status, suggestions, and topicDetails. However, not all of those parts contain properties that can be set when setting or updating a video's metadata. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response. - pub fn part(&mut self, new_value: &str) -> &mut VideoInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> VideoInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -6633,7 +6689,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// /// /// The stabilize parameter indicates whether YouTube should adjust the video to remove shaky camera motions. - pub fn stabilize(&mut self, new_value: bool) -> &mut VideoInsertMethodBuilder<'a, C, NC, A> { + pub fn stabilize(mut self, new_value: bool) -> VideoInsertMethodBuilder<'a, C, NC, A> { self._stabilize = Some(new_value); return self; } @@ -6645,7 +6701,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut VideoInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> VideoInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -6655,7 +6711,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut VideoInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> VideoInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6663,7 +6719,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// /// /// The notifySubscribers parameter indicates whether YouTube should send notification to subscribers about the inserted video. - pub fn notify_subscribers(&mut self, new_value: bool) -> &mut VideoInsertMethodBuilder<'a, C, NC, A> { + pub fn notify_subscribers(mut self, new_value: bool) -> VideoInsertMethodBuilder<'a, C, NC, A> { self._notify_subscribers = Some(new_value); return self; } @@ -6671,7 +6727,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// /// /// The autoLevels parameter indicates whether YouTube should automatically enhance the video's lighting and color. - pub fn auto_levels(&mut self, new_value: bool) -> &mut VideoInsertMethodBuilder<'a, C, NC, A> { + pub fn auto_levels(mut self, new_value: bool) -> VideoInsertMethodBuilder<'a, C, NC, A> { self._auto_levels = Some(new_value); return self; } @@ -6692,6 +6748,7 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6706,11 +6763,12 @@ impl<'a, C, NC, A> VideoInsertMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: Subscription = Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "dolor"; -/// request.etag = "amet,"; -/// request.content_details = &Default::default(); -/// // ... and so forth ... +/// request.snippet = Default::default(); +/// request.kind = Some("sanctus".to_string()); +/// request.etag = Some("dolor".to_string()); +/// request.content_details = Default::default(); +/// request.subscriber_snippet = Default::default(); +/// request.id = Some("diam".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. @@ -6747,7 +6805,7 @@ impl<'a, C, NC, A> SubscriptionInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &Subscription) -> &mut SubscriptionInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &Subscription) -> SubscriptionInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -6762,7 +6820,7 @@ impl<'a, C, NC, A> SubscriptionInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part names that you can include in the parameter value are snippet and contentDetails. - pub fn part(&mut self, new_value: &str) -> &mut SubscriptionInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> SubscriptionInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -6783,6 +6841,7 @@ impl<'a, C, NC, A> SubscriptionInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6797,16 +6856,16 @@ impl<'a, C, NC, A> SubscriptionInsertMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.subscriptions().list("part") -/// .page_token("At") -/// .order("dolores") -/// .on_behalf_of_content_owner_channel("diam") -/// .on_behalf_of_content_owner("Lorem") -/// .my_subscribers(false) +/// .page_token("diam") +/// .order("nonumy") +/// .on_behalf_of_content_owner_channel("dolor") +/// .on_behalf_of_content_owner("nonumy") +/// .my_subscribers(true) /// .mine(false) -/// .max_results(75) -/// .id("sit") -/// .for_channel_id("clita") -/// .channel_id("sanctus"); +/// .max_results(52) +/// .id("sed") +/// .for_channel_id("At") +/// .channel_id("dolore"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -6850,7 +6909,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set part=snippet, the API response will also contain all of those nested properties. - pub fn part(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -6858,7 +6917,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -6866,7 +6925,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// The order parameter specifies the method that will be used to sort resources in the API response. - pub fn order(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn order(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._order = Some(new_value.to_string()); return self; } @@ -6878,7 +6937,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -6888,7 +6947,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -6896,7 +6955,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to retrieve a feed of the subscribers of the authenticated user. - pub fn my_subscribers(&mut self, new_value: bool) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn my_subscribers(mut self, new_value: bool) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._my_subscribers = Some(new_value); return self; } @@ -6904,7 +6963,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to retrieve a feed of the authenticated user's subscriptions. - pub fn mine(&mut self, new_value: bool) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn mine(mut self, new_value: bool) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._mine = Some(new_value); return self; } @@ -6912,7 +6971,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. - pub fn max_results(&mut self, new_value: u32) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -6920,7 +6979,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of the YouTube subscription ID(s) for the resource(s) that are being retrieved. In a subscription resource, the id property specifies the YouTube subscription ID. - pub fn id(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -6928,7 +6987,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// The forChannelId parameter specifies a comma-separated list of channel IDs. The API response will then only contain subscriptions matching those channels. - pub fn for_channel_id(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn for_channel_id(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._for_channel_id = Some(new_value.to_string()); return self; } @@ -6936,7 +6995,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// /// /// The channelId parameter specifies a YouTube channel ID. The API will only return that channel's subscriptions. - pub fn channel_id(&mut self, new_value: &str) -> &mut SubscriptionListMethodBuilder<'a, C, NC, A> { + pub fn channel_id(mut self, new_value: &str) -> SubscriptionListMethodBuilder<'a, C, NC, A> { self._channel_id = Some(new_value.to_string()); return self; } @@ -6957,6 +7016,7 @@ impl<'a, C, NC, A> SubscriptionListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7002,7 +7062,7 @@ impl<'a, C, NC, A> SubscriptionDeleteMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube subscription ID for the resource that is being deleted. In a subscription resource, the id property specifies the YouTube subscription ID. - pub fn id(&mut self, new_value: &str) -> &mut SubscriptionDeleteMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> SubscriptionDeleteMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -7023,6 +7083,7 @@ impl<'a, C, NC, A> SubscriptionDeleteMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7037,35 +7098,35 @@ impl<'a, C, NC, A> SubscriptionDeleteMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.search().list("part") -/// .video_type("voluptua.") -/// .video_syndicated("diam") -/// .video_license("nonumy") -/// .video_embeddable("dolor") -/// .video_duration("nonumy") -/// .video_dimension("sit") -/// .video_definition("sed") -/// .video_category_id("ipsum") -/// .video_caption("sed") -/// .type_("At") -/// .topic_id("dolore") -/// .safe_search("ea") -/// .relevance_language("ut") -/// .related_to_video_id("At") -/// .region_code("sit") -/// .q("et") -/// .published_before("ipsum") -/// .published_after("eos") -/// .page_token("amet.") -/// .order("ut") -/// .on_behalf_of_content_owner("et") -/// .max_results(7) -/// .location_radius("est") -/// .location("Lorem") -/// .for_mine(false) -/// .for_content_owner(false) -/// .event_type("ut") -/// .channel_type("et") -/// .channel_id("gubergren,"); +/// .video_type("At") +/// .video_syndicated("sit") +/// .video_license("et") +/// .video_embeddable("ipsum") +/// .video_duration("eos") +/// .video_dimension("amet.") +/// .video_definition("ut") +/// .video_category_id("et") +/// .video_caption("elitr,") +/// .type_("est") +/// .topic_id("Lorem") +/// .safe_search("justo") +/// .relevance_language("et") +/// .related_to_video_id("ut") +/// .region_code("et") +/// .q("gubergren,") +/// .published_before("est") +/// .published_after("voluptua.") +/// .page_token("et") +/// .order("invidunt") +/// .on_behalf_of_content_owner("dolore") +/// .max_results(79) +/// .location_radius("elitr,") +/// .location("invidunt") +/// .for_mine(true) +/// .for_content_owner(true) +/// .event_type("sit") +/// .channel_type("justo") +/// .channel_id("accusam"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -7128,7 +7189,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a search result, the snippet property contains other properties that identify the result's title, description, and so forth. If you set part=snippet, the API response will also contain all of those nested properties. - pub fn part(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -7136,7 +7197,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoType parameter lets you restrict a search to a particular type of videos. - pub fn video_type(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_type(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_type = Some(new_value.to_string()); return self; } @@ -7144,7 +7205,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com. - pub fn video_syndicated(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_syndicated(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_syndicated = Some(new_value.to_string()); return self; } @@ -7152,7 +7213,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoLicense parameter filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos. - pub fn video_license(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_license(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_license = Some(new_value.to_string()); return self; } @@ -7160,7 +7221,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage. - pub fn video_embeddable(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_embeddable(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_embeddable = Some(new_value.to_string()); return self; } @@ -7168,7 +7229,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoDuration parameter filters video search results based on their duration. - pub fn video_duration(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_duration(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_duration = Some(new_value.to_string()); return self; } @@ -7176,7 +7237,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos. - pub fn video_dimension(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_dimension(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_dimension = Some(new_value.to_string()); return self; } @@ -7184,7 +7245,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoDefinition parameter lets you restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available. - pub fn video_definition(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_definition(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_definition = Some(new_value.to_string()); return self; } @@ -7192,7 +7253,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoCategoryId parameter filters video search results based on their category. - pub fn video_category_id(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_category_id(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_category_id = Some(new_value.to_string()); return self; } @@ -7200,7 +7261,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions. - pub fn video_caption(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn video_caption(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._video_caption = Some(new_value.to_string()); return self; } @@ -7208,7 +7269,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The type parameter restricts a search query to only retrieve a particular type of resource. The value is a comma-separated list of resource types. - pub fn type_(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn type_(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._type_ = Some(new_value.to_string()); return self; } @@ -7216,7 +7277,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID. - pub fn topic_id(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn topic_id(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._topic_id = Some(new_value.to_string()); return self; } @@ -7224,7 +7285,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The safeSearch parameter indicates whether the search results should include restricted content as well as standard content. - pub fn safe_search(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn safe_search(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._safe_search = Some(new_value.to_string()); return self; } @@ -7232,7 +7293,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The relevanceLanguage parameter instructs the API to return search results that are most relevant to the specified language. The parameter value is typically an ISO 639-1 two-letter language code. However, you should use the values zh-Hans for simplified Chinese and zh-Hant for traditional Chinese. Please note that results in other languages will still be returned if they are highly relevant to the search query term. - pub fn relevance_language(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn relevance_language(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._relevance_language = Some(new_value.to_string()); return self; } @@ -7240,7 +7301,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies. The parameter value must be set to a YouTube video ID and, if you are using this parameter, the type parameter must be set to video. - pub fn related_to_video_id(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn related_to_video_id(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._related_to_video_id = Some(new_value.to_string()); return self; } @@ -7248,7 +7309,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. - pub fn region_code(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn region_code(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._region_code = Some(new_value.to_string()); return self; } @@ -7256,7 +7317,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The q parameter specifies the query term to search for. - pub fn q(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn q(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._q = Some(new_value.to_string()); return self; } @@ -7264,7 +7325,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The publishedBefore parameter indicates that the API response should only contain resources created before the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). - pub fn published_before(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn published_before(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._published_before = Some(new_value.to_string()); return self; } @@ -7272,7 +7333,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The publishedAfter parameter indicates that the API response should only contain resources created after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). - pub fn published_after(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn published_after(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._published_after = Some(new_value.to_string()); return self; } @@ -7280,7 +7341,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -7288,7 +7349,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The order parameter specifies the method that will be used to order resources in the API response. - pub fn order(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn order(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._order = Some(new_value.to_string()); return self; } @@ -7298,7 +7359,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -7306,7 +7367,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. - pub fn max_results(&mut self, new_value: u32) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> SearchListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -7314,7 +7375,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The locationRadius, in conjunction with the location parameter, defines a geographic area. If the geographic coordinates associated with a video fall within that area, then the video may be included in search results. This parameter value must be a floating point number followed by a measurement unit. Valid measurement units are m, km, ft, and mi. For example, valid parameter values include 1500m, 5km, 10000ft, and 0.75mi. The API does not support locationRadius parameter values larger than 1000 kilometers. - pub fn location_radius(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn location_radius(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._location_radius = Some(new_value.to_string()); return self; } @@ -7322,7 +7383,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The location parameter restricts a search to videos that have a geographical location specified in their metadata. The value is a string that specifies geographic latitude/longitude coordinates e.g. (37.42307,-122.08427) - pub fn location(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn location(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._location = Some(new_value.to_string()); return self; } @@ -7330,7 +7391,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The forMine parameter restricts the search to only retrieve videos owned by the authenticated user. If you set this parameter to true, then the type parameter's value must also be set to video. - pub fn for_mine(&mut self, new_value: bool) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn for_mine(mut self, new_value: bool) -> SearchListMethodBuilder<'a, C, NC, A> { self._for_mine = Some(new_value); return self; } @@ -7340,7 +7401,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The forContentOwner parameter restricts the search to only retrieve resources owned by the content owner specified by the onBehalfOfContentOwner parameter. The user must be authenticated using a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided. - pub fn for_content_owner(&mut self, new_value: bool) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn for_content_owner(mut self, new_value: bool) -> SearchListMethodBuilder<'a, C, NC, A> { self._for_content_owner = Some(new_value); return self; } @@ -7348,7 +7409,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The eventType parameter restricts a search to broadcast events. - pub fn event_type(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn event_type(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._event_type = Some(new_value.to_string()); return self; } @@ -7356,7 +7417,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The channelType parameter lets you restrict a search to a particular type of channel. - pub fn channel_type(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn channel_type(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._channel_type = Some(new_value.to_string()); return self; } @@ -7364,7 +7425,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// /// /// The channelId parameter indicates that the API response should only contain resources created by the channel - pub fn channel_id(&mut self, new_value: &str) -> &mut SearchListMethodBuilder<'a, C, NC, A> { + pub fn channel_id(mut self, new_value: &str) -> SearchListMethodBuilder<'a, C, NC, A> { self._channel_id = Some(new_value.to_string()); return self; } @@ -7385,6 +7446,7 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7398,8 +7460,8 @@ impl<'a, C, NC, A> SearchListMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.i18nRegions().list("part") -/// .hl("voluptua."); +/// let mut mb = hub.i18n_regions().list("part") +/// .hl("sit"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -7432,7 +7494,7 @@ impl<'a, C, NC, A> I18nRegionListMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies a comma-separated list of one or more i18nRegion resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. - pub fn part(&mut self, new_value: &str) -> &mut I18nRegionListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> I18nRegionListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -7440,7 +7502,7 @@ impl<'a, C, NC, A> I18nRegionListMethodBuilder<'a, C, NC, A> { /// /// /// The hl parameter specifies the language that should be used for text values in the API response. - pub fn hl(&mut self, new_value: &str) -> &mut I18nRegionListMethodBuilder<'a, C, NC, A> { + pub fn hl(mut self, new_value: &str) -> I18nRegionListMethodBuilder<'a, C, NC, A> { self._hl = Some(new_value.to_string()); return self; } @@ -7461,6 +7523,7 @@ impl<'a, C, NC, A> I18nRegionListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7475,18 +7538,20 @@ impl<'a, C, NC, A> I18nRegionListMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: LiveStream = Default::default(); -/// request.status = &Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "et"; -/// request.etag = "invidunt"; -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.snippet = Default::default(); +/// request.kind = Some("est".to_string()); +/// request.etag = Some("diam".to_string()); +/// request.content_details = Default::default(); +/// request.cdn = Default::default(); +/// request.id = Some("ipsum".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveStreams().update(&request) -/// .on_behalf_of_content_owner_channel("dolore") -/// .on_behalf_of_content_owner("accusam"); +/// let mut mb = hub.live_streams().update(&request) +/// .on_behalf_of_content_owner_channel("voluptua.") +/// .on_behalf_of_content_owner("Lorem"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -7520,7 +7585,7 @@ impl<'a, C, NC, A> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &LiveStream) -> &mut LiveStreamUpdateMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &LiveStream) -> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -7537,7 +7602,7 @@ impl<'a, C, NC, A> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { /// The part properties that you can include in the parameter value are id, snippet, cdn, and status. /// /// Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. If the request body does not specify a value for a mutable property, the existing value for that property will be removed. - pub fn part(&mut self, new_value: &str) -> &mut LiveStreamUpdateMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -7549,7 +7614,7 @@ impl<'a, C, NC, A> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveStreamUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -7559,7 +7624,7 @@ impl<'a, C, NC, A> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveStreamUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -7580,6 +7645,7 @@ impl<'a, C, NC, A> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7593,9 +7659,9 @@ impl<'a, C, NC, A> LiveStreamUpdateMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveStreams().delete("id") -/// .on_behalf_of_content_owner_channel("invidunt") -/// .on_behalf_of_content_owner("dolor"); +/// let mut mb = hub.live_streams().delete("id") +/// .on_behalf_of_content_owner_channel("et") +/// .on_behalf_of_content_owner("sadipscing"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -7629,7 +7695,7 @@ impl<'a, C, NC, A> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube live stream ID for the resource that is being deleted. - pub fn id(&mut self, new_value: &str) -> &mut LiveStreamDeleteMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -7641,7 +7707,7 @@ impl<'a, C, NC, A> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveStreamDeleteMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -7651,7 +7717,7 @@ impl<'a, C, NC, A> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveStreamDeleteMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -7672,6 +7738,7 @@ impl<'a, C, NC, A> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7685,13 +7752,13 @@ impl<'a, C, NC, A> LiveStreamDeleteMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveStreams().list("part") -/// .page_token("sit") -/// .on_behalf_of_content_owner_channel("justo") -/// .on_behalf_of_content_owner("accusam") -/// .mine(false) -/// .max_results(49) -/// .id("est"); +/// let mut mb = hub.live_streams().list("part") +/// .page_token("et") +/// .on_behalf_of_content_owner_channel("At") +/// .on_behalf_of_content_owner("sanctus") +/// .mine(true) +/// .max_results(0) +/// .id("sanctus"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -7729,7 +7796,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies a comma-separated list of one or more liveStream resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, cdn, and status. - pub fn part(&mut self, new_value: &str) -> &mut LiveStreamListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveStreamListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -7737,7 +7804,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut LiveStreamListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> LiveStreamListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -7749,7 +7816,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveStreamListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveStreamListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -7759,7 +7826,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveStreamListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveStreamListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -7767,7 +7834,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// /// /// The mine parameter can be used to instruct the API to only return streams owned by the authenticated user. Set the parameter value to true to only retrieve your own streams. - pub fn mine(&mut self, new_value: bool) -> &mut LiveStreamListMethodBuilder<'a, C, NC, A> { + pub fn mine(mut self, new_value: bool) -> LiveStreamListMethodBuilder<'a, C, NC, A> { self._mine = Some(new_value); return self; } @@ -7775,7 +7842,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. Acceptable values are 0 to 50, inclusive. The default value is 5. - pub fn max_results(&mut self, new_value: u32) -> &mut LiveStreamListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> LiveStreamListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -7783,7 +7850,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of YouTube stream IDs that identify the streams being retrieved. In a liveStream resource, the id property specifies the stream's ID. - pub fn id(&mut self, new_value: &str) -> &mut LiveStreamListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> LiveStreamListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -7804,6 +7871,7 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7818,18 +7886,20 @@ impl<'a, C, NC, A> LiveStreamListMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: LiveStream = Default::default(); -/// request.status = &Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "diam"; -/// request.etag = "ipsum"; -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.snippet = Default::default(); +/// request.kind = Some("ipsum".to_string()); +/// request.etag = Some("justo".to_string()); +/// request.content_details = Default::default(); +/// request.cdn = Default::default(); +/// request.id = Some("sit".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveStreams().insert(&request) -/// .on_behalf_of_content_owner_channel("voluptua.") -/// .on_behalf_of_content_owner("Lorem"); +/// let mut mb = hub.live_streams().insert(&request) +/// .on_behalf_of_content_owner_channel("dolor") +/// .on_behalf_of_content_owner("Stet"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -7863,7 +7933,7 @@ impl<'a, C, NC, A> LiveStreamInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &LiveStream) -> &mut LiveStreamInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &LiveStream) -> LiveStreamInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -7878,7 +7948,7 @@ impl<'a, C, NC, A> LiveStreamInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part properties that you can include in the parameter value are id, snippet, cdn, and status. - pub fn part(&mut self, new_value: &str) -> &mut LiveStreamInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveStreamInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -7890,7 +7960,7 @@ impl<'a, C, NC, A> LiveStreamInsertMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveStreamInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveStreamInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -7900,7 +7970,7 @@ impl<'a, C, NC, A> LiveStreamInsertMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveStreamInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveStreamInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -7921,6 +7991,7 @@ impl<'a, C, NC, A> LiveStreamInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -7935,17 +8006,26 @@ impl<'a, C, NC, A> LiveStreamInsertMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: Channel = Default::default(); -/// request.status = &Default::default(); -/// request.invideo_promotion = &Default::default(); -/// request.kind = "ipsum"; -/// request.statistics = &Default::default(); -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.invideo_promotion = Default::default(); +/// request.kind = Some("et".to_string()); +/// request.statistics = Default::default(); +/// request.content_owner_details = Default::default(); +/// request.topic_details = Default::default(); +/// request.content_details = Default::default(); +/// request.branding_settings = Default::default(); +/// request.conversion_pings = Default::default(); +/// request.snippet = Default::default(); +/// request.audit_details = Default::default(); +/// request.etag = Some("amet.".to_string()); +/// request.id = Some("ea".to_string()); +/// request.localizations = Default::default(); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.channels().update(&request) -/// .on_behalf_of_content_owner("et"); +/// .on_behalf_of_content_owner("sit"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -7978,7 +8058,7 @@ impl<'a, C, NC, A> ChannelUpdateMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &Channel) -> &mut ChannelUpdateMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &Channel) -> ChannelUpdateMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -7995,7 +8075,7 @@ impl<'a, C, NC, A> ChannelUpdateMethodBuilder<'a, C, NC, A> { /// The part names that you can include in the parameter value are id and invideoPromotion. /// /// Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. - pub fn part(&mut self, new_value: &str) -> &mut ChannelUpdateMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> ChannelUpdateMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -8003,7 +8083,7 @@ impl<'a, C, NC, A> ChannelUpdateMethodBuilder<'a, C, NC, A> { /// /// /// The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ChannelUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ChannelUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -8024,6 +8104,7 @@ impl<'a, C, NC, A> ChannelUpdateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8038,15 +8119,15 @@ impl<'a, C, NC, A> ChannelUpdateMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.channels().list("part") -/// .page_token("At") -/// .on_behalf_of_content_owner("et") -/// .my_subscribers(false) -/// .mine(true) -/// .max_results(82) -/// .managed_by_me(false) -/// .id("sanctus") -/// .for_username("ipsum") -/// .category_id("justo"); +/// .page_token("ipsum") +/// .on_behalf_of_content_owner("est") +/// .my_subscribers(true) +/// .mine(false) +/// .max_results(83) +/// .managed_by_me(true) +/// .id("ut") +/// .for_username("erat,") +/// .category_id("erat,"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8089,7 +8170,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, statistics, topicDetails, and invideoPromotion. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set part=contentDetails, the API response will also contain all of those nested properties. - pub fn part(&mut self, new_value: &str) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> ChannelListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -8097,7 +8178,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> ChannelListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -8105,7 +8186,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ChannelListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -8113,7 +8194,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to retrieve a list of channels that subscribed to the authenticated user's channel. - pub fn my_subscribers(&mut self, new_value: bool) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn my_subscribers(mut self, new_value: bool) -> ChannelListMethodBuilder<'a, C, NC, A> { self._my_subscribers = Some(new_value); return self; } @@ -8121,7 +8202,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to instruct the API to only return channels owned by the authenticated user. - pub fn mine(&mut self, new_value: bool) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn mine(mut self, new_value: bool) -> ChannelListMethodBuilder<'a, C, NC, A> { self._mine = Some(new_value); return self; } @@ -8129,7 +8210,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. - pub fn max_results(&mut self, new_value: u32) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> ChannelListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -8137,7 +8218,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to instruct the API to only return channels managed by the content owner that the onBehalfOfContentOwner parameter specifies. The user must be authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided. - pub fn managed_by_me(&mut self, new_value: bool) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn managed_by_me(mut self, new_value: bool) -> ChannelListMethodBuilder<'a, C, NC, A> { self._managed_by_me = Some(new_value); return self; } @@ -8145,7 +8226,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of the YouTube channel ID(s) for the resource(s) that are being retrieved. In a channel resource, the id property specifies the channel's YouTube channel ID. - pub fn id(&mut self, new_value: &str) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> ChannelListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -8153,7 +8234,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// The forUsername parameter specifies a YouTube username, thereby requesting the channel associated with that username. - pub fn for_username(&mut self, new_value: &str) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn for_username(mut self, new_value: &str) -> ChannelListMethodBuilder<'a, C, NC, A> { self._for_username = Some(new_value.to_string()); return self; } @@ -8161,7 +8242,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// /// /// The categoryId parameter specifies a YouTube guide category, thereby requesting YouTube channels associated with that category. - pub fn category_id(&mut self, new_value: &str) -> &mut ChannelListMethodBuilder<'a, C, NC, A> { + pub fn category_id(mut self, new_value: &str) -> ChannelListMethodBuilder<'a, C, NC, A> { self._category_id = Some(new_value.to_string()); return self; } @@ -8182,6 +8263,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8195,7 +8277,7 @@ impl<'a, C, NC, A> ChannelListMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.playlistItems().delete("id"); +/// let mut mb = hub.playlist_items().delete("id"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8227,7 +8309,7 @@ impl<'a, C, NC, A> PlaylistItemDeleteMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID. - pub fn id(&mut self, new_value: &str) -> &mut PlaylistItemDeleteMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> PlaylistItemDeleteMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -8248,6 +8330,7 @@ impl<'a, C, NC, A> PlaylistItemDeleteMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8261,13 +8344,13 @@ impl<'a, C, NC, A> PlaylistItemDeleteMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.playlistItems().list("part") -/// .video_id("Stet") -/// .playlist_id("et") -/// .page_token("amet.") -/// .on_behalf_of_content_owner("ea") -/// .max_results(49) -/// .id("sit"); +/// let mut mb = hub.playlist_items().list("part") +/// .video_id("justo") +/// .playlist_id("clita") +/// .page_token("clita") +/// .on_behalf_of_content_owner("dolor") +/// .max_results(75) +/// .id("magna"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8307,7 +8390,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more playlistItem resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set part=snippet, the API response will contain all of those properties. - pub fn part(&mut self, new_value: &str) -> &mut PlaylistItemListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> PlaylistItemListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -8315,7 +8398,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// /// /// The videoId parameter specifies that the request should return only the playlist items that contain the specified video. - pub fn video_id(&mut self, new_value: &str) -> &mut PlaylistItemListMethodBuilder<'a, C, NC, A> { + pub fn video_id(mut self, new_value: &str) -> PlaylistItemListMethodBuilder<'a, C, NC, A> { self._video_id = Some(new_value.to_string()); return self; } @@ -8323,7 +8406,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// /// /// The playlistId parameter specifies the unique ID of the playlist for which you want to retrieve playlist items. Note that even though this is an optional parameter, every request to retrieve playlist items must specify a value for either the id parameter or the playlistId parameter. - pub fn playlist_id(&mut self, new_value: &str) -> &mut PlaylistItemListMethodBuilder<'a, C, NC, A> { + pub fn playlist_id(mut self, new_value: &str) -> PlaylistItemListMethodBuilder<'a, C, NC, A> { self._playlist_id = Some(new_value.to_string()); return self; } @@ -8331,7 +8414,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut PlaylistItemListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> PlaylistItemListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -8341,7 +8424,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut PlaylistItemListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> PlaylistItemListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -8349,7 +8432,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. - pub fn max_results(&mut self, new_value: u32) -> &mut PlaylistItemListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> PlaylistItemListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -8357,7 +8440,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of one or more unique playlist item IDs. - pub fn id(&mut self, new_value: &str) -> &mut PlaylistItemListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> PlaylistItemListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -8378,6 +8461,7 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8392,17 +8476,18 @@ impl<'a, C, NC, A> PlaylistItemListMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: PlaylistItem = Default::default(); -/// request.status = &Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "ipsum"; -/// request.etag = "est"; -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.snippet = Default::default(); +/// request.kind = Some("sanctus".to_string()); +/// request.etag = Some("diam".to_string()); +/// request.content_details = Default::default(); +/// request.id = Some("clita".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.playlistItems().insert(&request) -/// .on_behalf_of_content_owner("et"); +/// let mut mb = hub.playlist_items().insert(&request) +/// .on_behalf_of_content_owner("ipsum"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8435,7 +8520,7 @@ impl<'a, C, NC, A> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &PlaylistItem) -> &mut PlaylistItemInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &PlaylistItem) -> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -8450,7 +8535,7 @@ impl<'a, C, NC, A> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part names that you can include in the parameter value are snippet, contentDetails, and status. - pub fn part(&mut self, new_value: &str) -> &mut PlaylistItemInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -8460,7 +8545,7 @@ impl<'a, C, NC, A> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut PlaylistItemInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -8481,6 +8566,7 @@ impl<'a, C, NC, A> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8495,16 +8581,17 @@ impl<'a, C, NC, A> PlaylistItemInsertMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: PlaylistItem = Default::default(); -/// request.status = &Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "diam"; -/// request.etag = "dolores"; -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.snippet = Default::default(); +/// request.kind = Some("ipsum".to_string()); +/// request.etag = Some("sanctus".to_string()); +/// request.content_details = Default::default(); +/// request.id = Some("et".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.playlistItems().update(&request); +/// let mut mb = hub.playlist_items().update(&request); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8536,7 +8623,7 @@ impl<'a, C, NC, A> PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &PlaylistItem) -> &mut PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &PlaylistItem) -> PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -8553,7 +8640,7 @@ impl<'a, C, NC, A> PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { /// The part names that you can include in the parameter value are snippet, contentDetails, and status. /// /// Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist item can specify a start time and end time, which identify the times portion of the video that should play when users watch the video in the playlist. If your request is updating a playlist item that sets these values, and the request's part parameter value includes the contentDetails part, the playlist item's start and end times will be updated to whatever value the request body specifies. If the request body does not specify values, the existing start and end times will be removed and replaced with the default settings. - pub fn part(&mut self, new_value: &str) -> &mut PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -8574,6 +8661,7 @@ impl<'a, C, NC, A> PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8588,17 +8676,17 @@ impl<'a, C, NC, A> PlaylistItemUpdateMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: InvideoBranding = Default::default(); -/// request.target_channel_id = "ut"; -/// request.position = &Default::default(); -/// request.image_url = "erat,"; -/// request.timing = &Default::default(); -/// // ... and so forth ... +/// request.target_channel_id = Some("dolor".to_string()); +/// request.position = Default::default(); +/// request.image_url = Some("ea".to_string()); +/// request.timing = Default::default(); +/// request.image_bytes = Some("invidunt".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.watermarks().set(&request, "channelId") -/// .on_behalf_of_content_owner("erat,"); +/// .on_behalf_of_content_owner("aliquyam"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8631,7 +8719,7 @@ impl<'a, C, NC, A> WatermarkSetMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &InvideoBranding) -> &mut WatermarkSetMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &InvideoBranding) -> WatermarkSetMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -8641,7 +8729,7 @@ impl<'a, C, NC, A> WatermarkSetMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The channelId parameter specifies a YouTube channel ID for which the watermark is being provided. - pub fn channel_id(&mut self, new_value: &str) -> &mut WatermarkSetMethodBuilder<'a, C, NC, A> { + pub fn channel_id(mut self, new_value: &str) -> WatermarkSetMethodBuilder<'a, C, NC, A> { self._channel_id = new_value.to_string(); return self; } @@ -8649,7 +8737,7 @@ impl<'a, C, NC, A> WatermarkSetMethodBuilder<'a, C, NC, A> { /// /// /// The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut WatermarkSetMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> WatermarkSetMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -8670,6 +8758,7 @@ impl<'a, C, NC, A> WatermarkSetMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8684,7 +8773,7 @@ impl<'a, C, NC, A> WatermarkSetMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.watermarks().unset("channelId") -/// .on_behalf_of_content_owner("eirmod"); +/// .on_behalf_of_content_owner("et"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8717,7 +8806,7 @@ impl<'a, C, NC, A> WatermarkUnsetMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The channelId parameter specifies a YouTube channel ID for which the watermark is being unset. - pub fn channel_id(&mut self, new_value: &str) -> &mut WatermarkUnsetMethodBuilder<'a, C, NC, A> { + pub fn channel_id(mut self, new_value: &str) -> WatermarkUnsetMethodBuilder<'a, C, NC, A> { self._channel_id = new_value.to_string(); return self; } @@ -8725,7 +8814,7 @@ impl<'a, C, NC, A> WatermarkUnsetMethodBuilder<'a, C, NC, A> { /// /// /// The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut WatermarkUnsetMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> WatermarkUnsetMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -8746,6 +8835,7 @@ impl<'a, C, NC, A> WatermarkUnsetMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8759,12 +8849,12 @@ impl<'a, C, NC, A> WatermarkUnsetMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveBroadcasts().control("id", "part") -/// .walltime("clita") -/// .on_behalf_of_content_owner_channel("dolor") -/// .on_behalf_of_content_owner("At") -/// .offset_time_ms("magna") -/// .display_slate(false); +/// let mut mb = hub.live_broadcasts().control("id", "part") +/// .walltime("sit") +/// .on_behalf_of_content_owner_channel("consetetur") +/// .on_behalf_of_content_owner("justo") +/// .offset_time_ms("sit") +/// .display_slate(true); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8802,7 +8892,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube live broadcast ID that uniquely identifies the broadcast in which the slate is being updated. - pub fn id(&mut self, new_value: &str) -> &mut LiveBroadcastControlMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -8812,7 +8902,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. - pub fn part(&mut self, new_value: &str) -> &mut LiveBroadcastControlMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -8820,7 +8910,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// /// /// The walltime parameter specifies the wall clock time at which the specified slate change will occur. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sssZ) format. - pub fn walltime(&mut self, new_value: &str) -> &mut LiveBroadcastControlMethodBuilder<'a, C, NC, A> { + pub fn walltime(mut self, new_value: &str) -> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { self._walltime = Some(new_value.to_string()); return self; } @@ -8832,7 +8922,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveBroadcastControlMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -8842,7 +8932,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveBroadcastControlMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -8854,7 +8944,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// If you do not specify a value for this parameter, then YouTube performs the action as soon as possible. See the Getting started guide for more details. /// /// Important: You should only specify a value for this parameter if your broadcast stream is delayed. - pub fn offset_time_ms(&mut self, new_value: &str) -> &mut LiveBroadcastControlMethodBuilder<'a, C, NC, A> { + pub fn offset_time_ms(mut self, new_value: &str) -> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { self._offset_time_ms = Some(new_value.to_string()); return self; } @@ -8862,7 +8952,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// /// /// The displaySlate parameter specifies whether the slate is being enabled or disabled. - pub fn display_slate(&mut self, new_value: bool) -> &mut LiveBroadcastControlMethodBuilder<'a, C, NC, A> { + pub fn display_slate(mut self, new_value: bool) -> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { self._display_slate = Some(new_value); return self; } @@ -8883,6 +8973,7 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8897,18 +8988,19 @@ impl<'a, C, NC, A> LiveBroadcastControlMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: LiveBroadcast = Default::default(); -/// request.status = &Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "diam"; -/// request.etag = "clita"; -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.snippet = Default::default(); +/// request.kind = Some("amet,".to_string()); +/// request.etag = Some("et".to_string()); +/// request.content_details = Default::default(); +/// request.id = Some("ipsum".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveBroadcasts().update(&request) -/// .on_behalf_of_content_owner_channel("ipsum") -/// .on_behalf_of_content_owner("ipsum"); +/// let mut mb = hub.live_broadcasts().update(&request) +/// .on_behalf_of_content_owner_channel("amet,") +/// .on_behalf_of_content_owner("sanctus"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -8942,7 +9034,7 @@ impl<'a, C, NC, A> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &LiveBroadcast) -> &mut LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &LiveBroadcast) -> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -8959,7 +9051,7 @@ impl<'a, C, NC, A> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { /// The part properties that you can include in the parameter value are id, snippet, contentDetails, and status. /// /// Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a broadcast's privacy status is defined in the status part. As such, if your request is updating a private or unlisted broadcast, and the request's part parameter value includes the status part, the broadcast's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the broadcast will revert to the default privacy setting. - pub fn part(&mut self, new_value: &str) -> &mut LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -8971,7 +9063,7 @@ impl<'a, C, NC, A> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -8981,7 +9073,7 @@ impl<'a, C, NC, A> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -9002,6 +9094,7 @@ impl<'a, C, NC, A> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9016,18 +9109,19 @@ impl<'a, C, NC, A> LiveBroadcastUpdateMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: LiveBroadcast = Default::default(); -/// request.status = &Default::default(); -/// request.snippet = &Default::default(); -/// request.kind = "sanctus"; -/// request.etag = "et"; -/// // ... and so forth ... +/// request.status = Default::default(); +/// request.snippet = Default::default(); +/// request.kind = Some("dolore".to_string()); +/// request.etag = Some("tempor".to_string()); +/// request.content_details = Default::default(); +/// request.id = Some("aliquyam".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveBroadcasts().insert(&request) -/// .on_behalf_of_content_owner_channel("et") -/// .on_behalf_of_content_owner("dolor"); +/// let mut mb = hub.live_broadcasts().insert(&request) +/// .on_behalf_of_content_owner_channel("accusam") +/// .on_behalf_of_content_owner("labore"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -9061,7 +9155,7 @@ impl<'a, C, NC, A> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &LiveBroadcast) -> &mut LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &LiveBroadcast) -> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -9076,7 +9170,7 @@ impl<'a, C, NC, A> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part properties that you can include in the parameter value are id, snippet, contentDetails, and status. - pub fn part(&mut self, new_value: &str) -> &mut LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -9088,7 +9182,7 @@ impl<'a, C, NC, A> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -9098,7 +9192,7 @@ impl<'a, C, NC, A> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -9119,6 +9213,7 @@ impl<'a, C, NC, A> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9132,10 +9227,10 @@ impl<'a, C, NC, A> LiveBroadcastInsertMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveBroadcasts().bind("id", "part") -/// .stream_id("aliquyam") -/// .on_behalf_of_content_owner_channel("clita") -/// .on_behalf_of_content_owner("et"); +/// let mut mb = hub.live_broadcasts().bind("id", "part") +/// .stream_id("sanctus") +/// .on_behalf_of_content_owner_channel("eos") +/// .on_behalf_of_content_owner("sadipscing"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -9171,7 +9266,7 @@ impl<'a, C, NC, A> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the unique ID of the broadcast that is being bound to a video stream. - pub fn id(&mut self, new_value: &str) -> &mut LiveBroadcastBindMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -9181,7 +9276,7 @@ impl<'a, C, NC, A> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. - pub fn part(&mut self, new_value: &str) -> &mut LiveBroadcastBindMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -9189,7 +9284,7 @@ impl<'a, C, NC, A> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { /// /// /// The streamId parameter specifies the unique ID of the video stream that is being bound to a broadcast. If this parameter is omitted, the API will remove any existing binding between the broadcast and a video stream. - pub fn stream_id(&mut self, new_value: &str) -> &mut LiveBroadcastBindMethodBuilder<'a, C, NC, A> { + pub fn stream_id(mut self, new_value: &str) -> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { self._stream_id = Some(new_value.to_string()); return self; } @@ -9201,7 +9296,7 @@ impl<'a, C, NC, A> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveBroadcastBindMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -9211,7 +9306,7 @@ impl<'a, C, NC, A> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveBroadcastBindMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -9232,6 +9327,7 @@ impl<'a, C, NC, A> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9245,14 +9341,14 @@ impl<'a, C, NC, A> LiveBroadcastBindMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveBroadcasts().list("part") -/// .page_token("no") -/// .on_behalf_of_content_owner_channel("sit") -/// .on_behalf_of_content_owner("consetetur") -/// .mine(false) -/// .max_results(48) -/// .id("et") -/// .broadcast_status("amet,"); +/// let mut mb = hub.live_broadcasts().list("part") +/// .page_token("amet.") +/// .on_behalf_of_content_owner_channel("et") +/// .on_behalf_of_content_owner("eirmod") +/// .mine(true) +/// .max_results(14) +/// .id("diam") +/// .broadcast_status("sanctus"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -9291,7 +9387,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. - pub fn part(&mut self, new_value: &str) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -9299,7 +9395,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -9311,7 +9407,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -9321,7 +9417,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -9329,7 +9425,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// /// /// The mine parameter can be used to instruct the API to only return broadcasts owned by the authenticated user. Set the parameter value to true to only retrieve your own broadcasts. - pub fn mine(&mut self, new_value: bool) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn mine(mut self, new_value: bool) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._mine = Some(new_value); return self; } @@ -9337,7 +9433,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. - pub fn max_results(&mut self, new_value: u32) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -9345,7 +9441,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of YouTube broadcast IDs that identify the broadcasts being retrieved. In a liveBroadcast resource, the id property specifies the broadcast's ID. - pub fn id(&mut self, new_value: &str) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -9353,7 +9449,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// /// /// The broadcastStatus parameter filters the API response to only include broadcasts with the specified status. - pub fn broadcast_status(&mut self, new_value: &str) -> &mut LiveBroadcastListMethodBuilder<'a, C, NC, A> { + pub fn broadcast_status(mut self, new_value: &str) -> LiveBroadcastListMethodBuilder<'a, C, NC, A> { self._broadcast_status = Some(new_value.to_string()); return self; } @@ -9374,6 +9470,7 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9387,9 +9484,9 @@ impl<'a, C, NC, A> LiveBroadcastListMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveBroadcasts().delete("id") -/// .on_behalf_of_content_owner_channel("ipsum") -/// .on_behalf_of_content_owner("amet,"); +/// let mut mb = hub.live_broadcasts().delete("id") +/// .on_behalf_of_content_owner_channel("amet,") +/// .on_behalf_of_content_owner("ipsum"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -9423,7 +9520,7 @@ impl<'a, C, NC, A> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the YouTube live broadcast ID for the resource that is being deleted. - pub fn id(&mut self, new_value: &str) -> &mut LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -9435,7 +9532,7 @@ impl<'a, C, NC, A> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -9445,7 +9542,7 @@ impl<'a, C, NC, A> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -9466,6 +9563,7 @@ impl<'a, C, NC, A> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9479,9 +9577,9 @@ impl<'a, C, NC, A> LiveBroadcastDeleteMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.liveBroadcasts().transition("broadcastStatus", "id", "part") -/// .on_behalf_of_content_owner_channel("aliquyam") -/// .on_behalf_of_content_owner("accusam"); +/// let mut mb = hub.live_broadcasts().transition("broadcastStatus", "id", "part") +/// .on_behalf_of_content_owner_channel("At") +/// .on_behalf_of_content_owner("dolor"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -9517,7 +9615,7 @@ impl<'a, C, NC, A> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The broadcastStatus parameter identifies the state to which the broadcast is changing. Note that to transition a broadcast to either the testing or live state, the status.streamStatus must be active for the stream that the broadcast is bound to. - pub fn broadcast_status(&mut self, new_value: &str) -> &mut LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { + pub fn broadcast_status(mut self, new_value: &str) -> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { self._broadcast_status = new_value.to_string(); return self; } @@ -9527,7 +9625,7 @@ impl<'a, C, NC, A> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The id parameter specifies the unique ID of the broadcast that is transitioning to another status. - pub fn id(&mut self, new_value: &str) -> &mut LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { self._id = new_value.to_string(); return self; } @@ -9537,7 +9635,7 @@ impl<'a, C, NC, A> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. - pub fn part(&mut self, new_value: &str) -> &mut LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -9549,7 +9647,7 @@ impl<'a, C, NC, A> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. /// /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - pub fn on_behalf_of_content_owner_channel(&mut self, new_value: &str) -> &mut LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); return self; } @@ -9559,7 +9657,7 @@ impl<'a, C, NC, A> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { /// Note: This parameter is intended exclusively for YouTube content partners. /// /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - pub fn on_behalf_of_content_owner(&mut self, new_value: &str) -> &mut LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); return self; } @@ -9580,6 +9678,7 @@ impl<'a, C, NC, A> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9593,10 +9692,10 @@ impl<'a, C, NC, A> LiveBroadcastTransitionMethodBuilder<'a, C, NC, A> { /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. /// // Values are random and not representative ! -/// let mut mb = hub.videoCategories().list("part") -/// .region_code("sit") +/// let mut mb = hub.video_categories().list("part") +/// .region_code("eirmod") /// .id("sed") -/// .hl("sanctus"); +/// .hl("ipsum"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -9631,7 +9730,7 @@ impl<'a, C, NC, A> VideoCategoryListMethodBuilder<'a, C, NC, A> { /// we provide this method for API completeness. /// /// The part parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet. - pub fn part(&mut self, new_value: &str) -> &mut VideoCategoryListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> VideoCategoryListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -9639,7 +9738,7 @@ impl<'a, C, NC, A> VideoCategoryListMethodBuilder<'a, C, NC, A> { /// /// /// The regionCode parameter instructs the API to return the list of video categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. - pub fn region_code(&mut self, new_value: &str) -> &mut VideoCategoryListMethodBuilder<'a, C, NC, A> { + pub fn region_code(mut self, new_value: &str) -> VideoCategoryListMethodBuilder<'a, C, NC, A> { self._region_code = Some(new_value.to_string()); return self; } @@ -9647,7 +9746,7 @@ impl<'a, C, NC, A> VideoCategoryListMethodBuilder<'a, C, NC, A> { /// /// /// The id parameter specifies a comma-separated list of video category IDs for the resources that you are retrieving. - pub fn id(&mut self, new_value: &str) -> &mut VideoCategoryListMethodBuilder<'a, C, NC, A> { + pub fn id(mut self, new_value: &str) -> VideoCategoryListMethodBuilder<'a, C, NC, A> { self._id = Some(new_value.to_string()); return self; } @@ -9655,7 +9754,7 @@ impl<'a, C, NC, A> VideoCategoryListMethodBuilder<'a, C, NC, A> { /// /// /// The hl parameter specifies the language that should be used for text values in the API response. - pub fn hl(&mut self, new_value: &str) -> &mut VideoCategoryListMethodBuilder<'a, C, NC, A> { + pub fn hl(mut self, new_value: &str) -> VideoCategoryListMethodBuilder<'a, C, NC, A> { self._hl = Some(new_value.to_string()); return self; } @@ -9676,6 +9775,7 @@ impl<'a, C, NC, A> VideoCategoryListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9690,14 +9790,14 @@ impl<'a, C, NC, A> VideoCategoryListMethodBuilder<'a, C, NC, A> { /// // by calling the respective setters. /// // Values are random and not representative ! /// let mut mb = hub.activities().list("part") -/// .region_code("sadipscing") -/// .published_before("dolore") -/// .published_after("amet.") -/// .page_token("et") +/// .region_code("kasd") +/// .published_before("aliquyam") +/// .published_after("et") +/// .page_token("labore") /// .mine(true) -/// .max_results(71) -/// .home(false) -/// .channel_id("diam"); +/// .max_results(27) +/// .home(true) +/// .channel_id("et"); /// /// // Finally, execute your call and process the result /// mb.doit() @@ -9739,7 +9839,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. /// /// If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set part=snippet, the API response will also contain all of those nested properties. - pub fn part(&mut self, new_value: &str) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> ActivityListMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } @@ -9747,7 +9847,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// The regionCode parameter instructs the API to return results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. YouTube uses this value when the authorized user's previous activity on YouTube does not provide enough information to generate the activity feed. - pub fn region_code(&mut self, new_value: &str) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn region_code(mut self, new_value: &str) -> ActivityListMethodBuilder<'a, C, NC, A> { self._region_code = Some(new_value.to_string()); return self; } @@ -9755,7 +9855,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// The publishedBefore parameter specifies the date and time before which an activity must have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be excluded from the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - pub fn published_before(&mut self, new_value: &str) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn published_before(mut self, new_value: &str) -> ActivityListMethodBuilder<'a, C, NC, A> { self._published_before = Some(new_value.to_string()); return self; } @@ -9763,7 +9863,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// The publishedAfter parameter specifies the earliest date and time that an activity could have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be included in the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - pub fn published_after(&mut self, new_value: &str) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn published_after(mut self, new_value: &str) -> ActivityListMethodBuilder<'a, C, NC, A> { self._published_after = Some(new_value.to_string()); return self; } @@ -9771,7 +9871,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. - pub fn page_token(&mut self, new_value: &str) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn page_token(mut self, new_value: &str) -> ActivityListMethodBuilder<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); return self; } @@ -9779,7 +9879,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to retrieve a feed of the authenticated user's activities. - pub fn mine(&mut self, new_value: bool) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn mine(mut self, new_value: bool) -> ActivityListMethodBuilder<'a, C, NC, A> { self._mine = Some(new_value); return self; } @@ -9787,7 +9887,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. - pub fn max_results(&mut self, new_value: u32) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn max_results(mut self, new_value: u32) -> ActivityListMethodBuilder<'a, C, NC, A> { self._max_results = Some(new_value); return self; } @@ -9795,7 +9895,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// Set this parameter's value to true to retrieve the activity feed that displays on the YouTube home page for the currently authenticated user. - pub fn home(&mut self, new_value: bool) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn home(mut self, new_value: bool) -> ActivityListMethodBuilder<'a, C, NC, A> { self._home = Some(new_value); return self; } @@ -9803,7 +9903,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// /// /// The channelId parameter specifies a unique YouTube channel ID. The API will then return a list of that channel's activities. - pub fn channel_id(&mut self, new_value: &str) -> &mut ActivityListMethodBuilder<'a, C, NC, A> { + pub fn channel_id(mut self, new_value: &str) -> ActivityListMethodBuilder<'a, C, NC, A> { self._channel_id = Some(new_value.to_string()); return self; } @@ -9826,6 +9926,7 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// # extern crate "yup-oauth2" as oauth2; /// # extern crate "rustc-serialize" as rustc_serialize; /// # extern crate youtube3; +/// # use youtube3::*; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9840,11 +9941,11 @@ impl<'a, C, NC, A> ActivityListMethodBuilder<'a, C, NC, A> { /// // What can actually be filled in depends on the actual call - the following is just a /// // random selection of properties ! Values are random and not representative ! /// let mut request: Activity = Default::default(); -/// request.snippet = &Default::default(); -/// request.content_details = &Default::default(); -/// request.kind = "sanctus"; -/// request.etag = "et"; -/// // ... and so forth ... +/// request.snippet = Default::default(); +/// request.content_details = Default::default(); +/// request.kind = Some("rebum.".to_string()); +/// request.etag = Some("et".to_string()); +/// request.id = Some("erat,".to_string()); /// /// // Even though you wouldn't bind this to a variable, you can configure optional parameters /// // by calling the respective setters. @@ -9881,7 +9982,7 @@ impl<'a, C, NC, A> ActivityInsertMethodBuilder<'a, C, NC, A> { /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - pub fn request(&mut self, new_value: &Activity) -> &mut ActivityInsertMethodBuilder<'a, C, NC, A> { + pub fn request(mut self, new_value: &Activity) -> ActivityInsertMethodBuilder<'a, C, NC, A> { self._request = new_value.clone(); return self; } @@ -9896,7 +9997,7 @@ impl<'a, C, NC, A> ActivityInsertMethodBuilder<'a, C, NC, A> { /// The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. /// /// The part names that you can include in the parameter value are snippet and contentDetails. - pub fn part(&mut self, new_value: &str) -> &mut ActivityInsertMethodBuilder<'a, C, NC, A> { + pub fn part(mut self, new_value: &str) -> ActivityInsertMethodBuilder<'a, C, NC, A> { self._part = new_value.to_string(); return self; } diff --git a/src/mako/lib/lib.mako b/src/mako/lib/lib.mako index 116002b71ae..8971c1a3e97 100644 --- a/src/mako/lib/lib.mako +++ b/src/mako/lib/lib.mako @@ -68,6 +68,8 @@ ${'##'} About error handling ${'##'} About Customization/Callbacks +${'##'} About Optionals in parts (needed for Json, otherwise I'd happily drop them) + [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern [google-go-api]: https://github.com/google/google-api-go-client diff --git a/src/mako/lib/mbuild.mako b/src/mako/lib/mbuild.mako index 9cc87824859..dafaf6d38b5 100644 --- a/src/mako/lib/mbuild.mako +++ b/src/mako/lib/mbuild.mako @@ -63,9 +63,13 @@ ${capture(lib.test_hub, hub_type_name, comments=False) | hide_rust_doc_test} let mut ${rb_name}: ${request_value.id} = Default::default(); % for spn, sp in request_value.get('properties', dict()).iteritems(): <% - assignment = rvfrt(spn, sp) + assignment = rvfrt(spn, sp, request_value.id) if is_string_value(assignment): assignment = assignment + '.to_string()' + if assignment.endswith('default()'): + assignment = assignment[1:] # cut & - it's not ok in this case :)! + else: + assignment = 'Some(%s)' % assignment %>\ ## ${to_rust_type(request_value.id, spn, sp, allow_optionals=False)} ${rb_name}.${mangle_ident(spn)} = ${assignment}; diff --git a/src/mako/lib/util.py b/src/mako/lib/util.py index 024c4e1c3a6..ede78f4c047 100644 --- a/src/mako/lib/util.py +++ b/src/mako/lib/util.py @@ -489,6 +489,4 @@ def rnd_arg_val_for_type(tn): try: return str(RUST_TYPE_RND_MAP[tn]()) except KeyError: - # be verbose to show actual type ! It's for documentation, after all, people should see what's going on - # right away without another lookup - return '&<%s as Default>::default()' % tn + return '&Default::default()'