chore(code): updated to latest state

This commit is contained in:
Sebastian Thiel
2016-01-30 14:08:25 +01:00
parent 5cba22f0c6
commit 75076acf16
1164 changed files with 241839 additions and 123033 deletions

View File

@@ -20,7 +20,7 @@ use clap::{App, SubCommand, Arg};
mod cmn;
use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, arg_from_str, writer_from_opts, parse_kv_arg,
use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, arg_from_str, writer_from_opts, parse_kv_arg,
input_file_from_opts, input_mime_from_opts, FieldCursor, FieldError, CallType, UploadProtocol,
calltype_from_str, remove_json_null_values, ComplexType, JsonType, JsonTypeInfo};
@@ -36,19 +36,19 @@ enum DoitError {
ApiError(api::Error),
}
struct Engine<'n, 'a> {
opt: ArgMatches<'n, 'a>,
struct Engine<'n> {
opt: ArgMatches<'n>,
hub: api::AutoscalerHub<hyper::Client, Authenticator<DefaultAuthenticatorDelegate, JsonTokenStorage, hyper::Client>>,
gp: Vec<&'static str>,
gpm: Vec<(&'static str, &'static str)>,
}
impl<'n, 'a> Engine<'n, 'a> {
fn _autoscalers_delete(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
impl<'n> Engine<'n> {
fn _autoscalers_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.autoscalers().delete(opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("autoscaler").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
@@ -61,7 +61,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
@@ -74,7 +74,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -97,10 +97,10 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _autoscalers_get(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _autoscalers_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.autoscalers().get(opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("autoscaler").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
@@ -113,7 +113,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
@@ -126,7 +126,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -149,13 +149,13 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _autoscalers_insert(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _autoscalers_insert(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut field_cursor = FieldCursor::default();
let mut object = json::value::Value::Object(Default::default());
for kvarg in opt.values_of("kv").unwrap_or(Vec::new()).iter() {
for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let last_errc = err.issues.len();
let (key, value) = parse_kv_arg(&*kvarg, err, false);
let mut temp_cursor = field_cursor.clone();
@@ -169,8 +169,8 @@ impl<'n, 'a> Engine<'n, 'a> {
}
continue;
}
let type_info: Option<(&'static str, JsonTypeInfo)> =
let type_info: Option<(&'static str, JsonTypeInfo)> =
match &temp_cursor.to_string()[..] {
"kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
"description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
@@ -196,7 +196,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
let mut request: api::Autoscaler = json::value::from_value(object).unwrap();
let mut call = self.hub.autoscalers().insert(request, opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
@@ -209,7 +209,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
@@ -222,7 +222,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -245,10 +245,10 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _autoscalers_list(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _autoscalers_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.autoscalers().list(opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"page-token" => {
@@ -270,7 +270,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["filter", "page-token", "max-results"].iter().map(|v|*v));
@@ -284,7 +284,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -307,13 +307,13 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _autoscalers_patch(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _autoscalers_patch(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut field_cursor = FieldCursor::default();
let mut object = json::value::Value::Object(Default::default());
for kvarg in opt.values_of("kv").unwrap_or(Vec::new()).iter() {
for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let last_errc = err.issues.len();
let (key, value) = parse_kv_arg(&*kvarg, err, false);
let mut temp_cursor = field_cursor.clone();
@@ -327,8 +327,8 @@ impl<'n, 'a> Engine<'n, 'a> {
}
continue;
}
let type_info: Option<(&'static str, JsonTypeInfo)> =
let type_info: Option<(&'static str, JsonTypeInfo)> =
match &temp_cursor.to_string()[..] {
"kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
"description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
@@ -354,7 +354,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
let mut request: api::Autoscaler = json::value::from_value(object).unwrap();
let mut call = self.hub.autoscalers().patch(request, opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("autoscaler").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
@@ -367,7 +367,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
@@ -380,7 +380,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -403,13 +403,13 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _autoscalers_update(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _autoscalers_update(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut field_cursor = FieldCursor::default();
let mut object = json::value::Value::Object(Default::default());
for kvarg in opt.values_of("kv").unwrap_or(Vec::new()).iter() {
for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let last_errc = err.issues.len();
let (key, value) = parse_kv_arg(&*kvarg, err, false);
let mut temp_cursor = field_cursor.clone();
@@ -423,8 +423,8 @@ impl<'n, 'a> Engine<'n, 'a> {
}
continue;
}
let type_info: Option<(&'static str, JsonTypeInfo)> =
let type_info: Option<(&'static str, JsonTypeInfo)> =
match &temp_cursor.to_string()[..] {
"kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
"description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
@@ -450,7 +450,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
let mut request: api::Autoscaler = json::value::from_value(object).unwrap();
let mut call = self.hub.autoscalers().update(request, opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("autoscaler").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
@@ -463,7 +463,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
@@ -476,7 +476,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -499,10 +499,10 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _zone_operations_delete(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _zone_operations_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.zone_operations().delete(opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("operation").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
@@ -515,7 +515,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
@@ -528,7 +528,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
match match protocol {
@@ -543,10 +543,10 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _zone_operations_get(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _zone_operations_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.zone_operations().get(opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("operation").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
@@ -559,7 +559,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
@@ -572,7 +572,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -595,10 +595,10 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _zone_operations_list(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _zone_operations_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.zone_operations().list(opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"page-token" => {
@@ -620,7 +620,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["filter", "page-token", "max-results"].iter().map(|v|*v));
@@ -634,7 +634,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -657,10 +657,10 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
fn _zones_list(&self, opt: &ArgMatches<'n, 'a>, dry_run: bool, err: &mut InvalidOptionsError)
fn _zones_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.zones().list(opt.value_of("project").unwrap_or(""));
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"page-token" => {
@@ -682,7 +682,7 @@ impl<'n, 'a> Engine<'n, 'a> {
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["filter", "page-token", "max-results"].iter().map(|v|*v));
@@ -696,7 +696,7 @@ impl<'n, 'a> Engine<'n, 'a> {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").unwrap_or(Vec::new()).iter() {
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
@@ -795,14 +795,14 @@ impl<'n, 'a> Engine<'n, 'a> {
}
// Please note that this call will fail if any part of the opt can't be handled
fn new(opt: ArgMatches<'a, 'n>) -> Result<Engine<'a, 'n>, InvalidOptionsError> {
fn new(opt: ArgMatches<'n>) -> Result<Engine<'n>, InvalidOptionsError> {
let (config_dir, secret) = {
let config_dir = match cmn::assure_config_dir_exists(opt.value_of("folder").unwrap_or("~/.google-service-cli")) {
Err(e) => return Err(InvalidOptionsError::single(e, 3)),
Ok(p) => p,
};
match cmn::application_secret_from_directory(&config_dir, "autoscaler1-beta2-secret.json",
match cmn::application_secret_from_directory(&config_dir, "autoscaler1-beta2-secret.json",
"{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"hCsslbCUyfehWMmbkG8vTYxG\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"620010449518-9ngf7o4dhs0dka470npqvor6dc5lqb9b.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}") {
Ok(secret) => (config_dir, secret),
Err(e) => return Err(InvalidOptionsError::single(e, 4))
@@ -822,7 +822,7 @@ impl<'n, 'a> Engine<'n, 'a> {
db_dir: config_dir.clone(),
}, None);
let client =
let client =
if opt.is_present("debug") {
hyper::Client::with_connector(mock::TeeConnector {
connector: hyper::net::HttpsConnector::<hyper::net::Openssl>::default()
@@ -861,7 +861,7 @@ fn main() {
let mut exit_status = 0i32;
let arg_data = [
("autoscalers", "methods: 'delete', 'get', 'insert', 'list', 'patch' and 'update'", vec![
("delete",
("delete",
Some(r##"Deletes the specified Autoscaler resource."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/autoscalers_delete",
vec![
@@ -895,7 +895,7 @@ fn main() {
Some(false),
Some(false)),
]),
("get",
("get",
Some(r##"Gets the specified Autoscaler resource."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/autoscalers_get",
vec![
@@ -929,7 +929,7 @@ fn main() {
Some(false),
Some(false)),
]),
("insert",
("insert",
Some(r##"Adds new Autoscaler resource."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/autoscalers_insert",
vec![
@@ -963,7 +963,7 @@ fn main() {
Some(false),
Some(false)),
]),
("list",
("list",
Some(r##"Lists all Autoscaler resources in this zone."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/autoscalers_list",
vec![
@@ -991,7 +991,7 @@ fn main() {
Some(false),
Some(false)),
]),
("patch",
("patch",
Some(r##"Update the entire content of the Autoscaler resource. This method supports patch semantics."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/autoscalers_patch",
vec![
@@ -1031,7 +1031,7 @@ fn main() {
Some(false),
Some(false)),
]),
("update",
("update",
Some(r##"Update the entire content of the Autoscaler resource."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/autoscalers_update",
vec![
@@ -1074,7 +1074,7 @@ fn main() {
]),
("zone-operations", "methods: 'delete', 'get' and 'list'", vec![
("delete",
("delete",
Some(r##"Deletes the specified zone-specific operation resource."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/zone-operations_delete",
vec![
@@ -1102,7 +1102,7 @@ fn main() {
Some(false),
Some(true)),
]),
("get",
("get",
Some(r##"Retrieves the specified zone-specific operation resource."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/zone-operations_get",
vec![
@@ -1136,7 +1136,7 @@ fn main() {
Some(false),
Some(false)),
]),
("list",
("list",
Some(r##"Retrieves the list of operation resources contained within the specified zone."##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/zone-operations_list",
vec![
@@ -1167,7 +1167,7 @@ fn main() {
]),
("zones", "methods: 'list'", vec![
("list",
("list",
Some(r##""##),
"Details at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli/zones_list",
vec![
@@ -1195,7 +1195,7 @@ fn main() {
let mut app = App::new("autoscaler1-beta2")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("0.3.2+20150629")
.version("0.3.3+20150629")
.about("The Google Compute Engine Autoscaler API provides autoscaling for groups of Cloud VMs.")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli")
.arg(Arg::with_name("url")
@@ -1219,7 +1219,7 @@ fn main() {
.multiple(false)
.takes_value(false));
for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
for &(main_command_name, about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::with_name(main_command_name).about(about);
for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
@@ -1230,7 +1230,7 @@ fn main() {
scmd = scmd.after_help(url_info);
for &(ref arg_name, ref flag, ref desc, ref required, ref multi) in args {
let arg_name_str =
let arg_name_str =
match (arg_name, flag) {
(&Some(an), _ ) => an,
(_ , &Some(f)) => f,