Mercurial > lbo > hg > async-google-apis
changeset 196:f5325b1ed44d
Update generated code
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sun, 31 Jan 2021 21:17:21 +0100 |
parents | 8761ce938e11 |
children | a4f21d82a43c |
files | example_crates/drive_example/src/drive_v3_types.rs example_crates/gcs_example/src/storage_v1_types.rs example_crates/youtube_example/src/youtube_v3_types.rs |
diffstat | 3 files changed, 228 insertions(+), 228 deletions(-) [+] |
line wrap: on
line diff
--- a/example_crates/drive_example/src/drive_v3_types.rs Sun Jan 31 21:16:16 2021 +0100 +++ b/example_crates/drive_example/src/drive_v3_types.rs Sun Jan 31 21:17:21 2021 +0100 @@ -1640,37 +1640,32 @@ pub photo_link: Option<String>, } -/// -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -pub struct DriveParams { - /// Data format for the response. - #[serde(rename = "alt")] - #[serde(skip_serializing_if = "Option::is_none")] - pub alt: Option<DriveParamsAlt>, - /// Selector specifying which fields to include in a partial response. - #[serde(rename = "fields")] - #[serde(skip_serializing_if = "Option::is_none")] - pub fields: Option<String>, - /// API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - #[serde(rename = "key")] - #[serde(skip_serializing_if = "Option::is_none")] - pub key: Option<String>, - /// OAuth 2.0 token for the current user. - #[serde(rename = "oauth_token")] - #[serde(skip_serializing_if = "Option::is_none")] - pub oauth_token: Option<String>, - /// Returns response with indentations and line breaks. - #[serde(rename = "prettyPrint")] - #[serde(skip_serializing_if = "Option::is_none")] - pub pretty_print: Option<bool>, - /// An opaque string that represents a user for quota purposes. Must not exceed 40 characters. - #[serde(rename = "quotaUser")] - #[serde(skip_serializing_if = "Option::is_none")] - pub quota_user: Option<String>, - /// Deprecated. Please use quotaUser instead. - #[serde(rename = "userIp")] - #[serde(skip_serializing_if = "Option::is_none")] - pub user_ip: Option<String>, +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub enum FilesListCorpus { + Undefined, + /// Files shared to the user's domain. + #[serde(rename = "domain")] + Domain, + /// Files owned by or shared to the user. If a user has permissions on a Shared Drive, the files inside it won't be retrieved unless the user has created, opened, or shared the file. + #[serde(rename = "user")] + User, +} + +impl std::default::Default for FilesListCorpus { + fn default() -> FilesListCorpus { + FilesListCorpus::Undefined + } +} + +impl std::fmt::Display for FilesListCorpus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let s = match self { + FilesListCorpus::Undefined => write!(f, "undefined"), + FilesListCorpus::Domain => write!(f, "domain"), + FilesListCorpus::User => write!(f, "user"), + }; + Ok(()) + } } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] @@ -1700,34 +1695,6 @@ } } -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] -pub enum FilesListCorpus { - Undefined, - /// Files shared to the user's domain. - #[serde(rename = "domain")] - Domain, - /// Files owned by or shared to the user. If a user has permissions on a Shared Drive, the files inside it won't be retrieved unless the user has created, opened, or shared the file. - #[serde(rename = "user")] - User, -} - -impl std::default::Default for FilesListCorpus { - fn default() -> FilesListCorpus { - FilesListCorpus::Undefined - } -} - -impl std::fmt::Display for FilesListCorpus { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let s = match self { - FilesListCorpus::Undefined => write!(f, "undefined"), - FilesListCorpus::Domain => write!(f, "domain"), - FilesListCorpus::User => write!(f, "user"), - }; - Ok(()) - } -} - /// Parameters for the `about.get` method. #[derive(Serialize, Deserialize, Debug, Clone, Default)] pub struct AboutGetParams { @@ -3852,6 +3819,39 @@ } } +/// +#[derive(Serialize, Deserialize, Debug, Clone, Default)] +pub struct DriveParams { + /// Data format for the response. + #[serde(rename = "alt")] + #[serde(skip_serializing_if = "Option::is_none")] + pub alt: Option<DriveParamsAlt>, + /// Selector specifying which fields to include in a partial response. + #[serde(rename = "fields")] + #[serde(skip_serializing_if = "Option::is_none")] + pub fields: Option<String>, + /// API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + #[serde(rename = "key")] + #[serde(skip_serializing_if = "Option::is_none")] + pub key: Option<String>, + /// OAuth 2.0 token for the current user. + #[serde(rename = "oauth_token")] + #[serde(skip_serializing_if = "Option::is_none")] + pub oauth_token: Option<String>, + /// Returns response with indentations and line breaks. + #[serde(rename = "prettyPrint")] + #[serde(skip_serializing_if = "Option::is_none")] + pub pretty_print: Option<bool>, + /// An opaque string that represents a user for quota purposes. Must not exceed 40 characters. + #[serde(rename = "quotaUser")] + #[serde(skip_serializing_if = "Option::is_none")] + pub quota_user: Option<String>, + /// Deprecated. Please use quotaUser instead. + #[serde(rename = "userIp")] + #[serde(skip_serializing_if = "Option::is_none")] + pub user_ip: Option<String>, +} + impl std::fmt::Display for DriveParams { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { if let Some(ref v) = self.alt {
--- a/example_crates/gcs_example/src/storage_v1_types.rs Sun Jan 31 21:16:16 2021 +0100 +++ b/example_crates/gcs_example/src/storage_v1_types.rs Sun Jan 31 21:17:21 2021 +0100 @@ -1089,66 +1089,6 @@ pub permissions: Option<Vec<String>>, } -/// -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -pub struct StorageParams { - /// Data format for the response. - #[serde(rename = "alt")] - #[serde(skip_serializing_if = "Option::is_none")] - pub alt: Option<StorageParamsAlt>, - /// Selector specifying which fields to include in a partial response. - #[serde(rename = "fields")] - #[serde(skip_serializing_if = "Option::is_none")] - pub fields: Option<String>, - /// API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - #[serde(rename = "key")] - #[serde(skip_serializing_if = "Option::is_none")] - pub key: Option<String>, - /// OAuth 2.0 token for the current user. - #[serde(rename = "oauth_token")] - #[serde(skip_serializing_if = "Option::is_none")] - pub oauth_token: Option<String>, - /// Returns response with indentations and line breaks. - #[serde(rename = "prettyPrint")] - #[serde(skip_serializing_if = "Option::is_none")] - pub pretty_print: Option<bool>, - /// An opaque string that represents a user for quota purposes. Must not exceed 40 characters. - #[serde(rename = "quotaUser")] - #[serde(skip_serializing_if = "Option::is_none")] - pub quota_user: Option<String>, - /// Deprecated. Please use quotaUser instead. - #[serde(rename = "userIp")] - #[serde(skip_serializing_if = "Option::is_none")] - pub user_ip: Option<String>, -} - -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] -pub enum StorageParamsAlt { - Undefined, - /// Responses with Content-Type of application/json - #[serde(rename = "json")] - Json, - #[serde(rename = "media")] - Media, -} - -impl std::default::Default for StorageParamsAlt { - fn default() -> StorageParamsAlt { - StorageParamsAlt::Undefined - } -} - -impl std::fmt::Display for StorageParamsAlt { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let s = match self { - StorageParamsAlt::Undefined => write!(f, "undefined"), - StorageParamsAlt::Json => write!(f, "json"), - StorageParamsAlt::Media => write!(f, "media"), - }; - Ok(()) - } -} - #[derive(Debug, Clone, Copy, Serialize, Deserialize)] pub enum BucketsGetProjection { Undefined, @@ -2063,6 +2003,33 @@ } } +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub enum StorageParamsAlt { + Undefined, + /// Responses with Content-Type of application/json + #[serde(rename = "json")] + Json, + #[serde(rename = "media")] + Media, +} + +impl std::default::Default for StorageParamsAlt { + fn default() -> StorageParamsAlt { + StorageParamsAlt::Undefined + } +} + +impl std::fmt::Display for StorageParamsAlt { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let s = match self { + StorageParamsAlt::Undefined => write!(f, "undefined"), + StorageParamsAlt::Json => write!(f, "json"), + StorageParamsAlt::Media => write!(f, "media"), + }; + Ok(()) + } +} + /// Parameters for the `bucketAccessControls.delete` method. #[derive(Serialize, Deserialize, Debug, Clone, Default)] pub struct BucketAccessControlsDeleteParams { @@ -5277,6 +5244,39 @@ } } +/// +#[derive(Serialize, Deserialize, Debug, Clone, Default)] +pub struct StorageParams { + /// Data format for the response. + #[serde(rename = "alt")] + #[serde(skip_serializing_if = "Option::is_none")] + pub alt: Option<StorageParamsAlt>, + /// Selector specifying which fields to include in a partial response. + #[serde(rename = "fields")] + #[serde(skip_serializing_if = "Option::is_none")] + pub fields: Option<String>, + /// API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + #[serde(rename = "key")] + #[serde(skip_serializing_if = "Option::is_none")] + pub key: Option<String>, + /// OAuth 2.0 token for the current user. + #[serde(rename = "oauth_token")] + #[serde(skip_serializing_if = "Option::is_none")] + pub oauth_token: Option<String>, + /// Returns response with indentations and line breaks. + #[serde(rename = "prettyPrint")] + #[serde(skip_serializing_if = "Option::is_none")] + pub pretty_print: Option<bool>, + /// An opaque string that represents a user for quota purposes. Must not exceed 40 characters. + #[serde(rename = "quotaUser")] + #[serde(skip_serializing_if = "Option::is_none")] + pub quota_user: Option<String>, + /// Deprecated. Please use quotaUser instead. + #[serde(rename = "userIp")] + #[serde(skip_serializing_if = "Option::is_none")] + pub user_ip: Option<String>, +} + impl std::fmt::Display for StorageParams { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { if let Some(ref v) = self.alt {
--- a/example_crates/youtube_example/src/youtube_v3_types.rs Sun Jan 31 21:16:16 2021 +0100 +++ b/example_crates/youtube_example/src/youtube_v3_types.rs Sun Jan 31 21:17:21 2021 +0100 @@ -4565,55 +4565,6 @@ pub custom_url: Option<String>, } -/// -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -pub struct YoutubeParams { - /// JSONP - #[serde(rename = "callback")] - #[serde(skip_serializing_if = "Option::is_none")] - pub callback: Option<String>, - /// OAuth access token. - #[serde(rename = "access_token")] - #[serde(skip_serializing_if = "Option::is_none")] - pub access_token: Option<String>, - /// Data format for response. - #[serde(rename = "alt")] - #[serde(skip_serializing_if = "Option::is_none")] - pub alt: Option<YoutubeParamsAlt>, - /// Upload protocol for media (e.g. "raw", "multipart"). - #[serde(rename = "upload_protocol")] - #[serde(skip_serializing_if = "Option::is_none")] - pub upload_protocol: Option<String>, - /// Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - #[serde(rename = "quotaUser")] - #[serde(skip_serializing_if = "Option::is_none")] - pub quota_user: Option<String>, - /// Returns response with indentations and line breaks. - #[serde(rename = "prettyPrint")] - #[serde(skip_serializing_if = "Option::is_none")] - pub pretty_print: Option<bool>, - /// API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - #[serde(rename = "key")] - #[serde(skip_serializing_if = "Option::is_none")] - pub key: Option<String>, - /// V1 error format. - #[serde(rename = "$.xgafv")] - #[serde(skip_serializing_if = "Option::is_none")] - pub dollar_xgafv: Option<YoutubeParamsdollar_xgafv>, - /// Legacy upload protocol for media (e.g. "media", "multipart"). - #[serde(rename = "uploadType")] - #[serde(skip_serializing_if = "Option::is_none")] - pub upload_type: Option<String>, - /// Selector specifying which fields to include in a partial response. - #[serde(rename = "fields")] - #[serde(skip_serializing_if = "Option::is_none")] - pub fields: Option<String>, - /// OAuth 2.0 token for the current user. - #[serde(rename = "oauth_token")] - #[serde(skip_serializing_if = "Option::is_none")] - pub oauth_token: Option<String>, -} - #[derive(Debug, Clone, Copy, Serialize, Deserialize)] pub enum SubscriptionContentDetailsActivityType { Undefined, @@ -10889,66 +10840,6 @@ } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -pub enum YoutubeParamsAlt { - Undefined, - /// Responses with Content-Type of application/json - #[serde(rename = "json")] - Json, - /// Media download with context-dependent Content-Type - #[serde(rename = "media")] - Media, - /// Responses with Content-Type of application/x-protobuf - #[serde(rename = "proto")] - Proto, -} - -impl std::default::Default for YoutubeParamsAlt { - fn default() -> YoutubeParamsAlt { - YoutubeParamsAlt::Undefined - } -} - -impl std::fmt::Display for YoutubeParamsAlt { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let s = match self { - YoutubeParamsAlt::Undefined => write!(f, "undefined"), - YoutubeParamsAlt::Json => write!(f, "json"), - YoutubeParamsAlt::Media => write!(f, "media"), - YoutubeParamsAlt::Proto => write!(f, "proto"), - }; - Ok(()) - } -} - -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] -pub enum YoutubeParamsdollar_xgafv { - Undefined, - /// v1 error format - #[serde(rename = "1")] - _1, - /// v2 error format - #[serde(rename = "2")] - _2, -} - -impl std::default::Default for YoutubeParamsdollar_xgafv { - fn default() -> YoutubeParamsdollar_xgafv { - YoutubeParamsdollar_xgafv::Undefined - } -} - -impl std::fmt::Display for YoutubeParamsdollar_xgafv { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let s = match self { - YoutubeParamsdollar_xgafv::Undefined => write!(f, "undefined"), - YoutubeParamsdollar_xgafv::_1 => write!(f, "1"), - YoutubeParamsdollar_xgafv::_2 => write!(f, "2"), - }; - Ok(()) - } -} - -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] pub enum CommentsListTextFormat { Undefined, /// @@ -11920,6 +11811,66 @@ } } +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub enum YoutubeParamsAlt { + Undefined, + /// Responses with Content-Type of application/json + #[serde(rename = "json")] + Json, + /// Media download with context-dependent Content-Type + #[serde(rename = "media")] + Media, + /// Responses with Content-Type of application/x-protobuf + #[serde(rename = "proto")] + Proto, +} + +impl std::default::Default for YoutubeParamsAlt { + fn default() -> YoutubeParamsAlt { + YoutubeParamsAlt::Undefined + } +} + +impl std::fmt::Display for YoutubeParamsAlt { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let s = match self { + YoutubeParamsAlt::Undefined => write!(f, "undefined"), + YoutubeParamsAlt::Json => write!(f, "json"), + YoutubeParamsAlt::Media => write!(f, "media"), + YoutubeParamsAlt::Proto => write!(f, "proto"), + }; + Ok(()) + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub enum YoutubeParamsdollar_xgafv { + Undefined, + /// v1 error format + #[serde(rename = "1")] + _1, + /// v2 error format + #[serde(rename = "2")] + _2, +} + +impl std::default::Default for YoutubeParamsdollar_xgafv { + fn default() -> YoutubeParamsdollar_xgafv { + YoutubeParamsdollar_xgafv::Undefined + } +} + +impl std::fmt::Display for YoutubeParamsdollar_xgafv { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let s = match self { + YoutubeParamsdollar_xgafv::Undefined => write!(f, "undefined"), + YoutubeParamsdollar_xgafv::_1 => write!(f, "1"), + YoutubeParamsdollar_xgafv::_2 => write!(f, "2"), + }; + Ok(()) + } +} + /// Parameters for the `comments.list` method. #[derive(Serialize, Deserialize, Debug, Clone, Default)] pub struct CommentsListParams { @@ -15758,6 +15709,55 @@ } } +/// +#[derive(Serialize, Deserialize, Debug, Clone, Default)] +pub struct YoutubeParams { + /// JSONP + #[serde(rename = "callback")] + #[serde(skip_serializing_if = "Option::is_none")] + pub callback: Option<String>, + /// OAuth access token. + #[serde(rename = "access_token")] + #[serde(skip_serializing_if = "Option::is_none")] + pub access_token: Option<String>, + /// Data format for response. + #[serde(rename = "alt")] + #[serde(skip_serializing_if = "Option::is_none")] + pub alt: Option<YoutubeParamsAlt>, + /// Upload protocol for media (e.g. "raw", "multipart"). + #[serde(rename = "upload_protocol")] + #[serde(skip_serializing_if = "Option::is_none")] + pub upload_protocol: Option<String>, + /// Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + #[serde(rename = "quotaUser")] + #[serde(skip_serializing_if = "Option::is_none")] + pub quota_user: Option<String>, + /// Returns response with indentations and line breaks. + #[serde(rename = "prettyPrint")] + #[serde(skip_serializing_if = "Option::is_none")] + pub pretty_print: Option<bool>, + /// API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + #[serde(rename = "key")] + #[serde(skip_serializing_if = "Option::is_none")] + pub key: Option<String>, + /// V1 error format. + #[serde(rename = "$.xgafv")] + #[serde(skip_serializing_if = "Option::is_none")] + pub dollar_xgafv: Option<YoutubeParamsdollar_xgafv>, + /// Legacy upload protocol for media (e.g. "media", "multipart"). + #[serde(rename = "uploadType")] + #[serde(skip_serializing_if = "Option::is_none")] + pub upload_type: Option<String>, + /// Selector specifying which fields to include in a partial response. + #[serde(rename = "fields")] + #[serde(skip_serializing_if = "Option::is_none")] + pub fields: Option<String>, + /// OAuth 2.0 token for the current user. + #[serde(rename = "oauth_token")] + #[serde(skip_serializing_if = "Option::is_none")] + pub oauth_token: Option<String>, +} + impl std::fmt::Display for YoutubeParams { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { if let Some(ref v) = self.callback {