mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
chore(code-update): to latest schema version
This commit is contained in:
@@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage {
|
||||
Err(err) =>
|
||||
match err.kind() {
|
||||
io::ErrorKind::NotFound => Ok(()),
|
||||
_ => Err(json::Error::Io(err))
|
||||
_ => Err(json::Error::IoError(err))
|
||||
},
|
||||
Ok(_) => Ok(()),
|
||||
}
|
||||
@@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage {
|
||||
Err(serde_err) => Err(serde_err),
|
||||
}
|
||||
},
|
||||
Err(io_err) => Err(json::Error::Io(io_err))
|
||||
Err(io_err) => Err(json::Error::IoError(io_err))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage {
|
||||
Err(io_err) => {
|
||||
match io_err.kind() {
|
||||
io::ErrorKind::NotFound => Ok(None),
|
||||
_ => Err(json::Error::Io(io_err))
|
||||
_ => Err(json::Error::IoError(io_err))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str,
|
||||
= json::from_str(json_console_secret).unwrap();
|
||||
match json::to_writer_pretty(&mut f, &console_secret) {
|
||||
Err(serde_err) => match serde_err {
|
||||
json::Error::Io(err) => err,
|
||||
json::Error::IoError(err) => err,
|
||||
_ => panic!("Unexpected serde error: {:#?}", serde_err)
|
||||
},
|
||||
Ok(_) => continue,
|
||||
@@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str,
|
||||
},
|
||||
Ok(f) => {
|
||||
match json::de::from_reader::<_, ConsoleApplicationSecret>(f) {
|
||||
Err(json::Error::Io(err)) =>
|
||||
Err(json::Error::IoError(err)) =>
|
||||
return secret_io_error(err),
|
||||
Err(json_err) =>
|
||||
return Err(CLIError::Configuration(
|
||||
|
||||
@@ -139,6 +139,7 @@ impl<'n> Engine<'n> {
|
||||
"who-can-contact-owner" => Some(("whoCanContactOwner", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"message-display-font" => Some(("messageDisplayFont", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-leave-group" => Some(("whoCanLeaveGroup", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-add" => Some(("whoCanAdd", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-join" => Some(("whoCanJoin", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-invite" => Some(("whoCanInvite", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -149,7 +150,7 @@ impl<'n> Engine<'n> {
|
||||
"max-message-bytes" => Some(("maxMessageBytes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"allow-google-communication" => Some(("allowGoogleCommunication", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-add", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -251,6 +252,7 @@ impl<'n> Engine<'n> {
|
||||
"who-can-contact-owner" => Some(("whoCanContactOwner", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"message-display-font" => Some(("messageDisplayFont", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-leave-group" => Some(("whoCanLeaveGroup", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-add" => Some(("whoCanAdd", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-join" => Some(("whoCanJoin", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"who-can-invite" => Some(("whoCanInvite", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -261,7 +263,7 @@ impl<'n> Engine<'n> {
|
||||
"max-message-bytes" => Some(("maxMessageBytes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"allow-google-communication" => Some(("allowGoogleCommunication", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-add", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -510,7 +512,7 @@ fn main() {
|
||||
|
||||
let mut app = App::new("groupssettings1")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("0.3.3+20140428")
|
||||
.version("0.3.4+20160323")
|
||||
.about("Lets you manage permission levels and related settings of a group.")
|
||||
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_groupssettings1_cli")
|
||||
.arg(Arg::with_name("url")
|
||||
|
||||
Reference in New Issue
Block a user