chore(json): fetch latest json and re-gen all code

This commit is contained in:
Sebastian Thiel
2016-12-16 11:25:26 +01:00
parent e04b6d023d
commit 06caa1de02
657 changed files with 237602 additions and 19201 deletions

View File

@@ -45,6 +45,229 @@ struct Engine<'n> {
impl<'n> Engine<'n> {
fn _projects_snapshots_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.projects().snapshots_get_iam_policy(opt.value_of("resource").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(),
_ => unreachable!()
} {
Err(api_err) => Err(DoitError::ApiError(api_err)),
Ok((mut response, output_schema)) => {
let mut value = json::value::to_value(&output_schema);
remove_json_null_values(&mut value);
json::to_writer_pretty(&mut ostream, &value).unwrap();
ostream.flush().unwrap();
Ok(())
}
}
}
}
fn _projects_snapshots_set_iam_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()[..] {
"policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
"policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
_ => {
let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]);
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::SetIamPolicyRequest = json::value::from_value(object).unwrap();
let mut call = self.hub.projects().snapshots_set_iam_policy(request, opt.value_of("resource").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(),
_ => unreachable!()
} {
Err(api_err) => Err(DoitError::ApiError(api_err)),
Ok((mut response, output_schema)) => {
let mut value = json::value::to_value(&output_schema);
remove_json_null_values(&mut value);
json::to_writer_pretty(&mut ostream, &value).unwrap();
ostream.flush().unwrap();
Ok(())
}
}
}
}
fn _projects_snapshots_test_iam_permissions(&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()[..] {
"permissions" => Some(("permissions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })),
_ => {
let suggestion = FieldCursor::did_you_mean(key, &vec!["permissions"]);
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::TestIamPermissionsRequest = json::value::from_value(object).unwrap();
let mut call = self.hub.projects().snapshots_test_iam_permissions(request, opt.value_of("resource").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(),
_ => unreachable!()
} {
Err(api_err) => Err(DoitError::ApiError(api_err)),
Ok((mut response, output_schema)) => {
let mut value = json::value::to_value(&output_schema);
remove_json_null_values(&mut value);
json::to_writer_pretty(&mut ostream, &value).unwrap();
ostream.flush().unwrap();
Ok(())
}
}
}
}
fn _projects_subscriptions_acknowledge(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
@@ -715,8 +938,8 @@ impl<'n> Engine<'n> {
let type_info: Option<(&'static str, JsonTypeInfo)> =
match &temp_cursor.to_string()[..] {
"policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
"policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
"policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
_ => {
let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]);
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
@@ -1270,8 +1493,8 @@ impl<'n> Engine<'n> {
let type_info: Option<(&'static str, JsonTypeInfo)> =
match &temp_cursor.to_string()[..] {
"policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
"policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
"policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
_ => {
let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]);
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
@@ -1484,6 +1707,15 @@ impl<'n> Engine<'n> {
match self.opt.subcommand() {
("projects", Some(opt)) => {
match opt.subcommand() {
("snapshots-get-iam-policy", Some(opt)) => {
call_result = self._projects_snapshots_get_iam_policy(opt, dry_run, &mut err);
},
("snapshots-set-iam-policy", Some(opt)) => {
call_result = self._projects_snapshots_set_iam_policy(opt, dry_run, &mut err);
},
("snapshots-test-iam-permissions", Some(opt)) => {
call_result = self._projects_snapshots_test_iam_permissions(opt, dry_run, &mut err);
},
("subscriptions-acknowledge", Some(opt)) => {
call_result = self._projects_subscriptions_acknowledge(opt, dry_run, &mut err);
},
@@ -1636,14 +1868,108 @@ impl<'n> Engine<'n> {
fn main() {
let mut exit_status = 0i32;
let arg_data = [
("projects", "methods: 'subscriptions-acknowledge', 'subscriptions-create', 'subscriptions-delete', 'subscriptions-get', 'subscriptions-get-iam-policy', 'subscriptions-list', 'subscriptions-modify-ack-deadline', 'subscriptions-modify-push-config', 'subscriptions-pull', 'subscriptions-set-iam-policy', 'subscriptions-test-iam-permissions', 'topics-create', 'topics-delete', 'topics-get', 'topics-get-iam-policy', 'topics-list', 'topics-publish', 'topics-set-iam-policy', 'topics-subscriptions-list' and 'topics-test-iam-permissions'", vec![
("projects", "methods: 'snapshots-get-iam-policy', 'snapshots-set-iam-policy', 'snapshots-test-iam-permissions', 'subscriptions-acknowledge', 'subscriptions-create', 'subscriptions-delete', 'subscriptions-get', 'subscriptions-get-iam-policy', 'subscriptions-list', 'subscriptions-modify-ack-deadline', 'subscriptions-modify-push-config', 'subscriptions-pull', 'subscriptions-set-iam-policy', 'subscriptions-test-iam-permissions', 'topics-create', 'topics-delete', 'topics-get', 'topics-get-iam-policy', 'topics-list', 'topics-publish', 'topics-set-iam-policy', 'topics-subscriptions-list' and 'topics-test-iam-permissions'", vec![
("snapshots-get-iam-policy",
Some(r##"Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_snapshots-get-iam-policy",
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy is being requested.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
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)),
]),
("snapshots-set-iam-policy",
Some(r##"Sets the access control policy on the specified resource. Replaces any
existing policy."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_snapshots-set-iam-policy",
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy is being specified.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
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)),
]),
("snapshots-test-iam-permissions",
Some(r##"Returns permissions that a caller has on the specified resource."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_snapshots-test-iam-permissions",
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy detail is being requested.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
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)),
]),
("subscriptions-acknowledge",
Some(r##"Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error."##),
Some(r##"Acknowledges the messages associated with the `ack_ids` in the
`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
from the subscription.
Acknowledging a message whose ack deadline has expired may succeed,
but such a message may be redelivered later. Acknowledging a message more
than once will not result in an error."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-acknowledge",
vec![
(Some(r##"subscription"##),
None,
Some(r##"The subscription whose message is being acknowledged."##),
Some(r##"The subscription whose message is being acknowledged.
Format is `projects/{project}/subscriptions/{sub}`."##),
Some(true),
Some(false)),
@@ -1666,12 +1992,26 @@ fn main() {
Some(false)),
]),
("subscriptions-create",
Some(r##"Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic."##),
Some(r##"Creates a subscription to a given topic.
If the subscription already exists, returns `ALREADY_EXISTS`.
If the corresponding topic doesn't exist, returns `NOT_FOUND`.
If the name is not provided in the request, the server will assign a random
name for this subscription on the same project as the topic, conforming
to the
[resource name format](https://cloud.google.com/pubsub/docs/overview#names).
The generated name is populated in the returned Subscription object.
Note that for REST API requests, you must specify a name in the request."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-create",
vec![
(Some(r##"name"##),
None,
Some(r##"The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`."##),
Some(r##"The name of the subscription. It must have the format
`"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
start with a letter, and contain only letters (`[A-Za-z]`), numbers
(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
in length, and it must not start with `"goog"`."##),
Some(true),
Some(false)),
@@ -1694,12 +2034,17 @@ fn main() {
Some(false)),
]),
("subscriptions-delete",
Some(r##"Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified."##),
Some(r##"Deletes an existing subscription. All messages retained in the subscription
are immediately dropped. Calls to `Pull` after deletion will return
`NOT_FOUND`. After a subscription is deleted, a new one may be created with
the same name, but the new one has no association with the old
subscription or its topic unless the same topic is specified."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-delete",
vec![
(Some(r##"subscription"##),
None,
Some(r##"The subscription to delete."##),
Some(r##"The subscription to delete.
Format is `projects/{project}/subscriptions/{sub}`."##),
Some(true),
Some(false)),
@@ -1721,7 +2066,8 @@ fn main() {
vec![
(Some(r##"subscription"##),
None,
Some(r##"The name of the subscription to get."##),
Some(r##"The name of the subscription to get.
Format is `projects/{project}/subscriptions/{sub}`."##),
Some(true),
Some(false)),
@@ -1738,12 +2084,16 @@ fn main() {
Some(false)),
]),
("subscriptions-get-iam-policy",
Some(r##"Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set."##),
Some(r##"Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-get-iam-policy",
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation."##),
Some(r##"REQUIRED: The resource for which the policy is being requested.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
Some(true),
Some(false)),
@@ -1765,7 +2115,8 @@ fn main() {
vec![
(Some(r##"project"##),
None,
Some(r##"The name of the cloud project that subscriptions belong to."##),
Some(r##"The name of the cloud project that subscriptions belong to.
Format is `projects/{project}`."##),
Some(true),
Some(false)),
@@ -1782,12 +2133,17 @@ fn main() {
Some(false)),
]),
("subscriptions-modify-ack-deadline",
Some(r##"Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted."##),
Some(r##"Modifies the ack deadline for a specific message. This method is useful
to indicate that more time is needed to process a message by the
subscriber, or to make the message available for redelivery if the
processing was interrupted. Note that this does not modify the
subscription-level `ackDeadlineSeconds` used for subsequent messages."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-modify-ack-deadline",
vec![
(Some(r##"subscription"##),
None,
Some(r##"The name of the subscription."##),
Some(r##"The name of the subscription.
Format is `projects/{project}/subscriptions/{sub}`."##),
Some(true),
Some(false)),
@@ -1810,12 +2166,18 @@ fn main() {
Some(false)),
]),
("subscriptions-modify-push-config",
Some(r##"Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`."##),
Some(r##"Modifies the `PushConfig` for a specified subscription.
This may be used to change a push subscription to a pull one (signified by
an empty `PushConfig`) or vice versa, or change the endpoint URL and other
attributes of a push subscription. Messages will accumulate for delivery
continuously through the call regardless of changes to the `PushConfig`."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-modify-push-config",
vec![
(Some(r##"subscription"##),
None,
Some(r##"The name of the subscription."##),
Some(r##"The name of the subscription.
Format is `projects/{project}/subscriptions/{sub}`."##),
Some(true),
Some(false)),
@@ -1838,12 +2200,16 @@ fn main() {
Some(false)),
]),
("subscriptions-pull",
Some(r##"Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription."##),
Some(r##"Pulls messages from the server. Returns an empty list if there are no
messages available in the backlog. The server may return `UNAVAILABLE` if
there are too many concurrent pull requests pending for the given
subscription."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-pull",
vec![
(Some(r##"subscription"##),
None,
Some(r##"The subscription from which messages should be pulled."##),
Some(r##"The subscription from which messages should be pulled.
Format is `projects/{project}/subscriptions/{sub}`."##),
Some(true),
Some(false)),
@@ -1866,12 +2232,15 @@ fn main() {
Some(false)),
]),
("subscriptions-set-iam-policy",
Some(r##"Sets the access control policy on the specified resource. Replaces any existing policy."##),
Some(r##"Sets the access control policy on the specified resource. Replaces any
existing policy."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-set-iam-policy",
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation."##),
Some(r##"REQUIRED: The resource for which the policy is being specified.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
Some(true),
Some(false)),
@@ -1899,7 +2268,9 @@ fn main() {
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation."##),
Some(r##"REQUIRED: The resource for which the policy detail is being requested.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
Some(true),
Some(false)),
@@ -1927,7 +2298,12 @@ fn main() {
vec![
(Some(r##"name"##),
None,
Some(r##"The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`."##),
Some(r##"The name of the topic. It must have the format
`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
signs (`%`). It must be between 3 and 255 characters in length, and it
must not start with `"goog"`."##),
Some(true),
Some(false)),
@@ -1950,12 +2326,17 @@ fn main() {
Some(false)),
]),
("topics-delete",
Some(r##"Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`."##),
Some(r##"Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
does not exist. After a topic is deleted, a new topic may be created with
the same name; this is an entirely new topic with none of the old
configuration or subscriptions. Existing subscriptions to this topic are
not deleted, but their `topic` field is set to `_deleted-topic_`."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_topics-delete",
vec![
(Some(r##"topic"##),
None,
Some(r##"Name of the topic to delete."##),
Some(r##"Name of the topic to delete.
Format is `projects/{project}/topics/{topic}`."##),
Some(true),
Some(false)),
@@ -1977,7 +2358,8 @@ fn main() {
vec![
(Some(r##"topic"##),
None,
Some(r##"The name of the topic to get."##),
Some(r##"The name of the topic to get.
Format is `projects/{project}/topics/{topic}`."##),
Some(true),
Some(false)),
@@ -1994,12 +2376,16 @@ fn main() {
Some(false)),
]),
("topics-get-iam-policy",
Some(r##"Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set."##),
Some(r##"Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_topics-get-iam-policy",
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation."##),
Some(r##"REQUIRED: The resource for which the policy is being requested.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
Some(true),
Some(false)),
@@ -2021,7 +2407,8 @@ fn main() {
vec![
(Some(r##"project"##),
None,
Some(r##"The name of the cloud project that topics belong to."##),
Some(r##"The name of the cloud project that topics belong to.
Format is `projects/{project}`."##),
Some(true),
Some(false)),
@@ -2038,12 +2425,15 @@ fn main() {
Some(false)),
]),
("topics-publish",
Some(r##"Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute."##),
Some(r##"Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
does not exist. The message payload must not be empty; it must contain
either a non-empty data field, or at least one attribute."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_topics-publish",
vec![
(Some(r##"topic"##),
None,
Some(r##"The messages in the request will be published on this topic."##),
Some(r##"The messages in the request will be published on this topic.
Format is `projects/{project}/topics/{topic}`."##),
Some(true),
Some(false)),
@@ -2066,12 +2456,15 @@ fn main() {
Some(false)),
]),
("topics-set-iam-policy",
Some(r##"Sets the access control policy on the specified resource. Replaces any existing policy."##),
Some(r##"Sets the access control policy on the specified resource. Replaces any
existing policy."##),
"Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_topics-set-iam-policy",
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation."##),
Some(r##"REQUIRED: The resource for which the policy is being specified.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
Some(true),
Some(false)),
@@ -2099,7 +2492,8 @@ fn main() {
vec![
(Some(r##"topic"##),
None,
Some(r##"The name of the topic that subscriptions are attached to."##),
Some(r##"The name of the topic that subscriptions are attached to.
Format is `projects/{project}/topics/{topic}`."##),
Some(true),
Some(false)),
@@ -2121,7 +2515,9 @@ fn main() {
vec![
(Some(r##"resource"##),
None,
Some(r##"REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation."##),
Some(r##"REQUIRED: The resource for which the policy detail is being requested.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`."##),
Some(true),
Some(false)),
@@ -2149,8 +2545,9 @@ fn main() {
let mut app = App::new("pubsub1")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("1.0.0+20160317")
.about("Provides reliable, many-to-many, asynchronous messaging between applications.")
.version("1.0.0+20161122")
.about("Provides reliable, many-to-many, asynchronous messaging between applications.
")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_pubsub1_cli")
.arg(Arg::with_name("url")
.long("scope")