Skip to main content

grr_cli/commands/
generated.rs

1//! GENERATED FILE — DO NOT EDIT BY HAND.
2//!
3//! The entire service command tree, compiled from the committed
4//! Discovery index (`src/discovery/*.json`) by
5//! `scripts/generate-commands.mjs`. The index is refreshed daily by
6//! `.github/workflows/discovery.yml`; after any index change,
7//! regenerate with `node scripts/generate-commands.mjs` (or run it
8//! with `--check`, which exits 1 when this file is stale).
9//!
10//! Generated at: 2026-10-08T11:21:45.619Z — the index manifest's own timestamp,
11//! so regeneration is byte-identical until the index actually changes.
12//!
13//! Shape:
14//!   * one top-level subcommand per service;
15//!   * nested resources nest as subcommands (gmail -> users -> messages),
16//!     verbatim id segments, never flattened;
17//!   * one leaf per method. A leaf's clap name IS its full dotted
18//!     method id (`gmail.users.messages.list`), with a visible alias of
19//!     the bare method name, so dispatch resolves the id without
20//!     reconstructing paths and `grr schema` self-documents every
21//!     callable id;
22//!   * every leaf flag set = one typed flag per Discovery parameter
23//!     (camelCase -> kebab-case; integer -> i64; boolean -> presence
24//!     flag; repeated -> repeatable; enum -> possible values; required
25//!     -> required) plus the escape hatches `--params`, `--body-file`,
26//!     `--query`, `--dry-run`, `-f/--format`.
27//!
28//! Honest limitation: request bodies are NOT typed. Discovery's request
29//! schemas are not part of the distilled index, so POST/PATCH/PUT
30//! bodies pass through `--params` / `--body-file` verbatim.
31//!
32//! Numbers: 14 services, 401 methods, 401 leaves, 96 resource groups, 994 typed flags.
33
34/// When the generator last ran, taken from the Discovery index
35/// manifest's own timestamp so it only moves when the index moves.
36pub const GENERATED_AT: &str = "2026-10-08T11:21:45.619Z";
37
38#[rustfmt::skip] // mechanical output; formatting it would churn every diff
39pub mod tree {
40    use clap::{Arg, ArgAction, Command};
41    use crate::output::OutputFormat;
42
43    /// The escape hatches every generated leaf shares with `grr api call`.
44    /// Dispatch in gen_dispatch.rs reads them by these exact ids.
45    fn escape_hatch_args() -> Vec<Arg> {
46        vec![
47            Arg::new("params").long("params").value_name("JSON")
48                .help("Method parameters as a JSON object. Merged before the typed flags, so a typed flag always wins on conflict"),
49            Arg::new("body-file").long("body-file").value_name("PATH|-")
50                .help("Read the request body from a file ('-' = stdin) and send it verbatim (POST/PATCH/PUT)"),
51            Arg::new("query").long("query").value_name("KEY=VALUE").action(ArgAction::Append)
52                .help("Extra query pair for parameters Discovery does not document (e.g. alt=json); repeatable"),
53            Arg::new("dry-run").long("dry-run").action(ArgAction::SetTrue)
54                .help("Print the request that would be sent, without sending it"),
55            Arg::new("format").short('f').long("format").value_name("FORMAT")
56                .value_parser(clap::value_parser!(OutputFormat)).default_value("json")
57                .help("Output format"),
58        ]
59    }
60    /// All 14 service commands, in `discovery::services()` order.
61    pub fn commands() -> Vec<Command> {
62        vec![
63            service_analyticsadmin(),
64            service_analyticsdata(),
65            service_calendar(),
66            service_chat(),
67            service_docs(),
68            service_drive(),
69            service_forms(),
70            service_gmail(),
71            service_people(),
72            service_script(),
73            service_searchconsole(),
74            service_sheets(),
75            service_slides(),
76            service_tasks(),
77        ]
78    }
79
80    // analyticsadmin.accounts.delete
81    fn leaf_analyticsadmin_accounts_delete() -> Command {
82        Command::new("analyticsadmin.accounts.delete")
83            .visible_alias("delete")
84            .about("Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a...")
85            .long_about("Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Propertie")
86            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
87                .help("Required. The name of the Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\""))
88            .args(escape_hatch_args())
89    }
90
91    // analyticsadmin.accounts.get
92    fn leaf_analyticsadmin_accounts_get() -> Command {
93        Command::new("analyticsadmin.accounts.get")
94            .visible_alias("get")
95            .about("Lookup for a single Account.")
96            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
97                .help("Required. The name of the account to lookup. Format: accounts/{account} Example: \"accounts/100\""))
98            .args(escape_hatch_args())
99    }
100
101    // analyticsadmin.accounts.getDataSharingSettings
102    fn leaf_analyticsadmin_accounts_get_data_sharing_settings() -> Command {
103        Command::new("analyticsadmin.accounts.getDataSharingSettings")
104            .visible_alias("getDataSharingSettings")
105            .about("Get data sharing settings on an account. Data sharing settings are singletons.")
106            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
107                .help("Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: `accounts/1000/dataSharingSettings`"))
108            .args(escape_hatch_args())
109    }
110
111    // analyticsadmin.accounts.list
112    fn leaf_analyticsadmin_accounts_list() -> Command {
113        Command::new("analyticsadmin.accounts.list")
114            .visible_alias("list")
115            .about("Returns all accounts accessible by the caller. Note that these accounts might not currently have GA...")
116            .long_about("Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found. Note: The easiest way to retrieve a list of all properties you have")
117            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
118                .help("Optional. The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 5"))
119            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
120                .help("Optional. A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provid"))
121            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
122                .help("Whether to include soft-deleted (ie: \"trashed\") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not."))
123            .args(escape_hatch_args())
124    }
125
126    // analyticsadmin.accounts.patch
127    fn leaf_analyticsadmin_accounts_patch() -> Command {
128        Command::new("analyticsadmin.accounts.patch")
129            .visible_alias("patch")
130            .about("Updates an account.")
131            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
132                .help("Identifier. Resource name of this account. Format: accounts/{account} Example: \"accounts/100\""))
133            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
134                .help("Required. The list of fields to be updated. Field names must be in snake case (for example, \"field_to_update\"). Omitted fields will not be updated. To replace t"))
135            .args(escape_hatch_args())
136    }
137
138    // analyticsadmin.accounts.provisionAccountTicket
139    fn leaf_analyticsadmin_accounts_provision_account_ticket() -> Command {
140        Command::new("analyticsadmin.accounts.provisionAccountTicket")
141            .visible_alias("provisionAccountTicket")
142            .about("Requests a ticket for creating an account.")
143            .args(escape_hatch_args())
144    }
145
146    // analyticsadmin.accounts.runAccessReport
147    fn leaf_analyticsadmin_accounts_run_access_report() -> Command {
148        Command::new("analyticsadmin.accounts.runAccessReport")
149            .visible_alias("runAccessReport")
150            .about("Returns a customized report of data access records. The report provides records of each time a user...")
151            .long_about("Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions tha")
152            .arg(Arg::new("entity").long("entity").value_name("ENTITY").required(true)
153                .help("The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for"))
154            .args(escape_hatch_args())
155    }
156
157    // analyticsadmin.accounts.searchChangeHistoryEvents
158    fn leaf_analyticsadmin_accounts_search_change_history_events() -> Command {
159        Command::new("analyticsadmin.accounts.searchChangeHistoryEvents")
160            .visible_alias("searchChangeHistoryEvents")
161            .about("Searches through all changes to an account or its children given the specified set of filters. Only...")
162            .long_about("Searches through all changes to an account or its children given the specified set of filters. Only returns the subset of changes supported by the API. The UI may return additional changes.")
163            .arg(Arg::new("account").long("account").value_name("ACCOUNT").required(true)
164                .help("Required. The account resource for which to return change history resources. Format: accounts/{account} Example: `accounts/100`"))
165            .args(escape_hatch_args())
166    }
167
168    // analyticsadmin.accounts
169    fn group_analyticsadmin_accounts() -> Command {
170        Command::new("accounts")
171            .about("Methods under analyticsadmin.accounts")
172            .subcommand_required(true)
173            .subcommand(leaf_analyticsadmin_accounts_delete())
174            .subcommand(leaf_analyticsadmin_accounts_get())
175            .subcommand(leaf_analyticsadmin_accounts_get_data_sharing_settings())
176            .subcommand(leaf_analyticsadmin_accounts_list())
177            .subcommand(leaf_analyticsadmin_accounts_patch())
178            .subcommand(leaf_analyticsadmin_accounts_provision_account_ticket())
179            .subcommand(leaf_analyticsadmin_accounts_run_access_report())
180            .subcommand(leaf_analyticsadmin_accounts_search_change_history_events())
181    }
182
183    // analyticsadmin.accountSummaries.list
184    fn leaf_analyticsadmin_account_summaries_list() -> Command {
185        Command::new("analyticsadmin.accountSummaries.list")
186            .visible_alias("list")
187            .about("Returns summaries of all accounts accessible by the caller.")
188            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
189                .help("Optional. The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspeci"))
190            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
191                .help("Optional. A page token, received from a previous `ListAccountSummaries` call. Provide this to retrieve the subsequent page. When paginating, all other parameter"))
192            .args(escape_hatch_args())
193    }
194
195    // analyticsadmin.accountSummaries
196    fn group_analyticsadmin_account_summaries() -> Command {
197        Command::new("accountSummaries")
198            .about("Methods under analyticsadmin.accountSummaries")
199            .subcommand_required(true)
200            .subcommand(leaf_analyticsadmin_account_summaries_list())
201    }
202
203    // analyticsadmin.properties.acknowledgeUserDataCollection
204    fn leaf_analyticsadmin_properties_acknowledge_user_data_collection() -> Command {
205        Command::new("analyticsadmin.properties.acknowledgeUserDataCollection")
206            .visible_alias("acknowledgeUserDataCollection")
207            .about("Acknowledges the terms of user data collection for the specified property. This acknowledgement...")
208            .long_about("Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.")
209            .arg(Arg::new("property").long("property").value_name("PROPERTY").required(true)
210                .help("Required. The property for which to acknowledge user data collection."))
211            .args(escape_hatch_args())
212    }
213
214    // analyticsadmin.properties.conversionEvents.create
215    fn leaf_analyticsadmin_properties_conversion_events_create() -> Command {
216        Command::new("analyticsadmin.properties.conversionEvents.create")
217            .visible_alias("create")
218            .about("Deprecated: Use `CreateKeyEvent` instead. Creates a conversion event with the specified attributes.")
219            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
220                .help("Required. The resource name of the parent property where this conversion event will be created. Format: properties/123"))
221            .args(escape_hatch_args())
222    }
223
224    // analyticsadmin.properties.conversionEvents.delete
225    fn leaf_analyticsadmin_properties_conversion_events_delete() -> Command {
226        Command::new("analyticsadmin.properties.conversionEvents.delete")
227            .visible_alias("delete")
228            .about("Deprecated: Use `DeleteKeyEvent` instead. Deletes a conversion event in a property.")
229            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
230                .help("Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conver"))
231            .args(escape_hatch_args())
232    }
233
234    // analyticsadmin.properties.conversionEvents.get
235    fn leaf_analyticsadmin_properties_conversion_events_get() -> Command {
236        Command::new("analyticsadmin.properties.conversionEvents.get")
237            .visible_alias("get")
238            .about("Deprecated: Use `GetKeyEvent` instead. Retrieve a single conversion event.")
239            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
240                .help("Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conv"))
241            .args(escape_hatch_args())
242    }
243
244    // analyticsadmin.properties.conversionEvents.list
245    fn leaf_analyticsadmin_properties_conversion_events_list() -> Command {
246        Command::new("analyticsadmin.properties.conversionEvents.list")
247            .visible_alias("list")
248            .about("Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion events in the specified...")
249            .long_about("Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.")
250            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
251                .help("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coe"))
252            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
253                .help("Optional. A page token, received from a previous `ListConversionEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameter"))
254            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
255                .help("Required. The resource name of the parent property. Example: 'properties/123'"))
256            .args(escape_hatch_args())
257    }
258
259    // analyticsadmin.properties.conversionEvents.patch
260    fn leaf_analyticsadmin_properties_conversion_events_patch() -> Command {
261        Command::new("analyticsadmin.properties.conversionEvents.patch")
262            .visible_alias("patch")
263            .about("Deprecated: Use `UpdateKeyEvent` instead. Updates a conversion event with the specified attributes.")
264            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
265                .help("Identifier. Resource name of this conversion event. Format: properties/{property}/conversionEvents/{conversion_event}"))
266            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
267                .help("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the enti"))
268            .args(escape_hatch_args())
269    }
270
271    // analyticsadmin.properties.conversionEvents
272    fn group_analyticsadmin_properties_conversion_events() -> Command {
273        Command::new("conversionEvents")
274            .about("Methods under analyticsadmin.properties.conversionEvents")
275            .subcommand_required(true)
276            .subcommand(leaf_analyticsadmin_properties_conversion_events_create())
277            .subcommand(leaf_analyticsadmin_properties_conversion_events_delete())
278            .subcommand(leaf_analyticsadmin_properties_conversion_events_get())
279            .subcommand(leaf_analyticsadmin_properties_conversion_events_list())
280            .subcommand(leaf_analyticsadmin_properties_conversion_events_patch())
281    }
282
283    // analyticsadmin.properties.create
284    fn leaf_analyticsadmin_properties_create() -> Command {
285        Command::new("analyticsadmin.properties.create")
286            .visible_alias("create")
287            .about("Creates a Google Analytics property with the specified location and attributes.")
288            .args(escape_hatch_args())
289    }
290
291    // analyticsadmin.properties.customDimensions.archive
292    fn leaf_analyticsadmin_properties_custom_dimensions_archive() -> Command {
293        Command::new("analyticsadmin.properties.customDimensions.archive")
294            .visible_alias("archive")
295            .about("Archives a CustomDimension on a property.")
296            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
297                .help("Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678"))
298            .args(escape_hatch_args())
299    }
300
301    // analyticsadmin.properties.customDimensions.create
302    fn leaf_analyticsadmin_properties_custom_dimensions_create() -> Command {
303        Command::new("analyticsadmin.properties.customDimensions.create")
304            .visible_alias("create")
305            .about("Creates a CustomDimension. Warning: It's not permissible to use this method to collect data on...")
306            .long_about("Creates a CustomDimension. Warning: It's not permissible to use this method to collect data on individual users. In particular, sending user IDs in custom dimensions violates the Google Analytics Terms of Service.")
307            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
308                .help("Required. Example format: properties/1234"))
309            .args(escape_hatch_args())
310    }
311
312    // analyticsadmin.properties.customDimensions.get
313    fn leaf_analyticsadmin_properties_custom_dimensions_get() -> Command {
314        Command::new("analyticsadmin.properties.customDimensions.get")
315            .visible_alias("get")
316            .about("Lookup for a single CustomDimension.")
317            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
318                .help("Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678"))
319            .args(escape_hatch_args())
320    }
321
322    // analyticsadmin.properties.customDimensions.list
323    fn leaf_analyticsadmin_properties_custom_dimensions_list() -> Command {
324        Command::new("analyticsadmin.properties.customDimensions.list")
325            .visible_alias("list")
326            .about("Lists CustomDimensions on a property.")
327            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
328                .help("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coer"))
329            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
330                .help("Optional. A page token, received from a previous `ListCustomDimensions` call. Provide this to retrieve the subsequent page. When paginating, all other parameter"))
331            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
332                .help("Required. Example format: properties/1234"))
333            .args(escape_hatch_args())
334    }
335
336    // analyticsadmin.properties.customDimensions.patch
337    fn leaf_analyticsadmin_properties_custom_dimensions_patch() -> Command {
338        Command::new("analyticsadmin.properties.customDimensions.patch")
339            .visible_alias("patch")
340            .about("Updates a CustomDimension on a property.")
341            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
342                .help("Identifier. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}"))
343            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
344                .help("Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fiel"))
345            .args(escape_hatch_args())
346    }
347
348    // analyticsadmin.properties.customDimensions
349    fn group_analyticsadmin_properties_custom_dimensions() -> Command {
350        Command::new("customDimensions")
351            .about("Methods under analyticsadmin.properties.customDimensions")
352            .subcommand_required(true)
353            .subcommand(leaf_analyticsadmin_properties_custom_dimensions_archive())
354            .subcommand(leaf_analyticsadmin_properties_custom_dimensions_create())
355            .subcommand(leaf_analyticsadmin_properties_custom_dimensions_get())
356            .subcommand(leaf_analyticsadmin_properties_custom_dimensions_list())
357            .subcommand(leaf_analyticsadmin_properties_custom_dimensions_patch())
358    }
359
360    // analyticsadmin.properties.customMetrics.archive
361    fn leaf_analyticsadmin_properties_custom_metrics_archive() -> Command {
362        Command::new("analyticsadmin.properties.customMetrics.archive")
363            .visible_alias("archive")
364            .about("Archives a CustomMetric on a property.")
365            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
366                .help("Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678"))
367            .args(escape_hatch_args())
368    }
369
370    // analyticsadmin.properties.customMetrics.create
371    fn leaf_analyticsadmin_properties_custom_metrics_create() -> Command {
372        Command::new("analyticsadmin.properties.customMetrics.create")
373            .visible_alias("create")
374            .about("Creates a CustomMetric.")
375            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
376                .help("Required. Example format: properties/1234"))
377            .args(escape_hatch_args())
378    }
379
380    // analyticsadmin.properties.customMetrics.get
381    fn leaf_analyticsadmin_properties_custom_metrics_get() -> Command {
382        Command::new("analyticsadmin.properties.customMetrics.get")
383            .visible_alias("get")
384            .about("Lookup for a single CustomMetric.")
385            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
386                .help("Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678"))
387            .args(escape_hatch_args())
388    }
389
390    // analyticsadmin.properties.customMetrics.list
391    fn leaf_analyticsadmin_properties_custom_metrics_list() -> Command {
392        Command::new("analyticsadmin.properties.customMetrics.list")
393            .visible_alias("list")
394            .about("Lists CustomMetrics on a property.")
395            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
396                .help("The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the"))
397            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
398                .help("A page token, received from a previous `ListCustomMetrics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to"))
399            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
400                .help("Required. Example format: properties/1234"))
401            .args(escape_hatch_args())
402    }
403
404    // analyticsadmin.properties.customMetrics.patch
405    fn leaf_analyticsadmin_properties_custom_metrics_patch() -> Command {
406        Command::new("analyticsadmin.properties.customMetrics.patch")
407            .visible_alias("patch")
408            .about("Updates a CustomMetric on a property.")
409            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
410                .help("Identifier. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}"))
411            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
412                .help("Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fiel"))
413            .args(escape_hatch_args())
414    }
415
416    // analyticsadmin.properties.customMetrics
417    fn group_analyticsadmin_properties_custom_metrics() -> Command {
418        Command::new("customMetrics")
419            .about("Methods under analyticsadmin.properties.customMetrics")
420            .subcommand_required(true)
421            .subcommand(leaf_analyticsadmin_properties_custom_metrics_archive())
422            .subcommand(leaf_analyticsadmin_properties_custom_metrics_create())
423            .subcommand(leaf_analyticsadmin_properties_custom_metrics_get())
424            .subcommand(leaf_analyticsadmin_properties_custom_metrics_list())
425            .subcommand(leaf_analyticsadmin_properties_custom_metrics_patch())
426    }
427
428    // analyticsadmin.properties.dataStreams.create
429    fn leaf_analyticsadmin_properties_data_streams_create() -> Command {
430        Command::new("analyticsadmin.properties.dataStreams.create")
431            .visible_alias("create")
432            .about("Creates a DataStream.")
433            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
434                .help("Required. Example format: properties/1234"))
435            .args(escape_hatch_args())
436    }
437
438    // analyticsadmin.properties.dataStreams.delete
439    fn leaf_analyticsadmin_properties_data_streams_delete() -> Command {
440        Command::new("analyticsadmin.properties.dataStreams.delete")
441            .visible_alias("delete")
442            .about("Deletes a DataStream on a property.")
443            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
444                .help("Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678"))
445            .args(escape_hatch_args())
446    }
447
448    // analyticsadmin.properties.dataStreams.get
449    fn leaf_analyticsadmin_properties_data_streams_get() -> Command {
450        Command::new("analyticsadmin.properties.dataStreams.get")
451            .visible_alias("get")
452            .about("Lookup for a single DataStream.")
453            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
454                .help("Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678"))
455            .args(escape_hatch_args())
456    }
457
458    // analyticsadmin.properties.dataStreams.list
459    fn leaf_analyticsadmin_properties_data_streams_list() -> Command {
460        Command::new("analyticsadmin.properties.dataStreams.list")
461            .visible_alias("list")
462            .about("Lists DataStreams on a property.")
463            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
464                .help("The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the"))
465            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
466                .help("A page token, received from a previous `ListDataStreams` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `"))
467            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
468                .help("Required. Example format: properties/1234"))
469            .args(escape_hatch_args())
470    }
471
472    // analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create
473    fn leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_create() -> Command {
474        Command::new("analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create")
475            .visible_alias("create")
476            .about("Creates a measurement protocol secret.")
477            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
478                .help("Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}"))
479            .args(escape_hatch_args())
480    }
481
482    // analyticsadmin.properties.dataStreams.measurementProtocolSecrets.delete
483    fn leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_delete() -> Command {
484        Command::new("analyticsadmin.properties.dataStreams.measurementProtocolSecrets.delete")
485            .visible_alias("delete")
486            .about("Deletes target MeasurementProtocolSecret.")
487            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
488                .help("Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementPro"))
489            .args(escape_hatch_args())
490    }
491
492    // analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get
493    fn leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_get() -> Command {
494        Command::new("analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get")
495            .visible_alias("get")
496            .about("Lookup for a single MeasurementProtocolSecret.")
497            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
498                .help("Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementP"))
499            .args(escape_hatch_args())
500    }
501
502    // analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list
503    fn leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_list() -> Command {
504        Command::new("analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list")
505            .visible_alias("list")
506            .about("Returns child MeasurementProtocolSecrets under the specified parent Property.")
507            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
508                .help("Optional. The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerc"))
509            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
510                .help("Optional. A page token, received from a previous `ListMeasurementProtocolSecrets` call. Provide this to retrieve the subsequent page. When paginating, all other"))
511            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
512                .help("Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets"))
513            .args(escape_hatch_args())
514    }
515
516    // analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch
517    fn leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_patch() -> Command {
518        Command::new("analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch")
519            .visible_alias("patch")
520            .about("Updates a measurement protocol secret.")
521            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
522                .help("Identifier. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementPr"))
523            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
524                .help("Required. The list of fields to be updated. Omitted fields will not be updated."))
525            .args(escape_hatch_args())
526    }
527
528    // analyticsadmin.properties.dataStreams.measurementProtocolSecrets
529    fn group_analyticsadmin_properties_data_streams_measurement_protocol_secrets() -> Command {
530        Command::new("measurementProtocolSecrets")
531            .about("Methods under analyticsadmin.properties.dataStreams.measurementProtocolSecrets")
532            .subcommand_required(true)
533            .subcommand(leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_create())
534            .subcommand(leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_delete())
535            .subcommand(leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_get())
536            .subcommand(leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_list())
537            .subcommand(leaf_analyticsadmin_properties_data_streams_measurement_protocol_secrets_patch())
538    }
539
540    // analyticsadmin.properties.dataStreams.patch
541    fn leaf_analyticsadmin_properties_data_streams_patch() -> Command {
542        Command::new("analyticsadmin.properties.dataStreams.patch")
543            .visible_alias("patch")
544            .about("Updates a DataStream on a property.")
545            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
546                .help("Identifier. Resource name of this Data Stream. Format: properties/{property_id}/dataStreams/{stream_id} Example: \"properties/1000/dataStreams/2000\""))
547            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
548                .help("Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fiel"))
549            .args(escape_hatch_args())
550    }
551
552    // analyticsadmin.properties.dataStreams
553    fn group_analyticsadmin_properties_data_streams() -> Command {
554        Command::new("dataStreams")
555            .about("Methods under analyticsadmin.properties.dataStreams")
556            .subcommand_required(true)
557            .subcommand(leaf_analyticsadmin_properties_data_streams_create())
558            .subcommand(leaf_analyticsadmin_properties_data_streams_delete())
559            .subcommand(leaf_analyticsadmin_properties_data_streams_get())
560            .subcommand(leaf_analyticsadmin_properties_data_streams_list())
561            .subcommand(group_analyticsadmin_properties_data_streams_measurement_protocol_secrets())
562            .subcommand(leaf_analyticsadmin_properties_data_streams_patch())
563    }
564
565    // analyticsadmin.properties.delete
566    fn leaf_analyticsadmin_properties_delete() -> Command {
567        Command::new("analyticsadmin.properties.delete")
568            .visible_alias("delete")
569            .about("Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a...")
570            .long_about("Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: Goo")
571            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
572                .help("Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\""))
573            .args(escape_hatch_args())
574    }
575
576    // analyticsadmin.properties.firebaseLinks.create
577    fn leaf_analyticsadmin_properties_firebase_links_create() -> Command {
578        Command::new("analyticsadmin.properties.firebaseLinks.create")
579            .visible_alias("create")
580            .about("Creates a FirebaseLink. Properties can have at most one FirebaseLink.")
581            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
582                .help("Required. Format: properties/{property_id} Example: `properties/1234`"))
583            .args(escape_hatch_args())
584    }
585
586    // analyticsadmin.properties.firebaseLinks.delete
587    fn leaf_analyticsadmin_properties_firebase_links_delete() -> Command {
588        Command::new("analyticsadmin.properties.firebaseLinks.delete")
589            .visible_alias("delete")
590            .about("Deletes a FirebaseLink on a property")
591            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
592                .help("Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: `properties/1234/firebaseLinks/5678`"))
593            .args(escape_hatch_args())
594    }
595
596    // analyticsadmin.properties.firebaseLinks.list
597    fn leaf_analyticsadmin_properties_firebase_links_list() -> Command {
598        Command::new("analyticsadmin.properties.firebaseLinks.list")
599            .visible_alias("list")
600            .about("Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.")
601            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
602                .help("Optional. The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 5"))
603            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
604                .help("Optional. A page token, received from a previous `ListFirebaseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters p"))
605            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
606                .help("Required. Format: properties/{property_id} Example: `properties/1234`"))
607            .args(escape_hatch_args())
608    }
609
610    // analyticsadmin.properties.firebaseLinks
611    fn group_analyticsadmin_properties_firebase_links() -> Command {
612        Command::new("firebaseLinks")
613            .about("Methods under analyticsadmin.properties.firebaseLinks")
614            .subcommand_required(true)
615            .subcommand(leaf_analyticsadmin_properties_firebase_links_create())
616            .subcommand(leaf_analyticsadmin_properties_firebase_links_delete())
617            .subcommand(leaf_analyticsadmin_properties_firebase_links_list())
618    }
619
620    // analyticsadmin.properties.get
621    fn leaf_analyticsadmin_properties_get() -> Command {
622        Command::new("analyticsadmin.properties.get")
623            .visible_alias("get")
624            .about("Lookup for a single GA Property.")
625            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
626                .help("Required. The name of the property to lookup. Format: properties/{property_id} Example: \"properties/1000\""))
627            .args(escape_hatch_args())
628    }
629
630    // analyticsadmin.properties.getDataRetentionSettings
631    fn leaf_analyticsadmin_properties_get_data_retention_settings() -> Command {
632        Command::new("analyticsadmin.properties.getDataRetentionSettings")
633            .visible_alias("getDataRetentionSettings")
634            .about("Returns the singleton data retention settings for this property.")
635            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
636                .help("Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: \"properties/1000/dataRetentionSettings\""))
637            .args(escape_hatch_args())
638    }
639
640    // analyticsadmin.properties.googleAdsLinks.create
641    fn leaf_analyticsadmin_properties_google_ads_links_create() -> Command {
642        Command::new("analyticsadmin.properties.googleAdsLinks.create")
643            .visible_alias("create")
644            .about("Creates a GoogleAdsLink.")
645            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
646                .help("Required. Example format: properties/1234"))
647            .args(escape_hatch_args())
648    }
649
650    // analyticsadmin.properties.googleAdsLinks.delete
651    fn leaf_analyticsadmin_properties_google_ads_links_delete() -> Command {
652        Command::new("analyticsadmin.properties.googleAdsLinks.delete")
653            .visible_alias("delete")
654            .about("Deletes a GoogleAdsLink on a property")
655            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
656                .help("Required. Example format: properties/1234/googleAdsLinks/5678"))
657            .args(escape_hatch_args())
658    }
659
660    // analyticsadmin.properties.googleAdsLinks.list
661    fn leaf_analyticsadmin_properties_google_ads_links_list() -> Command {
662        Command::new("analyticsadmin.properties.googleAdsLinks.list")
663            .visible_alias("list")
664            .about("Lists GoogleAdsLinks on a property.")
665            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
666                .help("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coer"))
667            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
668                .help("Optional. A page token, received from a previous `ListGoogleAdsLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters"))
669            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
670                .help("Required. Example format: properties/1234"))
671            .args(escape_hatch_args())
672    }
673
674    // analyticsadmin.properties.googleAdsLinks.patch
675    fn leaf_analyticsadmin_properties_google_ads_links_patch() -> Command {
676        Command::new("analyticsadmin.properties.googleAdsLinks.patch")
677            .visible_alias("patch")
678            .about("Updates a GoogleAdsLink on a property")
679            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
680                .help("Identifier. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: googleAdsLinkId is not the Google Ads customer ID."))
681            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
682                .help("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the enti"))
683            .args(escape_hatch_args())
684    }
685
686    // analyticsadmin.properties.googleAdsLinks
687    fn group_analyticsadmin_properties_google_ads_links() -> Command {
688        Command::new("googleAdsLinks")
689            .about("Methods under analyticsadmin.properties.googleAdsLinks")
690            .subcommand_required(true)
691            .subcommand(leaf_analyticsadmin_properties_google_ads_links_create())
692            .subcommand(leaf_analyticsadmin_properties_google_ads_links_delete())
693            .subcommand(leaf_analyticsadmin_properties_google_ads_links_list())
694            .subcommand(leaf_analyticsadmin_properties_google_ads_links_patch())
695    }
696
697    // analyticsadmin.properties.keyEvents.create
698    fn leaf_analyticsadmin_properties_key_events_create() -> Command {
699        Command::new("analyticsadmin.properties.keyEvents.create")
700            .visible_alias("create")
701            .about("Creates a Key Event.")
702            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
703                .help("Required. The resource name of the parent property where this Key Event will be created. Format: properties/123"))
704            .args(escape_hatch_args())
705    }
706
707    // analyticsadmin.properties.keyEvents.delete
708    fn leaf_analyticsadmin_properties_key_events_delete() -> Command {
709        Command::new("analyticsadmin.properties.keyEvents.delete")
710            .visible_alias("delete")
711            .about("Deletes a Key Event.")
712            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
713                .help("Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\""))
714            .args(escape_hatch_args())
715    }
716
717    // analyticsadmin.properties.keyEvents.get
718    fn leaf_analyticsadmin_properties_key_events_get() -> Command {
719        Command::new("analyticsadmin.properties.keyEvents.get")
720            .visible_alias("get")
721            .about("Retrieves a single Key Event.")
722            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
723                .help("Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\""))
724            .args(escape_hatch_args())
725    }
726
727    // analyticsadmin.properties.keyEvents.list
728    fn leaf_analyticsadmin_properties_key_events_list() -> Command {
729        Command::new("analyticsadmin.properties.keyEvents.list")
730            .visible_alias("list")
731            .about("Returns a list of Key Events in the specified parent property. Returns an empty list if no Key...")
732            .long_about("Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.")
733            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
734                .help("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coe"))
735            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
736                .help("Optional. A page token, received from a previous `ListKeyEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provi"))
737            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
738                .help("Required. The resource name of the parent property. Example: 'properties/123'"))
739            .args(escape_hatch_args())
740    }
741
742    // analyticsadmin.properties.keyEvents.patch
743    fn leaf_analyticsadmin_properties_key_events_patch() -> Command {
744        Command::new("analyticsadmin.properties.keyEvents.patch")
745            .visible_alias("patch")
746            .about("Updates a Key Event.")
747            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
748                .help("Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}"))
749            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
750                .help("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the enti"))
751            .args(escape_hatch_args())
752    }
753
754    // analyticsadmin.properties.keyEvents
755    fn group_analyticsadmin_properties_key_events() -> Command {
756        Command::new("keyEvents")
757            .about("Methods under analyticsadmin.properties.keyEvents")
758            .subcommand_required(true)
759            .subcommand(leaf_analyticsadmin_properties_key_events_create())
760            .subcommand(leaf_analyticsadmin_properties_key_events_delete())
761            .subcommand(leaf_analyticsadmin_properties_key_events_get())
762            .subcommand(leaf_analyticsadmin_properties_key_events_list())
763            .subcommand(leaf_analyticsadmin_properties_key_events_patch())
764    }
765
766    // analyticsadmin.properties.list
767    fn leaf_analyticsadmin_properties_list() -> Command {
768        Command::new("analyticsadmin.properties.list")
769            .visible_alias("list")
770            .about("Returns child Properties under the specified parent Account. Properties will be excluded if the...")
771            .long_about("Returns child Properties under the specified parent Account. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.")
772            .arg(Arg::new("filter").long("filter").value_name("FILTER")
773                .help("Required. An expression for filtering the results of the request. Fields eligible for filtering are: `parent:`(The resource name of the parent account/property)"))
774            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
775                .help("Optional. The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 5"))
776            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
777                .help("Optional. A page token, received from a previous `ListProperties` call. Provide this to retrieve the subsequent page. When paginating, all other parameters prov"))
778            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
779                .help("Whether to include soft-deleted (ie: \"trashed\") Properties in the results. Properties can be inspected to determine whether they are deleted or not."))
780            .args(escape_hatch_args())
781    }
782
783    // analyticsadmin.properties.patch
784    fn leaf_analyticsadmin_properties_patch() -> Command {
785        Command::new("analyticsadmin.properties.patch")
786            .visible_alias("patch")
787            .about("Updates a property.")
788            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
789                .help("Identifier. Resource name of this property. Format: properties/{property_id} Example: \"properties/1000\""))
790            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
791                .help("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the enti"))
792            .args(escape_hatch_args())
793    }
794
795    // analyticsadmin.properties.runAccessReport
796    fn leaf_analyticsadmin_properties_run_access_report() -> Command {
797        Command::new("analyticsadmin.properties.runAccessReport")
798            .visible_alias("runAccessReport")
799            .about("Returns a customized report of data access records. The report provides records of each time a user...")
800            .long_about("Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions tha")
801            .arg(Arg::new("entity").long("entity").value_name("ENTITY").required(true)
802                .help("The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for"))
803            .args(escape_hatch_args())
804    }
805
806    // analyticsadmin.properties.updateDataRetentionSettings
807    fn leaf_analyticsadmin_properties_update_data_retention_settings() -> Command {
808        Command::new("analyticsadmin.properties.updateDataRetentionSettings")
809            .visible_alias("updateDataRetentionSettings")
810            .about("Updates the singleton data retention settings for this property.")
811            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
812                .help("Identifier. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings"))
813            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
814                .help("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the enti"))
815            .args(escape_hatch_args())
816    }
817
818    // analyticsadmin.properties
819    fn group_analyticsadmin_properties() -> Command {
820        Command::new("properties")
821            .about("Methods under analyticsadmin.properties")
822            .subcommand_required(true)
823            .subcommand(leaf_analyticsadmin_properties_acknowledge_user_data_collection())
824            .subcommand(group_analyticsadmin_properties_conversion_events())
825            .subcommand(leaf_analyticsadmin_properties_create())
826            .subcommand(group_analyticsadmin_properties_custom_dimensions())
827            .subcommand(group_analyticsadmin_properties_custom_metrics())
828            .subcommand(group_analyticsadmin_properties_data_streams())
829            .subcommand(leaf_analyticsadmin_properties_delete())
830            .subcommand(group_analyticsadmin_properties_firebase_links())
831            .subcommand(leaf_analyticsadmin_properties_get())
832            .subcommand(leaf_analyticsadmin_properties_get_data_retention_settings())
833            .subcommand(group_analyticsadmin_properties_google_ads_links())
834            .subcommand(group_analyticsadmin_properties_key_events())
835            .subcommand(leaf_analyticsadmin_properties_list())
836            .subcommand(leaf_analyticsadmin_properties_patch())
837            .subcommand(leaf_analyticsadmin_properties_run_access_report())
838            .subcommand(leaf_analyticsadmin_properties_update_data_retention_settings())
839    }
840
841    // analyticsadmin
842    fn service_analyticsadmin() -> Command {
843        Command::new("analyticsadmin")
844            .about("Google Analytics Admin API operations (v1beta, 55 methods)")
845            .subcommand_required(true)
846            .subcommand(group_analyticsadmin_accounts())
847            .subcommand(group_analyticsadmin_account_summaries())
848            .subcommand(group_analyticsadmin_properties())
849    }
850
851    // analyticsdata.properties.audienceExports.create
852    fn leaf_analyticsdata_properties_audience_exports_create() -> Command {
853        Command::new("analyticsdata.properties.audienceExports.create")
854            .visible_alias("create")
855            .about("Creates an audience export for later retrieval. This method quickly returns the audience export's...")
856            .long_about("Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send")
857            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
858                .help("Required. The parent resource where this audience export will be created. Format: `properties/{property}`"))
859            .args(escape_hatch_args())
860    }
861
862    // analyticsdata.properties.audienceExports.get
863    fn leaf_analyticsdata_properties_audience_exports_get() -> Command {
864        Command::new("analyticsdata.properties.audienceExports.get")
865            .visible_alias("get")
866            .about("Gets configuration metadata about a specific audience export. This method can be used to understand...")
867            .long_about("Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See Creating an Audience Export for an introduction to Audienc")
868            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
869                .help("Required. The audience export resource name. Format: `properties/{property}/audienceExports/{audience_export}`"))
870            .args(escape_hatch_args())
871    }
872
873    // analyticsdata.properties.audienceExports.list
874    fn leaf_analyticsdata_properties_audience_exports_list() -> Command {
875        Command::new("analyticsdata.properties.audienceExports.list")
876            .visible_alias("list")
877            .about("Lists all audience exports for a property. This method can be used for you to find and reuse...")
878            .long_about("Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different")
879            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
880                .help("Optional. The maximum number of audience exports to return. The service may return fewer than this value. If unspecified, at most 200 audience exports will be r"))
881            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
882                .help("Optional. A page token, received from a previous `ListAudienceExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters"))
883            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
884                .help("Required. All audience exports for this property will be listed in the response. Format: `properties/{property}`"))
885            .args(escape_hatch_args())
886    }
887
888    // analyticsdata.properties.audienceExports.query
889    fn leaf_analyticsdata_properties_audience_exports_query() -> Command {
890        Command::new("analyticsdata.properties.audienceExports.query")
891            .visible_alias("query")
892            .about("Retrieves an audience export of users. After creating an audience, the users are not immediately...")
893            .long_about("Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export.")
894            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
895                .help("Required. The name of the audience export to retrieve users from. Format: `properties/{property}/audienceExports/{audience_export}`"))
896            .args(escape_hatch_args())
897    }
898
899    // analyticsdata.properties.audienceExports
900    fn group_analyticsdata_properties_audience_exports() -> Command {
901        Command::new("audienceExports")
902            .about("Methods under analyticsdata.properties.audienceExports")
903            .subcommand_required(true)
904            .subcommand(leaf_analyticsdata_properties_audience_exports_create())
905            .subcommand(leaf_analyticsdata_properties_audience_exports_get())
906            .subcommand(leaf_analyticsdata_properties_audience_exports_list())
907            .subcommand(leaf_analyticsdata_properties_audience_exports_query())
908    }
909
910    // analyticsdata.properties.batchRunPivotReports
911    fn leaf_analyticsdata_properties_batch_run_pivot_reports() -> Command {
912        Command::new("analyticsdata.properties.batchRunPivotReports")
913            .visible_alias("batchRunPivotReports")
914            .about("Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics...")
915            .long_about("Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.")
916            .arg(Arg::new("property").long("property").value_name("PROPERTY").required(true)
917                .help("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID]"))
918            .args(escape_hatch_args())
919    }
920
921    // analyticsdata.properties.batchRunReports
922    fn leaf_analyticsdata_properties_batch_run_reports() -> Command {
923        Command::new("analyticsdata.properties.batchRunReports")
924            .visible_alias("batchRunReports")
925            .about("Returns multiple reports in a batch. All reports must be for the same Google Analytics property.")
926            .arg(Arg::new("property").long("property").value_name("PROPERTY").required(true)
927                .help("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID]"))
928            .args(escape_hatch_args())
929    }
930
931    // analyticsdata.properties.checkCompatibility
932    fn leaf_analyticsdata_properties_check_compatibility() -> Command {
933        Command::new("analyticsdata.properties.checkCompatibility")
934            .visible_alias("checkCompatibility")
935            .about("This compatibility method lists dimensions and metrics that can be added to a report request and...")
936            .long_about("This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case,")
937            .arg(Arg::new("property").long("property").value_name("PROPERTY").required(true)
938                .help("A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/dev"))
939            .args(escape_hatch_args())
940    }
941
942    // analyticsdata.properties.getMetadata
943    fn leaf_analyticsdata_properties_get_metadata() -> Command {
944        Command::new("analyticsdata.properties.getMetadata")
945            .visible_alias("getMetadata")
946            .about("Returns metadata for dimensions and metrics available in reporting methods. Used to explore the...")
947            .long_about("Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata.")
948            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
949                .help("Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analy"))
950            .args(escape_hatch_args())
951    }
952
953    // analyticsdata.properties.runPivotReport
954    fn leaf_analyticsdata_properties_run_pivot_report() -> Command {
955        Command::new("analyticsdata.properties.runPivotReport")
956            .visible_alias("runPivotReport")
957            .about("Returns a customized pivot report of your Google Analytics event data. Pivot reports are more...")
958            .long_about("Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.")
959            .arg(Arg::new("property").long("property").value_name("PROPERTY").required(true)
960                .help("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID]"))
961            .args(escape_hatch_args())
962    }
963
964    // analyticsdata.properties.runRealtimeReport
965    fn leaf_analyticsdata_properties_run_realtime_report() -> Command {
966        Command::new("analyticsdata.properties.runRealtimeReport")
967            .visible_alias("runRealtimeReport")
968            .about("Returns a customized report of realtime event data for your property. Events appear in realtime...")
969            .long_about("Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes f")
970            .arg(Arg::new("property").long("property").value_name("PROPERTY").required(true)
971                .help("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID]"))
972            .args(escape_hatch_args())
973    }
974
975    // analyticsdata.properties.runReport
976    fn leaf_analyticsdata_properties_run_report() -> Command {
977        Command::new("analyticsdata.properties.runReport")
978            .visible_alias("runReport")
979            .about("Returns a customized report of your Google Analytics event data. Reports contain statistics derived...")
980            .long_about("Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of us")
981            .arg(Arg::new("property").long("property").value_name("PROPERTY").required(true)
982                .help("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID]"))
983            .args(escape_hatch_args())
984    }
985
986    // analyticsdata.properties
987    fn group_analyticsdata_properties() -> Command {
988        Command::new("properties")
989            .about("Methods under analyticsdata.properties")
990            .subcommand_required(true)
991            .subcommand(group_analyticsdata_properties_audience_exports())
992            .subcommand(leaf_analyticsdata_properties_batch_run_pivot_reports())
993            .subcommand(leaf_analyticsdata_properties_batch_run_reports())
994            .subcommand(leaf_analyticsdata_properties_check_compatibility())
995            .subcommand(leaf_analyticsdata_properties_get_metadata())
996            .subcommand(leaf_analyticsdata_properties_run_pivot_report())
997            .subcommand(leaf_analyticsdata_properties_run_realtime_report())
998            .subcommand(leaf_analyticsdata_properties_run_report())
999    }
1000
1001    // analyticsdata
1002    fn service_analyticsdata() -> Command {
1003        Command::new("analyticsdata")
1004            .about("Google Analytics Data API operations (v1beta, 11 methods)")
1005            .subcommand_required(true)
1006            .subcommand(group_analyticsdata_properties())
1007    }
1008
1009    // calendar.acl.delete
1010    fn leaf_calendar_acl_delete() -> Command {
1011        Command::new("calendar.acl.delete")
1012            .visible_alias("delete")
1013            .about("Deletes an access control rule.")
1014            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1015                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1016            .arg(Arg::new("rule-id").long("rule-id").value_name("RULE_ID").required(true)
1017                .help("ACL rule identifier."))
1018            .args(escape_hatch_args())
1019    }
1020
1021    // calendar.acl.get
1022    fn leaf_calendar_acl_get() -> Command {
1023        Command::new("calendar.acl.get")
1024            .visible_alias("get")
1025            .about("Returns an access control rule.")
1026            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1027                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1028            .arg(Arg::new("rule-id").long("rule-id").value_name("RULE_ID").required(true)
1029                .help("ACL rule identifier."))
1030            .args(escape_hatch_args())
1031    }
1032
1033    // calendar.acl.insert
1034    fn leaf_calendar_acl_insert() -> Command {
1035        Command::new("calendar.acl.insert")
1036            .visible_alias("insert")
1037            .about("Creates an access control rule.")
1038            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1039                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1040            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1041                .help("Whether to send notifications about the calendar sharing change. Optional. The default is True."))
1042            .args(escape_hatch_args())
1043    }
1044
1045    // calendar.acl.list
1046    fn leaf_calendar_acl_list() -> Command {
1047        Command::new("calendar.acl.list")
1048            .visible_alias("list")
1049            .about("Returns the rules in the access control list for the calendar.")
1050            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1051                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1052            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1053                .help("Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional."))
1054            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1055                .help("Token specifying which result page to return. Optional."))
1056            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
1057                .help("Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to \"none\". Deleted ACLs will always be included if syncToken is provid"))
1058            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1059                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1060            .args(escape_hatch_args())
1061    }
1062
1063    // calendar.acl.patch
1064    fn leaf_calendar_acl_patch() -> Command {
1065        Command::new("calendar.acl.patch")
1066            .visible_alias("patch")
1067            .about("Updates an access control rule. This method supports patch semantics.")
1068            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1069                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1070            .arg(Arg::new("rule-id").long("rule-id").value_name("RULE_ID").required(true)
1071                .help("ACL rule identifier."))
1072            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1073                .help("Whether to send notifications about the calendar sharing change. Note that there are no notifications on access removal. Optional. The default is True."))
1074            .args(escape_hatch_args())
1075    }
1076
1077    // calendar.acl.update
1078    fn leaf_calendar_acl_update() -> Command {
1079        Command::new("calendar.acl.update")
1080            .visible_alias("update")
1081            .about("Updates an access control rule.")
1082            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1083                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1084            .arg(Arg::new("rule-id").long("rule-id").value_name("RULE_ID").required(true)
1085                .help("ACL rule identifier."))
1086            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1087                .help("Whether to send notifications about the calendar sharing change. Note that there are no notifications on access removal. Optional. The default is True."))
1088            .args(escape_hatch_args())
1089    }
1090
1091    // calendar.acl.watch
1092    fn leaf_calendar_acl_watch() -> Command {
1093        Command::new("calendar.acl.watch")
1094            .visible_alias("watch")
1095            .about("Watch for changes to ACL resources.")
1096            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1097                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1098            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1099                .help("Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional."))
1100            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1101                .help("Token specifying which result page to return. Optional."))
1102            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
1103                .help("Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to \"none\". Deleted ACLs will always be included if syncToken is provid"))
1104            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1105                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1106            .args(escape_hatch_args())
1107    }
1108
1109    // calendar.acl
1110    fn group_calendar_acl() -> Command {
1111        Command::new("acl")
1112            .about("Methods under calendar.acl")
1113            .subcommand_required(true)
1114            .subcommand(leaf_calendar_acl_delete())
1115            .subcommand(leaf_calendar_acl_get())
1116            .subcommand(leaf_calendar_acl_insert())
1117            .subcommand(leaf_calendar_acl_list())
1118            .subcommand(leaf_calendar_acl_patch())
1119            .subcommand(leaf_calendar_acl_update())
1120            .subcommand(leaf_calendar_acl_watch())
1121    }
1122
1123    // calendar.calendarList.delete
1124    fn leaf_calendar_calendar_list_delete() -> Command {
1125        Command::new("calendar.calendarList.delete")
1126            .visible_alias("delete")
1127            .about("Removes a calendar from the user's calendar list.")
1128            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1129                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1130            .args(escape_hatch_args())
1131    }
1132
1133    // calendar.calendarList.get
1134    fn leaf_calendar_calendar_list_get() -> Command {
1135        Command::new("calendar.calendarList.get")
1136            .visible_alias("get")
1137            .about("Returns a calendar from the user's calendar list.")
1138            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1139                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1140            .args(escape_hatch_args())
1141    }
1142
1143    // calendar.calendarList.insert
1144    fn leaf_calendar_calendar_list_insert() -> Command {
1145        Command::new("calendar.calendarList.insert")
1146            .visible_alias("insert")
1147            .about("Inserts an existing calendar into the user's calendar list.")
1148            .arg(Arg::new("color-rgb-format").long("color-rgb-format").action(ArgAction::SetTrue)
1149                .help("Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be"))
1150            .args(escape_hatch_args())
1151    }
1152
1153    // calendar.calendarList.list
1154    fn leaf_calendar_calendar_list_list() -> Command {
1155        Command::new("calendar.calendarList.list")
1156            .visible_alias("list")
1157            .about("Returns the calendars on the user's calendar list.")
1158            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1159                .help("Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional."))
1160            .arg(Arg::new("min-access-role").long("min-access-role").value_name("MIN_ACCESS_ROLE").value_parser(["freeBusyReader", "owner", "reader", "writer", "writerWithoutPrivateAccess"])
1161                .help("The minimum access role for the user in the returned entries. Optional. The default is no restriction."))
1162            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1163                .help("Token specifying which result page to return. Optional."))
1164            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
1165                .help("Whether to include deleted calendar list entries in the result. Optional. The default is False."))
1166            .arg(Arg::new("show-hidden").long("show-hidden").action(ArgAction::SetTrue)
1167                .help("Whether to show hidden entries. Optional. The default is False."))
1168            .arg(Arg::new("show-own-organization-only").long("show-own-organization-only").action(ArgAction::SetTrue)
1169                .help("Whether to show only entries for calendars from the organization. This parameter is only applicable to Google Workspace users. Optional. The default is False."))
1170            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1171                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1172            .args(escape_hatch_args())
1173    }
1174
1175    // calendar.calendarList.patch
1176    fn leaf_calendar_calendar_list_patch() -> Command {
1177        Command::new("calendar.calendarList.patch")
1178            .visible_alias("patch")
1179            .about("Updates an existing calendar on the user's calendar list. This method supports patch semantics.")
1180            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1181                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1182            .arg(Arg::new("color-rgb-format").long("color-rgb-format").action(ArgAction::SetTrue)
1183                .help("Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be"))
1184            .args(escape_hatch_args())
1185    }
1186
1187    // calendar.calendarList.update
1188    fn leaf_calendar_calendar_list_update() -> Command {
1189        Command::new("calendar.calendarList.update")
1190            .visible_alias("update")
1191            .about("Updates an existing calendar on the user's calendar list.")
1192            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1193                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1194            .arg(Arg::new("color-rgb-format").long("color-rgb-format").action(ArgAction::SetTrue)
1195                .help("Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be"))
1196            .args(escape_hatch_args())
1197    }
1198
1199    // calendar.calendarList.watch
1200    fn leaf_calendar_calendar_list_watch() -> Command {
1201        Command::new("calendar.calendarList.watch")
1202            .visible_alias("watch")
1203            .about("Watch for changes to CalendarList resources.")
1204            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1205                .help("Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional."))
1206            .arg(Arg::new("min-access-role").long("min-access-role").value_name("MIN_ACCESS_ROLE").value_parser(["freeBusyReader", "owner", "reader", "writer", "writerWithoutPrivateAccess"])
1207                .help("The minimum access role for the user in the returned entries. Optional. The default is no restriction."))
1208            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1209                .help("Token specifying which result page to return. Optional."))
1210            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
1211                .help("Whether to include deleted calendar list entries in the result. Optional. The default is False."))
1212            .arg(Arg::new("show-hidden").long("show-hidden").action(ArgAction::SetTrue)
1213                .help("Whether to show hidden entries. Optional. The default is False."))
1214            .arg(Arg::new("show-own-organization-only").long("show-own-organization-only").action(ArgAction::SetTrue)
1215                .help("Whether to show only entries for calendars from the organization. This parameter is only applicable to Google Workspace users. Optional. The default is False."))
1216            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1217                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1218            .args(escape_hatch_args())
1219    }
1220
1221    // calendar.calendarList
1222    fn group_calendar_calendar_list() -> Command {
1223        Command::new("calendarList")
1224            .about("Methods under calendar.calendarList")
1225            .subcommand_required(true)
1226            .subcommand(leaf_calendar_calendar_list_delete())
1227            .subcommand(leaf_calendar_calendar_list_get())
1228            .subcommand(leaf_calendar_calendar_list_insert())
1229            .subcommand(leaf_calendar_calendar_list_list())
1230            .subcommand(leaf_calendar_calendar_list_patch())
1231            .subcommand(leaf_calendar_calendar_list_update())
1232            .subcommand(leaf_calendar_calendar_list_watch())
1233    }
1234
1235    // calendar.calendars.clear
1236    fn leaf_calendar_calendars_clear() -> Command {
1237        Command::new("calendar.calendars.clear")
1238            .visible_alias("clear")
1239            .about("Clears a primary calendar. This operation deletes all events associated with the primary calendar...")
1240            .long_about("Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account.")
1241            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1242                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1243            .args(escape_hatch_args())
1244    }
1245
1246    // calendar.calendars.delete
1247    fn leaf_calendar_calendars_delete() -> Command {
1248        Command::new("calendar.calendars.delete")
1249            .visible_alias("delete")
1250            .about("Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.")
1251            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1252                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1253            .args(escape_hatch_args())
1254    }
1255
1256    // calendar.calendars.get
1257    fn leaf_calendar_calendars_get() -> Command {
1258        Command::new("calendar.calendars.get")
1259            .visible_alias("get")
1260            .about("Returns metadata for a calendar.")
1261            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1262                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1263            .args(escape_hatch_args())
1264    }
1265
1266    // calendar.calendars.insert
1267    fn leaf_calendar_calendars_insert() -> Command {
1268        Command::new("calendar.calendars.insert")
1269            .visible_alias("insert")
1270            .about("Creates a secondary calendar. The authenticated user for the request is made the data owner of the...")
1271            .long_about("Creates a secondary calendar. The authenticated user for the request is made the data owner of the new calendar. Note: We recommend to authenticate as the intended data owner of the calendar. You can use domain-wide delegation of authority to allow applications to act on behalf of a specific user. D")
1272            .args(escape_hatch_args())
1273    }
1274
1275    // calendar.calendars.patch
1276    fn leaf_calendar_calendars_patch() -> Command {
1277        Command::new("calendar.calendars.patch")
1278            .visible_alias("patch")
1279            .about("Updates metadata for a calendar. This method supports patch semantics.")
1280            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1281                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1282            .args(escape_hatch_args())
1283    }
1284
1285    // calendar.calendars.transferOwnership
1286    fn leaf_calendar_calendars_transfer_ownership() -> Command {
1287        Command::new("calendar.calendars.transferOwnership")
1288            .visible_alias("transferOwnership")
1289            .about("Transfers a secondary calendar between users within a Google Workspace organization. Requires user...")
1290            .long_about("Transfers a secondary calendar between users within a Google Workspace organization. Requires user authentication with Manage Calendars administrator privilege, and one of the following authorization scopes: - https://www.googleapis.com/auth/calendar - https://www.googleapis.com/auth/calendar.calend")
1291            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1292                .help("Calendar identifier. To retrieve calendar IDs, call the calendarList.list method."))
1293            .arg(Arg::new("new-data-owner").long("new-data-owner").value_name("NEW_DATA_OWNER").required(true)
1294                .help("The email address of a user who will become the data owner of the calendar."))
1295            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue).required(true)
1296                .help("When true, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the Manage"))
1297            .args(escape_hatch_args())
1298    }
1299
1300    // calendar.calendars.update
1301    fn leaf_calendar_calendars_update() -> Command {
1302        Command::new("calendar.calendars.update")
1303            .visible_alias("update")
1304            .about("Updates metadata for a calendar.")
1305            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1306                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1307            .args(escape_hatch_args())
1308    }
1309
1310    // calendar.calendars
1311    fn group_calendar_calendars() -> Command {
1312        Command::new("calendars")
1313            .about("Methods under calendar.calendars")
1314            .subcommand_required(true)
1315            .subcommand(leaf_calendar_calendars_clear())
1316            .subcommand(leaf_calendar_calendars_delete())
1317            .subcommand(leaf_calendar_calendars_get())
1318            .subcommand(leaf_calendar_calendars_insert())
1319            .subcommand(leaf_calendar_calendars_patch())
1320            .subcommand(leaf_calendar_calendars_transfer_ownership())
1321            .subcommand(leaf_calendar_calendars_update())
1322    }
1323
1324    // calendar.channels.stop
1325    fn leaf_calendar_channels_stop() -> Command {
1326        Command::new("calendar.channels.stop")
1327            .visible_alias("stop")
1328            .about("Stop watching resources through this channel")
1329            .args(escape_hatch_args())
1330    }
1331
1332    // calendar.channels
1333    fn group_calendar_channels() -> Command {
1334        Command::new("channels")
1335            .about("Methods under calendar.channels")
1336            .subcommand_required(true)
1337            .subcommand(leaf_calendar_channels_stop())
1338    }
1339
1340    // calendar.colors.get
1341    fn leaf_calendar_colors_get() -> Command {
1342        Command::new("calendar.colors.get")
1343            .visible_alias("get")
1344            .about("Returns the color definitions for calendars and events.")
1345            .args(escape_hatch_args())
1346    }
1347
1348    // calendar.colors
1349    fn group_calendar_colors() -> Command {
1350        Command::new("colors")
1351            .about("Methods under calendar.colors")
1352            .subcommand_required(true)
1353            .subcommand(leaf_calendar_colors_get())
1354    }
1355
1356    // calendar.events.delete
1357    fn leaf_calendar_events_delete() -> Command {
1358        Command::new("calendar.events.delete")
1359            .visible_alias("delete")
1360            .about("Deletes an event.")
1361            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1362                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1363            .arg(Arg::new("event-id").long("event-id").value_name("EVENT_ID").required(true)
1364                .help("Event identifier."))
1365            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1366                .help("Deprecated. Please use sendUpdates instead. Whether to send notifications about the deletion of the event. Note that some emails might still be sent even if you"))
1367            .arg(Arg::new("send-updates").long("send-updates").value_name("SEND_UPDATES").value_parser(["all", "externalOnly", "none"])
1368                .help("Guests who should receive notifications about the deletion of the event."))
1369            .args(escape_hatch_args())
1370    }
1371
1372    // calendar.events.get
1373    fn leaf_calendar_events_get() -> Command {
1374        Command::new("calendar.events.get")
1375            .visible_alias("get")
1376            .about("Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call...")
1377            .long_about("Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the events.list method using the iCalUID parameter.")
1378            .arg(Arg::new("always-include-email").long("always-include-email").action(ArgAction::SetTrue)
1379                .help("Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available"))
1380            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1381                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1382            .arg(Arg::new("event-id").long("event-id").value_name("EVENT_ID").required(true)
1383                .help("Event identifier."))
1384            .arg(Arg::new("max-attendees").long("max-attendees").value_name("MAX_ATTENDEES").value_parser(clap::value_parser!(i64))
1385                .help("The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional"))
1386            .arg(Arg::new("time-zone").long("time-zone").value_name("TIME_ZONE")
1387                .help("Time zone used in the response. Optional. The default is the time zone of the calendar."))
1388            .args(escape_hatch_args())
1389    }
1390
1391    // calendar.events.import
1392    fn leaf_calendar_events_import() -> Command {
1393        Command::new("calendar.events.import")
1394            .visible_alias("import")
1395            .about("Imports an event. This operation is used to add a private copy of an existing event to a calendar...")
1396            .long_about("Imports an event. This operation is used to add a private copy of an existing event to a calendar. Only events with an eventType of default may be imported. Deprecated behavior: If a non-default event is imported, its type will be changed to default and any event-type-specific properties it may have")
1397            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1398                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1399            .arg(Arg::new("conference-data-version").long("conference-data-version").value_name("CONFERENCE_DATA_VERSION").value_parser(clap::value_parser!(i64))
1400                .help("Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Ver"))
1401            .arg(Arg::new("event-label-version").long("event-label-version").value_name("EVENT_LABEL_VERSION").value_parser(clap::value_parser!(i64))
1402                .help("Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color manage"))
1403            .arg(Arg::new("supports-attachments").long("supports-attachments").action(ArgAction::SetTrue)
1404                .help("Whether API client performing operation supports event attachments. Optional. The default is False."))
1405            .args(escape_hatch_args())
1406    }
1407
1408    // calendar.events.insert
1409    fn leaf_calendar_events_insert() -> Command {
1410        Command::new("calendar.events.insert")
1411            .visible_alias("insert")
1412            .about("Creates an event.")
1413            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1414                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1415            .arg(Arg::new("conference-data-version").long("conference-data-version").value_name("CONFERENCE_DATA_VERSION").value_parser(clap::value_parser!(i64))
1416                .help("Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Ver"))
1417            .arg(Arg::new("event-label-version").long("event-label-version").value_name("EVENT_LABEL_VERSION").value_parser(clap::value_parser!(i64))
1418                .help("Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color manage"))
1419            .arg(Arg::new("max-attendees").long("max-attendees").value_name("MAX_ATTENDEES").value_parser(clap::value_parser!(i64))
1420                .help("The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional"))
1421            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1422                .help("Deprecated. Please use sendUpdates instead. Whether to send notifications about the creation of the new event. Note that some emails might still be sent even if"))
1423            .arg(Arg::new("send-updates").long("send-updates").value_name("SEND_UPDATES").value_parser(["all", "externalOnly", "none"])
1424                .help("Whether to send notifications about the creation of the new event. Note that some emails might still be sent. The default is false."))
1425            .arg(Arg::new("supports-attachments").long("supports-attachments").action(ArgAction::SetTrue)
1426                .help("Whether API client performing operation supports event attachments. Optional. The default is False."))
1427            .args(escape_hatch_args())
1428    }
1429
1430    // calendar.events.instances
1431    fn leaf_calendar_events_instances() -> Command {
1432        Command::new("calendar.events.instances")
1433            .visible_alias("instances")
1434            .about("Returns instances of the specified recurring event.")
1435            .arg(Arg::new("always-include-email").long("always-include-email").action(ArgAction::SetTrue)
1436                .help("Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available"))
1437            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1438                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1439            .arg(Arg::new("event-id").long("event-id").value_name("EVENT_ID").required(true)
1440                .help("Recurring event identifier."))
1441            .arg(Arg::new("max-attendees").long("max-attendees").value_name("MAX_ATTENDEES").value_parser(clap::value_parser!(i64))
1442                .help("The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional"))
1443            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1444                .help("Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional."))
1445            .arg(Arg::new("original-start").long("original-start").value_name("ORIGINAL_START")
1446                .help("The original start time of the instance in the result. Optional."))
1447            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1448                .help("Token specifying which result page to return. Optional."))
1449            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
1450                .help("Whether to include deleted events (with status equals \"cancelled\") in the result. Cancelled instances of recurring events will still be included if singleEvents"))
1451            .arg(Arg::new("time-max").long("time-max").value_name("TIME_MAX")
1452                .help("Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandator"))
1453            .arg(Arg::new("time-min").long("time-min").value_name("TIME_MIN")
1454                .help("Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory ti"))
1455            .arg(Arg::new("time-zone").long("time-zone").value_name("TIME_ZONE")
1456                .help("Time zone used in the response. Optional. The default is the time zone of the calendar."))
1457            .args(escape_hatch_args())
1458    }
1459
1460    // calendar.events.list
1461    fn leaf_calendar_events_list() -> Command {
1462        Command::new("calendar.events.list")
1463            .visible_alias("list")
1464            .about("Returns events on the specified calendar.")
1465            .arg(Arg::new("always-include-email").long("always-include-email").action(ArgAction::SetTrue)
1466                .help("Deprecated and ignored."))
1467            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1468                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1469            .arg(Arg::new("event-types").long("event-types").value_name("EVENT_TYPES").action(ArgAction::Append)
1470                .help("Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types."))
1471            .arg(Arg::new("i-cal-uid").long("i-cal-uid").value_name("I_CAL_UID")
1472                .help("Specifies an event ID in the iCalendar format to be provided in the response. Optional. Use this if you want to search for an event by its iCalendar ID."))
1473            .arg(Arg::new("max-attendees").long("max-attendees").value_name("MAX_ATTENDEES").value_parser(clap::value_parser!(i64))
1474                .help("The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional"))
1475            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1476                .help("Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are"))
1477            .arg(Arg::new("order-by").long("order-by").value_name("ORDER_BY").value_parser(["startTime", "updated"])
1478                .help("The order of the events returned in the result. Optional. The default is an unspecified, stable order."))
1479            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1480                .help("Token specifying which result page to return. Optional."))
1481            .arg(Arg::new("private-extended-property").long("private-extended-property").value_name("PRIVATE_EXTENDED_PROPERTY").action(ArgAction::Append)
1482                .help("Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return event"))
1483            .arg(Arg::new("q").long("q").value_name("Q")
1484                .help("Free text search terms to find events that match these terms in the following fields: - summary - description - location - attendee's displayName - attendee's e"))
1485            .arg(Arg::new("shared-extended-property").long("shared-extended-property").value_name("SHARED_EXTENDED_PROPERTY").action(ArgAction::Append)
1486                .help("Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events"))
1487            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
1488                .help("Whether to include deleted events (with status equals \"cancelled\") in the result. Cancelled instances of recurring events (but not the underlying recurring even"))
1489            .arg(Arg::new("show-hidden-invitations").long("show-hidden-invitations").action(ArgAction::SetTrue)
1490                .help("Whether to include hidden invitations in the result. Optional. The default is False."))
1491            .arg(Arg::new("single-events").long("single-events").action(ArgAction::SetTrue)
1492                .help("Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring even"))
1493            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1494                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1495            .arg(Arg::new("time-max").long("time-max").value_name("TIME_MAX")
1496                .help("Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandator"))
1497            .arg(Arg::new("time-min").long("time-min").value_name("TIME_MIN")
1498                .help("Lower bound (exclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory ti"))
1499            .arg(Arg::new("time-zone").long("time-zone").value_name("TIME_ZONE")
1500                .help("Time zone used in the response. Optional. The default is the time zone of the calendar."))
1501            .arg(Arg::new("updated-min").long("updated-min").value_name("UPDATED_MIN")
1502                .help("Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included"))
1503            .args(escape_hatch_args())
1504    }
1505
1506    // calendar.events.move
1507    fn leaf_calendar_events_move() -> Command {
1508        Command::new("calendar.events.move")
1509            .visible_alias("move")
1510            .about("Moves an event to another calendar, i.e. changes an event's organizer. Note that only default...")
1511            .long_about("Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; birthday, focusTime, fromGmail, outOfOffice and workingLocation events cannot be moved.")
1512            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1513                .help("Calendar identifier of the source calendar where the event currently is on."))
1514            .arg(Arg::new("destination").long("destination").value_name("DESTINATION").required(true)
1515                .help("Calendar identifier of the target calendar where the event is to be moved to."))
1516            .arg(Arg::new("event-id").long("event-id").value_name("EVENT_ID").required(true)
1517                .help("Event identifier."))
1518            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1519                .help("Deprecated. Please use sendUpdates instead. Whether to send notifications about the change of the event's organizer. Note that some emails might still be sent e"))
1520            .arg(Arg::new("send-updates").long("send-updates").value_name("SEND_UPDATES").value_parser(["all", "externalOnly", "none"])
1521                .help("Guests who should receive notifications about the change of the event's organizer."))
1522            .args(escape_hatch_args())
1523    }
1524
1525    // calendar.events.patch
1526    fn leaf_calendar_events_patch() -> Command {
1527        Command::new("calendar.events.patch")
1528            .visible_alias("patch")
1529            .about("Updates an event. This method supports patch semantics.")
1530            .arg(Arg::new("always-include-email").long("always-include-email").action(ArgAction::SetTrue)
1531                .help("Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available"))
1532            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1533                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1534            .arg(Arg::new("conference-data-version").long("conference-data-version").value_name("CONFERENCE_DATA_VERSION").value_parser(clap::value_parser!(i64))
1535                .help("Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Ver"))
1536            .arg(Arg::new("event-id").long("event-id").value_name("EVENT_ID").required(true)
1537                .help("Event identifier."))
1538            .arg(Arg::new("event-label-version").long("event-label-version").value_name("EVENT_LABEL_VERSION").value_parser(clap::value_parser!(i64))
1539                .help("Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color manage"))
1540            .arg(Arg::new("max-attendees").long("max-attendees").value_name("MAX_ATTENDEES").value_parser(clap::value_parser!(i64))
1541                .help("The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional"))
1542            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1543                .help("Deprecated. Please use sendUpdates instead. Whether to send notifications about the event update (for example, description changes, etc.). Note that some emails"))
1544            .arg(Arg::new("send-updates").long("send-updates").value_name("SEND_UPDATES").value_parser(["all", "externalOnly", "none"])
1545                .help("Guests who should receive notifications about the event update (for example, title changes, etc.)."))
1546            .arg(Arg::new("supports-attachments").long("supports-attachments").action(ArgAction::SetTrue)
1547                .help("Whether API client performing operation supports event attachments. Optional. The default is False."))
1548            .args(escape_hatch_args())
1549    }
1550
1551    // calendar.events.quickAdd
1552    fn leaf_calendar_events_quick_add() -> Command {
1553        Command::new("calendar.events.quickAdd")
1554            .visible_alias("quickAdd")
1555            .about("Creates an event based on a simple text string.")
1556            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1557                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1558            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1559                .help("Deprecated. Please use sendUpdates instead. Whether to send notifications about the creation of the event. Note that some emails might still be sent even if you"))
1560            .arg(Arg::new("send-updates").long("send-updates").value_name("SEND_UPDATES").value_parser(["all", "externalOnly", "none"])
1561                .help("Guests who should receive notifications about the creation of the new event."))
1562            .arg(Arg::new("text").long("text").value_name("TEXT").required(true)
1563                .help("The text describing the event to be created."))
1564            .args(escape_hatch_args())
1565    }
1566
1567    // calendar.events.update
1568    fn leaf_calendar_events_update() -> Command {
1569        Command::new("calendar.events.update")
1570            .visible_alias("update")
1571            .about("Updates an event.")
1572            .arg(Arg::new("always-include-email").long("always-include-email").action(ArgAction::SetTrue)
1573                .help("Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available"))
1574            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1575                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1576            .arg(Arg::new("conference-data-version").long("conference-data-version").value_name("CONFERENCE_DATA_VERSION").value_parser(clap::value_parser!(i64))
1577                .help("Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Ver"))
1578            .arg(Arg::new("event-id").long("event-id").value_name("EVENT_ID").required(true)
1579                .help("Event identifier."))
1580            .arg(Arg::new("event-label-version").long("event-label-version").value_name("EVENT_LABEL_VERSION").value_parser(clap::value_parser!(i64))
1581                .help("Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color manage"))
1582            .arg(Arg::new("max-attendees").long("max-attendees").value_name("MAX_ATTENDEES").value_parser(clap::value_parser!(i64))
1583                .help("The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional"))
1584            .arg(Arg::new("send-notifications").long("send-notifications").action(ArgAction::SetTrue)
1585                .help("Deprecated. Please use sendUpdates instead. Whether to send notifications about the event update (for example, description changes, etc.). Note that some emails"))
1586            .arg(Arg::new("send-updates").long("send-updates").value_name("SEND_UPDATES").value_parser(["all", "externalOnly", "none"])
1587                .help("Guests who should receive notifications about the event update (for example, title changes, etc.)."))
1588            .arg(Arg::new("supports-attachments").long("supports-attachments").action(ArgAction::SetTrue)
1589                .help("Whether API client performing operation supports event attachments. Optional. The default is False."))
1590            .args(escape_hatch_args())
1591    }
1592
1593    // calendar.events.watch
1594    fn leaf_calendar_events_watch() -> Command {
1595        Command::new("calendar.events.watch")
1596            .visible_alias("watch")
1597            .about("Watch for changes to Events resources.")
1598            .arg(Arg::new("always-include-email").long("always-include-email").action(ArgAction::SetTrue)
1599                .help("Deprecated and ignored."))
1600            .arg(Arg::new("calendar-id").long("calendar-id").value_name("CALENDAR_ID").required(true)
1601                .help("Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use"))
1602            .arg(Arg::new("event-types").long("event-types").value_name("EVENT_TYPES").action(ArgAction::Append)
1603                .help("Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types."))
1604            .arg(Arg::new("i-cal-uid").long("i-cal-uid").value_name("I_CAL_UID")
1605                .help("Specifies an event ID in the iCalendar format to be provided in the response. Optional. Use this if you want to search for an event by its iCalendar ID."))
1606            .arg(Arg::new("max-attendees").long("max-attendees").value_name("MAX_ATTENDEES").value_parser(clap::value_parser!(i64))
1607                .help("The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional"))
1608            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1609                .help("Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are"))
1610            .arg(Arg::new("order-by").long("order-by").value_name("ORDER_BY").value_parser(["startTime", "updated"])
1611                .help("The order of the events returned in the result. Optional. The default is an unspecified, stable order."))
1612            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1613                .help("Token specifying which result page to return. Optional."))
1614            .arg(Arg::new("private-extended-property").long("private-extended-property").value_name("PRIVATE_EXTENDED_PROPERTY").action(ArgAction::Append)
1615                .help("Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return event"))
1616            .arg(Arg::new("q").long("q").value_name("Q")
1617                .help("Free text search terms to find events that match these terms in the following fields: - summary - description - location - attendee's displayName - attendee's e"))
1618            .arg(Arg::new("shared-extended-property").long("shared-extended-property").value_name("SHARED_EXTENDED_PROPERTY").action(ArgAction::Append)
1619                .help("Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events"))
1620            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
1621                .help("Whether to include deleted events (with status equals \"cancelled\") in the result. Cancelled instances of recurring events (but not the underlying recurring even"))
1622            .arg(Arg::new("show-hidden-invitations").long("show-hidden-invitations").action(ArgAction::SetTrue)
1623                .help("Whether to include hidden invitations in the result. Optional. The default is False."))
1624            .arg(Arg::new("single-events").long("single-events").action(ArgAction::SetTrue)
1625                .help("Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring even"))
1626            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1627                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1628            .arg(Arg::new("time-max").long("time-max").value_name("TIME_MAX")
1629                .help("Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandator"))
1630            .arg(Arg::new("time-min").long("time-min").value_name("TIME_MIN")
1631                .help("Lower bound (exclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory ti"))
1632            .arg(Arg::new("time-zone").long("time-zone").value_name("TIME_ZONE")
1633                .help("Time zone used in the response. Optional. The default is the time zone of the calendar."))
1634            .arg(Arg::new("updated-min").long("updated-min").value_name("UPDATED_MIN")
1635                .help("Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included"))
1636            .args(escape_hatch_args())
1637    }
1638
1639    // calendar.events
1640    fn group_calendar_events() -> Command {
1641        Command::new("events")
1642            .about("Methods under calendar.events")
1643            .subcommand_required(true)
1644            .subcommand(leaf_calendar_events_delete())
1645            .subcommand(leaf_calendar_events_get())
1646            .subcommand(leaf_calendar_events_import())
1647            .subcommand(leaf_calendar_events_insert())
1648            .subcommand(leaf_calendar_events_instances())
1649            .subcommand(leaf_calendar_events_list())
1650            .subcommand(leaf_calendar_events_move())
1651            .subcommand(leaf_calendar_events_patch())
1652            .subcommand(leaf_calendar_events_quick_add())
1653            .subcommand(leaf_calendar_events_update())
1654            .subcommand(leaf_calendar_events_watch())
1655    }
1656
1657    // calendar.freebusy.query
1658    fn leaf_calendar_freebusy_query() -> Command {
1659        Command::new("calendar.freebusy.query")
1660            .visible_alias("query")
1661            .about("Returns free/busy information for a set of calendars.")
1662            .args(escape_hatch_args())
1663    }
1664
1665    // calendar.freebusy
1666    fn group_calendar_freebusy() -> Command {
1667        Command::new("freebusy")
1668            .about("Methods under calendar.freebusy")
1669            .subcommand_required(true)
1670            .subcommand(leaf_calendar_freebusy_query())
1671    }
1672
1673    // calendar.settings.get
1674    fn leaf_calendar_settings_get() -> Command {
1675        Command::new("calendar.settings.get")
1676            .visible_alias("get")
1677            .about("Returns a single user setting.")
1678            .arg(Arg::new("setting").long("setting").value_name("SETTING").required(true)
1679                .help("The id of the user setting."))
1680            .args(escape_hatch_args())
1681    }
1682
1683    // calendar.settings.list
1684    fn leaf_calendar_settings_list() -> Command {
1685        Command::new("calendar.settings.list")
1686            .visible_alias("list")
1687            .about("Returns all user settings for the authenticated user.")
1688            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1689                .help("Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional."))
1690            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1691                .help("Token specifying which result page to return. Optional."))
1692            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1693                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1694            .args(escape_hatch_args())
1695    }
1696
1697    // calendar.settings.watch
1698    fn leaf_calendar_settings_watch() -> Command {
1699        Command::new("calendar.settings.watch")
1700            .visible_alias("watch")
1701            .about("Watch for changes to Settings resources.")
1702            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
1703                .help("Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional."))
1704            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1705                .help("Token specifying which result page to return. Optional."))
1706            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
1707                .help("Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contai"))
1708            .args(escape_hatch_args())
1709    }
1710
1711    // calendar.settings
1712    fn group_calendar_settings() -> Command {
1713        Command::new("settings")
1714            .about("Methods under calendar.settings")
1715            .subcommand_required(true)
1716            .subcommand(leaf_calendar_settings_get())
1717            .subcommand(leaf_calendar_settings_list())
1718            .subcommand(leaf_calendar_settings_watch())
1719    }
1720
1721    // calendar
1722    fn service_calendar() -> Command {
1723        Command::new("calendar")
1724            .about("Calendar API operations (v3, 38 methods)")
1725            .subcommand_required(true)
1726            .subcommand(group_calendar_acl())
1727            .subcommand(group_calendar_calendar_list())
1728            .subcommand(group_calendar_calendars())
1729            .subcommand(group_calendar_channels())
1730            .subcommand(group_calendar_colors())
1731            .subcommand(group_calendar_events())
1732            .subcommand(group_calendar_freebusy())
1733            .subcommand(group_calendar_settings())
1734    }
1735
1736    // chat.customEmojis.create
1737    fn leaf_chat_custom_emojis_create() -> Command {
1738        Command::new("chat.customEmojis.create")
1739            .visible_alias("create")
1740            .about("Creates a custom emoji. Custom emojis are only available for Google Workspace accounts, and the...")
1741            .long_about("Creates a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and [Manage custom emoj")
1742            .args(escape_hatch_args())
1743    }
1744
1745    // chat.customEmojis.delete
1746    fn leaf_chat_custom_emojis_delete() -> Command {
1747        Command::new("chat.customEmojis.delete")
1748            .visible_alias("delete")
1749            .about("Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers...")
1750            .long_about("Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers assigned by the administrator can delete any custom emoji in the organization. See [Learn about custom emojis in Google Chat](https://support.google.com")
1751            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1752                .help("Required. Resource name of the custom emoji to delete. Format: `customEmojis/{customEmoji}` You can use the emoji name as an alias for `{customEmoji}`. For exam"))
1753            .args(escape_hatch_args())
1754    }
1755
1756    // chat.customEmojis.get
1757    fn leaf_chat_custom_emojis_get() -> Command {
1758        Command::new("chat.customEmojis.get")
1759            .visible_alias("get")
1760            .about("Returns details about a custom emoji. Custom emojis are only available for Google Workspace...")
1761            .long_about("Returns details about a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and [Mana")
1762            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1763                .help("Required. Resource name of the custom emoji. Format: `customEmojis/{customEmoji}` You can use the emoji name as an alias for `{customEmoji}`. For example, `cust"))
1764            .args(escape_hatch_args())
1765    }
1766
1767    // chat.customEmojis.list
1768    fn leaf_chat_custom_emojis_list() -> Command {
1769        Command::new("chat.customEmojis.list")
1770            .visible_alias("list")
1771            .about("Lists custom emojis visible to the authenticated user. Custom emojis are only available for Google...")
1772            .long_about("Lists custom emojis visible to the authenticated user. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see [Learn about custom emojis in Google Chat](https://support.google.com/chat/answer/12")
1773            .arg(Arg::new("filter").long("filter").value_name("FILTER")
1774                .help("Optional. A query filter. Supports filtering by creator. To filter by creator, you must specify a valid value. Currently only `creator(\"users/me\")` and `NOT cre"))
1775            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
1776                .help("Optional. The maximum number of custom emojis returned. The service can return fewer custom emojis than this value. If unspecified, the default value is 25. The"))
1777            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1778                .help("Optional. (If resuming from a previous query.) A page token received from a previous list custom emoji call. Provide this to retrieve the subsequent page. When"))
1779            .args(escape_hatch_args())
1780    }
1781
1782    // chat.customEmojis
1783    fn group_chat_custom_emojis() -> Command {
1784        Command::new("customEmojis")
1785            .about("Methods under chat.customEmojis")
1786            .subcommand_required(true)
1787            .subcommand(leaf_chat_custom_emojis_create())
1788            .subcommand(leaf_chat_custom_emojis_delete())
1789            .subcommand(leaf_chat_custom_emojis_get())
1790            .subcommand(leaf_chat_custom_emojis_list())
1791    }
1792
1793    // chat.media.download
1794    fn leaf_chat_media_download() -> Command {
1795        Command::new("chat.media.download")
1796            .visible_alias("download")
1797            .about("Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.")
1798            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
1799                .help("Name of the media that is being downloaded. See ReadRequest.resource_name."))
1800            .args(escape_hatch_args())
1801    }
1802
1803    // chat.media.upload
1804    fn leaf_chat_media_upload() -> Command {
1805        Command::new("chat.media.upload")
1806            .visible_alias("upload")
1807            .about("Uploads an attachment. For an example, see Upload media as a file attachment. Requires user...")
1808            .long_about("Uploads an attachment. For an example, see Upload media as a file attachment. Requires user authentication with one of the following [authorizatio")
1809            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
1810                .help("Required. Resource name of the Chat space in which the attachment is uploaded. Format \"spaces/{space}\"."))
1811            .args(escape_hatch_args())
1812    }
1813
1814    // chat.media
1815    fn group_chat_media() -> Command {
1816        Command::new("media")
1817            .about("Methods under chat.media")
1818            .subcommand_required(true)
1819            .subcommand(leaf_chat_media_download())
1820            .subcommand(leaf_chat_media_upload())
1821    }
1822
1823    // chat.spaces.completeImport
1824    fn leaf_chat_spaces_complete_import() -> Command {
1825        Command::new("chat.spaces.completeImport")
1826            .visible_alias("completeImport")
1827            .about("Completes the import process for the specified space and makes it visible to users. Requires user...")
1828            .long_about("Completes the import process for the specified space and makes it visible to users. Requires user authentication and domain-wide delegation with the [authoriza")
1829            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1830                .help("Required. Resource name of the import mode space. Format: `spaces/{space}`"))
1831            .args(escape_hatch_args())
1832    }
1833
1834    // chat.spaces.create
1835    fn leaf_chat_spaces_create() -> Command {
1836        Command::new("chat.spaces.create")
1837            .visible_alias("create")
1838            .about("Creates a space. Can be used to create a named space, or a group chat in `Import mode`. For an...")
1839            .long_about("Creates a space. Can be used to create a named space, or a group chat in `Import mode`. For an example, see Create a space. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authori")
1840            .arg(Arg::new("request-id").long("request-id").value_name("REQUEST_ID")
1841                .help("Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identica"))
1842            .args(escape_hatch_args())
1843    }
1844
1845    // chat.spaces.delete
1846    fn leaf_chat_spaces_delete() -> Command {
1847        Command::new("chat.spaces.delete")
1848            .visible_alias("delete")
1849            .about("Deletes a named space. Always performs a cascading delete, which means that the space's child...")
1850            .long_about("Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space. Supports the foll")
1851            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1852                .help("Required. Resource name of the space to delete. Format: `spaces/{space}`"))
1853            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
1854                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
1855            .args(escape_hatch_args())
1856    }
1857
1858    // chat.spaces.findDirectMessage
1859    fn leaf_chat_spaces_find_direct_message() -> Command {
1860        Command::new("chat.spaces.findDirectMessage")
1861            .visible_alias("findDirectMessage")
1862            .about("Returns the existing direct message with the specified user. If no direct message space is found...")
1863            .long_about("Returns the existing direct message with the specified user. If no direct message space is found, returns a `404 NOT_FOUND` error. For an example, see Find a direct message. With [app authentication](https://developers.google.com/workspace/chat/authe")
1864            .arg(Arg::new("name").long("name").value_name("NAME")
1865                .help("Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `id` for the [person](https://developers.g"))
1866            .args(escape_hatch_args())
1867    }
1868
1869    // chat.spaces.findGroupChats
1870    fn leaf_chat_spaces_find_group_chats() -> Command {
1871        Command::new("chat.spaces.findGroupChats")
1872            .visible_alias("findGroupChats")
1873            .about("Returns all spaces with `spaceType == GROUP_CHAT`, whose human memberships contain exactly the...")
1874            .long_about("Returns all spaces with `spaceType == GROUP_CHAT`, whose human memberships contain exactly the calling user, and the users specified in `FindGroupChatsRequest.users`. Only members that have joined the conversation are supported. For an example, see [Find group chats](https://developers.google.com/wo")
1875            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
1876                .help("Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 10 spaces are returned. The maximum va"))
1877            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1878                .help("Optional. A page token, received from a previous call to find group chats. Provide this parameter to retrieve the subsequent page. When paginating, all other pa"))
1879            .arg(Arg::new("space-view").long("space-view").value_name("SPACE_VIEW").value_parser(["SPACE_VIEW_UNSPECIFIED", "SPACE_VIEW_RESOURCE_NAME_ONLY", "SPACE_VIEW_EXPANDED"])
1880                .help("Requested space view type. If unset, defaults to `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify `SPACE_VIEW_EXPANDED` must include scopes that allow rea"))
1881            .arg(Arg::new("users").long("users").value_name("USERS").action(ArgAction::Append)
1882                .help("Optional. Resource names of all human users in group chat with the calling user. Chat apps can't be included in the request. The maximum number of users that ca"))
1883            .args(escape_hatch_args())
1884    }
1885
1886    // chat.spaces.get
1887    fn leaf_chat_spaces_get() -> Command {
1888        Command::new("chat.spaces.get")
1889            .visible_alias("get")
1890            .about("Returns details about a space. For an example, see Get details about a space. Supports the...")
1891            .long_about("Returns details about a space. For an example, see Get details about a space. Supports the following types of authentication: - [App authentication](https://developers.go")
1892            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1893                .help("Required. Resource name of the space, in the form `spaces/{space}`. Format: `spaces/{space}`"))
1894            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
1895                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
1896            .args(escape_hatch_args())
1897    }
1898
1899    // chat.spaces.list
1900    fn leaf_chat_spaces_list() -> Command {
1901        Command::new("chat.spaces.list")
1902            .visible_alias("list")
1903            .about("Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message...")
1904            .long_about("Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authen")
1905            .arg(Arg::new("filter").long("filter").value_name("FILTER")
1906                .help("Optional. A query filter. You can filter spaces by the space type ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spac"))
1907            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
1908                .help("Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum v"))
1909            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1910                .help("Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value sho"))
1911            .args(escape_hatch_args())
1912    }
1913
1914    // chat.spaces.members.create
1915    fn leaf_chat_spaces_members_create() -> Command {
1916        Command::new("chat.spaces.members.create")
1917            .visible_alias("create")
1918            .about("Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for...")
1919            .long_about("Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining.")
1920            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
1921                .help("Required. The resource name of the space for which to create the membership. Format: spaces/{space}"))
1922            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
1923                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
1924            .args(escape_hatch_args())
1925    }
1926
1927    // chat.spaces.members.delete
1928    fn leaf_chat_spaces_members_delete() -> Command {
1929        Command::new("chat.spaces.members.delete")
1930            .visible_alias("delete")
1931            .about("Deletes a membership. For an example, see Remove a user or a Google Chat app from a space. Supports...")
1932            .long_about("Deletes a membership. For an example, see Remove a user or a Google Chat app from a space. Supports the following types of authentication: - [App authentication](http")
1933            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1934                .help("Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships."))
1935            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
1936                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
1937            .args(escape_hatch_args())
1938    }
1939
1940    // chat.spaces.members.get
1941    fn leaf_chat_spaces_members_get() -> Command {
1942        Command::new("chat.spaces.members.get")
1943            .visible_alias("get")
1944            .about("Returns details about a membership. For an example, see Get details about a user's or Google Chat...")
1945            .long_about("Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership. Supports the following types of authentication: - [Ap")
1946            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1947                .help("Required. Resource name of the membership to retrieve. To get the app's own membership [by using user authentication](https://developers.google.com/workspace/ch"))
1948            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
1949                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
1950            .args(escape_hatch_args())
1951    }
1952
1953    // chat.spaces.members.list
1954    fn leaf_chat_spaces_members_list() -> Command {
1955        Command::new("chat.spaces.members.list")
1956            .visible_alias("list")
1957            .about("Lists memberships in a space. For an example, see List users and Google Chat apps in a space...")
1958            .long_about("Lists memberships in a space. For an example, see List users and Google Chat apps in a space. Listing memberships with app authentication lists memberships in")
1959            .arg(Arg::new("filter").long("filter").value_name("FILTER")
1960                .help("Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.memb"))
1961            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
1962                .help("Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The"))
1963            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
1964                .help("Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other pa"))
1965            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
1966                .help("Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}"))
1967            .arg(Arg::new("show-groups").long("show-groups").action(ArgAction::SetTrue)
1968                .help("Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memb"))
1969            .arg(Arg::new("show-invited").long("show-invited").action(ArgAction::SetTrue)
1970                .help("Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited membersh"))
1971            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
1972                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
1973            .args(escape_hatch_args())
1974    }
1975
1976    // chat.spaces.members.patch
1977    fn leaf_chat_spaces_members_patch() -> Command {
1978        Command::new("chat.spaces.members.patch")
1979            .visible_alias("patch")
1980            .about("Updates a membership. For an example, see Update a user's membership in a space. Supports the...")
1981            .long_about("Updates a membership. For an example, see Update a user's membership in a space. Supports the following types of authentication: - [App authentication](https://develo")
1982            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
1983                .help("Identifier. Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`"))
1984            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
1985                .help("Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `role`"))
1986            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
1987                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
1988            .args(escape_hatch_args())
1989    }
1990
1991    // chat.spaces.members
1992    fn group_chat_spaces_members() -> Command {
1993        Command::new("members")
1994            .about("Methods under chat.spaces.members")
1995            .subcommand_required(true)
1996            .subcommand(leaf_chat_spaces_members_create())
1997            .subcommand(leaf_chat_spaces_members_delete())
1998            .subcommand(leaf_chat_spaces_members_get())
1999            .subcommand(leaf_chat_spaces_members_list())
2000            .subcommand(leaf_chat_spaces_members_patch())
2001    }
2002
2003    // chat.spaces.messagePins.create
2004    fn leaf_chat_spaces_message_pins_create() -> Command {
2005        Command::new("chat.spaces.messagePins.create")
2006            .visible_alias("create")
2007            .about("Creates a message pin. Requires user authentication with one of the following authorization scopes...")
2008            .long_about("Creates a message pin. Requires user authentication with one of the following authorization scopes: - `https://www.googleapis.com/au")
2009            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2010                .help("Required. The parent space in which to create the message pin. Format: spaces/{space}"))
2011            .args(escape_hatch_args())
2012    }
2013
2014    // chat.spaces.messagePins.delete
2015    fn leaf_chat_spaces_message_pins_delete() -> Command {
2016        Command::new("chat.spaces.messagePins.delete")
2017            .visible_alias("delete")
2018            .about("Deletes a message pin. Requires user authentication with one of the following authorization scopes...")
2019            .long_about("Deletes a message pin. Requires user authentication with one of the following authorization scopes: - `https://www.googleapis.com/au")
2020            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2021                .help("Required. The resource name of the message pin to remove. Format: spaces/{space}/messagePins/{message_pin}"))
2022            .args(escape_hatch_args())
2023    }
2024
2025    // chat.spaces.messagePins.list
2026    fn leaf_chat_spaces_message_pins_list() -> Command {
2027        Command::new("chat.spaces.messagePins.list")
2028            .visible_alias("list")
2029            .about("Lists message pins in a space. Users can pin important messages in spaces for easy access. For more...")
2030            .long_about("Lists message pins in a space. Users can pin important messages in spaces for easy access. For more information, see Pin or unpin a conversation in Google Chat. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate")
2031            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2032                .help("Optional. The maximum number of message pins returned. The service might return fewer messages than this value. The maximum value is 100. If you use a value mor"))
2033            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2034                .help("Optional. A page token received from a previous list message pins call. Provide this parameter to retrieve the subsequent page. When paginating, all other param"))
2035            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2036                .help("Required. The parent space which owns the collection of pinned items Format: `spaces/{space}`"))
2037            .args(escape_hatch_args())
2038    }
2039
2040    // chat.spaces.messagePins
2041    fn group_chat_spaces_message_pins() -> Command {
2042        Command::new("messagePins")
2043            .about("Methods under chat.spaces.messagePins")
2044            .subcommand_required(true)
2045            .subcommand(leaf_chat_spaces_message_pins_create())
2046            .subcommand(leaf_chat_spaces_message_pins_delete())
2047            .subcommand(leaf_chat_spaces_message_pins_list())
2048    }
2049
2050    // chat.spaces.messages.attachments.get
2051    fn leaf_chat_spaces_messages_attachments_get() -> Command {
2052        Command::new("chat.spaces.messages.attachments.get")
2053            .visible_alias("get")
2054            .about("Gets the metadata of a message attachment. The attachment data is fetched using the media API. For...")
2055            .long_about("Gets the metadata of a message attachment. The attachment data is fetched using the media API. For an example, see [Get metadata about a message attachment](https://developers.google.com/workspace/chat/get-media-att")
2056            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2057                .help("Required. Resource name of the attachment, in the form `spaces/{space}/messages/{message}/attachments/{attachment}`."))
2058            .args(escape_hatch_args())
2059    }
2060
2061    // chat.spaces.messages.attachments
2062    fn group_chat_spaces_messages_attachments() -> Command {
2063        Command::new("attachments")
2064            .about("Methods under chat.spaces.messages.attachments")
2065            .subcommand_required(true)
2066            .subcommand(leaf_chat_spaces_messages_attachments_get())
2067    }
2068
2069    // chat.spaces.messages.create
2070    fn leaf_chat_spaces_messages_create() -> Command {
2071        Command::new("chat.spaces.messages.create")
2072            .visible_alias("create")
2073            .about("Creates a message in a Google Chat space. For an example, see Send a message. Supports the...")
2074            .long_about("Creates a message in a Google Chat space. For an example, see Send a message. Supports the following types of authentication: - [App authentication](https://develope")
2075            .arg(Arg::new("create-message-notification-options-notification-type").long("create-message-notification-options-notification-type").value_name("CREATE_MESSAGE_NOTIFICATION_OPTIONS_NOTIFICATION_TYPE").value_parser(["NOTIFICATION_TYPE_NONE", "NOTIFICATION_TYPE_FORCE_NOTIFY", "NOTIFICATION_TYPE_SILENT"])
2076                .help("The notification type for the message."))
2077            .arg(Arg::new("message-id").long("message-id").value_name("MESSAGE_ID")
2078                .help("Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource n"))
2079            .arg(Arg::new("message-reply-option").long("message-reply-option").value_name("MESSAGE_REPLY_OPTION").value_parser(["MESSAGE_REPLY_OPTION_UNSPECIFIED", "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", "REPLY_MESSAGE_OR_FAIL"])
2080                .help("Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces. When [responding to user interactions](https://develope"))
2081            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2082                .help("Required. The resource name of the space in which to create a message. Format: `spaces/{space}`"))
2083            .arg(Arg::new("request-id").long("request-id").value_name("REQUEST_ID")
2084                .help("Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identica"))
2085            .arg(Arg::new("thread-key").long("thread-key").value_name("THREAD_KEY")
2086                .help("Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specif"))
2087            .args(escape_hatch_args())
2088    }
2089
2090    // chat.spaces.messages.delete
2091    fn leaf_chat_spaces_messages_delete() -> Command {
2092        Command::new("chat.spaces.messages.delete")
2093            .visible_alias("delete")
2094            .about("Deletes a message. For an example, see Delete a message. Supports the following types of...")
2095            .long_about("Deletes a message. For an example, see Delete a message. Supports the following types of authentication: - [App authentication](https://developers.google.com/workspa")
2096            .arg(Arg::new("force").long("force").action(ArgAction::SetTrue)
2097                .help("Optional. When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when"))
2098            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2099                .help("Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `"))
2100            .args(escape_hatch_args())
2101    }
2102
2103    // chat.spaces.messages.get
2104    fn leaf_chat_spaces_messages_get() -> Command {
2105        Command::new("chat.spaces.messages.get")
2106            .visible_alias("get")
2107            .about("Returns details about a message. For an example, see Get details about a message. Supports the...")
2108            .long_about("Returns details about a message. For an example, see Get details about a message. Supports the following types of authentication: - [App authentication](https://develop")
2109            .arg(Arg::new("markup-syntax").long("markup-syntax").value_name("MARKUP_SYNTAX").value_parser(["MARKUP_SYNTAX_UNSPECIFIED", "MARKUP_SYNTAX_CHAT", "MARKUP_SYNTAX_MARKDOWN"])
2110                .help("Optional. Specifies the desired output syntax for the Chat message `formatted_text` field."))
2111            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2112                .help("Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `"))
2113            .args(escape_hatch_args())
2114    }
2115
2116    // chat.spaces.messages.list
2117    fn leaf_chat_spaces_messages_list() -> Command {
2118        Command::new("chat.spaces.messages.list")
2119            .visible_alias("list")
2120            .about("Lists messages in a space that the caller is a member of, including messages from blocked members...")
2121            .long_about("Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. System messages, like those announcing new space members, aren't included. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interfa")
2122            .arg(Arg::new("filter").long("filter").value_name("FILTER")
2123                .help("Optional. A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify"))
2124            .arg(Arg::new("markup-syntax").long("markup-syntax").value_name("MARKUP_SYNTAX").value_parser(["MARKUP_SYNTAX_UNSPECIFIED", "MARKUP_SYNTAX_CHAT", "MARKUP_SYNTAX_MARKDOWN"])
2125                .help("Optional. Specifies the desired output syntax for the Chat message `formatted_text` field."))
2126            .arg(Arg::new("order-by").long("order-by").value_name("ORDER_BY")
2127                .help("Optional. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows: - `ASC` for as"))
2128            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2129                .help("Optional. The maximum number of messages returned. The service might return fewer messages than this value. If unspecified, at most 25 are returned. The maximum"))
2130            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2131                .help("Optional. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameter"))
2132            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2133                .help("Required. The resource name of the space to list messages from. Format: `spaces/{space}`"))
2134            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
2135                .help("Optional. Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable."))
2136            .args(escape_hatch_args())
2137    }
2138
2139    // chat.spaces.messages.patch
2140    fn leaf_chat_spaces_messages_patch() -> Command {
2141        Command::new("chat.spaces.messages.patch")
2142            .visible_alias("patch")
2143            .about("Updates a message. There's a difference between the `patch` and `update` methods. The `patch`...")
2144            .long_about("Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/workspace/chat/updat")
2145            .arg(Arg::new("allow-missing").long("allow-missing").action(ArgAction::SetTrue)
2146                .help("Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https:"))
2147            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2148                .help("Identifier. Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{m"))
2149            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2150                .help("Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `att"))
2151            .args(escape_hatch_args())
2152    }
2153
2154    // chat.spaces.messages.reactions.create
2155    fn leaf_chat_spaces_messages_reactions_create() -> Command {
2156        Command::new("chat.spaces.messages.reactions.create")
2157            .visible_alias("create")
2158            .about("Creates a reaction and adds it to a message. For an example, see Add a reaction to a message...")
2159            .long_about("Creates a reaction and adds it to a message. For an example, see Add a reaction to a message. Requires user authentication with one of the following [auth")
2160            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2161                .help("Required. The message where the reaction is created. Format: `spaces/{space}/messages/{message}`"))
2162            .args(escape_hatch_args())
2163    }
2164
2165    // chat.spaces.messages.reactions.delete
2166    fn leaf_chat_spaces_messages_reactions_delete() -> Command {
2167        Command::new("chat.spaces.messages.reactions.delete")
2168            .visible_alias("delete")
2169            .about("Deletes a reaction to a message. For an example, see Delete a reaction. Requires user...")
2170            .long_about("Deletes a reaction to a message. For an example, see Delete a reaction. Requires user authentication with one of the following [authorization scopes](http")
2171            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2172                .help("Required. Name of the reaction to delete. Format: `spaces/{space}/messages/{message}/reactions/{reaction}`"))
2173            .args(escape_hatch_args())
2174    }
2175
2176    // chat.spaces.messages.reactions.list
2177    fn leaf_chat_spaces_messages_reactions_list() -> Command {
2178        Command::new("chat.spaces.messages.reactions.list")
2179            .visible_alias("list")
2180            .about("Lists reactions to a message. For an example, see List reactions for a message. Requires user...")
2181            .long_about("Lists reactions to a message. For an example, see List reactions for a message. Requires user authentication with one of the following [authorization scopes")
2182            .arg(Arg::new("filter").long("filter").value_name("FILTER")
2183                .help("Optional. A query filter. You can filter reactions by emoji (either `emoji.unicode`"))
2184            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2185                .help("Optional. The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum"))
2186            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2187                .help("Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When pag"))
2188            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2189                .help("Required. The message users reacted to. Format: `spaces/{space}/messages/{message}`"))
2190            .args(escape_hatch_args())
2191    }
2192
2193    // chat.spaces.messages.reactions
2194    fn group_chat_spaces_messages_reactions() -> Command {
2195        Command::new("reactions")
2196            .about("Methods under chat.spaces.messages.reactions")
2197            .subcommand_required(true)
2198            .subcommand(leaf_chat_spaces_messages_reactions_create())
2199            .subcommand(leaf_chat_spaces_messages_reactions_delete())
2200            .subcommand(leaf_chat_spaces_messages_reactions_list())
2201    }
2202
2203    // chat.spaces.messages.search
2204    fn leaf_chat_spaces_messages_search() -> Command {
2205        Command::new("chat.spaces.messages.search")
2206            .visible_alias("search")
2207            .about("Searches for messages in Google Chat that the calling user has access to. Returns a list of...")
2208            .long_about("Searches for messages in Google Chat that the calling user has access to. Returns a list of messages matching the search criteria. To search across all spaces the user has access to, set `parent` to `spaces/-`. Using any other value for `parent` results in an `INVALID_ARGUMENT` error. The returned m")
2209            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2210                .help("Required. The resource name of the space to search within. To search across all spaces the user has access to, set this field to `spaces/-`. Using any other val"))
2211            .args(escape_hatch_args())
2212    }
2213
2214    // chat.spaces.messages.update
2215    fn leaf_chat_spaces_messages_update() -> Command {
2216        Command::new("chat.spaces.messages.update")
2217            .visible_alias("update")
2218            .about("Updates a message. There's a difference between the `patch` and `update` methods. The `patch`...")
2219            .long_about("Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/workspace/chat/updat")
2220            .arg(Arg::new("allow-missing").long("allow-missing").action(ArgAction::SetTrue)
2221                .help("Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https:"))
2222            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2223                .help("Identifier. Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{m"))
2224            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2225                .help("Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `att"))
2226            .args(escape_hatch_args())
2227    }
2228
2229    // chat.spaces.messages
2230    fn group_chat_spaces_messages() -> Command {
2231        Command::new("messages")
2232            .about("Methods under chat.spaces.messages")
2233            .subcommand_required(true)
2234            .subcommand(group_chat_spaces_messages_attachments())
2235            .subcommand(leaf_chat_spaces_messages_create())
2236            .subcommand(leaf_chat_spaces_messages_delete())
2237            .subcommand(leaf_chat_spaces_messages_get())
2238            .subcommand(leaf_chat_spaces_messages_list())
2239            .subcommand(leaf_chat_spaces_messages_patch())
2240            .subcommand(group_chat_spaces_messages_reactions())
2241            .subcommand(leaf_chat_spaces_messages_search())
2242            .subcommand(leaf_chat_spaces_messages_update())
2243    }
2244
2245    // chat.spaces.patch
2246    fn leaf_chat_spaces_patch() -> Command {
2247        Command::new("chat.spaces.patch")
2248            .visible_alias("patch")
2249            .about("Updates a space. For an example, see Update a space. If you're updating the `displayName` field and...")
2250            .long_about("Updates a space. For an example, see Update a space. If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization migh")
2251            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2252                .help("Identifier. Resource name of the space. Format: `spaces/{space}` Where `{space}` represents the system-assigned ID for the space. You can obtain the space ID by"))
2253            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2254                .help("Required. The updated field paths, comma separated if there are multiple. You can update the following fields for a space: `space_details`: Updates the space's"))
2255            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
2256                .help("Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator wit"))
2257            .args(escape_hatch_args())
2258    }
2259
2260    // chat.spaces.search
2261    fn leaf_chat_spaces_search() -> Command {
2262        Command::new("chat.spaces.search")
2263            .visible_alias("search")
2264            .about("Returns a list of spaces in a Google Workspace organization. For an example, see Search for and...")
2265            .long_about("Returns a list of spaces in a Google Workspace organization. For an example, see Search for and manage spaces. When `use_admin_access` is set to `false`, the results are limited to spaces where the calling user is a joined member. T")
2266            .arg(Arg::new("order-by").long("order-by").value_name("ORDER_BY")
2267                .help("Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of hu"))
2268            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2269                .help("The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000"))
2270            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2271                .help("A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided s"))
2272            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
2273                .help("Discovery parameter `query`, renamed because --query is reserved here. Required. A search query. You can search by using the following parameters when `useAdminAccess` is set to `true`: - `create_time` - `customer` - `display_name`"))
2274            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
2275                .help("When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [man"))
2276            .args(escape_hatch_args())
2277    }
2278
2279    // chat.spaces.setup
2280    fn leaf_chat_spaces_setup() -> Command {
2281        Command::new("chat.spaces.setup")
2282            .visible_alias("setup")
2283            .about("Creates a space and adds specified users to it. The calling user is automatically added to the...")
2284            .long_about("Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members. To specify the human")
2285            .args(escape_hatch_args())
2286    }
2287
2288    // chat.spaces.spaceEvents.get
2289    fn leaf_chat_spaces_space_events_get() -> Command {
2290        Command::new("chat.spaces.spaceEvents.get")
2291            .visible_alias("get")
2292            .about("Returns an event from a Google Chat space. The event payload contains the most recent version of...")
2293            .long_about("Returns an event from a Google Chat space. The event payload contains the most recent version of the resource that changed. For example, if you request an event about a new messag")
2294            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2295                .help("Required. The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`"))
2296            .args(escape_hatch_args())
2297    }
2298
2299    // chat.spaces.spaceEvents.list
2300    fn leaf_chat_spaces_space_events_list() -> Command {
2301        Command::new("chat.spaces.spaceEvents.list")
2302            .visible_alias("list")
2303            .about("Lists events from a Google Chat space. For each event, the payload contains the most recent version...")
2304            .long_about("Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events about new space members,")
2305            .arg(Arg::new("filter").long("filter").value_name("FILTER")
2306                .help("Required. A query filter. You must specify at least one event type (`event_type`) using the has `:` operator. To filter by multiple event types, use the `OR` op"))
2307            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2308                .help("Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error."))
2309            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2310                .help("Optional. A page token, received from a previous list space events call. Provide this to retrieve the subsequent page. When paginating, all other parameters pro"))
2311            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2312                .help("Required. Resource name of the Google Chat space where the events occurred. Format:"))
2313            .args(escape_hatch_args())
2314    }
2315
2316    // chat.spaces.spaceEvents
2317    fn group_chat_spaces_space_events() -> Command {
2318        Command::new("spaceEvents")
2319            .about("Methods under chat.spaces.spaceEvents")
2320            .subcommand_required(true)
2321            .subcommand(leaf_chat_spaces_space_events_get())
2322            .subcommand(leaf_chat_spaces_space_events_list())
2323    }
2324
2325    // chat.spaces
2326    fn group_chat_spaces() -> Command {
2327        Command::new("spaces")
2328            .about("Methods under chat.spaces")
2329            .subcommand_required(true)
2330            .subcommand(leaf_chat_spaces_complete_import())
2331            .subcommand(leaf_chat_spaces_create())
2332            .subcommand(leaf_chat_spaces_delete())
2333            .subcommand(leaf_chat_spaces_find_direct_message())
2334            .subcommand(leaf_chat_spaces_find_group_chats())
2335            .subcommand(leaf_chat_spaces_get())
2336            .subcommand(leaf_chat_spaces_list())
2337            .subcommand(group_chat_spaces_members())
2338            .subcommand(group_chat_spaces_message_pins())
2339            .subcommand(group_chat_spaces_messages())
2340            .subcommand(leaf_chat_spaces_patch())
2341            .subcommand(leaf_chat_spaces_search())
2342            .subcommand(leaf_chat_spaces_setup())
2343            .subcommand(group_chat_spaces_space_events())
2344    }
2345
2346    // chat.users.availability.get
2347    fn leaf_chat_users_availability_get() -> Command {
2348        Command::new("chat.users.availability.get")
2349            .visible_alias("get")
2350            .about("Returns availability information for a human user in Google Chat. For example, this can be used to...")
2351            .long_about("Returns availability information for a human user in Google Chat. For example, this can be used to check if a user is online or away, or to retrieve their custom status message. This method only retrieves the authenticated user's availability. Requires [user authentication](https://developers.google")
2352            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2353                .help("Required. The resource name of the availability to retrieve. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK"))
2354            .args(escape_hatch_args())
2355    }
2356
2357    // chat.users.availability.markAsActive
2358    fn leaf_chat_users_availability_mark_as_active() -> Command {
2359        Command::new("chat.users.availability.markAsActive")
2360            .visible_alias("markAsActive")
2361            .about("Marks user as `ACTIVE` in Google Chat. Sets the user's availability state to `ACTIVE`. The `ACTIVE`...")
2362            .long_about("Marks user as `ACTIVE` in Google Chat. Sets the user's availability state to `ACTIVE`. The `ACTIVE` state lasts until the specified expiration, at which point the user's state becomes `AWAY`. Note that if the user is actively using Chat, the `ACTIVE` state duration may extend beyond the provided exp")
2363            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2364                .help("Required. The resource name of the availability to mark as active. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admi"))
2365            .args(escape_hatch_args())
2366    }
2367
2368    // chat.users.availability.markAsAway
2369    fn leaf_chat_users_availability_mark_as_away() -> Command {
2370        Command::new("chat.users.availability.markAsAway")
2371            .visible_alias("markAsAway")
2372            .about("Marks user as `AWAY` in Google Chat. Sets the user's state to away and is not affected by the...")
2373            .long_about("Marks user as `AWAY` in Google Chat. Sets the user's state to away and is not affected by the user's activity. This method only updates the authenticated user's availability. Requires user authentication with [authoriza")
2374            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2375                .help("Required. The resource name of the availability to mark as away. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin"))
2376            .args(escape_hatch_args())
2377    }
2378
2379    // chat.users.availability.markAsDoNotDisturb
2380    fn leaf_chat_users_availability_mark_as_do_not_disturb() -> Command {
2381        Command::new("chat.users.availability.markAsDoNotDisturb")
2382            .visible_alias("markAsDoNotDisturb")
2383            .about("Marks user as `DO_NOT_DISTURB` in Google Chat. Sets a user's availability state to `DO_NOT_DISTURB`...")
2384            .long_about("Marks user as `DO_NOT_DISTURB` in Google Chat. Sets a user's availability state to `DO_NOT_DISTURB` until a specified expiration time. When in `DO_NOT_DISTURB`, users typically won't receive notifications. This method only updates the authenticated user's availability. Requires [user authentication]")
2385            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2386                .help("Required. The resource name of the availability to mark as Do Not Disturb. Format: users/{user}/availability `{user}` is the id for the Person in the People API"))
2387            .args(escape_hatch_args())
2388    }
2389
2390    // chat.users.availability.patch
2391    fn leaf_chat_users_availability_patch() -> Command {
2392        Command::new("chat.users.availability.patch")
2393            .visible_alias("patch")
2394            .about("Updates availability information for a human user. Only the `custom_status` field can be updated...")
2395            .long_about("Updates availability information for a human user. Only the `custom_status` field can be updated through this method. This method only updates the authenticated user's availability. Requires user authentication with one")
2396            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2397                .help("Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK direc"))
2398            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2399                .help("Required. The list of fields to update. The only field that can be updated is `custom_status`."))
2400            .args(escape_hatch_args())
2401    }
2402
2403    // chat.users.availability
2404    fn group_chat_users_availability() -> Command {
2405        Command::new("availability")
2406            .about("Methods under chat.users.availability")
2407            .subcommand_required(true)
2408            .subcommand(leaf_chat_users_availability_get())
2409            .subcommand(leaf_chat_users_availability_mark_as_active())
2410            .subcommand(leaf_chat_users_availability_mark_as_away())
2411            .subcommand(leaf_chat_users_availability_mark_as_do_not_disturb())
2412            .subcommand(leaf_chat_users_availability_patch())
2413    }
2414
2415    // chat.users.sections.create
2416    fn leaf_chat_users_sections_create() -> Command {
2417        Command::new("chat.users.sections.create")
2418            .visible_alias("create")
2419            .about("Creates a section in Google Chat. Sections help users group conversations and customize the list of...")
2420            .long_about("Creates a section in Google Chat. Sections help users group conversations and customize the list of spaces displayed in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can be created. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/")
2421            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2422                .help("Required. The parent resource name where the section is created. Format: `users/{user}`"))
2423            .args(escape_hatch_args())
2424    }
2425
2426    // chat.users.sections.delete
2427    fn leaf_chat_users_sections_delete() -> Command {
2428        Command::new("chat.users.sections.delete")
2429            .visible_alias("delete")
2430            .about("Deletes a section of type `CUSTOM_SECTION`. If the section contains items, such as spaces, the...")
2431            .long_about("Deletes a section of type `CUSTOM_SECTION`. If the section contains items, such as spaces, the items are moved to Google Chat's default sections and are not deleted. For details, see Create and organize sections in Google Chat. Requires [user authen")
2432            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2433                .help("Required. The name of the section to delete. Format: `users/{user}/sections/{section}`"))
2434            .args(escape_hatch_args())
2435    }
2436
2437    // chat.users.sections.items.list
2438    fn leaf_chat_users_sections_items_list() -> Command {
2439        Command::new("chat.users.sections.items.list")
2440            .visible_alias("list")
2441            .about("Lists items in a section. Only spaces can be section items. For details, see Create and organize...")
2442            .long_about("Lists items in a section. Only spaces can be section items. For details, see Create and organize sections in Google Chat. Requires user authentication with the [authori")
2443            .arg(Arg::new("filter").long("filter").value_name("FILTER")
2444                .help("Optional. A query filter. Currently only supports filtering by space. For example, `space = spaces/{space}`. Invalid queries are rejected with an `INVALID_ARGUM"))
2445            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2446                .help("Optional. The maximum number of section items to return. The service may return fewer than this value. If unspecified, at most 10 section items will be returned"))
2447            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2448                .help("Optional. A page token, received from a previous list section items call. Provide this to retrieve the subsequent page. When paginating, all other parameters pr"))
2449            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2450                .help("Required. The parent, which is the section resource name that owns this collection of section items. Only supports listing section items for the calling user. W"))
2451            .args(escape_hatch_args())
2452    }
2453
2454    // chat.users.sections.items.move
2455    fn leaf_chat_users_sections_items_move() -> Command {
2456        Command::new("chat.users.sections.items.move")
2457            .visible_alias("move")
2458            .about("Moves an item from one section to another. For example, if a section contains spaces, this method...")
2459            .long_about("Moves an item from one section to another. For example, if a section contains spaces, this method can be used to move a space to a different section. For details, see Create and organize sections in Google Chat. Requires [user authentication](https:")
2460            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2461                .help("Required. The resource name of the section item to move. Format: `users/{user}/sections/{section}/items/{item}`"))
2462            .args(escape_hatch_args())
2463    }
2464
2465    // chat.users.sections.items
2466    fn group_chat_users_sections_items() -> Command {
2467        Command::new("items")
2468            .about("Methods under chat.users.sections.items")
2469            .subcommand_required(true)
2470            .subcommand(leaf_chat_users_sections_items_list())
2471            .subcommand(leaf_chat_users_sections_items_move())
2472    }
2473
2474    // chat.users.sections.list
2475    fn leaf_chat_users_sections_list() -> Command {
2476        Command::new("chat.users.sections.list")
2477            .visible_alias("list")
2478            .about("Lists sections available to the Chat user. Sections help users group their conversations and...")
2479            .long_about("Lists sections available to the Chat user. Sections help users group their conversations and customize the list of spaces displayed in Chat navigation panel. For details, see Create and organize sections in Google Chat. Requires [user authentication")
2480            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2481                .help("Optional. The maximum number of sections to return. The service may return fewer than this value. If unspecified, at most 10 sections will be returned. The maxi"))
2482            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2483                .help("Optional. A page token, received from a previous list sections call. Provide this to retrieve the subsequent page. When paginating, all other parameters provide"))
2484            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2485                .help("Required. The parent, which is the user resource name that owns this collection of sections. Only supports listing sections for the calling user. To refer to th"))
2486            .args(escape_hatch_args())
2487    }
2488
2489    // chat.users.sections.patch
2490    fn leaf_chat_users_sections_patch() -> Command {
2491        Command::new("chat.users.sections.patch")
2492            .visible_alias("patch")
2493            .about("Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. For details, see Create...")
2494            .long_about("Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. For details, see Create and organize sections in Google Chat. Requires user authentication wit")
2495            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2496                .help("Identifier. Resource name of the section. For system sections, the section ID is a constant string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-di"))
2497            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2498                .help("Required. The mask to specify which fields to update. Currently supported field paths: - `display_name`"))
2499            .args(escape_hatch_args())
2500    }
2501
2502    // chat.users.sections.position
2503    fn leaf_chat_users_sections_position() -> Command {
2504        Command::new("chat.users.sections.position")
2505            .visible_alias("position")
2506            .about("Changes the sort order of a section. For details, see Create and organize sections in Google Chat...")
2507            .long_about("Changes the sort order of a section. For details, see Create and organize sections in Google Chat. Requires user authentication with the [authorization scope](https://d")
2508            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2509                .help("Required. The resource name of the section to position. Format: `users/{user}/sections/{section}`"))
2510            .args(escape_hatch_args())
2511    }
2512
2513    // chat.users.sections
2514    fn group_chat_users_sections() -> Command {
2515        Command::new("sections")
2516            .about("Methods under chat.users.sections")
2517            .subcommand_required(true)
2518            .subcommand(leaf_chat_users_sections_create())
2519            .subcommand(leaf_chat_users_sections_delete())
2520            .subcommand(group_chat_users_sections_items())
2521            .subcommand(leaf_chat_users_sections_list())
2522            .subcommand(leaf_chat_users_sections_patch())
2523            .subcommand(leaf_chat_users_sections_position())
2524    }
2525
2526    // chat.users.spaces.getSpaceReadState
2527    fn leaf_chat_users_spaces_get_space_read_state() -> Command {
2528        Command::new("chat.users.spaces.getSpaceReadState")
2529            .visible_alias("getSpaceReadState")
2530            .about("Returns details about a user's read state within a space, used to identify read and unread...")
2531            .long_about("Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see Get details about a user's space read state. Requires [user authentication](https://developers.google.com/work")
2532            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2533                .help("Required. Resource name of the space read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the"))
2534            .args(escape_hatch_args())
2535    }
2536
2537    // chat.users.spaces.spaceNotificationSetting.get
2538    fn leaf_chat_users_spaces_space_notification_setting_get() -> Command {
2539        Command::new("chat.users.spaces.spaceNotificationSetting.get")
2540            .visible_alias("get")
2541            .about("Gets the space notification setting. For an example, see Get the caller's space notification...")
2542            .long_about("Gets the space notification setting. For an example, see Get the caller's space notification setting. Requires user authentication with the")
2543            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2544                .help("Required. Format: users/{user}/spaces/{space}/spaceNotificationSetting - `users/me/spaces/{space}/spaceNotificationSetting`, OR - `users/user@example.com/spaces"))
2545            .args(escape_hatch_args())
2546    }
2547
2548    // chat.users.spaces.spaceNotificationSetting.patch
2549    fn leaf_chat_users_spaces_space_notification_setting_patch() -> Command {
2550        Command::new("chat.users.spaces.spaceNotificationSetting.patch")
2551            .visible_alias("patch")
2552            .about("Updates the space notification setting. For an example, see Update the caller's space notification...")
2553            .long_about("Updates the space notification setting. For an example, see Update the caller's space notification setting. Requires user authentication")
2554            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2555                .help("Identifier. The resource name of the space notification setting. Format: `users/{user}/spaces/{space}/spaceNotificationSetting`."))
2556            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2557                .help("Required. Supported field paths: - `notification_setting` - `mute_setting`"))
2558            .args(escape_hatch_args())
2559    }
2560
2561    // chat.users.spaces.spaceNotificationSetting
2562    fn group_chat_users_spaces_space_notification_setting() -> Command {
2563        Command::new("spaceNotificationSetting")
2564            .about("Methods under chat.users.spaces.spaceNotificationSetting")
2565            .subcommand_required(true)
2566            .subcommand(leaf_chat_users_spaces_space_notification_setting_get())
2567            .subcommand(leaf_chat_users_spaces_space_notification_setting_patch())
2568    }
2569
2570    // chat.users.spaces.threads.getThreadReadState
2571    fn leaf_chat_users_spaces_threads_get_thread_read_state() -> Command {
2572        Command::new("chat.users.spaces.threads.getThreadReadState")
2573            .visible_alias("getThreadReadState")
2574            .about("Returns details about a user's read state within a thread, used to identify read and unread...")
2575            .long_about("Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see Get details about a user's thread read state. Requires [user authentication](https://developers.google.com/w")
2576            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2577                .help("Required. Resource name of the thread read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of th"))
2578            .args(escape_hatch_args())
2579    }
2580
2581    // chat.users.spaces.threads
2582    fn group_chat_users_spaces_threads() -> Command {
2583        Command::new("threads")
2584            .about("Methods under chat.users.spaces.threads")
2585            .subcommand_required(true)
2586            .subcommand(leaf_chat_users_spaces_threads_get_thread_read_state())
2587    }
2588
2589    // chat.users.spaces.updateSpaceReadState
2590    fn leaf_chat_users_spaces_update_space_read_state() -> Command {
2591        Command::new("chat.users.spaces.updateSpaceReadState")
2592            .visible_alias("updateSpaceReadState")
2593            .about("Updates a user's read state within a space, used to identify read and unread messages. For an...")
2594            .long_about("Updates a user's read state within a space, used to identify read and unread messages. For an example, see Update a user's space read state. Requires [user authentication](https://developers.google.com/workspace/chat/authenticat")
2595            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2596                .help("Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`"))
2597            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2598                .help("Required. The field paths to update. Currently supported field paths: - `last_read_time` When the `last_read_time` is before the latest message create time, the"))
2599            .args(escape_hatch_args())
2600    }
2601
2602    // chat.users.spaces
2603    fn group_chat_users_spaces() -> Command {
2604        Command::new("spaces")
2605            .about("Methods under chat.users.spaces")
2606            .subcommand_required(true)
2607            .subcommand(leaf_chat_users_spaces_get_space_read_state())
2608            .subcommand(group_chat_users_spaces_space_notification_setting())
2609            .subcommand(group_chat_users_spaces_threads())
2610            .subcommand(leaf_chat_users_spaces_update_space_read_state())
2611    }
2612
2613    // chat.users
2614    fn group_chat_users() -> Command {
2615        Command::new("users")
2616            .about("Methods under chat.users")
2617            .subcommand_required(true)
2618            .subcommand(group_chat_users_availability())
2619            .subcommand(group_chat_users_sections())
2620            .subcommand(group_chat_users_spaces())
2621    }
2622
2623    // chat
2624    fn service_chat() -> Command {
2625        Command::new("chat")
2626            .about("Google Chat API operations (v1, 54 methods)")
2627            .subcommand_required(true)
2628            .subcommand(group_chat_custom_emojis())
2629            .subcommand(group_chat_media())
2630            .subcommand(group_chat_spaces())
2631            .subcommand(group_chat_users())
2632    }
2633
2634    // docs.documents.batchUpdate
2635    fn leaf_docs_documents_batch_update() -> Command {
2636        Command::new("docs.documents.batchUpdate")
2637            .visible_alias("batchUpdate")
2638            .about("Applies one or more updates to the document. Each request is validated before being applied. If any...")
2639            .long_about("Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to r")
2640            .arg(Arg::new("document-id").long("document-id").value_name("DOCUMENT_ID").required(true)
2641                .help("The ID of the document to update."))
2642            .args(escape_hatch_args())
2643    }
2644
2645    // docs.documents.create
2646    fn leaf_docs_documents_create() -> Command {
2647        Command::new("docs.documents.create")
2648            .visible_alias("create")
2649            .about("Creates a blank document using the title given in the request. Other fields in the request...")
2650            .long_about("Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.")
2651            .args(escape_hatch_args())
2652    }
2653
2654    // docs.documents.get
2655    fn leaf_docs_documents_get() -> Command {
2656        Command::new("docs.documents.get")
2657            .visible_alias("get")
2658            .about("Gets the latest version of the specified document.")
2659            .arg(Arg::new("comments-view-mode").long("comments-view-mode").value_name("COMMENTS_VIEW_MODE").value_parser(["COMMENTS_VIEW_MODE_UNSPECIFIED", "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS", "COMMENTS_VIEW_MODE_OMITTED", "COMMENTS_VIEW_MODE_INCLUDED"])
2660                .help("The comments view mode to apply to the document. This allows viewing the document with comments omitted or included. If one is not specified, COMMENTS_VIEW_MODE"))
2661            .arg(Arg::new("document-id").long("document-id").value_name("DOCUMENT_ID").required(true)
2662                .help("The ID of the document to retrieve."))
2663            .arg(Arg::new("include-tabs-content").long("include-tabs-content").action(ArgAction::SetTrue)
2664                .help("Whether to populate the `Document.tabs` field instead of the text content fields like `body` and `documentStyle` on `Document`. - When `true`: Document content"))
2665            .arg(Arg::new("suggestions-view-mode").long("suggestions-view-mode").value_name("SUGGESTIONS_VIEW_MODE").value_parser(["DEFAULT_FOR_CURRENT_ACCESS", "SUGGESTIONS_INLINE", "PREVIEW_SUGGESTIONS_ACCEPTED", "PREVIEW_WITHOUT_SUGGESTIONS"])
2666                .help("The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified,"))
2667            .args(escape_hatch_args())
2668    }
2669
2670    // docs.documents
2671    fn group_docs_documents() -> Command {
2672        Command::new("documents")
2673            .about("Methods under docs.documents")
2674            .subcommand_required(true)
2675            .subcommand(leaf_docs_documents_batch_update())
2676            .subcommand(leaf_docs_documents_create())
2677            .subcommand(leaf_docs_documents_get())
2678    }
2679
2680    // docs
2681    fn service_docs() -> Command {
2682        Command::new("docs")
2683            .about("Google Docs API operations (v1, 3 methods)")
2684            .subcommand_required(true)
2685            .subcommand(group_docs_documents())
2686    }
2687
2688    // drive.about.get
2689    fn leaf_drive_about_get() -> Command {
2690        Command::new("drive.about.get")
2691            .visible_alias("get")
2692            .about("Gets information about the user, the user's Drive, and system capabilities. For more information...")
2693            .long_about("Gets information about the user, the user's Drive, and system capabilities. For more information, see Return user info. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields")
2694            .args(escape_hatch_args())
2695    }
2696
2697    // drive.about
2698    fn group_drive_about() -> Command {
2699        Command::new("about")
2700            .about("Methods under drive.about")
2701            .subcommand_required(true)
2702            .subcommand(leaf_drive_about_get())
2703    }
2704
2705    // drive.accessproposals.get
2706    fn leaf_drive_accessproposals_get() -> Command {
2707        Command::new("drive.accessproposals.get")
2708            .visible_alias("get")
2709            .about("Retrieves an access proposal by ID. For more information, see Manage pending access proposals.")
2710            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2711                .help("Required. The ID of the item the request is on."))
2712            .arg(Arg::new("proposal-id").long("proposal-id").value_name("PROPOSAL_ID").required(true)
2713                .help("Required. The ID of the access proposal to resolve."))
2714            .args(escape_hatch_args())
2715    }
2716
2717    // drive.accessproposals.list
2718    fn leaf_drive_accessproposals_list() -> Command {
2719        Command::new("drive.accessproposals.list")
2720            .visible_alias("list")
2721            .about("List the access proposals on a file. For more information, see Manage pending access proposals...")
2722            .long_about("List the access proposals on a file. For more information, see Manage pending access proposals. Note: Only approvers are able to list access proposals on a file. If the user isn't an approver, a 403 error is returned.")
2723            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2724                .help("Required. The ID of the item the request is on."))
2725            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2726                .help("Optional. The number of results per page."))
2727            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2728                .help("Optional. The continuation token on the list of access requests."))
2729            .args(escape_hatch_args())
2730    }
2731
2732    // drive.accessproposals.resolve
2733    fn leaf_drive_accessproposals_resolve() -> Command {
2734        Command::new("drive.accessproposals.resolve")
2735            .visible_alias("resolve")
2736            .about("Approves or denies an access proposal. For more information, see Manage pending access proposals.")
2737            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2738                .help("Required. The ID of the item the request is on."))
2739            .arg(Arg::new("proposal-id").long("proposal-id").value_name("PROPOSAL_ID").required(true)
2740                .help("Required. The ID of the access proposal to resolve."))
2741            .args(escape_hatch_args())
2742    }
2743
2744    // drive.accessproposals
2745    fn group_drive_accessproposals() -> Command {
2746        Command::new("accessproposals")
2747            .about("Methods under drive.accessproposals")
2748            .subcommand_required(true)
2749            .subcommand(leaf_drive_accessproposals_get())
2750            .subcommand(leaf_drive_accessproposals_list())
2751            .subcommand(leaf_drive_accessproposals_resolve())
2752    }
2753
2754    // drive.approvals.approve
2755    fn leaf_drive_approvals_approve() -> Command {
2756        Command::new("drive.approvals.approve")
2757            .visible_alias("approve")
2758            .about("Approves an approval. For more information, see Manage approvals. This is used to update the...")
2759            .long_about("Approves an approval. For more information, see Manage approvals. This is used to update the ReviewerResponse of the requesting user with a Response of `APPROVED`. If this is the last required reviewer response, this also complete")
2760            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2761                .help("Required. The ID of the approval to approve."))
2762            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2763                .help("Required. The ID of the file that the approval is on."))
2764            .args(escape_hatch_args())
2765    }
2766
2767    // drive.approvals.cancel
2768    fn leaf_drive_approvals_cancel() -> Command {
2769        Command::new("drive.approvals.cancel")
2770            .visible_alias("cancel")
2771            .about("Cancels an approval. For more information, see Manage approvals. Updates the approval Status to...")
2772            .long_about("Cancels an approval. For more information, see Manage approvals. Updates the approval Status to `CANCELLED`. This can be called by any user with the `writer` permission on the file while the approval Status is `IN_PROGRESS`.")
2773            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2774                .help("Required. The ID of the approval to cancel."))
2775            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2776                .help("Required. The ID of the file that the approval is on."))
2777            .args(escape_hatch_args())
2778    }
2779
2780    // drive.approvals.comment
2781    fn leaf_drive_approvals_comment() -> Command {
2782        Command::new("drive.approvals.comment")
2783            .visible_alias("comment")
2784            .about("Comments on an approval. For more information, see Manage approvals. This sends a notification to...")
2785            .long_about("Comments on an approval. For more information, see Manage approvals. This sends a notification to both the initiator and the reviewers. Additionally, a message is also added to the approval activity log.")
2786            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2787                .help("Required. The ID of the approval to comment on."))
2788            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2789                .help("Required. The ID of the file that the approval is on."))
2790            .args(escape_hatch_args())
2791    }
2792
2793    // drive.approvals.decline
2794    fn leaf_drive_approvals_decline() -> Command {
2795        Command::new("drive.approvals.decline")
2796            .visible_alias("decline")
2797            .about("Declines an approval. For more information, see Manage approvals. This is used to update the...")
2798            .long_about("Declines an approval. For more information, see Manage approvals. This is used to update the ReviewerResponse of the requesting user with a Response of `DECLINED`. This also completes the approval and sets the approval Status to `")
2799            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2800                .help("Required. The ID of the approval to decline."))
2801            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2802                .help("Required. The ID of the file that the approval is on."))
2803            .args(escape_hatch_args())
2804    }
2805
2806    // drive.approvals.get
2807    fn leaf_drive_approvals_get() -> Command {
2808        Command::new("drive.approvals.get")
2809            .visible_alias("get")
2810            .about("Gets an approval by ID. For more information, see Manage approvals.")
2811            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2812                .help("Required. The ID of the approval."))
2813            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2814                .help("Required. The ID of the file that the approval is on."))
2815            .args(escape_hatch_args())
2816    }
2817
2818    // drive.approvals.list
2819    fn leaf_drive_approvals_list() -> Command {
2820        Command::new("drive.approvals.list")
2821            .visible_alias("list")
2822            .about("Lists the approvals on a file. For more information, see Manage approvals. By default, this method...")
2823            .long_about("Lists the approvals on a file. For more information, see Manage approvals. By default, this method returns a minimal response that may not include the items array. To retrieve approval details, you must explicitly specify the fiel")
2824            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2825                .help("Required. The ID of the file that the approval is on."))
2826            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2827                .help("The maximum number of approvals to return. When not set, at most 100 approvals are returned."))
2828            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2829                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response."))
2830            .args(escape_hatch_args())
2831    }
2832
2833    // drive.approvals.reassign
2834    fn leaf_drive_approvals_reassign() -> Command {
2835        Command::new("drive.approvals.reassign")
2836            .visible_alias("reassign")
2837            .about("Reassigns the reviewers on an approval. For more information, see Manage approvals. Adds or...")
2838            .long_about("Reassigns the reviewers on an approval. For more information, see Manage approvals. Adds or replaces reviewers in the ReviewerResponse of the approval. This can be called by any user with the `writer` permission on the file while")
2839            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2840                .help("Required. The ID of the approval to reassign."))
2841            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2842                .help("Required. The ID of the file that the approval is on."))
2843            .args(escape_hatch_args())
2844    }
2845
2846    // drive.approvals.start
2847    fn leaf_drive_approvals_start() -> Command {
2848        Command::new("drive.approvals.start")
2849            .visible_alias("start")
2850            .about("Starts an approval on a file. For more information, see Manage approvals.")
2851            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2852                .help("Required. The ID of the file that the approval is created on."))
2853            .args(escape_hatch_args())
2854    }
2855
2856    // drive.approvals
2857    fn group_drive_approvals() -> Command {
2858        Command::new("approvals")
2859            .about("Methods under drive.approvals")
2860            .subcommand_required(true)
2861            .subcommand(leaf_drive_approvals_approve())
2862            .subcommand(leaf_drive_approvals_cancel())
2863            .subcommand(leaf_drive_approvals_comment())
2864            .subcommand(leaf_drive_approvals_decline())
2865            .subcommand(leaf_drive_approvals_get())
2866            .subcommand(leaf_drive_approvals_list())
2867            .subcommand(leaf_drive_approvals_reassign())
2868            .subcommand(leaf_drive_approvals_start())
2869    }
2870
2871    // drive.apps.get
2872    fn leaf_drive_apps_get() -> Command {
2873        Command::new("drive.apps.get")
2874            .visible_alias("get")
2875            .about("Gets a specific app. For more information, see Return user info.")
2876            .arg(Arg::new("app-id").long("app-id").value_name("APP_ID").required(true)
2877                .help("The ID of the app."))
2878            .args(escape_hatch_args())
2879    }
2880
2881    // drive.apps.list
2882    fn leaf_drive_apps_list() -> Command {
2883        Command::new("drive.apps.list")
2884            .visible_alias("list")
2885            .about("Lists a user's installed apps. For more information, see Return user info.")
2886            .arg(Arg::new("app-filter-extensions").long("app-filter-extensions").value_name("APP_FILTER_EXTENSIONS")
2887                .help("A comma-separated list of file extensions to limit returned results. All results within the given app query scope which can open any of the given file extension"))
2888            .arg(Arg::new("app-filter-mime-types").long("app-filter-mime-types").value_name("APP_FILTER_MIME_TYPES")
2889                .help("A comma-separated list of file extensions to limit returned results. All results within the given app query scope which can open any of the given MIME types wil"))
2890            .arg(Arg::new("language-code").long("language-code").value_name("LANGUAGE_CODE")
2891                .help("A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/)."))
2892            .args(escape_hatch_args())
2893    }
2894
2895    // drive.apps
2896    fn group_drive_apps() -> Command {
2897        Command::new("apps")
2898            .about("Methods under drive.apps")
2899            .subcommand_required(true)
2900            .subcommand(leaf_drive_apps_get())
2901            .subcommand(leaf_drive_apps_list())
2902    }
2903
2904    // drive.changes.getStartPageToken
2905    fn leaf_drive_changes_get_start_page_token() -> Command {
2906        Command::new("drive.changes.getStartPageToken")
2907            .visible_alias("getStartPageToken")
2908            .about("Gets the starting pageToken for listing future changes. For more information, see Retrieve changes.")
2909            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
2910                .help("The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned."))
2911            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
2912                .help("Whether the requesting application supports both My Drives and shared drives."))
2913            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
2914                .help("Deprecated: Use `supportsAllDrives` instead."))
2915            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
2916                .help("Deprecated: Use `driveId` instead."))
2917            .args(escape_hatch_args())
2918    }
2919
2920    // drive.changes.list
2921    fn leaf_drive_changes_list() -> Command {
2922        Command::new("drive.changes.list")
2923            .visible_alias("list")
2924            .about("Lists the changes for a user or shared drive. For more information, see Retrieve changes.")
2925            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
2926                .help("The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change I"))
2927            .arg(Arg::new("include-corpus-removals").long("include-corpus-removals").action(ArgAction::SetTrue)
2928                .help("Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the l"))
2929            .arg(Arg::new("include-items-from-all-drives").long("include-items-from-all-drives").action(ArgAction::SetTrue)
2930                .help("Whether both My Drive and shared drive items should be included in results."))
2931            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
2932                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
2933            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
2934                .help("Specifies which additional view's permissions to include in the response. Only 'published' is supported."))
2935            .arg(Arg::new("include-removed").long("include-removed").action(ArgAction::SetTrue)
2936                .help("Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access."))
2937            .arg(Arg::new("include-team-drive-items").long("include-team-drive-items").action(ArgAction::SetTrue)
2938                .help("Deprecated: Use `includeItemsFromAllDrives` instead."))
2939            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2940                .help("The maximum number of changes to return. The service may return fewer than this value. If unspecified, at most 100 changes will be returned. The maximum value i"))
2941            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN").required(true)
2942                .help("The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the respo"))
2943            .arg(Arg::new("restrict-to-my-drive").long("restrict-to-my-drive").action(ArgAction::SetTrue)
2944                .help("Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared fil"))
2945            .arg(Arg::new("spaces").long("spaces").value_name("SPACES")
2946                .help("A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'."))
2947            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
2948                .help("Whether the requesting application supports both My Drives and shared drives."))
2949            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
2950                .help("Deprecated: Use `supportsAllDrives` instead."))
2951            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
2952                .help("Deprecated: Use `driveId` instead."))
2953            .args(escape_hatch_args())
2954    }
2955
2956    // drive.changes.watch
2957    fn leaf_drive_changes_watch() -> Command {
2958        Command::new("drive.changes.watch")
2959            .visible_alias("watch")
2960            .about("Subscribes to changes for a user. For more information, see Notifications for resource changes.")
2961            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
2962                .help("The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change I"))
2963            .arg(Arg::new("include-corpus-removals").long("include-corpus-removals").action(ArgAction::SetTrue)
2964                .help("Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the l"))
2965            .arg(Arg::new("include-items-from-all-drives").long("include-items-from-all-drives").action(ArgAction::SetTrue)
2966                .help("Whether both My Drive and shared drive items should be included in results."))
2967            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
2968                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
2969            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
2970                .help("Specifies which additional view's permissions to include in the response. Only 'published' is supported."))
2971            .arg(Arg::new("include-removed").long("include-removed").action(ArgAction::SetTrue)
2972                .help("Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access."))
2973            .arg(Arg::new("include-team-drive-items").long("include-team-drive-items").action(ArgAction::SetTrue)
2974                .help("Deprecated: Use `includeItemsFromAllDrives` instead."))
2975            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2976                .help("The maximum number of changes to return. The service may return fewer than this value. If unspecified, at most 100 changes will be returned. The maximum value i"))
2977            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN").required(true)
2978                .help("The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the respo"))
2979            .arg(Arg::new("restrict-to-my-drive").long("restrict-to-my-drive").action(ArgAction::SetTrue)
2980                .help("Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared fil"))
2981            .arg(Arg::new("spaces").long("spaces").value_name("SPACES")
2982                .help("A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'."))
2983            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
2984                .help("Whether the requesting application supports both My Drives and shared drives."))
2985            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
2986                .help("Deprecated: Use `supportsAllDrives` instead."))
2987            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
2988                .help("Deprecated: Use `driveId` instead."))
2989            .args(escape_hatch_args())
2990    }
2991
2992    // drive.changes
2993    fn group_drive_changes() -> Command {
2994        Command::new("changes")
2995            .about("Methods under drive.changes")
2996            .subcommand_required(true)
2997            .subcommand(leaf_drive_changes_get_start_page_token())
2998            .subcommand(leaf_drive_changes_list())
2999            .subcommand(leaf_drive_changes_watch())
3000    }
3001
3002    // drive.channels.stop
3003    fn leaf_drive_channels_stop() -> Command {
3004        Command::new("drive.channels.stop")
3005            .visible_alias("stop")
3006            .about("Stops watching resources through this channel. For more information, see Notifications for resource...")
3007            .long_about("Stops watching resources through this channel. For more information, see Notifications for resource changes.")
3008            .args(escape_hatch_args())
3009    }
3010
3011    // drive.channels
3012    fn group_drive_channels() -> Command {
3013        Command::new("channels")
3014            .about("Methods under drive.channels")
3015            .subcommand_required(true)
3016            .subcommand(leaf_drive_channels_stop())
3017    }
3018
3019    // drive.comments.create
3020    fn leaf_drive_comments_create() -> Command {
3021        Command::new("drive.comments.create")
3022            .visible_alias("create")
3023            .about("Creates a comment on a file. For more information, see Manage comments and replies. Required: The...")
3024            .long_about("Creates a comment on a file. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.co")
3025            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3026                .help("The ID of the file."))
3027            .args(escape_hatch_args())
3028    }
3029
3030    // drive.comments.delete
3031    fn leaf_drive_comments_delete() -> Command {
3032        Command::new("drive.comments.delete")
3033            .visible_alias("delete")
3034            .about("Deletes a comment. For more information, see Manage comments and replies.")
3035            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3036                .help("The ID of the comment."))
3037            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3038                .help("The ID of the file."))
3039            .args(escape_hatch_args())
3040    }
3041
3042    // drive.comments.get
3043    fn leaf_drive_comments_get() -> Command {
3044        Command::new("drive.comments.get")
3045            .visible_alias("get")
3046            .about("Gets a comment by ID. For more information, see Manage comments and replies. Required: The `fields`...")
3047            .long_about("Gets a comment by ID. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.com/works")
3048            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3049                .help("The ID of the comment."))
3050            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3051                .help("The ID of the file."))
3052            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3053                .help("Whether to return deleted comments. Deleted comments will not include their original content."))
3054            .args(escape_hatch_args())
3055    }
3056
3057    // drive.comments.list
3058    fn leaf_drive_comments_list() -> Command {
3059        Command::new("drive.comments.list")
3060            .visible_alias("list")
3061            .about("Lists a file's comments. For more information, see Manage comments and replies. Required: The...")
3062            .long_about("Lists a file's comments. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.com/wo")
3063            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3064                .help("The ID of the file."))
3065            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3066                .help("Whether to include deleted comments. Deleted comments will not include their original content."))
3067            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3068                .help("The maximum number of comments to return. The service may return fewer than this value. If unspecified, at most 20 comments will be returned. The maximum value"))
3069            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3070                .help("The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response."))
3071            .arg(Arg::new("start-modified-time").long("start-modified-time").value_name("START_MODIFIED_TIME")
3072                .help("The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time)."))
3073            .args(escape_hatch_args())
3074    }
3075
3076    // drive.comments.update
3077    fn leaf_drive_comments_update() -> Command {
3078        Command::new("drive.comments.update")
3079            .visible_alias("update")
3080            .about("Updates a comment with patch semantics. For more information, see Manage comments and replies...")
3081            .long_about("Updates a comment with patch semantics. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developer")
3082            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3083                .help("The ID of the comment."))
3084            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3085                .help("The ID of the file."))
3086            .args(escape_hatch_args())
3087    }
3088
3089    // drive.comments
3090    fn group_drive_comments() -> Command {
3091        Command::new("comments")
3092            .about("Methods under drive.comments")
3093            .subcommand_required(true)
3094            .subcommand(leaf_drive_comments_create())
3095            .subcommand(leaf_drive_comments_delete())
3096            .subcommand(leaf_drive_comments_get())
3097            .subcommand(leaf_drive_comments_list())
3098            .subcommand(leaf_drive_comments_update())
3099    }
3100
3101    // drive.drives.create
3102    fn leaf_drive_drives_create() -> Command {
3103        Command::new("drive.drives.create")
3104            .visible_alias("create")
3105            .about("Creates a shared drive. For more information, see Manage shared drives.")
3106            .arg(Arg::new("request-id").long("request-id").value_name("REQUEST_ID").required(true)
3107                .help("Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same"))
3108            .args(escape_hatch_args())
3109    }
3110
3111    // drive.drives.delete
3112    fn leaf_drive_drives_delete() -> Command {
3113        Command::new("drive.drives.delete")
3114            .visible_alias("delete")
3115            .about("Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot...")
3116            .long_about("Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items. For more information, see Manage shared drives.")
3117            .arg(Arg::new("allow-item-deletion").long("allow-item-deletion").action(ArgAction::SetTrue)
3118                .help("Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`."))
3119            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3120                .help("The ID of the shared drive."))
3121            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3122                .help("Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the s"))
3123            .args(escape_hatch_args())
3124    }
3125
3126    // drive.drives.get
3127    fn leaf_drive_drives_get() -> Command {
3128        Command::new("drive.drives.get")
3129            .visible_alias("get")
3130            .about("Gets a shared drive's metadata by ID. For more information, see Manage shared drives.")
3131            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3132                .help("The ID of the shared drive."))
3133            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3134                .help("Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the s"))
3135            .args(escape_hatch_args())
3136    }
3137
3138    // drive.drives.hide
3139    fn leaf_drive_drives_hide() -> Command {
3140        Command::new("drive.drives.hide")
3141            .visible_alias("hide")
3142            .about("Hides a shared drive from the default view. For more information, see Manage shared drives.")
3143            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3144                .help("The ID of the shared drive."))
3145            .args(escape_hatch_args())
3146    }
3147
3148    // drive.drives.list
3149    fn leaf_drive_drives_list() -> Command {
3150        Command::new("drive.drives.list")
3151            .visible_alias("list")
3152            .about("Lists the user's shared drives. This method accepts the `q` parameter, which is a search query...")
3153            .long_about("Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the Search for shared drives guide.")
3154            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3155                .help("The maximum number of shared drives to return. The service may return fewer than this value. If unspecified, at most 10 shared drives will be returned. The maxi"))
3156            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3157                .help("Page token for shared drives."))
3158            .arg(Arg::new("q").long("q").value_name("Q")
3159                .help("Query string for searching shared drives."))
3160            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3161                .help("Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned."))
3162            .args(escape_hatch_args())
3163    }
3164
3165    // drive.drives.unhide
3166    fn leaf_drive_drives_unhide() -> Command {
3167        Command::new("drive.drives.unhide")
3168            .visible_alias("unhide")
3169            .about("Restores a shared drive to the default view. For more information, see Manage shared drives.")
3170            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3171                .help("The ID of the shared drive."))
3172            .args(escape_hatch_args())
3173    }
3174
3175    // drive.drives.update
3176    fn leaf_drive_drives_update() -> Command {
3177        Command::new("drive.drives.update")
3178            .visible_alias("update")
3179            .about("Updates the metadata for a shared drive. For more information, see Manage shared drives.")
3180            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3181                .help("The ID of the shared drive."))
3182            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3183                .help("Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the s"))
3184            .args(escape_hatch_args())
3185    }
3186
3187    // drive.drives
3188    fn group_drive_drives() -> Command {
3189        Command::new("drives")
3190            .about("Methods under drive.drives")
3191            .subcommand_required(true)
3192            .subcommand(leaf_drive_drives_create())
3193            .subcommand(leaf_drive_drives_delete())
3194            .subcommand(leaf_drive_drives_get())
3195            .subcommand(leaf_drive_drives_hide())
3196            .subcommand(leaf_drive_drives_list())
3197            .subcommand(leaf_drive_drives_unhide())
3198            .subcommand(leaf_drive_drives_update())
3199    }
3200
3201    // drive.files.copy
3202    fn leaf_drive_files_copy() -> Command {
3203        Command::new("drive.files.copy")
3204            .visible_alias("copy")
3205            .about("Creates a copy of a file and applies any requested updates with patch semantics. For more...")
3206            .long_about("Creates a copy of a file and applies any requested updates with patch semantics. For more information, see Create and manage files.")
3207            .arg(Arg::new("copy-comments").long("copy-comments").action(ArgAction::SetTrue)
3208                .help("Whether to copy the open (unresolved) comments associated with the file."))
3209            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3210                .help("Deprecated: Copying files into multiple folders is no longer supported. Use shortcuts instead."))
3211            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3212                .help("The ID of the file."))
3213            .arg(Arg::new("ignore-default-visibility").long("ignore-default-visibility").action(ArgAction::SetTrue)
3214                .help("Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the doma"))
3215            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3216                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3217            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3218                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3219            .arg(Arg::new("keep-revision-forever").long("keep-revision-forever").action(ArgAction::SetTrue)
3220                .help("Whether to set the `keepForever` field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for th"))
3221            .arg(Arg::new("ocr-language").long("ocr-language").value_name("OCR_LANGUAGE")
3222                .help("A language hint for OCR processing during image import (ISO 639-1 code)."))
3223            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3224                .help("Whether the requesting application supports both My Drives and shared drives."))
3225            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3226                .help("Deprecated: Use `supportsAllDrives` instead."))
3227            .args(escape_hatch_args())
3228    }
3229
3230    // drive.files.create
3231    fn leaf_drive_files_create() -> Command {
3232        Command::new("drive.files.create")
3233            .visible_alias("create")
3234            .about("Creates a file. For more information, see Create and manage files. This method supports an...")
3235            .long_about("Creates a file. For more information, see Create and manage files. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types")
3236            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3237                .help("Deprecated: Creating files in multiple folders is no longer supported."))
3238            .arg(Arg::new("ignore-default-visibility").long("ignore-default-visibility").action(ArgAction::SetTrue)
3239                .help("Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the doma"))
3240            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3241                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3242            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3243                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3244            .arg(Arg::new("keep-revision-forever").long("keep-revision-forever").action(ArgAction::SetTrue)
3245                .help("Whether to set the `keepForever` field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for th"))
3246            .arg(Arg::new("ocr-language").long("ocr-language").value_name("OCR_LANGUAGE")
3247                .help("A language hint for OCR processing during image import (ISO 639-1 code)."))
3248            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3249                .help("Whether the requesting application supports both My Drives and shared drives."))
3250            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3251                .help("Deprecated: Use `supportsAllDrives` instead."))
3252            .arg(Arg::new("use-content-as-indexable-text").long("use-content-as-indexable-text").action(ArgAction::SetTrue)
3253                .help("Whether to use the uploaded content as indexable text."))
3254            .args(escape_hatch_args())
3255    }
3256
3257    // drive.files.delete
3258    fn leaf_drive_files_delete() -> Command {
3259        Command::new("drive.files.delete")
3260            .visible_alias("delete")
3261            .about("Permanently deletes a file owned by the user without moving it to the trash. For more information...")
3262            .long_about("Permanently deletes a file owned by the user without moving it to the trash. For more information, see Trash or delete files and folders. If the file belongs to a shared drive, the user must be an `organizer` on the parent folder. If")
3263            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3264                .help("Deprecated: If an item isn't in a shared drive and its last parent is deleted but the item itself isn't, the item will be placed under its owner's root."))
3265            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3266                .help("The ID of the file."))
3267            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3268                .help("Whether the requesting application supports both My Drives and shared drives."))
3269            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3270                .help("Deprecated: Use `supportsAllDrives` instead."))
3271            .args(escape_hatch_args())
3272    }
3273
3274    // drive.files.download
3275    fn leaf_drive_files_download() -> Command {
3276        Command::new("drive.files.download")
3277            .visible_alias("download")
3278            .about("Downloads the content of a file. For more information, see Download and export files. Operations...")
3279            .long_about("Downloads the content of a file. For more information, see Download and export files. Operations are valid for 24 hours from the time of creation.")
3280            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3281                .help("Required. The ID of the file to download."))
3282            .arg(Arg::new("mime-type").long("mime-type").value_name("MIME_TYPE")
3283                .help("Optional. The MIME type the file should be downloaded as. This field can only be set when downloading Google Workspace documents. For a list of supported MIME t"))
3284            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID")
3285                .help("Optional. The revision ID of the file to download. This field can only be set when downloading blob files, Google Docs, and Google Sheets. Returns `INVALID_ARGU"))
3286            .args(escape_hatch_args())
3287    }
3288
3289    // drive.files.emptyTrash
3290    fn leaf_drive_files_empty_trash() -> Command {
3291        Command::new("drive.files.emptyTrash")
3292            .visible_alias("emptyTrash")
3293            .about("Permanently deletes all of the user's trashed files. For more information, see Trash or delete...")
3294            .long_about("Permanently deletes all of the user's trashed files. For more information, see Trash or delete files and folders.")
3295            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
3296                .help("If set, empties the trash of the provided shared drive."))
3297            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3298                .help("Deprecated: If an item isn't in a shared drive and its last parent is deleted but the item itself isn't, the item will be placed under its owner's root."))
3299            .args(escape_hatch_args())
3300    }
3301
3302    // drive.files.export
3303    fn leaf_drive_files_export() -> Command {
3304        Command::new("drive.files.export")
3305            .visible_alias("export")
3306            .about("Exports a Google Workspace document to the requested MIME type and returns exported byte content...")
3307            .long_about("Exports a Google Workspace document to the requested MIME type and returns exported byte content. For more information, see Download and export files. Note that the exported content is limited to 10 MB.")
3308            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3309                .help("The ID of the file."))
3310            .arg(Arg::new("mime-type").long("mime-type").value_name("MIME_TYPE").required(true)
3311                .help("Required. The MIME type of the format requested for this export. For a list of supported MIME types, see [Export MIME types for Google Workspace documents](/wor"))
3312            .args(escape_hatch_args())
3313    }
3314
3315    // drive.files.generateCseToken
3316    fn leaf_drive_files_generate_cse_token() -> Command {
3317        Command::new("drive.files.generateCseToken")
3318            .visible_alias("generateCseToken")
3319            .about("Generates a CSE token which can be used to create or update CSE files.")
3320            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID")
3321                .help("The ID of the file for which the JWT should be generated. If not provided, an id will be generated."))
3322            .arg(Arg::new("parent").long("parent").value_name("PARENT")
3323                .help("The ID of the expected parent of the file. Used when generating a JWT for a new CSE file. If specified, the parent will be fetched, and if the parent is a share"))
3324            .args(escape_hatch_args())
3325    }
3326
3327    // drive.files.generateIds
3328    fn leaf_drive_files_generate_ids() -> Command {
3329        Command::new("drive.files.generateIds")
3330            .visible_alias("generateIds")
3331            .about("Generates a set of file IDs which can be provided in create or copy requests. For more information...")
3332            .long_about("Generates a set of file IDs which can be provided in create or copy requests. For more information, see Create and manage files.")
3333            .arg(Arg::new("count").long("count").value_name("COUNT").value_parser(clap::value_parser!(i64))
3334                .help("The number of IDs to return."))
3335            .arg(Arg::new("space").long("space").value_name("SPACE")
3336                .help("The space in which the IDs can be used to create files. Supported values are `drive` and `appDataFolder`. (Default: `drive`.) For more information, see [File or"))
3337            .arg(Arg::new("type").long("type").value_name("TYPE")
3338                .help("The type of items which the IDs can be used for. Supported values are `files` and `shortcuts`. Note that `shortcuts` are only supported in the `drive` `space`."))
3339            .args(escape_hatch_args())
3340    }
3341
3342    // drive.files.get
3343    fn leaf_drive_files_get() -> Command {
3344        Command::new("drive.files.get")
3345            .visible_alias("get")
3346            .about("Gets a file's metadata or content by ID. For more information, see Search for files and folders. If...")
3347            .long_about("Gets a file's metadata or content by ID. For more information, see Search for files and folders. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading conte")
3348            .arg(Arg::new("acknowledge-abuse").long("acknowledge-abuse").action(ArgAction::SetTrue)
3349                .help("Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `medi"))
3350            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3351                .help("The ID of the file."))
3352            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3353                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3354            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3355                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3356            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3357                .help("Whether the requesting application supports both My Drives and shared drives."))
3358            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3359                .help("Deprecated: Use `supportsAllDrives` instead."))
3360            .args(escape_hatch_args())
3361    }
3362
3363    // drive.files.list
3364    fn leaf_drive_files_list() -> Command {
3365        Command::new("drive.files.list")
3366            .visible_alias("list")
3367            .about("Lists the user's files. For more information, see Search for files and folders. This method accepts...")
3368            .long_about("Lists the user's files. For more information, see Search for files and folders. This method accepts the `q` parameter, which is a search query combining one or more search terms. This method returns *all* files by default, incl")
3369            .arg(Arg::new("corpora").long("corpora").value_name("CORPORA")
3370                .help("Specifies a collection of items (files or documents) to which the query applies. Supported items include: * `user` * `domain` * `drive` * `allDrives` Prefer `us"))
3371            .arg(Arg::new("corpus").long("corpus").value_name("CORPUS").value_parser(["domain", "user"])
3372                .help("Deprecated: The source of files to list. Use `corpora` instead."))
3373            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
3374                .help("ID of the shared drive to search."))
3375            .arg(Arg::new("include-items-from-all-drives").long("include-items-from-all-drives").action(ArgAction::SetTrue)
3376                .help("Whether both My Drive and shared drive items should be included in results."))
3377            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3378                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3379            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3380                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3381            .arg(Arg::new("include-team-drive-items").long("include-team-drive-items").action(ArgAction::SetTrue)
3382                .help("Deprecated: Use `includeItemsFromAllDrives` instead."))
3383            .arg(Arg::new("order-by").long("order-by").value_name("ORDER_BY")
3384                .help("A comma-separated list of sort keys. Valid keys are: * `createdTime`: When the file was created. Avoid using this key for queries on large item collections as i"))
3385            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3386                .help("The maximum number of files to return. The service may return fewer than this value. If unspecified, at most 100 files will be returned for shared drives, and t"))
3387            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3388                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response."))
3389            .arg(Arg::new("q").long("q").value_name("Q")
3390                .help("A query for filtering the file results. For supported syntax, see Search for files and folders."))
3391            .arg(Arg::new("spaces").long("spaces").value_name("SPACES")
3392                .help("A comma-separated list of spaces to query within the corpora. Supported values are `drive` and `appDataFolder`. For more information, see [File organization](ht"))
3393            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3394                .help("Whether the requesting application supports both My Drives and shared drives."))
3395            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3396                .help("Deprecated: Use `supportsAllDrives` instead."))
3397            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
3398                .help("Deprecated: Use `driveId` instead."))
3399            .args(escape_hatch_args())
3400    }
3401
3402    // drive.files.listLabels
3403    fn leaf_drive_files_list_labels() -> Command {
3404        Command::new("drive.files.listLabels")
3405            .visible_alias("listLabels")
3406            .about("Lists the labels on a file. For more information, see List labels on a file.")
3407            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3408                .help("The ID for the file."))
3409            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
3410                .help("The maximum number of labels to return per page. When not set, defaults to 100."))
3411            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3412                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response."))
3413            .args(escape_hatch_args())
3414    }
3415
3416    // drive.files.modifyLabels
3417    fn leaf_drive_files_modify_labels() -> Command {
3418        Command::new("drive.files.modifyLabels")
3419            .visible_alias("modifyLabels")
3420            .about("Modifies the set of labels applied to a file. For more information, see Set a label field on a...")
3421            .long_about("Modifies the set of labels applied to a file. For more information, see Set a label field on a file. Returns a list of the labels that were added or modified.")
3422            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3423                .help("The ID of the file to which the labels belong."))
3424            .args(escape_hatch_args())
3425    }
3426
3427    // drive.files.update
3428    fn leaf_drive_files_update() -> Command {
3429        Command::new("drive.files.update")
3430            .visible_alias("update")
3431            .about("Updates a file's metadata, content, or both. When calling this method, only populate fields in the...")
3432            .long_about("Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI an")
3433            .arg(Arg::new("add-parents").long("add-parents").value_name("ADD_PARENTS")
3434                .help("A comma-separated list of parent IDs to add."))
3435            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3436                .help("Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead."))
3437            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3438                .help("The ID of the file."))
3439            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3440                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3441            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3442                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3443            .arg(Arg::new("keep-revision-forever").long("keep-revision-forever").action(ArgAction::SetTrue)
3444                .help("Whether to set the `keepForever` field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for th"))
3445            .arg(Arg::new("ocr-language").long("ocr-language").value_name("OCR_LANGUAGE")
3446                .help("A language hint for OCR processing during image import (ISO 639-1 code)."))
3447            .arg(Arg::new("remove-parents").long("remove-parents").value_name("REMOVE_PARENTS")
3448                .help("A comma-separated list of parent IDs to remove."))
3449            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3450                .help("Whether the requesting application supports both My Drives and shared drives."))
3451            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3452                .help("Deprecated: Use `supportsAllDrives` instead."))
3453            .arg(Arg::new("use-content-as-indexable-text").long("use-content-as-indexable-text").action(ArgAction::SetTrue)
3454                .help("Whether to use the uploaded content as indexable text."))
3455            .args(escape_hatch_args())
3456    }
3457
3458    // drive.files.watch
3459    fn leaf_drive_files_watch() -> Command {
3460        Command::new("drive.files.watch")
3461            .visible_alias("watch")
3462            .about("Subscribes to changes to a file. For more information, see Notifications for resource changes.")
3463            .arg(Arg::new("acknowledge-abuse").long("acknowledge-abuse").action(ArgAction::SetTrue)
3464                .help("Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `medi"))
3465            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3466                .help("The ID of the file."))
3467            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3468                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3469            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3470                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3471            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3472                .help("Whether the requesting application supports both My Drives and shared drives."))
3473            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3474                .help("Deprecated: Use `supportsAllDrives` instead."))
3475            .args(escape_hatch_args())
3476    }
3477
3478    // drive.files
3479    fn group_drive_files() -> Command {
3480        Command::new("files")
3481            .about("Methods under drive.files")
3482            .subcommand_required(true)
3483            .subcommand(leaf_drive_files_copy())
3484            .subcommand(leaf_drive_files_create())
3485            .subcommand(leaf_drive_files_delete())
3486            .subcommand(leaf_drive_files_download())
3487            .subcommand(leaf_drive_files_empty_trash())
3488            .subcommand(leaf_drive_files_export())
3489            .subcommand(leaf_drive_files_generate_cse_token())
3490            .subcommand(leaf_drive_files_generate_ids())
3491            .subcommand(leaf_drive_files_get())
3492            .subcommand(leaf_drive_files_list())
3493            .subcommand(leaf_drive_files_list_labels())
3494            .subcommand(leaf_drive_files_modify_labels())
3495            .subcommand(leaf_drive_files_update())
3496            .subcommand(leaf_drive_files_watch())
3497    }
3498
3499    // drive.operations.get
3500    fn leaf_drive_operations_get() -> Command {
3501        Command::new("drive.operations.get")
3502            .visible_alias("get")
3503            .about("Gets the latest state of a long-running operation. Clients can use this method to poll the...")
3504            .long_about("Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.")
3505            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
3506                .help("The name of the operation resource."))
3507            .args(escape_hatch_args())
3508    }
3509
3510    // drive.operations
3511    fn group_drive_operations() -> Command {
3512        Command::new("operations")
3513            .about("Methods under drive.operations")
3514            .subcommand_required(true)
3515            .subcommand(leaf_drive_operations_get())
3516    }
3517
3518    // drive.permissions.create
3519    fn leaf_drive_permissions_create() -> Command {
3520        Command::new("drive.permissions.create")
3521            .visible_alias("create")
3522            .about("Creates a permission for a file or shared drive. For more information, see Share files, folders...")
3523            .long_about("Creates a permission for a file or shared drive. For more information, see Share files, folders, and drives. **Warning:** Concurrent permission modifications (such as update or delete) on the same file, folder, or shared driv")
3524            .arg(Arg::new("email-message").long("email-message").value_name("EMAIL_MESSAGE")
3525                .help("A plain text custom message to include in the notification email."))
3526            .arg(Arg::new("enforce-expansive-access").long("enforce-expansive-access").action(ArgAction::SetTrue)
3527                .help("Deprecated: All requests use the expansive access rules."))
3528            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3529                .help("Deprecated: See `moveToNewOwnersRoot` for details."))
3530            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3531                .help("The ID of the file or shared drive."))
3532            .arg(Arg::new("move-to-new-owners-root").long("move-to-new-owners-root").action(ArgAction::SetTrue)
3533                .help("This parameter only takes effect if the item isn't in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the"))
3534            .arg(Arg::new("send-notification-email").long("send-notification-email").action(ArgAction::SetTrue)
3535                .help("Whether to send a notification email when sharing to users or groups. This defaults to `true` for users and groups, and is not allowed for other requests. It mu"))
3536            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3537                .help("Whether the requesting application supports both My Drives and shared drives."))
3538            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3539                .help("Deprecated: Use `supportsAllDrives` instead."))
3540            .arg(Arg::new("transfer-ownership").long("transfer-ownership").action(ArgAction::SetTrue)
3541                .help("Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side ef"))
3542            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3543                .help("Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file"))
3544            .args(escape_hatch_args())
3545    }
3546
3547    // drive.permissions.delete
3548    fn leaf_drive_permissions_delete() -> Command {
3549        Command::new("drive.permissions.delete")
3550            .visible_alias("delete")
3551            .about("Deletes a permission. For more information, see Share files, folders, and drives. **Warning:**...")
3552            .long_about("Deletes a permission. For more information, see Share files, folders, and drives. **Warning:** Concurrent permission modifications (such as update or delete) on the same file, folder, or shared drive aren't supported across a")
3553            .arg(Arg::new("enforce-expansive-access").long("enforce-expansive-access").action(ArgAction::SetTrue)
3554                .help("Deprecated: All requests use the expansive access rules."))
3555            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3556                .help("The ID of the file or shared drive."))
3557            .arg(Arg::new("permission-id").long("permission-id").value_name("PERMISSION_ID").required(true)
3558                .help("The ID of the permission."))
3559            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3560                .help("Whether the requesting application supports both My Drives and shared drives."))
3561            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3562                .help("Deprecated: Use `supportsAllDrives` instead."))
3563            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3564                .help("Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file"))
3565            .args(escape_hatch_args())
3566    }
3567
3568    // drive.permissions.get
3569    fn leaf_drive_permissions_get() -> Command {
3570        Command::new("drive.permissions.get")
3571            .visible_alias("get")
3572            .about("Gets a permission by ID. For more information, see Share files, folders, and drives.")
3573            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3574                .help("The ID of the file."))
3575            .arg(Arg::new("permission-id").long("permission-id").value_name("PERMISSION_ID").required(true)
3576                .help("The ID of the permission."))
3577            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3578                .help("Whether the requesting application supports both My Drives and shared drives."))
3579            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3580                .help("Deprecated: Use `supportsAllDrives` instead."))
3581            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3582                .help("Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file"))
3583            .args(escape_hatch_args())
3584    }
3585
3586    // drive.permissions.list
3587    fn leaf_drive_permissions_list() -> Command {
3588        Command::new("drive.permissions.list")
3589            .visible_alias("list")
3590            .about("Lists a file's or shared drive's permissions. For more information, see Share files, folders, and...")
3591            .long_about("Lists a file's or shared drive's permissions. For more information, see Share files, folders, and drives.")
3592            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3593                .help("The ID of the file or shared drive."))
3594            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3595                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3596            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3597                .help("The maximum number of permissions to return. The service may return fewer than this value. If unspecified, at most 100 permissions will be returned for shared d"))
3598            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3599                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response."))
3600            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3601                .help("Whether the requesting application supports both My Drives and shared drives."))
3602            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3603                .help("Deprecated: Use `supportsAllDrives` instead."))
3604            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3605                .help("Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file"))
3606            .args(escape_hatch_args())
3607    }
3608
3609    // drive.permissions.update
3610    fn leaf_drive_permissions_update() -> Command {
3611        Command::new("drive.permissions.update")
3612            .visible_alias("update")
3613            .about("Updates a permission with patch semantics. For more information, see Share files, folders, and...")
3614            .long_about("Updates a permission with patch semantics. For more information, see Share files, folders, and drives. **Warning:** Concurrent permission modifications (such as update or delete) on the same file, folder, or shared drive aren")
3615            .arg(Arg::new("enforce-expansive-access").long("enforce-expansive-access").action(ArgAction::SetTrue)
3616                .help("Deprecated: All requests use the expansive access rules."))
3617            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3618                .help("The ID of the file or shared drive."))
3619            .arg(Arg::new("permission-id").long("permission-id").value_name("PERMISSION_ID").required(true)
3620                .help("The ID of the permission."))
3621            .arg(Arg::new("remove-expiration").long("remove-expiration").action(ArgAction::SetTrue)
3622                .help("Whether to remove the expiration date."))
3623            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3624                .help("Whether the requesting application supports both My Drives and shared drives."))
3625            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3626                .help("Deprecated: Use `supportsAllDrives` instead."))
3627            .arg(Arg::new("transfer-ownership").long("transfer-ownership").action(ArgAction::SetTrue)
3628                .help("Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side ef"))
3629            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3630                .help("Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file"))
3631            .args(escape_hatch_args())
3632    }
3633
3634    // drive.permissions
3635    fn group_drive_permissions() -> Command {
3636        Command::new("permissions")
3637            .about("Methods under drive.permissions")
3638            .subcommand_required(true)
3639            .subcommand(leaf_drive_permissions_create())
3640            .subcommand(leaf_drive_permissions_delete())
3641            .subcommand(leaf_drive_permissions_get())
3642            .subcommand(leaf_drive_permissions_list())
3643            .subcommand(leaf_drive_permissions_update())
3644    }
3645
3646    // drive.replies.create
3647    fn leaf_drive_replies_create() -> Command {
3648        Command::new("drive.replies.create")
3649            .visible_alias("create")
3650            .about("Creates a reply to a comment. For more information, see Manage comments and replies.")
3651            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3652                .help("The ID of the comment."))
3653            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3654                .help("The ID of the file."))
3655            .args(escape_hatch_args())
3656    }
3657
3658    // drive.replies.delete
3659    fn leaf_drive_replies_delete() -> Command {
3660        Command::new("drive.replies.delete")
3661            .visible_alias("delete")
3662            .about("Deletes a reply. For more information, see Manage comments and replies.")
3663            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3664                .help("The ID of the comment."))
3665            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3666                .help("The ID of the file."))
3667            .arg(Arg::new("reply-id").long("reply-id").value_name("REPLY_ID").required(true)
3668                .help("The ID of the reply."))
3669            .args(escape_hatch_args())
3670    }
3671
3672    // drive.replies.get
3673    fn leaf_drive_replies_get() -> Command {
3674        Command::new("drive.replies.get")
3675            .visible_alias("get")
3676            .about("Gets a reply by ID. For more information, see Manage comments and replies.")
3677            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3678                .help("The ID of the comment."))
3679            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3680                .help("The ID of the file."))
3681            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3682                .help("Whether to return deleted replies. Deleted replies don't include their original content."))
3683            .arg(Arg::new("reply-id").long("reply-id").value_name("REPLY_ID").required(true)
3684                .help("The ID of the reply."))
3685            .args(escape_hatch_args())
3686    }
3687
3688    // drive.replies.list
3689    fn leaf_drive_replies_list() -> Command {
3690        Command::new("drive.replies.list")
3691            .visible_alias("list")
3692            .about("Lists a comment's replies. For more information, see Manage comments and replies.")
3693            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3694                .help("The ID of the comment."))
3695            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3696                .help("The ID of the file."))
3697            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3698                .help("Whether to include deleted replies. Deleted replies don't include their original content."))
3699            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3700                .help("The maximum number of replies to return. The service may return fewer than this value. If unspecified, at most 20 replies will be returned. The maximum value is"))
3701            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3702                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response."))
3703            .args(escape_hatch_args())
3704    }
3705
3706    // drive.replies.update
3707    fn leaf_drive_replies_update() -> Command {
3708        Command::new("drive.replies.update")
3709            .visible_alias("update")
3710            .about("Updates a reply with patch semantics. For more information, see Manage comments and replies.")
3711            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3712                .help("The ID of the comment."))
3713            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3714                .help("The ID of the file."))
3715            .arg(Arg::new("reply-id").long("reply-id").value_name("REPLY_ID").required(true)
3716                .help("The ID of the reply."))
3717            .args(escape_hatch_args())
3718    }
3719
3720    // drive.replies
3721    fn group_drive_replies() -> Command {
3722        Command::new("replies")
3723            .about("Methods under drive.replies")
3724            .subcommand_required(true)
3725            .subcommand(leaf_drive_replies_create())
3726            .subcommand(leaf_drive_replies_delete())
3727            .subcommand(leaf_drive_replies_get())
3728            .subcommand(leaf_drive_replies_list())
3729            .subcommand(leaf_drive_replies_update())
3730    }
3731
3732    // drive.revisions.delete
3733    fn leaf_drive_revisions_delete() -> Command {
3734        Command::new("drive.revisions.delete")
3735            .visible_alias("delete")
3736            .about("Permanently deletes a file version. You can only delete revisions for files with binary content in...")
3737            .long_about("Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. For more information, see [Manage file revisions](https")
3738            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3739                .help("The ID of the file."))
3740            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID").required(true)
3741                .help("The ID of the revision."))
3742            .args(escape_hatch_args())
3743    }
3744
3745    // drive.revisions.get
3746    fn leaf_drive_revisions_get() -> Command {
3747        Command::new("drive.revisions.get")
3748            .visible_alias("get")
3749            .about("Gets a revision's metadata or content by ID. For more information, see Manage file revisions.")
3750            .arg(Arg::new("acknowledge-abuse").long("acknowledge-abuse").action(ArgAction::SetTrue)
3751                .help("Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `medi"))
3752            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3753                .help("The ID of the file."))
3754            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID").required(true)
3755                .help("The ID of the revision."))
3756            .args(escape_hatch_args())
3757    }
3758
3759    // drive.revisions.list
3760    fn leaf_drive_revisions_list() -> Command {
3761        Command::new("drive.revisions.list")
3762            .visible_alias("list")
3763            .about("Lists a file's revisions. For more information, see Manage file revisions. **Important:** The list...")
3764            .long_about("Lists a file's revisions. For more information, see Manage file revisions. **Important:** The list of revisions returned by this method might be incomplete for files with a large revision history, including frequently edite")
3765            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3766                .help("The ID of the file."))
3767            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3768                .help("The maximum number of revisions to return. The service may return fewer than this value. If unspecified, at most 200 revisions will be returned. The maximum val"))
3769            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3770                .help("The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response."))
3771            .args(escape_hatch_args())
3772    }
3773
3774    // drive.revisions.update
3775    fn leaf_drive_revisions_update() -> Command {
3776        Command::new("drive.revisions.update")
3777            .visible_alias("update")
3778            .about("Updates a revision with patch semantics. For more information, see Manage file revisions.")
3779            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3780                .help("The ID of the file."))
3781            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID").required(true)
3782                .help("The ID of the revision."))
3783            .args(escape_hatch_args())
3784    }
3785
3786    // drive.revisions
3787    fn group_drive_revisions() -> Command {
3788        Command::new("revisions")
3789            .about("Methods under drive.revisions")
3790            .subcommand_required(true)
3791            .subcommand(leaf_drive_revisions_delete())
3792            .subcommand(leaf_drive_revisions_get())
3793            .subcommand(leaf_drive_revisions_list())
3794            .subcommand(leaf_drive_revisions_update())
3795    }
3796
3797    // drive.teamdrives.create
3798    fn leaf_drive_teamdrives_create() -> Command {
3799        Command::new("drive.teamdrives.create")
3800            .visible_alias("create")
3801            .about("Deprecated: Use `drives.create` instead.")
3802            .arg(Arg::new("request-id").long("request-id").value_name("REQUEST_ID").required(true)
3803                .help("Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same us"))
3804            .args(escape_hatch_args())
3805    }
3806
3807    // drive.teamdrives.delete
3808    fn leaf_drive_teamdrives_delete() -> Command {
3809        Command::new("drive.teamdrives.delete")
3810            .visible_alias("delete")
3811            .about("Deprecated: Use `drives.delete` instead.")
3812            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID").required(true)
3813                .help("The ID of the Team Drive"))
3814            .args(escape_hatch_args())
3815    }
3816
3817    // drive.teamdrives.get
3818    fn leaf_drive_teamdrives_get() -> Command {
3819        Command::new("drive.teamdrives.get")
3820            .visible_alias("get")
3821            .about("Deprecated: Use `drives.get` instead.")
3822            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID").required(true)
3823                .help("The ID of the Team Drive"))
3824            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3825                .help("Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the T"))
3826            .args(escape_hatch_args())
3827    }
3828
3829    // drive.teamdrives.list
3830    fn leaf_drive_teamdrives_list() -> Command {
3831        Command::new("drive.teamdrives.list")
3832            .visible_alias("list")
3833            .about("Deprecated: Use `drives.list` instead.")
3834            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3835                .help("Maximum number of Team Drives to return."))
3836            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3837                .help("Page token for Team Drives."))
3838            .arg(Arg::new("q").long("q").value_name("Q")
3839                .help("Query string for searching Team Drives."))
3840            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3841                .help("Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned."))
3842            .args(escape_hatch_args())
3843    }
3844
3845    // drive.teamdrives.update
3846    fn leaf_drive_teamdrives_update() -> Command {
3847        Command::new("drive.teamdrives.update")
3848            .visible_alias("update")
3849            .about("Deprecated: Use `drives.update` instead.")
3850            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID").required(true)
3851                .help("The ID of the Team Drive"))
3852            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3853                .help("Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the T"))
3854            .args(escape_hatch_args())
3855    }
3856
3857    // drive.teamdrives
3858    fn group_drive_teamdrives() -> Command {
3859        Command::new("teamdrives")
3860            .about("Methods under drive.teamdrives")
3861            .subcommand_required(true)
3862            .subcommand(leaf_drive_teamdrives_create())
3863            .subcommand(leaf_drive_teamdrives_delete())
3864            .subcommand(leaf_drive_teamdrives_get())
3865            .subcommand(leaf_drive_teamdrives_list())
3866            .subcommand(leaf_drive_teamdrives_update())
3867    }
3868
3869    // drive
3870    fn service_drive() -> Command {
3871        Command::new("drive")
3872            .about("Google Drive API operations (v3, 64 methods)")
3873            .subcommand_required(true)
3874            .subcommand(group_drive_about())
3875            .subcommand(group_drive_accessproposals())
3876            .subcommand(group_drive_approvals())
3877            .subcommand(group_drive_apps())
3878            .subcommand(group_drive_changes())
3879            .subcommand(group_drive_channels())
3880            .subcommand(group_drive_comments())
3881            .subcommand(group_drive_drives())
3882            .subcommand(group_drive_files())
3883            .subcommand(group_drive_operations())
3884            .subcommand(group_drive_permissions())
3885            .subcommand(group_drive_replies())
3886            .subcommand(group_drive_revisions())
3887            .subcommand(group_drive_teamdrives())
3888    }
3889
3890    // forms.forms.batchUpdate
3891    fn leaf_forms_forms_batch_update() -> Command {
3892        Command::new("forms.forms.batchUpdate")
3893            .visible_alias("batchUpdate")
3894            .about("Change the form with a batch of updates.")
3895            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3896                .help("Required. The form ID."))
3897            .args(escape_hatch_args())
3898    }
3899
3900    // forms.forms.create
3901    fn leaf_forms_forms_create() -> Command {
3902        Command::new("forms.forms.create")
3903            .visible_alias("create")
3904            .about("Create a new form using the title given in the provided form message in the request. *Important:*...")
3905            .long_about("Create a new form using the title given in the provided form message in the request. *Important:* Only the form.info.title and form.info.document_title fields are copied to the new form. All other fields including the form description, items and settings are disallowed. To create a new form and add")
3906            .arg(Arg::new("unpublished").long("unpublished").action(ArgAction::SetTrue)
3907                .help("Optional. Whether the form is unpublished. If set to `true`, the form doesn't accept responses. If set to `false` or unset, the form is published and accepts re"))
3908            .args(escape_hatch_args())
3909    }
3910
3911    // forms.forms.get
3912    fn leaf_forms_forms_get() -> Command {
3913        Command::new("forms.forms.get")
3914            .visible_alias("get")
3915            .about("Get a form.")
3916            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3917                .help("Required. The form ID."))
3918            .args(escape_hatch_args())
3919    }
3920
3921    // forms.forms.responses.get
3922    fn leaf_forms_forms_responses_get() -> Command {
3923        Command::new("forms.forms.responses.get")
3924            .visible_alias("get")
3925            .about("Get one response from the form.")
3926            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3927                .help("Required. The form ID."))
3928            .arg(Arg::new("response-id").long("response-id").value_name("RESPONSE_ID").required(true)
3929                .help("Required. The response ID within the form."))
3930            .args(escape_hatch_args())
3931    }
3932
3933    // forms.forms.responses.list
3934    fn leaf_forms_forms_responses_list() -> Command {
3935        Command::new("forms.forms.responses.list")
3936            .visible_alias("list")
3937            .about("List a form's responses.")
3938            .arg(Arg::new("filter").long("filter").value_name("FILTER")
3939                .help("Which form responses to return. Currently, the only supported filters are: * timestamp > *N* which means to get all form responses submitted after (but not at)"))
3940            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3941                .help("Required. ID of the Form whose responses to list."))
3942            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3943                .help("The maximum number of responses to return. The service may return fewer than this value. If unspecified or zero, at most 5000 responses are returned."))
3944            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3945                .help("A page token returned by a previous list response. If this field is set, the form and the values of the filter must be the same as for the original request."))
3946            .args(escape_hatch_args())
3947    }
3948
3949    // forms.forms.responses
3950    fn group_forms_forms_responses() -> Command {
3951        Command::new("responses")
3952            .about("Methods under forms.forms.responses")
3953            .subcommand_required(true)
3954            .subcommand(leaf_forms_forms_responses_get())
3955            .subcommand(leaf_forms_forms_responses_list())
3956    }
3957
3958    // forms.forms.setPublishSettings
3959    fn leaf_forms_forms_set_publish_settings() -> Command {
3960        Command::new("forms.forms.setPublishSettings")
3961            .visible_alias("setPublishSettings")
3962            .about("Updates the publish settings of a form. Legacy forms aren't supported because they don't have the...")
3963            .long_about("Updates the publish settings of a form. Legacy forms aren't supported because they don't have the `publish_settings` field.")
3964            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3965                .help("Required. The ID of the form. You can get the id from Form.form_id field."))
3966            .args(escape_hatch_args())
3967    }
3968
3969    // forms.forms.watches.create
3970    fn leaf_forms_forms_watches_create() -> Command {
3971        Command::new("forms.forms.watches.create")
3972            .visible_alias("create")
3973            .about("Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the...")
3974            .long_about("Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per Watch.EventType. A watch expires seven days after it is created (see Watch.expire_time).")
3975            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3976                .help("Required. ID of the Form to watch."))
3977            .args(escape_hatch_args())
3978    }
3979
3980    // forms.forms.watches.delete
3981    fn leaf_forms_forms_watches_delete() -> Command {
3982        Command::new("forms.forms.watches.delete")
3983            .visible_alias("delete")
3984            .about("Delete a watch.")
3985            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3986                .help("Required. The ID of the Form."))
3987            .arg(Arg::new("watch-id").long("watch-id").value_name("WATCH_ID").required(true)
3988                .help("Required. The ID of the Watch to delete."))
3989            .args(escape_hatch_args())
3990    }
3991
3992    // forms.forms.watches.list
3993    fn leaf_forms_forms_watches_list() -> Command {
3994        Command::new("forms.forms.watches.list")
3995            .visible_alias("list")
3996            .about("Return a list of the watches owned by the invoking project. The maximum number of watches is two...")
3997            .long_about("Return a list of the watches owned by the invoking project. The maximum number of watches is two: For each invoker, the limit is one for each event type per form.")
3998            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3999                .help("Required. ID of the Form whose watches to list."))
4000            .args(escape_hatch_args())
4001    }
4002
4003    // forms.forms.watches.renew
4004    fn leaf_forms_forms_watches_renew() -> Command {
4005        Command::new("forms.forms.watches.renew")
4006            .visible_alias("renew")
4007            .about("Renew an existing watch for seven days. The state of the watch after renewal is `ACTIVE`, and the...")
4008            .long_about("Renew an existing watch for seven days. The state of the watch after renewal is `ACTIVE`, and the `expire_time` is seven days from the renewal. Renewing a watch in an error state (e.g. `SUSPENDED`) succeeds if the error is no longer present, but fail otherwise. After a watch has expired, RenewWatch")
4009            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
4010                .help("Required. The ID of the Form."))
4011            .arg(Arg::new("watch-id").long("watch-id").value_name("WATCH_ID").required(true)
4012                .help("Required. The ID of the Watch to renew."))
4013            .args(escape_hatch_args())
4014    }
4015
4016    // forms.forms.watches
4017    fn group_forms_forms_watches() -> Command {
4018        Command::new("watches")
4019            .about("Methods under forms.forms.watches")
4020            .subcommand_required(true)
4021            .subcommand(leaf_forms_forms_watches_create())
4022            .subcommand(leaf_forms_forms_watches_delete())
4023            .subcommand(leaf_forms_forms_watches_list())
4024            .subcommand(leaf_forms_forms_watches_renew())
4025    }
4026
4027    // forms.forms
4028    fn group_forms_forms() -> Command {
4029        Command::new("forms")
4030            .about("Methods under forms.forms")
4031            .subcommand_required(true)
4032            .subcommand(leaf_forms_forms_batch_update())
4033            .subcommand(leaf_forms_forms_create())
4034            .subcommand(leaf_forms_forms_get())
4035            .subcommand(group_forms_forms_responses())
4036            .subcommand(leaf_forms_forms_set_publish_settings())
4037            .subcommand(group_forms_forms_watches())
4038    }
4039
4040    // forms
4041    fn service_forms() -> Command {
4042        Command::new("forms")
4043            .about("Google Forms API operations (v1, 10 methods)")
4044            .subcommand_required(true)
4045            .subcommand(group_forms_forms())
4046    }
4047
4048    // gmail.users.drafts.create
4049    fn leaf_gmail_users_drafts_create() -> Command {
4050        Command::new("gmail.users.drafts.create")
4051            .visible_alias("create")
4052            .about("Creates a draft with the `DRAFT` label. For more information, see Create and send draft emails.")
4053            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4054                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4055            .args(escape_hatch_args())
4056    }
4057
4058    // gmail.users.drafts.delete
4059    fn leaf_gmail_users_drafts_delete() -> Command {
4060        Command::new("gmail.users.drafts.delete")
4061            .visible_alias("delete")
4062            .about("Immediately and permanently deletes the specified draft. Does not simply trash it. For more...")
4063            .long_about("Immediately and permanently deletes the specified draft. Does not simply trash it. For more information, see Create and send draft emails.")
4064            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4065                .help("The ID of the draft to delete."))
4066            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4067                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4068            .args(escape_hatch_args())
4069    }
4070
4071    // gmail.users.drafts.get
4072    fn leaf_gmail_users_drafts_get() -> Command {
4073        Command::new("gmail.users.drafts.get")
4074            .visible_alias("get")
4075            .about("Gets the specified draft. For more information, see Create and send draft emails.")
4076            .arg(Arg::new("param-format").long("param-format").value_name("PARAM_FORMAT").value_parser(["minimal", "full", "raw", "metadata"])
4077                .help("Discovery parameter `format`, renamed because --format is reserved here. The format to return the draft in."))
4078            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4079                .help("The ID of the draft to retrieve."))
4080            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4081                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4082            .args(escape_hatch_args())
4083    }
4084
4085    // gmail.users.drafts.list
4086    fn leaf_gmail_users_drafts_list() -> Command {
4087        Command::new("gmail.users.drafts.list")
4088            .visible_alias("list")
4089            .about("Lists the drafts in the user's mailbox. For more information, see Create and send draft emails.")
4090            .arg(Arg::new("include-spam-trash").long("include-spam-trash").action(ArgAction::SetTrue)
4091                .help("Include drafts from `SPAM` and `TRASH` in the results."))
4092            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
4093                .help("Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500."))
4094            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4095                .help("Page token to retrieve a specific page of results in the list."))
4096            .arg(Arg::new("q").long("q").value_name("Q")
4097                .help("Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822"))
4098            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4099                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4100            .args(escape_hatch_args())
4101    }
4102
4103    // gmail.users.drafts.send
4104    fn leaf_gmail_users_drafts_send() -> Command {
4105        Command::new("gmail.users.drafts.send")
4106            .visible_alias("send")
4107            .about("Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers. For...")
4108            .long_about("Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see Create and send draft emails.")
4109            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4110                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4111            .args(escape_hatch_args())
4112    }
4113
4114    // gmail.users.drafts.update
4115    fn leaf_gmail_users_drafts_update() -> Command {
4116        Command::new("gmail.users.drafts.update")
4117            .visible_alias("update")
4118            .about("Replaces a draft's content. For more information, see Create and send draft emails.")
4119            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4120                .help("The ID of the draft to update."))
4121            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4122                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4123            .args(escape_hatch_args())
4124    }
4125
4126    // gmail.users.drafts
4127    fn group_gmail_users_drafts() -> Command {
4128        Command::new("drafts")
4129            .about("Methods under gmail.users.drafts")
4130            .subcommand_required(true)
4131            .subcommand(leaf_gmail_users_drafts_create())
4132            .subcommand(leaf_gmail_users_drafts_delete())
4133            .subcommand(leaf_gmail_users_drafts_get())
4134            .subcommand(leaf_gmail_users_drafts_list())
4135            .subcommand(leaf_gmail_users_drafts_send())
4136            .subcommand(leaf_gmail_users_drafts_update())
4137    }
4138
4139    // gmail.users.getProfile
4140    fn leaf_gmail_users_get_profile() -> Command {
4141        Command::new("gmail.users.getProfile")
4142            .visible_alias("getProfile")
4143            .about("Gets the current user's Gmail profile.")
4144            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4145                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4146            .args(escape_hatch_args())
4147    }
4148
4149    // gmail.users.history.list
4150    fn leaf_gmail_users_history_list() -> Command {
4151        Command::new("gmail.users.history.list")
4152            .visible_alias("list")
4153            .about("Lists the history of all changes to the given mailbox. History results are returned in...")
4154            .long_about("Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing `historyId`). For more information, see Synchronize clients with Gmail.")
4155            .arg(Arg::new("history-types").long("history-types").value_name("HISTORY_TYPES").action(ArgAction::Append)
4156                .help("History types to be returned by the function"))
4157            .arg(Arg::new("label-id").long("label-id").value_name("LABEL_ID")
4158                .help("Only return messages with a label matching the ID."))
4159            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
4160                .help("Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500."))
4161            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4162                .help("Page token to retrieve a specific page of results in the list."))
4163            .arg(Arg::new("start-history-id").long("start-history-id").value_name("START_HISTORY_ID")
4164                .help("Required. Returns history records after the specified `startHistoryId`. The supplied `startHistoryId` should be obtained from the `historyId` of a message, thre"))
4165            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4166                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4167            .args(escape_hatch_args())
4168    }
4169
4170    // gmail.users.history
4171    fn group_gmail_users_history() -> Command {
4172        Command::new("history")
4173            .about("Methods under gmail.users.history")
4174            .subcommand_required(true)
4175            .subcommand(leaf_gmail_users_history_list())
4176    }
4177
4178    // gmail.users.labels.create
4179    fn leaf_gmail_users_labels_create() -> Command {
4180        Command::new("gmail.users.labels.create")
4181            .visible_alias("create")
4182            .about("Creates a label. For more information, see Manage labels.")
4183            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4184                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4185            .args(escape_hatch_args())
4186    }
4187
4188    // gmail.users.labels.delete
4189    fn leaf_gmail_users_labels_delete() -> Command {
4190        Command::new("gmail.users.labels.delete")
4191            .visible_alias("delete")
4192            .about("Immediately and permanently deletes the specified label and removes it from any messages and...")
4193            .long_about("Immediately and permanently deletes the specified label and removes it from any messages and threads that it's applied to. For more information, see Manage labels.")
4194            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4195                .help("The ID of the label to delete."))
4196            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4197                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4198            .args(escape_hatch_args())
4199    }
4200
4201    // gmail.users.labels.get
4202    fn leaf_gmail_users_labels_get() -> Command {
4203        Command::new("gmail.users.labels.get")
4204            .visible_alias("get")
4205            .about("Gets the specified label. For more information, see Manage labels.")
4206            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4207                .help("The ID of the label to retrieve."))
4208            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4209                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4210            .args(escape_hatch_args())
4211    }
4212
4213    // gmail.users.labels.list
4214    fn leaf_gmail_users_labels_list() -> Command {
4215        Command::new("gmail.users.labels.list")
4216            .visible_alias("list")
4217            .about("Lists all labels in the user's mailbox. For more information, see Manage labels.")
4218            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4219                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4220            .args(escape_hatch_args())
4221    }
4222
4223    // gmail.users.labels.patch
4224    fn leaf_gmail_users_labels_patch() -> Command {
4225        Command::new("gmail.users.labels.patch")
4226            .visible_alias("patch")
4227            .about("Patch the specified label. For more information, see Manage labels.")
4228            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4229                .help("The ID of the label to update."))
4230            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4231                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4232            .args(escape_hatch_args())
4233    }
4234
4235    // gmail.users.labels.update
4236    fn leaf_gmail_users_labels_update() -> Command {
4237        Command::new("gmail.users.labels.update")
4238            .visible_alias("update")
4239            .about("Updates the specified label. For more information, see Manage labels.")
4240            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4241                .help("The ID of the label to update."))
4242            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4243                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4244            .args(escape_hatch_args())
4245    }
4246
4247    // gmail.users.labels
4248    fn group_gmail_users_labels() -> Command {
4249        Command::new("labels")
4250            .about("Methods under gmail.users.labels")
4251            .subcommand_required(true)
4252            .subcommand(leaf_gmail_users_labels_create())
4253            .subcommand(leaf_gmail_users_labels_delete())
4254            .subcommand(leaf_gmail_users_labels_get())
4255            .subcommand(leaf_gmail_users_labels_list())
4256            .subcommand(leaf_gmail_users_labels_patch())
4257            .subcommand(leaf_gmail_users_labels_update())
4258    }
4259
4260    // gmail.users.messages.attachments.get
4261    fn leaf_gmail_users_messages_attachments_get() -> Command {
4262        Command::new("gmail.users.messages.attachments.get")
4263            .visible_alias("get")
4264            .about("Gets the specified message attachment.")
4265            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4266                .help("The ID of the attachment."))
4267            .arg(Arg::new("message-id").long("message-id").value_name("MESSAGE_ID").required(true)
4268                .help("The ID of the message containing the attachment."))
4269            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4270                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4271            .args(escape_hatch_args())
4272    }
4273
4274    // gmail.users.messages.attachments
4275    fn group_gmail_users_messages_attachments() -> Command {
4276        Command::new("attachments")
4277            .about("Methods under gmail.users.messages.attachments")
4278            .subcommand_required(true)
4279            .subcommand(leaf_gmail_users_messages_attachments_get())
4280    }
4281
4282    // gmail.users.messages.batchDelete
4283    fn leaf_gmail_users_messages_batch_delete() -> Command {
4284        Command::new("gmail.users.messages.batchDelete")
4285            .visible_alias("batchDelete")
4286            .about("Deletes many messages by message ID. Provides no guarantees that messages were not already deleted...")
4287            .long_about("Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.")
4288            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4289                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4290            .args(escape_hatch_args())
4291    }
4292
4293    // gmail.users.messages.batchModify
4294    fn leaf_gmail_users_messages_batch_modify() -> Command {
4295        Command::new("gmail.users.messages.batchModify")
4296            .visible_alias("batchModify")
4297            .about("Modifies the labels and the Classification Label values on the specified messages. For...")
4298            .long_about("Modifies the labels and the Classification Label values on the specified messages. For administrators modifying messages for users in their organization, requests require authorization with a service account that has [domain-wi")
4299            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4300                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4301            .args(escape_hatch_args())
4302    }
4303
4304    // gmail.users.messages.delete
4305    fn leaf_gmail_users_messages_delete() -> Command {
4306        Command::new("gmail.users.messages.delete")
4307            .visible_alias("delete")
4308            .about("Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer...")
4309            .long_about("Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.")
4310            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4311                .help("The ID of the message to delete."))
4312            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4313                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4314            .args(escape_hatch_args())
4315    }
4316
4317    // gmail.users.messages.get
4318    fn leaf_gmail_users_messages_get() -> Command {
4319        Command::new("gmail.users.messages.get")
4320            .visible_alias("get")
4321            .about("Gets the specified message.")
4322            .arg(Arg::new("param-format").long("param-format").value_name("PARAM_FORMAT").value_parser(["minimal", "full", "raw", "metadata"])
4323                .help("Discovery parameter `format`, renamed because --format is reserved here. The format to return the message in."))
4324            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4325                .help("The ID of the message to retrieve. This ID is usually retrieved using `messages.list`. The ID is also contained in the result when a message is inserted (`messa"))
4326            .arg(Arg::new("metadata-headers").long("metadata-headers").value_name("METADATA_HEADERS").action(ArgAction::Append)
4327                .help("When given and format is `METADATA`, only include headers specified."))
4328            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4329                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4330            .args(escape_hatch_args())
4331    }
4332
4333    // gmail.users.messages.import
4334    fn leaf_gmail_users_messages_import() -> Command {
4335        Command::new("gmail.users.messages.import")
4336            .visible_alias("import")
4337            .about("Imports a message into only this user's mailbox, with standard email delivery scanning and...")
4338            .long_about("Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. This method doesn't perform SPF checks, so it might not work for some spam messages, such as those attempting to perform domain spoofing. This method does not send")
4339            .arg(Arg::new("deleted").long("deleted").action(ArgAction::SetTrue)
4340                .help("Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts."))
4341            .arg(Arg::new("internal-date-source").long("internal-date-source").value_name("INTERNAL_DATE_SOURCE").value_parser(["receivedTime", "dateHeader"])
4342                .help("Source for Gmail's internal date of the message."))
4343            .arg(Arg::new("never-mark-spam").long("never-mark-spam").action(ArgAction::SetTrue)
4344                .help("Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox."))
4345            .arg(Arg::new("process-for-calendar").long("process-for-calendar").action(ArgAction::SetTrue)
4346                .help("Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user."))
4347            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4348                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4349            .args(escape_hatch_args())
4350    }
4351
4352    // gmail.users.messages.insert
4353    fn leaf_gmail_users_messages_insert() -> Command {
4354        Command::new("gmail.users.messages.insert")
4355            .visible_alias("insert")
4356            .about("Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most...")
4357            .long_about("Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most scanning and classification. Does not send a message. For more information, see Create and send email messages.")
4358            .arg(Arg::new("deleted").long("deleted").action(ArgAction::SetTrue)
4359                .help("Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts."))
4360            .arg(Arg::new("internal-date-source").long("internal-date-source").value_name("INTERNAL_DATE_SOURCE").value_parser(["receivedTime", "dateHeader"])
4361                .help("Source for Gmail's internal date of the message."))
4362            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4363                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4364            .args(escape_hatch_args())
4365    }
4366
4367    // gmail.users.messages.list
4368    fn leaf_gmail_users_messages_list() -> Command {
4369        Command::new("gmail.users.messages.list")
4370            .visible_alias("list")
4371            .about("Lists the messages in the user's mailbox. For more information, see List Gmail messages.")
4372            .arg(Arg::new("include-spam-trash").long("include-spam-trash").action(ArgAction::SetTrue)
4373                .help("Include messages from `SPAM` and `TRASH` in the results."))
4374            .arg(Arg::new("label-ids").long("label-ids").value_name("LABEL_IDS").action(ArgAction::Append)
4375                .help("Only return messages with labels that match all of the specified label IDs. Messages in a thread might have labels that other messages in the same thread don't"))
4376            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
4377                .help("Maximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500."))
4378            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4379                .help("Page token to retrieve a specific page of results in the list."))
4380            .arg(Arg::new("q").long("q").value_name("Q")
4381                .help("Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid:"))
4382            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4383                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4384            .args(escape_hatch_args())
4385    }
4386
4387    // gmail.users.messages.modify
4388    fn leaf_gmail_users_messages_modify() -> Command {
4389        Command::new("gmail.users.messages.modify")
4390            .visible_alias("modify")
4391            .about("Modifies the labels and the Classification Label values on the specified message. For...")
4392            .long_about("Modifies the labels and the Classification Label values on the specified message. For administrators modifying message for users in their organization, requests require authorization with a service account that has [domain-wide")
4393            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4394                .help("The ID of the message to modify."))
4395            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4396                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4397            .args(escape_hatch_args())
4398    }
4399
4400    // gmail.users.messages.send
4401    fn leaf_gmail_users_messages_send() -> Command {
4402        Command::new("gmail.users.messages.send")
4403            .visible_alias("send")
4404            .about("Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers. For more...")
4405            .long_about("Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see Create and send email messages.")
4406            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4407                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4408            .args(escape_hatch_args())
4409    }
4410
4411    // gmail.users.messages.trash
4412    fn leaf_gmail_users_messages_trash() -> Command {
4413        Command::new("gmail.users.messages.trash")
4414            .visible_alias("trash")
4415            .about("Moves the specified message to the trash.")
4416            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4417                .help("The ID of the message to Trash."))
4418            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4419                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4420            .args(escape_hatch_args())
4421    }
4422
4423    // gmail.users.messages.untrash
4424    fn leaf_gmail_users_messages_untrash() -> Command {
4425        Command::new("gmail.users.messages.untrash")
4426            .visible_alias("untrash")
4427            .about("Removes the specified message from the trash.")
4428            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4429                .help("The ID of the message to remove from Trash."))
4430            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4431                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4432            .args(escape_hatch_args())
4433    }
4434
4435    // gmail.users.messages
4436    fn group_gmail_users_messages() -> Command {
4437        Command::new("messages")
4438            .about("Methods under gmail.users.messages")
4439            .subcommand_required(true)
4440            .subcommand(group_gmail_users_messages_attachments())
4441            .subcommand(leaf_gmail_users_messages_batch_delete())
4442            .subcommand(leaf_gmail_users_messages_batch_modify())
4443            .subcommand(leaf_gmail_users_messages_delete())
4444            .subcommand(leaf_gmail_users_messages_get())
4445            .subcommand(leaf_gmail_users_messages_import())
4446            .subcommand(leaf_gmail_users_messages_insert())
4447            .subcommand(leaf_gmail_users_messages_list())
4448            .subcommand(leaf_gmail_users_messages_modify())
4449            .subcommand(leaf_gmail_users_messages_send())
4450            .subcommand(leaf_gmail_users_messages_trash())
4451            .subcommand(leaf_gmail_users_messages_untrash())
4452    }
4453
4454    // gmail.users.settings.cse.identities.create
4455    fn leaf_gmail_users_settings_cse_identities_create() -> Command {
4456        Command::new("gmail.users.settings.cse.identities.create")
4457            .visible_alias("create")
4458            .about("Creates and configures a client-side encryption identity that's authorized to send mail from the...")
4459            .long_about("Creates and configures a client-side encryption identity that's authorized to send mail from the user account. Google publishes the S/MIME certificate to a shared domain-wide directory so that people within a Google Workspace organization can encrypt and send mail to the identity. For administrators")
4460            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4461                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4462            .args(escape_hatch_args())
4463    }
4464
4465    // gmail.users.settings.cse.identities.delete
4466    fn leaf_gmail_users_settings_cse_identities_delete() -> Command {
4467        Command::new("gmail.users.settings.cse.identities.delete")
4468            .visible_alias("delete")
4469            .about("Deletes a client-side encryption identity. The authenticated user can no longer use the identity to...")
4470            .long_about("Deletes a client-side encryption identity. The authenticated user can no longer use the identity to send encrypted messages. You cannot restore the identity after you delete it. Instead, use the CreateCseIdentity method to create another identity with the same configuration. For administrators manag")
4471            .arg(Arg::new("cse-email-address").long("cse-email-address").value_name("CSE_EMAIL_ADDRESS").required(true)
4472                .help("The primary email address associated with the client-side encryption identity configuration that's removed."))
4473            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4474                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4475            .args(escape_hatch_args())
4476    }
4477
4478    // gmail.users.settings.cse.identities.get
4479    fn leaf_gmail_users_settings_cse_identities_get() -> Command {
4480        Command::new("gmail.users.settings.cse.identities.get")
4481            .visible_alias("get")
4482            .about("Retrieves a client-side encryption identity configuration. For administrators managing identities...")
4483            .long_about("Retrieves a client-side encryption identity configuration. For administrators managing identities and keypairs for users in their organization, requests require authorization with a service account that has [domain-wide delegat")
4484            .arg(Arg::new("cse-email-address").long("cse-email-address").value_name("CSE_EMAIL_ADDRESS").required(true)
4485                .help("The primary email address associated with the client-side encryption identity configuration that's retrieved."))
4486            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4487                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4488            .args(escape_hatch_args())
4489    }
4490
4491    // gmail.users.settings.cse.identities.list
4492    fn leaf_gmail_users_settings_cse_identities_list() -> Command {
4493        Command::new("gmail.users.settings.cse.identities.list")
4494            .visible_alias("list")
4495            .about("Lists the client-side encrypted identities for an authenticated user. For administrators managing...")
4496            .long_about("Lists the client-side encrypted identities for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a service account that has [domain-w")
4497            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
4498                .help("The number of identities to return. If not provided, the page size will default to 20 entries."))
4499            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4500                .help("Pagination token indicating which page of identities to return. If the token is not supplied, then the API will return the first page of results."))
4501            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4502                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4503            .args(escape_hatch_args())
4504    }
4505
4506    // gmail.users.settings.cse.identities.patch
4507    fn leaf_gmail_users_settings_cse_identities_patch() -> Command {
4508        Command::new("gmail.users.settings.cse.identities.patch")
4509            .visible_alias("patch")
4510            .about("Associates a different key pair with an existing client-side encryption identity. The updated key...")
4511            .long_about("Associates a different key pair with an existing client-side encryption identity. The updated key pair must validate against Google's S/MIME certificate profiles. For administrators managing identities and keypairs for users in their organization, reque")
4512            .arg(Arg::new("email-address").long("email-address").value_name("EMAIL_ADDRESS").required(true)
4513                .help("The email address of the client-side encryption identity to update."))
4514            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4515                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4516            .args(escape_hatch_args())
4517    }
4518
4519    // gmail.users.settings.cse.identities
4520    fn group_gmail_users_settings_cse_identities() -> Command {
4521        Command::new("identities")
4522            .about("Methods under gmail.users.settings.cse.identities")
4523            .subcommand_required(true)
4524            .subcommand(leaf_gmail_users_settings_cse_identities_create())
4525            .subcommand(leaf_gmail_users_settings_cse_identities_delete())
4526            .subcommand(leaf_gmail_users_settings_cse_identities_get())
4527            .subcommand(leaf_gmail_users_settings_cse_identities_list())
4528            .subcommand(leaf_gmail_users_settings_cse_identities_patch())
4529    }
4530
4531    // gmail.users.settings.cse.keypairs.create
4532    fn leaf_gmail_users_settings_cse_keypairs_create() -> Command {
4533        Command::new("gmail.users.settings.cse.keypairs.create")
4534            .visible_alias("create")
4535            .about("Creates and uploads a client-side encryption S/MIME public key certificate chain and private key...")
4536            .long_about("Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google")
4537            .arg(Arg::new("chain-validation").long("chain-validation").value_name("CHAIN_VALIDATION").value_parser(["all", "none"])
4538                .help("The type of certificate chain validation to perform at creation. The request will be rejected if the uploaded chain fails to satisfy the requested validation ch"))
4539            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4540                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4541            .args(escape_hatch_args())
4542    }
4543
4544    // gmail.users.settings.cse.keypairs.disable
4545    fn leaf_gmail_users_settings_cse_keypairs_disable() -> Command {
4546        Command::new("gmail.users.settings.cse.keypairs.disable")
4547            .visible_alias("disable")
4548            .about("Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair...")
4549            .long_about("Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair to decrypt incoming CSE message texts or sign outgoing CSE mail. To regain access, use the EnableCseKeyPair to turn on the key pair. After 30 days, you can permanently delete the key pair by using the")
4550            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4551                .help("The identifier of the key pair to turn off."))
4552            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4553                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4554            .args(escape_hatch_args())
4555    }
4556
4557    // gmail.users.settings.cse.keypairs.enable
4558    fn leaf_gmail_users_settings_cse_keypairs_enable() -> Command {
4559        Command::new("gmail.users.settings.cse.keypairs.enable")
4560            .visible_alias("enable")
4561            .about("Turns on a client-side encryption key pair that was turned off. The key pair becomes active again...")
4562            .long_about("Turns on a client-side encryption key pair that was turned off. The key pair becomes active again for any associated client-side encryption identities. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https:/")
4563            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4564                .help("The identifier of the key pair to turn on."))
4565            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4566                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4567            .args(escape_hatch_args())
4568    }
4569
4570    // gmail.users.settings.cse.keypairs.get
4571    fn leaf_gmail_users_settings_cse_keypairs_get() -> Command {
4572        Command::new("gmail.users.settings.cse.keypairs.get")
4573            .visible_alias("get")
4574            .about("Retrieves an existing client-side encryption key pair. For administrators managing identities and...")
4575            .long_about("Retrieves an existing client-side encryption key pair. For administrators managing identities and keypairs for users in their organization, requests require authorization with a service account that has [domain-wide delegation")
4576            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4577                .help("The identifier of the key pair to retrieve."))
4578            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4579                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4580            .args(escape_hatch_args())
4581    }
4582
4583    // gmail.users.settings.cse.keypairs.list
4584    fn leaf_gmail_users_settings_cse_keypairs_list() -> Command {
4585        Command::new("gmail.users.settings.cse.keypairs.list")
4586            .visible_alias("list")
4587            .about("Lists client-side encryption key pairs for an authenticated user. For administrators managing...")
4588            .long_about("Lists client-side encryption key pairs for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a service account that has [domain-wide")
4589            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
4590                .help("The number of key pairs to return. If not provided, the page size will default to 20 entries."))
4591            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4592                .help("Pagination token indicating which page of key pairs to return. If the token is not supplied, then the API will return the first page of results."))
4593            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4594                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4595            .args(escape_hatch_args())
4596    }
4597
4598    // gmail.users.settings.cse.keypairs.obliterate
4599    fn leaf_gmail_users_settings_cse_keypairs_obliterate() -> Command {
4600        Command::new("gmail.users.settings.cse.keypairs.obliterate")
4601            .visible_alias("obliterate")
4602            .about("Deletes a client-side encryption key pair permanently and immediately. You can only permanently...")
4603            .long_about("Deletes a client-side encryption key pair permanently and immediately. You can only permanently delete key pairs that have been turned off for more than 30 days. To turn off a key pair, use the DisableCseKeyPair method. Gmail can't restore or decrypt any messages that were encrypted by an obliterate")
4604            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4605                .help("The identifier of the key pair to obliterate."))
4606            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4607                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4608            .args(escape_hatch_args())
4609    }
4610
4611    // gmail.users.settings.cse.keypairs
4612    fn group_gmail_users_settings_cse_keypairs() -> Command {
4613        Command::new("keypairs")
4614            .about("Methods under gmail.users.settings.cse.keypairs")
4615            .subcommand_required(true)
4616            .subcommand(leaf_gmail_users_settings_cse_keypairs_create())
4617            .subcommand(leaf_gmail_users_settings_cse_keypairs_disable())
4618            .subcommand(leaf_gmail_users_settings_cse_keypairs_enable())
4619            .subcommand(leaf_gmail_users_settings_cse_keypairs_get())
4620            .subcommand(leaf_gmail_users_settings_cse_keypairs_list())
4621            .subcommand(leaf_gmail_users_settings_cse_keypairs_obliterate())
4622    }
4623
4624    // gmail.users.settings.cse
4625    fn group_gmail_users_settings_cse() -> Command {
4626        Command::new("cse")
4627            .about("Methods under gmail.users.settings.cse")
4628            .subcommand_required(true)
4629            .subcommand(group_gmail_users_settings_cse_identities())
4630            .subcommand(group_gmail_users_settings_cse_keypairs())
4631    }
4632
4633    // gmail.users.settings.delegates.create
4634    fn leaf_gmail_users_settings_delegates_create() -> Command {
4635        Command::new("gmail.users.settings.delegates.create")
4636            .visible_alias("create")
4637            .about("Adds a delegate with its verification status set directly to `accepted`, without sending any...")
4638            .long_about("Adds a delegate with its verification status set directly to `accepted`, without sending any verification email. The delegate user must be a member of the same Google Workspace organization as the delegator user. For more information, see [Manage delegates](https://developers.google.com/workspace/gm")
4639            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4640                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4641            .args(escape_hatch_args())
4642    }
4643
4644    // gmail.users.settings.delegates.delete
4645    fn leaf_gmail_users_settings_delegates_delete() -> Command {
4646        Command::new("gmail.users.settings.delegates.delete")
4647            .visible_alias("delete")
4648            .about("Removes the specified delegate (which can be of any verification status), and revokes any...")
4649            .long_about("Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it. For more information, see Manage delegates. A delegate user must be referred")
4650            .arg(Arg::new("delegate-email").long("delegate-email").value_name("DELEGATE_EMAIL").required(true)
4651                .help("The email address of the user to be removed as a delegate."))
4652            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4653                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4654            .args(escape_hatch_args())
4655    }
4656
4657    // gmail.users.settings.delegates.get
4658    fn leaf_gmail_users_settings_delegates_get() -> Command {
4659        Command::new("gmail.users.settings.delegates.get")
4660            .visible_alias("get")
4661            .about("Gets the specified delegate. For more information, see Manage delegates. A delegate user must be...")
4662            .long_about("Gets the specified delegate. For more information, see Manage delegates. A delegate user must be referred to by their primary email address, and not an email alias. This method is only available to service account clients")
4663            .arg(Arg::new("delegate-email").long("delegate-email").value_name("DELEGATE_EMAIL").required(true)
4664                .help("The email address of the user whose delegate relationship is to be retrieved."))
4665            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4666                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4667            .args(escape_hatch_args())
4668    }
4669
4670    // gmail.users.settings.delegates.list
4671    fn leaf_gmail_users_settings_delegates_list() -> Command {
4672        Command::new("gmail.users.settings.delegates.list")
4673            .visible_alias("list")
4674            .about("Lists the delegates for the specified account. For more information, see Manage delegates. This...")
4675            .long_about("Lists the delegates for the specified account. For more information, see Manage delegates. This method is only available to service account clients that have been delegated domain-wide authority.")
4676            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4677                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4678            .args(escape_hatch_args())
4679    }
4680
4681    // gmail.users.settings.delegates
4682    fn group_gmail_users_settings_delegates() -> Command {
4683        Command::new("delegates")
4684            .about("Methods under gmail.users.settings.delegates")
4685            .subcommand_required(true)
4686            .subcommand(leaf_gmail_users_settings_delegates_create())
4687            .subcommand(leaf_gmail_users_settings_delegates_delete())
4688            .subcommand(leaf_gmail_users_settings_delegates_get())
4689            .subcommand(leaf_gmail_users_settings_delegates_list())
4690    }
4691
4692    // gmail.users.settings.filters.create
4693    fn leaf_gmail_users_settings_filters_create() -> Command {
4694        Command::new("gmail.users.settings.filters.create")
4695            .visible_alias("create")
4696            .about("Creates a filter. Note: you can only create a maximum of 1,000 filters. For more information, see...")
4697            .long_about("Creates a filter. Note: you can only create a maximum of 1,000 filters. For more information, see Manage Gmail filters.")
4698            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4699                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4700            .args(escape_hatch_args())
4701    }
4702
4703    // gmail.users.settings.filters.delete
4704    fn leaf_gmail_users_settings_filters_delete() -> Command {
4705        Command::new("gmail.users.settings.filters.delete")
4706            .visible_alias("delete")
4707            .about("Immediately and permanently deletes the specified filter. For more information, see Manage Gmail...")
4708            .long_about("Immediately and permanently deletes the specified filter. For more information, see Manage Gmail filters.")
4709            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4710                .help("The ID of the filter to be deleted."))
4711            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4712                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4713            .args(escape_hatch_args())
4714    }
4715
4716    // gmail.users.settings.filters.get
4717    fn leaf_gmail_users_settings_filters_get() -> Command {
4718        Command::new("gmail.users.settings.filters.get")
4719            .visible_alias("get")
4720            .about("Gets a filter. For more information, see Manage Gmail filters.")
4721            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4722                .help("The ID of the filter to be fetched."))
4723            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4724                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4725            .args(escape_hatch_args())
4726    }
4727
4728    // gmail.users.settings.filters.list
4729    fn leaf_gmail_users_settings_filters_list() -> Command {
4730        Command::new("gmail.users.settings.filters.list")
4731            .visible_alias("list")
4732            .about("Lists the message filters of a Gmail user. For more information, see Manage Gmail filters.")
4733            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4734                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4735            .args(escape_hatch_args())
4736    }
4737
4738    // gmail.users.settings.filters
4739    fn group_gmail_users_settings_filters() -> Command {
4740        Command::new("filters")
4741            .about("Methods under gmail.users.settings.filters")
4742            .subcommand_required(true)
4743            .subcommand(leaf_gmail_users_settings_filters_create())
4744            .subcommand(leaf_gmail_users_settings_filters_delete())
4745            .subcommand(leaf_gmail_users_settings_filters_get())
4746            .subcommand(leaf_gmail_users_settings_filters_list())
4747    }
4748
4749    // gmail.users.settings.forwardingAddresses.create
4750    fn leaf_gmail_users_settings_forwarding_addresses_create() -> Command {
4751        Command::new("gmail.users.settings.forwardingAddresses.create")
4752            .visible_alias("create")
4753            .about("Creates a forwarding address. If ownership verification is required, a message will be sent to the...")
4754            .long_about("Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to `pending`; otherwise, the resource will be created with verification status set to `accepted`. For more information, see [Manage email fo")
4755            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4756                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4757            .args(escape_hatch_args())
4758    }
4759
4760    // gmail.users.settings.forwardingAddresses.delete
4761    fn leaf_gmail_users_settings_forwarding_addresses_delete() -> Command {
4762        Command::new("gmail.users.settings.forwardingAddresses.delete")
4763            .visible_alias("delete")
4764            .about("Deletes the specified forwarding address and revokes any verification that may have been required...")
4765            .long_about("Deletes the specified forwarding address and revokes any verification that may have been required. For more information, see Manage email forwarding. This method is only available to service account clients that have bee")
4766            .arg(Arg::new("forwarding-email").long("forwarding-email").value_name("FORWARDING_EMAIL").required(true)
4767                .help("The forwarding address to be deleted."))
4768            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4769                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4770            .args(escape_hatch_args())
4771    }
4772
4773    // gmail.users.settings.forwardingAddresses.get
4774    fn leaf_gmail_users_settings_forwarding_addresses_get() -> Command {
4775        Command::new("gmail.users.settings.forwardingAddresses.get")
4776            .visible_alias("get")
4777            .about("Gets the specified forwarding address. For more information, see Manage email forwarding.")
4778            .arg(Arg::new("forwarding-email").long("forwarding-email").value_name("FORWARDING_EMAIL").required(true)
4779                .help("The forwarding address to be retrieved."))
4780            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4781                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4782            .args(escape_hatch_args())
4783    }
4784
4785    // gmail.users.settings.forwardingAddresses.list
4786    fn leaf_gmail_users_settings_forwarding_addresses_list() -> Command {
4787        Command::new("gmail.users.settings.forwardingAddresses.list")
4788            .visible_alias("list")
4789            .about("Lists the forwarding addresses for the specified account. For more information, see Manage email...")
4790            .long_about("Lists the forwarding addresses for the specified account. For more information, see Manage email forwarding.")
4791            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4792                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4793            .args(escape_hatch_args())
4794    }
4795
4796    // gmail.users.settings.forwardingAddresses
4797    fn group_gmail_users_settings_forwarding_addresses() -> Command {
4798        Command::new("forwardingAddresses")
4799            .about("Methods under gmail.users.settings.forwardingAddresses")
4800            .subcommand_required(true)
4801            .subcommand(leaf_gmail_users_settings_forwarding_addresses_create())
4802            .subcommand(leaf_gmail_users_settings_forwarding_addresses_delete())
4803            .subcommand(leaf_gmail_users_settings_forwarding_addresses_get())
4804            .subcommand(leaf_gmail_users_settings_forwarding_addresses_list())
4805    }
4806
4807    // gmail.users.settings.getAutoForwarding
4808    fn leaf_gmail_users_settings_get_auto_forwarding() -> Command {
4809        Command::new("gmail.users.settings.getAutoForwarding")
4810            .visible_alias("getAutoForwarding")
4811            .about("Gets the auto-forwarding setting for the specified account. For more information, see Manage email...")
4812            .long_about("Gets the auto-forwarding setting for the specified account. For more information, see Manage email forwarding.")
4813            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4814                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4815            .args(escape_hatch_args())
4816    }
4817
4818    // gmail.users.settings.getImap
4819    fn leaf_gmail_users_settings_get_imap() -> Command {
4820        Command::new("gmail.users.settings.getImap")
4821            .visible_alias("getImap")
4822            .about("Gets IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
4823            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4824                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4825            .args(escape_hatch_args())
4826    }
4827
4828    // gmail.users.settings.getLanguage
4829    fn leaf_gmail_users_settings_get_language() -> Command {
4830        Command::new("gmail.users.settings.getLanguage")
4831            .visible_alias("getLanguage")
4832            .about("Gets language settings. For more information, see Manage language settings.")
4833            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4834                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4835            .args(escape_hatch_args())
4836    }
4837
4838    // gmail.users.settings.getPop
4839    fn leaf_gmail_users_settings_get_pop() -> Command {
4840        Command::new("gmail.users.settings.getPop")
4841            .visible_alias("getPop")
4842            .about("Gets POP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
4843            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4844                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4845            .args(escape_hatch_args())
4846    }
4847
4848    // gmail.users.settings.getVacation
4849    fn leaf_gmail_users_settings_get_vacation() -> Command {
4850        Command::new("gmail.users.settings.getVacation")
4851            .visible_alias("getVacation")
4852            .about("Gets vacation responder settings. For more information, see Manage vacation settings with the Gmail...")
4853            .long_about("Gets vacation responder settings. For more information, see Manage vacation settings with the Gmail API.")
4854            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4855                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4856            .args(escape_hatch_args())
4857    }
4858
4859    // gmail.users.settings.sendAs.create
4860    fn leaf_gmail_users_settings_send_as_create() -> Command {
4861        Command::new("gmail.users.settings.sendAs.create")
4862            .visible_alias("create")
4863            .about("Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect...")
4864            .long_about("Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verificat")
4865            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4866                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4867            .args(escape_hatch_args())
4868    }
4869
4870    // gmail.users.settings.sendAs.delete
4871    fn leaf_gmail_users_settings_send_as_delete() -> Command {
4872        Command::new("gmail.users.settings.sendAs.delete")
4873            .visible_alias("delete")
4874            .about("Deletes the specified send-as alias. Revokes any verification that may have been required for using...")
4875            .long_about("Deletes the specified send-as alias. Revokes any verification that may have been required for using it. For more information, see Manage aliases and signatures with the Gmail API. This method is only available t")
4876            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4877                .help("The send-as alias to be deleted."))
4878            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4879                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4880            .args(escape_hatch_args())
4881    }
4882
4883    // gmail.users.settings.sendAs.get
4884    fn leaf_gmail_users_settings_send_as_get() -> Command {
4885        Command::new("gmail.users.settings.sendAs.get")
4886            .visible_alias("get")
4887            .about("Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a...")
4888            .long_about("Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection. For more information, see Manage aliases and signatures with the Gmail API.")
4889            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4890                .help("The send-as alias to be retrieved."))
4891            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4892                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4893            .args(escape_hatch_args())
4894    }
4895
4896    // gmail.users.settings.sendAs.list
4897    fn leaf_gmail_users_settings_send_as_list() -> Command {
4898        Command::new("gmail.users.settings.sendAs.list")
4899            .visible_alias("list")
4900            .about("Lists the send-as aliases for the specified account. The result includes the primary send-as...")
4901            .long_about("Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom \"from\" aliases. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides")
4902            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4903                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4904            .args(escape_hatch_args())
4905    }
4906
4907    // gmail.users.settings.sendAs.patch
4908    fn leaf_gmail_users_settings_send_as_patch() -> Command {
4909        Command::new("gmail.users.settings.sendAs.patch")
4910            .visible_alias("patch")
4911            .about("Patch the specified send-as alias. For more information, see Manage aliases and signatures with the...")
4912            .long_about("Patch the specified send-as alias. For more information, see Manage aliases and signatures with the Gmail API.")
4913            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4914                .help("The send-as alias to be updated."))
4915            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4916                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4917            .args(escape_hatch_args())
4918    }
4919
4920    // gmail.users.settings.sendAs.smimeInfo.delete
4921    fn leaf_gmail_users_settings_send_as_smime_info_delete() -> Command {
4922        Command::new("gmail.users.settings.sendAs.smimeInfo.delete")
4923            .visible_alias("delete")
4924            .about("Deletes the specified S/MIME config for the specified send-as alias. For more information, see...")
4925            .long_about("Deletes the specified S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.")
4926            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4927                .help("The immutable ID for the SmimeInfo."))
4928            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4929                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4930            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4931                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4932            .args(escape_hatch_args())
4933    }
4934
4935    // gmail.users.settings.sendAs.smimeInfo.get
4936    fn leaf_gmail_users_settings_send_as_smime_info_get() -> Command {
4937        Command::new("gmail.users.settings.sendAs.smimeInfo.get")
4938            .visible_alias("get")
4939            .about("Gets the specified S/MIME config for the specified send-as alias. For more information, see Manage...")
4940            .long_about("Gets the specified S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.")
4941            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4942                .help("The immutable ID for the SmimeInfo."))
4943            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4944                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4945            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4946                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4947            .args(escape_hatch_args())
4948    }
4949
4950    // gmail.users.settings.sendAs.smimeInfo.insert
4951    fn leaf_gmail_users_settings_send_as_smime_info_insert() -> Command {
4952        Command::new("gmail.users.settings.sendAs.smimeInfo.insert")
4953            .visible_alias("insert")
4954            .about("Insert (upload) the given S/MIME config for the specified send-as alias. Note that `pkcs12` format...")
4955            .long_about("Insert (upload) the given S/MIME config for the specified send-as alias. Note that `pkcs12` format is required for the key. For more information, see Manage S/MIME certificates with the Gmail API.")
4956            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4957                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4958            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4959                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4960            .args(escape_hatch_args())
4961    }
4962
4963    // gmail.users.settings.sendAs.smimeInfo.list
4964    fn leaf_gmail_users_settings_send_as_smime_info_list() -> Command {
4965        Command::new("gmail.users.settings.sendAs.smimeInfo.list")
4966            .visible_alias("list")
4967            .about("Lists S/MIME configs for the specified send-as alias. For more information, see Manage S/MIME...")
4968            .long_about("Lists S/MIME configs for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.")
4969            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4970                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4971            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4972                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4973            .args(escape_hatch_args())
4974    }
4975
4976    // gmail.users.settings.sendAs.smimeInfo.setDefault
4977    fn leaf_gmail_users_settings_send_as_smime_info_set_default() -> Command {
4978        Command::new("gmail.users.settings.sendAs.smimeInfo.setDefault")
4979            .visible_alias("setDefault")
4980            .about("Sets the default S/MIME config for the specified send-as alias. For more information, see Manage...")
4981            .long_about("Sets the default S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.")
4982            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4983                .help("The immutable ID for the SmimeInfo."))
4984            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4985                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4986            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4987                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4988            .args(escape_hatch_args())
4989    }
4990
4991    // gmail.users.settings.sendAs.smimeInfo
4992    fn group_gmail_users_settings_send_as_smime_info() -> Command {
4993        Command::new("smimeInfo")
4994            .about("Methods under gmail.users.settings.sendAs.smimeInfo")
4995            .subcommand_required(true)
4996            .subcommand(leaf_gmail_users_settings_send_as_smime_info_delete())
4997            .subcommand(leaf_gmail_users_settings_send_as_smime_info_get())
4998            .subcommand(leaf_gmail_users_settings_send_as_smime_info_insert())
4999            .subcommand(leaf_gmail_users_settings_send_as_smime_info_list())
5000            .subcommand(leaf_gmail_users_settings_send_as_smime_info_set_default())
5001    }
5002
5003    // gmail.users.settings.sendAs.update
5004    fn leaf_gmail_users_settings_send_as_update() -> Command {
5005        Command::new("gmail.users.settings.sendAs.update")
5006            .visible_alias("update")
5007            .about("Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it...")
5008            .long_about("Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. For more information, see Manage aliases and signatures with the Gmail API. Addresses other than")
5009            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
5010                .help("The send-as alias to be updated."))
5011            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5012                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5013            .args(escape_hatch_args())
5014    }
5015
5016    // gmail.users.settings.sendAs.verify
5017    fn leaf_gmail_users_settings_send_as_verify() -> Command {
5018        Command::new("gmail.users.settings.sendAs.verify")
5019            .visible_alias("verify")
5020            .about("Sends a verification email to the specified send-as alias address. The verification status must be...")
5021            .long_about("Sends a verification email to the specified send-as alias address. The verification status must be `pending`. For more information, see Manage aliases and signatures with the Gmail API. This method is only avail")
5022            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
5023                .help("The send-as alias to be verified."))
5024            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5025                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5026            .args(escape_hatch_args())
5027    }
5028
5029    // gmail.users.settings.sendAs
5030    fn group_gmail_users_settings_send_as() -> Command {
5031        Command::new("sendAs")
5032            .about("Methods under gmail.users.settings.sendAs")
5033            .subcommand_required(true)
5034            .subcommand(leaf_gmail_users_settings_send_as_create())
5035            .subcommand(leaf_gmail_users_settings_send_as_delete())
5036            .subcommand(leaf_gmail_users_settings_send_as_get())
5037            .subcommand(leaf_gmail_users_settings_send_as_list())
5038            .subcommand(leaf_gmail_users_settings_send_as_patch())
5039            .subcommand(group_gmail_users_settings_send_as_smime_info())
5040            .subcommand(leaf_gmail_users_settings_send_as_update())
5041            .subcommand(leaf_gmail_users_settings_send_as_verify())
5042    }
5043
5044    // gmail.users.settings.updateAutoForwarding
5045    fn leaf_gmail_users_settings_update_auto_forwarding() -> Command {
5046        Command::new("gmail.users.settings.updateAutoForwarding")
5047            .visible_alias("updateAutoForwarding")
5048            .about("Updates the auto-forwarding setting for the specified account. A verified forwarding address must...")
5049            .long_about("Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. For more information, see Manage email forwarding. This method is only avail")
5050            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5051                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5052            .args(escape_hatch_args())
5053    }
5054
5055    // gmail.users.settings.updateImap
5056    fn leaf_gmail_users_settings_update_imap() -> Command {
5057        Command::new("gmail.users.settings.updateImap")
5058            .visible_alias("updateImap")
5059            .about("Updates IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
5060            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5061                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5062            .args(escape_hatch_args())
5063    }
5064
5065    // gmail.users.settings.updateLanguage
5066    fn leaf_gmail_users_settings_update_language() -> Command {
5067        Command::new("gmail.users.settings.updateLanguage")
5068            .visible_alias("updateLanguage")
5069            .about("Updates language settings. For more information, see Manage language settings. If successful, the...")
5070            .long_about("Updates language settings. For more information, see Manage language settings. If successful, the return object contains the `displayLanguage` that was saved for the user, which may differ from the value passed into the re")
5071            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5072                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5073            .args(escape_hatch_args())
5074    }
5075
5076    // gmail.users.settings.updatePop
5077    fn leaf_gmail_users_settings_update_pop() -> Command {
5078        Command::new("gmail.users.settings.updatePop")
5079            .visible_alias("updatePop")
5080            .about("Updates POP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
5081            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5082                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5083            .args(escape_hatch_args())
5084    }
5085
5086    // gmail.users.settings.updateVacation
5087    fn leaf_gmail_users_settings_update_vacation() -> Command {
5088        Command::new("gmail.users.settings.updateVacation")
5089            .visible_alias("updateVacation")
5090            .about("Updates vacation responder settings. For more information, see Manage vacation settings with the...")
5091            .long_about("Updates vacation responder settings. For more information, see Manage vacation settings with the Gmail API.")
5092            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5093                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5094            .args(escape_hatch_args())
5095    }
5096
5097    // gmail.users.settings
5098    fn group_gmail_users_settings() -> Command {
5099        Command::new("settings")
5100            .about("Methods under gmail.users.settings")
5101            .subcommand_required(true)
5102            .subcommand(group_gmail_users_settings_cse())
5103            .subcommand(group_gmail_users_settings_delegates())
5104            .subcommand(group_gmail_users_settings_filters())
5105            .subcommand(group_gmail_users_settings_forwarding_addresses())
5106            .subcommand(leaf_gmail_users_settings_get_auto_forwarding())
5107            .subcommand(leaf_gmail_users_settings_get_imap())
5108            .subcommand(leaf_gmail_users_settings_get_language())
5109            .subcommand(leaf_gmail_users_settings_get_pop())
5110            .subcommand(leaf_gmail_users_settings_get_vacation())
5111            .subcommand(group_gmail_users_settings_send_as())
5112            .subcommand(leaf_gmail_users_settings_update_auto_forwarding())
5113            .subcommand(leaf_gmail_users_settings_update_imap())
5114            .subcommand(leaf_gmail_users_settings_update_language())
5115            .subcommand(leaf_gmail_users_settings_update_pop())
5116            .subcommand(leaf_gmail_users_settings_update_vacation())
5117    }
5118
5119    // gmail.users.stop
5120    fn leaf_gmail_users_stop() -> Command {
5121        Command::new("gmail.users.stop")
5122            .visible_alias("stop")
5123            .about("Turn off push notification delivery for the given user mailbox. For more information, see Configure...")
5124            .long_about("Turn off push notification delivery for the given user mailbox. For more information, see Configure push notifications in Gmail API.")
5125            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5126                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5127            .args(escape_hatch_args())
5128    }
5129
5130    // gmail.users.threads.delete
5131    fn leaf_gmail_users_threads_delete() -> Command {
5132        Command::new("gmail.users.threads.delete")
5133            .visible_alias("delete")
5134            .about("Immediately and permanently deletes the specified thread. Any messages that belong to the thread...")
5135            .long_about("Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone. Prefer `threads.trash` instead. For more information, see Manage threads.")
5136            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5137                .help("ID of the Thread to delete."))
5138            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5139                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5140            .args(escape_hatch_args())
5141    }
5142
5143    // gmail.users.threads.get
5144    fn leaf_gmail_users_threads_get() -> Command {
5145        Command::new("gmail.users.threads.get")
5146            .visible_alias("get")
5147            .about("Gets the specified thread. For more information, see Manage threads.")
5148            .arg(Arg::new("param-format").long("param-format").value_name("PARAM_FORMAT").value_parser(["full", "metadata", "minimal"])
5149                .help("Discovery parameter `format`, renamed because --format is reserved here. The format to return the messages in."))
5150            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5151                .help("The ID of the thread to retrieve."))
5152            .arg(Arg::new("metadata-headers").long("metadata-headers").value_name("METADATA_HEADERS").action(ArgAction::Append)
5153                .help("When given and format is METADATA, only include headers specified."))
5154            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5155                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5156            .args(escape_hatch_args())
5157    }
5158
5159    // gmail.users.threads.list
5160    fn leaf_gmail_users_threads_list() -> Command {
5161        Command::new("gmail.users.threads.list")
5162            .visible_alias("list")
5163            .about("Lists the threads in the user's mailbox. For more information, see Manage threads.")
5164            .arg(Arg::new("include-spam-trash").long("include-spam-trash").action(ArgAction::SetTrue)
5165                .help("Include threads from `SPAM` and `TRASH` in the results."))
5166            .arg(Arg::new("label-ids").long("label-ids").value_name("LABEL_IDS").action(ArgAction::Append)
5167                .help("Only return threads with labels that match all of the specified label IDs."))
5168            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
5169                .help("Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500."))
5170            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5171                .help("Page token to retrieve a specific page of results in the list."))
5172            .arg(Arg::new("q").long("q").value_name("Q")
5173                .help("Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid:"))
5174            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5175                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5176            .args(escape_hatch_args())
5177    }
5178
5179    // gmail.users.threads.modify
5180    fn leaf_gmail_users_threads_modify() -> Command {
5181        Command::new("gmail.users.threads.modify")
5182            .visible_alias("modify")
5183            .about("Modifies the labels applied to the thread. This applies to all messages in the thread. For more...")
5184            .long_about("Modifies the labels applied to the thread. This applies to all messages in the thread. For more information, see Manage threads.")
5185            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5186                .help("The ID of the thread to modify."))
5187            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5188                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5189            .args(escape_hatch_args())
5190    }
5191
5192    // gmail.users.threads.trash
5193    fn leaf_gmail_users_threads_trash() -> Command {
5194        Command::new("gmail.users.threads.trash")
5195            .visible_alias("trash")
5196            .about("Moves the specified thread to the trash. Any messages that belong to the thread are also moved to...")
5197            .long_about("Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash. For more information, see Manage threads.")
5198            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5199                .help("The ID of the thread to Trash."))
5200            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5201                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5202            .args(escape_hatch_args())
5203    }
5204
5205    // gmail.users.threads.untrash
5206    fn leaf_gmail_users_threads_untrash() -> Command {
5207        Command::new("gmail.users.threads.untrash")
5208            .visible_alias("untrash")
5209            .about("Removes the specified thread from the trash. Any messages that belong to the thread are also...")
5210            .long_about("Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash. For more information, see Manage threads.")
5211            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5212                .help("The ID of the thread to remove from Trash."))
5213            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5214                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5215            .args(escape_hatch_args())
5216    }
5217
5218    // gmail.users.threads
5219    fn group_gmail_users_threads() -> Command {
5220        Command::new("threads")
5221            .about("Methods under gmail.users.threads")
5222            .subcommand_required(true)
5223            .subcommand(leaf_gmail_users_threads_delete())
5224            .subcommand(leaf_gmail_users_threads_get())
5225            .subcommand(leaf_gmail_users_threads_list())
5226            .subcommand(leaf_gmail_users_threads_modify())
5227            .subcommand(leaf_gmail_users_threads_trash())
5228            .subcommand(leaf_gmail_users_threads_untrash())
5229    }
5230
5231    // gmail.users.watch
5232    fn leaf_gmail_users_watch() -> Command {
5233        Command::new("gmail.users.watch")
5234            .visible_alias("watch")
5235            .about("Set up or update a push notification watch on the given user mailbox. For more information, see...")
5236            .long_about("Set up or update a push notification watch on the given user mailbox. For more information, see Configure push notifications in Gmail API.")
5237            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5238                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5239            .args(escape_hatch_args())
5240    }
5241
5242    // gmail.users
5243    fn group_gmail_users() -> Command {
5244        Command::new("users")
5245            .about("Methods under gmail.users")
5246            .subcommand_required(true)
5247            .subcommand(group_gmail_users_drafts())
5248            .subcommand(leaf_gmail_users_get_profile())
5249            .subcommand(group_gmail_users_history())
5250            .subcommand(group_gmail_users_labels())
5251            .subcommand(group_gmail_users_messages())
5252            .subcommand(group_gmail_users_settings())
5253            .subcommand(leaf_gmail_users_stop())
5254            .subcommand(group_gmail_users_threads())
5255            .subcommand(leaf_gmail_users_watch())
5256    }
5257
5258    // gmail
5259    fn service_gmail() -> Command {
5260        Command::new("gmail")
5261            .about("Gmail API operations (v1, 79 methods)")
5262            .subcommand_required(true)
5263            .subcommand(group_gmail_users())
5264    }
5265
5266    // people.contactGroups.batchGet
5267    fn leaf_people_contact_groups_batch_get() -> Command {
5268        Command::new("people.contactGroups.batchGet")
5269            .visible_alias("batchGet")
5270            .about("Get a list of contact groups owned by the authenticated user by specifying a list of contact group...")
5271            .long_about("Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.")
5272            .arg(Arg::new("group-fields").long("group-fields").value_name("GROUP_FIELDS")
5273                .help("Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to e"))
5274            .arg(Arg::new("max-members").long("max-members").value_name("MAX_MEMBERS").value_parser(clap::value_parser!(i64))
5275                .help("Optional. Specifies the maximum number of members to return for each group. Defaults to 0 if not set, which will return zero members."))
5276            .arg(Arg::new("resource-names").long("resource-names").value_name("RESOURCE_NAMES").action(ArgAction::Append)
5277                .help("Required. The resource names of the contact groups to get. There is a maximum of 200 resource names."))
5278            .args(escape_hatch_args())
5279    }
5280
5281    // people.contactGroups.create
5282    fn leaf_people_contact_groups_create() -> Command {
5283        Command::new("people.contactGroups.create")
5284            .visible_alias("create")
5285            .about("Create a new contact group owned by the authenticated user. Created contact group names must be...")
5286            .long_about("Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latenc")
5287            .args(escape_hatch_args())
5288    }
5289
5290    // people.contactGroups.delete
5291    fn leaf_people_contact_groups_delete() -> Command {
5292        Command::new("people.contactGroups.delete")
5293            .visible_alias("delete")
5294            .about("Delete an existing contact group owned by the authenticated user by specifying a contact group...")
5295            .long_about("Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5296            .arg(Arg::new("delete-contacts").long("delete-contacts").action(ArgAction::SetTrue)
5297                .help("Optional. Set to true to also delete the contacts in the specified group."))
5298            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5299                .help("Required. The resource name of the contact group to delete."))
5300            .args(escape_hatch_args())
5301    }
5302
5303    // people.contactGroups.get
5304    fn leaf_people_contact_groups_get() -> Command {
5305        Command::new("people.contactGroups.get")
5306            .visible_alias("get")
5307            .about("Get a specific contact group owned by the authenticated user by specifying a contact group resource...")
5308            .long_about("Get a specific contact group owned by the authenticated user by specifying a contact group resource name.")
5309            .arg(Arg::new("group-fields").long("group-fields").value_name("GROUP_FIELDS")
5310                .help("Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to e"))
5311            .arg(Arg::new("max-members").long("max-members").value_name("MAX_MEMBERS").value_parser(clap::value_parser!(i64))
5312                .help("Optional. Specifies the maximum number of members to return. Defaults to 0 if not set, which will return zero members."))
5313            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5314                .help("Required. The resource name of the contact group to get."))
5315            .args(escape_hatch_args())
5316    }
5317
5318    // people.contactGroups.list
5319    fn leaf_people_contact_groups_list() -> Command {
5320        Command::new("people.contactGroups.list")
5321            .visible_alias("list")
5322            .about("List all contact groups owned by the authenticated user. Members of the contact groups are not...")
5323            .long_about("List all contact groups owned by the authenticated user. Members of the contact groups are not populated.")
5324            .arg(Arg::new("group-fields").long("group-fields").value_name("GROUP_FIELDS")
5325                .help("Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to e"))
5326            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5327                .help("Optional. The maximum number of resources to return. Valid values are between 1 and 1000, inclusive. Defaults to 30 if not set or set to 0."))
5328            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5329                .help("Optional. The next_page_token value returned from a previous call to ListContactGroups. Requests the next page of reso"))
5330            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5331                .help("Optional. A sync token, returned by a previous call to `contactgroups.list`. Only resources changed since the sync token was created will be returned."))
5332            .args(escape_hatch_args())
5333    }
5334
5335    // people.contactGroups.members.modify
5336    fn leaf_people_contact_groups_members_modify() -> Command {
5337        Command::new("people.contactGroups.members.modify")
5338            .visible_alias("modify")
5339            .about("Modify the members of a contact group owned by the authenticated user. The only system contact...")
5340            .long_about("Modify the members of a contact group owned by the authenticated user. The only system contact groups that can have members added are `contactGroups/myContacts` and `contactGroups/starred`. Other system contact groups are deprecated and can only have contacts removed.")
5341            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5342                .help("Required. The resource name of the contact group to modify."))
5343            .args(escape_hatch_args())
5344    }
5345
5346    // people.contactGroups.members
5347    fn group_people_contact_groups_members() -> Command {
5348        Command::new("members")
5349            .about("Methods under people.contactGroups.members")
5350            .subcommand_required(true)
5351            .subcommand(leaf_people_contact_groups_members_modify())
5352    }
5353
5354    // people.contactGroups.update
5355    fn leaf_people_contact_groups_update() -> Command {
5356        Command::new("people.contactGroups.update")
5357            .visible_alias("update")
5358            .about("Update the name of an existing contact group owned by the authenticated user. Updated contact group...")
5359            .long_about("Update the name of an existing contact group owned by the authenticated user. Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoi")
5360            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5361                .help("The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contact_group_id}`."))
5362            .args(escape_hatch_args())
5363    }
5364
5365    // people.contactGroups
5366    fn group_people_contact_groups() -> Command {
5367        Command::new("contactGroups")
5368            .about("Methods under people.contactGroups")
5369            .subcommand_required(true)
5370            .subcommand(leaf_people_contact_groups_batch_get())
5371            .subcommand(leaf_people_contact_groups_create())
5372            .subcommand(leaf_people_contact_groups_delete())
5373            .subcommand(leaf_people_contact_groups_get())
5374            .subcommand(leaf_people_contact_groups_list())
5375            .subcommand(group_people_contact_groups_members())
5376            .subcommand(leaf_people_contact_groups_update())
5377    }
5378
5379    // people.otherContacts.copyOtherContactToMyContactsGroup
5380    fn leaf_people_other_contacts_copy_other_contact_to_my_contacts_group() -> Command {
5381        Command::new("people.otherContacts.copyOtherContactToMyContactsGroup")
5382            .visible_alias("copyOtherContactToMyContactsGroup")
5383            .about("Copies an \"Other contact\" to a new contact in the user's \"myContacts\" group Mutate requests for the...")
5384            .long_about("Copies an \"Other contact\" to a new contact in the user's \"myContacts\" group Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5385            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5386                .help("Required. The resource name of the \"Other contact\" to copy."))
5387            .args(escape_hatch_args())
5388    }
5389
5390    // people.otherContacts.list
5391    fn leaf_people_other_contacts_list() -> Command {
5392        Command::new("people.otherContacts.list")
5393            .visible_alias("list")
5394            .about("List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are...")
5395            .long_about("List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an [google.rpc.ErrorInfo](https://cloud.goog")
5396            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5397                .help("Optional. The number of \"Other contacts\" to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0."))
5398            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5399                .help("Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters"))
5400            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5401                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. What values are va"))
5402            .arg(Arg::new("request-sync-token").long("request-sync-token").action(ArgAction::SetTrue)
5403                .help("Optional. Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by"))
5404            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5405                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set. Possible values for this field are: * READ_SOURCE_TYPE_CONTACT"))
5406            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5407                .help("Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syn"))
5408            .args(escape_hatch_args())
5409    }
5410
5411    // people.otherContacts.search
5412    fn leaf_people_other_contacts_search() -> Command {
5413        Command::new("people.otherContacts.search")
5414            .visible_alias("search")
5415            .about("Provides a list of contacts in the authenticated user's other contacts that matches the search...")
5416            .long_about("Provides a list of contacts in the authenticated user's other contacts that matches the search query. The query matches on a contact's `names`, `emailAddresses`, and `phoneNumbers` fields that are from the OTHER_CONTACT source. **IMPORTANT**: Before searching, clients should send a warmup request wi")
5417            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5418                .help("Optional. The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30."))
5419            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
5420                .help("Discovery parameter `query`, renamed because --query is reserved here. Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name \"foo name\""))
5421            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5422                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are:"))
5423            .args(escape_hatch_args())
5424    }
5425
5426    // people.otherContacts
5427    fn group_people_other_contacts() -> Command {
5428        Command::new("otherContacts")
5429            .about("Methods under people.otherContacts")
5430            .subcommand_required(true)
5431            .subcommand(leaf_people_other_contacts_copy_other_contact_to_my_contacts_group())
5432            .subcommand(leaf_people_other_contacts_list())
5433            .subcommand(leaf_people_other_contacts_search())
5434    }
5435
5436    // people.people.batchCreateContacts
5437    fn leaf_people_people_batch_create_contacts() -> Command {
5438        Command::new("people.people.batchCreateContacts")
5439            .visible_alias("batchCreateContacts")
5440            .about("Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the...")
5441            .long_about("Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5442            .args(escape_hatch_args())
5443    }
5444
5445    // people.people.batchDeleteContacts
5446    fn leaf_people_people_batch_delete_contacts() -> Command {
5447        Command::new("people.people.batchDeleteContacts")
5448            .visible_alias("batchDeleteContacts")
5449            .about("Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same...")
5450            .long_about("Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5451            .args(escape_hatch_args())
5452    }
5453
5454    // people.people.batchUpdateContacts
5455    fn leaf_people_people_batch_update_contacts() -> Command {
5456        Command::new("people.people.batchUpdateContacts")
5457            .visible_alias("batchUpdateContacts")
5458            .about("Update a batch of contacts and return a map of resource names to PersonResponses for the updated...")
5459            .long_about("Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5460            .args(escape_hatch_args())
5461    }
5462
5463    // people.people.connections.list
5464    fn leaf_people_people_connections_list() -> Command {
5465        Command::new("people.people.connections.list")
5466            .visible_alias("list")
5467            .about("Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full...")
5468            .long_about("Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an")
5469            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5470                .help("Optional. The number of connections to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0."))
5471            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5472                .help("Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters"))
5473            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5474                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are:"))
5475            .arg(Arg::new("request-mask-include-field").long("request-mask-include-field").value_name("REQUEST_MASK_INCLUDE_FIELD")
5476                .help("Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.ph"))
5477            .arg(Arg::new("request-sync-token").long("request-sync-token").action(ArgAction::SetTrue)
5478                .help("Optional. Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by"))
5479            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5480                .help("Required. The resource name to return connections for. Only `people/me` is valid."))
5481            .arg(Arg::new("sort-order").long("sort-order").value_name("SORT_ORDER").value_parser(["LAST_MODIFIED_ASCENDING", "LAST_MODIFIED_DESCENDING", "FIRST_NAME_ASCENDING", "LAST_NAME_ASCENDING"])
5482                .help("Optional. The order in which the connections should be sorted. Defaults to `LAST_MODIFIED_ASCENDING`."))
5483            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5484                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5485            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5486                .help("Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syn"))
5487            .args(escape_hatch_args())
5488    }
5489
5490    // people.people.connections
5491    fn group_people_people_connections() -> Command {
5492        Command::new("connections")
5493            .about("Methods under people.people.connections")
5494            .subcommand_required(true)
5495            .subcommand(leaf_people_people_connections_list())
5496    }
5497
5498    // people.people.createContact
5499    fn leaf_people_people_create_contact() -> Command {
5500        Command::new("people.people.createContact")
5501            .visible_alias("createContact")
5502            .about("Create a new contact and return the person resource for that contact. The request returns a 400...")
5503            .long_about("Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names Mutate requests for the same user should be sent sequentially to a")
5504            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5505                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fi"))
5506            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5507                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5508            .args(escape_hatch_args())
5509    }
5510
5511    // people.people.deleteContact
5512    fn leaf_people_people_delete_contact() -> Command {
5513        Command::new("people.people.deleteContact")
5514            .visible_alias("deleteContact")
5515            .about("Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same...")
5516            .long_about("Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5517            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5518                .help("Required. The resource name of the contact to delete."))
5519            .args(escape_hatch_args())
5520    }
5521
5522    // people.people.deleteContactPhoto
5523    fn leaf_people_people_delete_contact_photo() -> Command {
5524        Command::new("people.people.deleteContactPhoto")
5525            .visible_alias("deleteContactPhoto")
5526            .about("Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid //...")
5527            .long_about("Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.")
5528            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5529                .help("Optional. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Defaults to empty i"))
5530            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5531                .help("Required. The resource name of the contact whose photo will be deleted."))
5532            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5533                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5534            .args(escape_hatch_args())
5535    }
5536
5537    // people.people.get
5538    fn leaf_people_people_get() -> Command {
5539        Command::new("people.people.get")
5540            .visible_alias("get")
5541            .about("Provides information about a person by specifying a resource name. Use `people/me` to indicate the...")
5542            .long_about("Provides information about a person by specifying a resource name. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.")
5543            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5544                .help("Required. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Valid values are: *"))
5545            .arg(Arg::new("request-mask-include-field").long("request-mask-include-field").value_name("REQUEST_MASK_INCLUDE_FIELD")
5546                .help("Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.ph"))
5547            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5548                .help("Required. The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get informa"))
5549            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5550                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_PROFILE and READ_SOURCE_TYPE_CONTACT if not set."))
5551            .args(escape_hatch_args())
5552    }
5553
5554    // people.people.getBatchGet
5555    fn leaf_people_people_get_batch_get() -> Command {
5556        Command::new("people.people.getBatchGet")
5557            .visible_alias("getBatchGet")
5558            .about("Provides information about a list of specific people by specifying a list of requested resource...")
5559            .long_about("Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.")
5560            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5561                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are:"))
5562            .arg(Arg::new("request-mask-include-field").long("request-mask-include-field").value_name("REQUEST_MASK_INCLUDE_FIELD")
5563                .help("Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.ph"))
5564            .arg(Arg::new("resource-names").long("resource-names").value_name("RESOURCE_NAMES").action(ArgAction::Append)
5565                .help("Required. The resource names of the people to provide information about. It's repeatable. The URL query parameter should be resourceNames=<name1>&resourceNames="))
5566            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5567                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5568            .args(escape_hatch_args())
5569    }
5570
5571    // people.people.listDirectoryPeople
5572    fn leaf_people_people_list_directory_people() -> Command {
5573        Command::new("people.people.listDirectoryPeople")
5574            .visible_alias("listDirectoryPeople")
5575            .about("Provides a list of domain profiles and domain contacts in the authenticated user's domain...")
5576            .long_about("Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, a")
5577            .arg(Arg::new("merge-sources").long("merge-sources").value_name("MERGE_SOURCES").action(ArgAction::Append)
5578                .help("Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers."))
5579            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5580                .help("Optional. The number of people to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0."))
5581            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5582                .help("Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters"))
5583            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5584                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are:"))
5585            .arg(Arg::new("request-sync-token").long("request-sync-token").action(ArgAction::SetTrue)
5586                .help("Optional. Whether the response should return `next_sync_token`. It can be used to get incremental changes since the last request by setting it on the request `s"))
5587            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5588                .help("Required. Directory sources to return."))
5589            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5590                .help("Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syn"))
5591            .args(escape_hatch_args())
5592    }
5593
5594    // people.people.searchContacts
5595    fn leaf_people_people_search_contacts() -> Command {
5596        Command::new("people.people.searchContacts")
5597            .visible_alias("searchContacts")
5598            .about("Provides a list of contacts in the authenticated user's grouped contacts that matches the search...")
5599            .long_about("Provides a list of contacts in the authenticated user's grouped contacts that matches the search query. The query matches on a contact's `names`, `nickNames`, `emailAddresses`, `phoneNumbers`, and `organizations` fields that are from the CONTACT source. **IMPORTANT**: Before searching, clients shoul")
5600            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5601                .help("Optional. The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30."))
5602            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
5603                .help("Discovery parameter `query`, renamed because --query is reserved here. Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name \"foo name\""))
5604            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5605                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are:"))
5606            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5607                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set."))
5608            .args(escape_hatch_args())
5609    }
5610
5611    // people.people.searchDirectoryPeople
5612    fn leaf_people_people_search_directory_people() -> Command {
5613        Command::new("people.people.searchDirectoryPeople")
5614            .visible_alias("searchDirectoryPeople")
5615            .about("Provides a list of domain profiles and domain contacts in the authenticated user's domain directory...")
5616            .long_about("Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.")
5617            .arg(Arg::new("merge-sources").long("merge-sources").value_name("MERGE_SOURCES").action(ArgAction::Append)
5618                .help("Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers."))
5619            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5620                .help("Optional. The number of people to include in the response. Valid values are between 1 and 500, inclusive. Defaults to 100 if not set or set to 0."))
5621            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5622                .help("Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters"))
5623            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
5624                .help("Discovery parameter `query`, renamed because --query is reserved here. Required. Prefix query that matches fields in the person. Does NOT use the read_mask for determining what fields to match."))
5625            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5626                .help("Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are:"))
5627            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5628                .help("Required. Directory sources to return."))
5629            .args(escape_hatch_args())
5630    }
5631
5632    // people.people.updateContact
5633    fn leaf_people_people_update_contact() -> Command {
5634        Command::new("people.people.updateContact")
5635            .visible_alias("updateContact")
5636            .about("Update contact data for an existing contact person. Any non-contact data will not be modified. Any...")
5637            .long_about("Update contact data for an existing contact person. Any non-contact data will not be modified. Any non-contact data in the person to update will be ignored. All fields specified in the `update_mask` will be replaced. The server returns a 400 error if `person.metadata.sources` is not specified for th")
5638            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5639                .help("Optional. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fi"))
5640            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5641                .help("The resource name for the person, assigned by the server. An ASCII string in the form of `people/{person_id}`."))
5642            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5643                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5644            .arg(Arg::new("update-person-fields").long("update-person-fields").value_name("UPDATE_PERSON_FIELDS")
5645                .help("Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All updated fields w"))
5646            .args(escape_hatch_args())
5647    }
5648
5649    // people.people.updateContactPhoto
5650    fn leaf_people_people_update_contact_photo() -> Command {
5651        Command::new("people.people.updateContactPhoto")
5652            .visible_alias("updateContactPhoto")
5653            .about("Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid...")
5654            .long_about("Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5655            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5656                .help("Required. Person resource name"))
5657            .args(escape_hatch_args())
5658    }
5659
5660    // people.people
5661    fn group_people_people() -> Command {
5662        Command::new("people")
5663            .about("Methods under people.people")
5664            .subcommand_required(true)
5665            .subcommand(leaf_people_people_batch_create_contacts())
5666            .subcommand(leaf_people_people_batch_delete_contacts())
5667            .subcommand(leaf_people_people_batch_update_contacts())
5668            .subcommand(group_people_people_connections())
5669            .subcommand(leaf_people_people_create_contact())
5670            .subcommand(leaf_people_people_delete_contact())
5671            .subcommand(leaf_people_people_delete_contact_photo())
5672            .subcommand(leaf_people_people_get())
5673            .subcommand(leaf_people_people_get_batch_get())
5674            .subcommand(leaf_people_people_list_directory_people())
5675            .subcommand(leaf_people_people_search_contacts())
5676            .subcommand(leaf_people_people_search_directory_people())
5677            .subcommand(leaf_people_people_update_contact())
5678            .subcommand(leaf_people_people_update_contact_photo())
5679    }
5680
5681    // people
5682    fn service_people() -> Command {
5683        Command::new("people")
5684            .about("People API operations (v1, 24 methods)")
5685            .subcommand_required(true)
5686            .subcommand(group_people_contact_groups())
5687            .subcommand(group_people_other_contacts())
5688            .subcommand(group_people_people())
5689    }
5690
5691    // script.processes.list
5692    fn leaf_script_processes_list() -> Command {
5693        Command::new("script.processes.list")
5694            .visible_alias("list")
5695            .about("List information about processes made by or on behalf of a user, such as process type and current...")
5696            .long_about("List information about processes made by or on behalf of a user, such as process type and current status.")
5697            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5698                .help("The maximum number of returned processes per page of results. Defaults to 50."))
5699            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5700                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response."))
5701            .arg(Arg::new("user-process-filter-deployment-id").long("user-process-filter-deployment-id").value_name("USER_PROCESS_FILTER_DEPLOYMENT_ID")
5702                .help("Optional field used to limit returned processes to those originating from projects with a specific deployment ID."))
5703            .arg(Arg::new("user-process-filter-end-time").long("user-process-filter-end-time").value_name("USER_PROCESS_FILTER_END_TIME")
5704                .help("Optional field used to limit returned processes to those that completed on or before the given timestamp."))
5705            .arg(Arg::new("user-process-filter-function-name").long("user-process-filter-function-name").value_name("USER_PROCESS_FILTER_FUNCTION_NAME")
5706                .help("Optional field used to limit returned processes to those originating from a script function with the given function name."))
5707            .arg(Arg::new("user-process-filter-project-name").long("user-process-filter-project-name").value_name("USER_PROCESS_FILTER_PROJECT_NAME")
5708                .help("Optional field used to limit returned processes to those originating from projects with project names containing a specific string."))
5709            .arg(Arg::new("user-process-filter-script-id").long("user-process-filter-script-id").value_name("USER_PROCESS_FILTER_SCRIPT_ID")
5710                .help("Optional field used to limit returned processes to those originating from projects with a specific script ID."))
5711            .arg(Arg::new("user-process-filter-start-time").long("user-process-filter-start-time").value_name("USER_PROCESS_FILTER_START_TIME")
5712                .help("Optional field used to limit returned processes to those that were started on or after the given timestamp."))
5713            .arg(Arg::new("user-process-filter-statuses").long("user-process-filter-statuses").value_name("USER_PROCESS_FILTER_STATUSES").action(ArgAction::Append)
5714                .help("Optional field used to limit returned processes to those having one of the specified process statuses."))
5715            .arg(Arg::new("user-process-filter-types").long("user-process-filter-types").value_name("USER_PROCESS_FILTER_TYPES").action(ArgAction::Append)
5716                .help("Optional field used to limit returned processes to those having one of the specified process types."))
5717            .arg(Arg::new("user-process-filter-user-access-levels").long("user-process-filter-user-access-levels").value_name("USER_PROCESS_FILTER_USER_ACCESS_LEVELS").action(ArgAction::Append)
5718                .help("Optional field used to limit returned processes to those having one of the specified user access levels."))
5719            .args(escape_hatch_args())
5720    }
5721
5722    // script.processes.listScriptProcesses
5723    fn leaf_script_processes_list_script_processes() -> Command {
5724        Command::new("script.processes.listScriptProcesses")
5725            .visible_alias("listScriptProcesses")
5726            .about("List information about a script's executed processes, such as process type and current status.")
5727            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5728                .help("The maximum number of returned processes per page of results. Defaults to 50."))
5729            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5730                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response."))
5731            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID")
5732                .help("The script ID of the project whose processes are listed."))
5733            .arg(Arg::new("script-process-filter-deployment-id").long("script-process-filter-deployment-id").value_name("SCRIPT_PROCESS_FILTER_DEPLOYMENT_ID")
5734                .help("Optional field used to limit returned processes to those originating from projects with a specific deployment ID."))
5735            .arg(Arg::new("script-process-filter-end-time").long("script-process-filter-end-time").value_name("SCRIPT_PROCESS_FILTER_END_TIME")
5736                .help("Optional field used to limit returned processes to those that completed on or before the given timestamp."))
5737            .arg(Arg::new("script-process-filter-function-name").long("script-process-filter-function-name").value_name("SCRIPT_PROCESS_FILTER_FUNCTION_NAME")
5738                .help("Optional field used to limit returned processes to those originating from a script function with the given function name."))
5739            .arg(Arg::new("script-process-filter-start-time").long("script-process-filter-start-time").value_name("SCRIPT_PROCESS_FILTER_START_TIME")
5740                .help("Optional field used to limit returned processes to those that were started on or after the given timestamp."))
5741            .arg(Arg::new("script-process-filter-statuses").long("script-process-filter-statuses").value_name("SCRIPT_PROCESS_FILTER_STATUSES").action(ArgAction::Append)
5742                .help("Optional field used to limit returned processes to those having one of the specified process statuses."))
5743            .arg(Arg::new("script-process-filter-types").long("script-process-filter-types").value_name("SCRIPT_PROCESS_FILTER_TYPES").action(ArgAction::Append)
5744                .help("Optional field used to limit returned processes to those having one of the specified process types."))
5745            .arg(Arg::new("script-process-filter-user-access-levels").long("script-process-filter-user-access-levels").value_name("SCRIPT_PROCESS_FILTER_USER_ACCESS_LEVELS").action(ArgAction::Append)
5746                .help("Optional field used to limit returned processes to those having one of the specified user access levels."))
5747            .args(escape_hatch_args())
5748    }
5749
5750    // script.processes
5751    fn group_script_processes() -> Command {
5752        Command::new("processes")
5753            .about("Methods under script.processes")
5754            .subcommand_required(true)
5755            .subcommand(leaf_script_processes_list())
5756            .subcommand(leaf_script_processes_list_script_processes())
5757    }
5758
5759    // script.projects.create
5760    fn leaf_script_projects_create() -> Command {
5761        Command::new("script.projects.create")
5762            .visible_alias("create")
5763            .about("Creates a new, empty script project with no script files and a base manifest file.")
5764            .args(escape_hatch_args())
5765    }
5766
5767    // script.projects.deployments.create
5768    fn leaf_script_projects_deployments_create() -> Command {
5769        Command::new("script.projects.deployments.create")
5770            .visible_alias("create")
5771            .about("Creates a deployment of an Apps Script project.")
5772            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5773                .help("The script project's Drive ID."))
5774            .args(escape_hatch_args())
5775    }
5776
5777    // script.projects.deployments.delete
5778    fn leaf_script_projects_deployments_delete() -> Command {
5779        Command::new("script.projects.deployments.delete")
5780            .visible_alias("delete")
5781            .about("Deletes a deployment of an Apps Script project.")
5782            .arg(Arg::new("deployment-id").long("deployment-id").value_name("DEPLOYMENT_ID").required(true)
5783                .help("The deployment ID to be undeployed."))
5784            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5785                .help("The script project's Drive ID."))
5786            .args(escape_hatch_args())
5787    }
5788
5789    // script.projects.deployments.get
5790    fn leaf_script_projects_deployments_get() -> Command {
5791        Command::new("script.projects.deployments.get")
5792            .visible_alias("get")
5793            .about("Gets a deployment of an Apps Script project.")
5794            .arg(Arg::new("deployment-id").long("deployment-id").value_name("DEPLOYMENT_ID").required(true)
5795                .help("The deployment ID."))
5796            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5797                .help("The script project's Drive ID."))
5798            .args(escape_hatch_args())
5799    }
5800
5801    // script.projects.deployments.list
5802    fn leaf_script_projects_deployments_list() -> Command {
5803        Command::new("script.projects.deployments.list")
5804            .visible_alias("list")
5805            .about("Lists the deployments of an Apps Script project.")
5806            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5807                .help("The maximum number of deployments on each returned page. Defaults to 50."))
5808            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5809                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response."))
5810            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5811                .help("The script project's Drive ID."))
5812            .args(escape_hatch_args())
5813    }
5814
5815    // script.projects.deployments.update
5816    fn leaf_script_projects_deployments_update() -> Command {
5817        Command::new("script.projects.deployments.update")
5818            .visible_alias("update")
5819            .about("Updates a deployment of an Apps Script project.")
5820            .arg(Arg::new("deployment-id").long("deployment-id").value_name("DEPLOYMENT_ID").required(true)
5821                .help("The deployment ID for this deployment."))
5822            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5823                .help("The script project's Drive ID."))
5824            .args(escape_hatch_args())
5825    }
5826
5827    // script.projects.deployments
5828    fn group_script_projects_deployments() -> Command {
5829        Command::new("deployments")
5830            .about("Methods under script.projects.deployments")
5831            .subcommand_required(true)
5832            .subcommand(leaf_script_projects_deployments_create())
5833            .subcommand(leaf_script_projects_deployments_delete())
5834            .subcommand(leaf_script_projects_deployments_get())
5835            .subcommand(leaf_script_projects_deployments_list())
5836            .subcommand(leaf_script_projects_deployments_update())
5837    }
5838
5839    // script.projects.get
5840    fn leaf_script_projects_get() -> Command {
5841        Command::new("script.projects.get")
5842            .visible_alias("get")
5843            .about("Gets a script project's metadata.")
5844            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5845                .help("The script project's Drive ID."))
5846            .args(escape_hatch_args())
5847    }
5848
5849    // script.projects.getContent
5850    fn leaf_script_projects_get_content() -> Command {
5851        Command::new("script.projects.getContent")
5852            .visible_alias("getContent")
5853            .about("Gets the content of the script project, including the code source and metadata for each script file.")
5854            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5855                .help("The script project's Drive ID."))
5856            .arg(Arg::new("version-number").long("version-number").value_name("VERSION_NUMBER").value_parser(clap::value_parser!(i64))
5857                .help("The version number of the project to retrieve. If not provided, the project's HEAD version is returned."))
5858            .args(escape_hatch_args())
5859    }
5860
5861    // script.projects.getMetrics
5862    fn leaf_script_projects_get_metrics() -> Command {
5863        Command::new("script.projects.getMetrics")
5864            .visible_alias("getMetrics")
5865            .about("Get metrics data for scripts, such as number of executions and active users.")
5866            .arg(Arg::new("metrics-filter-deployment-id").long("metrics-filter-deployment-id").value_name("METRICS_FILTER_DEPLOYMENT_ID")
5867                .help("Optional field indicating a specific deployment to retrieve metrics from."))
5868            .arg(Arg::new("metrics-granularity").long("metrics-granularity").value_name("METRICS_GRANULARITY").value_parser(["UNSPECIFIED_GRANULARITY", "WEEKLY", "DAILY"])
5869                .help("Required field indicating what granularity of metrics are returned."))
5870            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5871                .help("Required field indicating the script to get metrics for."))
5872            .args(escape_hatch_args())
5873    }
5874
5875    // script.projects.updateContent
5876    fn leaf_script_projects_update_content() -> Command {
5877        Command::new("script.projects.updateContent")
5878            .visible_alias("updateContent")
5879            .about("Updates the content of the specified script project. This content is stored as the HEAD version...")
5880            .long_about("Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the proje")
5881            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5882                .help("The script project's Drive ID."))
5883            .args(escape_hatch_args())
5884    }
5885
5886    // script.projects.versions.create
5887    fn leaf_script_projects_versions_create() -> Command {
5888        Command::new("script.projects.versions.create")
5889            .visible_alias("create")
5890            .about("Creates a new immutable version using the current code, with a unique version number.")
5891            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5892                .help("The script project's Drive ID."))
5893            .args(escape_hatch_args())
5894    }
5895
5896    // script.projects.versions.get
5897    fn leaf_script_projects_versions_get() -> Command {
5898        Command::new("script.projects.versions.get")
5899            .visible_alias("get")
5900            .about("Gets a version of a script project.")
5901            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5902                .help("The script project's Drive ID."))
5903            .arg(Arg::new("version-number").long("version-number").value_name("VERSION_NUMBER").value_parser(clap::value_parser!(i64)).required(true)
5904                .help("The version number."))
5905            .args(escape_hatch_args())
5906    }
5907
5908    // script.projects.versions.list
5909    fn leaf_script_projects_versions_list() -> Command {
5910        Command::new("script.projects.versions.list")
5911            .visible_alias("list")
5912            .about("List the versions of a script project.")
5913            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5914                .help("The maximum number of versions on each returned page. Defaults to 50."))
5915            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5916                .help("The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response."))
5917            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5918                .help("The script project's Drive ID."))
5919            .args(escape_hatch_args())
5920    }
5921
5922    // script.projects.versions
5923    fn group_script_projects_versions() -> Command {
5924        Command::new("versions")
5925            .about("Methods under script.projects.versions")
5926            .subcommand_required(true)
5927            .subcommand(leaf_script_projects_versions_create())
5928            .subcommand(leaf_script_projects_versions_get())
5929            .subcommand(leaf_script_projects_versions_list())
5930    }
5931
5932    // script.projects
5933    fn group_script_projects() -> Command {
5934        Command::new("projects")
5935            .about("Methods under script.projects")
5936            .subcommand_required(true)
5937            .subcommand(leaf_script_projects_create())
5938            .subcommand(group_script_projects_deployments())
5939            .subcommand(leaf_script_projects_get())
5940            .subcommand(leaf_script_projects_get_content())
5941            .subcommand(leaf_script_projects_get_metrics())
5942            .subcommand(leaf_script_projects_update_content())
5943            .subcommand(group_script_projects_versions())
5944    }
5945
5946    // script.scripts.run
5947    fn leaf_script_scripts_run() -> Command {
5948        Command::new("script.scripts.run")
5949            .visible_alias("run")
5950            .about("")
5951            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5952                .help("The script ID of the script to be executed. Find the script ID on the **Project settings** page under \"IDs.\" As multiple executable APIs can be deployed in new"))
5953            .args(escape_hatch_args())
5954    }
5955
5956    // script.scripts
5957    fn group_script_scripts() -> Command {
5958        Command::new("scripts")
5959            .about("Methods under script.scripts")
5960            .subcommand_required(true)
5961            .subcommand(leaf_script_scripts_run())
5962    }
5963
5964    // script
5965    fn service_script() -> Command {
5966        Command::new("script")
5967            .about("Apps Script API operations (v1, 16 methods)")
5968            .subcommand_required(true)
5969            .subcommand(group_script_processes())
5970            .subcommand(group_script_projects())
5971            .subcommand(group_script_scripts())
5972    }
5973
5974    // searchconsole.searchanalytics.query
5975    fn leaf_searchconsole_searchanalytics_query() -> Command {
5976        Command::new("searchconsole.searchanalytics.query")
5977            .visible_alias("query")
5978            .about("Query your data with filters and parameters that you define. Returns zero or more rows grouped by...")
5979            .long_about("Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which")
5980            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
5981                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
5982            .args(escape_hatch_args())
5983    }
5984
5985    // searchconsole.searchanalytics
5986    fn group_searchconsole_searchanalytics() -> Command {
5987        Command::new("searchanalytics")
5988            .about("Methods under searchconsole.searchanalytics")
5989            .subcommand_required(true)
5990            .subcommand(leaf_searchconsole_searchanalytics_query())
5991    }
5992
5993    // searchconsole.sitemaps.delete
5994    fn leaf_searchconsole_sitemaps_delete() -> Command {
5995        Command::new("searchconsole.sitemaps.delete")
5996            .visible_alias("delete")
5997            .about("Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the...")
5998            .long_about("Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.")
5999            .arg(Arg::new("feedpath").long("feedpath").value_name("FEEDPATH").required(true)
6000                .help("The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`."))
6001            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6002                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
6003            .args(escape_hatch_args())
6004    }
6005
6006    // searchconsole.sitemaps.get
6007    fn leaf_searchconsole_sitemaps_get() -> Command {
6008        Command::new("searchconsole.sitemaps.get")
6009            .visible_alias("get")
6010            .about("Retrieves information about a specific sitemap.")
6011            .arg(Arg::new("feedpath").long("feedpath").value_name("FEEDPATH").required(true)
6012                .help("The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`."))
6013            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6014                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
6015            .args(escape_hatch_args())
6016    }
6017
6018    // searchconsole.sitemaps.list
6019    fn leaf_searchconsole_sitemaps_list() -> Command {
6020        Command::new("searchconsole.sitemaps.list")
6021            .visible_alias("list")
6022            .about("Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if...")
6023            .long_about("Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).")
6024            .arg(Arg::new("sitemap-index").long("sitemap-index").value_name("SITEMAP_INDEX")
6025                .help("A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.xml`."))
6026            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6027                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
6028            .args(escape_hatch_args())
6029    }
6030
6031    // searchconsole.sitemaps.submit
6032    fn leaf_searchconsole_sitemaps_submit() -> Command {
6033        Command::new("searchconsole.sitemaps.submit")
6034            .visible_alias("submit")
6035            .about("Submits a sitemap for a site.")
6036            .arg(Arg::new("feedpath").long("feedpath").value_name("FEEDPATH").required(true)
6037                .help("The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`."))
6038            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6039                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
6040            .args(escape_hatch_args())
6041    }
6042
6043    // searchconsole.sitemaps
6044    fn group_searchconsole_sitemaps() -> Command {
6045        Command::new("sitemaps")
6046            .about("Methods under searchconsole.sitemaps")
6047            .subcommand_required(true)
6048            .subcommand(leaf_searchconsole_sitemaps_delete())
6049            .subcommand(leaf_searchconsole_sitemaps_get())
6050            .subcommand(leaf_searchconsole_sitemaps_list())
6051            .subcommand(leaf_searchconsole_sitemaps_submit())
6052    }
6053
6054    // searchconsole.sites.add
6055    fn leaf_searchconsole_sites_add() -> Command {
6056        Command::new("searchconsole.sites.add")
6057            .visible_alias("add")
6058            .about("Adds a site to the set of the user's sites in Search Console.")
6059            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6060                .help("The URL of the site to add."))
6061            .args(escape_hatch_args())
6062    }
6063
6064    // searchconsole.sites.delete
6065    fn leaf_searchconsole_sites_delete() -> Command {
6066        Command::new("searchconsole.sites.delete")
6067            .visible_alias("delete")
6068            .about("Removes a site from the set of the user's Search Console sites.")
6069            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6070                .help("The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`."))
6071            .args(escape_hatch_args())
6072    }
6073
6074    // searchconsole.sites.get
6075    fn leaf_searchconsole_sites_get() -> Command {
6076        Command::new("searchconsole.sites.get")
6077            .visible_alias("get")
6078            .about("Retrieves information about specific site.")
6079            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6080                .help("The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`."))
6081            .args(escape_hatch_args())
6082    }
6083
6084    // searchconsole.sites.list
6085    fn leaf_searchconsole_sites_list() -> Command {
6086        Command::new("searchconsole.sites.list")
6087            .visible_alias("list")
6088            .about("Lists the user's Search Console sites.")
6089            .args(escape_hatch_args())
6090    }
6091
6092    // searchconsole.sites
6093    fn group_searchconsole_sites() -> Command {
6094        Command::new("sites")
6095            .about("Methods under searchconsole.sites")
6096            .subcommand_required(true)
6097            .subcommand(leaf_searchconsole_sites_add())
6098            .subcommand(leaf_searchconsole_sites_delete())
6099            .subcommand(leaf_searchconsole_sites_get())
6100            .subcommand(leaf_searchconsole_sites_list())
6101    }
6102
6103    // searchconsole.urlInspection.index.inspect
6104    fn leaf_searchconsole_url_inspection_index_inspect() -> Command {
6105        Command::new("searchconsole.urlInspection.index.inspect")
6106            .visible_alias("inspect")
6107            .about("Index inspection.")
6108            .args(escape_hatch_args())
6109    }
6110
6111    // searchconsole.urlInspection.index
6112    fn group_searchconsole_url_inspection_index() -> Command {
6113        Command::new("index")
6114            .about("Methods under searchconsole.urlInspection.index")
6115            .subcommand_required(true)
6116            .subcommand(leaf_searchconsole_url_inspection_index_inspect())
6117    }
6118
6119    // searchconsole.urlInspection
6120    fn group_searchconsole_url_inspection() -> Command {
6121        Command::new("urlInspection")
6122            .about("Methods under searchconsole.urlInspection")
6123            .subcommand_required(true)
6124            .subcommand(group_searchconsole_url_inspection_index())
6125    }
6126
6127    // searchconsole.urlTestingTools.mobileFriendlyTest.run
6128    fn leaf_searchconsole_url_testing_tools_mobile_friendly_test_run() -> Command {
6129        Command::new("searchconsole.urlTestingTools.mobileFriendlyTest.run")
6130            .visible_alias("run")
6131            .about("Runs Mobile-Friendly Test for a given URL.")
6132            .args(escape_hatch_args())
6133    }
6134
6135    // searchconsole.urlTestingTools.mobileFriendlyTest
6136    fn group_searchconsole_url_testing_tools_mobile_friendly_test() -> Command {
6137        Command::new("mobileFriendlyTest")
6138            .about("Methods under searchconsole.urlTestingTools.mobileFriendlyTest")
6139            .subcommand_required(true)
6140            .subcommand(leaf_searchconsole_url_testing_tools_mobile_friendly_test_run())
6141    }
6142
6143    // searchconsole.urlTestingTools
6144    fn group_searchconsole_url_testing_tools() -> Command {
6145        Command::new("urlTestingTools")
6146            .about("Methods under searchconsole.urlTestingTools")
6147            .subcommand_required(true)
6148            .subcommand(group_searchconsole_url_testing_tools_mobile_friendly_test())
6149    }
6150
6151    // searchconsole
6152    fn service_searchconsole() -> Command {
6153        Command::new("searchconsole")
6154            .about("Google Search Console API operations (v1, 11 methods)")
6155            .subcommand_required(true)
6156            .subcommand(group_searchconsole_searchanalytics())
6157            .subcommand(group_searchconsole_sitemaps())
6158            .subcommand(group_searchconsole_sites())
6159            .subcommand(group_searchconsole_url_inspection())
6160            .subcommand(group_searchconsole_url_testing_tools())
6161    }
6162
6163    // sheets.spreadsheets.batchUpdate
6164    fn leaf_sheets_spreadsheets_batch_update() -> Command {
6165        Command::new("sheets.spreadsheets.batchUpdate")
6166            .visible_alias("batchUpdate")
6167            .about("Applies one or more updates to the spreadsheet. Each request is validated before being applied. If...")
6168            .long_about("Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. The replies will mirror the r")
6169            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6170                .help("The spreadsheet to apply the updates to."))
6171            .args(escape_hatch_args())
6172    }
6173
6174    // sheets.spreadsheets.create
6175    fn leaf_sheets_spreadsheets_create() -> Command {
6176        Command::new("sheets.spreadsheets.create")
6177            .visible_alias("create")
6178            .about("Creates a spreadsheet, returning the newly created spreadsheet.")
6179            .args(escape_hatch_args())
6180    }
6181
6182    // sheets.spreadsheets.developerMetadata.get
6183    fn leaf_sheets_spreadsheets_developer_metadata_get() -> Command {
6184        Command::new("sheets.spreadsheets.developerMetadata.get")
6185            .visible_alias("get")
6186            .about("Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID...")
6187            .long_about("Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID and the developer metadata's unique metadataId. For more information, see Read, write, and search metadata.")
6188            .arg(Arg::new("metadata-id").long("metadata-id").value_name("METADATA_ID").value_parser(clap::value_parser!(i64)).required(true)
6189                .help("The ID of the developer metadata to retrieve."))
6190            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6191                .help("The ID of the spreadsheet to retrieve metadata from."))
6192            .args(escape_hatch_args())
6193    }
6194
6195    // sheets.spreadsheets.developerMetadata.search
6196    fn leaf_sheets_spreadsheets_developer_metadata_search() -> Command {
6197        Command::new("sheets.spreadsheets.developerMetadata.search")
6198            .visible_alias("search")
6199            .about("Returns all developer metadata matching the specified DataFilter. For more information, see Read...")
6200            .long_about("Returns all developer metadata matching the specified DataFilter. For more information, see Read, write, and search metadata. If the provided DataFilter represents a DeveloperMetadataLookup object, this will return all DeveloperMe")
6201            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6202                .help("The ID of the spreadsheet to retrieve metadata from."))
6203            .args(escape_hatch_args())
6204    }
6205
6206    // sheets.spreadsheets.developerMetadata
6207    fn group_sheets_spreadsheets_developer_metadata() -> Command {
6208        Command::new("developerMetadata")
6209            .about("Methods under sheets.spreadsheets.developerMetadata")
6210            .subcommand_required(true)
6211            .subcommand(leaf_sheets_spreadsheets_developer_metadata_get())
6212            .subcommand(leaf_sheets_spreadsheets_developer_metadata_search())
6213    }
6214
6215    // sheets.spreadsheets.get
6216    fn leaf_sheets_spreadsheets_get() -> Command {
6217        Command::new("sheets.spreadsheets.get")
6218            .visible_alias("get")
6219            .about("Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default...")
6220            .long_about("Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids is not returned. You can include grid data in one of 2 ways: * Specify a field mask listing your desired fields")
6221            .arg(Arg::new("comments-view-mode").long("comments-view-mode").value_name("COMMENTS_VIEW_MODE").value_parser(["COMMENTS_VIEW_MODE_UNSPECIFIED", "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS", "COMMENTS_VIEW_MODE_OMITTED", "COMMENTS_VIEW_MODE_INCLUDED"])
6222                .help("The comments view mode to apply to the spreadsheet. This allows viewing the spreadsheet with comments omitted or included. If one is not specified, COMMENTS_VIE"))
6223            .arg(Arg::new("exclude-tables-in-banded-ranges").long("exclude-tables-in-banded-ranges").action(ArgAction::SetTrue)
6224                .help("True if tables should be excluded in the banded ranges. False if not set."))
6225            .arg(Arg::new("include-grid-data").long("include-grid-data").action(ArgAction::SetTrue)
6226                .help("True if grid data should be returned. This parameter is ignored if a field mask was set in the request."))
6227            .arg(Arg::new("ranges").long("ranges").value_name("RANGES").action(ArgAction::Append)
6228                .help("The ranges to retrieve from the spreadsheet."))
6229            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6230                .help("The spreadsheet to request."))
6231            .args(escape_hatch_args())
6232    }
6233
6234    // sheets.spreadsheets.getByDataFilter
6235    fn leaf_sheets_spreadsheets_get_by_data_filter() -> Command {
6236        Command::new("sheets.spreadsheets.getByDataFilter")
6237            .visible_alias("getByDataFilter")
6238            .about("Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. For more...")
6239            .long_about("Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. For more information, see Read, write, and search metadata. This method differs from GetSpreadsheet in that it allows selecting which subsets of")
6240            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6241                .help("The spreadsheet to request."))
6242            .args(escape_hatch_args())
6243    }
6244
6245    // sheets.spreadsheets.sheets.copyTo
6246    fn leaf_sheets_spreadsheets_sheets_copy_to() -> Command {
6247        Command::new("sheets.spreadsheets.sheets.copyTo")
6248            .visible_alias("copyTo")
6249            .about("Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the...")
6250            .long_about("Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.")
6251            .arg(Arg::new("sheet-id").long("sheet-id").value_name("SHEET_ID").value_parser(clap::value_parser!(i64)).required(true)
6252                .help("The ID of the sheet to copy."))
6253            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6254                .help("The ID of the spreadsheet containing the sheet to copy."))
6255            .args(escape_hatch_args())
6256    }
6257
6258    // sheets.spreadsheets.sheets
6259    fn group_sheets_spreadsheets_sheets() -> Command {
6260        Command::new("sheets")
6261            .about("Methods under sheets.spreadsheets.sheets")
6262            .subcommand_required(true)
6263            .subcommand(leaf_sheets_spreadsheets_sheets_copy_to())
6264    }
6265
6266    // sheets.spreadsheets.values.append
6267    fn leaf_sheets_spreadsheets_values_append() -> Command {
6268        Command::new("sheets.spreadsheets.values.append")
6269            .visible_alias("append")
6270            .about("Appends values to a spreadsheet. The input range is used to search for existing data and find a...")
6271            .long_about("Appends values to a spreadsheet. The input range is used to search for existing data and find a \"table\" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the [guide](https://developers.google.com/workspace/sheets/api/guides/valu")
6272            .arg(Arg::new("include-values-in-response").long("include-values-in-response").action(ArgAction::SetTrue)
6273                .help("Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values."))
6274            .arg(Arg::new("insert-data-option").long("insert-data-option").value_name("INSERT_DATA_OPTION").value_parser(["OVERWRITE", "INSERT_ROWS"])
6275                .help("How the input data should be inserted."))
6276            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6277                .help("The A1 notation of a range to search for a logical table of data. Values are appended"))
6278            .arg(Arg::new("response-date-time-render-option").long("response-date-time-render-option").value_name("RESPONSE_DATE_TIME_RENDER_OPTION").value_parser(["SERIAL_NUMBER", "FORMATTED_STRING"])
6279                .help("Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default d"))
6280            .arg(Arg::new("response-value-render-option").long("response-value-render-option").value_name("RESPONSE_VALUE_RENDER_OPTION").value_parser(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"])
6281                .help("Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE."))
6282            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6283                .help("The ID of the spreadsheet to update."))
6284            .arg(Arg::new("value-input-option").long("value-input-option").value_name("VALUE_INPUT_OPTION").value_parser(["INPUT_VALUE_OPTION_UNSPECIFIED", "RAW", "USER_ENTERED"])
6285                .help("How the input data should be interpreted."))
6286            .args(escape_hatch_args())
6287    }
6288
6289    // sheets.spreadsheets.values.batchClear
6290    fn leaf_sheets_spreadsheets_values_batch_clear() -> Command {
6291        Command::new("sheets.spreadsheets.values.batchClear")
6292            .visible_alias("batchClear")
6293            .about("Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID...")
6294            .long_about("Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as formatting and data validation) are kept.")
6295            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6296                .help("The ID of the spreadsheet to update."))
6297            .args(escape_hatch_args())
6298    }
6299
6300    // sheets.spreadsheets.values.batchClearByDataFilter
6301    fn leaf_sheets_spreadsheets_values_batch_clear_by_data_filter() -> Command {
6302        Command::new("sheets.spreadsheets.values.batchClearByDataFilter")
6303            .visible_alias("batchClearByDataFilter")
6304            .about("Clears one or more ranges of values from a spreadsheet. For more information, see Read, write, and...")
6305            .long_about("Clears one or more ranges of values from a spreadsheet. For more information, see Read, write, and search metadata. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data")
6306            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6307                .help("The ID of the spreadsheet to update."))
6308            .args(escape_hatch_args())
6309    }
6310
6311    // sheets.spreadsheets.values.batchGet
6312    fn leaf_sheets_spreadsheets_values_batch_get() -> Command {
6313        Command::new("sheets.spreadsheets.values.batchGet")
6314            .visible_alias("batchGet")
6315            .about("Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID...")
6316            .long_about("Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.")
6317            .arg(Arg::new("date-time-render-option").long("date-time-render-option").value_name("DATE_TIME_RENDER_OPTION").value_parser(["SERIAL_NUMBER", "FORMATTED_STRING"])
6318                .help("How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render opti"))
6319            .arg(Arg::new("major-dimension").long("major-dimension").value_name("MAJOR_DIMENSION").value_parser(["DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS"])
6320                .help("The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `ranges=[\"A1:B2\"],majorDimension=RO"))
6321            .arg(Arg::new("ranges").long("ranges").value_name("RANGES").action(ArgAction::Append)
6322                .help("The A1 notation or R1C1 notation of the range to retrieve values from."))
6323            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6324                .help("The ID of the spreadsheet to retrieve data from."))
6325            .arg(Arg::new("value-render-option").long("value-render-option").value_name("VALUE_RENDER_OPTION").value_parser(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"])
6326                .help("How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE."))
6327            .args(escape_hatch_args())
6328    }
6329
6330    // sheets.spreadsheets.values.batchGetByDataFilter
6331    fn leaf_sheets_spreadsheets_values_batch_get_by_data_filter() -> Command {
6332        Command::new("sheets.spreadsheets.values.batchGetByDataFilter")
6333            .visible_alias("batchGetByDataFilter")
6334            .about("Returns one or more ranges of values that match the specified data filters. For more information...")
6335            .long_about("Returns one or more ranges of values that match the specified data filters. For more information, see Read, write, and search metadata. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that match any")
6336            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6337                .help("The ID of the spreadsheet to retrieve data from."))
6338            .args(escape_hatch_args())
6339    }
6340
6341    // sheets.spreadsheets.values.batchUpdate
6342    fn leaf_sheets_spreadsheets_values_batch_update() -> Command {
6343        Command::new("sheets.spreadsheets.values.batchUpdate")
6344            .visible_alias("batchUpdate")
6345            .about("Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a...")
6346            .long_about("Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.")
6347            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6348                .help("The ID of the spreadsheet to update."))
6349            .args(escape_hatch_args())
6350    }
6351
6352    // sheets.spreadsheets.values.batchUpdateByDataFilter
6353    fn leaf_sheets_spreadsheets_values_batch_update_by_data_filter() -> Command {
6354        Command::new("sheets.spreadsheets.values.batchUpdateByDataFilter")
6355            .visible_alias("batchUpdateByDataFilter")
6356            .about("Sets values in one or more ranges of a spreadsheet. For more information, see Read, write, and...")
6357            .long_about("Sets values in one or more ranges of a spreadsheet. For more information, see Read, write, and search metadata. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges.")
6358            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6359                .help("The ID of the spreadsheet to update."))
6360            .args(escape_hatch_args())
6361    }
6362
6363    // sheets.spreadsheets.values.clear
6364    fn leaf_sheets_spreadsheets_values_clear() -> Command {
6365        Command::new("sheets.spreadsheets.values.clear")
6366            .visible_alias("clear")
6367            .about("Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values...")
6368            .long_about("Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.")
6369            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6370                .help("The A1 notation or R1C1 notation of the values to clear."))
6371            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6372                .help("The ID of the spreadsheet to update."))
6373            .args(escape_hatch_args())
6374    }
6375
6376    // sheets.spreadsheets.values.get
6377    fn leaf_sheets_spreadsheets_values_get() -> Command {
6378        Command::new("sheets.spreadsheets.values.get")
6379            .visible_alias("get")
6380            .about("Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a...")
6381            .long_about("Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.")
6382            .arg(Arg::new("date-time-render-option").long("date-time-render-option").value_name("DATE_TIME_RENDER_OPTION").value_parser(["SERIAL_NUMBER", "FORMATTED_STRING"])
6383                .help("How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render opti"))
6384            .arg(Arg::new("major-dimension").long("major-dimension").value_name("MAJOR_DIMENSION").value_parser(["DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS"])
6385                .help("The major dimension that results should use. For example, if the spreadsheet data in Sheet1 is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=Sheet1!A1:B2?major"))
6386            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6387                .help("The A1 notation or R1C1 notation of the range to retrieve values from."))
6388            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6389                .help("The ID of the spreadsheet to retrieve data from."))
6390            .arg(Arg::new("value-render-option").long("value-render-option").value_name("VALUE_RENDER_OPTION").value_parser(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"])
6391                .help("How values should be represented in the output. The default render option is FORMATTED_VALUE."))
6392            .args(escape_hatch_args())
6393    }
6394
6395    // sheets.spreadsheets.values.update
6396    fn leaf_sheets_spreadsheets_values_update() -> Command {
6397        Command::new("sheets.spreadsheets.values.update")
6398            .visible_alias("update")
6399            .about("Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a...")
6400            .long_about("Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.")
6401            .arg(Arg::new("include-values-in-response").long("include-values-in-response").action(ArgAction::SetTrue)
6402                .help("Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the rang"))
6403            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6404                .help("The A1 notation of the values to update."))
6405            .arg(Arg::new("response-date-time-render-option").long("response-date-time-render-option").value_name("RESPONSE_DATE_TIME_RENDER_OPTION").value_parser(["SERIAL_NUMBER", "FORMATTED_STRING"])
6406                .help("Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default d"))
6407            .arg(Arg::new("response-value-render-option").long("response-value-render-option").value_name("RESPONSE_VALUE_RENDER_OPTION").value_parser(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"])
6408                .help("Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE."))
6409            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6410                .help("The ID of the spreadsheet to update."))
6411            .arg(Arg::new("value-input-option").long("value-input-option").value_name("VALUE_INPUT_OPTION").value_parser(["INPUT_VALUE_OPTION_UNSPECIFIED", "RAW", "USER_ENTERED"])
6412                .help("How the input data should be interpreted."))
6413            .args(escape_hatch_args())
6414    }
6415
6416    // sheets.spreadsheets.values
6417    fn group_sheets_spreadsheets_values() -> Command {
6418        Command::new("values")
6419            .about("Methods under sheets.spreadsheets.values")
6420            .subcommand_required(true)
6421            .subcommand(leaf_sheets_spreadsheets_values_append())
6422            .subcommand(leaf_sheets_spreadsheets_values_batch_clear())
6423            .subcommand(leaf_sheets_spreadsheets_values_batch_clear_by_data_filter())
6424            .subcommand(leaf_sheets_spreadsheets_values_batch_get())
6425            .subcommand(leaf_sheets_spreadsheets_values_batch_get_by_data_filter())
6426            .subcommand(leaf_sheets_spreadsheets_values_batch_update())
6427            .subcommand(leaf_sheets_spreadsheets_values_batch_update_by_data_filter())
6428            .subcommand(leaf_sheets_spreadsheets_values_clear())
6429            .subcommand(leaf_sheets_spreadsheets_values_get())
6430            .subcommand(leaf_sheets_spreadsheets_values_update())
6431    }
6432
6433    // sheets.spreadsheets
6434    fn group_sheets_spreadsheets() -> Command {
6435        Command::new("spreadsheets")
6436            .about("Methods under sheets.spreadsheets")
6437            .subcommand_required(true)
6438            .subcommand(leaf_sheets_spreadsheets_batch_update())
6439            .subcommand(leaf_sheets_spreadsheets_create())
6440            .subcommand(group_sheets_spreadsheets_developer_metadata())
6441            .subcommand(leaf_sheets_spreadsheets_get())
6442            .subcommand(leaf_sheets_spreadsheets_get_by_data_filter())
6443            .subcommand(group_sheets_spreadsheets_sheets())
6444            .subcommand(group_sheets_spreadsheets_values())
6445    }
6446
6447    // sheets
6448    fn service_sheets() -> Command {
6449        Command::new("sheets")
6450            .about("Google Sheets API operations (v4, 17 methods)")
6451            .subcommand_required(true)
6452            .subcommand(group_sheets_spreadsheets())
6453    }
6454
6455    // slides.presentations.batchUpdate
6456    fn leaf_slides_presentations_batch_update() -> Command {
6457        Command::new("slides.presentations.batchUpdate")
6458            .visible_alias("batchUpdate")
6459            .about("Applies one or more updates to the presentation. Each request is validated before being applied. If...")
6460            .long_about("Applies one or more updates to the presentation. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need")
6461            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6462                .help("The presentation to apply the updates to."))
6463            .args(escape_hatch_args())
6464    }
6465
6466    // slides.presentations.create
6467    fn leaf_slides_presentations_create() -> Command {
6468        Command::new("slides.presentations.create")
6469            .visible_alias("create")
6470            .about("Creates a blank presentation using the title given in the request. If a `presentationId` is...")
6471            .long_about("Creates a blank presentation using the title given in the request. If a `presentationId` is provided, it is used as the ID of the new presentation. Otherwise, a new ID is generated. Other fields in the request, including any provided content, are ignored. Returns the created presentation.")
6472            .args(escape_hatch_args())
6473    }
6474
6475    // slides.presentations.get
6476    fn leaf_slides_presentations_get() -> Command {
6477        Command::new("slides.presentations.get")
6478            .visible_alias("get")
6479            .about("Gets the latest version of the specified presentation.")
6480            .arg(Arg::new("comments-view-mode").long("comments-view-mode").value_name("COMMENTS_VIEW_MODE").value_parser(["COMMENTS_VIEW_MODE_UNSPECIFIED", "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS", "COMMENTS_VIEW_MODE_OMITTED", "COMMENTS_VIEW_MODE_INCLUDED"])
6481                .help("The comments view mode to apply to the presentation. This allows viewing the presentation with comments omitted or included. If one is not specified, COMMENTS_V"))
6482            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6483                .help("The ID of the presentation to retrieve."))
6484            .args(escape_hatch_args())
6485    }
6486
6487    // slides.presentations.pages.get
6488    fn leaf_slides_presentations_pages_get() -> Command {
6489        Command::new("slides.presentations.pages.get")
6490            .visible_alias("get")
6491            .about("Gets the latest version of the specified page in the presentation.")
6492            .arg(Arg::new("comments-view-mode").long("comments-view-mode").value_name("COMMENTS_VIEW_MODE").value_parser(["COMMENTS_VIEW_MODE_UNSPECIFIED", "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS", "COMMENTS_VIEW_MODE_OMITTED", "COMMENTS_VIEW_MODE_INCLUDED"])
6493                .help("The comments view mode to apply to the page. This allows viewing the page with comments omitted or included. If one is not specified, COMMENTS_VIEW_MODE_OMITTED"))
6494            .arg(Arg::new("page-object-id").long("page-object-id").value_name("PAGE_OBJECT_ID").required(true)
6495                .help("The object ID of the page to retrieve."))
6496            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6497                .help("The ID of the presentation to retrieve."))
6498            .args(escape_hatch_args())
6499    }
6500
6501    // slides.presentations.pages.getThumbnail
6502    fn leaf_slides_presentations_pages_get_thumbnail() -> Command {
6503        Command::new("slides.presentations.pages.getThumbnail")
6504            .visible_alias("getThumbnail")
6505            .about("Generates a thumbnail of the latest version of the specified page in the presentation and returns a...")
6506            .long_about("Generates a thumbnail of the latest version of the specified page in the presentation and returns a URL to the thumbnail image. This request counts as an expensive read request for quota purposes.")
6507            .arg(Arg::new("page-object-id").long("page-object-id").value_name("PAGE_OBJECT_ID").required(true)
6508                .help("The object ID of the page whose thumbnail to retrieve."))
6509            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6510                .help("The ID of the presentation to retrieve."))
6511            .arg(Arg::new("thumbnail-properties-mime-type").long("thumbnail-properties-mime-type").value_name("THUMBNAIL_PROPERTIES_MIME_TYPE").value_parser(["PNG"])
6512                .help("The optional mime type of the thumbnail image. If you don't specify the mime type, the mime type defaults to PNG."))
6513            .arg(Arg::new("thumbnail-properties-thumbnail-size").long("thumbnail-properties-thumbnail-size").value_name("THUMBNAIL_PROPERTIES_THUMBNAIL_SIZE").value_parser(["THUMBNAIL_SIZE_UNSPECIFIED", "LARGE", "MEDIUM", "SMALL", "WIDTH2000_PX"])
6514                .help("The optional thumbnail image size. If you don't specify the size, the server chooses a default size of the image."))
6515            .args(escape_hatch_args())
6516    }
6517
6518    // slides.presentations.pages
6519    fn group_slides_presentations_pages() -> Command {
6520        Command::new("pages")
6521            .about("Methods under slides.presentations.pages")
6522            .subcommand_required(true)
6523            .subcommand(leaf_slides_presentations_pages_get())
6524            .subcommand(leaf_slides_presentations_pages_get_thumbnail())
6525    }
6526
6527    // slides.presentations
6528    fn group_slides_presentations() -> Command {
6529        Command::new("presentations")
6530            .about("Methods under slides.presentations")
6531            .subcommand_required(true)
6532            .subcommand(leaf_slides_presentations_batch_update())
6533            .subcommand(leaf_slides_presentations_create())
6534            .subcommand(leaf_slides_presentations_get())
6535            .subcommand(group_slides_presentations_pages())
6536    }
6537
6538    // slides
6539    fn service_slides() -> Command {
6540        Command::new("slides")
6541            .about("Google Slides API operations (v1, 5 methods)")
6542            .subcommand_required(true)
6543            .subcommand(group_slides_presentations())
6544    }
6545
6546    // tasks.tasklists.delete
6547    fn leaf_tasks_tasklists_delete() -> Command {
6548        Command::new("tasks.tasklists.delete")
6549            .visible_alias("delete")
6550            .about("Deletes the authenticated user's specified task list. If the list contains assigned tasks, both the...")
6551            .long_about("Deletes the authenticated user's specified task list. If the list contains assigned tasks, both the assigned tasks and the original tasks in the assignment surface (Docs, Chat Spaces) are deleted.")
6552            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6553                .help("Task list identifier."))
6554            .args(escape_hatch_args())
6555    }
6556
6557    // tasks.tasklists.get
6558    fn leaf_tasks_tasklists_get() -> Command {
6559        Command::new("tasks.tasklists.get")
6560            .visible_alias("get")
6561            .about("Returns the authenticated user's specified task list.")
6562            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6563                .help("Task list identifier."))
6564            .args(escape_hatch_args())
6565    }
6566
6567    // tasks.tasklists.insert
6568    fn leaf_tasks_tasklists_insert() -> Command {
6569        Command::new("tasks.tasklists.insert")
6570            .visible_alias("insert")
6571            .about("Creates a new task list and adds it to the authenticated user's task lists. A user can have up to...")
6572            .long_about("Creates a new task list and adds it to the authenticated user's task lists. A user can have up to 2000 lists at a time.")
6573            .args(escape_hatch_args())
6574    }
6575
6576    // tasks.tasklists.list
6577    fn leaf_tasks_tasklists_list() -> Command {
6578        Command::new("tasks.tasklists.list")
6579            .visible_alias("list")
6580            .about("Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.")
6581            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
6582                .help("Maximum number of task lists returned on one page. Optional. The default is 1000 (max allowed: 1000)."))
6583            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
6584                .help("Token specifying the result page to return. Optional."))
6585            .args(escape_hatch_args())
6586    }
6587
6588    // tasks.tasklists.patch
6589    fn leaf_tasks_tasklists_patch() -> Command {
6590        Command::new("tasks.tasklists.patch")
6591            .visible_alias("patch")
6592            .about("Updates the authenticated user's specified task list. This method supports patch semantics.")
6593            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6594                .help("Task list identifier."))
6595            .args(escape_hatch_args())
6596    }
6597
6598    // tasks.tasklists.update
6599    fn leaf_tasks_tasklists_update() -> Command {
6600        Command::new("tasks.tasklists.update")
6601            .visible_alias("update")
6602            .about("Updates the authenticated user's specified task list.")
6603            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6604                .help("Task list identifier."))
6605            .args(escape_hatch_args())
6606    }
6607
6608    // tasks.tasklists
6609    fn group_tasks_tasklists() -> Command {
6610        Command::new("tasklists")
6611            .about("Methods under tasks.tasklists")
6612            .subcommand_required(true)
6613            .subcommand(leaf_tasks_tasklists_delete())
6614            .subcommand(leaf_tasks_tasklists_get())
6615            .subcommand(leaf_tasks_tasklists_insert())
6616            .subcommand(leaf_tasks_tasklists_list())
6617            .subcommand(leaf_tasks_tasklists_patch())
6618            .subcommand(leaf_tasks_tasklists_update())
6619    }
6620
6621    // tasks.tasks.clear
6622    fn leaf_tasks_tasks_clear() -> Command {
6623        Command::new("tasks.tasks.clear")
6624            .visible_alias("clear")
6625            .about("Clears all completed tasks from the specified task list. The affected tasks will be marked as...")
6626            .long_about("Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list.")
6627            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6628                .help("Task list identifier."))
6629            .args(escape_hatch_args())
6630    }
6631
6632    // tasks.tasks.delete
6633    fn leaf_tasks_tasks_delete() -> Command {
6634        Command::new("tasks.tasks.delete")
6635            .visible_alias("delete")
6636            .about("Deletes the specified task from the task list. If the task is assigned, both the assigned task and...")
6637            .long_about("Deletes the specified task from the task list. If the task is assigned, both the assigned task and the original task (in Docs, Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there.")
6638            .arg(Arg::new("task").long("task").value_name("TASK").required(true)
6639                .help("Task identifier."))
6640            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6641                .help("Task list identifier."))
6642            .args(escape_hatch_args())
6643    }
6644
6645    // tasks.tasks.get
6646    fn leaf_tasks_tasks_get() -> Command {
6647        Command::new("tasks.tasks.get")
6648            .visible_alias("get")
6649            .about("Returns the specified task.")
6650            .arg(Arg::new("task").long("task").value_name("TASK").required(true)
6651                .help("Task identifier."))
6652            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6653                .help("Task list identifier."))
6654            .args(escape_hatch_args())
6655    }
6656
6657    // tasks.tasks.insert
6658    fn leaf_tasks_tasks_insert() -> Command {
6659        Command::new("tasks.tasks.insert")
6660            .visible_alias("insert")
6661            .about("Creates a new task on the specified task list. Tasks assigned from Docs or Chat Spaces cannot be...")
6662            .long_about("Creates a new task on the specified task list. Tasks assigned from Docs or Chat Spaces cannot be inserted from Tasks Public API; they can only be created by assigning them from Docs or Chat Spaces. A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.")
6663            .arg(Arg::new("parent").long("parent").value_name("PARENT")
6664                .help("Parent task identifier. If the task is created at the top level, this parameter is omitted. An assigned task cannot be a parent task, nor can it have a parent."))
6665            .arg(Arg::new("previous").long("previous").value_name("PREVIOUS")
6666                .help("Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional."))
6667            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6668                .help("Task list identifier."))
6669            .args(escape_hatch_args())
6670    }
6671
6672    // tasks.tasks.list
6673    fn leaf_tasks_tasks_list() -> Command {
6674        Command::new("tasks.tasks.list")
6675            .visible_alias("list")
6676            .about("Returns all tasks in the specified task list. Doesn't return assigned tasks by default (from Docs...")
6677            .long_about("Returns all tasks in the specified task list. Doesn't return assigned tasks by default (from Docs, Chat Spaces). A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.")
6678            .arg(Arg::new("completed-max").long("completed-max").value_name("COMPLETED_MAX")
6679                .help("Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date."))
6680            .arg(Arg::new("completed-min").long("completed-min").value_name("COMPLETED_MIN")
6681                .help("Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date."))
6682            .arg(Arg::new("due-max").long("due-max").value_name("DUE_MAX")
6683                .help("Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date."))
6684            .arg(Arg::new("due-min").long("due-min").value_name("DUE_MIN")
6685                .help("Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date."))
6686            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
6687                .help("Maximum number of tasks returned on one page. Optional. The default is 20 (max allowed: 100)."))
6688            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
6689                .help("Token specifying the result page to return. Optional."))
6690            .arg(Arg::new("show-assigned").long("show-assigned").action(ArgAction::SetTrue)
6691                .help("Optional. Flag indicating whether tasks assigned to the current user are returned in the result. Optional. The default is False."))
6692            .arg(Arg::new("show-completed").long("show-completed").action(ArgAction::SetTrue)
6693                .help("Flag indicating whether completed tasks are returned in the result. Note that showHidden must also be True to show tasks completed in first party clients, such"))
6694            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
6695                .help("Flag indicating whether deleted tasks are returned in the result. Optional. The default is False."))
6696            .arg(Arg::new("show-hidden").long("show-hidden").action(ArgAction::SetTrue)
6697                .help("Flag indicating whether hidden tasks are returned in the result. Optional. The default is False."))
6698            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6699                .help("Task list identifier."))
6700            .arg(Arg::new("updated-min").long("updated-min").value_name("UPDATED_MIN")
6701                .help("Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by last modification time."))
6702            .args(escape_hatch_args())
6703    }
6704
6705    // tasks.tasks.move
6706    fn leaf_tasks_tasks_move() -> Command {
6707        Command::new("tasks.tasks.move")
6708            .visible_alias("move")
6709            .about("Moves the specified task to another position in the destination task list. If the destination list...")
6710            .long_about("Moves the specified task to another position in the destination task list. If the destination list is not specified, the task is moved within its current list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. A user can ha")
6711            .arg(Arg::new("destination-tasklist").long("destination-tasklist").value_name("DESTINATION_TASKLIST")
6712                .help("Optional. Destination task list identifier. If set, the task is moved from tasklist to the destinationTasklist list. Otherwise the task is moved within its curr"))
6713            .arg(Arg::new("parent").long("parent").value_name("PARENT")
6714                .help("Optional. New parent task identifier. If the task is moved to the top level, this parameter is omitted. The task set as parent must exist in the task list and c"))
6715            .arg(Arg::new("previous").long("previous").value_name("PREVIOUS")
6716                .help("Optional. New previous sibling task identifier. If the task is moved to the first position among its siblings, this parameter is omitted. The task set as previo"))
6717            .arg(Arg::new("task").long("task").value_name("TASK").required(true)
6718                .help("Task identifier."))
6719            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6720                .help("Task list identifier."))
6721            .args(escape_hatch_args())
6722    }
6723
6724    // tasks.tasks.patch
6725    fn leaf_tasks_tasks_patch() -> Command {
6726        Command::new("tasks.tasks.patch")
6727            .visible_alias("patch")
6728            .about("Updates the specified task. This method supports patch semantics.")
6729            .arg(Arg::new("task").long("task").value_name("TASK").required(true)
6730                .help("Task identifier."))
6731            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6732                .help("Task list identifier."))
6733            .args(escape_hatch_args())
6734    }
6735
6736    // tasks.tasks.update
6737    fn leaf_tasks_tasks_update() -> Command {
6738        Command::new("tasks.tasks.update")
6739            .visible_alias("update")
6740            .about("Updates the specified task.")
6741            .arg(Arg::new("task").long("task").value_name("TASK").required(true)
6742                .help("Task identifier."))
6743            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6744                .help("Task list identifier."))
6745            .args(escape_hatch_args())
6746    }
6747
6748    // tasks.tasks
6749    fn group_tasks_tasks() -> Command {
6750        Command::new("tasks")
6751            .about("Methods under tasks.tasks")
6752            .subcommand_required(true)
6753            .subcommand(leaf_tasks_tasks_clear())
6754            .subcommand(leaf_tasks_tasks_delete())
6755            .subcommand(leaf_tasks_tasks_get())
6756            .subcommand(leaf_tasks_tasks_insert())
6757            .subcommand(leaf_tasks_tasks_list())
6758            .subcommand(leaf_tasks_tasks_move())
6759            .subcommand(leaf_tasks_tasks_patch())
6760            .subcommand(leaf_tasks_tasks_update())
6761    }
6762
6763    // tasks
6764    fn service_tasks() -> Command {
6765        Command::new("tasks")
6766            .about("Google Tasks API operations (v1, 14 methods)")
6767            .subcommand_required(true)
6768            .subcommand(group_tasks_tasklists())
6769            .subcommand(group_tasks_tasks())
6770    }
6771}