regenerate everything

This commit is contained in:
Sebastian Thiel
2021-04-14 10:10:59 +08:00
parent 65f9c22094
commit 34096d3862
2792 changed files with 149735 additions and 162953 deletions

View File

@@ -4,10 +4,10 @@
[package]
name = "google-monitoring3-cli"
version = "2.0.0+20210322"
version = "2.0.3+20210322"
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
description = "A complete library to interact with Monitoring (protocol v3)"
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3-cli"
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/monitoring3-cli"
homepage = "https://cloud.google.com/monitoring/api/"
documentation = "http://byron.github.io/google-apis-rs/google_monitoring3_cli"
license = "MIT"
@@ -37,4 +37,4 @@ tokio = { version = "^ 1.0", features = ["full"] }
[dependencies.google-monitoring3]
path = "../monitoring3"
version = "2.0.0+20210322"
version = "2.0.3+20210322"

View File

@@ -21,11 +21,11 @@ Install the command-line interface with cargo using:
cargo install google-monitoring3-cli
```
Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3-cli).
Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/monitoring3-cli).
# Usage
This documentation was generated from the *Monitoring* API at revision *20210322*. The CLI is at version *2.0.0*.
This documentation was generated from the *Monitoring* API at revision *20210322*. The CLI is at version *2.0.3*.
```bash
monitoring3 [options]

View File

@@ -1,8 +1,8 @@
site_name: Monitoring v2.0.0+20210322
site_name: Monitoring v2.0.3+20210322
site_url: http://byron.github.io/google-apis-rs/google-monitoring3-cli
site_description: A complete library to interact with Monitoring (protocol v3)
repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3-cli
repo_url: https://github.com/Byron/google-apis-rs/tree/main/gen/monitoring3-cli
docs_dir: docs
site_dir: build_html

View File

@@ -5,7 +5,6 @@ use mime::Mime;
use oauth2::{ApplicationSecret, ConsoleApplicationSecret};
use serde_json as json;
use serde_json::value::Value;
use strsim;
use std::env;
use std::error::Error as StdError;
@@ -143,7 +142,7 @@ impl From<&'static str> for FieldCursor {
}
}
fn assure_entry<'a, 'b>(m: &'a mut json::Map<String, Value>, k: &'b String) -> &'a mut Value {
fn assure_entry<'a>(m: &'a mut json::Map<String, Value>, k: &str) -> &'a mut Value {
if m.contains_key(k) {
return m.get_mut(k).expect("value to exist");
}
@@ -153,7 +152,7 @@ fn assure_entry<'a, 'b>(m: &'a mut json::Map<String, Value>, k: &'b String) -> &
impl FieldCursor {
pub fn set(&mut self, value: &str) -> Result<(), CLIError> {
if value.len() == 0 {
if value.is_empty() {
return Err(CLIError::Field(FieldError::Empty));
}
@@ -166,7 +165,7 @@ impl FieldCursor {
let mut fields = self.0.clone();
let push_field = |fs: &mut Vec<String>, f: &mut String| {
if f.len() > 0 {
if !f.is_empty() {
fs.push(f.clone());
f.truncate(0);
}
@@ -189,10 +188,8 @@ impl FieldCursor {
}
} else {
num_conscutive_field_seps = 0;
if cid == 1 {
if first_is_field_sep {
fields.truncate(0);
}
if cid == 1 && first_is_field_sep {
fields.truncate(0);
}
field.push(c);
}
@@ -216,7 +213,7 @@ impl FieldCursor {
}
pub fn did_you_mean(value: &str, possible_values: &[&str]) -> Option<String> {
if value.len() == 0 {
if value.is_empty() {
return None;
}
@@ -226,7 +223,7 @@ impl FieldCursor {
let mut output = String::new();
let push_field = |fs: &mut String, f: &mut String| {
if f.len() > 0 {
if !f.is_empty() {
fs.push_str(match did_you_mean(&f, possible_values) {
Some(candidate) => candidate,
None => &f,
@@ -250,7 +247,7 @@ impl FieldCursor {
push_field(&mut output, &mut field);
if &output == value {
if output == value {
None
} else {
Some(output)
@@ -265,7 +262,7 @@ impl FieldCursor {
err: &mut InvalidOptionsError,
orig_cursor: &FieldCursor,
) {
assert!(self.0.len() > 0);
assert!(!self.0.is_empty());
for field in &self.0[..self.0.len() - 1] {
let tmp = object;
@@ -355,7 +352,7 @@ pub fn parse_kv_arg<'a>(
match kv.find('=') {
None => {
add_err();
return (kv, None);
(kv, None)
}
Some(pos) => {
let key = &kv[..pos];
@@ -600,7 +597,7 @@ impl fmt::Display for CLIError {
Some(v) => format!(" Did you mean '{}' ?", v),
None => String::new(),
};
write!(f, "Parameter '{}' is unknown.{}\n", param_name, suffix)
writeln!(f, "Parameter '{}' is unknown.{}", param_name, suffix)
}
CLIError::InvalidKeyValueSyntax(ref kv, is_hashmap) => {
let hashmap_info = if is_hashmap { "hashmap " } else { "" };
@@ -639,7 +636,7 @@ impl InvalidOptionsError {
pub fn single(err: CLIError, exit_code: i32) -> InvalidOptionsError {
InvalidOptionsError {
issues: vec![err],
exit_code: exit_code,
exit_code,
}
}
@@ -653,12 +650,15 @@ impl InvalidOptionsError {
pub fn assure_config_dir_exists(dir: &str) -> Result<String, CLIError> {
let trdir = dir.trim();
if trdir.len() == 0 {
if trdir.is_empty() {
return Err(CLIError::Configuration(ConfigurationError::DirectoryUnset));
}
let expanded_config_dir = if trdir.as_bytes()[0] == b'~' {
match env::var("HOME").ok().or(env::var("UserProfile").ok()) {
match env::var("HOME")
.ok()
.or_else(|| env::var("UserProfile").ok())
{
None => {
return Err(CLIError::Configuration(
ConfigurationError::HomeExpansionFailed(trdir.to_string()),

View File

@@ -34,8 +34,7 @@ enum DoitError {
struct Engine<'n> {
opt: ArgMatches<'n>,
hub: api::Monitoring<hyper::Client<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>, hyper::body::Body>
>,
hub: api::Monitoring,
gp: Vec<&'static str>,
gpm: Vec<(&'static str, &'static str)>,
}
@@ -5194,7 +5193,7 @@ async fn main() {
let mut app = App::new("monitoring3")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("2.0.0+20210322")
.version("2.0.3+20210322")
.about("Manages your Cloud Monitoring data and configurations. Most projects must be associated with a Workspace, with a few exceptions as noted on the individual method pages. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the Cloud Monitoring documentation.")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_monitoring3_cli")
.arg(Arg::with_name("url")