mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
regen all APIs
This commit is contained in:
@@ -50,6 +50,429 @@ where
|
||||
S::Future: Send + Unpin + 'static,
|
||||
S::Error: Into<Box<dyn StdError + Send + Sync>>,
|
||||
{
|
||||
async fn _projects_locations_clusters_create(&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").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();
|
||||
if let Err(field_err) = temp_cursor.set(&*key) {
|
||||
err.issues.push(field_err);
|
||||
}
|
||||
if value.is_none() {
|
||||
field_cursor = temp_cursor.clone();
|
||||
if err.issues.len() > last_errc {
|
||||
err.issues.remove(last_errc);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let type_info: Option<(&'static str, JsonTypeInfo)> =
|
||||
match &temp_cursor.to_string()[..] {
|
||||
"authorization-mode" => Some(("authorizationMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"replica-count" => Some(("replicaCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"shard-count" => Some(("shardCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"size-gb" => Some(("sizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"state-info.update-info.target-replica-count" => Some(("stateInfo.updateInfo.targetReplicaCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"state-info.update-info.target-shard-count" => Some(("stateInfo.updateInfo.targetShardCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"transit-encryption-mode" => Some(("transitEncryptionMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"uid" => Some(("uid", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["authorization-mode", "create-time", "name", "replica-count", "shard-count", "size-gb", "state", "state-info", "target-replica-count", "target-shard-count", "transit-encryption-mode", "uid", "update-info"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
};
|
||||
if let Some((field_cursor_str, type_info)) = type_info {
|
||||
FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor);
|
||||
}
|
||||
}
|
||||
let mut request: api::Cluster = json::value::from_value(object).unwrap();
|
||||
let mut call = self.hub.projects().locations_clusters_create(request, opt.value_of("parent").unwrap_or(""));
|
||||
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 {
|
||||
"request-id" => {
|
||||
call = call.request_id(value.unwrap_or(""));
|
||||
},
|
||||
"cluster-id" => {
|
||||
call = call.cluster_id(value.unwrap_or(""));
|
||||
},
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v.extend(["cluster-id", "request-id"].iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
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")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit().await,
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn _projects_locations_clusters_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().locations_clusters_delete(opt.value_of("name").unwrap_or(""));
|
||||
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 {
|
||||
"request-id" => {
|
||||
call = call.request_id(value.unwrap_or(""));
|
||||
},
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v.extend(["request-id"].iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
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")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit().await,
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn _projects_locations_clusters_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().locations_clusters_get(opt.value_of("name").unwrap_or(""));
|
||||
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 {
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
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")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit().await,
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn _projects_locations_clusters_get_certificate_authority(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().locations_clusters_get_certificate_authority(opt.value_of("name").unwrap_or(""));
|
||||
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 {
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
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")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit().await,
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn _projects_locations_clusters_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().locations_clusters_list(opt.value_of("parent").unwrap_or(""));
|
||||
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" => {
|
||||
call = call.page_token(value.unwrap_or(""));
|
||||
},
|
||||
"page-size" => {
|
||||
call = call.page_size( value.map(|v| arg_from_str(v, err, "page-size", "int32")).unwrap_or(-0));
|
||||
},
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v.extend(["page-size", "page-token"].iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
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")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit().await,
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn _projects_locations_clusters_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").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();
|
||||
if let Err(field_err) = temp_cursor.set(&*key) {
|
||||
err.issues.push(field_err);
|
||||
}
|
||||
if value.is_none() {
|
||||
field_cursor = temp_cursor.clone();
|
||||
if err.issues.len() > last_errc {
|
||||
err.issues.remove(last_errc);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let type_info: Option<(&'static str, JsonTypeInfo)> =
|
||||
match &temp_cursor.to_string()[..] {
|
||||
"authorization-mode" => Some(("authorizationMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"replica-count" => Some(("replicaCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"shard-count" => Some(("shardCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"size-gb" => Some(("sizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"state-info.update-info.target-replica-count" => Some(("stateInfo.updateInfo.targetReplicaCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"state-info.update-info.target-shard-count" => Some(("stateInfo.updateInfo.targetShardCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"transit-encryption-mode" => Some(("transitEncryptionMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"uid" => Some(("uid", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["authorization-mode", "create-time", "name", "replica-count", "shard-count", "size-gb", "state", "state-info", "target-replica-count", "target-shard-count", "transit-encryption-mode", "uid", "update-info"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
};
|
||||
if let Some((field_cursor_str, type_info)) = type_info {
|
||||
FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor);
|
||||
}
|
||||
}
|
||||
let mut request: api::Cluster = json::value::from_value(object).unwrap();
|
||||
let mut call = self.hub.projects().locations_clusters_patch(request, opt.value_of("name").unwrap_or(""));
|
||||
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 {
|
||||
"update-mask" => {
|
||||
call = call.update_mask( value.map(|v| arg_from_str(v, err, "update-mask", "google-fieldmask")).unwrap_or(FieldMask::default()));
|
||||
},
|
||||
"request-id" => {
|
||||
call = call.request_id(value.unwrap_or(""));
|
||||
},
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v.extend(["request-id", "update-mask"].iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
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")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit().await,
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn _projects_locations_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().locations_get(opt.value_of("name").unwrap_or(""));
|
||||
@@ -128,6 +551,7 @@ where
|
||||
"alternative-location-id" => Some(("alternativeLocationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"auth-enabled" => Some(("authEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })),
|
||||
"authorized-network" => Some(("authorizedNetwork", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"available-maintenance-versions" => Some(("availableMaintenanceVersions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })),
|
||||
"connect-mode" => Some(("connectMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"current-location-id" => Some(("currentLocationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -143,6 +567,7 @@ where
|
||||
"maintenance-schedule.end-time" => Some(("maintenanceSchedule.endTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"maintenance-schedule.schedule-deadline-time" => Some(("maintenanceSchedule.scheduleDeadlineTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"maintenance-schedule.start-time" => Some(("maintenanceSchedule.startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"maintenance-version" => Some(("maintenanceVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"memory-size-gb" => Some(("memorySizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"persistence-config.persistence-mode" => Some(("persistenceConfig.persistenceMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -158,6 +583,8 @@ where
|
||||
"redis-version" => Some(("redisVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"replica-count" => Some(("replicaCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"reserved-ip-range" => Some(("reservedIpRange", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"satisfies-pzi" => Some(("satisfiesPzi", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })),
|
||||
"satisfies-pzs" => Some(("satisfiesPzs", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })),
|
||||
"secondary-ip-range" => Some(("secondaryIpRange", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"status-message" => Some(("statusMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -165,7 +592,7 @@ where
|
||||
"tier" => Some(("tier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"transit-encryption-mode" => Some(("transitEncryptionMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["alternative-location-id", "auth-enabled", "authorized-network", "can-reschedule", "connect-mode", "create-time", "current-location-id", "customer-managed-key", "description", "display-name", "end-time", "host", "labels", "location-id", "maintenance-policy", "maintenance-schedule", "memory-size-gb", "name", "persistence-config", "persistence-iam-identity", "persistence-mode", "port", "rdb-next-snapshot-time", "rdb-snapshot-period", "rdb-snapshot-start-time", "read-endpoint", "read-endpoint-port", "read-replicas-mode", "redis-configs", "redis-version", "replica-count", "reserved-ip-range", "schedule-deadline-time", "secondary-ip-range", "start-time", "state", "status-message", "suspension-reasons", "tier", "transit-encryption-mode", "update-time"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["alternative-location-id", "auth-enabled", "authorized-network", "available-maintenance-versions", "can-reschedule", "connect-mode", "create-time", "current-location-id", "customer-managed-key", "description", "display-name", "end-time", "host", "labels", "location-id", "maintenance-policy", "maintenance-schedule", "maintenance-version", "memory-size-gb", "name", "persistence-config", "persistence-iam-identity", "persistence-mode", "port", "rdb-next-snapshot-time", "rdb-snapshot-period", "rdb-snapshot-start-time", "read-endpoint", "read-endpoint-port", "read-replicas-mode", "redis-configs", "redis-version", "replica-count", "reserved-ip-range", "satisfies-pzi", "satisfies-pzs", "schedule-deadline-time", "secondary-ip-range", "start-time", "state", "status-message", "suspension-reasons", "tier", "transit-encryption-mode", "update-time"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -725,6 +1152,7 @@ where
|
||||
"alternative-location-id" => Some(("alternativeLocationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"auth-enabled" => Some(("authEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })),
|
||||
"authorized-network" => Some(("authorizedNetwork", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"available-maintenance-versions" => Some(("availableMaintenanceVersions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })),
|
||||
"connect-mode" => Some(("connectMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"current-location-id" => Some(("currentLocationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -740,6 +1168,7 @@ where
|
||||
"maintenance-schedule.end-time" => Some(("maintenanceSchedule.endTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"maintenance-schedule.schedule-deadline-time" => Some(("maintenanceSchedule.scheduleDeadlineTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"maintenance-schedule.start-time" => Some(("maintenanceSchedule.startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"maintenance-version" => Some(("maintenanceVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"memory-size-gb" => Some(("memorySizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"persistence-config.persistence-mode" => Some(("persistenceConfig.persistenceMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -755,6 +1184,8 @@ where
|
||||
"redis-version" => Some(("redisVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"replica-count" => Some(("replicaCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"reserved-ip-range" => Some(("reservedIpRange", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"satisfies-pzi" => Some(("satisfiesPzi", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })),
|
||||
"satisfies-pzs" => Some(("satisfiesPzs", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })),
|
||||
"secondary-ip-range" => Some(("secondaryIpRange", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"status-message" => Some(("statusMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -762,7 +1193,7 @@ where
|
||||
"tier" => Some(("tier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"transit-encryption-mode" => Some(("transitEncryptionMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["alternative-location-id", "auth-enabled", "authorized-network", "can-reschedule", "connect-mode", "create-time", "current-location-id", "customer-managed-key", "description", "display-name", "end-time", "host", "labels", "location-id", "maintenance-policy", "maintenance-schedule", "memory-size-gb", "name", "persistence-config", "persistence-iam-identity", "persistence-mode", "port", "rdb-next-snapshot-time", "rdb-snapshot-period", "rdb-snapshot-start-time", "read-endpoint", "read-endpoint-port", "read-replicas-mode", "redis-configs", "redis-version", "replica-count", "reserved-ip-range", "schedule-deadline-time", "secondary-ip-range", "start-time", "state", "status-message", "suspension-reasons", "tier", "transit-encryption-mode", "update-time"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["alternative-location-id", "auth-enabled", "authorized-network", "available-maintenance-versions", "can-reschedule", "connect-mode", "create-time", "current-location-id", "customer-managed-key", "description", "display-name", "end-time", "host", "labels", "location-id", "maintenance-policy", "maintenance-schedule", "maintenance-version", "memory-size-gb", "name", "persistence-config", "persistence-iam-identity", "persistence-mode", "port", "rdb-next-snapshot-time", "rdb-snapshot-period", "rdb-snapshot-start-time", "read-endpoint", "read-endpoint-port", "read-replicas-mode", "redis-configs", "redis-version", "replica-count", "reserved-ip-range", "satisfies-pzi", "satisfies-pzs", "schedule-deadline-time", "secondary-ip-range", "start-time", "state", "status-message", "suspension-reasons", "tier", "transit-encryption-mode", "update-time"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -1284,6 +1715,24 @@ where
|
||||
match self.opt.subcommand() {
|
||||
("projects", Some(opt)) => {
|
||||
match opt.subcommand() {
|
||||
("locations-clusters-create", Some(opt)) => {
|
||||
call_result = self._projects_locations_clusters_create(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("locations-clusters-delete", Some(opt)) => {
|
||||
call_result = self._projects_locations_clusters_delete(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("locations-clusters-get", Some(opt)) => {
|
||||
call_result = self._projects_locations_clusters_get(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("locations-clusters-get-certificate-authority", Some(opt)) => {
|
||||
call_result = self._projects_locations_clusters_get_certificate_authority(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("locations-clusters-list", Some(opt)) => {
|
||||
call_result = self._projects_locations_clusters_list(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("locations-clusters-patch", Some(opt)) => {
|
||||
call_result = self._projects_locations_clusters_patch(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("locations-get", Some(opt)) => {
|
||||
call_result = self._projects_locations_get(opt, dry_run, &mut err).await;
|
||||
},
|
||||
@@ -1414,7 +1863,151 @@ where
|
||||
async fn main() {
|
||||
let mut exit_status = 0i32;
|
||||
let arg_data = [
|
||||
("projects", "methods: 'locations-get', 'locations-instances-create', 'locations-instances-delete', 'locations-instances-export', 'locations-instances-failover', 'locations-instances-get', 'locations-instances-get-auth-string', 'locations-instances-import', 'locations-instances-list', 'locations-instances-patch', 'locations-instances-reschedule-maintenance', 'locations-instances-upgrade', 'locations-list', 'locations-operations-cancel', 'locations-operations-delete', 'locations-operations-get' and 'locations-operations-list'", vec![
|
||||
("projects", "methods: 'locations-clusters-create', 'locations-clusters-delete', 'locations-clusters-get', 'locations-clusters-get-certificate-authority', 'locations-clusters-list', 'locations-clusters-patch', 'locations-get', 'locations-instances-create', 'locations-instances-delete', 'locations-instances-export', 'locations-instances-failover', 'locations-instances-get', 'locations-instances-get-auth-string', 'locations-instances-import', 'locations-instances-list', 'locations-instances-patch', 'locations-instances-reschedule-maintenance', 'locations-instances-upgrade', 'locations-list', 'locations-operations-cancel', 'locations-operations-delete', 'locations-operations-get' and 'locations-operations-list'", vec![
|
||||
("locations-clusters-create",
|
||||
Some(r##"Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-clusters-create",
|
||||
vec![
|
||||
(Some(r##"parent"##),
|
||||
None,
|
||||
Some(r##"Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"kv"##),
|
||||
Some(r##"r"##),
|
||||
Some(r##"Set various fields of the request structure, matching the key=value form"##),
|
||||
Some(true),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("locations-clusters-delete",
|
||||
Some(r##"Deletes a specific Redis cluster. Cluster stops serving and data is deleted."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-clusters-delete",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("locations-clusters-get",
|
||||
Some(r##"Gets the details of a specific Redis cluster."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-clusters-get",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("locations-clusters-get-certificate-authority",
|
||||
Some(r##"Gets the details of certificate authority information for Redis cluster."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-clusters-get-certificate-authority",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Required. Redis cluster certificate authority resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` where `location_id` refers to a GCP region."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("locations-clusters-list",
|
||||
Some(r##"Lists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-clusters-list",
|
||||
vec![
|
||||
(Some(r##"parent"##),
|
||||
None,
|
||||
Some(r##"Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("locations-clusters-patch",
|
||||
Some(r##"Updates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-clusters-patch",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`"##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"kv"##),
|
||||
Some(r##"r"##),
|
||||
Some(r##"Set various fields of the request structure, matching the key=value form"##),
|
||||
Some(true),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("locations-get",
|
||||
Some(r##"Gets information about a location."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-get",
|
||||
@@ -1810,7 +2403,7 @@ async fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("locations-operations-list",
|
||||
Some(r##"Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id."##),
|
||||
Some(r##"Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_redis1_cli/projects_locations-operations-list",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
@@ -1837,7 +2430,7 @@ async fn main() {
|
||||
|
||||
let mut app = App::new("redis1")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("5.0.3+20230111")
|
||||
.version("5.0.3+20240226")
|
||||
.about("Creates and manages Redis instances on the Google Cloud Platform.")
|
||||
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_redis1_cli")
|
||||
.arg(Arg::with_name("url")
|
||||
|
||||
Reference in New Issue
Block a user