changeset 207:3fda41657f19

update drive example
author Daniel Boline <ddboline@gmail.com>
date Mon, 22 Feb 2021 16:22:03 -0500
parents 23d41bfb0081
children d7f6e237b7ad
files example_crates/drive_example/src/drive_v3_types.rs
diffstat 1 files changed, 87 insertions(+), 129 deletions(-) [+]
line wrap: on
line diff
--- a/example_crates/drive_example/src/drive_v3_types.rs	Mon Feb 22 16:16:04 2021 -0500
+++ b/example_crates/drive_example/src/drive_v3_types.rs	Mon Feb 22 16:22:03 2021 -0500
@@ -1,4 +1,4 @@
-#![allow(unused_variables, unused_mut, dead_code)]
+#![allow(unused_variables, unused_mut, dead_code, non_camel_case_types)]
 //! This file was generated by async-google-apis. (https://github.com/dermesser/async-google-apis)
 //!
 //! (c) 2020 Lewin Bormann <lbo@spheniscida.de>
@@ -25,7 +25,7 @@
     ///
     /// URL: https://www.googleapis.com/auth/drive
     Drive,
-    /// View and manage its own configuration data in your Google Drive
+    /// See, create, and delete its own configuration data in your Google Drive
     ///
     /// URL: https://www.googleapis.com/auth/drive.appdata
     DriveAppdata,
@@ -37,7 +37,7 @@
     ///
     /// URL: https://www.googleapis.com/auth/drive.metadata
     DriveMetadata,
-    /// View metadata for files in your Google Drive
+    /// See information about your Google Drive files
     ///
     /// URL: https://www.googleapis.com/auth/drive.metadata.readonly
     DriveMetadataReadonly,
@@ -894,7 +894,7 @@
 /// The metadata for a file.
 #[derive(Serialize, Deserialize, Debug, Clone, Default)]
 pub struct File {
-    /// A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests.
+    /// A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
     #[serde(rename = "appProperties")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub app_properties: Option<HashMap<String, String>>,
@@ -930,7 +930,7 @@
     #[serde(rename = "explicitlyTrashed")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub explicitly_trashed: Option<bool>,
-    /// Links for exporting Google Docs to specific formats.
+    /// Links for exporting Docs Editors files to specific formats.
     #[serde(rename = "exportLinks")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub export_links: Option<HashMap<String, String>>,
@@ -1052,7 +1052,7 @@
     #[serde(rename = "shortcutDetails")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub shortcut_details: Option<FileShortcutDetails>,
-    /// i64: The size of the file's content in bytes. This is only applicable to files with binary content in Google Drive.
+    /// i64: The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
     #[serde(rename = "size")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub size: Option<String>,
@@ -1339,7 +1339,7 @@
 /// The metadata for a revision to a file.
 #[derive(Serialize, Deserialize, Debug, Clone, Default)]
 pub struct Revision {
-    /// Links for exporting Google Docs to specific formats.
+    /// Links for exporting Docs Editors files to specific formats.
     #[serde(rename = "exportLinks")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub export_links: Option<HashMap<String, String>>,
@@ -1374,11 +1374,11 @@
     #[serde(rename = "originalFilename")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub original_filename: Option<String>,
-    /// Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
+    /// Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
     #[serde(rename = "publishAuto")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub publish_auto: Option<bool>,
-    /// Whether this revision is published. This is only applicable to Google Docs.
+    /// Whether this revision is published. This is only applicable to Docs Editors files.
     #[serde(rename = "published")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub published: Option<bool>,
@@ -1386,7 +1386,7 @@
     #[serde(rename = "publishedLink")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub published_link: Option<String>,
-    /// Whether this revision is published outside the domain. This is only applicable to Google Docs.
+    /// Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
     #[serde(rename = "publishedOutsideDomain")]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub published_outside_domain: Option<bool>,
@@ -2392,7 +2392,7 @@
     /// General attributes applying to any API call
     #[serde(flatten)]
     pub drive_params: Option<DriveParams>,
-    /// Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail.
+    /// Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.
     #[serde(rename = "enforceSingleParent")]
     pub enforce_single_parent: Option<bool>,
     /// The ID of the file.
@@ -2479,7 +2479,7 @@
     /// General attributes applying to any API call
     #[serde(flatten)]
     pub drive_params: Option<DriveParams>,
-    /// Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail.
+    /// Deprecated. Creating files in multiple folders is no longer supported.
     #[serde(rename = "enforceSingleParent")]
     pub enforce_single_parent: Option<bool>,
     /// 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 domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
@@ -2573,7 +2573,7 @@
     /// General attributes applying to any API call
     #[serde(flatten)]
     pub drive_params: Option<DriveParams>,
-    /// Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If an item's last parent is deleted but the item itself is not, the item will be placed under its owner's root.
+    /// Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.
     #[serde(rename = "enforceSingleParent")]
     pub enforce_single_parent: Option<bool>,
     /// The ID of the file.
@@ -2620,7 +2620,7 @@
     /// General attributes applying to any API call
     #[serde(flatten)]
     pub drive_params: Option<DriveParams>,
-    /// Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If an item's last parent is deleted but the item itself is not, the item will be placed under its owner's root.
+    /// Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.
     #[serde(rename = "enforceSingleParent")]
     pub enforce_single_parent: Option<bool>,
 }
@@ -2917,7 +2917,7 @@
     /// A comma-separated list of parent IDs to add.
     #[serde(rename = "addParents")]
     pub add_parents: Option<String>,
-    /// Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item is removed from all current folders and placed in the requested folder. Other requests that increase the number of parents fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.
+    /// Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.
     #[serde(rename = "enforceSingleParent")]
     pub enforce_single_parent: Option<bool>,
     /// The ID of the file.
@@ -3081,13 +3081,13 @@
     /// A plain text custom message to include in the notification email.
     #[serde(rename = "emailMessage")]
     pub email_message: Option<String>,
-    /// Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.
+    /// Deprecated. See moveToNewOwnersRoot for details.
     #[serde(rename = "enforceSingleParent")]
     pub enforce_single_parent: Option<bool>,
     /// The ID of the file or shared drive.
     #[serde(rename = "fileId")]
     pub file_id: String,
-    /// This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive.
+    /// This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed.
     #[serde(rename = "moveToNewOwnersRoot")]
     pub move_to_new_owners_root: Option<bool>,
     /// 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 must not be disabled for ownership transfers.
@@ -3910,7 +3910,7 @@
 /// The Drive About service represents the About resource.
 pub struct AboutService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -3921,10 +3921,7 @@
     /// Create a new AboutService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> AboutService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> AboutService {
         AboutService {
             client: client,
             authenticator: Box::new(auth),
@@ -3978,7 +3975,7 @@
     }
 
     /// Gets information about the user, the user's Drive, and system capabilities.
-    pub async fn get(&mut self, params: &AboutGetParams) -> Result<About> {
+    pub async fn get(&self, params: &AboutGetParams) -> Result<About> {
         let rel_path = format!("about",);
         let path = self.format_path(rel_path.as_str());
 
@@ -4010,7 +4007,7 @@
 /// The Drive Changes service represents the Changes resource.
 pub struct ChangesService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -4021,10 +4018,7 @@
     /// Create a new ChangesService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> ChangesService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> ChangesService {
         ChangesService {
             client: client,
             authenticator: Box::new(auth),
@@ -4079,7 +4073,7 @@
 
     /// Gets the starting pageToken for listing future changes.
     pub async fn get_start_page_token(
-        &mut self,
+        &self,
         params: &ChangesGetStartPageTokenParams,
     ) -> Result<StartPageToken> {
         let rel_path = format!("changes/startPageToken",);
@@ -4110,7 +4104,7 @@
     }
 
     /// Lists the changes for a user or shared drive.
-    pub async fn list(&mut self, params: &ChangesListParams) -> Result<ChangeList> {
+    pub async fn list(&self, params: &ChangesListParams) -> Result<ChangeList> {
         let rel_path = format!("changes",);
         let path = self.format_path(rel_path.as_str());
 
@@ -4139,7 +4133,7 @@
     }
 
     /// Subscribes to changes for a user.
-    pub async fn watch(&mut self, params: &ChangesWatchParams, req: &Channel) -> Result<Channel> {
+    pub async fn watch(&self, params: &ChangesWatchParams, req: &Channel) -> Result<Channel> {
         let rel_path = format!("changes/watch",);
         let path = self.format_path(rel_path.as_str());
 
@@ -4172,7 +4166,7 @@
 /// The Drive Channels service represents the Channels resource.
 pub struct ChannelsService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -4183,10 +4177,7 @@
     /// Create a new ChannelsService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> ChannelsService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> ChannelsService {
         ChannelsService {
             client: client,
             authenticator: Box::new(auth),
@@ -4240,7 +4231,7 @@
     }
 
     /// Stop watching resources through this channel
-    pub async fn stop(&mut self, params: &ChannelsStopParams, req: &Channel) -> Result<()> {
+    pub async fn stop(&self, params: &ChannelsStopParams, req: &Channel) -> Result<()> {
         let rel_path = format!("channels/stop",);
         let path = self.format_path(rel_path.as_str());
 
@@ -4273,7 +4264,7 @@
 /// The Drive Comments service represents the Comments resource.
 pub struct CommentsService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -4284,10 +4275,7 @@
     /// Create a new CommentsService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> CommentsService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> CommentsService {
         CommentsService {
             client: client,
             authenticator: Box::new(auth),
@@ -4341,11 +4329,7 @@
     }
 
     /// Creates a new comment on a file.
-    pub async fn create(
-        &mut self,
-        params: &CommentsCreateParams,
-        req: &Comment,
-    ) -> Result<Comment> {
+    pub async fn create(&self, params: &CommentsCreateParams, req: &Comment) -> Result<Comment> {
         let rel_path = format!(
             "files/{fileId}/comments",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4378,7 +4362,7 @@
     }
 
     /// Deletes a comment.
-    pub async fn delete(&mut self, params: &CommentsDeleteParams) -> Result<()> {
+    pub async fn delete(&self, params: &CommentsDeleteParams) -> Result<()> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -4414,7 +4398,7 @@
     }
 
     /// Gets a comment by ID.
-    pub async fn get(&mut self, params: &CommentsGetParams) -> Result<Comment> {
+    pub async fn get(&self, params: &CommentsGetParams) -> Result<Comment> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -4450,7 +4434,7 @@
     }
 
     /// Lists a file's comments.
-    pub async fn list(&mut self, params: &CommentsListParams) -> Result<CommentList> {
+    pub async fn list(&self, params: &CommentsListParams) -> Result<CommentList> {
         let rel_path = format!(
             "files/{fileId}/comments",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4482,11 +4466,7 @@
     }
 
     /// Updates a comment with patch semantics.
-    pub async fn update(
-        &mut self,
-        params: &CommentsUpdateParams,
-        req: &Comment,
-    ) -> Result<Comment> {
+    pub async fn update(&self, params: &CommentsUpdateParams, req: &Comment) -> Result<Comment> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -4526,7 +4506,7 @@
 /// The Drive Drives service represents the Drives resource.
 pub struct DrivesService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -4537,10 +4517,7 @@
     /// Create a new DrivesService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> DrivesService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> DrivesService {
         DrivesService {
             client: client,
             authenticator: Box::new(auth),
@@ -4594,7 +4571,7 @@
     }
 
     /// Creates a new shared drive.
-    pub async fn create(&mut self, params: &DrivesCreateParams, req: &Drive) -> Result<Drive> {
+    pub async fn create(&self, params: &DrivesCreateParams, req: &Drive) -> Result<Drive> {
         let rel_path = format!("drives",);
         let path = self.format_path(rel_path.as_str());
 
@@ -4624,7 +4601,7 @@
     }
 
     /// Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.
-    pub async fn delete(&mut self, params: &DrivesDeleteParams) -> Result<()> {
+    pub async fn delete(&self, params: &DrivesDeleteParams) -> Result<()> {
         let rel_path = format!(
             "drives/{driveId}",
             driveId = percent_encode(format!("{}", params.drive_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4656,7 +4633,7 @@
     }
 
     /// Gets a shared drive's metadata by ID.
-    pub async fn get(&mut self, params: &DrivesGetParams) -> Result<Drive> {
+    pub async fn get(&self, params: &DrivesGetParams) -> Result<Drive> {
         let rel_path = format!(
             "drives/{driveId}",
             driveId = percent_encode(format!("{}", params.drive_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4688,7 +4665,7 @@
     }
 
     /// Hides a shared drive from the default view.
-    pub async fn hide(&mut self, params: &DrivesHideParams) -> Result<Drive> {
+    pub async fn hide(&self, params: &DrivesHideParams) -> Result<Drive> {
         let rel_path = format!(
             "drives/{driveId}/hide",
             driveId = percent_encode(format!("{}", params.drive_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4720,7 +4697,7 @@
     }
 
     /// Lists the user's shared drives.
-    pub async fn list(&mut self, params: &DrivesListParams) -> Result<DriveList> {
+    pub async fn list(&self, params: &DrivesListParams) -> Result<DriveList> {
         let rel_path = format!("drives",);
         let path = self.format_path(rel_path.as_str());
 
@@ -4749,7 +4726,7 @@
     }
 
     /// Restores a shared drive to the default view.
-    pub async fn unhide(&mut self, params: &DrivesUnhideParams) -> Result<Drive> {
+    pub async fn unhide(&self, params: &DrivesUnhideParams) -> Result<Drive> {
         let rel_path = format!(
             "drives/{driveId}/unhide",
             driveId = percent_encode(format!("{}", params.drive_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4781,7 +4758,7 @@
     }
 
     /// Updates the metadate for a shared drive.
-    pub async fn update(&mut self, params: &DrivesUpdateParams, req: &Drive) -> Result<Drive> {
+    pub async fn update(&self, params: &DrivesUpdateParams, req: &Drive) -> Result<Drive> {
         let rel_path = format!(
             "drives/{driveId}",
             driveId = percent_encode(format!("{}", params.drive_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4817,7 +4794,7 @@
 /// The Drive Files service represents the Files resource.
 pub struct FilesService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -4828,10 +4805,7 @@
     /// Create a new FilesService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> FilesService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> FilesService {
         FilesService {
             client: client,
             authenticator: Box::new(auth),
@@ -4885,7 +4859,7 @@
     }
 
     /// Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.
-    pub async fn copy(&mut self, params: &FilesCopyParams, req: &File) -> Result<File> {
+    pub async fn copy(&self, params: &FilesCopyParams, req: &File) -> Result<File> {
         let rel_path = format!(
             "files/{fileId}/copy",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC)
@@ -4918,7 +4892,7 @@
     }
 
     /// Creates a new file.
-    pub async fn create(&mut self, params: &FilesCreateParams, req: &File) -> Result<File> {
+    pub async fn create(&self, params: &FilesCreateParams, req: &File) -> Result<File> {
         let rel_path = format!("files",);
         let path = self.format_path(rel_path.as_str());
 
@@ -4951,7 +4925,7 @@
     ///
     /// This method is a variant of `create()`, taking data for upload. It performs a multipart upload.
     pub async fn create_upload(
-        &mut self,
+        &self,
         params: &FilesCreateParams,
         req: &File,
         data: hyper::body::Bytes,
@@ -4992,7 +4966,7 @@
     /// of data to the API. The result of this call will be returned by the `ResumableUpload` method
     /// you choose for the upload.
     pub async fn create_resumable_upload<'client>(
-        &'client mut self,
+        &'client self,
         params: &FilesCreateParams,
         req: &File,
     ) -> Result<ResumableUpload<'client, File>> {
@@ -5040,7 +5014,7 @@
     }
 
     /// Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.
-    pub async fn delete(&mut self, params: &FilesDeleteParams) -> Result<()> {
+    pub async fn delete(&self, params: &FilesDeleteParams) -> Result<()> {
         let rel_path = format!(
             "files/{fileId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC)
@@ -5072,7 +5046,7 @@
     }
 
     /// Permanently deletes all of the user's trashed files.
-    pub async fn empty_trash(&mut self, params: &FilesEmptyTrashParams) -> Result<()> {
+    pub async fn empty_trash(&self, params: &FilesEmptyTrashParams) -> Result<()> {
         let rel_path = format!("files/trash",);
         let path = self.format_path(rel_path.as_str());
 
@@ -5104,7 +5078,7 @@
     ///
     /// This method potentially downloads data. See documentation of `Download`.
     pub async fn export<'a>(
-        &'a mut self,
+        &'a self,
         params: &FilesExportParams,
     ) -> Result<Download<'a, EmptyRequest, ()>> {
         let rel_path = format!(
@@ -5138,7 +5112,7 @@
     }
 
     /// Generates a set of file IDs which can be provided in create or copy requests.
-    pub async fn generate_ids(&mut self, params: &FilesGenerateIdsParams) -> Result<GeneratedIds> {
+    pub async fn generate_ids(&self, params: &FilesGenerateIdsParams) -> Result<GeneratedIds> {
         let rel_path = format!("files/generateIds",);
         let path = self.format_path(rel_path.as_str());
 
@@ -5170,7 +5144,7 @@
     ///
     /// This method potentially downloads data. See documentation of `Download`.
     pub async fn get<'a>(
-        &'a mut self,
+        &'a self,
         params: &FilesGetParams,
     ) -> Result<Download<'a, EmptyRequest, File>> {
         let rel_path = format!(
@@ -5204,7 +5178,7 @@
     }
 
     /// Lists or searches files.
-    pub async fn list(&mut self, params: &FilesListParams) -> Result<FileList> {
+    pub async fn list(&self, params: &FilesListParams) -> Result<FileList> {
         let rel_path = format!("files",);
         let path = self.format_path(rel_path.as_str());
 
@@ -5233,7 +5207,7 @@
     }
 
     /// Updates a file's metadata and/or content. This method supports patch semantics.
-    pub async fn update(&mut self, params: &FilesUpdateParams, req: &File) -> Result<File> {
+    pub async fn update(&self, params: &FilesUpdateParams, req: &File) -> Result<File> {
         let rel_path = format!(
             "files/{fileId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC)
@@ -5269,7 +5243,7 @@
     ///
     /// This method is a variant of `update()`, taking data for upload. It performs a multipart upload.
     pub async fn update_upload(
-        &mut self,
+        &self,
         params: &FilesUpdateParams,
         req: &File,
         data: hyper::body::Bytes,
@@ -5321,7 +5295,7 @@
     /// of data to the API. The result of this call will be returned by the `ResumableUpload` method
     /// you choose for the upload.
     pub async fn update_resumable_upload<'client>(
-        &'client mut self,
+        &'client self,
         params: &FilesUpdateParams,
         req: &File,
     ) -> Result<ResumableUpload<'client, File>> {
@@ -5376,7 +5350,7 @@
     ///
     /// This method potentially downloads data. See documentation of `Download`.
     pub async fn watch<'a>(
-        &'a mut self,
+        &'a self,
         params: &FilesWatchParams,
         req: &'a Channel,
     ) -> Result<Download<'a, Channel, Channel>> {
@@ -5415,7 +5389,7 @@
 /// The Drive Permissions service represents the Permissions resource.
 pub struct PermissionsService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -5426,10 +5400,7 @@
     /// Create a new PermissionsService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> PermissionsService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> PermissionsService {
         PermissionsService {
             client: client,
             authenticator: Box::new(auth),
@@ -5484,7 +5455,7 @@
 
     /// Creates a permission for a file or shared drive.
     pub async fn create(
-        &mut self,
+        &self,
         params: &PermissionsCreateParams,
         req: &Permission,
     ) -> Result<Permission> {
@@ -5520,7 +5491,7 @@
     }
 
     /// Deletes a permission.
-    pub async fn delete(&mut self, params: &PermissionsDeleteParams) -> Result<()> {
+    pub async fn delete(&self, params: &PermissionsDeleteParams) -> Result<()> {
         let rel_path = format!(
             "files/{fileId}/permissions/{permissionId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -5556,7 +5527,7 @@
     }
 
     /// Gets a permission by ID.
-    pub async fn get(&mut self, params: &PermissionsGetParams) -> Result<Permission> {
+    pub async fn get(&self, params: &PermissionsGetParams) -> Result<Permission> {
         let rel_path = format!(
             "files/{fileId}/permissions/{permissionId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -5592,7 +5563,7 @@
     }
 
     /// Lists a file's or shared drive's permissions.
-    pub async fn list(&mut self, params: &PermissionsListParams) -> Result<PermissionList> {
+    pub async fn list(&self, params: &PermissionsListParams) -> Result<PermissionList> {
         let rel_path = format!(
             "files/{fileId}/permissions",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC)
@@ -5625,7 +5596,7 @@
 
     /// Updates a permission with patch semantics.
     pub async fn update(
-        &mut self,
+        &self,
         params: &PermissionsUpdateParams,
         req: &Permission,
     ) -> Result<Permission> {
@@ -5668,7 +5639,7 @@
 /// The Drive Replies service represents the Replies resource.
 pub struct RepliesService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -5679,10 +5650,7 @@
     /// Create a new RepliesService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> RepliesService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> RepliesService {
         RepliesService {
             client: client,
             authenticator: Box::new(auth),
@@ -5736,7 +5704,7 @@
     }
 
     /// Creates a new reply to a comment.
-    pub async fn create(&mut self, params: &RepliesCreateParams, req: &Reply) -> Result<Reply> {
+    pub async fn create(&self, params: &RepliesCreateParams, req: &Reply) -> Result<Reply> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}/replies",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -5773,7 +5741,7 @@
     }
 
     /// Deletes a reply.
-    pub async fn delete(&mut self, params: &RepliesDeleteParams) -> Result<()> {
+    pub async fn delete(&self, params: &RepliesDeleteParams) -> Result<()> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}/replies/{replyId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -5810,7 +5778,7 @@
     }
 
     /// Gets a reply by ID.
-    pub async fn get(&mut self, params: &RepliesGetParams) -> Result<Reply> {
+    pub async fn get(&self, params: &RepliesGetParams) -> Result<Reply> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}/replies/{replyId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -5847,7 +5815,7 @@
     }
 
     /// Lists a comment's replies.
-    pub async fn list(&mut self, params: &RepliesListParams) -> Result<ReplyList> {
+    pub async fn list(&self, params: &RepliesListParams) -> Result<ReplyList> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}/replies",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -5883,7 +5851,7 @@
     }
 
     /// Updates a reply with patch semantics.
-    pub async fn update(&mut self, params: &RepliesUpdateParams, req: &Reply) -> Result<Reply> {
+    pub async fn update(&self, params: &RepliesUpdateParams, req: &Reply) -> Result<Reply> {
         let rel_path = format!(
             "files/{fileId}/comments/{commentId}/replies/{replyId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -5924,7 +5892,7 @@
 /// The Drive Revisions service represents the Revisions resource.
 pub struct RevisionsService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -5935,10 +5903,7 @@
     /// Create a new RevisionsService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> RevisionsService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> RevisionsService {
         RevisionsService {
             client: client,
             authenticator: Box::new(auth),
@@ -5992,7 +5957,7 @@
     }
 
     /// 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.
-    pub async fn delete(&mut self, params: &RevisionsDeleteParams) -> Result<()> {
+    pub async fn delete(&self, params: &RevisionsDeleteParams) -> Result<()> {
         let rel_path = format!(
             "files/{fileId}/revisions/{revisionId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -6031,7 +5996,7 @@
     ///
     /// This method potentially downloads data. See documentation of `Download`.
     pub async fn get<'a>(
-        &'a mut self,
+        &'a self,
         params: &RevisionsGetParams,
     ) -> Result<Download<'a, EmptyRequest, Revision>> {
         let rel_path = format!(
@@ -6069,7 +6034,7 @@
     }
 
     /// Lists a file's revisions.
-    pub async fn list(&mut self, params: &RevisionsListParams) -> Result<RevisionList> {
+    pub async fn list(&self, params: &RevisionsListParams) -> Result<RevisionList> {
         let rel_path = format!(
             "files/{fileId}/revisions",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC)
@@ -6101,11 +6066,7 @@
     }
 
     /// Updates a revision with patch semantics.
-    pub async fn update(
-        &mut self,
-        params: &RevisionsUpdateParams,
-        req: &Revision,
-    ) -> Result<Revision> {
+    pub async fn update(&self, params: &RevisionsUpdateParams, req: &Revision) -> Result<Revision> {
         let rel_path = format!(
             "files/{fileId}/revisions/{revisionId}",
             fileId = percent_encode(format!("{}", params.file_id).as_bytes(), NON_ALPHANUMERIC),
@@ -6145,7 +6106,7 @@
 /// The Drive Teamdrives service represents the Teamdrives resource.
 pub struct TeamdrivesService {
     client: TlsClient,
-    authenticator: Box<dyn 'static + std::ops::Deref<Target = Authenticator>>,
+    authenticator: Box<dyn 'static + DerefAuth>,
     scopes: Vec<String>,
 
     base_url: String,
@@ -6156,10 +6117,7 @@
     /// Create a new TeamdrivesService object. The easiest way to call this is wrapping the Authenticator
     /// into an `Rc`: `new(client.clone(), Rc::new(authenticator))`.
     /// This way, one authenticator can be shared among several services.
-    pub fn new<A: 'static + std::ops::Deref<Target = Authenticator>>(
-        client: TlsClient,
-        auth: A,
-    ) -> TeamdrivesService {
+    pub fn new<A: 'static + DerefAuth>(client: TlsClient, auth: A) -> TeamdrivesService {
         TeamdrivesService {
             client: client,
             authenticator: Box::new(auth),
@@ -6214,7 +6172,7 @@
 
     /// Deprecated use drives.create instead.
     pub async fn create(
-        &mut self,
+        &self,
         params: &TeamdrivesCreateParams,
         req: &TeamDrive,
     ) -> Result<TeamDrive> {
@@ -6247,7 +6205,7 @@
     }
 
     /// Deprecated use drives.delete instead.
-    pub async fn delete(&mut self, params: &TeamdrivesDeleteParams) -> Result<()> {
+    pub async fn delete(&self, params: &TeamdrivesDeleteParams) -> Result<()> {
         let rel_path = format!(
             "teamdrives/{teamDriveId}",
             teamDriveId = percent_encode(
@@ -6282,7 +6240,7 @@
     }
 
     /// Deprecated use drives.get instead.
-    pub async fn get(&mut self, params: &TeamdrivesGetParams) -> Result<TeamDrive> {
+    pub async fn get(&self, params: &TeamdrivesGetParams) -> Result<TeamDrive> {
         let rel_path = format!(
             "teamdrives/{teamDriveId}",
             teamDriveId = percent_encode(
@@ -6317,7 +6275,7 @@
     }
 
     /// Deprecated use drives.list instead.
-    pub async fn list(&mut self, params: &TeamdrivesListParams) -> Result<TeamDriveList> {
+    pub async fn list(&self, params: &TeamdrivesListParams) -> Result<TeamDriveList> {
         let rel_path = format!("teamdrives",);
         let path = self.format_path(rel_path.as_str());
 
@@ -6347,7 +6305,7 @@
 
     /// Deprecated use drives.update instead
     pub async fn update(
-        &mut self,
+        &self,
         params: &TeamdrivesUpdateParams,
         req: &TeamDrive,
     ) -> Result<TeamDrive> {