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-26T05:30:58.723Z — 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, 402 methods, 402 leaves, 96 resource groups, 995 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-26T05:30:58.723Z";
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.replaceCards
2204    fn leaf_chat_spaces_messages_replace_cards() -> Command {
2205        Command::new("chat.spaces.messages.replaceCards")
2206            .visible_alias("replaceCards")
2207            .about("Replaces the cards included in a message. A Chat app can only replace cards on a human-created...")
2208            .long_about("Replaces the cards included in a message. A Chat app can only replace cards on a human-created message if the message already contains cards, and the cards were created by the app. If the app replaces the cards with an empty list, the cards are removed. After removing the cards, the app cannot add c")
2209            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2210                .help("Required. The resource name of the message. Format: `spaces/{space}/messages/{message}`"))
2211            .args(escape_hatch_args())
2212    }
2213
2214    // chat.spaces.messages.search
2215    fn leaf_chat_spaces_messages_search() -> Command {
2216        Command::new("chat.spaces.messages.search")
2217            .visible_alias("search")
2218            .about("Searches for messages in Google Chat that the calling user has access to. Returns a list of...")
2219            .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")
2220            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2221                .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"))
2222            .args(escape_hatch_args())
2223    }
2224
2225    // chat.spaces.messages.update
2226    fn leaf_chat_spaces_messages_update() -> Command {
2227        Command::new("chat.spaces.messages.update")
2228            .visible_alias("update")
2229            .about("Updates a message. There's a difference between the `patch` and `update` methods. The `patch`...")
2230            .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")
2231            .arg(Arg::new("allow-missing").long("allow-missing").action(ArgAction::SetTrue)
2232                .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:"))
2233            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2234                .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"))
2235            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2236                .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"))
2237            .args(escape_hatch_args())
2238    }
2239
2240    // chat.spaces.messages
2241    fn group_chat_spaces_messages() -> Command {
2242        Command::new("messages")
2243            .about("Methods under chat.spaces.messages")
2244            .subcommand_required(true)
2245            .subcommand(group_chat_spaces_messages_attachments())
2246            .subcommand(leaf_chat_spaces_messages_create())
2247            .subcommand(leaf_chat_spaces_messages_delete())
2248            .subcommand(leaf_chat_spaces_messages_get())
2249            .subcommand(leaf_chat_spaces_messages_list())
2250            .subcommand(leaf_chat_spaces_messages_patch())
2251            .subcommand(group_chat_spaces_messages_reactions())
2252            .subcommand(leaf_chat_spaces_messages_replace_cards())
2253            .subcommand(leaf_chat_spaces_messages_search())
2254            .subcommand(leaf_chat_spaces_messages_update())
2255    }
2256
2257    // chat.spaces.patch
2258    fn leaf_chat_spaces_patch() -> Command {
2259        Command::new("chat.spaces.patch")
2260            .visible_alias("patch")
2261            .about("Updates a space. For an example, see Update a space. If you're updating the `displayName` field and...")
2262            .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")
2263            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2264                .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"))
2265            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2266                .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"))
2267            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
2268                .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"))
2269            .args(escape_hatch_args())
2270    }
2271
2272    // chat.spaces.search
2273    fn leaf_chat_spaces_search() -> Command {
2274        Command::new("chat.spaces.search")
2275            .visible_alias("search")
2276            .about("Returns a list of spaces in a Google Workspace organization. For an example, see Search for and...")
2277            .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")
2278            .arg(Arg::new("order-by").long("order-by").value_name("ORDER_BY")
2279                .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"))
2280            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2281                .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"))
2282            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2283                .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"))
2284            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
2285                .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`"))
2286            .arg(Arg::new("use-admin-access").long("use-admin-access").action(ArgAction::SetTrue)
2287                .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"))
2288            .args(escape_hatch_args())
2289    }
2290
2291    // chat.spaces.setup
2292    fn leaf_chat_spaces_setup() -> Command {
2293        Command::new("chat.spaces.setup")
2294            .visible_alias("setup")
2295            .about("Creates a space and adds specified users to it. The calling user is automatically added to the...")
2296            .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")
2297            .args(escape_hatch_args())
2298    }
2299
2300    // chat.spaces.spaceEvents.get
2301    fn leaf_chat_spaces_space_events_get() -> Command {
2302        Command::new("chat.spaces.spaceEvents.get")
2303            .visible_alias("get")
2304            .about("Returns an event from a Google Chat space. The event payload contains the most recent version of...")
2305            .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")
2306            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2307                .help("Required. The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`"))
2308            .args(escape_hatch_args())
2309    }
2310
2311    // chat.spaces.spaceEvents.list
2312    fn leaf_chat_spaces_space_events_list() -> Command {
2313        Command::new("chat.spaces.spaceEvents.list")
2314            .visible_alias("list")
2315            .about("Lists events from a Google Chat space. For each event, the payload contains the most recent version...")
2316            .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,")
2317            .arg(Arg::new("filter").long("filter").value_name("FILTER")
2318                .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"))
2319            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2320                .help("Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error."))
2321            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2322                .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"))
2323            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2324                .help("Required. Resource name of the Google Chat space where the events occurred. Format:"))
2325            .args(escape_hatch_args())
2326    }
2327
2328    // chat.spaces.spaceEvents
2329    fn group_chat_spaces_space_events() -> Command {
2330        Command::new("spaceEvents")
2331            .about("Methods under chat.spaces.spaceEvents")
2332            .subcommand_required(true)
2333            .subcommand(leaf_chat_spaces_space_events_get())
2334            .subcommand(leaf_chat_spaces_space_events_list())
2335    }
2336
2337    // chat.spaces
2338    fn group_chat_spaces() -> Command {
2339        Command::new("spaces")
2340            .about("Methods under chat.spaces")
2341            .subcommand_required(true)
2342            .subcommand(leaf_chat_spaces_complete_import())
2343            .subcommand(leaf_chat_spaces_create())
2344            .subcommand(leaf_chat_spaces_delete())
2345            .subcommand(leaf_chat_spaces_find_direct_message())
2346            .subcommand(leaf_chat_spaces_find_group_chats())
2347            .subcommand(leaf_chat_spaces_get())
2348            .subcommand(leaf_chat_spaces_list())
2349            .subcommand(group_chat_spaces_members())
2350            .subcommand(group_chat_spaces_message_pins())
2351            .subcommand(group_chat_spaces_messages())
2352            .subcommand(leaf_chat_spaces_patch())
2353            .subcommand(leaf_chat_spaces_search())
2354            .subcommand(leaf_chat_spaces_setup())
2355            .subcommand(group_chat_spaces_space_events())
2356    }
2357
2358    // chat.users.availability.get
2359    fn leaf_chat_users_availability_get() -> Command {
2360        Command::new("chat.users.availability.get")
2361            .visible_alias("get")
2362            .about("Returns availability information for a human user in Google Chat. For example, this can be used to...")
2363            .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")
2364            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2365                .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"))
2366            .args(escape_hatch_args())
2367    }
2368
2369    // chat.users.availability.markAsActive
2370    fn leaf_chat_users_availability_mark_as_active() -> Command {
2371        Command::new("chat.users.availability.markAsActive")
2372            .visible_alias("markAsActive")
2373            .about("Marks user as `ACTIVE` in Google Chat. Sets the user's availability state to `ACTIVE`. The `ACTIVE`...")
2374            .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")
2375            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2376                .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"))
2377            .args(escape_hatch_args())
2378    }
2379
2380    // chat.users.availability.markAsAway
2381    fn leaf_chat_users_availability_mark_as_away() -> Command {
2382        Command::new("chat.users.availability.markAsAway")
2383            .visible_alias("markAsAway")
2384            .about("Marks user as `AWAY` in Google Chat. Sets the user's state to away and is not affected by the...")
2385            .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")
2386            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2387                .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"))
2388            .args(escape_hatch_args())
2389    }
2390
2391    // chat.users.availability.markAsDoNotDisturb
2392    fn leaf_chat_users_availability_mark_as_do_not_disturb() -> Command {
2393        Command::new("chat.users.availability.markAsDoNotDisturb")
2394            .visible_alias("markAsDoNotDisturb")
2395            .about("Marks user as `DO_NOT_DISTURB` in Google Chat. Sets a user's availability state to `DO_NOT_DISTURB`...")
2396            .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]")
2397            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2398                .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"))
2399            .args(escape_hatch_args())
2400    }
2401
2402    // chat.users.availability.patch
2403    fn leaf_chat_users_availability_patch() -> Command {
2404        Command::new("chat.users.availability.patch")
2405            .visible_alias("patch")
2406            .about("Updates availability information for a human user. Only the `custom_status` field can be updated...")
2407            .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")
2408            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2409                .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"))
2410            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2411                .help("Required. The list of fields to update. The only field that can be updated is `custom_status`."))
2412            .args(escape_hatch_args())
2413    }
2414
2415    // chat.users.availability
2416    fn group_chat_users_availability() -> Command {
2417        Command::new("availability")
2418            .about("Methods under chat.users.availability")
2419            .subcommand_required(true)
2420            .subcommand(leaf_chat_users_availability_get())
2421            .subcommand(leaf_chat_users_availability_mark_as_active())
2422            .subcommand(leaf_chat_users_availability_mark_as_away())
2423            .subcommand(leaf_chat_users_availability_mark_as_do_not_disturb())
2424            .subcommand(leaf_chat_users_availability_patch())
2425    }
2426
2427    // chat.users.sections.create
2428    fn leaf_chat_users_sections_create() -> Command {
2429        Command::new("chat.users.sections.create")
2430            .visible_alias("create")
2431            .about("Creates a section in Google Chat. Sections help users group conversations and customize the list of...")
2432            .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/")
2433            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2434                .help("Required. The parent resource name where the section is created. Format: `users/{user}`"))
2435            .args(escape_hatch_args())
2436    }
2437
2438    // chat.users.sections.delete
2439    fn leaf_chat_users_sections_delete() -> Command {
2440        Command::new("chat.users.sections.delete")
2441            .visible_alias("delete")
2442            .about("Deletes a section of type `CUSTOM_SECTION`. If the section contains items, such as spaces, the...")
2443            .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")
2444            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2445                .help("Required. The name of the section to delete. Format: `users/{user}/sections/{section}`"))
2446            .args(escape_hatch_args())
2447    }
2448
2449    // chat.users.sections.items.list
2450    fn leaf_chat_users_sections_items_list() -> Command {
2451        Command::new("chat.users.sections.items.list")
2452            .visible_alias("list")
2453            .about("Lists items in a section. Only spaces can be section items. For details, see Create and organize...")
2454            .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")
2455            .arg(Arg::new("filter").long("filter").value_name("FILTER")
2456                .help("Optional. A query filter. Currently only supports filtering by space. For example, `space = spaces/{space}`. Invalid queries are rejected with an `INVALID_ARGUM"))
2457            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2458                .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"))
2459            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2460                .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"))
2461            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2462                .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"))
2463            .args(escape_hatch_args())
2464    }
2465
2466    // chat.users.sections.items.move
2467    fn leaf_chat_users_sections_items_move() -> Command {
2468        Command::new("chat.users.sections.items.move")
2469            .visible_alias("move")
2470            .about("Moves an item from one section to another. For example, if a section contains spaces, this method...")
2471            .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:")
2472            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2473                .help("Required. The resource name of the section item to move. Format: `users/{user}/sections/{section}/items/{item}`"))
2474            .args(escape_hatch_args())
2475    }
2476
2477    // chat.users.sections.items
2478    fn group_chat_users_sections_items() -> Command {
2479        Command::new("items")
2480            .about("Methods under chat.users.sections.items")
2481            .subcommand_required(true)
2482            .subcommand(leaf_chat_users_sections_items_list())
2483            .subcommand(leaf_chat_users_sections_items_move())
2484    }
2485
2486    // chat.users.sections.list
2487    fn leaf_chat_users_sections_list() -> Command {
2488        Command::new("chat.users.sections.list")
2489            .visible_alias("list")
2490            .about("Lists sections available to the Chat user. Sections help users group their conversations and...")
2491            .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")
2492            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2493                .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"))
2494            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2495                .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"))
2496            .arg(Arg::new("parent").long("parent").value_name("PARENT").required(true)
2497                .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"))
2498            .args(escape_hatch_args())
2499    }
2500
2501    // chat.users.sections.patch
2502    fn leaf_chat_users_sections_patch() -> Command {
2503        Command::new("chat.users.sections.patch")
2504            .visible_alias("patch")
2505            .about("Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. For details, see Create...")
2506            .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")
2507            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2508                .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"))
2509            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2510                .help("Required. The mask to specify which fields to update. Currently supported field paths: - `display_name`"))
2511            .args(escape_hatch_args())
2512    }
2513
2514    // chat.users.sections.position
2515    fn leaf_chat_users_sections_position() -> Command {
2516        Command::new("chat.users.sections.position")
2517            .visible_alias("position")
2518            .about("Changes the sort order of a section. For details, see Create and organize sections in Google Chat...")
2519            .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")
2520            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2521                .help("Required. The resource name of the section to position. Format: `users/{user}/sections/{section}`"))
2522            .args(escape_hatch_args())
2523    }
2524
2525    // chat.users.sections
2526    fn group_chat_users_sections() -> Command {
2527        Command::new("sections")
2528            .about("Methods under chat.users.sections")
2529            .subcommand_required(true)
2530            .subcommand(leaf_chat_users_sections_create())
2531            .subcommand(leaf_chat_users_sections_delete())
2532            .subcommand(group_chat_users_sections_items())
2533            .subcommand(leaf_chat_users_sections_list())
2534            .subcommand(leaf_chat_users_sections_patch())
2535            .subcommand(leaf_chat_users_sections_position())
2536    }
2537
2538    // chat.users.spaces.getSpaceReadState
2539    fn leaf_chat_users_spaces_get_space_read_state() -> Command {
2540        Command::new("chat.users.spaces.getSpaceReadState")
2541            .visible_alias("getSpaceReadState")
2542            .about("Returns details about a user's read state within a space, used to identify read and unread...")
2543            .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")
2544            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2545                .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"))
2546            .args(escape_hatch_args())
2547    }
2548
2549    // chat.users.spaces.spaceNotificationSetting.get
2550    fn leaf_chat_users_spaces_space_notification_setting_get() -> Command {
2551        Command::new("chat.users.spaces.spaceNotificationSetting.get")
2552            .visible_alias("get")
2553            .about("Gets the space notification setting. For an example, see Get the caller's space notification...")
2554            .long_about("Gets the space notification setting. For an example, see Get the caller's space notification setting. Requires user authentication with the")
2555            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2556                .help("Required. Format: users/{user}/spaces/{space}/spaceNotificationSetting - `users/me/spaces/{space}/spaceNotificationSetting`, OR - `users/user@example.com/spaces"))
2557            .args(escape_hatch_args())
2558    }
2559
2560    // chat.users.spaces.spaceNotificationSetting.patch
2561    fn leaf_chat_users_spaces_space_notification_setting_patch() -> Command {
2562        Command::new("chat.users.spaces.spaceNotificationSetting.patch")
2563            .visible_alias("patch")
2564            .about("Updates the space notification setting. For an example, see Update the caller's space notification...")
2565            .long_about("Updates the space notification setting. For an example, see Update the caller's space notification setting. Requires user authentication")
2566            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2567                .help("Identifier. The resource name of the space notification setting. Format: `users/{user}/spaces/{space}/spaceNotificationSetting`."))
2568            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2569                .help("Required. Supported field paths: - `notification_setting` - `mute_setting`"))
2570            .args(escape_hatch_args())
2571    }
2572
2573    // chat.users.spaces.spaceNotificationSetting
2574    fn group_chat_users_spaces_space_notification_setting() -> Command {
2575        Command::new("spaceNotificationSetting")
2576            .about("Methods under chat.users.spaces.spaceNotificationSetting")
2577            .subcommand_required(true)
2578            .subcommand(leaf_chat_users_spaces_space_notification_setting_get())
2579            .subcommand(leaf_chat_users_spaces_space_notification_setting_patch())
2580    }
2581
2582    // chat.users.spaces.threads.getThreadReadState
2583    fn leaf_chat_users_spaces_threads_get_thread_read_state() -> Command {
2584        Command::new("chat.users.spaces.threads.getThreadReadState")
2585            .visible_alias("getThreadReadState")
2586            .about("Returns details about a user's read state within a thread, used to identify read and unread...")
2587            .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")
2588            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2589                .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"))
2590            .args(escape_hatch_args())
2591    }
2592
2593    // chat.users.spaces.threads
2594    fn group_chat_users_spaces_threads() -> Command {
2595        Command::new("threads")
2596            .about("Methods under chat.users.spaces.threads")
2597            .subcommand_required(true)
2598            .subcommand(leaf_chat_users_spaces_threads_get_thread_read_state())
2599    }
2600
2601    // chat.users.spaces.updateSpaceReadState
2602    fn leaf_chat_users_spaces_update_space_read_state() -> Command {
2603        Command::new("chat.users.spaces.updateSpaceReadState")
2604            .visible_alias("updateSpaceReadState")
2605            .about("Updates a user's read state within a space, used to identify read and unread messages. For an...")
2606            .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")
2607            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
2608                .help("Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`"))
2609            .arg(Arg::new("update-mask").long("update-mask").value_name("UPDATE_MASK")
2610                .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"))
2611            .args(escape_hatch_args())
2612    }
2613
2614    // chat.users.spaces
2615    fn group_chat_users_spaces() -> Command {
2616        Command::new("spaces")
2617            .about("Methods under chat.users.spaces")
2618            .subcommand_required(true)
2619            .subcommand(leaf_chat_users_spaces_get_space_read_state())
2620            .subcommand(group_chat_users_spaces_space_notification_setting())
2621            .subcommand(group_chat_users_spaces_threads())
2622            .subcommand(leaf_chat_users_spaces_update_space_read_state())
2623    }
2624
2625    // chat.users
2626    fn group_chat_users() -> Command {
2627        Command::new("users")
2628            .about("Methods under chat.users")
2629            .subcommand_required(true)
2630            .subcommand(group_chat_users_availability())
2631            .subcommand(group_chat_users_sections())
2632            .subcommand(group_chat_users_spaces())
2633    }
2634
2635    // chat
2636    fn service_chat() -> Command {
2637        Command::new("chat")
2638            .about("Google Chat API operations (v1, 55 methods)")
2639            .subcommand_required(true)
2640            .subcommand(group_chat_custom_emojis())
2641            .subcommand(group_chat_media())
2642            .subcommand(group_chat_spaces())
2643            .subcommand(group_chat_users())
2644    }
2645
2646    // docs.documents.batchUpdate
2647    fn leaf_docs_documents_batch_update() -> Command {
2648        Command::new("docs.documents.batchUpdate")
2649            .visible_alias("batchUpdate")
2650            .about("Applies one or more updates to the document. Each request is validated before being applied. If any...")
2651            .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")
2652            .arg(Arg::new("document-id").long("document-id").value_name("DOCUMENT_ID").required(true)
2653                .help("The ID of the document to update."))
2654            .args(escape_hatch_args())
2655    }
2656
2657    // docs.documents.create
2658    fn leaf_docs_documents_create() -> Command {
2659        Command::new("docs.documents.create")
2660            .visible_alias("create")
2661            .about("Creates a blank document using the title given in the request. Other fields in the request...")
2662            .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.")
2663            .args(escape_hatch_args())
2664    }
2665
2666    // docs.documents.get
2667    fn leaf_docs_documents_get() -> Command {
2668        Command::new("docs.documents.get")
2669            .visible_alias("get")
2670            .about("Gets the latest version of the specified document.")
2671            .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"])
2672                .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"))
2673            .arg(Arg::new("document-id").long("document-id").value_name("DOCUMENT_ID").required(true)
2674                .help("The ID of the document to retrieve."))
2675            .arg(Arg::new("include-tabs-content").long("include-tabs-content").action(ArgAction::SetTrue)
2676                .help("Whether to populate the `Document.tabs` field instead of the text content fields like `body` and `documentStyle` on `Document`. - When `true`: Document content"))
2677            .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"])
2678                .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,"))
2679            .args(escape_hatch_args())
2680    }
2681
2682    // docs.documents
2683    fn group_docs_documents() -> Command {
2684        Command::new("documents")
2685            .about("Methods under docs.documents")
2686            .subcommand_required(true)
2687            .subcommand(leaf_docs_documents_batch_update())
2688            .subcommand(leaf_docs_documents_create())
2689            .subcommand(leaf_docs_documents_get())
2690    }
2691
2692    // docs
2693    fn service_docs() -> Command {
2694        Command::new("docs")
2695            .about("Google Docs API operations (v1, 3 methods)")
2696            .subcommand_required(true)
2697            .subcommand(group_docs_documents())
2698    }
2699
2700    // drive.about.get
2701    fn leaf_drive_about_get() -> Command {
2702        Command::new("drive.about.get")
2703            .visible_alias("get")
2704            .about("Gets information about the user, the user's Drive, and system capabilities. For more information...")
2705            .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")
2706            .args(escape_hatch_args())
2707    }
2708
2709    // drive.about
2710    fn group_drive_about() -> Command {
2711        Command::new("about")
2712            .about("Methods under drive.about")
2713            .subcommand_required(true)
2714            .subcommand(leaf_drive_about_get())
2715    }
2716
2717    // drive.accessproposals.get
2718    fn leaf_drive_accessproposals_get() -> Command {
2719        Command::new("drive.accessproposals.get")
2720            .visible_alias("get")
2721            .about("Retrieves an access proposal by ID. For more information, see Manage pending access proposals.")
2722            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2723                .help("Required. The ID of the item the request is on."))
2724            .arg(Arg::new("proposal-id").long("proposal-id").value_name("PROPOSAL_ID").required(true)
2725                .help("Required. The ID of the access proposal to resolve."))
2726            .args(escape_hatch_args())
2727    }
2728
2729    // drive.accessproposals.list
2730    fn leaf_drive_accessproposals_list() -> Command {
2731        Command::new("drive.accessproposals.list")
2732            .visible_alias("list")
2733            .about("List the access proposals on a file. For more information, see Manage pending access proposals...")
2734            .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.")
2735            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2736                .help("Required. The ID of the item the request is on."))
2737            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2738                .help("Optional. The number of results per page."))
2739            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2740                .help("Optional. The continuation token on the list of access requests."))
2741            .args(escape_hatch_args())
2742    }
2743
2744    // drive.accessproposals.resolve
2745    fn leaf_drive_accessproposals_resolve() -> Command {
2746        Command::new("drive.accessproposals.resolve")
2747            .visible_alias("resolve")
2748            .about("Approves or denies an access proposal. For more information, see Manage pending access proposals.")
2749            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2750                .help("Required. The ID of the item the request is on."))
2751            .arg(Arg::new("proposal-id").long("proposal-id").value_name("PROPOSAL_ID").required(true)
2752                .help("Required. The ID of the access proposal to resolve."))
2753            .args(escape_hatch_args())
2754    }
2755
2756    // drive.accessproposals
2757    fn group_drive_accessproposals() -> Command {
2758        Command::new("accessproposals")
2759            .about("Methods under drive.accessproposals")
2760            .subcommand_required(true)
2761            .subcommand(leaf_drive_accessproposals_get())
2762            .subcommand(leaf_drive_accessproposals_list())
2763            .subcommand(leaf_drive_accessproposals_resolve())
2764    }
2765
2766    // drive.approvals.approve
2767    fn leaf_drive_approvals_approve() -> Command {
2768        Command::new("drive.approvals.approve")
2769            .visible_alias("approve")
2770            .about("Approves an approval. For more information, see Manage approvals. This is used to update the...")
2771            .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")
2772            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2773                .help("Required. The ID of the approval to approve."))
2774            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2775                .help("Required. The ID of the file that the approval is on."))
2776            .args(escape_hatch_args())
2777    }
2778
2779    // drive.approvals.cancel
2780    fn leaf_drive_approvals_cancel() -> Command {
2781        Command::new("drive.approvals.cancel")
2782            .visible_alias("cancel")
2783            .about("Cancels an approval. For more information, see Manage approvals. Updates the approval Status to...")
2784            .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`.")
2785            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2786                .help("Required. The ID of the approval to cancel."))
2787            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2788                .help("Required. The ID of the file that the approval is on."))
2789            .args(escape_hatch_args())
2790    }
2791
2792    // drive.approvals.comment
2793    fn leaf_drive_approvals_comment() -> Command {
2794        Command::new("drive.approvals.comment")
2795            .visible_alias("comment")
2796            .about("Comments on an approval. For more information, see Manage approvals. This sends a notification to...")
2797            .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.")
2798            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2799                .help("Required. The ID of the approval to comment on."))
2800            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2801                .help("Required. The ID of the file that the approval is on."))
2802            .args(escape_hatch_args())
2803    }
2804
2805    // drive.approvals.decline
2806    fn leaf_drive_approvals_decline() -> Command {
2807        Command::new("drive.approvals.decline")
2808            .visible_alias("decline")
2809            .about("Declines an approval. For more information, see Manage approvals. This is used to update the...")
2810            .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 `")
2811            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2812                .help("Required. The ID of the approval to decline."))
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.get
2819    fn leaf_drive_approvals_get() -> Command {
2820        Command::new("drive.approvals.get")
2821            .visible_alias("get")
2822            .about("Gets an approval by ID. For more information, see Manage approvals.")
2823            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2824                .help("Required. The ID of the approval."))
2825            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2826                .help("Required. The ID of the file that the approval is on."))
2827            .args(escape_hatch_args())
2828    }
2829
2830    // drive.approvals.list
2831    fn leaf_drive_approvals_list() -> Command {
2832        Command::new("drive.approvals.list")
2833            .visible_alias("list")
2834            .about("Lists the approvals on a file. For more information, see Manage approvals. By default, this method...")
2835            .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")
2836            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2837                .help("Required. The ID of the file that the approval is on."))
2838            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2839                .help("The maximum number of approvals to return. When not set, at most 100 approvals are returned."))
2840            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
2841                .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."))
2842            .args(escape_hatch_args())
2843    }
2844
2845    // drive.approvals.reassign
2846    fn leaf_drive_approvals_reassign() -> Command {
2847        Command::new("drive.approvals.reassign")
2848            .visible_alias("reassign")
2849            .about("Reassigns the reviewers on an approval. For more information, see Manage approvals. Adds or...")
2850            .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")
2851            .arg(Arg::new("approval-id").long("approval-id").value_name("APPROVAL_ID").required(true)
2852                .help("Required. The ID of the approval to reassign."))
2853            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2854                .help("Required. The ID of the file that the approval is on."))
2855            .args(escape_hatch_args())
2856    }
2857
2858    // drive.approvals.start
2859    fn leaf_drive_approvals_start() -> Command {
2860        Command::new("drive.approvals.start")
2861            .visible_alias("start")
2862            .about("Starts an approval on a file. For more information, see Manage approvals.")
2863            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
2864                .help("Required. The ID of the file that the approval is created on."))
2865            .args(escape_hatch_args())
2866    }
2867
2868    // drive.approvals
2869    fn group_drive_approvals() -> Command {
2870        Command::new("approvals")
2871            .about("Methods under drive.approvals")
2872            .subcommand_required(true)
2873            .subcommand(leaf_drive_approvals_approve())
2874            .subcommand(leaf_drive_approvals_cancel())
2875            .subcommand(leaf_drive_approvals_comment())
2876            .subcommand(leaf_drive_approvals_decline())
2877            .subcommand(leaf_drive_approvals_get())
2878            .subcommand(leaf_drive_approvals_list())
2879            .subcommand(leaf_drive_approvals_reassign())
2880            .subcommand(leaf_drive_approvals_start())
2881    }
2882
2883    // drive.apps.get
2884    fn leaf_drive_apps_get() -> Command {
2885        Command::new("drive.apps.get")
2886            .visible_alias("get")
2887            .about("Gets a specific app. For more information, see Return user info.")
2888            .arg(Arg::new("app-id").long("app-id").value_name("APP_ID").required(true)
2889                .help("The ID of the app."))
2890            .args(escape_hatch_args())
2891    }
2892
2893    // drive.apps.list
2894    fn leaf_drive_apps_list() -> Command {
2895        Command::new("drive.apps.list")
2896            .visible_alias("list")
2897            .about("Lists a user's installed apps. For more information, see Return user info.")
2898            .arg(Arg::new("app-filter-extensions").long("app-filter-extensions").value_name("APP_FILTER_EXTENSIONS")
2899                .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"))
2900            .arg(Arg::new("app-filter-mime-types").long("app-filter-mime-types").value_name("APP_FILTER_MIME_TYPES")
2901                .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"))
2902            .arg(Arg::new("language-code").long("language-code").value_name("LANGUAGE_CODE")
2903                .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/)."))
2904            .args(escape_hatch_args())
2905    }
2906
2907    // drive.apps
2908    fn group_drive_apps() -> Command {
2909        Command::new("apps")
2910            .about("Methods under drive.apps")
2911            .subcommand_required(true)
2912            .subcommand(leaf_drive_apps_get())
2913            .subcommand(leaf_drive_apps_list())
2914    }
2915
2916    // drive.changes.getStartPageToken
2917    fn leaf_drive_changes_get_start_page_token() -> Command {
2918        Command::new("drive.changes.getStartPageToken")
2919            .visible_alias("getStartPageToken")
2920            .about("Gets the starting pageToken for listing future changes. For more information, see Retrieve changes.")
2921            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
2922                .help("The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned."))
2923            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
2924                .help("Whether the requesting application supports both My Drives and shared drives."))
2925            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
2926                .help("Deprecated: Use `supportsAllDrives` instead."))
2927            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
2928                .help("Deprecated: Use `driveId` instead."))
2929            .args(escape_hatch_args())
2930    }
2931
2932    // drive.changes.list
2933    fn leaf_drive_changes_list() -> Command {
2934        Command::new("drive.changes.list")
2935            .visible_alias("list")
2936            .about("Lists the changes for a user or shared drive. For more information, see Retrieve changes.")
2937            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
2938                .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"))
2939            .arg(Arg::new("include-corpus-removals").long("include-corpus-removals").action(ArgAction::SetTrue)
2940                .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"))
2941            .arg(Arg::new("include-items-from-all-drives").long("include-items-from-all-drives").action(ArgAction::SetTrue)
2942                .help("Whether both My Drive and shared drive items should be included in results."))
2943            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
2944                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
2945            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
2946                .help("Specifies which additional view's permissions to include in the response. Only 'published' is supported."))
2947            .arg(Arg::new("include-removed").long("include-removed").action(ArgAction::SetTrue)
2948                .help("Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access."))
2949            .arg(Arg::new("include-team-drive-items").long("include-team-drive-items").action(ArgAction::SetTrue)
2950                .help("Deprecated: Use `includeItemsFromAllDrives` instead."))
2951            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2952                .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"))
2953            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN").required(true)
2954                .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"))
2955            .arg(Arg::new("restrict-to-my-drive").long("restrict-to-my-drive").action(ArgAction::SetTrue)
2956                .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"))
2957            .arg(Arg::new("spaces").long("spaces").value_name("SPACES")
2958                .help("A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'."))
2959            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
2960                .help("Whether the requesting application supports both My Drives and shared drives."))
2961            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
2962                .help("Deprecated: Use `supportsAllDrives` instead."))
2963            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
2964                .help("Deprecated: Use `driveId` instead."))
2965            .args(escape_hatch_args())
2966    }
2967
2968    // drive.changes.watch
2969    fn leaf_drive_changes_watch() -> Command {
2970        Command::new("drive.changes.watch")
2971            .visible_alias("watch")
2972            .about("Subscribes to changes for a user. For more information, see Notifications for resource changes.")
2973            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
2974                .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"))
2975            .arg(Arg::new("include-corpus-removals").long("include-corpus-removals").action(ArgAction::SetTrue)
2976                .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"))
2977            .arg(Arg::new("include-items-from-all-drives").long("include-items-from-all-drives").action(ArgAction::SetTrue)
2978                .help("Whether both My Drive and shared drive items should be included in results."))
2979            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
2980                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
2981            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
2982                .help("Specifies which additional view's permissions to include in the response. Only 'published' is supported."))
2983            .arg(Arg::new("include-removed").long("include-removed").action(ArgAction::SetTrue)
2984                .help("Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access."))
2985            .arg(Arg::new("include-team-drive-items").long("include-team-drive-items").action(ArgAction::SetTrue)
2986                .help("Deprecated: Use `includeItemsFromAllDrives` instead."))
2987            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
2988                .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"))
2989            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN").required(true)
2990                .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"))
2991            .arg(Arg::new("restrict-to-my-drive").long("restrict-to-my-drive").action(ArgAction::SetTrue)
2992                .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"))
2993            .arg(Arg::new("spaces").long("spaces").value_name("SPACES")
2994                .help("A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'."))
2995            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
2996                .help("Whether the requesting application supports both My Drives and shared drives."))
2997            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
2998                .help("Deprecated: Use `supportsAllDrives` instead."))
2999            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
3000                .help("Deprecated: Use `driveId` instead."))
3001            .args(escape_hatch_args())
3002    }
3003
3004    // drive.changes
3005    fn group_drive_changes() -> Command {
3006        Command::new("changes")
3007            .about("Methods under drive.changes")
3008            .subcommand_required(true)
3009            .subcommand(leaf_drive_changes_get_start_page_token())
3010            .subcommand(leaf_drive_changes_list())
3011            .subcommand(leaf_drive_changes_watch())
3012    }
3013
3014    // drive.channels.stop
3015    fn leaf_drive_channels_stop() -> Command {
3016        Command::new("drive.channels.stop")
3017            .visible_alias("stop")
3018            .about("Stops watching resources through this channel. For more information, see Notifications for resource...")
3019            .long_about("Stops watching resources through this channel. For more information, see Notifications for resource changes.")
3020            .args(escape_hatch_args())
3021    }
3022
3023    // drive.channels
3024    fn group_drive_channels() -> Command {
3025        Command::new("channels")
3026            .about("Methods under drive.channels")
3027            .subcommand_required(true)
3028            .subcommand(leaf_drive_channels_stop())
3029    }
3030
3031    // drive.comments.create
3032    fn leaf_drive_comments_create() -> Command {
3033        Command::new("drive.comments.create")
3034            .visible_alias("create")
3035            .about("Creates a comment on a file. For more information, see Manage comments and replies. Required: The...")
3036            .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")
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.delete
3043    fn leaf_drive_comments_delete() -> Command {
3044        Command::new("drive.comments.delete")
3045            .visible_alias("delete")
3046            .about("Deletes a comment. For more information, see Manage comments and replies.")
3047            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3048                .help("The ID of the comment."))
3049            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3050                .help("The ID of the file."))
3051            .args(escape_hatch_args())
3052    }
3053
3054    // drive.comments.get
3055    fn leaf_drive_comments_get() -> Command {
3056        Command::new("drive.comments.get")
3057            .visible_alias("get")
3058            .about("Gets a comment by ID. For more information, see Manage comments and replies. Required: The `fields`...")
3059            .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")
3060            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3061                .help("The ID of the comment."))
3062            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3063                .help("The ID of the file."))
3064            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3065                .help("Whether to return deleted comments. Deleted comments will not include their original content."))
3066            .args(escape_hatch_args())
3067    }
3068
3069    // drive.comments.list
3070    fn leaf_drive_comments_list() -> Command {
3071        Command::new("drive.comments.list")
3072            .visible_alias("list")
3073            .about("Lists a file's comments. For more information, see Manage comments and replies. Required: The...")
3074            .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")
3075            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3076                .help("The ID of the file."))
3077            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3078                .help("Whether to include deleted comments. Deleted comments will not include their original content."))
3079            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3080                .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"))
3081            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3082                .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."))
3083            .arg(Arg::new("start-modified-time").long("start-modified-time").value_name("START_MODIFIED_TIME")
3084                .help("The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time)."))
3085            .args(escape_hatch_args())
3086    }
3087
3088    // drive.comments.update
3089    fn leaf_drive_comments_update() -> Command {
3090        Command::new("drive.comments.update")
3091            .visible_alias("update")
3092            .about("Updates a comment with patch semantics. For more information, see Manage comments and replies...")
3093            .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")
3094            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3095                .help("The ID of the comment."))
3096            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3097                .help("The ID of the file."))
3098            .args(escape_hatch_args())
3099    }
3100
3101    // drive.comments
3102    fn group_drive_comments() -> Command {
3103        Command::new("comments")
3104            .about("Methods under drive.comments")
3105            .subcommand_required(true)
3106            .subcommand(leaf_drive_comments_create())
3107            .subcommand(leaf_drive_comments_delete())
3108            .subcommand(leaf_drive_comments_get())
3109            .subcommand(leaf_drive_comments_list())
3110            .subcommand(leaf_drive_comments_update())
3111    }
3112
3113    // drive.drives.create
3114    fn leaf_drive_drives_create() -> Command {
3115        Command::new("drive.drives.create")
3116            .visible_alias("create")
3117            .about("Creates a shared drive. For more information, see Manage shared drives.")
3118            .arg(Arg::new("request-id").long("request-id").value_name("REQUEST_ID").required(true)
3119                .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"))
3120            .args(escape_hatch_args())
3121    }
3122
3123    // drive.drives.delete
3124    fn leaf_drive_drives_delete() -> Command {
3125        Command::new("drive.drives.delete")
3126            .visible_alias("delete")
3127            .about("Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot...")
3128            .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.")
3129            .arg(Arg::new("allow-item-deletion").long("allow-item-deletion").action(ArgAction::SetTrue)
3130                .help("Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`."))
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.get
3139    fn leaf_drive_drives_get() -> Command {
3140        Command::new("drive.drives.get")
3141            .visible_alias("get")
3142            .about("Gets a shared drive's metadata by ID. 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            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3146                .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"))
3147            .args(escape_hatch_args())
3148    }
3149
3150    // drive.drives.hide
3151    fn leaf_drive_drives_hide() -> Command {
3152        Command::new("drive.drives.hide")
3153            .visible_alias("hide")
3154            .about("Hides a shared drive from the default view. For more information, see Manage shared drives.")
3155            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3156                .help("The ID of the shared drive."))
3157            .args(escape_hatch_args())
3158    }
3159
3160    // drive.drives.list
3161    fn leaf_drive_drives_list() -> Command {
3162        Command::new("drive.drives.list")
3163            .visible_alias("list")
3164            .about("Lists the user's shared drives. This method accepts the `q` parameter, which is a search query...")
3165            .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.")
3166            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3167                .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"))
3168            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3169                .help("Page token for shared drives."))
3170            .arg(Arg::new("q").long("q").value_name("Q")
3171                .help("Query string for searching shared drives."))
3172            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3173                .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."))
3174            .args(escape_hatch_args())
3175    }
3176
3177    // drive.drives.unhide
3178    fn leaf_drive_drives_unhide() -> Command {
3179        Command::new("drive.drives.unhide")
3180            .visible_alias("unhide")
3181            .about("Restores a shared drive to the default view. For more information, see Manage shared drives.")
3182            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3183                .help("The ID of the shared drive."))
3184            .args(escape_hatch_args())
3185    }
3186
3187    // drive.drives.update
3188    fn leaf_drive_drives_update() -> Command {
3189        Command::new("drive.drives.update")
3190            .visible_alias("update")
3191            .about("Updates the metadata for a shared drive. For more information, see Manage shared drives.")
3192            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID").required(true)
3193                .help("The ID of the shared drive."))
3194            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3195                .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"))
3196            .args(escape_hatch_args())
3197    }
3198
3199    // drive.drives
3200    fn group_drive_drives() -> Command {
3201        Command::new("drives")
3202            .about("Methods under drive.drives")
3203            .subcommand_required(true)
3204            .subcommand(leaf_drive_drives_create())
3205            .subcommand(leaf_drive_drives_delete())
3206            .subcommand(leaf_drive_drives_get())
3207            .subcommand(leaf_drive_drives_hide())
3208            .subcommand(leaf_drive_drives_list())
3209            .subcommand(leaf_drive_drives_unhide())
3210            .subcommand(leaf_drive_drives_update())
3211    }
3212
3213    // drive.files.copy
3214    fn leaf_drive_files_copy() -> Command {
3215        Command::new("drive.files.copy")
3216            .visible_alias("copy")
3217            .about("Creates a copy of a file and applies any requested updates with patch semantics. For more...")
3218            .long_about("Creates a copy of a file and applies any requested updates with patch semantics. For more information, see Create and manage files.")
3219            .arg(Arg::new("copy-comments").long("copy-comments").action(ArgAction::SetTrue)
3220                .help("Whether to copy the open (unresolved) comments associated with the file."))
3221            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3222                .help("Deprecated: Copying files into multiple folders is no longer supported. Use shortcuts instead."))
3223            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3224                .help("The ID of the file."))
3225            .arg(Arg::new("ignore-default-visibility").long("ignore-default-visibility").action(ArgAction::SetTrue)
3226                .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"))
3227            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3228                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3229            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3230                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3231            .arg(Arg::new("keep-revision-forever").long("keep-revision-forever").action(ArgAction::SetTrue)
3232                .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"))
3233            .arg(Arg::new("ocr-language").long("ocr-language").value_name("OCR_LANGUAGE")
3234                .help("A language hint for OCR processing during image import (ISO 639-1 code)."))
3235            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3236                .help("Whether the requesting application supports both My Drives and shared drives."))
3237            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3238                .help("Deprecated: Use `supportsAllDrives` instead."))
3239            .args(escape_hatch_args())
3240    }
3241
3242    // drive.files.create
3243    fn leaf_drive_files_create() -> Command {
3244        Command::new("drive.files.create")
3245            .visible_alias("create")
3246            .about("Creates a file. For more information, see Create and manage files. This method supports an...")
3247            .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")
3248            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3249                .help("Deprecated: Creating files in multiple folders is no longer supported."))
3250            .arg(Arg::new("ignore-default-visibility").long("ignore-default-visibility").action(ArgAction::SetTrue)
3251                .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"))
3252            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3253                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3254            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3255                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3256            .arg(Arg::new("keep-revision-forever").long("keep-revision-forever").action(ArgAction::SetTrue)
3257                .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"))
3258            .arg(Arg::new("ocr-language").long("ocr-language").value_name("OCR_LANGUAGE")
3259                .help("A language hint for OCR processing during image import (ISO 639-1 code)."))
3260            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3261                .help("Whether the requesting application supports both My Drives and shared drives."))
3262            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3263                .help("Deprecated: Use `supportsAllDrives` instead."))
3264            .arg(Arg::new("use-content-as-indexable-text").long("use-content-as-indexable-text").action(ArgAction::SetTrue)
3265                .help("Whether to use the uploaded content as indexable text."))
3266            .args(escape_hatch_args())
3267    }
3268
3269    // drive.files.delete
3270    fn leaf_drive_files_delete() -> Command {
3271        Command::new("drive.files.delete")
3272            .visible_alias("delete")
3273            .about("Permanently deletes a file owned by the user without moving it to the trash. For more information...")
3274            .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")
3275            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3276                .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."))
3277            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3278                .help("The ID of the file."))
3279            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3280                .help("Whether the requesting application supports both My Drives and shared drives."))
3281            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3282                .help("Deprecated: Use `supportsAllDrives` instead."))
3283            .args(escape_hatch_args())
3284    }
3285
3286    // drive.files.download
3287    fn leaf_drive_files_download() -> Command {
3288        Command::new("drive.files.download")
3289            .visible_alias("download")
3290            .about("Downloads the content of a file. For more information, see Download and export files. Operations...")
3291            .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.")
3292            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3293                .help("Required. The ID of the file to download."))
3294            .arg(Arg::new("mime-type").long("mime-type").value_name("MIME_TYPE")
3295                .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"))
3296            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID")
3297                .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"))
3298            .args(escape_hatch_args())
3299    }
3300
3301    // drive.files.emptyTrash
3302    fn leaf_drive_files_empty_trash() -> Command {
3303        Command::new("drive.files.emptyTrash")
3304            .visible_alias("emptyTrash")
3305            .about("Permanently deletes all of the user's trashed files. For more information, see Trash or delete...")
3306            .long_about("Permanently deletes all of the user's trashed files. For more information, see Trash or delete files and folders.")
3307            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
3308                .help("If set, empties the trash of the provided shared drive."))
3309            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3310                .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."))
3311            .args(escape_hatch_args())
3312    }
3313
3314    // drive.files.export
3315    fn leaf_drive_files_export() -> Command {
3316        Command::new("drive.files.export")
3317            .visible_alias("export")
3318            .about("Exports a Google Workspace document to the requested MIME type and returns exported byte content...")
3319            .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.")
3320            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3321                .help("The ID of the file."))
3322            .arg(Arg::new("mime-type").long("mime-type").value_name("MIME_TYPE").required(true)
3323                .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"))
3324            .args(escape_hatch_args())
3325    }
3326
3327    // drive.files.generateCseToken
3328    fn leaf_drive_files_generate_cse_token() -> Command {
3329        Command::new("drive.files.generateCseToken")
3330            .visible_alias("generateCseToken")
3331            .about("Generates a CSE token which can be used to create or update CSE files.")
3332            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID")
3333                .help("The ID of the file for which the JWT should be generated. If not provided, an id will be generated."))
3334            .arg(Arg::new("parent").long("parent").value_name("PARENT")
3335                .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"))
3336            .args(escape_hatch_args())
3337    }
3338
3339    // drive.files.generateIds
3340    fn leaf_drive_files_generate_ids() -> Command {
3341        Command::new("drive.files.generateIds")
3342            .visible_alias("generateIds")
3343            .about("Generates a set of file IDs which can be provided in create or copy requests. For more information...")
3344            .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.")
3345            .arg(Arg::new("count").long("count").value_name("COUNT").value_parser(clap::value_parser!(i64))
3346                .help("The number of IDs to return."))
3347            .arg(Arg::new("space").long("space").value_name("SPACE")
3348                .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"))
3349            .arg(Arg::new("type").long("type").value_name("TYPE")
3350                .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`."))
3351            .args(escape_hatch_args())
3352    }
3353
3354    // drive.files.get
3355    fn leaf_drive_files_get() -> Command {
3356        Command::new("drive.files.get")
3357            .visible_alias("get")
3358            .about("Gets a file's metadata or content by ID. For more information, see Search for files and folders. If...")
3359            .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")
3360            .arg(Arg::new("acknowledge-abuse").long("acknowledge-abuse").action(ArgAction::SetTrue)
3361                .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"))
3362            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3363                .help("The ID of the file."))
3364            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3365                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3366            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3367                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3368            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3369                .help("Whether the requesting application supports both My Drives and shared drives."))
3370            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3371                .help("Deprecated: Use `supportsAllDrives` instead."))
3372            .args(escape_hatch_args())
3373    }
3374
3375    // drive.files.list
3376    fn leaf_drive_files_list() -> Command {
3377        Command::new("drive.files.list")
3378            .visible_alias("list")
3379            .about("Lists the user's files. For more information, see Search for files and folders. This method accepts...")
3380            .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")
3381            .arg(Arg::new("corpora").long("corpora").value_name("CORPORA")
3382                .help("Specifies a collection of items (files or documents) to which the query applies. Supported items include: * `user` * `domain` * `drive` * `allDrives` Prefer `us"))
3383            .arg(Arg::new("corpus").long("corpus").value_name("CORPUS").value_parser(["domain", "user"])
3384                .help("Deprecated: The source of files to list. Use `corpora` instead."))
3385            .arg(Arg::new("drive-id").long("drive-id").value_name("DRIVE_ID")
3386                .help("ID of the shared drive to search."))
3387            .arg(Arg::new("include-items-from-all-drives").long("include-items-from-all-drives").action(ArgAction::SetTrue)
3388                .help("Whether both My Drive and shared drive items should be included in results."))
3389            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3390                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3391            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3392                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3393            .arg(Arg::new("include-team-drive-items").long("include-team-drive-items").action(ArgAction::SetTrue)
3394                .help("Deprecated: Use `includeItemsFromAllDrives` instead."))
3395            .arg(Arg::new("order-by").long("order-by").value_name("ORDER_BY")
3396                .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"))
3397            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3398                .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"))
3399            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3400                .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."))
3401            .arg(Arg::new("q").long("q").value_name("Q")
3402                .help("A query for filtering the file results. For supported syntax, see Search for files and folders."))
3403            .arg(Arg::new("spaces").long("spaces").value_name("SPACES")
3404                .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"))
3405            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3406                .help("Whether the requesting application supports both My Drives and shared drives."))
3407            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3408                .help("Deprecated: Use `supportsAllDrives` instead."))
3409            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID")
3410                .help("Deprecated: Use `driveId` instead."))
3411            .args(escape_hatch_args())
3412    }
3413
3414    // drive.files.listLabels
3415    fn leaf_drive_files_list_labels() -> Command {
3416        Command::new("drive.files.listLabels")
3417            .visible_alias("listLabels")
3418            .about("Lists the labels on a file. For more information, see List labels on a file.")
3419            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3420                .help("The ID for the file."))
3421            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
3422                .help("The maximum number of labels to return per page. When not set, defaults to 100."))
3423            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3424                .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."))
3425            .args(escape_hatch_args())
3426    }
3427
3428    // drive.files.modifyLabels
3429    fn leaf_drive_files_modify_labels() -> Command {
3430        Command::new("drive.files.modifyLabels")
3431            .visible_alias("modifyLabels")
3432            .about("Modifies the set of labels applied to a file. For more information, see Set a label field on a...")
3433            .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.")
3434            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3435                .help("The ID of the file to which the labels belong."))
3436            .args(escape_hatch_args())
3437    }
3438
3439    // drive.files.update
3440    fn leaf_drive_files_update() -> Command {
3441        Command::new("drive.files.update")
3442            .visible_alias("update")
3443            .about("Updates a file's metadata, content, or both. When calling this method, only populate fields in the...")
3444            .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")
3445            .arg(Arg::new("add-parents").long("add-parents").value_name("ADD_PARENTS")
3446                .help("A comma-separated list of parent IDs to add."))
3447            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3448                .help("Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead."))
3449            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3450                .help("The ID of the file."))
3451            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3452                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3453            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3454                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3455            .arg(Arg::new("keep-revision-forever").long("keep-revision-forever").action(ArgAction::SetTrue)
3456                .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"))
3457            .arg(Arg::new("ocr-language").long("ocr-language").value_name("OCR_LANGUAGE")
3458                .help("A language hint for OCR processing during image import (ISO 639-1 code)."))
3459            .arg(Arg::new("remove-parents").long("remove-parents").value_name("REMOVE_PARENTS")
3460                .help("A comma-separated list of parent IDs to remove."))
3461            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3462                .help("Whether the requesting application supports both My Drives and shared drives."))
3463            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3464                .help("Deprecated: Use `supportsAllDrives` instead."))
3465            .arg(Arg::new("use-content-as-indexable-text").long("use-content-as-indexable-text").action(ArgAction::SetTrue)
3466                .help("Whether to use the uploaded content as indexable text."))
3467            .args(escape_hatch_args())
3468    }
3469
3470    // drive.files.watch
3471    fn leaf_drive_files_watch() -> Command {
3472        Command::new("drive.files.watch")
3473            .visible_alias("watch")
3474            .about("Subscribes to changes to a file. For more information, see Notifications for resource changes.")
3475            .arg(Arg::new("acknowledge-abuse").long("acknowledge-abuse").action(ArgAction::SetTrue)
3476                .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"))
3477            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3478                .help("The ID of the file."))
3479            .arg(Arg::new("include-labels").long("include-labels").value_name("INCLUDE_LABELS")
3480                .help("A comma-separated list of IDs of labels to include in the `labelInfo` part of the response."))
3481            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3482                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3483            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3484                .help("Whether the requesting application supports both My Drives and shared drives."))
3485            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3486                .help("Deprecated: Use `supportsAllDrives` instead."))
3487            .args(escape_hatch_args())
3488    }
3489
3490    // drive.files
3491    fn group_drive_files() -> Command {
3492        Command::new("files")
3493            .about("Methods under drive.files")
3494            .subcommand_required(true)
3495            .subcommand(leaf_drive_files_copy())
3496            .subcommand(leaf_drive_files_create())
3497            .subcommand(leaf_drive_files_delete())
3498            .subcommand(leaf_drive_files_download())
3499            .subcommand(leaf_drive_files_empty_trash())
3500            .subcommand(leaf_drive_files_export())
3501            .subcommand(leaf_drive_files_generate_cse_token())
3502            .subcommand(leaf_drive_files_generate_ids())
3503            .subcommand(leaf_drive_files_get())
3504            .subcommand(leaf_drive_files_list())
3505            .subcommand(leaf_drive_files_list_labels())
3506            .subcommand(leaf_drive_files_modify_labels())
3507            .subcommand(leaf_drive_files_update())
3508            .subcommand(leaf_drive_files_watch())
3509    }
3510
3511    // drive.operations.get
3512    fn leaf_drive_operations_get() -> Command {
3513        Command::new("drive.operations.get")
3514            .visible_alias("get")
3515            .about("Gets the latest state of a long-running operation. Clients can use this method to poll the...")
3516            .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.")
3517            .arg(Arg::new("name").long("name").value_name("NAME").required(true)
3518                .help("The name of the operation resource."))
3519            .args(escape_hatch_args())
3520    }
3521
3522    // drive.operations
3523    fn group_drive_operations() -> Command {
3524        Command::new("operations")
3525            .about("Methods under drive.operations")
3526            .subcommand_required(true)
3527            .subcommand(leaf_drive_operations_get())
3528    }
3529
3530    // drive.permissions.create
3531    fn leaf_drive_permissions_create() -> Command {
3532        Command::new("drive.permissions.create")
3533            .visible_alias("create")
3534            .about("Creates a permission for a file or shared drive. For more information, see Share files, folders...")
3535            .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")
3536            .arg(Arg::new("email-message").long("email-message").value_name("EMAIL_MESSAGE")
3537                .help("A plain text custom message to include in the notification email."))
3538            .arg(Arg::new("enforce-expansive-access").long("enforce-expansive-access").action(ArgAction::SetTrue)
3539                .help("Deprecated: All requests use the expansive access rules."))
3540            .arg(Arg::new("enforce-single-parent").long("enforce-single-parent").action(ArgAction::SetTrue)
3541                .help("Deprecated: See `moveToNewOwnersRoot` for details."))
3542            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3543                .help("The ID of the file or shared drive."))
3544            .arg(Arg::new("move-to-new-owners-root").long("move-to-new-owners-root").action(ArgAction::SetTrue)
3545                .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"))
3546            .arg(Arg::new("send-notification-email").long("send-notification-email").action(ArgAction::SetTrue)
3547                .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"))
3548            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3549                .help("Whether the requesting application supports both My Drives and shared drives."))
3550            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3551                .help("Deprecated: Use `supportsAllDrives` instead."))
3552            .arg(Arg::new("transfer-ownership").long("transfer-ownership").action(ArgAction::SetTrue)
3553                .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"))
3554            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3555                .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"))
3556            .args(escape_hatch_args())
3557    }
3558
3559    // drive.permissions.delete
3560    fn leaf_drive_permissions_delete() -> Command {
3561        Command::new("drive.permissions.delete")
3562            .visible_alias("delete")
3563            .about("Deletes a permission. For more information, see Share files, folders, and drives. **Warning:**...")
3564            .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")
3565            .arg(Arg::new("enforce-expansive-access").long("enforce-expansive-access").action(ArgAction::SetTrue)
3566                .help("Deprecated: All requests use the expansive access rules."))
3567            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3568                .help("The ID of the file or shared drive."))
3569            .arg(Arg::new("permission-id").long("permission-id").value_name("PERMISSION_ID").required(true)
3570                .help("The ID of the permission."))
3571            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3572                .help("Whether the requesting application supports both My Drives and shared drives."))
3573            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3574                .help("Deprecated: Use `supportsAllDrives` instead."))
3575            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3576                .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"))
3577            .args(escape_hatch_args())
3578    }
3579
3580    // drive.permissions.get
3581    fn leaf_drive_permissions_get() -> Command {
3582        Command::new("drive.permissions.get")
3583            .visible_alias("get")
3584            .about("Gets a permission by ID. For more information, see Share files, folders, and drives.")
3585            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3586                .help("The ID of the file."))
3587            .arg(Arg::new("permission-id").long("permission-id").value_name("PERMISSION_ID").required(true)
3588                .help("The ID of the permission."))
3589            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3590                .help("Whether the requesting application supports both My Drives and shared drives."))
3591            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3592                .help("Deprecated: Use `supportsAllDrives` instead."))
3593            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3594                .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"))
3595            .args(escape_hatch_args())
3596    }
3597
3598    // drive.permissions.list
3599    fn leaf_drive_permissions_list() -> Command {
3600        Command::new("drive.permissions.list")
3601            .visible_alias("list")
3602            .about("Lists a file's or shared drive's permissions. For more information, see Share files, folders, and...")
3603            .long_about("Lists a file's or shared drive's permissions. For more information, see Share files, folders, and drives.")
3604            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3605                .help("The ID of the file or shared drive."))
3606            .arg(Arg::new("include-permissions-for-view").long("include-permissions-for-view").value_name("INCLUDE_PERMISSIONS_FOR_VIEW")
3607                .help("Specifies which additional view's permissions to include in the response. Only `published` is supported."))
3608            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3609                .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"))
3610            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3611                .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."))
3612            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3613                .help("Whether the requesting application supports both My Drives and shared drives."))
3614            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3615                .help("Deprecated: Use `supportsAllDrives` instead."))
3616            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3617                .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"))
3618            .args(escape_hatch_args())
3619    }
3620
3621    // drive.permissions.update
3622    fn leaf_drive_permissions_update() -> Command {
3623        Command::new("drive.permissions.update")
3624            .visible_alias("update")
3625            .about("Updates a permission with patch semantics. For more information, see Share files, folders, and...")
3626            .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")
3627            .arg(Arg::new("enforce-expansive-access").long("enforce-expansive-access").action(ArgAction::SetTrue)
3628                .help("Deprecated: All requests use the expansive access rules."))
3629            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3630                .help("The ID of the file or shared drive."))
3631            .arg(Arg::new("permission-id").long("permission-id").value_name("PERMISSION_ID").required(true)
3632                .help("The ID of the permission."))
3633            .arg(Arg::new("remove-expiration").long("remove-expiration").action(ArgAction::SetTrue)
3634                .help("Whether to remove the expiration date."))
3635            .arg(Arg::new("supports-all-drives").long("supports-all-drives").action(ArgAction::SetTrue)
3636                .help("Whether the requesting application supports both My Drives and shared drives."))
3637            .arg(Arg::new("supports-team-drives").long("supports-team-drives").action(ArgAction::SetTrue)
3638                .help("Deprecated: Use `supportsAllDrives` instead."))
3639            .arg(Arg::new("transfer-ownership").long("transfer-ownership").action(ArgAction::SetTrue)
3640                .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"))
3641            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3642                .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"))
3643            .args(escape_hatch_args())
3644    }
3645
3646    // drive.permissions
3647    fn group_drive_permissions() -> Command {
3648        Command::new("permissions")
3649            .about("Methods under drive.permissions")
3650            .subcommand_required(true)
3651            .subcommand(leaf_drive_permissions_create())
3652            .subcommand(leaf_drive_permissions_delete())
3653            .subcommand(leaf_drive_permissions_get())
3654            .subcommand(leaf_drive_permissions_list())
3655            .subcommand(leaf_drive_permissions_update())
3656    }
3657
3658    // drive.replies.create
3659    fn leaf_drive_replies_create() -> Command {
3660        Command::new("drive.replies.create")
3661            .visible_alias("create")
3662            .about("Creates a reply to a comment. 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            .args(escape_hatch_args())
3668    }
3669
3670    // drive.replies.delete
3671    fn leaf_drive_replies_delete() -> Command {
3672        Command::new("drive.replies.delete")
3673            .visible_alias("delete")
3674            .about("Deletes a reply. For more information, see Manage comments and replies.")
3675            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3676                .help("The ID of the comment."))
3677            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3678                .help("The ID of the file."))
3679            .arg(Arg::new("reply-id").long("reply-id").value_name("REPLY_ID").required(true)
3680                .help("The ID of the reply."))
3681            .args(escape_hatch_args())
3682    }
3683
3684    // drive.replies.get
3685    fn leaf_drive_replies_get() -> Command {
3686        Command::new("drive.replies.get")
3687            .visible_alias("get")
3688            .about("Gets a reply by ID. For more information, see Manage comments and replies.")
3689            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3690                .help("The ID of the comment."))
3691            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3692                .help("The ID of the file."))
3693            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3694                .help("Whether to return deleted replies. Deleted replies don't include their original content."))
3695            .arg(Arg::new("reply-id").long("reply-id").value_name("REPLY_ID").required(true)
3696                .help("The ID of the reply."))
3697            .args(escape_hatch_args())
3698    }
3699
3700    // drive.replies.list
3701    fn leaf_drive_replies_list() -> Command {
3702        Command::new("drive.replies.list")
3703            .visible_alias("list")
3704            .about("Lists a comment's replies. For more information, see Manage comments and replies.")
3705            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3706                .help("The ID of the comment."))
3707            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3708                .help("The ID of the file."))
3709            .arg(Arg::new("include-deleted").long("include-deleted").action(ArgAction::SetTrue)
3710                .help("Whether to include deleted replies. Deleted replies don't include their original content."))
3711            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3712                .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"))
3713            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3714                .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."))
3715            .args(escape_hatch_args())
3716    }
3717
3718    // drive.replies.update
3719    fn leaf_drive_replies_update() -> Command {
3720        Command::new("drive.replies.update")
3721            .visible_alias("update")
3722            .about("Updates a reply with patch semantics. For more information, see Manage comments and replies.")
3723            .arg(Arg::new("comment-id").long("comment-id").value_name("COMMENT_ID").required(true)
3724                .help("The ID of the comment."))
3725            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3726                .help("The ID of the file."))
3727            .arg(Arg::new("reply-id").long("reply-id").value_name("REPLY_ID").required(true)
3728                .help("The ID of the reply."))
3729            .args(escape_hatch_args())
3730    }
3731
3732    // drive.replies
3733    fn group_drive_replies() -> Command {
3734        Command::new("replies")
3735            .about("Methods under drive.replies")
3736            .subcommand_required(true)
3737            .subcommand(leaf_drive_replies_create())
3738            .subcommand(leaf_drive_replies_delete())
3739            .subcommand(leaf_drive_replies_get())
3740            .subcommand(leaf_drive_replies_list())
3741            .subcommand(leaf_drive_replies_update())
3742    }
3743
3744    // drive.revisions.delete
3745    fn leaf_drive_revisions_delete() -> Command {
3746        Command::new("drive.revisions.delete")
3747            .visible_alias("delete")
3748            .about("Permanently deletes a file version. You can only delete revisions for files with binary content in...")
3749            .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")
3750            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3751                .help("The ID of the file."))
3752            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID").required(true)
3753                .help("The ID of the revision."))
3754            .args(escape_hatch_args())
3755    }
3756
3757    // drive.revisions.get
3758    fn leaf_drive_revisions_get() -> Command {
3759        Command::new("drive.revisions.get")
3760            .visible_alias("get")
3761            .about("Gets a revision's metadata or content by ID. For more information, see Manage file revisions.")
3762            .arg(Arg::new("acknowledge-abuse").long("acknowledge-abuse").action(ArgAction::SetTrue)
3763                .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"))
3764            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3765                .help("The ID of the file."))
3766            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID").required(true)
3767                .help("The ID of the revision."))
3768            .args(escape_hatch_args())
3769    }
3770
3771    // drive.revisions.list
3772    fn leaf_drive_revisions_list() -> Command {
3773        Command::new("drive.revisions.list")
3774            .visible_alias("list")
3775            .about("Lists a file's revisions. For more information, see Manage file revisions. **Important:** The list...")
3776            .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")
3777            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3778                .help("The ID of the file."))
3779            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3780                .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"))
3781            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3782                .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."))
3783            .args(escape_hatch_args())
3784    }
3785
3786    // drive.revisions.update
3787    fn leaf_drive_revisions_update() -> Command {
3788        Command::new("drive.revisions.update")
3789            .visible_alias("update")
3790            .about("Updates a revision with patch semantics. For more information, see Manage file revisions.")
3791            .arg(Arg::new("file-id").long("file-id").value_name("FILE_ID").required(true)
3792                .help("The ID of the file."))
3793            .arg(Arg::new("revision-id").long("revision-id").value_name("REVISION_ID").required(true)
3794                .help("The ID of the revision."))
3795            .args(escape_hatch_args())
3796    }
3797
3798    // drive.revisions
3799    fn group_drive_revisions() -> Command {
3800        Command::new("revisions")
3801            .about("Methods under drive.revisions")
3802            .subcommand_required(true)
3803            .subcommand(leaf_drive_revisions_delete())
3804            .subcommand(leaf_drive_revisions_get())
3805            .subcommand(leaf_drive_revisions_list())
3806            .subcommand(leaf_drive_revisions_update())
3807    }
3808
3809    // drive.teamdrives.create
3810    fn leaf_drive_teamdrives_create() -> Command {
3811        Command::new("drive.teamdrives.create")
3812            .visible_alias("create")
3813            .about("Deprecated: Use `drives.create` instead.")
3814            .arg(Arg::new("request-id").long("request-id").value_name("REQUEST_ID").required(true)
3815                .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"))
3816            .args(escape_hatch_args())
3817    }
3818
3819    // drive.teamdrives.delete
3820    fn leaf_drive_teamdrives_delete() -> Command {
3821        Command::new("drive.teamdrives.delete")
3822            .visible_alias("delete")
3823            .about("Deprecated: Use `drives.delete` instead.")
3824            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID").required(true)
3825                .help("The ID of the Team Drive"))
3826            .args(escape_hatch_args())
3827    }
3828
3829    // drive.teamdrives.get
3830    fn leaf_drive_teamdrives_get() -> Command {
3831        Command::new("drive.teamdrives.get")
3832            .visible_alias("get")
3833            .about("Deprecated: Use `drives.get` instead.")
3834            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID").required(true)
3835                .help("The ID of the Team Drive"))
3836            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3837                .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"))
3838            .args(escape_hatch_args())
3839    }
3840
3841    // drive.teamdrives.list
3842    fn leaf_drive_teamdrives_list() -> Command {
3843        Command::new("drive.teamdrives.list")
3844            .visible_alias("list")
3845            .about("Deprecated: Use `drives.list` instead.")
3846            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3847                .help("Maximum number of Team Drives to return."))
3848            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3849                .help("Page token for Team Drives."))
3850            .arg(Arg::new("q").long("q").value_name("Q")
3851                .help("Query string for searching Team Drives."))
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 all Team Drives of the domain in which the requester is an administrator are returned."))
3854            .args(escape_hatch_args())
3855    }
3856
3857    // drive.teamdrives.update
3858    fn leaf_drive_teamdrives_update() -> Command {
3859        Command::new("drive.teamdrives.update")
3860            .visible_alias("update")
3861            .about("Deprecated: Use `drives.update` instead.")
3862            .arg(Arg::new("team-drive-id").long("team-drive-id").value_name("TEAM_DRIVE_ID").required(true)
3863                .help("The ID of the Team Drive"))
3864            .arg(Arg::new("use-domain-admin-access").long("use-domain-admin-access").action(ArgAction::SetTrue)
3865                .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"))
3866            .args(escape_hatch_args())
3867    }
3868
3869    // drive.teamdrives
3870    fn group_drive_teamdrives() -> Command {
3871        Command::new("teamdrives")
3872            .about("Methods under drive.teamdrives")
3873            .subcommand_required(true)
3874            .subcommand(leaf_drive_teamdrives_create())
3875            .subcommand(leaf_drive_teamdrives_delete())
3876            .subcommand(leaf_drive_teamdrives_get())
3877            .subcommand(leaf_drive_teamdrives_list())
3878            .subcommand(leaf_drive_teamdrives_update())
3879    }
3880
3881    // drive
3882    fn service_drive() -> Command {
3883        Command::new("drive")
3884            .about("Google Drive API operations (v3, 64 methods)")
3885            .subcommand_required(true)
3886            .subcommand(group_drive_about())
3887            .subcommand(group_drive_accessproposals())
3888            .subcommand(group_drive_approvals())
3889            .subcommand(group_drive_apps())
3890            .subcommand(group_drive_changes())
3891            .subcommand(group_drive_channels())
3892            .subcommand(group_drive_comments())
3893            .subcommand(group_drive_drives())
3894            .subcommand(group_drive_files())
3895            .subcommand(group_drive_operations())
3896            .subcommand(group_drive_permissions())
3897            .subcommand(group_drive_replies())
3898            .subcommand(group_drive_revisions())
3899            .subcommand(group_drive_teamdrives())
3900    }
3901
3902    // forms.forms.batchUpdate
3903    fn leaf_forms_forms_batch_update() -> Command {
3904        Command::new("forms.forms.batchUpdate")
3905            .visible_alias("batchUpdate")
3906            .about("Change the form with a batch of updates.")
3907            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3908                .help("Required. The form ID."))
3909            .args(escape_hatch_args())
3910    }
3911
3912    // forms.forms.create
3913    fn leaf_forms_forms_create() -> Command {
3914        Command::new("forms.forms.create")
3915            .visible_alias("create")
3916            .about("Create a new form using the title given in the provided form message in the request. *Important:*...")
3917            .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")
3918            .arg(Arg::new("unpublished").long("unpublished").action(ArgAction::SetTrue)
3919                .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"))
3920            .args(escape_hatch_args())
3921    }
3922
3923    // forms.forms.get
3924    fn leaf_forms_forms_get() -> Command {
3925        Command::new("forms.forms.get")
3926            .visible_alias("get")
3927            .about("Get a form.")
3928            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3929                .help("Required. The form ID."))
3930            .args(escape_hatch_args())
3931    }
3932
3933    // forms.forms.responses.get
3934    fn leaf_forms_forms_responses_get() -> Command {
3935        Command::new("forms.forms.responses.get")
3936            .visible_alias("get")
3937            .about("Get one response from the form.")
3938            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3939                .help("Required. The form ID."))
3940            .arg(Arg::new("response-id").long("response-id").value_name("RESPONSE_ID").required(true)
3941                .help("Required. The response ID within the form."))
3942            .args(escape_hatch_args())
3943    }
3944
3945    // forms.forms.responses.list
3946    fn leaf_forms_forms_responses_list() -> Command {
3947        Command::new("forms.forms.responses.list")
3948            .visible_alias("list")
3949            .about("List a form's responses.")
3950            .arg(Arg::new("filter").long("filter").value_name("FILTER")
3951                .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)"))
3952            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3953                .help("Required. ID of the Form whose responses to list."))
3954            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
3955                .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."))
3956            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
3957                .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."))
3958            .args(escape_hatch_args())
3959    }
3960
3961    // forms.forms.responses
3962    fn group_forms_forms_responses() -> Command {
3963        Command::new("responses")
3964            .about("Methods under forms.forms.responses")
3965            .subcommand_required(true)
3966            .subcommand(leaf_forms_forms_responses_get())
3967            .subcommand(leaf_forms_forms_responses_list())
3968    }
3969
3970    // forms.forms.setPublishSettings
3971    fn leaf_forms_forms_set_publish_settings() -> Command {
3972        Command::new("forms.forms.setPublishSettings")
3973            .visible_alias("setPublishSettings")
3974            .about("Updates the publish settings of a form. Legacy forms aren't supported because they don't have the...")
3975            .long_about("Updates the publish settings of a form. Legacy forms aren't supported because they don't have the `publish_settings` field.")
3976            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3977                .help("Required. The ID of the form. You can get the id from Form.form_id field."))
3978            .args(escape_hatch_args())
3979    }
3980
3981    // forms.forms.watches.create
3982    fn leaf_forms_forms_watches_create() -> Command {
3983        Command::new("forms.forms.watches.create")
3984            .visible_alias("create")
3985            .about("Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the...")
3986            .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).")
3987            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3988                .help("Required. ID of the Form to watch."))
3989            .args(escape_hatch_args())
3990    }
3991
3992    // forms.forms.watches.delete
3993    fn leaf_forms_forms_watches_delete() -> Command {
3994        Command::new("forms.forms.watches.delete")
3995            .visible_alias("delete")
3996            .about("Delete a watch.")
3997            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
3998                .help("Required. The ID of the Form."))
3999            .arg(Arg::new("watch-id").long("watch-id").value_name("WATCH_ID").required(true)
4000                .help("Required. The ID of the Watch to delete."))
4001            .args(escape_hatch_args())
4002    }
4003
4004    // forms.forms.watches.list
4005    fn leaf_forms_forms_watches_list() -> Command {
4006        Command::new("forms.forms.watches.list")
4007            .visible_alias("list")
4008            .about("Return a list of the watches owned by the invoking project. The maximum number of watches is two...")
4009            .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.")
4010            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
4011                .help("Required. ID of the Form whose watches to list."))
4012            .args(escape_hatch_args())
4013    }
4014
4015    // forms.forms.watches.renew
4016    fn leaf_forms_forms_watches_renew() -> Command {
4017        Command::new("forms.forms.watches.renew")
4018            .visible_alias("renew")
4019            .about("Renew an existing watch for seven days. The state of the watch after renewal is `ACTIVE`, and the...")
4020            .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")
4021            .arg(Arg::new("form-id").long("form-id").value_name("FORM_ID").required(true)
4022                .help("Required. The ID of the Form."))
4023            .arg(Arg::new("watch-id").long("watch-id").value_name("WATCH_ID").required(true)
4024                .help("Required. The ID of the Watch to renew."))
4025            .args(escape_hatch_args())
4026    }
4027
4028    // forms.forms.watches
4029    fn group_forms_forms_watches() -> Command {
4030        Command::new("watches")
4031            .about("Methods under forms.forms.watches")
4032            .subcommand_required(true)
4033            .subcommand(leaf_forms_forms_watches_create())
4034            .subcommand(leaf_forms_forms_watches_delete())
4035            .subcommand(leaf_forms_forms_watches_list())
4036            .subcommand(leaf_forms_forms_watches_renew())
4037    }
4038
4039    // forms.forms
4040    fn group_forms_forms() -> Command {
4041        Command::new("forms")
4042            .about("Methods under forms.forms")
4043            .subcommand_required(true)
4044            .subcommand(leaf_forms_forms_batch_update())
4045            .subcommand(leaf_forms_forms_create())
4046            .subcommand(leaf_forms_forms_get())
4047            .subcommand(group_forms_forms_responses())
4048            .subcommand(leaf_forms_forms_set_publish_settings())
4049            .subcommand(group_forms_forms_watches())
4050    }
4051
4052    // forms
4053    fn service_forms() -> Command {
4054        Command::new("forms")
4055            .about("Google Forms API operations (v1, 10 methods)")
4056            .subcommand_required(true)
4057            .subcommand(group_forms_forms())
4058    }
4059
4060    // gmail.users.drafts.create
4061    fn leaf_gmail_users_drafts_create() -> Command {
4062        Command::new("gmail.users.drafts.create")
4063            .visible_alias("create")
4064            .about("Creates a draft with the `DRAFT` label. For more information, see Create and send draft emails.")
4065            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4066                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4067            .args(escape_hatch_args())
4068    }
4069
4070    // gmail.users.drafts.delete
4071    fn leaf_gmail_users_drafts_delete() -> Command {
4072        Command::new("gmail.users.drafts.delete")
4073            .visible_alias("delete")
4074            .about("Immediately and permanently deletes the specified draft. Does not simply trash it. For more...")
4075            .long_about("Immediately and permanently deletes the specified draft. Does not simply trash it. For more information, see Create and send draft emails.")
4076            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4077                .help("The ID of the draft to delete."))
4078            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4079                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4080            .args(escape_hatch_args())
4081    }
4082
4083    // gmail.users.drafts.get
4084    fn leaf_gmail_users_drafts_get() -> Command {
4085        Command::new("gmail.users.drafts.get")
4086            .visible_alias("get")
4087            .about("Gets the specified draft. For more information, see Create and send draft emails.")
4088            .arg(Arg::new("param-format").long("param-format").value_name("PARAM_FORMAT").value_parser(["minimal", "full", "raw", "metadata"])
4089                .help("Discovery parameter `format`, renamed because --format is reserved here. The format to return the draft in."))
4090            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4091                .help("The ID of the draft to retrieve."))
4092            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4093                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4094            .args(escape_hatch_args())
4095    }
4096
4097    // gmail.users.drafts.list
4098    fn leaf_gmail_users_drafts_list() -> Command {
4099        Command::new("gmail.users.drafts.list")
4100            .visible_alias("list")
4101            .about("Lists the drafts in the user's mailbox. For more information, see Create and send draft emails.")
4102            .arg(Arg::new("include-spam-trash").long("include-spam-trash").action(ArgAction::SetTrue)
4103                .help("Include drafts from `SPAM` and `TRASH` in the results."))
4104            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
4105                .help("Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500."))
4106            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4107                .help("Page token to retrieve a specific page of results in the list."))
4108            .arg(Arg::new("q").long("q").value_name("Q")
4109                .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"))
4110            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4111                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4112            .args(escape_hatch_args())
4113    }
4114
4115    // gmail.users.drafts.send
4116    fn leaf_gmail_users_drafts_send() -> Command {
4117        Command::new("gmail.users.drafts.send")
4118            .visible_alias("send")
4119            .about("Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers. For...")
4120            .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.")
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.update
4127    fn leaf_gmail_users_drafts_update() -> Command {
4128        Command::new("gmail.users.drafts.update")
4129            .visible_alias("update")
4130            .about("Replaces a draft's content. For more information, see Create and send draft emails.")
4131            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4132                .help("The ID of the draft to update."))
4133            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4134                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4135            .args(escape_hatch_args())
4136    }
4137
4138    // gmail.users.drafts
4139    fn group_gmail_users_drafts() -> Command {
4140        Command::new("drafts")
4141            .about("Methods under gmail.users.drafts")
4142            .subcommand_required(true)
4143            .subcommand(leaf_gmail_users_drafts_create())
4144            .subcommand(leaf_gmail_users_drafts_delete())
4145            .subcommand(leaf_gmail_users_drafts_get())
4146            .subcommand(leaf_gmail_users_drafts_list())
4147            .subcommand(leaf_gmail_users_drafts_send())
4148            .subcommand(leaf_gmail_users_drafts_update())
4149    }
4150
4151    // gmail.users.getProfile
4152    fn leaf_gmail_users_get_profile() -> Command {
4153        Command::new("gmail.users.getProfile")
4154            .visible_alias("getProfile")
4155            .about("Gets the current user's Gmail profile.")
4156            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4157                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4158            .args(escape_hatch_args())
4159    }
4160
4161    // gmail.users.history.list
4162    fn leaf_gmail_users_history_list() -> Command {
4163        Command::new("gmail.users.history.list")
4164            .visible_alias("list")
4165            .about("Lists the history of all changes to the given mailbox. History results are returned in...")
4166            .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.")
4167            .arg(Arg::new("history-types").long("history-types").value_name("HISTORY_TYPES").action(ArgAction::Append)
4168                .help("History types to be returned by the function"))
4169            .arg(Arg::new("label-id").long("label-id").value_name("LABEL_ID")
4170                .help("Only return messages with a label matching the ID."))
4171            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
4172                .help("Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500."))
4173            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4174                .help("Page token to retrieve a specific page of results in the list."))
4175            .arg(Arg::new("start-history-id").long("start-history-id").value_name("START_HISTORY_ID")
4176                .help("Required. Returns history records after the specified `startHistoryId`. The supplied `startHistoryId` should be obtained from the `historyId` of a message, thre"))
4177            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4178                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4179            .args(escape_hatch_args())
4180    }
4181
4182    // gmail.users.history
4183    fn group_gmail_users_history() -> Command {
4184        Command::new("history")
4185            .about("Methods under gmail.users.history")
4186            .subcommand_required(true)
4187            .subcommand(leaf_gmail_users_history_list())
4188    }
4189
4190    // gmail.users.labels.create
4191    fn leaf_gmail_users_labels_create() -> Command {
4192        Command::new("gmail.users.labels.create")
4193            .visible_alias("create")
4194            .about("Creates a label. For more information, see Manage labels.")
4195            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4196                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4197            .args(escape_hatch_args())
4198    }
4199
4200    // gmail.users.labels.delete
4201    fn leaf_gmail_users_labels_delete() -> Command {
4202        Command::new("gmail.users.labels.delete")
4203            .visible_alias("delete")
4204            .about("Immediately and permanently deletes the specified label and removes it from any messages and...")
4205            .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.")
4206            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4207                .help("The ID of the label to delete."))
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.get
4214    fn leaf_gmail_users_labels_get() -> Command {
4215        Command::new("gmail.users.labels.get")
4216            .visible_alias("get")
4217            .about("Gets the specified label. For more information, see Manage labels.")
4218            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4219                .help("The ID of the label to retrieve."))
4220            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4221                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4222            .args(escape_hatch_args())
4223    }
4224
4225    // gmail.users.labels.list
4226    fn leaf_gmail_users_labels_list() -> Command {
4227        Command::new("gmail.users.labels.list")
4228            .visible_alias("list")
4229            .about("Lists all labels in the user's mailbox. For more information, see Manage labels.")
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.patch
4236    fn leaf_gmail_users_labels_patch() -> Command {
4237        Command::new("gmail.users.labels.patch")
4238            .visible_alias("patch")
4239            .about("Patch 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.update
4248    fn leaf_gmail_users_labels_update() -> Command {
4249        Command::new("gmail.users.labels.update")
4250            .visible_alias("update")
4251            .about("Updates the specified label. For more information, see Manage labels.")
4252            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4253                .help("The ID of the label to update."))
4254            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4255                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4256            .args(escape_hatch_args())
4257    }
4258
4259    // gmail.users.labels
4260    fn group_gmail_users_labels() -> Command {
4261        Command::new("labels")
4262            .about("Methods under gmail.users.labels")
4263            .subcommand_required(true)
4264            .subcommand(leaf_gmail_users_labels_create())
4265            .subcommand(leaf_gmail_users_labels_delete())
4266            .subcommand(leaf_gmail_users_labels_get())
4267            .subcommand(leaf_gmail_users_labels_list())
4268            .subcommand(leaf_gmail_users_labels_patch())
4269            .subcommand(leaf_gmail_users_labels_update())
4270    }
4271
4272    // gmail.users.messages.attachments.get
4273    fn leaf_gmail_users_messages_attachments_get() -> Command {
4274        Command::new("gmail.users.messages.attachments.get")
4275            .visible_alias("get")
4276            .about("Gets the specified message attachment.")
4277            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4278                .help("The ID of the attachment."))
4279            .arg(Arg::new("message-id").long("message-id").value_name("MESSAGE_ID").required(true)
4280                .help("The ID of the message containing the attachment."))
4281            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4282                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4283            .args(escape_hatch_args())
4284    }
4285
4286    // gmail.users.messages.attachments
4287    fn group_gmail_users_messages_attachments() -> Command {
4288        Command::new("attachments")
4289            .about("Methods under gmail.users.messages.attachments")
4290            .subcommand_required(true)
4291            .subcommand(leaf_gmail_users_messages_attachments_get())
4292    }
4293
4294    // gmail.users.messages.batchDelete
4295    fn leaf_gmail_users_messages_batch_delete() -> Command {
4296        Command::new("gmail.users.messages.batchDelete")
4297            .visible_alias("batchDelete")
4298            .about("Deletes many messages by message ID. Provides no guarantees that messages were not already deleted...")
4299            .long_about("Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.")
4300            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4301                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4302            .args(escape_hatch_args())
4303    }
4304
4305    // gmail.users.messages.batchModify
4306    fn leaf_gmail_users_messages_batch_modify() -> Command {
4307        Command::new("gmail.users.messages.batchModify")
4308            .visible_alias("batchModify")
4309            .about("Modifies the labels and the Classification Label values on the specified messages. For...")
4310            .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")
4311            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4312                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4313            .args(escape_hatch_args())
4314    }
4315
4316    // gmail.users.messages.delete
4317    fn leaf_gmail_users_messages_delete() -> Command {
4318        Command::new("gmail.users.messages.delete")
4319            .visible_alias("delete")
4320            .about("Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer...")
4321            .long_about("Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.")
4322            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4323                .help("The ID of the message to delete."))
4324            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4325                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4326            .args(escape_hatch_args())
4327    }
4328
4329    // gmail.users.messages.get
4330    fn leaf_gmail_users_messages_get() -> Command {
4331        Command::new("gmail.users.messages.get")
4332            .visible_alias("get")
4333            .about("Gets the specified message.")
4334            .arg(Arg::new("param-format").long("param-format").value_name("PARAM_FORMAT").value_parser(["minimal", "full", "raw", "metadata"])
4335                .help("Discovery parameter `format`, renamed because --format is reserved here. The format to return the message in."))
4336            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4337                .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"))
4338            .arg(Arg::new("metadata-headers").long("metadata-headers").value_name("METADATA_HEADERS").action(ArgAction::Append)
4339                .help("When given and format is `METADATA`, only include headers specified."))
4340            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4341                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4342            .args(escape_hatch_args())
4343    }
4344
4345    // gmail.users.messages.import
4346    fn leaf_gmail_users_messages_import() -> Command {
4347        Command::new("gmail.users.messages.import")
4348            .visible_alias("import")
4349            .about("Imports a message into only this user's mailbox, with standard email delivery scanning and...")
4350            .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")
4351            .arg(Arg::new("deleted").long("deleted").action(ArgAction::SetTrue)
4352                .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."))
4353            .arg(Arg::new("internal-date-source").long("internal-date-source").value_name("INTERNAL_DATE_SOURCE").value_parser(["receivedTime", "dateHeader"])
4354                .help("Source for Gmail's internal date of the message."))
4355            .arg(Arg::new("never-mark-spam").long("never-mark-spam").action(ArgAction::SetTrue)
4356                .help("Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox."))
4357            .arg(Arg::new("process-for-calendar").long("process-for-calendar").action(ArgAction::SetTrue)
4358                .help("Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user."))
4359            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4360                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4361            .args(escape_hatch_args())
4362    }
4363
4364    // gmail.users.messages.insert
4365    fn leaf_gmail_users_messages_insert() -> Command {
4366        Command::new("gmail.users.messages.insert")
4367            .visible_alias("insert")
4368            .about("Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most...")
4369            .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.")
4370            .arg(Arg::new("deleted").long("deleted").action(ArgAction::SetTrue)
4371                .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."))
4372            .arg(Arg::new("internal-date-source").long("internal-date-source").value_name("INTERNAL_DATE_SOURCE").value_parser(["receivedTime", "dateHeader"])
4373                .help("Source for Gmail's internal date of the message."))
4374            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4375                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4376            .args(escape_hatch_args())
4377    }
4378
4379    // gmail.users.messages.list
4380    fn leaf_gmail_users_messages_list() -> Command {
4381        Command::new("gmail.users.messages.list")
4382            .visible_alias("list")
4383            .about("Lists the messages in the user's mailbox. For more information, see List Gmail messages.")
4384            .arg(Arg::new("include-spam-trash").long("include-spam-trash").action(ArgAction::SetTrue)
4385                .help("Include messages from `SPAM` and `TRASH` in the results."))
4386            .arg(Arg::new("label-ids").long("label-ids").value_name("LABEL_IDS").action(ArgAction::Append)
4387                .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"))
4388            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
4389                .help("Maximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500."))
4390            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4391                .help("Page token to retrieve a specific page of results in the list."))
4392            .arg(Arg::new("q").long("q").value_name("Q")
4393                .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:"))
4394            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4395                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4396            .args(escape_hatch_args())
4397    }
4398
4399    // gmail.users.messages.modify
4400    fn leaf_gmail_users_messages_modify() -> Command {
4401        Command::new("gmail.users.messages.modify")
4402            .visible_alias("modify")
4403            .about("Modifies the labels and the Classification Label values on the specified message. For...")
4404            .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")
4405            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4406                .help("The ID of the message to modify."))
4407            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4408                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4409            .args(escape_hatch_args())
4410    }
4411
4412    // gmail.users.messages.send
4413    fn leaf_gmail_users_messages_send() -> Command {
4414        Command::new("gmail.users.messages.send")
4415            .visible_alias("send")
4416            .about("Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers. For more...")
4417            .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.")
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.trash
4424    fn leaf_gmail_users_messages_trash() -> Command {
4425        Command::new("gmail.users.messages.trash")
4426            .visible_alias("trash")
4427            .about("Moves the specified message to the trash.")
4428            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4429                .help("The ID of the message to 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.untrash
4436    fn leaf_gmail_users_messages_untrash() -> Command {
4437        Command::new("gmail.users.messages.untrash")
4438            .visible_alias("untrash")
4439            .about("Removes the specified message from the trash.")
4440            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4441                .help("The ID of the message to remove from Trash."))
4442            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4443                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4444            .args(escape_hatch_args())
4445    }
4446
4447    // gmail.users.messages
4448    fn group_gmail_users_messages() -> Command {
4449        Command::new("messages")
4450            .about("Methods under gmail.users.messages")
4451            .subcommand_required(true)
4452            .subcommand(group_gmail_users_messages_attachments())
4453            .subcommand(leaf_gmail_users_messages_batch_delete())
4454            .subcommand(leaf_gmail_users_messages_batch_modify())
4455            .subcommand(leaf_gmail_users_messages_delete())
4456            .subcommand(leaf_gmail_users_messages_get())
4457            .subcommand(leaf_gmail_users_messages_import())
4458            .subcommand(leaf_gmail_users_messages_insert())
4459            .subcommand(leaf_gmail_users_messages_list())
4460            .subcommand(leaf_gmail_users_messages_modify())
4461            .subcommand(leaf_gmail_users_messages_send())
4462            .subcommand(leaf_gmail_users_messages_trash())
4463            .subcommand(leaf_gmail_users_messages_untrash())
4464    }
4465
4466    // gmail.users.settings.cse.identities.create
4467    fn leaf_gmail_users_settings_cse_identities_create() -> Command {
4468        Command::new("gmail.users.settings.cse.identities.create")
4469            .visible_alias("create")
4470            .about("Creates and configures a client-side encryption identity that's authorized to send mail from the...")
4471            .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")
4472            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4473                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4474            .args(escape_hatch_args())
4475    }
4476
4477    // gmail.users.settings.cse.identities.delete
4478    fn leaf_gmail_users_settings_cse_identities_delete() -> Command {
4479        Command::new("gmail.users.settings.cse.identities.delete")
4480            .visible_alias("delete")
4481            .about("Deletes a client-side encryption identity. The authenticated user can no longer use the identity to...")
4482            .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")
4483            .arg(Arg::new("cse-email-address").long("cse-email-address").value_name("CSE_EMAIL_ADDRESS").required(true)
4484                .help("The primary email address associated with the client-side encryption identity configuration that's removed."))
4485            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4486                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4487            .args(escape_hatch_args())
4488    }
4489
4490    // gmail.users.settings.cse.identities.get
4491    fn leaf_gmail_users_settings_cse_identities_get() -> Command {
4492        Command::new("gmail.users.settings.cse.identities.get")
4493            .visible_alias("get")
4494            .about("Retrieves a client-side encryption identity configuration. For administrators managing identities...")
4495            .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")
4496            .arg(Arg::new("cse-email-address").long("cse-email-address").value_name("CSE_EMAIL_ADDRESS").required(true)
4497                .help("The primary email address associated with the client-side encryption identity configuration that's retrieved."))
4498            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4499                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4500            .args(escape_hatch_args())
4501    }
4502
4503    // gmail.users.settings.cse.identities.list
4504    fn leaf_gmail_users_settings_cse_identities_list() -> Command {
4505        Command::new("gmail.users.settings.cse.identities.list")
4506            .visible_alias("list")
4507            .about("Lists the client-side encrypted identities for an authenticated user. For administrators managing...")
4508            .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")
4509            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
4510                .help("The number of identities to return. If not provided, the page size will default to 20 entries."))
4511            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4512                .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."))
4513            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4514                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4515            .args(escape_hatch_args())
4516    }
4517
4518    // gmail.users.settings.cse.identities.patch
4519    fn leaf_gmail_users_settings_cse_identities_patch() -> Command {
4520        Command::new("gmail.users.settings.cse.identities.patch")
4521            .visible_alias("patch")
4522            .about("Associates a different key pair with an existing client-side encryption identity. The updated key...")
4523            .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")
4524            .arg(Arg::new("email-address").long("email-address").value_name("EMAIL_ADDRESS").required(true)
4525                .help("The email address of the client-side encryption identity to update."))
4526            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4527                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4528            .args(escape_hatch_args())
4529    }
4530
4531    // gmail.users.settings.cse.identities
4532    fn group_gmail_users_settings_cse_identities() -> Command {
4533        Command::new("identities")
4534            .about("Methods under gmail.users.settings.cse.identities")
4535            .subcommand_required(true)
4536            .subcommand(leaf_gmail_users_settings_cse_identities_create())
4537            .subcommand(leaf_gmail_users_settings_cse_identities_delete())
4538            .subcommand(leaf_gmail_users_settings_cse_identities_get())
4539            .subcommand(leaf_gmail_users_settings_cse_identities_list())
4540            .subcommand(leaf_gmail_users_settings_cse_identities_patch())
4541    }
4542
4543    // gmail.users.settings.cse.keypairs.create
4544    fn leaf_gmail_users_settings_cse_keypairs_create() -> Command {
4545        Command::new("gmail.users.settings.cse.keypairs.create")
4546            .visible_alias("create")
4547            .about("Creates and uploads a client-side encryption S/MIME public key certificate chain and private key...")
4548            .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")
4549            .arg(Arg::new("chain-validation").long("chain-validation").value_name("CHAIN_VALIDATION").value_parser(["all", "none"])
4550                .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"))
4551            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4552                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4553            .args(escape_hatch_args())
4554    }
4555
4556    // gmail.users.settings.cse.keypairs.disable
4557    fn leaf_gmail_users_settings_cse_keypairs_disable() -> Command {
4558        Command::new("gmail.users.settings.cse.keypairs.disable")
4559            .visible_alias("disable")
4560            .about("Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair...")
4561            .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")
4562            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4563                .help("The identifier of the key pair to turn off."))
4564            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4565                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4566            .args(escape_hatch_args())
4567    }
4568
4569    // gmail.users.settings.cse.keypairs.enable
4570    fn leaf_gmail_users_settings_cse_keypairs_enable() -> Command {
4571        Command::new("gmail.users.settings.cse.keypairs.enable")
4572            .visible_alias("enable")
4573            .about("Turns on a client-side encryption key pair that was turned off. The key pair becomes active again...")
4574            .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:/")
4575            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4576                .help("The identifier of the key pair to turn on."))
4577            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4578                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4579            .args(escape_hatch_args())
4580    }
4581
4582    // gmail.users.settings.cse.keypairs.get
4583    fn leaf_gmail_users_settings_cse_keypairs_get() -> Command {
4584        Command::new("gmail.users.settings.cse.keypairs.get")
4585            .visible_alias("get")
4586            .about("Retrieves an existing client-side encryption key pair. For administrators managing identities and...")
4587            .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")
4588            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4589                .help("The identifier of the key pair to retrieve."))
4590            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4591                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4592            .args(escape_hatch_args())
4593    }
4594
4595    // gmail.users.settings.cse.keypairs.list
4596    fn leaf_gmail_users_settings_cse_keypairs_list() -> Command {
4597        Command::new("gmail.users.settings.cse.keypairs.list")
4598            .visible_alias("list")
4599            .about("Lists client-side encryption key pairs for an authenticated user. For administrators managing...")
4600            .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")
4601            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
4602                .help("The number of key pairs to return. If not provided, the page size will default to 20 entries."))
4603            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
4604                .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."))
4605            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4606                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4607            .args(escape_hatch_args())
4608    }
4609
4610    // gmail.users.settings.cse.keypairs.obliterate
4611    fn leaf_gmail_users_settings_cse_keypairs_obliterate() -> Command {
4612        Command::new("gmail.users.settings.cse.keypairs.obliterate")
4613            .visible_alias("obliterate")
4614            .about("Deletes a client-side encryption key pair permanently and immediately. You can only permanently...")
4615            .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")
4616            .arg(Arg::new("key-pair-id").long("key-pair-id").value_name("KEY_PAIR_ID").required(true)
4617                .help("The identifier of the key pair to obliterate."))
4618            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4619                .help("The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."))
4620            .args(escape_hatch_args())
4621    }
4622
4623    // gmail.users.settings.cse.keypairs
4624    fn group_gmail_users_settings_cse_keypairs() -> Command {
4625        Command::new("keypairs")
4626            .about("Methods under gmail.users.settings.cse.keypairs")
4627            .subcommand_required(true)
4628            .subcommand(leaf_gmail_users_settings_cse_keypairs_create())
4629            .subcommand(leaf_gmail_users_settings_cse_keypairs_disable())
4630            .subcommand(leaf_gmail_users_settings_cse_keypairs_enable())
4631            .subcommand(leaf_gmail_users_settings_cse_keypairs_get())
4632            .subcommand(leaf_gmail_users_settings_cse_keypairs_list())
4633            .subcommand(leaf_gmail_users_settings_cse_keypairs_obliterate())
4634    }
4635
4636    // gmail.users.settings.cse
4637    fn group_gmail_users_settings_cse() -> Command {
4638        Command::new("cse")
4639            .about("Methods under gmail.users.settings.cse")
4640            .subcommand_required(true)
4641            .subcommand(group_gmail_users_settings_cse_identities())
4642            .subcommand(group_gmail_users_settings_cse_keypairs())
4643    }
4644
4645    // gmail.users.settings.delegates.create
4646    fn leaf_gmail_users_settings_delegates_create() -> Command {
4647        Command::new("gmail.users.settings.delegates.create")
4648            .visible_alias("create")
4649            .about("Adds a delegate with its verification status set directly to `accepted`, without sending any...")
4650            .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")
4651            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4652                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4653            .args(escape_hatch_args())
4654    }
4655
4656    // gmail.users.settings.delegates.delete
4657    fn leaf_gmail_users_settings_delegates_delete() -> Command {
4658        Command::new("gmail.users.settings.delegates.delete")
4659            .visible_alias("delete")
4660            .about("Removes the specified delegate (which can be of any verification status), and revokes any...")
4661            .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")
4662            .arg(Arg::new("delegate-email").long("delegate-email").value_name("DELEGATE_EMAIL").required(true)
4663                .help("The email address of the user to be removed as a delegate."))
4664            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4665                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4666            .args(escape_hatch_args())
4667    }
4668
4669    // gmail.users.settings.delegates.get
4670    fn leaf_gmail_users_settings_delegates_get() -> Command {
4671        Command::new("gmail.users.settings.delegates.get")
4672            .visible_alias("get")
4673            .about("Gets the specified delegate. For more information, see Manage delegates. A delegate user must be...")
4674            .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")
4675            .arg(Arg::new("delegate-email").long("delegate-email").value_name("DELEGATE_EMAIL").required(true)
4676                .help("The email address of the user whose delegate relationship is to be retrieved."))
4677            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4678                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4679            .args(escape_hatch_args())
4680    }
4681
4682    // gmail.users.settings.delegates.list
4683    fn leaf_gmail_users_settings_delegates_list() -> Command {
4684        Command::new("gmail.users.settings.delegates.list")
4685            .visible_alias("list")
4686            .about("Lists the delegates for the specified account. For more information, see Manage delegates. This...")
4687            .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.")
4688            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4689                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4690            .args(escape_hatch_args())
4691    }
4692
4693    // gmail.users.settings.delegates
4694    fn group_gmail_users_settings_delegates() -> Command {
4695        Command::new("delegates")
4696            .about("Methods under gmail.users.settings.delegates")
4697            .subcommand_required(true)
4698            .subcommand(leaf_gmail_users_settings_delegates_create())
4699            .subcommand(leaf_gmail_users_settings_delegates_delete())
4700            .subcommand(leaf_gmail_users_settings_delegates_get())
4701            .subcommand(leaf_gmail_users_settings_delegates_list())
4702    }
4703
4704    // gmail.users.settings.filters.create
4705    fn leaf_gmail_users_settings_filters_create() -> Command {
4706        Command::new("gmail.users.settings.filters.create")
4707            .visible_alias("create")
4708            .about("Creates a filter. Note: you can only create a maximum of 1,000 filters. For more information, see...")
4709            .long_about("Creates a filter. Note: you can only create a maximum of 1,000 filters. For more information, see Manage Gmail filters.")
4710            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4711                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4712            .args(escape_hatch_args())
4713    }
4714
4715    // gmail.users.settings.filters.delete
4716    fn leaf_gmail_users_settings_filters_delete() -> Command {
4717        Command::new("gmail.users.settings.filters.delete")
4718            .visible_alias("delete")
4719            .about("Immediately and permanently deletes the specified filter. For more information, see Manage Gmail...")
4720            .long_about("Immediately and permanently deletes the specified 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 deleted."))
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.get
4729    fn leaf_gmail_users_settings_filters_get() -> Command {
4730        Command::new("gmail.users.settings.filters.get")
4731            .visible_alias("get")
4732            .about("Gets a filter. For more information, see Manage Gmail filters.")
4733            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4734                .help("The ID of the filter to be fetched."))
4735            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4736                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4737            .args(escape_hatch_args())
4738    }
4739
4740    // gmail.users.settings.filters.list
4741    fn leaf_gmail_users_settings_filters_list() -> Command {
4742        Command::new("gmail.users.settings.filters.list")
4743            .visible_alias("list")
4744            .about("Lists the message filters of a Gmail user. For more information, see Manage Gmail filters.")
4745            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4746                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4747            .args(escape_hatch_args())
4748    }
4749
4750    // gmail.users.settings.filters
4751    fn group_gmail_users_settings_filters() -> Command {
4752        Command::new("filters")
4753            .about("Methods under gmail.users.settings.filters")
4754            .subcommand_required(true)
4755            .subcommand(leaf_gmail_users_settings_filters_create())
4756            .subcommand(leaf_gmail_users_settings_filters_delete())
4757            .subcommand(leaf_gmail_users_settings_filters_get())
4758            .subcommand(leaf_gmail_users_settings_filters_list())
4759    }
4760
4761    // gmail.users.settings.forwardingAddresses.create
4762    fn leaf_gmail_users_settings_forwarding_addresses_create() -> Command {
4763        Command::new("gmail.users.settings.forwardingAddresses.create")
4764            .visible_alias("create")
4765            .about("Creates a forwarding address. If ownership verification is required, a message will be sent to the...")
4766            .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")
4767            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4768                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4769            .args(escape_hatch_args())
4770    }
4771
4772    // gmail.users.settings.forwardingAddresses.delete
4773    fn leaf_gmail_users_settings_forwarding_addresses_delete() -> Command {
4774        Command::new("gmail.users.settings.forwardingAddresses.delete")
4775            .visible_alias("delete")
4776            .about("Deletes the specified forwarding address and revokes any verification that may have been required...")
4777            .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")
4778            .arg(Arg::new("forwarding-email").long("forwarding-email").value_name("FORWARDING_EMAIL").required(true)
4779                .help("The forwarding address to be deleted."))
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.get
4786    fn leaf_gmail_users_settings_forwarding_addresses_get() -> Command {
4787        Command::new("gmail.users.settings.forwardingAddresses.get")
4788            .visible_alias("get")
4789            .about("Gets the specified forwarding address. For more information, see Manage email forwarding.")
4790            .arg(Arg::new("forwarding-email").long("forwarding-email").value_name("FORWARDING_EMAIL").required(true)
4791                .help("The forwarding address to be retrieved."))
4792            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4793                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4794            .args(escape_hatch_args())
4795    }
4796
4797    // gmail.users.settings.forwardingAddresses.list
4798    fn leaf_gmail_users_settings_forwarding_addresses_list() -> Command {
4799        Command::new("gmail.users.settings.forwardingAddresses.list")
4800            .visible_alias("list")
4801            .about("Lists the forwarding addresses for the specified account. For more information, see Manage email...")
4802            .long_about("Lists the forwarding addresses for the specified account. For more information, see Manage email forwarding.")
4803            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4804                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4805            .args(escape_hatch_args())
4806    }
4807
4808    // gmail.users.settings.forwardingAddresses
4809    fn group_gmail_users_settings_forwarding_addresses() -> Command {
4810        Command::new("forwardingAddresses")
4811            .about("Methods under gmail.users.settings.forwardingAddresses")
4812            .subcommand_required(true)
4813            .subcommand(leaf_gmail_users_settings_forwarding_addresses_create())
4814            .subcommand(leaf_gmail_users_settings_forwarding_addresses_delete())
4815            .subcommand(leaf_gmail_users_settings_forwarding_addresses_get())
4816            .subcommand(leaf_gmail_users_settings_forwarding_addresses_list())
4817    }
4818
4819    // gmail.users.settings.getAutoForwarding
4820    fn leaf_gmail_users_settings_get_auto_forwarding() -> Command {
4821        Command::new("gmail.users.settings.getAutoForwarding")
4822            .visible_alias("getAutoForwarding")
4823            .about("Gets the auto-forwarding setting for the specified account. For more information, see Manage email...")
4824            .long_about("Gets the auto-forwarding setting for the specified account. For more information, see Manage email forwarding.")
4825            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4826                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4827            .args(escape_hatch_args())
4828    }
4829
4830    // gmail.users.settings.getImap
4831    fn leaf_gmail_users_settings_get_imap() -> Command {
4832        Command::new("gmail.users.settings.getImap")
4833            .visible_alias("getImap")
4834            .about("Gets IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
4835            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4836                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4837            .args(escape_hatch_args())
4838    }
4839
4840    // gmail.users.settings.getLanguage
4841    fn leaf_gmail_users_settings_get_language() -> Command {
4842        Command::new("gmail.users.settings.getLanguage")
4843            .visible_alias("getLanguage")
4844            .about("Gets language settings. For more information, see Manage language settings.")
4845            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4846                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4847            .args(escape_hatch_args())
4848    }
4849
4850    // gmail.users.settings.getPop
4851    fn leaf_gmail_users_settings_get_pop() -> Command {
4852        Command::new("gmail.users.settings.getPop")
4853            .visible_alias("getPop")
4854            .about("Gets POP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
4855            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4856                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4857            .args(escape_hatch_args())
4858    }
4859
4860    // gmail.users.settings.getVacation
4861    fn leaf_gmail_users_settings_get_vacation() -> Command {
4862        Command::new("gmail.users.settings.getVacation")
4863            .visible_alias("getVacation")
4864            .about("Gets vacation responder settings. For more information, see Manage vacation settings with the Gmail...")
4865            .long_about("Gets vacation responder settings. For more information, see Manage vacation settings with the Gmail API.")
4866            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4867                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4868            .args(escape_hatch_args())
4869    }
4870
4871    // gmail.users.settings.sendAs.create
4872    fn leaf_gmail_users_settings_send_as_create() -> Command {
4873        Command::new("gmail.users.settings.sendAs.create")
4874            .visible_alias("create")
4875            .about("Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect...")
4876            .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")
4877            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4878                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4879            .args(escape_hatch_args())
4880    }
4881
4882    // gmail.users.settings.sendAs.delete
4883    fn leaf_gmail_users_settings_send_as_delete() -> Command {
4884        Command::new("gmail.users.settings.sendAs.delete")
4885            .visible_alias("delete")
4886            .about("Deletes the specified send-as alias. Revokes any verification that may have been required for using...")
4887            .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")
4888            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4889                .help("The send-as alias to be deleted."))
4890            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4891                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4892            .args(escape_hatch_args())
4893    }
4894
4895    // gmail.users.settings.sendAs.get
4896    fn leaf_gmail_users_settings_send_as_get() -> Command {
4897        Command::new("gmail.users.settings.sendAs.get")
4898            .visible_alias("get")
4899            .about("Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a...")
4900            .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.")
4901            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4902                .help("The send-as alias to be retrieved."))
4903            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4904                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4905            .args(escape_hatch_args())
4906    }
4907
4908    // gmail.users.settings.sendAs.list
4909    fn leaf_gmail_users_settings_send_as_list() -> Command {
4910        Command::new("gmail.users.settings.sendAs.list")
4911            .visible_alias("list")
4912            .about("Lists the send-as aliases for the specified account. The result includes the primary send-as...")
4913            .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")
4914            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4915                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4916            .args(escape_hatch_args())
4917    }
4918
4919    // gmail.users.settings.sendAs.patch
4920    fn leaf_gmail_users_settings_send_as_patch() -> Command {
4921        Command::new("gmail.users.settings.sendAs.patch")
4922            .visible_alias("patch")
4923            .about("Patch the specified send-as alias. For more information, see Manage aliases and signatures with the...")
4924            .long_about("Patch the specified send-as alias. For more information, see Manage aliases and signatures with the Gmail API.")
4925            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4926                .help("The send-as alias to be updated."))
4927            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4928                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
4929            .args(escape_hatch_args())
4930    }
4931
4932    // gmail.users.settings.sendAs.smimeInfo.delete
4933    fn leaf_gmail_users_settings_send_as_smime_info_delete() -> Command {
4934        Command::new("gmail.users.settings.sendAs.smimeInfo.delete")
4935            .visible_alias("delete")
4936            .about("Deletes the specified S/MIME config for the specified send-as alias. For more information, see...")
4937            .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.")
4938            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4939                .help("The immutable ID for the SmimeInfo."))
4940            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4941                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4942            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4943                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4944            .args(escape_hatch_args())
4945    }
4946
4947    // gmail.users.settings.sendAs.smimeInfo.get
4948    fn leaf_gmail_users_settings_send_as_smime_info_get() -> Command {
4949        Command::new("gmail.users.settings.sendAs.smimeInfo.get")
4950            .visible_alias("get")
4951            .about("Gets the specified S/MIME config for the specified send-as alias. For more information, see Manage...")
4952            .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.")
4953            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4954                .help("The immutable ID for the SmimeInfo."))
4955            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4956                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4957            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4958                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4959            .args(escape_hatch_args())
4960    }
4961
4962    // gmail.users.settings.sendAs.smimeInfo.insert
4963    fn leaf_gmail_users_settings_send_as_smime_info_insert() -> Command {
4964        Command::new("gmail.users.settings.sendAs.smimeInfo.insert")
4965            .visible_alias("insert")
4966            .about("Insert (upload) the given S/MIME config for the specified send-as alias. Note that `pkcs12` format...")
4967            .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.")
4968            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4969                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4970            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4971                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4972            .args(escape_hatch_args())
4973    }
4974
4975    // gmail.users.settings.sendAs.smimeInfo.list
4976    fn leaf_gmail_users_settings_send_as_smime_info_list() -> Command {
4977        Command::new("gmail.users.settings.sendAs.smimeInfo.list")
4978            .visible_alias("list")
4979            .about("Lists S/MIME configs for the specified send-as alias. For more information, see Manage S/MIME...")
4980            .long_about("Lists S/MIME configs for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.")
4981            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4982                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4983            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4984                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
4985            .args(escape_hatch_args())
4986    }
4987
4988    // gmail.users.settings.sendAs.smimeInfo.setDefault
4989    fn leaf_gmail_users_settings_send_as_smime_info_set_default() -> Command {
4990        Command::new("gmail.users.settings.sendAs.smimeInfo.setDefault")
4991            .visible_alias("setDefault")
4992            .about("Sets the default S/MIME config for the specified send-as alias. For more information, see Manage...")
4993            .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.")
4994            .arg(Arg::new("id").long("id").value_name("ID").required(true)
4995                .help("The immutable ID for the SmimeInfo."))
4996            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
4997                .help("The email address that appears in the \"From:\" header for mail sent using this alias."))
4998            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
4999                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5000            .args(escape_hatch_args())
5001    }
5002
5003    // gmail.users.settings.sendAs.smimeInfo
5004    fn group_gmail_users_settings_send_as_smime_info() -> Command {
5005        Command::new("smimeInfo")
5006            .about("Methods under gmail.users.settings.sendAs.smimeInfo")
5007            .subcommand_required(true)
5008            .subcommand(leaf_gmail_users_settings_send_as_smime_info_delete())
5009            .subcommand(leaf_gmail_users_settings_send_as_smime_info_get())
5010            .subcommand(leaf_gmail_users_settings_send_as_smime_info_insert())
5011            .subcommand(leaf_gmail_users_settings_send_as_smime_info_list())
5012            .subcommand(leaf_gmail_users_settings_send_as_smime_info_set_default())
5013    }
5014
5015    // gmail.users.settings.sendAs.update
5016    fn leaf_gmail_users_settings_send_as_update() -> Command {
5017        Command::new("gmail.users.settings.sendAs.update")
5018            .visible_alias("update")
5019            .about("Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it...")
5020            .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")
5021            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
5022                .help("The send-as alias to be updated."))
5023            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5024                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5025            .args(escape_hatch_args())
5026    }
5027
5028    // gmail.users.settings.sendAs.verify
5029    fn leaf_gmail_users_settings_send_as_verify() -> Command {
5030        Command::new("gmail.users.settings.sendAs.verify")
5031            .visible_alias("verify")
5032            .about("Sends a verification email to the specified send-as alias address. The verification status must be...")
5033            .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")
5034            .arg(Arg::new("send-as-email").long("send-as-email").value_name("SEND_AS_EMAIL").required(true)
5035                .help("The send-as alias to be verified."))
5036            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5037                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5038            .args(escape_hatch_args())
5039    }
5040
5041    // gmail.users.settings.sendAs
5042    fn group_gmail_users_settings_send_as() -> Command {
5043        Command::new("sendAs")
5044            .about("Methods under gmail.users.settings.sendAs")
5045            .subcommand_required(true)
5046            .subcommand(leaf_gmail_users_settings_send_as_create())
5047            .subcommand(leaf_gmail_users_settings_send_as_delete())
5048            .subcommand(leaf_gmail_users_settings_send_as_get())
5049            .subcommand(leaf_gmail_users_settings_send_as_list())
5050            .subcommand(leaf_gmail_users_settings_send_as_patch())
5051            .subcommand(group_gmail_users_settings_send_as_smime_info())
5052            .subcommand(leaf_gmail_users_settings_send_as_update())
5053            .subcommand(leaf_gmail_users_settings_send_as_verify())
5054    }
5055
5056    // gmail.users.settings.updateAutoForwarding
5057    fn leaf_gmail_users_settings_update_auto_forwarding() -> Command {
5058        Command::new("gmail.users.settings.updateAutoForwarding")
5059            .visible_alias("updateAutoForwarding")
5060            .about("Updates the auto-forwarding setting for the specified account. A verified forwarding address must...")
5061            .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")
5062            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5063                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5064            .args(escape_hatch_args())
5065    }
5066
5067    // gmail.users.settings.updateImap
5068    fn leaf_gmail_users_settings_update_imap() -> Command {
5069        Command::new("gmail.users.settings.updateImap")
5070            .visible_alias("updateImap")
5071            .about("Updates IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
5072            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5073                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5074            .args(escape_hatch_args())
5075    }
5076
5077    // gmail.users.settings.updateLanguage
5078    fn leaf_gmail_users_settings_update_language() -> Command {
5079        Command::new("gmail.users.settings.updateLanguage")
5080            .visible_alias("updateLanguage")
5081            .about("Updates language settings. For more information, see Manage language settings. If successful, the...")
5082            .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")
5083            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5084                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5085            .args(escape_hatch_args())
5086    }
5087
5088    // gmail.users.settings.updatePop
5089    fn leaf_gmail_users_settings_update_pop() -> Command {
5090        Command::new("gmail.users.settings.updatePop")
5091            .visible_alias("updatePop")
5092            .about("Updates POP settings. For more information, see Configure POP and IMAP settings with the Gmail API.")
5093            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5094                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5095            .args(escape_hatch_args())
5096    }
5097
5098    // gmail.users.settings.updateVacation
5099    fn leaf_gmail_users_settings_update_vacation() -> Command {
5100        Command::new("gmail.users.settings.updateVacation")
5101            .visible_alias("updateVacation")
5102            .about("Updates vacation responder settings. For more information, see Manage vacation settings with the...")
5103            .long_about("Updates vacation responder settings. For more information, see Manage vacation settings with the Gmail API.")
5104            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5105                .help("User's email address. The special value \"me\" can be used to indicate the authenticated user."))
5106            .args(escape_hatch_args())
5107    }
5108
5109    // gmail.users.settings
5110    fn group_gmail_users_settings() -> Command {
5111        Command::new("settings")
5112            .about("Methods under gmail.users.settings")
5113            .subcommand_required(true)
5114            .subcommand(group_gmail_users_settings_cse())
5115            .subcommand(group_gmail_users_settings_delegates())
5116            .subcommand(group_gmail_users_settings_filters())
5117            .subcommand(group_gmail_users_settings_forwarding_addresses())
5118            .subcommand(leaf_gmail_users_settings_get_auto_forwarding())
5119            .subcommand(leaf_gmail_users_settings_get_imap())
5120            .subcommand(leaf_gmail_users_settings_get_language())
5121            .subcommand(leaf_gmail_users_settings_get_pop())
5122            .subcommand(leaf_gmail_users_settings_get_vacation())
5123            .subcommand(group_gmail_users_settings_send_as())
5124            .subcommand(leaf_gmail_users_settings_update_auto_forwarding())
5125            .subcommand(leaf_gmail_users_settings_update_imap())
5126            .subcommand(leaf_gmail_users_settings_update_language())
5127            .subcommand(leaf_gmail_users_settings_update_pop())
5128            .subcommand(leaf_gmail_users_settings_update_vacation())
5129    }
5130
5131    // gmail.users.stop
5132    fn leaf_gmail_users_stop() -> Command {
5133        Command::new("gmail.users.stop")
5134            .visible_alias("stop")
5135            .about("Turn off push notification delivery for the given user mailbox. For more information, see Configure...")
5136            .long_about("Turn off push notification delivery for the given user mailbox. For more information, see Configure push notifications in Gmail API.")
5137            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5138                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5139            .args(escape_hatch_args())
5140    }
5141
5142    // gmail.users.threads.delete
5143    fn leaf_gmail_users_threads_delete() -> Command {
5144        Command::new("gmail.users.threads.delete")
5145            .visible_alias("delete")
5146            .about("Immediately and permanently deletes the specified thread. Any messages that belong to the thread...")
5147            .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.")
5148            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5149                .help("ID of the Thread to delete."))
5150            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5151                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5152            .args(escape_hatch_args())
5153    }
5154
5155    // gmail.users.threads.get
5156    fn leaf_gmail_users_threads_get() -> Command {
5157        Command::new("gmail.users.threads.get")
5158            .visible_alias("get")
5159            .about("Gets the specified thread. For more information, see Manage threads.")
5160            .arg(Arg::new("param-format").long("param-format").value_name("PARAM_FORMAT").value_parser(["full", "metadata", "minimal"])
5161                .help("Discovery parameter `format`, renamed because --format is reserved here. The format to return the messages in."))
5162            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5163                .help("The ID of the thread to retrieve."))
5164            .arg(Arg::new("metadata-headers").long("metadata-headers").value_name("METADATA_HEADERS").action(ArgAction::Append)
5165                .help("When given and format is METADATA, only include headers specified."))
5166            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5167                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5168            .args(escape_hatch_args())
5169    }
5170
5171    // gmail.users.threads.list
5172    fn leaf_gmail_users_threads_list() -> Command {
5173        Command::new("gmail.users.threads.list")
5174            .visible_alias("list")
5175            .about("Lists the threads in the user's mailbox. For more information, see Manage threads.")
5176            .arg(Arg::new("include-spam-trash").long("include-spam-trash").action(ArgAction::SetTrue)
5177                .help("Include threads from `SPAM` and `TRASH` in the results."))
5178            .arg(Arg::new("label-ids").long("label-ids").value_name("LABEL_IDS").action(ArgAction::Append)
5179                .help("Only return threads with labels that match all of the specified label IDs."))
5180            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
5181                .help("Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500."))
5182            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5183                .help("Page token to retrieve a specific page of results in the list."))
5184            .arg(Arg::new("q").long("q").value_name("Q")
5185                .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:"))
5186            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5187                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5188            .args(escape_hatch_args())
5189    }
5190
5191    // gmail.users.threads.modify
5192    fn leaf_gmail_users_threads_modify() -> Command {
5193        Command::new("gmail.users.threads.modify")
5194            .visible_alias("modify")
5195            .about("Modifies the labels applied to the thread. This applies to all messages in the thread. For more...")
5196            .long_about("Modifies the labels applied to the thread. This applies to all messages in the thread. For more information, see Manage threads.")
5197            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5198                .help("The ID of the thread to modify."))
5199            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5200                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5201            .args(escape_hatch_args())
5202    }
5203
5204    // gmail.users.threads.trash
5205    fn leaf_gmail_users_threads_trash() -> Command {
5206        Command::new("gmail.users.threads.trash")
5207            .visible_alias("trash")
5208            .about("Moves the specified thread to the trash. Any messages that belong to the thread are also moved to...")
5209            .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.")
5210            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5211                .help("The ID of the thread to Trash."))
5212            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5213                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5214            .args(escape_hatch_args())
5215    }
5216
5217    // gmail.users.threads.untrash
5218    fn leaf_gmail_users_threads_untrash() -> Command {
5219        Command::new("gmail.users.threads.untrash")
5220            .visible_alias("untrash")
5221            .about("Removes the specified thread from the trash. Any messages that belong to the thread are also...")
5222            .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.")
5223            .arg(Arg::new("id").long("id").value_name("ID").required(true)
5224                .help("The ID of the thread to remove from Trash."))
5225            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5226                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5227            .args(escape_hatch_args())
5228    }
5229
5230    // gmail.users.threads
5231    fn group_gmail_users_threads() -> Command {
5232        Command::new("threads")
5233            .about("Methods under gmail.users.threads")
5234            .subcommand_required(true)
5235            .subcommand(leaf_gmail_users_threads_delete())
5236            .subcommand(leaf_gmail_users_threads_get())
5237            .subcommand(leaf_gmail_users_threads_list())
5238            .subcommand(leaf_gmail_users_threads_modify())
5239            .subcommand(leaf_gmail_users_threads_trash())
5240            .subcommand(leaf_gmail_users_threads_untrash())
5241    }
5242
5243    // gmail.users.watch
5244    fn leaf_gmail_users_watch() -> Command {
5245        Command::new("gmail.users.watch")
5246            .visible_alias("watch")
5247            .about("Set up or update a push notification watch on the given user mailbox. For more information, see...")
5248            .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.")
5249            .arg(Arg::new("user-id").long("user-id").value_name("USER_ID").required(true)
5250                .help("The user's email address. The special value `me` can be used to indicate the authenticated user."))
5251            .args(escape_hatch_args())
5252    }
5253
5254    // gmail.users
5255    fn group_gmail_users() -> Command {
5256        Command::new("users")
5257            .about("Methods under gmail.users")
5258            .subcommand_required(true)
5259            .subcommand(group_gmail_users_drafts())
5260            .subcommand(leaf_gmail_users_get_profile())
5261            .subcommand(group_gmail_users_history())
5262            .subcommand(group_gmail_users_labels())
5263            .subcommand(group_gmail_users_messages())
5264            .subcommand(group_gmail_users_settings())
5265            .subcommand(leaf_gmail_users_stop())
5266            .subcommand(group_gmail_users_threads())
5267            .subcommand(leaf_gmail_users_watch())
5268    }
5269
5270    // gmail
5271    fn service_gmail() -> Command {
5272        Command::new("gmail")
5273            .about("Gmail API operations (v1, 79 methods)")
5274            .subcommand_required(true)
5275            .subcommand(group_gmail_users())
5276    }
5277
5278    // people.contactGroups.batchGet
5279    fn leaf_people_contact_groups_batch_get() -> Command {
5280        Command::new("people.contactGroups.batchGet")
5281            .visible_alias("batchGet")
5282            .about("Get a list of contact groups owned by the authenticated user by specifying a list of contact group...")
5283            .long_about("Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.")
5284            .arg(Arg::new("group-fields").long("group-fields").value_name("GROUP_FIELDS")
5285                .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"))
5286            .arg(Arg::new("max-members").long("max-members").value_name("MAX_MEMBERS").value_parser(clap::value_parser!(i64))
5287                .help("Optional. Specifies the maximum number of members to return for each group. Defaults to 0 if not set, which will return zero members."))
5288            .arg(Arg::new("resource-names").long("resource-names").value_name("RESOURCE_NAMES").action(ArgAction::Append)
5289                .help("Required. The resource names of the contact groups to get. There is a maximum of 200 resource names."))
5290            .args(escape_hatch_args())
5291    }
5292
5293    // people.contactGroups.create
5294    fn leaf_people_contact_groups_create() -> Command {
5295        Command::new("people.contactGroups.create")
5296            .visible_alias("create")
5297            .about("Create a new contact group owned by the authenticated user. Created contact group names must be...")
5298            .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")
5299            .args(escape_hatch_args())
5300    }
5301
5302    // people.contactGroups.delete
5303    fn leaf_people_contact_groups_delete() -> Command {
5304        Command::new("people.contactGroups.delete")
5305            .visible_alias("delete")
5306            .about("Delete an existing contact group owned by the authenticated user by specifying a contact group...")
5307            .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.")
5308            .arg(Arg::new("delete-contacts").long("delete-contacts").action(ArgAction::SetTrue)
5309                .help("Optional. Set to true to also delete the contacts in the specified group."))
5310            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5311                .help("Required. The resource name of the contact group to delete."))
5312            .args(escape_hatch_args())
5313    }
5314
5315    // people.contactGroups.get
5316    fn leaf_people_contact_groups_get() -> Command {
5317        Command::new("people.contactGroups.get")
5318            .visible_alias("get")
5319            .about("Get a specific contact group owned by the authenticated user by specifying a contact group resource...")
5320            .long_about("Get a specific contact group owned by the authenticated user by specifying a contact group resource name.")
5321            .arg(Arg::new("group-fields").long("group-fields").value_name("GROUP_FIELDS")
5322                .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"))
5323            .arg(Arg::new("max-members").long("max-members").value_name("MAX_MEMBERS").value_parser(clap::value_parser!(i64))
5324                .help("Optional. Specifies the maximum number of members to return. Defaults to 0 if not set, which will return zero members."))
5325            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5326                .help("Required. The resource name of the contact group to get."))
5327            .args(escape_hatch_args())
5328    }
5329
5330    // people.contactGroups.list
5331    fn leaf_people_contact_groups_list() -> Command {
5332        Command::new("people.contactGroups.list")
5333            .visible_alias("list")
5334            .about("List all contact groups owned by the authenticated user. Members of the contact groups are not...")
5335            .long_about("List all contact groups owned by the authenticated user. Members of the contact groups are not populated.")
5336            .arg(Arg::new("group-fields").long("group-fields").value_name("GROUP_FIELDS")
5337                .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"))
5338            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5339                .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."))
5340            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5341                .help("Optional. The next_page_token value returned from a previous call to ListContactGroups. Requests the next page of reso"))
5342            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5343                .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."))
5344            .args(escape_hatch_args())
5345    }
5346
5347    // people.contactGroups.members.modify
5348    fn leaf_people_contact_groups_members_modify() -> Command {
5349        Command::new("people.contactGroups.members.modify")
5350            .visible_alias("modify")
5351            .about("Modify the members of a contact group owned by the authenticated user. The only system contact...")
5352            .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.")
5353            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5354                .help("Required. The resource name of the contact group to modify."))
5355            .args(escape_hatch_args())
5356    }
5357
5358    // people.contactGroups.members
5359    fn group_people_contact_groups_members() -> Command {
5360        Command::new("members")
5361            .about("Methods under people.contactGroups.members")
5362            .subcommand_required(true)
5363            .subcommand(leaf_people_contact_groups_members_modify())
5364    }
5365
5366    // people.contactGroups.update
5367    fn leaf_people_contact_groups_update() -> Command {
5368        Command::new("people.contactGroups.update")
5369            .visible_alias("update")
5370            .about("Update the name of an existing contact group owned by the authenticated user. Updated contact group...")
5371            .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")
5372            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5373                .help("The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contact_group_id}`."))
5374            .args(escape_hatch_args())
5375    }
5376
5377    // people.contactGroups
5378    fn group_people_contact_groups() -> Command {
5379        Command::new("contactGroups")
5380            .about("Methods under people.contactGroups")
5381            .subcommand_required(true)
5382            .subcommand(leaf_people_contact_groups_batch_get())
5383            .subcommand(leaf_people_contact_groups_create())
5384            .subcommand(leaf_people_contact_groups_delete())
5385            .subcommand(leaf_people_contact_groups_get())
5386            .subcommand(leaf_people_contact_groups_list())
5387            .subcommand(group_people_contact_groups_members())
5388            .subcommand(leaf_people_contact_groups_update())
5389    }
5390
5391    // people.otherContacts.copyOtherContactToMyContactsGroup
5392    fn leaf_people_other_contacts_copy_other_contact_to_my_contacts_group() -> Command {
5393        Command::new("people.otherContacts.copyOtherContactToMyContactsGroup")
5394            .visible_alias("copyOtherContactToMyContactsGroup")
5395            .about("Copies an \"Other contact\" to a new contact in the user's \"myContacts\" group Mutate requests for the...")
5396            .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.")
5397            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5398                .help("Required. The resource name of the \"Other contact\" to copy."))
5399            .args(escape_hatch_args())
5400    }
5401
5402    // people.otherContacts.list
5403    fn leaf_people_other_contacts_list() -> Command {
5404        Command::new("people.otherContacts.list")
5405            .visible_alias("list")
5406            .about("List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are...")
5407            .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")
5408            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5409                .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."))
5410            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5411                .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"))
5412            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5413                .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"))
5414            .arg(Arg::new("request-sync-token").long("request-sync-token").action(ArgAction::SetTrue)
5415                .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"))
5416            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5417                .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"))
5418            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5419                .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"))
5420            .args(escape_hatch_args())
5421    }
5422
5423    // people.otherContacts.search
5424    fn leaf_people_other_contacts_search() -> Command {
5425        Command::new("people.otherContacts.search")
5426            .visible_alias("search")
5427            .about("Provides a list of contacts in the authenticated user's other contacts that matches the search...")
5428            .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")
5429            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5430                .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."))
5431            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
5432                .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\""))
5433            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5434                .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:"))
5435            .args(escape_hatch_args())
5436    }
5437
5438    // people.otherContacts
5439    fn group_people_other_contacts() -> Command {
5440        Command::new("otherContacts")
5441            .about("Methods under people.otherContacts")
5442            .subcommand_required(true)
5443            .subcommand(leaf_people_other_contacts_copy_other_contact_to_my_contacts_group())
5444            .subcommand(leaf_people_other_contacts_list())
5445            .subcommand(leaf_people_other_contacts_search())
5446    }
5447
5448    // people.people.batchCreateContacts
5449    fn leaf_people_people_batch_create_contacts() -> Command {
5450        Command::new("people.people.batchCreateContacts")
5451            .visible_alias("batchCreateContacts")
5452            .about("Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the...")
5453            .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.")
5454            .args(escape_hatch_args())
5455    }
5456
5457    // people.people.batchDeleteContacts
5458    fn leaf_people_people_batch_delete_contacts() -> Command {
5459        Command::new("people.people.batchDeleteContacts")
5460            .visible_alias("batchDeleteContacts")
5461            .about("Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same...")
5462            .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.")
5463            .args(escape_hatch_args())
5464    }
5465
5466    // people.people.batchUpdateContacts
5467    fn leaf_people_people_batch_update_contacts() -> Command {
5468        Command::new("people.people.batchUpdateContacts")
5469            .visible_alias("batchUpdateContacts")
5470            .about("Update a batch of contacts and return a map of resource names to PersonResponses for the updated...")
5471            .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.")
5472            .args(escape_hatch_args())
5473    }
5474
5475    // people.people.connections.list
5476    fn leaf_people_people_connections_list() -> Command {
5477        Command::new("people.people.connections.list")
5478            .visible_alias("list")
5479            .about("Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full...")
5480            .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")
5481            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5482                .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."))
5483            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5484                .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"))
5485            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5486                .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:"))
5487            .arg(Arg::new("request-mask-include-field").long("request-mask-include-field").value_name("REQUEST_MASK_INCLUDE_FIELD")
5488                .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"))
5489            .arg(Arg::new("request-sync-token").long("request-sync-token").action(ArgAction::SetTrue)
5490                .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"))
5491            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5492                .help("Required. The resource name to return connections for. Only `people/me` is valid."))
5493            .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"])
5494                .help("Optional. The order in which the connections should be sorted. Defaults to `LAST_MODIFIED_ASCENDING`."))
5495            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5496                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5497            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5498                .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"))
5499            .args(escape_hatch_args())
5500    }
5501
5502    // people.people.connections
5503    fn group_people_people_connections() -> Command {
5504        Command::new("connections")
5505            .about("Methods under people.people.connections")
5506            .subcommand_required(true)
5507            .subcommand(leaf_people_people_connections_list())
5508    }
5509
5510    // people.people.createContact
5511    fn leaf_people_people_create_contact() -> Command {
5512        Command::new("people.people.createContact")
5513            .visible_alias("createContact")
5514            .about("Create a new contact and return the person resource for that contact. The request returns a 400...")
5515            .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")
5516            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5517                .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"))
5518            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5519                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5520            .args(escape_hatch_args())
5521    }
5522
5523    // people.people.deleteContact
5524    fn leaf_people_people_delete_contact() -> Command {
5525        Command::new("people.people.deleteContact")
5526            .visible_alias("deleteContact")
5527            .about("Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same...")
5528            .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.")
5529            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5530                .help("Required. The resource name of the contact to delete."))
5531            .args(escape_hatch_args())
5532    }
5533
5534    // people.people.deleteContactPhoto
5535    fn leaf_people_people_delete_contact_photo() -> Command {
5536        Command::new("people.people.deleteContactPhoto")
5537            .visible_alias("deleteContactPhoto")
5538            .about("Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid //...")
5539            .long_about("Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.")
5540            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5541                .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"))
5542            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5543                .help("Required. The resource name of the contact whose photo will be deleted."))
5544            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5545                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5546            .args(escape_hatch_args())
5547    }
5548
5549    // people.people.get
5550    fn leaf_people_people_get() -> Command {
5551        Command::new("people.people.get")
5552            .visible_alias("get")
5553            .about("Provides information about a person by specifying a resource name. Use `people/me` to indicate the...")
5554            .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.")
5555            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5556                .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: *"))
5557            .arg(Arg::new("request-mask-include-field").long("request-mask-include-field").value_name("REQUEST_MASK_INCLUDE_FIELD")
5558                .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"))
5559            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5560                .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"))
5561            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5562                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_PROFILE and READ_SOURCE_TYPE_CONTACT if not set."))
5563            .args(escape_hatch_args())
5564    }
5565
5566    // people.people.getBatchGet
5567    fn leaf_people_people_get_batch_get() -> Command {
5568        Command::new("people.people.getBatchGet")
5569            .visible_alias("getBatchGet")
5570            .about("Provides information about a list of specific people by specifying a list of requested resource...")
5571            .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.")
5572            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5573                .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:"))
5574            .arg(Arg::new("request-mask-include-field").long("request-mask-include-field").value_name("REQUEST_MASK_INCLUDE_FIELD")
5575                .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"))
5576            .arg(Arg::new("resource-names").long("resource-names").value_name("RESOURCE_NAMES").action(ArgAction::Append)
5577                .help("Required. The resource names of the people to provide information about. It's repeatable. The URL query parameter should be resourceNames=<name1>&resourceNames="))
5578            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5579                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5580            .args(escape_hatch_args())
5581    }
5582
5583    // people.people.listDirectoryPeople
5584    fn leaf_people_people_list_directory_people() -> Command {
5585        Command::new("people.people.listDirectoryPeople")
5586            .visible_alias("listDirectoryPeople")
5587            .about("Provides a list of domain profiles and domain contacts in the authenticated user's domain...")
5588            .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")
5589            .arg(Arg::new("merge-sources").long("merge-sources").value_name("MERGE_SOURCES").action(ArgAction::Append)
5590                .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."))
5591            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5592                .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."))
5593            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5594                .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"))
5595            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5596                .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:"))
5597            .arg(Arg::new("request-sync-token").long("request-sync-token").action(ArgAction::SetTrue)
5598                .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"))
5599            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5600                .help("Required. Directory sources to return."))
5601            .arg(Arg::new("sync-token").long("sync-token").value_name("SYNC_TOKEN")
5602                .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"))
5603            .args(escape_hatch_args())
5604    }
5605
5606    // people.people.searchContacts
5607    fn leaf_people_people_search_contacts() -> Command {
5608        Command::new("people.people.searchContacts")
5609            .visible_alias("searchContacts")
5610            .about("Provides a list of contacts in the authenticated user's grouped contacts that matches the search...")
5611            .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")
5612            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5613                .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."))
5614            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
5615                .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\""))
5616            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5617                .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:"))
5618            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5619                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set."))
5620            .args(escape_hatch_args())
5621    }
5622
5623    // people.people.searchDirectoryPeople
5624    fn leaf_people_people_search_directory_people() -> Command {
5625        Command::new("people.people.searchDirectoryPeople")
5626            .visible_alias("searchDirectoryPeople")
5627            .about("Provides a list of domain profiles and domain contacts in the authenticated user's domain directory...")
5628            .long_about("Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.")
5629            .arg(Arg::new("merge-sources").long("merge-sources").value_name("MERGE_SOURCES").action(ArgAction::Append)
5630                .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."))
5631            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5632                .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."))
5633            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5634                .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"))
5635            .arg(Arg::new("param-query").long("param-query").value_name("PARAM_QUERY")
5636                .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."))
5637            .arg(Arg::new("read-mask").long("read-mask").value_name("READ_MASK")
5638                .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:"))
5639            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5640                .help("Required. Directory sources to return."))
5641            .args(escape_hatch_args())
5642    }
5643
5644    // people.people.updateContact
5645    fn leaf_people_people_update_contact() -> Command {
5646        Command::new("people.people.updateContact")
5647            .visible_alias("updateContact")
5648            .about("Update contact data for an existing contact person. Any non-contact data will not be modified. Any...")
5649            .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")
5650            .arg(Arg::new("person-fields").long("person-fields").value_name("PERSON_FIELDS")
5651                .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"))
5652            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5653                .help("The resource name for the person, assigned by the server. An ASCII string in the form of `people/{person_id}`."))
5654            .arg(Arg::new("sources").long("sources").value_name("SOURCES").action(ArgAction::Append)
5655                .help("Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set."))
5656            .arg(Arg::new("update-person-fields").long("update-person-fields").value_name("UPDATE_PERSON_FIELDS")
5657                .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"))
5658            .args(escape_hatch_args())
5659    }
5660
5661    // people.people.updateContactPhoto
5662    fn leaf_people_people_update_contact_photo() -> Command {
5663        Command::new("people.people.updateContactPhoto")
5664            .visible_alias("updateContactPhoto")
5665            .about("Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid...")
5666            .long_about("Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.")
5667            .arg(Arg::new("resource-name").long("resource-name").value_name("RESOURCE_NAME").required(true)
5668                .help("Required. Person resource name"))
5669            .args(escape_hatch_args())
5670    }
5671
5672    // people.people
5673    fn group_people_people() -> Command {
5674        Command::new("people")
5675            .about("Methods under people.people")
5676            .subcommand_required(true)
5677            .subcommand(leaf_people_people_batch_create_contacts())
5678            .subcommand(leaf_people_people_batch_delete_contacts())
5679            .subcommand(leaf_people_people_batch_update_contacts())
5680            .subcommand(group_people_people_connections())
5681            .subcommand(leaf_people_people_create_contact())
5682            .subcommand(leaf_people_people_delete_contact())
5683            .subcommand(leaf_people_people_delete_contact_photo())
5684            .subcommand(leaf_people_people_get())
5685            .subcommand(leaf_people_people_get_batch_get())
5686            .subcommand(leaf_people_people_list_directory_people())
5687            .subcommand(leaf_people_people_search_contacts())
5688            .subcommand(leaf_people_people_search_directory_people())
5689            .subcommand(leaf_people_people_update_contact())
5690            .subcommand(leaf_people_people_update_contact_photo())
5691    }
5692
5693    // people
5694    fn service_people() -> Command {
5695        Command::new("people")
5696            .about("People API operations (v1, 24 methods)")
5697            .subcommand_required(true)
5698            .subcommand(group_people_contact_groups())
5699            .subcommand(group_people_other_contacts())
5700            .subcommand(group_people_people())
5701    }
5702
5703    // script.processes.list
5704    fn leaf_script_processes_list() -> Command {
5705        Command::new("script.processes.list")
5706            .visible_alias("list")
5707            .about("List information about processes made by or on behalf of a user, such as process type and current...")
5708            .long_about("List information about processes made by or on behalf of a user, such as process type and current status.")
5709            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5710                .help("The maximum number of returned processes per page of results. Defaults to 50."))
5711            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5712                .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."))
5713            .arg(Arg::new("user-process-filter-deployment-id").long("user-process-filter-deployment-id").value_name("USER_PROCESS_FILTER_DEPLOYMENT_ID")
5714                .help("Optional field used to limit returned processes to those originating from projects with a specific deployment ID."))
5715            .arg(Arg::new("user-process-filter-end-time").long("user-process-filter-end-time").value_name("USER_PROCESS_FILTER_END_TIME")
5716                .help("Optional field used to limit returned processes to those that completed on or before the given timestamp."))
5717            .arg(Arg::new("user-process-filter-function-name").long("user-process-filter-function-name").value_name("USER_PROCESS_FILTER_FUNCTION_NAME")
5718                .help("Optional field used to limit returned processes to those originating from a script function with the given function name."))
5719            .arg(Arg::new("user-process-filter-project-name").long("user-process-filter-project-name").value_name("USER_PROCESS_FILTER_PROJECT_NAME")
5720                .help("Optional field used to limit returned processes to those originating from projects with project names containing a specific string."))
5721            .arg(Arg::new("user-process-filter-script-id").long("user-process-filter-script-id").value_name("USER_PROCESS_FILTER_SCRIPT_ID")
5722                .help("Optional field used to limit returned processes to those originating from projects with a specific script ID."))
5723            .arg(Arg::new("user-process-filter-start-time").long("user-process-filter-start-time").value_name("USER_PROCESS_FILTER_START_TIME")
5724                .help("Optional field used to limit returned processes to those that were started on or after the given timestamp."))
5725            .arg(Arg::new("user-process-filter-statuses").long("user-process-filter-statuses").value_name("USER_PROCESS_FILTER_STATUSES").action(ArgAction::Append)
5726                .help("Optional field used to limit returned processes to those having one of the specified process statuses."))
5727            .arg(Arg::new("user-process-filter-types").long("user-process-filter-types").value_name("USER_PROCESS_FILTER_TYPES").action(ArgAction::Append)
5728                .help("Optional field used to limit returned processes to those having one of the specified process types."))
5729            .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)
5730                .help("Optional field used to limit returned processes to those having one of the specified user access levels."))
5731            .args(escape_hatch_args())
5732    }
5733
5734    // script.processes.listScriptProcesses
5735    fn leaf_script_processes_list_script_processes() -> Command {
5736        Command::new("script.processes.listScriptProcesses")
5737            .visible_alias("listScriptProcesses")
5738            .about("List information about a script's executed processes, such as process type and current status.")
5739            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5740                .help("The maximum number of returned processes per page of results. Defaults to 50."))
5741            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5742                .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."))
5743            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID")
5744                .help("The script ID of the project whose processes are listed."))
5745            .arg(Arg::new("script-process-filter-deployment-id").long("script-process-filter-deployment-id").value_name("SCRIPT_PROCESS_FILTER_DEPLOYMENT_ID")
5746                .help("Optional field used to limit returned processes to those originating from projects with a specific deployment ID."))
5747            .arg(Arg::new("script-process-filter-end-time").long("script-process-filter-end-time").value_name("SCRIPT_PROCESS_FILTER_END_TIME")
5748                .help("Optional field used to limit returned processes to those that completed on or before the given timestamp."))
5749            .arg(Arg::new("script-process-filter-function-name").long("script-process-filter-function-name").value_name("SCRIPT_PROCESS_FILTER_FUNCTION_NAME")
5750                .help("Optional field used to limit returned processes to those originating from a script function with the given function name."))
5751            .arg(Arg::new("script-process-filter-start-time").long("script-process-filter-start-time").value_name("SCRIPT_PROCESS_FILTER_START_TIME")
5752                .help("Optional field used to limit returned processes to those that were started on or after the given timestamp."))
5753            .arg(Arg::new("script-process-filter-statuses").long("script-process-filter-statuses").value_name("SCRIPT_PROCESS_FILTER_STATUSES").action(ArgAction::Append)
5754                .help("Optional field used to limit returned processes to those having one of the specified process statuses."))
5755            .arg(Arg::new("script-process-filter-types").long("script-process-filter-types").value_name("SCRIPT_PROCESS_FILTER_TYPES").action(ArgAction::Append)
5756                .help("Optional field used to limit returned processes to those having one of the specified process types."))
5757            .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)
5758                .help("Optional field used to limit returned processes to those having one of the specified user access levels."))
5759            .args(escape_hatch_args())
5760    }
5761
5762    // script.processes
5763    fn group_script_processes() -> Command {
5764        Command::new("processes")
5765            .about("Methods under script.processes")
5766            .subcommand_required(true)
5767            .subcommand(leaf_script_processes_list())
5768            .subcommand(leaf_script_processes_list_script_processes())
5769    }
5770
5771    // script.projects.create
5772    fn leaf_script_projects_create() -> Command {
5773        Command::new("script.projects.create")
5774            .visible_alias("create")
5775            .about("Creates a new, empty script project with no script files and a base manifest file.")
5776            .args(escape_hatch_args())
5777    }
5778
5779    // script.projects.deployments.create
5780    fn leaf_script_projects_deployments_create() -> Command {
5781        Command::new("script.projects.deployments.create")
5782            .visible_alias("create")
5783            .about("Creates a deployment of an Apps Script project.")
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.delete
5790    fn leaf_script_projects_deployments_delete() -> Command {
5791        Command::new("script.projects.deployments.delete")
5792            .visible_alias("delete")
5793            .about("Deletes 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 to be undeployed."))
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.get
5802    fn leaf_script_projects_deployments_get() -> Command {
5803        Command::new("script.projects.deployments.get")
5804            .visible_alias("get")
5805            .about("Gets a deployment of an Apps Script project.")
5806            .arg(Arg::new("deployment-id").long("deployment-id").value_name("DEPLOYMENT_ID").required(true)
5807                .help("The deployment ID."))
5808            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5809                .help("The script project's Drive ID."))
5810            .args(escape_hatch_args())
5811    }
5812
5813    // script.projects.deployments.list
5814    fn leaf_script_projects_deployments_list() -> Command {
5815        Command::new("script.projects.deployments.list")
5816            .visible_alias("list")
5817            .about("Lists the deployments of an Apps Script project.")
5818            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5819                .help("The maximum number of deployments on each returned page. Defaults to 50."))
5820            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5821                .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."))
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.update
5828    fn leaf_script_projects_deployments_update() -> Command {
5829        Command::new("script.projects.deployments.update")
5830            .visible_alias("update")
5831            .about("Updates a deployment of an Apps Script project.")
5832            .arg(Arg::new("deployment-id").long("deployment-id").value_name("DEPLOYMENT_ID").required(true)
5833                .help("The deployment ID for this deployment."))
5834            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5835                .help("The script project's Drive ID."))
5836            .args(escape_hatch_args())
5837    }
5838
5839    // script.projects.deployments
5840    fn group_script_projects_deployments() -> Command {
5841        Command::new("deployments")
5842            .about("Methods under script.projects.deployments")
5843            .subcommand_required(true)
5844            .subcommand(leaf_script_projects_deployments_create())
5845            .subcommand(leaf_script_projects_deployments_delete())
5846            .subcommand(leaf_script_projects_deployments_get())
5847            .subcommand(leaf_script_projects_deployments_list())
5848            .subcommand(leaf_script_projects_deployments_update())
5849    }
5850
5851    // script.projects.get
5852    fn leaf_script_projects_get() -> Command {
5853        Command::new("script.projects.get")
5854            .visible_alias("get")
5855            .about("Gets a script project's metadata.")
5856            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5857                .help("The script project's Drive ID."))
5858            .args(escape_hatch_args())
5859    }
5860
5861    // script.projects.getContent
5862    fn leaf_script_projects_get_content() -> Command {
5863        Command::new("script.projects.getContent")
5864            .visible_alias("getContent")
5865            .about("Gets the content of the script project, including the code source and metadata for each script file.")
5866            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5867                .help("The script project's Drive ID."))
5868            .arg(Arg::new("version-number").long("version-number").value_name("VERSION_NUMBER").value_parser(clap::value_parser!(i64))
5869                .help("The version number of the project to retrieve. If not provided, the project's HEAD version is returned."))
5870            .args(escape_hatch_args())
5871    }
5872
5873    // script.projects.getMetrics
5874    fn leaf_script_projects_get_metrics() -> Command {
5875        Command::new("script.projects.getMetrics")
5876            .visible_alias("getMetrics")
5877            .about("Get metrics data for scripts, such as number of executions and active users.")
5878            .arg(Arg::new("metrics-filter-deployment-id").long("metrics-filter-deployment-id").value_name("METRICS_FILTER_DEPLOYMENT_ID")
5879                .help("Optional field indicating a specific deployment to retrieve metrics from."))
5880            .arg(Arg::new("metrics-granularity").long("metrics-granularity").value_name("METRICS_GRANULARITY").value_parser(["UNSPECIFIED_GRANULARITY", "WEEKLY", "DAILY"])
5881                .help("Required field indicating what granularity of metrics are returned."))
5882            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5883                .help("Required field indicating the script to get metrics for."))
5884            .args(escape_hatch_args())
5885    }
5886
5887    // script.projects.updateContent
5888    fn leaf_script_projects_update_content() -> Command {
5889        Command::new("script.projects.updateContent")
5890            .visible_alias("updateContent")
5891            .about("Updates the content of the specified script project. This content is stored as the HEAD version...")
5892            .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")
5893            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5894                .help("The script project's Drive ID."))
5895            .args(escape_hatch_args())
5896    }
5897
5898    // script.projects.versions.create
5899    fn leaf_script_projects_versions_create() -> Command {
5900        Command::new("script.projects.versions.create")
5901            .visible_alias("create")
5902            .about("Creates a new immutable version using the current code, with a unique version number.")
5903            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5904                .help("The script project's Drive ID."))
5905            .args(escape_hatch_args())
5906    }
5907
5908    // script.projects.versions.get
5909    fn leaf_script_projects_versions_get() -> Command {
5910        Command::new("script.projects.versions.get")
5911            .visible_alias("get")
5912            .about("Gets a version of a script project.")
5913            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5914                .help("The script project's Drive ID."))
5915            .arg(Arg::new("version-number").long("version-number").value_name("VERSION_NUMBER").value_parser(clap::value_parser!(i64)).required(true)
5916                .help("The version number."))
5917            .args(escape_hatch_args())
5918    }
5919
5920    // script.projects.versions.list
5921    fn leaf_script_projects_versions_list() -> Command {
5922        Command::new("script.projects.versions.list")
5923            .visible_alias("list")
5924            .about("List the versions of a script project.")
5925            .arg(Arg::new("page-size").long("page-size").value_name("PAGE_SIZE").value_parser(clap::value_parser!(i64))
5926                .help("The maximum number of versions on each returned page. Defaults to 50."))
5927            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
5928                .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."))
5929            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5930                .help("The script project's Drive ID."))
5931            .args(escape_hatch_args())
5932    }
5933
5934    // script.projects.versions
5935    fn group_script_projects_versions() -> Command {
5936        Command::new("versions")
5937            .about("Methods under script.projects.versions")
5938            .subcommand_required(true)
5939            .subcommand(leaf_script_projects_versions_create())
5940            .subcommand(leaf_script_projects_versions_get())
5941            .subcommand(leaf_script_projects_versions_list())
5942    }
5943
5944    // script.projects
5945    fn group_script_projects() -> Command {
5946        Command::new("projects")
5947            .about("Methods under script.projects")
5948            .subcommand_required(true)
5949            .subcommand(leaf_script_projects_create())
5950            .subcommand(group_script_projects_deployments())
5951            .subcommand(leaf_script_projects_get())
5952            .subcommand(leaf_script_projects_get_content())
5953            .subcommand(leaf_script_projects_get_metrics())
5954            .subcommand(leaf_script_projects_update_content())
5955            .subcommand(group_script_projects_versions())
5956    }
5957
5958    // script.scripts.run
5959    fn leaf_script_scripts_run() -> Command {
5960        Command::new("script.scripts.run")
5961            .visible_alias("run")
5962            .about("")
5963            .arg(Arg::new("script-id").long("script-id").value_name("SCRIPT_ID").required(true)
5964                .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"))
5965            .args(escape_hatch_args())
5966    }
5967
5968    // script.scripts
5969    fn group_script_scripts() -> Command {
5970        Command::new("scripts")
5971            .about("Methods under script.scripts")
5972            .subcommand_required(true)
5973            .subcommand(leaf_script_scripts_run())
5974    }
5975
5976    // script
5977    fn service_script() -> Command {
5978        Command::new("script")
5979            .about("Apps Script API operations (v1, 16 methods)")
5980            .subcommand_required(true)
5981            .subcommand(group_script_processes())
5982            .subcommand(group_script_projects())
5983            .subcommand(group_script_scripts())
5984    }
5985
5986    // searchconsole.searchanalytics.query
5987    fn leaf_searchconsole_searchanalytics_query() -> Command {
5988        Command::new("searchconsole.searchanalytics.query")
5989            .visible_alias("query")
5990            .about("Query your data with filters and parameters that you define. Returns zero or more rows grouped by...")
5991            .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")
5992            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
5993                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
5994            .args(escape_hatch_args())
5995    }
5996
5997    // searchconsole.searchanalytics
5998    fn group_searchconsole_searchanalytics() -> Command {
5999        Command::new("searchanalytics")
6000            .about("Methods under searchconsole.searchanalytics")
6001            .subcommand_required(true)
6002            .subcommand(leaf_searchconsole_searchanalytics_query())
6003    }
6004
6005    // searchconsole.sitemaps.delete
6006    fn leaf_searchconsole_sitemaps_delete() -> Command {
6007        Command::new("searchconsole.sitemaps.delete")
6008            .visible_alias("delete")
6009            .about("Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the...")
6010            .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.")
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.get
6019    fn leaf_searchconsole_sitemaps_get() -> Command {
6020        Command::new("searchconsole.sitemaps.get")
6021            .visible_alias("get")
6022            .about("Retrieves information about a specific sitemap.")
6023            .arg(Arg::new("feedpath").long("feedpath").value_name("FEEDPATH").required(true)
6024                .help("The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`."))
6025            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6026                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
6027            .args(escape_hatch_args())
6028    }
6029
6030    // searchconsole.sitemaps.list
6031    fn leaf_searchconsole_sitemaps_list() -> Command {
6032        Command::new("searchconsole.sitemaps.list")
6033            .visible_alias("list")
6034            .about("Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if...")
6035            .long_about("Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).")
6036            .arg(Arg::new("sitemap-index").long("sitemap-index").value_name("SITEMAP_INDEX")
6037                .help("A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.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.submit
6044    fn leaf_searchconsole_sitemaps_submit() -> Command {
6045        Command::new("searchconsole.sitemaps.submit")
6046            .visible_alias("submit")
6047            .about("Submits a sitemap for a site.")
6048            .arg(Arg::new("feedpath").long("feedpath").value_name("FEEDPATH").required(true)
6049                .help("The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`."))
6050            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6051                .help("The site's URL, including protocol. For example: `http://www.example.com/`."))
6052            .args(escape_hatch_args())
6053    }
6054
6055    // searchconsole.sitemaps
6056    fn group_searchconsole_sitemaps() -> Command {
6057        Command::new("sitemaps")
6058            .about("Methods under searchconsole.sitemaps")
6059            .subcommand_required(true)
6060            .subcommand(leaf_searchconsole_sitemaps_delete())
6061            .subcommand(leaf_searchconsole_sitemaps_get())
6062            .subcommand(leaf_searchconsole_sitemaps_list())
6063            .subcommand(leaf_searchconsole_sitemaps_submit())
6064    }
6065
6066    // searchconsole.sites.add
6067    fn leaf_searchconsole_sites_add() -> Command {
6068        Command::new("searchconsole.sites.add")
6069            .visible_alias("add")
6070            .about("Adds a site to the set of the user's sites in Search Console.")
6071            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6072                .help("The URL of the site to add."))
6073            .args(escape_hatch_args())
6074    }
6075
6076    // searchconsole.sites.delete
6077    fn leaf_searchconsole_sites_delete() -> Command {
6078        Command::new("searchconsole.sites.delete")
6079            .visible_alias("delete")
6080            .about("Removes a site from the set of the user's Search Console sites.")
6081            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6082                .help("The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`."))
6083            .args(escape_hatch_args())
6084    }
6085
6086    // searchconsole.sites.get
6087    fn leaf_searchconsole_sites_get() -> Command {
6088        Command::new("searchconsole.sites.get")
6089            .visible_alias("get")
6090            .about("Retrieves information about specific site.")
6091            .arg(Arg::new("site-url").long("site-url").value_name("SITE_URL").required(true)
6092                .help("The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`."))
6093            .args(escape_hatch_args())
6094    }
6095
6096    // searchconsole.sites.list
6097    fn leaf_searchconsole_sites_list() -> Command {
6098        Command::new("searchconsole.sites.list")
6099            .visible_alias("list")
6100            .about("Lists the user's Search Console sites.")
6101            .args(escape_hatch_args())
6102    }
6103
6104    // searchconsole.sites
6105    fn group_searchconsole_sites() -> Command {
6106        Command::new("sites")
6107            .about("Methods under searchconsole.sites")
6108            .subcommand_required(true)
6109            .subcommand(leaf_searchconsole_sites_add())
6110            .subcommand(leaf_searchconsole_sites_delete())
6111            .subcommand(leaf_searchconsole_sites_get())
6112            .subcommand(leaf_searchconsole_sites_list())
6113    }
6114
6115    // searchconsole.urlInspection.index.inspect
6116    fn leaf_searchconsole_url_inspection_index_inspect() -> Command {
6117        Command::new("searchconsole.urlInspection.index.inspect")
6118            .visible_alias("inspect")
6119            .about("Index inspection.")
6120            .args(escape_hatch_args())
6121    }
6122
6123    // searchconsole.urlInspection.index
6124    fn group_searchconsole_url_inspection_index() -> Command {
6125        Command::new("index")
6126            .about("Methods under searchconsole.urlInspection.index")
6127            .subcommand_required(true)
6128            .subcommand(leaf_searchconsole_url_inspection_index_inspect())
6129    }
6130
6131    // searchconsole.urlInspection
6132    fn group_searchconsole_url_inspection() -> Command {
6133        Command::new("urlInspection")
6134            .about("Methods under searchconsole.urlInspection")
6135            .subcommand_required(true)
6136            .subcommand(group_searchconsole_url_inspection_index())
6137    }
6138
6139    // searchconsole.urlTestingTools.mobileFriendlyTest.run
6140    fn leaf_searchconsole_url_testing_tools_mobile_friendly_test_run() -> Command {
6141        Command::new("searchconsole.urlTestingTools.mobileFriendlyTest.run")
6142            .visible_alias("run")
6143            .about("Runs Mobile-Friendly Test for a given URL.")
6144            .args(escape_hatch_args())
6145    }
6146
6147    // searchconsole.urlTestingTools.mobileFriendlyTest
6148    fn group_searchconsole_url_testing_tools_mobile_friendly_test() -> Command {
6149        Command::new("mobileFriendlyTest")
6150            .about("Methods under searchconsole.urlTestingTools.mobileFriendlyTest")
6151            .subcommand_required(true)
6152            .subcommand(leaf_searchconsole_url_testing_tools_mobile_friendly_test_run())
6153    }
6154
6155    // searchconsole.urlTestingTools
6156    fn group_searchconsole_url_testing_tools() -> Command {
6157        Command::new("urlTestingTools")
6158            .about("Methods under searchconsole.urlTestingTools")
6159            .subcommand_required(true)
6160            .subcommand(group_searchconsole_url_testing_tools_mobile_friendly_test())
6161    }
6162
6163    // searchconsole
6164    fn service_searchconsole() -> Command {
6165        Command::new("searchconsole")
6166            .about("Google Search Console API operations (v1, 11 methods)")
6167            .subcommand_required(true)
6168            .subcommand(group_searchconsole_searchanalytics())
6169            .subcommand(group_searchconsole_sitemaps())
6170            .subcommand(group_searchconsole_sites())
6171            .subcommand(group_searchconsole_url_inspection())
6172            .subcommand(group_searchconsole_url_testing_tools())
6173    }
6174
6175    // sheets.spreadsheets.batchUpdate
6176    fn leaf_sheets_spreadsheets_batch_update() -> Command {
6177        Command::new("sheets.spreadsheets.batchUpdate")
6178            .visible_alias("batchUpdate")
6179            .about("Applies one or more updates to the spreadsheet. Each request is validated before being applied. If...")
6180            .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")
6181            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6182                .help("The spreadsheet to apply the updates to."))
6183            .args(escape_hatch_args())
6184    }
6185
6186    // sheets.spreadsheets.create
6187    fn leaf_sheets_spreadsheets_create() -> Command {
6188        Command::new("sheets.spreadsheets.create")
6189            .visible_alias("create")
6190            .about("Creates a spreadsheet, returning the newly created spreadsheet.")
6191            .args(escape_hatch_args())
6192    }
6193
6194    // sheets.spreadsheets.developerMetadata.get
6195    fn leaf_sheets_spreadsheets_developer_metadata_get() -> Command {
6196        Command::new("sheets.spreadsheets.developerMetadata.get")
6197            .visible_alias("get")
6198            .about("Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID...")
6199            .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.")
6200            .arg(Arg::new("metadata-id").long("metadata-id").value_name("METADATA_ID").value_parser(clap::value_parser!(i64)).required(true)
6201                .help("The ID of the developer metadata to retrieve."))
6202            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6203                .help("The ID of the spreadsheet to retrieve metadata from."))
6204            .args(escape_hatch_args())
6205    }
6206
6207    // sheets.spreadsheets.developerMetadata.search
6208    fn leaf_sheets_spreadsheets_developer_metadata_search() -> Command {
6209        Command::new("sheets.spreadsheets.developerMetadata.search")
6210            .visible_alias("search")
6211            .about("Returns all developer metadata matching the specified DataFilter. For more information, see Read...")
6212            .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")
6213            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6214                .help("The ID of the spreadsheet to retrieve metadata from."))
6215            .args(escape_hatch_args())
6216    }
6217
6218    // sheets.spreadsheets.developerMetadata
6219    fn group_sheets_spreadsheets_developer_metadata() -> Command {
6220        Command::new("developerMetadata")
6221            .about("Methods under sheets.spreadsheets.developerMetadata")
6222            .subcommand_required(true)
6223            .subcommand(leaf_sheets_spreadsheets_developer_metadata_get())
6224            .subcommand(leaf_sheets_spreadsheets_developer_metadata_search())
6225    }
6226
6227    // sheets.spreadsheets.get
6228    fn leaf_sheets_spreadsheets_get() -> Command {
6229        Command::new("sheets.spreadsheets.get")
6230            .visible_alias("get")
6231            .about("Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default...")
6232            .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")
6233            .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"])
6234                .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"))
6235            .arg(Arg::new("exclude-tables-in-banded-ranges").long("exclude-tables-in-banded-ranges").action(ArgAction::SetTrue)
6236                .help("True if tables should be excluded in the banded ranges. False if not set."))
6237            .arg(Arg::new("include-grid-data").long("include-grid-data").action(ArgAction::SetTrue)
6238                .help("True if grid data should be returned. This parameter is ignored if a field mask was set in the request."))
6239            .arg(Arg::new("ranges").long("ranges").value_name("RANGES").action(ArgAction::Append)
6240                .help("The ranges to retrieve from the spreadsheet."))
6241            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6242                .help("The spreadsheet to request."))
6243            .args(escape_hatch_args())
6244    }
6245
6246    // sheets.spreadsheets.getByDataFilter
6247    fn leaf_sheets_spreadsheets_get_by_data_filter() -> Command {
6248        Command::new("sheets.spreadsheets.getByDataFilter")
6249            .visible_alias("getByDataFilter")
6250            .about("Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. For more...")
6251            .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")
6252            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6253                .help("The spreadsheet to request."))
6254            .args(escape_hatch_args())
6255    }
6256
6257    // sheets.spreadsheets.sheets.copyTo
6258    fn leaf_sheets_spreadsheets_sheets_copy_to() -> Command {
6259        Command::new("sheets.spreadsheets.sheets.copyTo")
6260            .visible_alias("copyTo")
6261            .about("Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the...")
6262            .long_about("Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.")
6263            .arg(Arg::new("sheet-id").long("sheet-id").value_name("SHEET_ID").value_parser(clap::value_parser!(i64)).required(true)
6264                .help("The ID of the sheet to copy."))
6265            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6266                .help("The ID of the spreadsheet containing the sheet to copy."))
6267            .args(escape_hatch_args())
6268    }
6269
6270    // sheets.spreadsheets.sheets
6271    fn group_sheets_spreadsheets_sheets() -> Command {
6272        Command::new("sheets")
6273            .about("Methods under sheets.spreadsheets.sheets")
6274            .subcommand_required(true)
6275            .subcommand(leaf_sheets_spreadsheets_sheets_copy_to())
6276    }
6277
6278    // sheets.spreadsheets.values.append
6279    fn leaf_sheets_spreadsheets_values_append() -> Command {
6280        Command::new("sheets.spreadsheets.values.append")
6281            .visible_alias("append")
6282            .about("Appends values to a spreadsheet. The input range is used to search for existing data and find a...")
6283            .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")
6284            .arg(Arg::new("include-values-in-response").long("include-values-in-response").action(ArgAction::SetTrue)
6285                .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."))
6286            .arg(Arg::new("insert-data-option").long("insert-data-option").value_name("INSERT_DATA_OPTION").value_parser(["OVERWRITE", "INSERT_ROWS"])
6287                .help("How the input data should be inserted."))
6288            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6289                .help("The A1 notation of a range to search for a logical table of data. Values are appended"))
6290            .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"])
6291                .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"))
6292            .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"])
6293                .help("Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE."))
6294            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6295                .help("The ID of the spreadsheet to update."))
6296            .arg(Arg::new("value-input-option").long("value-input-option").value_name("VALUE_INPUT_OPTION").value_parser(["INPUT_VALUE_OPTION_UNSPECIFIED", "RAW", "USER_ENTERED"])
6297                .help("How the input data should be interpreted."))
6298            .args(escape_hatch_args())
6299    }
6300
6301    // sheets.spreadsheets.values.batchClear
6302    fn leaf_sheets_spreadsheets_values_batch_clear() -> Command {
6303        Command::new("sheets.spreadsheets.values.batchClear")
6304            .visible_alias("batchClear")
6305            .about("Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID...")
6306            .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.")
6307            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6308                .help("The ID of the spreadsheet to update."))
6309            .args(escape_hatch_args())
6310    }
6311
6312    // sheets.spreadsheets.values.batchClearByDataFilter
6313    fn leaf_sheets_spreadsheets_values_batch_clear_by_data_filter() -> Command {
6314        Command::new("sheets.spreadsheets.values.batchClearByDataFilter")
6315            .visible_alias("batchClearByDataFilter")
6316            .about("Clears one or more ranges of values from a spreadsheet. For more information, see Read, write, and...")
6317            .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")
6318            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6319                .help("The ID of the spreadsheet to update."))
6320            .args(escape_hatch_args())
6321    }
6322
6323    // sheets.spreadsheets.values.batchGet
6324    fn leaf_sheets_spreadsheets_values_batch_get() -> Command {
6325        Command::new("sheets.spreadsheets.values.batchGet")
6326            .visible_alias("batchGet")
6327            .about("Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID...")
6328            .long_about("Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.")
6329            .arg(Arg::new("date-time-render-option").long("date-time-render-option").value_name("DATE_TIME_RENDER_OPTION").value_parser(["SERIAL_NUMBER", "FORMATTED_STRING"])
6330                .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"))
6331            .arg(Arg::new("major-dimension").long("major-dimension").value_name("MAJOR_DIMENSION").value_parser(["DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS"])
6332                .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"))
6333            .arg(Arg::new("ranges").long("ranges").value_name("RANGES").action(ArgAction::Append)
6334                .help("The A1 notation or R1C1 notation of the range to retrieve values from."))
6335            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6336                .help("The ID of the spreadsheet to retrieve data from."))
6337            .arg(Arg::new("value-render-option").long("value-render-option").value_name("VALUE_RENDER_OPTION").value_parser(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"])
6338                .help("How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE."))
6339            .args(escape_hatch_args())
6340    }
6341
6342    // sheets.spreadsheets.values.batchGetByDataFilter
6343    fn leaf_sheets_spreadsheets_values_batch_get_by_data_filter() -> Command {
6344        Command::new("sheets.spreadsheets.values.batchGetByDataFilter")
6345            .visible_alias("batchGetByDataFilter")
6346            .about("Returns one or more ranges of values that match the specified data filters. For more information...")
6347            .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")
6348            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6349                .help("The ID of the spreadsheet to retrieve data from."))
6350            .args(escape_hatch_args())
6351    }
6352
6353    // sheets.spreadsheets.values.batchUpdate
6354    fn leaf_sheets_spreadsheets_values_batch_update() -> Command {
6355        Command::new("sheets.spreadsheets.values.batchUpdate")
6356            .visible_alias("batchUpdate")
6357            .about("Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a...")
6358            .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.")
6359            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6360                .help("The ID of the spreadsheet to update."))
6361            .args(escape_hatch_args())
6362    }
6363
6364    // sheets.spreadsheets.values.batchUpdateByDataFilter
6365    fn leaf_sheets_spreadsheets_values_batch_update_by_data_filter() -> Command {
6366        Command::new("sheets.spreadsheets.values.batchUpdateByDataFilter")
6367            .visible_alias("batchUpdateByDataFilter")
6368            .about("Sets values in one or more ranges of a spreadsheet. For more information, see Read, write, and...")
6369            .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.")
6370            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6371                .help("The ID of the spreadsheet to update."))
6372            .args(escape_hatch_args())
6373    }
6374
6375    // sheets.spreadsheets.values.clear
6376    fn leaf_sheets_spreadsheets_values_clear() -> Command {
6377        Command::new("sheets.spreadsheets.values.clear")
6378            .visible_alias("clear")
6379            .about("Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values...")
6380            .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.")
6381            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6382                .help("The A1 notation or R1C1 notation of the values to clear."))
6383            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6384                .help("The ID of the spreadsheet to update."))
6385            .args(escape_hatch_args())
6386    }
6387
6388    // sheets.spreadsheets.values.get
6389    fn leaf_sheets_spreadsheets_values_get() -> Command {
6390        Command::new("sheets.spreadsheets.values.get")
6391            .visible_alias("get")
6392            .about("Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a...")
6393            .long_about("Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.")
6394            .arg(Arg::new("date-time-render-option").long("date-time-render-option").value_name("DATE_TIME_RENDER_OPTION").value_parser(["SERIAL_NUMBER", "FORMATTED_STRING"])
6395                .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"))
6396            .arg(Arg::new("major-dimension").long("major-dimension").value_name("MAJOR_DIMENSION").value_parser(["DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS"])
6397                .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"))
6398            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6399                .help("The A1 notation or R1C1 notation of the range to retrieve values from."))
6400            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6401                .help("The ID of the spreadsheet to retrieve data from."))
6402            .arg(Arg::new("value-render-option").long("value-render-option").value_name("VALUE_RENDER_OPTION").value_parser(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"])
6403                .help("How values should be represented in the output. The default render option is FORMATTED_VALUE."))
6404            .args(escape_hatch_args())
6405    }
6406
6407    // sheets.spreadsheets.values.update
6408    fn leaf_sheets_spreadsheets_values_update() -> Command {
6409        Command::new("sheets.spreadsheets.values.update")
6410            .visible_alias("update")
6411            .about("Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a...")
6412            .long_about("Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.")
6413            .arg(Arg::new("include-values-in-response").long("include-values-in-response").action(ArgAction::SetTrue)
6414                .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"))
6415            .arg(Arg::new("range").long("range").value_name("RANGE").required(true)
6416                .help("The A1 notation of the values to update."))
6417            .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"])
6418                .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"))
6419            .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"])
6420                .help("Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE."))
6421            .arg(Arg::new("spreadsheet-id").long("spreadsheet-id").value_name("SPREADSHEET_ID").required(true)
6422                .help("The ID of the spreadsheet to update."))
6423            .arg(Arg::new("value-input-option").long("value-input-option").value_name("VALUE_INPUT_OPTION").value_parser(["INPUT_VALUE_OPTION_UNSPECIFIED", "RAW", "USER_ENTERED"])
6424                .help("How the input data should be interpreted."))
6425            .args(escape_hatch_args())
6426    }
6427
6428    // sheets.spreadsheets.values
6429    fn group_sheets_spreadsheets_values() -> Command {
6430        Command::new("values")
6431            .about("Methods under sheets.spreadsheets.values")
6432            .subcommand_required(true)
6433            .subcommand(leaf_sheets_spreadsheets_values_append())
6434            .subcommand(leaf_sheets_spreadsheets_values_batch_clear())
6435            .subcommand(leaf_sheets_spreadsheets_values_batch_clear_by_data_filter())
6436            .subcommand(leaf_sheets_spreadsheets_values_batch_get())
6437            .subcommand(leaf_sheets_spreadsheets_values_batch_get_by_data_filter())
6438            .subcommand(leaf_sheets_spreadsheets_values_batch_update())
6439            .subcommand(leaf_sheets_spreadsheets_values_batch_update_by_data_filter())
6440            .subcommand(leaf_sheets_spreadsheets_values_clear())
6441            .subcommand(leaf_sheets_spreadsheets_values_get())
6442            .subcommand(leaf_sheets_spreadsheets_values_update())
6443    }
6444
6445    // sheets.spreadsheets
6446    fn group_sheets_spreadsheets() -> Command {
6447        Command::new("spreadsheets")
6448            .about("Methods under sheets.spreadsheets")
6449            .subcommand_required(true)
6450            .subcommand(leaf_sheets_spreadsheets_batch_update())
6451            .subcommand(leaf_sheets_spreadsheets_create())
6452            .subcommand(group_sheets_spreadsheets_developer_metadata())
6453            .subcommand(leaf_sheets_spreadsheets_get())
6454            .subcommand(leaf_sheets_spreadsheets_get_by_data_filter())
6455            .subcommand(group_sheets_spreadsheets_sheets())
6456            .subcommand(group_sheets_spreadsheets_values())
6457    }
6458
6459    // sheets
6460    fn service_sheets() -> Command {
6461        Command::new("sheets")
6462            .about("Google Sheets API operations (v4, 17 methods)")
6463            .subcommand_required(true)
6464            .subcommand(group_sheets_spreadsheets())
6465    }
6466
6467    // slides.presentations.batchUpdate
6468    fn leaf_slides_presentations_batch_update() -> Command {
6469        Command::new("slides.presentations.batchUpdate")
6470            .visible_alias("batchUpdate")
6471            .about("Applies one or more updates to the presentation. Each request is validated before being applied. If...")
6472            .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")
6473            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6474                .help("The presentation to apply the updates to."))
6475            .args(escape_hatch_args())
6476    }
6477
6478    // slides.presentations.create
6479    fn leaf_slides_presentations_create() -> Command {
6480        Command::new("slides.presentations.create")
6481            .visible_alias("create")
6482            .about("Creates a blank presentation using the title given in the request. If a `presentationId` is...")
6483            .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.")
6484            .args(escape_hatch_args())
6485    }
6486
6487    // slides.presentations.get
6488    fn leaf_slides_presentations_get() -> Command {
6489        Command::new("slides.presentations.get")
6490            .visible_alias("get")
6491            .about("Gets the latest version of the specified 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 presentation. This allows viewing the presentation with comments omitted or included. If one is not specified, COMMENTS_V"))
6494            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6495                .help("The ID of the presentation to retrieve."))
6496            .args(escape_hatch_args())
6497    }
6498
6499    // slides.presentations.pages.get
6500    fn leaf_slides_presentations_pages_get() -> Command {
6501        Command::new("slides.presentations.pages.get")
6502            .visible_alias("get")
6503            .about("Gets the latest version of the specified page in the presentation.")
6504            .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"])
6505                .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"))
6506            .arg(Arg::new("page-object-id").long("page-object-id").value_name("PAGE_OBJECT_ID").required(true)
6507                .help("The object ID of the page to retrieve."))
6508            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6509                .help("The ID of the presentation to retrieve."))
6510            .args(escape_hatch_args())
6511    }
6512
6513    // slides.presentations.pages.getThumbnail
6514    fn leaf_slides_presentations_pages_get_thumbnail() -> Command {
6515        Command::new("slides.presentations.pages.getThumbnail")
6516            .visible_alias("getThumbnail")
6517            .about("Generates a thumbnail of the latest version of the specified page in the presentation and returns a...")
6518            .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.")
6519            .arg(Arg::new("page-object-id").long("page-object-id").value_name("PAGE_OBJECT_ID").required(true)
6520                .help("The object ID of the page whose thumbnail to retrieve."))
6521            .arg(Arg::new("presentation-id").long("presentation-id").value_name("PRESENTATION_ID").required(true)
6522                .help("The ID of the presentation to retrieve."))
6523            .arg(Arg::new("thumbnail-properties-mime-type").long("thumbnail-properties-mime-type").value_name("THUMBNAIL_PROPERTIES_MIME_TYPE").value_parser(["PNG"])
6524                .help("The optional mime type of the thumbnail image. If you don't specify the mime type, the mime type defaults to PNG."))
6525            .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"])
6526                .help("The optional thumbnail image size. If you don't specify the size, the server chooses a default size of the image."))
6527            .args(escape_hatch_args())
6528    }
6529
6530    // slides.presentations.pages
6531    fn group_slides_presentations_pages() -> Command {
6532        Command::new("pages")
6533            .about("Methods under slides.presentations.pages")
6534            .subcommand_required(true)
6535            .subcommand(leaf_slides_presentations_pages_get())
6536            .subcommand(leaf_slides_presentations_pages_get_thumbnail())
6537    }
6538
6539    // slides.presentations
6540    fn group_slides_presentations() -> Command {
6541        Command::new("presentations")
6542            .about("Methods under slides.presentations")
6543            .subcommand_required(true)
6544            .subcommand(leaf_slides_presentations_batch_update())
6545            .subcommand(leaf_slides_presentations_create())
6546            .subcommand(leaf_slides_presentations_get())
6547            .subcommand(group_slides_presentations_pages())
6548    }
6549
6550    // slides
6551    fn service_slides() -> Command {
6552        Command::new("slides")
6553            .about("Google Slides API operations (v1, 5 methods)")
6554            .subcommand_required(true)
6555            .subcommand(group_slides_presentations())
6556    }
6557
6558    // tasks.tasklists.delete
6559    fn leaf_tasks_tasklists_delete() -> Command {
6560        Command::new("tasks.tasklists.delete")
6561            .visible_alias("delete")
6562            .about("Deletes the authenticated user's specified task list. If the list contains assigned tasks, both the...")
6563            .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.")
6564            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6565                .help("Task list identifier."))
6566            .args(escape_hatch_args())
6567    }
6568
6569    // tasks.tasklists.get
6570    fn leaf_tasks_tasklists_get() -> Command {
6571        Command::new("tasks.tasklists.get")
6572            .visible_alias("get")
6573            .about("Returns the authenticated user's specified task list.")
6574            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6575                .help("Task list identifier."))
6576            .args(escape_hatch_args())
6577    }
6578
6579    // tasks.tasklists.insert
6580    fn leaf_tasks_tasklists_insert() -> Command {
6581        Command::new("tasks.tasklists.insert")
6582            .visible_alias("insert")
6583            .about("Creates a new task list and adds it to the authenticated user's task lists. A user can have up to...")
6584            .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.")
6585            .args(escape_hatch_args())
6586    }
6587
6588    // tasks.tasklists.list
6589    fn leaf_tasks_tasklists_list() -> Command {
6590        Command::new("tasks.tasklists.list")
6591            .visible_alias("list")
6592            .about("Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.")
6593            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
6594                .help("Maximum number of task lists returned on one page. Optional. The default is 1000 (max allowed: 1000)."))
6595            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
6596                .help("Token specifying the result page to return. Optional."))
6597            .args(escape_hatch_args())
6598    }
6599
6600    // tasks.tasklists.patch
6601    fn leaf_tasks_tasklists_patch() -> Command {
6602        Command::new("tasks.tasklists.patch")
6603            .visible_alias("patch")
6604            .about("Updates the authenticated user's specified task list. This method supports patch semantics.")
6605            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6606                .help("Task list identifier."))
6607            .args(escape_hatch_args())
6608    }
6609
6610    // tasks.tasklists.update
6611    fn leaf_tasks_tasklists_update() -> Command {
6612        Command::new("tasks.tasklists.update")
6613            .visible_alias("update")
6614            .about("Updates the authenticated user's specified task list.")
6615            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6616                .help("Task list identifier."))
6617            .args(escape_hatch_args())
6618    }
6619
6620    // tasks.tasklists
6621    fn group_tasks_tasklists() -> Command {
6622        Command::new("tasklists")
6623            .about("Methods under tasks.tasklists")
6624            .subcommand_required(true)
6625            .subcommand(leaf_tasks_tasklists_delete())
6626            .subcommand(leaf_tasks_tasklists_get())
6627            .subcommand(leaf_tasks_tasklists_insert())
6628            .subcommand(leaf_tasks_tasklists_list())
6629            .subcommand(leaf_tasks_tasklists_patch())
6630            .subcommand(leaf_tasks_tasklists_update())
6631    }
6632
6633    // tasks.tasks.clear
6634    fn leaf_tasks_tasks_clear() -> Command {
6635        Command::new("tasks.tasks.clear")
6636            .visible_alias("clear")
6637            .about("Clears all completed tasks from the specified task list. The affected tasks will be marked as...")
6638            .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.")
6639            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6640                .help("Task list identifier."))
6641            .args(escape_hatch_args())
6642    }
6643
6644    // tasks.tasks.delete
6645    fn leaf_tasks_tasks_delete() -> Command {
6646        Command::new("tasks.tasks.delete")
6647            .visible_alias("delete")
6648            .about("Deletes the specified task from the task list. If the task is assigned, both the assigned task and...")
6649            .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.")
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.get
6658    fn leaf_tasks_tasks_get() -> Command {
6659        Command::new("tasks.tasks.get")
6660            .visible_alias("get")
6661            .about("Returns the specified task.")
6662            .arg(Arg::new("task").long("task").value_name("TASK").required(true)
6663                .help("Task identifier."))
6664            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6665                .help("Task list identifier."))
6666            .args(escape_hatch_args())
6667    }
6668
6669    // tasks.tasks.insert
6670    fn leaf_tasks_tasks_insert() -> Command {
6671        Command::new("tasks.tasks.insert")
6672            .visible_alias("insert")
6673            .about("Creates a new task on the specified task list. Tasks assigned from Docs or Chat Spaces cannot be...")
6674            .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.")
6675            .arg(Arg::new("parent").long("parent").value_name("PARENT")
6676                .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."))
6677            .arg(Arg::new("previous").long("previous").value_name("PREVIOUS")
6678                .help("Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional."))
6679            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6680                .help("Task list identifier."))
6681            .args(escape_hatch_args())
6682    }
6683
6684    // tasks.tasks.list
6685    fn leaf_tasks_tasks_list() -> Command {
6686        Command::new("tasks.tasks.list")
6687            .visible_alias("list")
6688            .about("Returns all tasks in the specified task list. Doesn't return assigned tasks by default (from Docs...")
6689            .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.")
6690            .arg(Arg::new("completed-max").long("completed-max").value_name("COMPLETED_MAX")
6691                .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."))
6692            .arg(Arg::new("completed-min").long("completed-min").value_name("COMPLETED_MIN")
6693                .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."))
6694            .arg(Arg::new("due-max").long("due-max").value_name("DUE_MAX")
6695                .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."))
6696            .arg(Arg::new("due-min").long("due-min").value_name("DUE_MIN")
6697                .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."))
6698            .arg(Arg::new("max-results").long("max-results").value_name("MAX_RESULTS").value_parser(clap::value_parser!(i64))
6699                .help("Maximum number of tasks returned on one page. Optional. The default is 20 (max allowed: 100)."))
6700            .arg(Arg::new("page-token").long("page-token").value_name("PAGE_TOKEN")
6701                .help("Token specifying the result page to return. Optional."))
6702            .arg(Arg::new("show-assigned").long("show-assigned").action(ArgAction::SetTrue)
6703                .help("Optional. Flag indicating whether tasks assigned to the current user are returned in the result. Optional. The default is False."))
6704            .arg(Arg::new("show-completed").long("show-completed").action(ArgAction::SetTrue)
6705                .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"))
6706            .arg(Arg::new("show-deleted").long("show-deleted").action(ArgAction::SetTrue)
6707                .help("Flag indicating whether deleted tasks are returned in the result. Optional. The default is False."))
6708            .arg(Arg::new("show-hidden").long("show-hidden").action(ArgAction::SetTrue)
6709                .help("Flag indicating whether hidden tasks are returned in the result. Optional. The default is False."))
6710            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6711                .help("Task list identifier."))
6712            .arg(Arg::new("updated-min").long("updated-min").value_name("UPDATED_MIN")
6713                .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."))
6714            .args(escape_hatch_args())
6715    }
6716
6717    // tasks.tasks.move
6718    fn leaf_tasks_tasks_move() -> Command {
6719        Command::new("tasks.tasks.move")
6720            .visible_alias("move")
6721            .about("Moves the specified task to another position in the destination task list. If the destination list...")
6722            .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")
6723            .arg(Arg::new("destination-tasklist").long("destination-tasklist").value_name("DESTINATION_TASKLIST")
6724                .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"))
6725            .arg(Arg::new("parent").long("parent").value_name("PARENT")
6726                .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"))
6727            .arg(Arg::new("previous").long("previous").value_name("PREVIOUS")
6728                .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"))
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.patch
6737    fn leaf_tasks_tasks_patch() -> Command {
6738        Command::new("tasks.tasks.patch")
6739            .visible_alias("patch")
6740            .about("Updates the specified task. This method supports patch semantics.")
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.update
6749    fn leaf_tasks_tasks_update() -> Command {
6750        Command::new("tasks.tasks.update")
6751            .visible_alias("update")
6752            .about("Updates the specified task.")
6753            .arg(Arg::new("task").long("task").value_name("TASK").required(true)
6754                .help("Task identifier."))
6755            .arg(Arg::new("tasklist").long("tasklist").value_name("TASKLIST").required(true)
6756                .help("Task list identifier."))
6757            .args(escape_hatch_args())
6758    }
6759
6760    // tasks.tasks
6761    fn group_tasks_tasks() -> Command {
6762        Command::new("tasks")
6763            .about("Methods under tasks.tasks")
6764            .subcommand_required(true)
6765            .subcommand(leaf_tasks_tasks_clear())
6766            .subcommand(leaf_tasks_tasks_delete())
6767            .subcommand(leaf_tasks_tasks_get())
6768            .subcommand(leaf_tasks_tasks_insert())
6769            .subcommand(leaf_tasks_tasks_list())
6770            .subcommand(leaf_tasks_tasks_move())
6771            .subcommand(leaf_tasks_tasks_patch())
6772            .subcommand(leaf_tasks_tasks_update())
6773    }
6774
6775    // tasks
6776    fn service_tasks() -> Command {
6777        Command::new("tasks")
6778            .about("Google Tasks API operations (v1, 14 methods)")
6779            .subcommand_required(true)
6780            .subcommand(group_tasks_tasklists())
6781            .subcommand(group_tasks_tasks())
6782    }
6783}