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-recommendationengine1_beta1-cli"
version = "2.0.0+20210319"
version = "2.0.3+20210319"
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
description = "A complete library to interact with Recommendations AI (protocol v1beta1)"
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/recommendationengine1_beta1-cli"
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/recommendationengine1_beta1-cli"
homepage = "https://cloud.google.com/recommendations-ai/docs"
documentation = "http://byron.github.io/google-apis-rs/google_recommendationengine1_beta1_cli"
license = "MIT"
@@ -37,4 +37,4 @@ tokio = { version = "^ 1.0", features = ["full"] }
[dependencies.google-recommendationengine1_beta1]
path = "../recommendationengine1_beta1"
version = "2.0.0+20210319"
version = "2.0.3+20210319"

View File

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

View File

@@ -1,8 +1,8 @@
site_name: Recommendations AI v2.0.0+20210319
site_name: Recommendations AI v2.0.3+20210319
site_url: http://byron.github.io/google-apis-rs/google-recommendationengine1_beta1-cli
site_description: A complete library to interact with Recommendations AI (protocol v1beta1)
repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/recommendationengine1_beta1-cli
repo_url: https://github.com/Byron/google-apis-rs/tree/main/gen/recommendationengine1_beta1-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::RecommendationsAI<hyper::Client<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>, hyper::body::Body>
>,
hub: api::RecommendationsAI,
gp: Vec<&'static str>,
gpm: Vec<(&'static str, &'static str)>,
}
@@ -2384,7 +2383,7 @@ async fn main() {
let mut app = App::new("recommendationengine1-beta1")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("2.0.0+20210319")
.version("2.0.3+20210319")
.about("Note that we now highly recommend new customers to use Retail API, which incorporates the GA version of the Recommendations AI funtionalities. To enable Retail API, please visit https://console.cloud.google.com/apis/library/retail.googleapis.com. The Recommendations AI service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_recommendationengine1_beta1_cli")
.arg(Arg::with_name("url")