Class: Google::Apis::DriveV2::DriveService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/drive_v2/service.rb

Overview

Drive API

Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.

Examples:

require 'google/apis/drive_v2'

Drive = Google::Apis::DriveV2 # Alias the module
service = Drive::DriveService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeDriveService

Returns a new instance of DriveService



52
53
54
55
# File 'generated/google/apis/drive_v2/service.rb', line 52

def initialize
  super('https://www.googleapis.com/', 'drive/v2/')
  @batch_path = 'batch/drive/v2'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



39
40
41
# File 'generated/google/apis/drive_v2/service.rb', line 39

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.



45
46
47
# File 'generated/google/apis/drive_v2/service.rb', line 45

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



50
51
52
# File 'generated/google/apis/drive_v2/service.rb', line 50

def user_ip
  @user_ip
end

Instance Method Details

#copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Creates a copy of the specified file.

Parameters:

  • file_id (String)

    The ID of the file to copy.

  • file_object (Google::Apis::DriveV2::File) (defaults to: nil)
  • convert (Boolean)

    Whether to convert this file to the corresponding Google Docs format.

  • ocr (Boolean)

    Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.

  • ocr_language (String)

    If ocr is true, hints at the language to use. Valid values are BCP 47 codes.

  • pinned (Boolean)

    Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • timed_text_language (String)

    The language of the timed text.

  • timed_text_track_name (String)

    The timed text track name.

  • visibility (String)

    The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'generated/google/apis/drive_v2/service.rb', line 910

def copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/copy', options)
  command.request_representation = Google::Apis::DriveV2::File::Representation
  command.request_object = file_object
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['convert'] = convert unless convert.nil?
  command.query['ocr'] = ocr unless ocr.nil?
  command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
  command.query['pinned'] = pinned unless pinned.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
  command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
  command.query['visibility'] = visibility unless visibility.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes a child from a folder.

Parameters:

  • folder_id (String)

    The ID of the folder.

  • child_id (String)

    The ID of the child.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



476
477
478
479
480
481
482
483
484
# File 'generated/google/apis/drive_v2/service.rb', line 476

def delete_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{folderId}/children/{childId}', options)
  command.params['folderId'] = folder_id unless folder_id.nil?
  command.params['childId'] = child_id unless child_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a comment.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



644
645
646
647
648
649
650
651
652
# File 'generated/google/apis/drive_v2/service.rb', line 644

def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files.

Parameters:

  • file_id (String)

    The ID of the file to delete.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



958
959
960
961
962
963
964
965
966
# File 'generated/google/apis/drive_v2/service.rb', line 958

def delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{fileId}', options)
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes a parent from a file.

Parameters:

  • file_id (String)

    The ID of the file.

  • parent_id (String)

    The ID of the parent.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



1687
1688
1689
1690
1691
1692
1693
1694
1695
# File 'generated/google/apis/drive_v2/service.rb', line 1687

def delete_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{fileId}/parents/{parentId}', options)
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['parentId'] = parent_id unless parent_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a permission from a file or Team Drive.

Parameters:

  • file_id (String)

    The ID for the file or Team Drive.

  • permission_id (String)

    The ID for the permission.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by 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 item belongs.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
# File 'generated/google/apis/drive_v2/service.rb', line 1843

def delete_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['permissionId'] = permission_id unless permission_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a property.

Parameters:

  • file_id (String)

    The ID of the file.

  • property_key (String)

    The key of the property.

  • visibility (String)

    The visibility of the property.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
# File 'generated/google/apis/drive_v2/service.rb', line 2181

def delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{fileId}/properties/{propertyKey}', options)
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['propertyKey'] = property_key unless property_key.nil?
  command.query['visibility'] = visibility unless visibility.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a reply.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • reply_id (String)

    The ID of the reply.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
# File 'generated/google/apis/drive_v2/service.rb', line 2519

def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.params['replyId'] = reply_id unless reply_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes a revision.

Parameters:

  • file_id (String)

    The ID of the file.

  • revision_id (String)

    The ID of the revision.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



2779
2780
2781
2782
2783
2784
2785
2786
2787
# File 'generated/google/apis/drive_v2/service.rb', line 2779

def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['revisionId'] = revision_id unless revision_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items.

Parameters:

  • team_drive_id (String)

    The ID of the Team Drive

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



2976
2977
2978
2979
2980
2981
2982
2983
# File 'generated/google/apis/drive_v2/service.rb', line 2976

def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'teamdrives/{teamDriveId}', options)
  command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes all of the user's trashed files.

Parameters:

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



990
991
992
993
994
995
996
# File 'generated/google/apis/drive_v2/service.rb', line 990

def empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'files/trash', options)
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.

Parameters:

  • file_id (String)

    The ID of the file.

  • mime_type (String)

    The MIME type of the format requested for this export.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
# File 'generated/google/apis/drive_v2/service.rb', line 1027

def export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:get, 'files/{fileId}/export', options)
  else
    command = make_download_command(:get, 'files/{fileId}/export', options)
    command.download_dest = download_dest
  end
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['mimeType'] = mime_type unless mime_type.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#generate_file_ids(max_results: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::GeneratedIds

Generates a set of file IDs which can be provided in insert requests.

Parameters:

  • max_results (Fixnum)

    Maximum number of IDs to return.

  • space (String)

    The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
# File 'generated/google/apis/drive_v2/service.rb', line 1069

def generate_file_ids(max_results: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/generateIds', options)
  command.response_representation = Google::Apis::DriveV2::GeneratedIds::Representation
  command.response_class = Google::Apis::DriveV2::GeneratedIds
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['space'] = space unless space.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::About

Gets the information about the current user along with Drive API settings

Parameters:

  • include_subscribed (Boolean)

    Whether to count changes outside the My Drive hierarchy. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the maxChangeIdCount.

  • max_change_id_count (Fixnum)

    Maximum number of remaining change IDs to count

  • start_change_id (Fixnum)

    Change ID to start counting from when calculating number of remaining change IDs

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



89
90
91
92
93
94
95
96
97
98
99
100
# File 'generated/google/apis/drive_v2/service.rb', line 89

def get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'about', options)
  command.response_representation = Google::Apis::DriveV2::About::Representation
  command.response_class = Google::Apis::DriveV2::About
  command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
  command.query['maxChangeIdCount'] = max_change_id_count unless max_change_id_count.nil?
  command.query['startChangeId'] = start_change_id unless start_change_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::App

Gets a specific app.

Parameters:

  • app_id (String)

    The ID of the app.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



126
127
128
129
130
131
132
133
134
135
# File 'generated/google/apis/drive_v2/service.rb', line 126

def get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'apps/{appId}', options)
  command.response_representation = Google::Apis::DriveV2::App::Representation
  command.response_class = Google::Apis::DriveV2::App
  command.params['appId'] = app_id unless app_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_change(change_id, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Change

Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes.

Parameters:

  • change_id (String)

    The ID of the change.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • team_drive_id (String)

    The Team Drive from which the change will be returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



214
215
216
217
218
219
220
221
222
223
224
225
# File 'generated/google/apis/drive_v2/service.rb', line 214

def get_change(change_id, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'changes/{changeId}', options)
  command.response_representation = Google::Apis::DriveV2::Change::Representation
  command.response_class = Google::Apis::DriveV2::Change
  command.params['changeId'] = change_id unless change_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_change_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::StartPageToken

Gets the starting pageToken for listing future changes.

Parameters:

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • team_drive_id (String)

    The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



254
255
256
257
258
259
260
261
262
263
264
# File 'generated/google/apis/drive_v2/service.rb', line 254

def get_change_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'changes/startPageToken', options)
  command.response_representation = Google::Apis::DriveV2::StartPageToken::Representation
  command.response_class = Google::Apis::DriveV2::StartPageToken
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildReference

Gets a specific child reference.

Parameters:

  • folder_id (String)

    The ID of the folder.

  • child_id (String)

    The ID of the child.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



512
513
514
515
516
517
518
519
520
521
522
# File 'generated/google/apis/drive_v2/service.rb', line 512

def get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{folderId}/children/{childId}', options)
  command.response_representation = Google::Apis::DriveV2::ChildReference::Representation
  command.response_class = Google::Apis::DriveV2::ChildReference
  command.params['folderId'] = folder_id unless folder_id.nil?
  command.params['childId'] = child_id unless child_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment

Gets a comment by ID.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • include_deleted (Boolean)

    If set, this will succeed when retrieving a deleted comment, and will include any deleted replies.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



683
684
685
686
687
688
689
690
691
692
693
694
# File 'generated/google/apis/drive_v2/service.rb', line 683

def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
  command.response_representation = Google::Apis::DriveV2::Comment::Representation
  command.response_class = Google::Apis::DriveV2::Comment
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Gets a file's metadata by ID.

Parameters:

  • file_id (String)

    The ID for the file in question.

  • acknowledge_abuse (Boolean)

    Whether the user is acknowledging the risk of downloading known malware or other abusive files.

  • projection (String)

    This parameter is deprecated and has no function.

  • revision_id (String)

    Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • update_viewed_date (Boolean)

    Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
# File 'generated/google/apis/drive_v2/service.rb', line 1120

def get_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:get, 'files/{fileId}', options)
  else
    command = make_download_command(:get, 'files/{fileId}', options)
    command.download_dest = download_dest
  end
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['revisionId'] = revision_id unless revision_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentReference

Gets a specific parent reference.

Parameters:

  • file_id (String)

    The ID of the file.

  • parent_id (String)

    The ID of the parent.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
# File 'generated/google/apis/drive_v2/service.rb', line 1723

def get_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/parents/{parentId}', options)
  command.response_representation = Google::Apis::DriveV2::ParentReference::Representation
  command.response_class = Google::Apis::DriveV2::ParentReference
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['parentId'] = parent_id unless parent_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission

Gets a permission by ID.

Parameters:

  • file_id (String)

    The ID for the file or Team Drive.

  • permission_id (String)

    The ID for the permission.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by 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 item belongs.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
# File 'generated/google/apis/drive_v2/service.rb', line 1887

def get_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
  command.response_representation = Google::Apis::DriveV2::Permission::Representation
  command.response_class = Google::Apis::DriveV2::Permission
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['permissionId'] = permission_id unless permission_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PermissionId

Returns the permission ID for an email address.

Parameters:

  • email (String)

    The email address for which to return a permission ID

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
# File 'generated/google/apis/drive_v2/service.rb', line 1925

def get_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'permissionIds/{email}', options)
  command.response_representation = Google::Apis::DriveV2::PermissionId::Representation
  command.response_class = Google::Apis::DriveV2::PermissionId
  command.params['email'] = email unless email.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property

Gets a property by its key.

Parameters:

  • file_id (String)

    The ID of the file.

  • property_key (String)

    The key of the property.

  • visibility (String)

    The visibility of the property.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
# File 'generated/google/apis/drive_v2/service.rb', line 2220

def get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/properties/{propertyKey}', options)
  command.response_representation = Google::Apis::DriveV2::Property::Representation
  command.response_class = Google::Apis::DriveV2::Property
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['propertyKey'] = property_key unless property_key.nil?
  command.query['visibility'] = visibility unless visibility.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_realtime(file_id, revision: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Exports the contents of the Realtime API data model associated with this file as JSON.

Parameters:

  • file_id (String)

    The ID of the file that the Realtime API data model is associated with.

  • revision (Fixnum)

    The revision of the Realtime API data model to export. Revisions start at 1 ( the initial empty data model) and are incremented with each change. If this parameter is excluded, the most recent data model will be returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
# File 'generated/google/apis/drive_v2/service.rb', line 2426

def get_realtime(file_id, revision: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:get, 'files/{fileId}/realtime', options)
  else
    command = make_download_command(:get, 'files/{fileId}/realtime', options)
    command.download_dest = download_dest
  end
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['revision'] = revision unless revision.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply

Gets a reply.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • reply_id (String)

    The ID of the reply.

  • include_deleted (Boolean)

    If set, this will succeed when retrieving a deleted reply.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
# File 'generated/google/apis/drive_v2/service.rb', line 2560

def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
  command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
  command.response_class = Google::Apis::DriveV2::CommentReply
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.params['replyId'] = reply_id unless reply_id.nil?
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision

Gets a specific revision.

Parameters:

  • file_id (String)

    The ID of the file.

  • revision_id (String)

    The ID of the revision.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
# File 'generated/google/apis/drive_v2/service.rb', line 2815

def get_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
  command.response_representation = Google::Apis::DriveV2::Revision::Representation
  command.response_class = Google::Apis::DriveV2::Revision
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['revisionId'] = revision_id unless revision_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDrive

Gets a Team Drive's metadata by ID.

Parameters:

  • team_drive_id (String)

    The ID of the Team Drive

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by 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 Team Drive belongs.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
# File 'generated/google/apis/drive_v2/service.rb', line 3013

def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teamdrives/{teamDriveId}', options)
  command.response_representation = Google::Apis::DriveV2::TeamDrive::Representation
  command.response_class = Google::Apis::DriveV2::TeamDrive
  command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_child(folder_id, child_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildReference

Inserts a file into a folder.

Parameters:

  • folder_id (String)

    The ID of the folder.

  • child_reference_object (Google::Apis::DriveV2::ChildReference) (defaults to: nil)
  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



551
552
553
554
555
556
557
558
559
560
561
562
563
# File 'generated/google/apis/drive_v2/service.rb', line 551

def insert_child(folder_id, child_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{folderId}/children', options)
  command.request_representation = Google::Apis::DriveV2::ChildReference::Representation
  command.request_object = child_reference_object
  command.response_representation = Google::Apis::DriveV2::ChildReference::Representation
  command.response_class = Google::Apis::DriveV2::ChildReference
  command.params['folderId'] = folder_id unless folder_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment

Creates a new comment on the given file.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_object (Google::Apis::DriveV2::Comment) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



721
722
723
724
725
726
727
728
729
730
731
732
# File 'generated/google/apis/drive_v2/service.rb', line 721

def insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/comments', options)
  command.request_representation = Google::Apis::DriveV2::Comment::Representation
  command.request_object = comment_object
  command.response_representation = Google::Apis::DriveV2::Comment::Representation
  command.response_class = Google::Apis::DriveV2::Comment
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Insert a new file.

Parameters:

  • file_object (Google::Apis::DriveV2::File) (defaults to: nil)
  • convert (Boolean)

    Whether to convert this file to the corresponding Google Docs format.

  • ocr (Boolean)

    Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.

  • ocr_language (String)

    If ocr is true, hints at the language to use. Valid values are BCP 47 codes.

  • pinned (Boolean)

    Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • timed_text_language (String)

    The language of the timed text.

  • timed_text_track_name (String)

    The timed text track name.

  • use_content_as_indexable_text (Boolean)

    Whether to use the content as indexable text.

  • visibility (String)

    The visibility of the new file. This parameter is only relevant when convert= false.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
# File 'generated/google/apis/drive_v2/service.rb', line 1188

def insert_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:post, 'files', options)
  else
    command = make_upload_command(:post, 'files', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.request_representation = Google::Apis::DriveV2::File::Representation
  command.request_object = file_object
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.query['convert'] = convert unless convert.nil?
  command.query['ocr'] = ocr unless ocr.nil?
  command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
  command.query['pinned'] = pinned unless pinned.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
  command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
  command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
  command.query['visibility'] = visibility unless visibility.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_parent(file_id, parent_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentReference

Adds a parent folder for a file.

Parameters:

  • file_id (String)

    The ID of the file.

  • parent_reference_object (Google::Apis::DriveV2::ParentReference) (defaults to: nil)
  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
# File 'generated/google/apis/drive_v2/service.rb', line 1762

def insert_parent(file_id, parent_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/parents', options)
  command.request_representation = Google::Apis::DriveV2::ParentReference::Representation
  command.request_object = parent_reference_object
  command.response_representation = Google::Apis::DriveV2::ParentReference::Representation
  command.response_class = Google::Apis::DriveV2::ParentReference
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_permission(file_id, permission_object = nil, email_message: nil, send_notification_emails: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission

Inserts a permission for a file or Team Drive.

Parameters:

  • file_id (String)

    The ID for the file or Team Drive.

  • permission_object (Google::Apis::DriveV2::Permission) (defaults to: nil)
  • email_message (String)

    A plain text custom message to include in notification emails.

  • send_notification_emails (Boolean)

    Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by 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 item belongs.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
# File 'generated/google/apis/drive_v2/service.rb', line 1972

def insert_permission(file_id, permission_object = nil, email_message: nil, send_notification_emails: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/permissions', options)
  command.request_representation = Google::Apis::DriveV2::Permission::Representation
  command.request_object = permission_object
  command.response_representation = Google::Apis::DriveV2::Permission::Representation
  command.response_class = Google::Apis::DriveV2::Permission
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['emailMessage'] = email_message unless email_message.nil?
  command.query['sendNotificationEmails'] = send_notification_emails unless send_notification_emails.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property

Adds a property to a file, or updates it if it already exists.

Parameters:

  • file_id (String)

    The ID of the file.

  • property_object (Google::Apis::DriveV2::Property) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
# File 'generated/google/apis/drive_v2/service.rb', line 2258

def insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/properties', options)
  command.request_representation = Google::Apis::DriveV2::Property::Representation
  command.request_object = property_object
  command.response_representation = Google::Apis::DriveV2::Property::Representation
  command.response_class = Google::Apis::DriveV2::Property
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply

Creates a new reply to the given comment.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • comment_reply_object (Google::Apis::DriveV2::CommentReply) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
# File 'generated/google/apis/drive_v2/service.rb', line 2601

def insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
  command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
  command.request_object = comment_reply_object
  command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
  command.response_class = Google::Apis::DriveV2::CommentReply
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDrive

Creates a new Team Drive.

Parameters:

  • request_id (String)

    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 user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned.

  • team_drive_object (Google::Apis::DriveV2::TeamDrive) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
# File 'generated/google/apis/drive_v2/service.rb', line 3054

def insert_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'teamdrives', options)
  command.request_representation = Google::Apis::DriveV2::TeamDrive::Representation
  command.request_object = team_drive_object
  command.response_representation = Google::Apis::DriveV2::TeamDrive::Representation
  command.response_class = Google::Apis::DriveV2::TeamDrive
  command.query['requestId'] = request_id unless request_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::AppList

Lists a user's installed apps.

Parameters:

  • app_filter_extensions (String)

    A comma-separated list of file extensions for open with filtering. All apps within the given app query scope which can open any of the given file extensions will be included in the response. If appFilterMimeTypes are provided as well, the result is a union of the two resulting app lists.

  • app_filter_mime_types (String)

    A comma-separated list of MIME types for open with filtering. All apps within the given app query scope which can open any of the given MIME types will be included in the response. If appFilterExtensions are provided as well, the result is a union of the two resulting app lists.

  • language_code (String)

    A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/).

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



172
173
174
175
176
177
178
179
180
181
182
183
# File 'generated/google/apis/drive_v2/service.rb', line 172

def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'apps', options)
  command.response_representation = Google::Apis::DriveV2::AppList::Representation
  command.response_class = Google::Apis::DriveV2::AppList
  command.query['appFilterExtensions'] = app_filter_extensions unless app_filter_extensions.nil?
  command.query['appFilterMimeTypes'] = app_filter_mime_types unless app_filter_mime_types.nil?
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_changes(include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChangeList

Lists the changes for a user or Team Drive.

Parameters:

  • include_corpus_removals (Boolean)

    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 list of changes and there will be no further change entries for this file.

  • include_deleted (Boolean)

    Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.

  • include_subscribed (Boolean)

    Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result.

  • include_team_drive_items (Boolean)

    Whether Team Drive files or changes should be included in results.

  • max_results (Fixnum)

    Maximum number of changes to return.

  • page_token (String)

    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 response from the getStartPageToken method.

  • spaces (String)

    A comma-separated list of spaces to query. Supported values are 'drive', ' appDataFolder' and 'photos'.

  • start_change_id (Fixnum)

    Deprecated - use pageToken instead.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • team_drive_id (String)

    The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'generated/google/apis/drive_v2/service.rb', line 320

def list_changes(include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'changes', options)
  command.response_representation = Google::Apis::DriveV2::ChangeList::Representation
  command.response_class = Google::Apis::DriveV2::ChangeList
  command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
  command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
  command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['spaces'] = spaces unless spaces.nil?
  command.query['startChangeId'] = start_change_id unless start_change_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildList

Lists a folder's children.

Parameters:

  • folder_id (String)

    The ID of the folder.

  • max_results (Fixnum)

    Maximum number of children to return.

  • order_by (String)

    A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', ' lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', ' recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ? orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.

  • page_token (String)

    Page token for children.

  • q (String)

    Query string for searching children.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



603
604
605
606
607
608
609
610
611
612
613
614
615
616
# File 'generated/google/apis/drive_v2/service.rb', line 603

def list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{folderId}/children', options)
  command.response_representation = Google::Apis::DriveV2::ChildList::Representation
  command.response_class = Google::Apis::DriveV2::ChildList
  command.params['folderId'] = folder_id unless folder_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['q'] = q unless q.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentList

Lists a file's comments.

Parameters:

  • file_id (String)

    The ID of the file.

  • include_deleted (Boolean)

    If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned.

  • max_results (Fixnum)

    The maximum number of discussions to include in the response, used for paging.

  • page_token (String)

    The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response.

  • updated_min (String)

    Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



770
771
772
773
774
775
776
777
778
779
780
781
782
783
# File 'generated/google/apis/drive_v2/service.rb', line 770

def list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/comments', options)
  command.response_representation = Google::Apis::DriveV2::CommentList::Representation
  command.response_class = Google::Apis::DriveV2::CommentList
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['updatedMin'] = updated_min unless updated_min.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::FileList

Lists the user's files.

Parameters:

  • corpora (String)

    Comma-separated list of bodies of items (files/documents) to which the query applies. Supported bodies are 'default', 'domain', 'teamDrive' and ' allTeamDrives'. 'allTeamDrives' must be combined with 'default'; all other values must be used in isolation. Prefer 'default' or 'teamDrive' to ' allTeamDrives' for efficiency.

  • corpus (String)

    The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead.

  • include_team_drive_items (Boolean)

    Whether Team Drive items should be included in results.

  • max_results (Fixnum)

    The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.

  • order_by (String)

    A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', ' lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', ' recency', 'sharedWithMeDate', 'starred', 'title', and 'title_natural'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.

  • page_token (String)

    Page token for files.

  • projection (String)

    This parameter is deprecated and has no function.

  • q (String)

    Query string for searching files.

  • spaces (String)

    A comma-separated list of spaces to query. Supported values are 'drive', ' appDataFolder' and 'photos'.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • team_drive_id (String)

    ID of Team Drive to search.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
# File 'generated/google/apis/drive_v2/service.rb', line 1272

def list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files', options)
  command.response_representation = Google::Apis::DriveV2::FileList::Representation
  command.response_class = Google::Apis::DriveV2::FileList
  command.query['corpora'] = corpora unless corpora.nil?
  command.query['corpus'] = corpus unless corpus.nil?
  command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['q'] = q unless q.nil?
  command.query['spaces'] = spaces unless spaces.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentList

Lists a file's parents.

Parameters:

  • file_id (String)

    The ID of the file.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
# File 'generated/google/apis/drive_v2/service.rb', line 1800

def list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/parents', options)
  command.response_representation = Google::Apis::DriveV2::ParentList::Representation
  command.response_class = Google::Apis::DriveV2::ParentList
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_permissions(file_id, max_results: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PermissionList

Lists a file's or Team Drive's permissions.

Parameters:

  • file_id (String)

    The ID for the file or Team Drive.

  • max_results (Fixnum)

    The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned.

  • page_token (String)

    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.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by 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 item belongs.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
# File 'generated/google/apis/drive_v2/service.rb', line 2026

def list_permissions(file_id, max_results: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/permissions', options)
  command.response_representation = Google::Apis::DriveV2::PermissionList::Representation
  command.response_class = Google::Apis::DriveV2::PermissionList
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PropertyList

Lists a file's properties.

Parameters:

  • file_id (String)

    The ID of the file.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
# File 'generated/google/apis/drive_v2/service.rb', line 2295

def list_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/properties', options)
  command.response_representation = Google::Apis::DriveV2::PropertyList::Representation
  command.response_class = Google::Apis::DriveV2::PropertyList
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReplyList

Lists all of the replies to a comment.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • include_deleted (Boolean)

    If set, all replies, including deleted replies (with content stripped) will be returned.

  • max_results (Fixnum)

    The maximum number of replies to include in the response, used for paging.

  • page_token (String)

    The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
# File 'generated/google/apis/drive_v2/service.rb', line 2650

def list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
  command.response_representation = Google::Apis::DriveV2::CommentReplyList::Representation
  command.response_class = Google::Apis::DriveV2::CommentReplyList
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::RevisionList

Lists a file's revisions.

Parameters:

  • file_id (String)

    The ID of the file.

  • max_results (Fixnum)

    Maximum number of revisions to return.

  • page_token (String)

    Page token for revisions. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
# File 'generated/google/apis/drive_v2/service.rb', line 2856

def list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'files/{fileId}/revisions', options)
  command.response_representation = Google::Apis::DriveV2::RevisionList::Representation
  command.response_class = Google::Apis::DriveV2::RevisionList
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_teamdrives(max_results: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDriveList

Lists the user's Team Drives.

Parameters:

  • max_results (Fixnum)

    Maximum number of Team Drives to return.

  • page_token (String)

    Page token for Team Drives.

  • q (String)

    Query string for searching Team Drives.

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
# File 'generated/google/apis/drive_v2/service.rb', line 3099

def list_teamdrives(max_results: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teamdrives', options)
  command.response_representation = Google::Apis::DriveV2::TeamDriveList::Representation
  command.response_class = Google::Apis::DriveV2::TeamDriveList
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['q'] = q unless q.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment

Updates an existing comment. This method supports patch semantics.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • comment_object (Google::Apis::DriveV2::Comment) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



812
813
814
815
816
817
818
819
820
821
822
823
824
# File 'generated/google/apis/drive_v2/service.rb', line 812

def patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
  command.request_representation = Google::Apis::DriveV2::Comment::Representation
  command.request_object = comment_object
  command.response_representation = Google::Apis::DriveV2::Comment::Representation
  command.response_class = Google::Apis::DriveV2::Comment
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Updates file metadata and/or content. This method supports patch semantics.

Parameters:

  • file_id (String)

    The ID of the file to update.

  • file_object (Google::Apis::DriveV2::File) (defaults to: nil)
  • add_parents (String)

    Comma-separated list of parent IDs to add.

  • convert (Boolean)

    This parameter is deprecated and has no function.

  • modified_date_behavior (String)

    Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.

  • new_revision (Boolean)

    Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center.

  • ocr (Boolean)

    Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.

  • ocr_language (String)

    If ocr is true, hints at the language to use. Valid values are BCP 47 codes.

  • pinned (Boolean)

    Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.

  • remove_parents (String)

    Comma-separated list of parent IDs to remove.

  • set_modified_date (Boolean)

    Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • timed_text_language (String)

    The language of the timed text.

  • timed_text_track_name (String)

    The timed text track name.

  • update_viewed_date (Boolean)

    Whether to update the view date after successfully updating the file.

  • use_content_as_indexable_text (Boolean)

    Whether to use the content as indexable text.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
# File 'generated/google/apis/drive_v2/service.rb', line 1356

def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'files/{fileId}', options)
  command.request_representation = Google::Apis::DriveV2::File::Representation
  command.request_object = file_object
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['addParents'] = add_parents unless add_parents.nil?
  command.query['convert'] = convert unless convert.nil?
  command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
  command.query['newRevision'] = new_revision unless new_revision.nil?
  command.query['ocr'] = ocr unless ocr.nil?
  command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
  command.query['pinned'] = pinned unless pinned.nil?
  command.query['removeParents'] = remove_parents unless remove_parents.nil?
  command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
  command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
  command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
  command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission

Updates a permission using patch semantics.

Parameters:

  • file_id (String)

    The ID for the file or Team Drive.

  • permission_id (String)

    The ID for the permission.

  • permission_object (Google::Apis::DriveV2::Permission) (defaults to: nil)
  • remove_expiration (Boolean)

    Whether to remove the expiration date.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • transfer_ownership (Boolean)

    Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by 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 item belongs.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
# File 'generated/google/apis/drive_v2/service.rb', line 2079

def patch_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
  command.request_representation = Google::Apis::DriveV2::Permission::Representation
  command.request_object = permission_object
  command.response_representation = Google::Apis::DriveV2::Permission::Representation
  command.response_class = Google::Apis::DriveV2::Permission
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['permissionId'] = permission_id unless permission_id.nil?
  command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property

Updates a property, or adds it if it doesn't exist. This method supports patch semantics.

Parameters:

  • file_id (String)

    The ID of the file.

  • property_key (String)

    The key of the property.

  • property_object (Google::Apis::DriveV2::Property) (defaults to: nil)
  • visibility (String)

    The visibility of the property.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
# File 'generated/google/apis/drive_v2/service.rb', line 2336

def patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'files/{fileId}/properties/{propertyKey}', options)
  command.request_representation = Google::Apis::DriveV2::Property::Representation
  command.request_object = property_object
  command.response_representation = Google::Apis::DriveV2::Property::Representation
  command.response_class = Google::Apis::DriveV2::Property
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['propertyKey'] = property_key unless property_key.nil?
  command.query['visibility'] = visibility unless visibility.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply

Updates an existing reply. This method supports patch semantics.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • reply_id (String)

    The ID of the reply.

  • comment_reply_object (Google::Apis::DriveV2::CommentReply) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
# File 'generated/google/apis/drive_v2/service.rb', line 2694

def patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
  command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
  command.request_object = comment_reply_object
  command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
  command.response_class = Google::Apis::DriveV2::CommentReply
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.params['replyId'] = reply_id unless reply_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision

Updates a revision. This method supports patch semantics.

Parameters:

  • file_id (String)

    The ID for the file.

  • revision_id (String)

    The ID for the revision.

  • revision_object (Google::Apis::DriveV2::Revision) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
# File 'generated/google/apis/drive_v2/service.rb', line 2896

def patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
  command.request_representation = Google::Apis::DriveV2::Revision::Representation
  command.request_object = revision_object
  command.response_representation = Google::Apis::DriveV2::Revision::Representation
  command.response_class = Google::Apis::DriveV2::Revision
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['revisionId'] = revision_id unless revision_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Stop watching resources through this channel

Parameters:

  • channel_object (Google::Apis::DriveV2::Channel) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



440
441
442
443
444
445
446
447
448
# File 'generated/google/apis/drive_v2/service.rb', line 440

def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'channels/stop', options)
  command.request_representation = Google::Apis::DriveV2::Channel::Representation
  command.request_object = channel_object
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#touch_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Set the file's updated time to the current server time.

Parameters:

  • file_id (String)

    The ID of the file to update.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
# File 'generated/google/apis/drive_v2/service.rb', line 1409

def touch_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/touch', options)
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#trash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Moves a file to the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files.

Parameters:

  • file_id (String)

    The ID of the file to trash.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
# File 'generated/google/apis/drive_v2/service.rb', line 1448

def trash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/trash', options)
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#untrash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Restores a file from the trash.

Parameters:

  • file_id (String)

    The ID of the file to untrash.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
# File 'generated/google/apis/drive_v2/service.rb', line 1486

def untrash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'files/{fileId}/untrash', options)
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment

Updates an existing comment.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • comment_object (Google::Apis::DriveV2::Comment) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'generated/google/apis/drive_v2/service.rb', line 853

def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'files/{fileId}/comments/{commentId}', options)
  command.request_representation = Google::Apis::DriveV2::Comment::Representation
  command.request_object = comment_object
  command.response_representation = Google::Apis::DriveV2::Comment::Representation
  command.response_class = Google::Apis::DriveV2::Comment
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File

Updates file metadata and/or content.

Parameters:

  • file_id (String)

    The ID of the file to update.

  • file_object (Google::Apis::DriveV2::File) (defaults to: nil)
  • add_parents (String)

    Comma-separated list of parent IDs to add.

  • convert (Boolean)

    This parameter is deprecated and has no function.

  • modified_date_behavior (String)

    Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.

  • new_revision (Boolean)

    Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center.

  • ocr (Boolean)

    Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.

  • ocr_language (String)

    If ocr is true, hints at the language to use. Valid values are BCP 47 codes.

  • pinned (Boolean)

    Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.

  • remove_parents (String)

    Comma-separated list of parent IDs to remove.

  • set_modified_date (Boolean)

    Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • timed_text_language (String)

    The language of the timed text.

  • timed_text_track_name (String)

    The timed text track name.

  • update_viewed_date (Boolean)

    Whether to update the view date after successfully updating the file.

  • use_content_as_indexable_text (Boolean)

    Whether to use the content as indexable text.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
# File 'generated/google/apis/drive_v2/service.rb', line 1565

def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:put, 'files/{fileId}', options)
  else
    command = make_upload_command(:put, 'files/{fileId}', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.request_representation = Google::Apis::DriveV2::File::Representation
  command.request_object = file_object
  command.response_representation = Google::Apis::DriveV2::File::Representation
  command.response_class = Google::Apis::DriveV2::File
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['addParents'] = add_parents unless add_parents.nil?
  command.query['convert'] = convert unless convert.nil?
  command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
  command.query['newRevision'] = new_revision unless new_revision.nil?
  command.query['ocr'] = ocr unless ocr.nil?
  command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
  command.query['pinned'] = pinned unless pinned.nil?
  command.query['removeParents'] = remove_parents unless remove_parents.nil?
  command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
  command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
  command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
  command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission

Updates a permission.

Parameters:

  • file_id (String)

    The ID for the file or Team Drive.

  • permission_id (String)

    The ID for the permission.

  • permission_object (Google::Apis::DriveV2::Permission) (defaults to: nil)
  • remove_expiration (Boolean)

    Whether to remove the expiration date.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • transfer_ownership (Boolean)

    Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.

  • use_domain_admin_access (Boolean)

    Whether the request should be treated as if it was issued by 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 item belongs.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
# File 'generated/google/apis/drive_v2/service.rb', line 2135

def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'files/{fileId}/permissions/{permissionId}', options)
  command.request_representation = Google::Apis::DriveV2::Permission::Representation
  command.request_object = permission_object
  command.response_representation = Google::Apis::DriveV2::Permission::Representation
  command.response_class = Google::Apis::DriveV2::Permission
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['permissionId'] = permission_id unless permission_id.nil?
  command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
  command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property

Updates a property, or adds it if it doesn't exist.

Parameters:

  • file_id (String)

    The ID of the file.

  • property_key (String)

    The key of the property.

  • property_object (Google::Apis::DriveV2::Property) (defaults to: nil)
  • visibility (String)

    The visibility of the property.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
# File 'generated/google/apis/drive_v2/service.rb', line 2380

def update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'files/{fileId}/properties/{propertyKey}', options)
  command.request_representation = Google::Apis::DriveV2::Property::Representation
  command.request_object = property_object
  command.response_representation = Google::Apis::DriveV2::Property::Representation
  command.response_class = Google::Apis::DriveV2::Property
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['propertyKey'] = property_key unless property_key.nil?
  command.query['visibility'] = visibility unless visibility.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_realtime(file_id, base_revision: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Overwrites the Realtime API data model associated with this file with the provided JSON data model.

Parameters:

  • file_id (String)

    The ID of the file that the Realtime API data model is associated with.

  • base_revision (String)

    The revision of the model to diff the uploaded model against. If set, the uploaded model is diffed against the provided revision and those differences are merged with any changes made to the model after the provided revision. If not set, the uploaded model replaces the current model on the server.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
# File 'generated/google/apis/drive_v2/service.rb', line 2475

def update_realtime(file_id, base_revision: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:put, 'files/{fileId}/realtime', options)
  else
    command = make_upload_command(:put, 'files/{fileId}/realtime', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['baseRevision'] = base_revision unless base_revision.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply

Updates an existing reply.

Parameters:

  • file_id (String)

    The ID of the file.

  • comment_id (String)

    The ID of the comment.

  • reply_id (String)

    The ID of the reply.

  • comment_reply_object (Google::Apis::DriveV2::CommentReply) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
# File 'generated/google/apis/drive_v2/service.rb', line 2738

def update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
  command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
  command.request_object = comment_reply_object
  command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
  command.response_class = Google::Apis::DriveV2::CommentReply
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.params['replyId'] = reply_id unless reply_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision

Updates a revision.

Parameters:

  • file_id (String)

    The ID for the file.

  • revision_id (String)

    The ID for the revision.

  • revision_object (Google::Apis::DriveV2::Revision) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
# File 'generated/google/apis/drive_v2/service.rb', line 2937

def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'files/{fileId}/revisions/{revisionId}', options)
  command.request_representation = Google::Apis::DriveV2::Revision::Representation
  command.request_object = revision_object
  command.response_representation = Google::Apis::DriveV2::Revision::Representation
  command.response_class = Google::Apis::DriveV2::Revision
  command.params['fileId'] = file_id unless file_id.nil?
  command.params['revisionId'] = revision_id unless revision_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_teamdrive(team_drive_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDrive

Updates a Team Drive's metadata

Parameters:

  • team_drive_id (String)

    The ID of the Team Drive

  • team_drive_object (Google::Apis::DriveV2::TeamDrive) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
# File 'generated/google/apis/drive_v2/service.rb', line 3138

def update_teamdrive(team_drive_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'teamdrives/{teamDriveId}', options)
  command.request_representation = Google::Apis::DriveV2::TeamDrive::Representation
  command.request_object = team_drive_object
  command.response_representation = Google::Apis::DriveV2::TeamDrive::Representation
  command.response_class = Google::Apis::DriveV2::TeamDrive
  command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#watch_change(channel_object = nil, include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Channel

Subscribe to changes for a user.

Parameters:

  • channel_object (Google::Apis::DriveV2::Channel) (defaults to: nil)
  • include_corpus_removals (Boolean)

    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 list of changes and there will be no further change entries for this file.

  • include_deleted (Boolean)

    Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.

  • include_subscribed (Boolean)

    Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result.

  • include_team_drive_items (Boolean)

    Whether Team Drive files or changes should be included in results.

  • max_results (Fixnum)

    Maximum number of changes to return.

  • page_token (String)

    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 response from the getStartPageToken method.

  • spaces (String)

    A comma-separated list of spaces to query. Supported values are 'drive', ' appDataFolder' and 'photos'.

  • start_change_id (Fixnum)

    Deprecated - use pageToken instead.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • team_drive_id (String)

    The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'generated/google/apis/drive_v2/service.rb', line 395

def watch_change(channel_object = nil, include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'changes/watch', options)
  command.request_representation = Google::Apis::DriveV2::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::DriveV2::Channel::Representation
  command.response_class = Google::Apis::DriveV2::Channel
  command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
  command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
  command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['spaces'] = spaces unless spaces.nil?
  command.query['startChangeId'] = start_change_id unless start_change_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Channel

Subscribe to changes on a file

Parameters:

  • file_id (String)

    The ID for the file in question.

  • channel_object (Google::Apis::DriveV2::Channel) (defaults to: nil)
  • acknowledge_abuse (Boolean)

    Whether the user is acknowledging the risk of downloading known malware or other abusive files.

  • projection (String)

    This parameter is deprecated and has no function.

  • revision_id (String)

    Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.

  • supports_team_drives (Boolean)

    Whether the requesting application supports Team Drives.

  • update_viewed_date (Boolean)

    Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
# File 'generated/google/apis/drive_v2/service.rb', line 1638

def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:post, 'files/{fileId}/watch', options)
  else
    command = make_download_command(:post, 'files/{fileId}/watch', options)
    command.download_dest = download_dest
  end
  command.request_representation = Google::Apis::DriveV2::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::DriveV2::Channel::Representation
  command.response_class = Google::Apis::DriveV2::Channel
  command.params['fileId'] = file_id unless file_id.nil?
  command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['revisionId'] = revision_id unless revision_id.nil?
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
  command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end