mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-01 00:51:17 +01:00
regen all APIs
This commit is contained in:
@@ -763,6 +763,433 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
async fn _projects_platforms_gke_policies_evaluate(&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()[..] {
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec![]);
|
||||
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::EvaluateGkePolicyRequest = json::value::from_value(object).unwrap();
|
||||
let mut call = self.hub.projects().platforms_gke_policies_evaluate(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 {
|
||||
_ => {
|
||||
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_platforms_policies_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()[..] {
|
||||
"description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"gke-policy.image-allowlist.allow-pattern" => Some(("gkePolicy.imageAllowlist.allowPattern", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })),
|
||||
"name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-pattern", "description", "gke-policy", "image-allowlist", "name", "update-time"]);
|
||||
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::PlatformPolicy = json::value::from_value(object).unwrap();
|
||||
let mut call = self.hub.projects().platforms_policies_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 {
|
||||
"policy-id" => {
|
||||
call = call.policy_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(["policy-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_platforms_policies_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().platforms_policies_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 {
|
||||
_ => {
|
||||
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_platforms_policies_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().platforms_policies_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_platforms_policies_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().platforms_policies_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_platforms_policies_replace_platform_policy(&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()[..] {
|
||||
"description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"gke-policy.image-allowlist.allow-pattern" => Some(("gkePolicy.imageAllowlist.allowPattern", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })),
|
||||
"name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-pattern", "description", "gke-policy", "image-allowlist", "name", "update-time"]);
|
||||
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::PlatformPolicy = json::value::from_value(object).unwrap();
|
||||
let mut call = self.hub.projects().platforms_policies_replace_platform_policy(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 {
|
||||
_ => {
|
||||
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_policy_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
let mut call = self.hub.projects().policy_get_iam_policy(opt.value_of("resource").unwrap_or(""));
|
||||
@@ -1171,6 +1598,24 @@ where
|
||||
("get-policy", Some(opt)) => {
|
||||
call_result = self._projects_get_policy(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("platforms-gke-policies-evaluate", Some(opt)) => {
|
||||
call_result = self._projects_platforms_gke_policies_evaluate(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("platforms-policies-create", Some(opt)) => {
|
||||
call_result = self._projects_platforms_policies_create(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("platforms-policies-delete", Some(opt)) => {
|
||||
call_result = self._projects_platforms_policies_delete(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("platforms-policies-get", Some(opt)) => {
|
||||
call_result = self._projects_platforms_policies_get(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("platforms-policies-list", Some(opt)) => {
|
||||
call_result = self._projects_platforms_policies_list(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("platforms-policies-replace-platform-policy", Some(opt)) => {
|
||||
call_result = self._projects_platforms_policies_replace_platform_policy(opt, dry_run, &mut err).await;
|
||||
},
|
||||
("policy-get-iam-policy", Some(opt)) => {
|
||||
call_result = self._projects_policy_get_iam_policy(opt, dry_run, &mut err).await;
|
||||
},
|
||||
@@ -1273,9 +1718,9 @@ where
|
||||
async fn main() {
|
||||
let mut exit_status = 0i32;
|
||||
let arg_data = [
|
||||
("projects", "methods: 'attestors-create', 'attestors-delete', 'attestors-get', 'attestors-get-iam-policy', 'attestors-list', 'attestors-set-iam-policy', 'attestors-test-iam-permissions', 'attestors-update', 'attestors-validate-attestation-occurrence', 'get-policy', 'policy-get-iam-policy', 'policy-set-iam-policy', 'policy-test-iam-permissions' and 'update-policy'", vec![
|
||||
("projects", "methods: 'attestors-create', 'attestors-delete', 'attestors-get', 'attestors-get-iam-policy', 'attestors-list', 'attestors-set-iam-policy', 'attestors-test-iam-permissions', 'attestors-update', 'attestors-validate-attestation-occurrence', 'get-policy', 'platforms-gke-policies-evaluate', 'platforms-policies-create', 'platforms-policies-delete', 'platforms-policies-get', 'platforms-policies-list', 'platforms-policies-replace-platform-policy', 'policy-get-iam-policy', 'policy-set-iam-policy', 'policy-test-iam-permissions' and 'update-policy'", vec![
|
||||
("attestors-create",
|
||||
Some(r##"Creates an attestor, and returns a copy of the new attestor. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the attestor already exists."##),
|
||||
Some(r##"Creates an attestor, and returns a copy of the new attestor. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the attestor already exists."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_attestors-create",
|
||||
vec![
|
||||
(Some(r##"parent"##),
|
||||
@@ -1303,7 +1748,7 @@ async fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("attestors-delete",
|
||||
Some(r##"Deletes an attestor. Returns NOT_FOUND if the attestor does not exist."##),
|
||||
Some(r##"Deletes an attestor. Returns `NOT_FOUND` if the attestor does not exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_attestors-delete",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
@@ -1325,7 +1770,7 @@ async fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("attestors-get",
|
||||
Some(r##"Gets an attestor. Returns NOT_FOUND if the attestor does not exist."##),
|
||||
Some(r##"Gets an attestor. Returns `NOT_FOUND` if the attestor does not exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_attestors-get",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
@@ -1369,7 +1814,7 @@ async fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("attestors-list",
|
||||
Some(r##"Lists attestors. Returns INVALID_ARGUMENT if the project does not exist."##),
|
||||
Some(r##"Lists attestors. Returns `INVALID_ARGUMENT` if the project does not exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_attestors-list",
|
||||
vec![
|
||||
(Some(r##"parent"##),
|
||||
@@ -1447,7 +1892,7 @@ async fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("attestors-update",
|
||||
Some(r##"Updates an attestor. Returns NOT_FOUND if the attestor does not exist."##),
|
||||
Some(r##"Updates an attestor. Returns `NOT_FOUND` if the attestor does not exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_attestors-update",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
@@ -1475,7 +1920,7 @@ async fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("attestors-validate-attestation-occurrence",
|
||||
Some(r##"Returns whether the given Attestation for the given image URI was signed by the given Attestor"##),
|
||||
Some(r##"Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor`"##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_attestors-validate-attestation-occurrence",
|
||||
vec![
|
||||
(Some(r##"attestor"##),
|
||||
@@ -1518,6 +1963,156 @@ async fn main() {
|
||||
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)),
|
||||
]),
|
||||
("platforms-gke-policies-evaluate",
|
||||
Some(r##"Evaluates a Kubernetes object versus a GKE platform policy. Returns `NOT_FOUND` if the policy doesn't exist, `INVALID_ARGUMENT` if the policy or request is malformed and `PERMISSION_DENIED` if the client does not have sufficient permissions."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_platforms-gke-policies-evaluate",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Required. The name of the platform policy to evaluate in the format `projects/*/platforms/*/policies/*`."##),
|
||||
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)),
|
||||
]),
|
||||
("platforms-policies-create",
|
||||
Some(r##"Creates a platform policy, and returns a copy of it. Returns `NOT_FOUND` if the project or platform doesn't exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the policy already exists, and `INVALID_ARGUMENT` if the policy contains a platform-specific policy that does not match the platform value specified in the URL."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_platforms-policies-create",
|
||||
vec![
|
||||
(Some(r##"parent"##),
|
||||
None,
|
||||
Some(r##"Required. The parent of this platform policy."##),
|
||||
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)),
|
||||
]),
|
||||
("platforms-policies-delete",
|
||||
Some(r##"Deletes a platform policy. Returns `NOT_FOUND` if the policy doesn't exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_platforms-policies-delete",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Required. The name of the platform policy to delete, in the format `projects/*/platforms/*/policies/*`."##),
|
||||
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)),
|
||||
]),
|
||||
("platforms-policies-get",
|
||||
Some(r##"Gets a platform policy. Returns `NOT_FOUND` if the policy doesn't exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_platforms-policies-get",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Required. The name of the platform policy to retrieve in the format `projects/*/platforms/*/policies/*`."##),
|
||||
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)),
|
||||
]),
|
||||
("platforms-policies-list",
|
||||
Some(r##"Lists platform policies owned by a project in the specified platform. Returns `INVALID_ARGUMENT` if the project or the platform doesn't exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_platforms-policies-list",
|
||||
vec![
|
||||
(Some(r##"parent"##),
|
||||
None,
|
||||
Some(r##"Required. The resource name of the platform associated with the platform policies using the format `projects/*/platforms/*`."##),
|
||||
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)),
|
||||
]),
|
||||
("platforms-policies-replace-platform-policy",
|
||||
Some(r##"Replaces a platform policy. Returns `NOT_FOUND` if the policy doesn't exist."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_platforms-policies-replace-platform-policy",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
None,
|
||||
Some(r##"Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`."##),
|
||||
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"##),
|
||||
@@ -1603,7 +2198,7 @@ async fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("update-policy",
|
||||
Some(r##"Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed."##),
|
||||
Some(r##"Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli/projects_update-policy",
|
||||
vec![
|
||||
(Some(r##"name"##),
|
||||
@@ -1661,7 +2256,7 @@ async fn main() {
|
||||
|
||||
let mut app = App::new("binaryauthorization1")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("5.0.3+20230113")
|
||||
.version("5.0.3+20240223")
|
||||
.about("The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run. ")
|
||||
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_binaryauthorization1_cli")
|
||||
.arg(Arg::with_name("url")
|
||||
|
||||
Reference in New Issue
Block a user