2015-06-23 23:05:46 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
require 'google/apis/core/base_service'
|
|
|
|
require 'google/apis/core/json_representation'
|
|
|
|
require 'google/apis/core/hashable'
|
|
|
|
require 'google/apis/errors'
|
|
|
|
|
|
|
|
module Google
|
|
|
|
module Apis
|
|
|
|
module DriveV2
|
|
|
|
# Drive API
|
|
|
|
#
|
2016-05-16 16:49:15 +00:00
|
|
|
# Manages files in Drive including uploading, downloading, searching, detecting
|
|
|
|
# changes, and updating sharing permissions.
|
2015-06-23 23:05:46 +00:00
|
|
|
#
|
|
|
|
# @example
|
|
|
|
# require 'google/apis/drive_v2'
|
|
|
|
#
|
|
|
|
# Drive = Google::Apis::DriveV2 # Alias the module
|
|
|
|
# service = Drive::DriveService.new
|
|
|
|
#
|
|
|
|
# @see https://developers.google.com/drive/
|
|
|
|
class DriveService < Google::Apis::Core::BaseService
|
|
|
|
# @return [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.
|
|
|
|
attr_accessor :key
|
|
|
|
|
|
|
|
# @return [String]
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
attr_accessor :quota_user
|
|
|
|
|
|
|
|
# @return [String]
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
attr_accessor :user_ip
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
super('https://www.googleapis.com/', 'drive/v2/')
|
2017-08-30 00:35:07 +00:00
|
|
|
@batch_path = 'batch/drive/v2'
|
2015-06-23 23:05:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Gets the information about the current user along with Drive API settings
|
|
|
|
# @param [Boolean] include_subscribed
|
2017-12-14 00:36:06 +00:00
|
|
|
# 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.
|
2017-04-03 20:18:48 +00:00
|
|
|
# @param [Fixnum] max_change_id_count
|
2015-06-23 23:05:46 +00:00
|
|
|
# Maximum number of remaining change IDs to count
|
2017-04-03 20:18:48 +00:00
|
|
|
# @param [Fixnum] start_change_id
|
2015-06-23 23:05:46 +00:00
|
|
|
# Change ID to start counting from when calculating number of remaining change
|
|
|
|
# IDs
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::About] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::About]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'about', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a specific app.
|
|
|
|
# @param [String] app_id
|
|
|
|
# The ID of the app.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::App] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::App]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'apps/{appId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists a user's installed apps.
|
|
|
|
# @param [String] app_filter_extensions
|
|
|
|
# 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.
|
|
|
|
# @param [String] app_filter_mime_types
|
|
|
|
# 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.
|
|
|
|
# @param [String] language_code
|
|
|
|
# A language or locale code, as defined by BCP 47, with some extensions from
|
|
|
|
# Unicode's LDML format (http://www.unicode.org/reports/tr35/).
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::AppList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::AppList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'apps', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2017-12-14 00:36:06 +00:00
|
|
|
# Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent
|
|
|
|
# changes.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] change_id
|
|
|
|
# The ID of the change.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [String] drive_id
|
2020-05-07 20:07:42 +00:00
|
|
|
# The shared drive from which the change is returned.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use driveId instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Change] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Change]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-04-25 00:37:02 +00:00
|
|
|
def get_change(change_id, drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'changes/{changeId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::Change::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::Change
|
|
|
|
command.params['changeId'] = change_id unless change_id.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['driveId'] = drive_id unless drive_id.nil?
|
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
|
|
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2017-02-03 19:29:28 +00:00
|
|
|
# Gets the starting pageToken for listing future changes.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [String] drive_id
|
|
|
|
# The ID of the shared drive for which the starting pageToken for listing future
|
2020-05-07 20:07:42 +00:00
|
|
|
# changes from that shared drive is returned.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use driveId instead.
|
2017-02-03 19:29:28 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2017-02-03 19:29:28 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2017-02-03 19:29:28 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::StartPageToken] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::StartPageToken]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-04-25 00:37:02 +00:00
|
|
|
def get_change_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'changes/startPageToken', options)
|
2017-02-03 19:29:28 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::StartPageToken::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::StartPageToken
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['driveId'] = drive_id unless drive_id.nil?
|
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
|
|
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2017-02-03 19:29:28 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Lists the changes for a user or shared drive.
|
|
|
|
# @param [String] drive_id
|
2020-05-07 20:07:42 +00:00
|
|
|
# The shared drive from which changes are returned. If specified the change IDs
|
|
|
|
# will be reflective of the shared drive; use the combined drive ID and change
|
|
|
|
# ID as an identifier.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] include_corpus_removals
|
|
|
|
# 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.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] include_deleted
|
2017-03-10 21:11:09 +00:00
|
|
|
# Whether to include changes indicating that items have been removed from the
|
|
|
|
# list of changes, for example by deletion or loss of access.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] include_items_from_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether both My Drive and shared drive items should be included in results.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] include_subscribed
|
2017-12-14 00:36:06 +00:00
|
|
|
# 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
|
2020-05-07 20:07:42 +00:00
|
|
|
# shared files which have not been added to My Drive are omitted from the result.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] include_team_drive_items
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use includeItemsFromAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of changes to return.
|
|
|
|
# @param [String] page_token
|
2017-02-03 19:29:28 +00:00
|
|
|
# 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.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] spaces
|
2015-07-31 00:05:47 +00:00
|
|
|
# A comma-separated list of spaces to query. Supported values are 'drive', '
|
|
|
|
# appDataFolder' and 'photos'.
|
2017-04-03 20:18:48 +00:00
|
|
|
# @param [Fixnum] start_change_id
|
2017-12-14 00:36:06 +00:00
|
|
|
# Deprecated - use pageToken instead.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use driveId instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::ChangeList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::ChangeList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def list_changes(drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'changes', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::ChangeList::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::ChangeList
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['driveId'] = drive_id unless drive_id.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
|
|
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Subscribe to changes for a user.
|
|
|
|
# @param [Google::Apis::DriveV2::Channel] channel_object
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [String] drive_id
|
2020-05-07 20:07:42 +00:00
|
|
|
# The shared drive from which changes are returned. If specified the change IDs
|
|
|
|
# will be reflective of the shared drive; use the combined drive ID and change
|
|
|
|
# ID as an identifier.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] include_corpus_removals
|
|
|
|
# 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.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] include_deleted
|
2017-03-10 21:11:09 +00:00
|
|
|
# Whether to include changes indicating that items have been removed from the
|
|
|
|
# list of changes, for example by deletion or loss of access.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] include_items_from_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether both My Drive and shared drive items should be included in results.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] include_subscribed
|
2017-12-14 00:36:06 +00:00
|
|
|
# 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
|
2020-05-07 20:07:42 +00:00
|
|
|
# shared files which have not been added to My Drive are omitted from the result.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] include_team_drive_items
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use includeItemsFromAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of changes to return.
|
|
|
|
# @param [String] page_token
|
2017-02-03 19:29:28 +00:00
|
|
|
# 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.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] spaces
|
2015-07-31 00:05:47 +00:00
|
|
|
# A comma-separated list of spaces to query. Supported values are 'drive', '
|
|
|
|
# appDataFolder' and 'photos'.
|
2017-04-03 20:18:48 +00:00
|
|
|
# @param [Fixnum] start_change_id
|
2017-12-14 00:36:06 +00:00
|
|
|
# Deprecated - use pageToken instead.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use driveId instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Channel] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Channel]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def watch_change(channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'changes/watch', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['driveId'] = drive_id unless drive_id.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
|
|
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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 watching resources through this channel
|
|
|
|
# @param [Google::Apis::DriveV2::Channel] channel_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'channels/stop', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Removes a child from a folder.
|
|
|
|
# @param [String] folder_id
|
|
|
|
# The ID of the folder.
|
|
|
|
# @param [String] child_id
|
|
|
|
# The ID of the child.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. If an item is not in a shared drive and its last parent is deleted
|
|
|
|
# but the item itself is not, the item will be placed under its owner's root.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def delete_child(folder_id, child_id, enforce_single_parent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{folderId}/children/{childId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.params['folderId'] = folder_id unless folder_id.nil?
|
|
|
|
command.params['childId'] = child_id unless child_id.nil?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a specific child reference.
|
|
|
|
# @param [String] folder_id
|
|
|
|
# The ID of the folder.
|
|
|
|
# @param [String] child_id
|
|
|
|
# The ID of the child.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::ChildReference] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::ChildReference]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{folderId}/children/{childId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Inserts a file into a folder.
|
|
|
|
# @param [String] folder_id
|
|
|
|
# The ID of the folder.
|
|
|
|
# @param [Google::Apis::DriveV2::ChildReference] child_reference_object
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. Adding files to multiple folders is no longer supported. Use
|
|
|
|
# shortcuts instead.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::ChildReference] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::ChildReference]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def insert_child(folder_id, child_reference_object = nil, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{folderId}/children', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists a folder's children.
|
|
|
|
# @param [String] folder_id
|
|
|
|
# The ID of the folder.
|
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of children to return.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [String] order_by
|
|
|
|
# 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.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] page_token
|
|
|
|
# Page token for children.
|
|
|
|
# @param [String] q
|
|
|
|
# Query string for searching children.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::ChildList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::ChildList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2015-12-03 01:10:07 +00:00
|
|
|
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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{folderId}/children', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2015-12-03 01:10:07 +00:00
|
|
|
command.query['orderBy'] = order_by unless order_by.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Deletes a comment.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a comment by ID.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [Boolean] include_deleted
|
|
|
|
# If set, this will succeed when retrieving a deleted comment, and will include
|
|
|
|
# any deleted replies.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Comment]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Creates a new comment on the given file.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [Google::Apis::DriveV2::Comment] comment_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Comment]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists a file's comments.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [Boolean] include_deleted
|
|
|
|
# If set, all comments and replies, including deleted comments and replies (with
|
|
|
|
# content stripped) will be returned.
|
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# The maximum number of discussions to include in the response, used for paging.
|
|
|
|
# @param [String] page_token
|
|
|
|
# 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.
|
|
|
|
# @param [String] updated_min
|
|
|
|
# Only discussions that were updated after this timestamp will be returned.
|
|
|
|
# Formatted as an RFC 3339 timestamp.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::CommentList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::CommentList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-11-02 00:36:52 +00:00
|
|
|
# Updates an existing comment.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [Google::Apis::DriveV2::Comment] comment_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Comment]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Updates an existing comment.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [Google::Apis::DriveV2::Comment] comment_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Comment]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Permanently deletes a shared drive for which the user is an organizer. The
|
|
|
|
# shared drive cannot contain any untrashed items.
|
|
|
|
# @param [String] drive_id
|
|
|
|
# The ID of the shared drive.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
|
|
|
# @param [String] user_ip
|
|
|
|
# Deprecated. Please use quotaUser instead.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-07-30 00:37:38 +00:00
|
|
|
def delete_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'drives/{driveId}', options)
|
2019-04-25 00:37:02 +00:00
|
|
|
command.params['driveId'] = drive_id unless 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
|
|
|
|
|
|
|
|
# Gets a shared drive's metadata by ID.
|
|
|
|
# @param [String] drive_id
|
|
|
|
# The ID of the shared drive.
|
|
|
|
# @param [Boolean] use_domain_admin_access
|
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
|
|
|
# requester will be granted access if they are an administrator of the domain to
|
|
|
|
# which the shared drive belongs.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
|
|
|
# @param [String] user_ip
|
|
|
|
# Deprecated. Please use quotaUser instead.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Drive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Drive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-07-30 00:37:38 +00:00
|
|
|
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'drives/{driveId}', options)
|
2019-04-25 00:37:02 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::Drive
|
|
|
|
command.params['driveId'] = drive_id unless 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
|
|
|
|
|
|
|
|
# Hides a shared drive from the default view.
|
|
|
|
# @param [String] drive_id
|
|
|
|
# The ID of the shared drive.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
|
|
|
# @param [String] user_ip
|
|
|
|
# Deprecated. Please use quotaUser instead.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Drive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Drive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-07-30 00:37:38 +00:00
|
|
|
def hide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'drives/{driveId}/hide', options)
|
2019-04-25 00:37:02 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::Drive
|
|
|
|
command.params['driveId'] = drive_id unless 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
|
|
|
|
|
|
|
|
# Creates a new shared drive.
|
|
|
|
# @param [String] request_id
|
|
|
|
# An ID, such as a random UUID, which uniquely identifies this user's request
|
|
|
|
# for idempotent creation of a shared drive. A repeated request by the same user
|
|
|
|
# and with the same request ID will avoid creating duplicates by attempting to
|
|
|
|
# create the same shared drive. If the shared drive already exists a 409 error
|
|
|
|
# will be returned.
|
|
|
|
# @param [Google::Apis::DriveV2::Drive] drive_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
|
|
|
# @param [String] user_ip
|
|
|
|
# Deprecated. Please use quotaUser instead.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Drive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Drive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-07-30 00:37:38 +00:00
|
|
|
def insert_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'drives', options)
|
2019-04-25 00:37:02 +00:00
|
|
|
command.request_representation = Google::Apis::DriveV2::Drive::Representation
|
|
|
|
command.request_object = drive_object
|
|
|
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::Drive
|
|
|
|
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
|
|
|
|
|
|
|
|
# Lists the user's shared drives.
|
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of shared drives to return.
|
|
|
|
# @param [String] page_token
|
|
|
|
# Page token for shared drives.
|
|
|
|
# @param [String] q
|
|
|
|
# Query string for searching shared drives.
|
|
|
|
# @param [Boolean] use_domain_admin_access
|
|
|
|
# Issue the request as a domain administrator; if set to true, then all shared
|
|
|
|
# drives of the domain in which the requester is an administrator are returned.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
|
|
|
# @param [String] user_ip
|
|
|
|
# Deprecated. Please use quotaUser instead.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::DriveList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::DriveList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def list_drives(max_results: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'drives', options)
|
2019-04-25 00:37:02 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::DriveList::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::DriveList
|
|
|
|
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
|
|
|
|
|
|
|
|
# Restores a shared drive to the default view.
|
|
|
|
# @param [String] drive_id
|
|
|
|
# The ID of the shared drive.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
|
|
|
# @param [String] user_ip
|
|
|
|
# Deprecated. Please use quotaUser instead.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Drive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Drive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-07-30 00:37:38 +00:00
|
|
|
def unhide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'drives/{driveId}/unhide', options)
|
2019-04-25 00:37:02 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::Drive
|
|
|
|
command.params['driveId'] = drive_id unless 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
|
|
|
|
|
|
|
|
# Updates the metadata for a shared drive.
|
|
|
|
# @param [String] drive_id
|
|
|
|
# The ID of the shared drive.
|
|
|
|
# @param [Google::Apis::DriveV2::Drive] drive_object
|
|
|
|
# @param [Boolean] use_domain_admin_access
|
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
|
|
|
# requester will be granted access if they are an administrator of the domain to
|
|
|
|
# which the shared drive belongs.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
|
|
|
# @param [String] user_ip
|
|
|
|
# Deprecated. Please use quotaUser instead.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Drive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Drive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-07-30 00:37:38 +00:00
|
|
|
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'drives/{driveId}', options)
|
2019-04-25 00:37:02 +00:00
|
|
|
command.request_representation = Google::Apis::DriveV2::Drive::Representation
|
|
|
|
command.request_object = drive_object
|
|
|
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::Drive
|
|
|
|
command.params['driveId'] = drive_id unless 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
|
|
|
|
|
2020-07-16 00:38:22 +00:00
|
|
|
# Creates a copy of the specified file. Folders cannot be copied.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file to copy.
|
|
|
|
# @param [Google::Apis::DriveV2::File] file_object
|
|
|
|
# @param [Boolean] convert
|
feat: Automated regeneration of drive v2 client (#1396)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-05 02:23:44,731 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-05 02:23:44,760 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.48.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.19.2
Installing parallel 1.19.2
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.2
Installing powerpack 0.1.2
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
conflict google/apis/drive_v2/classes.rb
force google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-05 02:24:10,797 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-05 10:40:02 +00:00
|
|
|
# Whether to convert this file to the corresponding Docs Editors format.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. Copying files into multiple folders is no longer supported. Use
|
|
|
|
# shortcuts instead.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] ocr
|
|
|
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
|
|
# @param [String] ocr_language
|
|
|
|
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
|
|
# @param [Boolean] pinned
|
|
|
|
# Whether to pin the head revision of the new copy. A file can have a maximum of
|
|
|
|
# 200 pinned revisions.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] timed_text_language
|
|
|
|
# The language of the timed text.
|
|
|
|
# @param [String] timed_text_track_name
|
|
|
|
# The timed text track name.
|
|
|
|
# @param [String] visibility
|
|
|
|
# The visibility of the new file. This parameter is only relevant when the
|
|
|
|
# source is not a native Google Doc and convert=false.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def copy_file(file_id, file_object = nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: 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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['ocr'] = ocr unless ocr.nil?
|
|
|
|
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
|
|
command.query['pinned'] = pinned unless pinned.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Permanently deletes a file by ID. Skips the trash. The currently authenticated
|
2019-04-25 00:37:02 +00:00
|
|
|
# user must own the file or be an organizer on the parent for shared drive files.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file to delete.
|
2020-08-27 00:39:26 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. If an item is not in a shared drive and its last parent is deleted
|
|
|
|
# but the item itself is not, the item will be placed under its owner's root.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-27 00:39:26 +00:00
|
|
|
def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{fileId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
2020-08-27 00:39:26 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Permanently deletes all of the user's trashed files.
|
2020-08-27 00:39:26 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. If an item is not in a shared drive and its last parent is deleted
|
|
|
|
# but the item itself is not, the item will be placed under its owner's root.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-27 00:39:26 +00:00
|
|
|
def empty_trash(enforce_single_parent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/trash', options)
|
2020-08-27 00:39:26 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2015-12-03 01:10:07 +00:00
|
|
|
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
|
|
|
|
|
2016-02-10 21:57:13 +00:00
|
|
|
# Exports a Google Doc to the requested MIME type and returns the exported
|
2017-07-12 20:10:42 +00:00
|
|
|
# content. Please note that the exported content is limited to 10MB.
|
2016-02-10 21:57:13 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] mime_type
|
|
|
|
# The MIME type of the format requested for this export.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2016-02-10 21:57:13 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2016-02-10 21:57:13 +00:00
|
|
|
# @param [IO, String] download_dest
|
|
|
|
# IO stream or filename to receive content download
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
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?
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/export', options)
|
2016-02-10 21:57:13 +00:00
|
|
|
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
|
|
|
|
|
2019-06-27 00:36:51 +00:00
|
|
|
# Generates a set of file IDs which can be provided in insert or copy requests.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of IDs to return.
|
|
|
|
# @param [String] space
|
|
|
|
# The space in which the IDs can be used to create new files. Supported values
|
|
|
|
# are 'drive' and 'appDataFolder'.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::GeneratedIds] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::GeneratedIds]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def generate_file_ids(max_results: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/generateIds', options)
|
2015-12-03 01:10:07 +00:00
|
|
|
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?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a file's metadata by ID.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID for the file in question.
|
|
|
|
# @param [Boolean] acknowledge_abuse
|
|
|
|
# Whether the user is acknowledging the risk of downloading known malware or
|
|
|
|
# other abusive files.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] projection
|
|
|
|
# This parameter is deprecated and has no function.
|
|
|
|
# @param [String] revision_id
|
|
|
|
# Specifies the Revision ID that should be downloaded. Ignored unless alt=media
|
|
|
|
# is specified.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] update_viewed_date
|
2015-12-03 01:10:07 +00:00
|
|
|
# Deprecated: Use files.update with modifiedDateBehavior=noChange,
|
|
|
|
# updateViewedDate=true and an empty request body.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [IO, String] download_dest
|
|
|
|
# IO stream or filename to receive content download
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def get_file(file_id, acknowledge_abuse: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
2015-06-23 23:05:46 +00:00
|
|
|
if download_dest.nil?
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
else
|
2015-12-03 01:10:07 +00:00
|
|
|
command = make_download_command(:get, 'files/{fileId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['projection'] = projection unless projection.nil?
|
|
|
|
command.query['revisionId'] = revision_id unless revision_id.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Insert a new file.
|
|
|
|
# @param [Google::Apis::DriveV2::File] file_object
|
|
|
|
# @param [Boolean] convert
|
feat: Automated regeneration of drive v2 client (#1396)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-05 02:23:44,731 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-05 02:23:44,760 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.48.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.19.2
Installing parallel 1.19.2
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.2
Installing powerpack 0.1.2
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
conflict google/apis/drive_v2/classes.rb
force google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-05 02:24:10,797 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-05 10:40:02 +00:00
|
|
|
# Whether to convert this file to the corresponding Docs Editors format.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. Creating files in multiple folders is no longer supported.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] ocr
|
|
|
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
|
|
# @param [String] ocr_language
|
|
|
|
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
|
|
# @param [Boolean] pinned
|
|
|
|
# Whether to pin the head revision of the uploaded file. A file can have a
|
|
|
|
# maximum of 200 pinned revisions.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] timed_text_language
|
|
|
|
# The language of the timed text.
|
|
|
|
# @param [String] timed_text_track_name
|
|
|
|
# The timed text track name.
|
|
|
|
# @param [Boolean] use_content_as_indexable_text
|
|
|
|
# Whether to use the content as indexable text.
|
|
|
|
# @param [String] visibility
|
|
|
|
# The visibility of the new file. This parameter is only relevant when convert=
|
|
|
|
# false.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [IO, String] upload_source
|
|
|
|
# IO stream or filename containing content to upload
|
|
|
|
# @param [String] content_type
|
|
|
|
# Content type of the uploaded content.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def insert_file(file_object = nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: 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)
|
2015-06-23 23:05:46 +00:00
|
|
|
if upload_source.nil?
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
else
|
2015-12-03 01:10:07 +00:00
|
|
|
command = make_upload_command(:post, 'files', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['ocr'] = ocr unless ocr.nil?
|
|
|
|
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
|
|
command.query['pinned'] = pinned unless pinned.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists the user's files.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] corpora
|
2020-07-16 00:38:22 +00:00
|
|
|
# Groupings of files to which the query applies. Supported groupings are: 'user'
|
|
|
|
# (files created by, opened by, or shared directly with the user), 'drive' (
|
|
|
|
# files in the specified shared drive as indicated by the 'driveId'), 'domain' (
|
|
|
|
# files shared to the user's domain), and 'allDrives' (A combination of 'user'
|
|
|
|
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
|
|
|
# or 'drive', instead of 'allDrives', for efficiency.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] corpus
|
2017-03-10 21:11:09 +00:00
|
|
|
# The body of items (files/documents) to which the query applies. Deprecated:
|
|
|
|
# use 'corpora' instead.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [String] drive_id
|
|
|
|
# ID of the shared drive to search.
|
|
|
|
# @param [Boolean] include_items_from_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether both My Drive and shared drive items should be included in results.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] include_team_drive_items
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use includeItemsFromAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Fixnum] max_results
|
2017-05-04 19:35:56 +00:00
|
|
|
# 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.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [String] order_by
|
|
|
|
# A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', '
|
|
|
|
# lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', '
|
2017-08-31 00:35:15 +00:00
|
|
|
# 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.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] page_token
|
|
|
|
# Page token for files.
|
|
|
|
# @param [String] projection
|
|
|
|
# This parameter is deprecated and has no function.
|
|
|
|
# @param [String] q
|
|
|
|
# Query string for searching files.
|
|
|
|
# @param [String] spaces
|
2015-07-31 00:05:47 +00:00
|
|
|
# A comma-separated list of spaces to query. Supported values are 'drive', '
|
|
|
|
# appDataFolder' and 'photos'.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use driveId instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::FileList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::FileList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::FileList::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::FileList
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['corpora'] = corpora unless corpora.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['corpus'] = corpus unless corpus.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['driveId'] = drive_id unless drive_id.nil?
|
|
|
|
command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
2015-12-03 01:10:07 +00:00
|
|
|
command.query['orderBy'] = order_by unless order_by.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
|
|
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Updates file metadata and/or content. This method supports patch semantics.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file to update.
|
|
|
|
# @param [Google::Apis::DriveV2::File] file_object
|
|
|
|
# @param [String] add_parents
|
|
|
|
# Comma-separated list of parent IDs to add.
|
|
|
|
# @param [Boolean] convert
|
2015-12-03 01:10:07 +00:00
|
|
|
# This parameter is deprecated and has no function.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. Adding files to multiple folders is no longer supported. Use
|
|
|
|
# shortcuts instead.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-07-31 00:05:47 +00:00
|
|
|
# @param [String] modified_date_behavior
|
2015-12-03 01:10:07 +00:00
|
|
|
# Determines the behavior in which modifiedDate is updated. This overrides
|
|
|
|
# setModifiedDate.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] new_revision
|
|
|
|
# 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
|
2015-12-03 01:10:07 +00:00
|
|
|
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
2020-07-14 00:38:22 +00:00
|
|
|
# revisions are retained, see the Drive Help Center. Note that this field is
|
|
|
|
# ignored if there is no payload in the request.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] ocr
|
|
|
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
|
|
# @param [String] ocr_language
|
|
|
|
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
|
|
# @param [Boolean] pinned
|
|
|
|
# Whether to pin the new revision. A file can have a maximum of 200 pinned
|
2020-07-14 00:38:22 +00:00
|
|
|
# revisions. Note that this field is ignored if there is no payload in the
|
|
|
|
# request.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] remove_parents
|
|
|
|
# Comma-separated list of parent IDs to remove.
|
|
|
|
# @param [Boolean] set_modified_date
|
2017-12-14 00:36:06 +00:00
|
|
|
# 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.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] timed_text_language
|
|
|
|
# The language of the timed text.
|
|
|
|
# @param [String] timed_text_track_name
|
|
|
|
# The timed text track name.
|
|
|
|
# @param [Boolean] update_viewed_date
|
|
|
|
# Whether to update the view date after successfully updating the file.
|
|
|
|
# @param [Boolean] use_content_as_indexable_text
|
|
|
|
# Whether to use the content as indexable text.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: 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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:patch, 'files/{fileId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-07-31 00:05:47 +00:00
|
|
|
command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Set the file's updated time to the current server time.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file to update.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def touch_file(file_id, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/touch', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::File
|
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2017-03-10 21:11:09 +00:00
|
|
|
# Moves a file to the trash. The currently authenticated user must own the file
|
2020-07-16 00:38:22 +00:00
|
|
|
# or be at least a fileOrganizer on the parent for shared drive files. Only the
|
|
|
|
# owner may trash a file. The trashed item is excluded from all files.list
|
|
|
|
# responses returned for any user who does not own the file. However, all users
|
|
|
|
# with access to the file can see the trashed item metadata in an API response.
|
|
|
|
# All users with access can copy, download, export, and share the file.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file to trash.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def trash_file(file_id, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/trash', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::File
|
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2020-07-16 00:38:22 +00:00
|
|
|
# Restores a file from the trash. The currently authenticated user must own the
|
|
|
|
# file or be at least a fileOrganizer on the parent for shared drive files. Only
|
|
|
|
# the owner may untrash a file.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file to untrash.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def untrash_file(file_id, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/untrash', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::File
|
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Updates file metadata and/or content.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file to update.
|
|
|
|
# @param [Google::Apis::DriveV2::File] file_object
|
|
|
|
# @param [String] add_parents
|
|
|
|
# Comma-separated list of parent IDs to add.
|
|
|
|
# @param [Boolean] convert
|
2015-12-03 01:10:07 +00:00
|
|
|
# This parameter is deprecated and has no function.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. Adding files to multiple folders is no longer supported. Use
|
|
|
|
# shortcuts instead.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-07-31 00:05:47 +00:00
|
|
|
# @param [String] modified_date_behavior
|
2015-12-03 01:10:07 +00:00
|
|
|
# Determines the behavior in which modifiedDate is updated. This overrides
|
|
|
|
# setModifiedDate.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] new_revision
|
|
|
|
# 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
|
2015-12-03 01:10:07 +00:00
|
|
|
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
2020-07-14 00:38:22 +00:00
|
|
|
# revisions are retained, see the Drive Help Center. Note that this field is
|
|
|
|
# ignored if there is no payload in the request.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] ocr
|
|
|
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
|
|
# @param [String] ocr_language
|
|
|
|
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
|
|
# @param [Boolean] pinned
|
|
|
|
# Whether to pin the new revision. A file can have a maximum of 200 pinned
|
2020-07-14 00:38:22 +00:00
|
|
|
# revisions. Note that this field is ignored if there is no payload in the
|
|
|
|
# request.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] remove_parents
|
|
|
|
# Comma-separated list of parent IDs to remove.
|
|
|
|
# @param [Boolean] set_modified_date
|
2017-12-14 00:36:06 +00:00
|
|
|
# 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.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] timed_text_language
|
|
|
|
# The language of the timed text.
|
|
|
|
# @param [String] timed_text_track_name
|
|
|
|
# The timed text track name.
|
|
|
|
# @param [Boolean] update_viewed_date
|
|
|
|
# Whether to update the view date after successfully updating the file.
|
|
|
|
# @param [Boolean] use_content_as_indexable_text
|
|
|
|
# Whether to use the content as indexable text.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [IO, String] upload_source
|
|
|
|
# IO stream or filename containing content to upload
|
|
|
|
# @param [String] content_type
|
|
|
|
# Content type of the uploaded content.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::File]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: 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)
|
2015-06-23 23:05:46 +00:00
|
|
|
if upload_source.nil?
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'files/{fileId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
else
|
2015-12-03 01:10:07 +00:00
|
|
|
command = make_upload_command(:put, 'files/{fileId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-07-31 00:05:47 +00:00
|
|
|
command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Subscribe to changes on a file
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID for the file in question.
|
|
|
|
# @param [Google::Apis::DriveV2::Channel] channel_object
|
|
|
|
# @param [Boolean] acknowledge_abuse
|
|
|
|
# Whether the user is acknowledging the risk of downloading known malware or
|
|
|
|
# other abusive files.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] projection
|
|
|
|
# This parameter is deprecated and has no function.
|
|
|
|
# @param [String] revision_id
|
|
|
|
# Specifies the Revision ID that should be downloaded. Ignored unless alt=media
|
|
|
|
# is specified.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] update_viewed_date
|
2015-12-03 01:10:07 +00:00
|
|
|
# Deprecated: Use files.update with modifiedDateBehavior=noChange,
|
|
|
|
# updateViewedDate=true and an empty request body.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [IO, String] download_dest
|
|
|
|
# IO stream or filename to receive content download
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Channel] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Channel]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
2015-06-23 23:05:46 +00:00
|
|
|
if download_dest.nil?
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
else
|
2015-12-03 01:10:07 +00:00
|
|
|
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['projection'] = projection unless projection.nil?
|
|
|
|
command.query['revisionId'] = revision_id unless revision_id.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Removes a parent from a file.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] parent_id
|
|
|
|
# The ID of the parent.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. If an item is not in a shared drive and its last parent is deleted
|
|
|
|
# but the item itself is not, the item will be placed under its owner's root.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def delete_parent(file_id, parent_id, enforce_single_parent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{fileId}/parents/{parentId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
|
|
|
command.params['parentId'] = parent_id unless parent_id.nil?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a specific parent reference.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] parent_id
|
|
|
|
# The ID of the parent.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::ParentReference] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::ParentReference]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/parents/{parentId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Adds a parent folder for a file.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [Google::Apis::DriveV2::ParentReference] parent_reference_object
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. Adding files to multiple folders is no longer supported. Use
|
|
|
|
# shortcuts instead.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::ParentReference] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::ParentReference]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def insert_parent(file_id, parent_reference_object = nil, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/parents', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists a file's parents.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::ParentList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::ParentList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/parents', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deletes a permission from a file or shared drive.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# The ID for the file or shared drive.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] permission_id
|
|
|
|
# The ID for the permission.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
2019-04-25 00:37:02 +00:00
|
|
|
# requester will be granted access if the file ID parameter refers to a shared
|
|
|
|
# drive and the requester is an administrator of the domain to which the shared
|
|
|
|
# drive belongs.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-04-25 00:37:02 +00:00
|
|
|
def delete_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
|
|
|
command.params['permissionId'] = permission_id unless permission_id.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a permission by ID.
|
|
|
|
# @param [String] file_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# The ID for the file or shared drive.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] permission_id
|
|
|
|
# The ID for the permission.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
2019-04-25 00:37:02 +00:00
|
|
|
# requester will be granted access if the file ID parameter refers to a shared
|
|
|
|
# drive and the requester is an administrator of the domain to which the shared
|
|
|
|
# drive belongs.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Permission]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-04-25 00:37:02 +00:00
|
|
|
def get_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Returns the permission ID for an email address.
|
|
|
|
# @param [String] email
|
|
|
|
# The email address for which to return a permission ID
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::PermissionId] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::PermissionId]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'permissionIds/{email}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Inserts a permission for a file or shared drive.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# The ID for the file or shared drive.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::DriveV2::Permission] permission_object
|
|
|
|
# @param [String] email_message
|
2017-12-14 00:36:06 +00:00
|
|
|
# A plain text custom message to include in notification emails.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] enforce_single_parent
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# Deprecated. See moveToNewOwnersRoot for details.
|
2020-04-13 16:49:10 +00:00
|
|
|
# @param [Boolean] move_to_new_owners_root
|
feat: Automated regeneration of drive v2 client (#1565)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-19 02:27:19,944 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-drive-v2
nothing to commit, working tree clean
2020-11-19 02:27:19,975 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth drive v2
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.0
Installing parallel 1.20.0
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=drive.v2 --names-out=/workspace/api_names_out.yaml
Loading drive, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/drive.v2.json
conflict google/apis/drive_v2.rb
<e/apis/drive_v2.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/drive_v2.rb
conflict google/apis/drive_v2/service.rb
force google/apis/drive_v2/service.rb
identical google/apis/drive_v2/classes.rb
identical google/apis/drive_v2/representations.rb
identical /workspace/api_names_out.yaml
2020-11-19 02:27:48,380 synthtool [DEBUG] > Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/drive_v2/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/f6253520-17a3-4a68-bfe7-2f216bc53c60/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-19 10:42:05 +00:00
|
|
|
# This parameter will only take effect if the item is not in a shared drive and
|
|
|
|
# the request is attempting to transfer the ownership of the item. If set to
|
|
|
|
# true, the item will be moved to the new owner's My Drive root folder and all
|
|
|
|
# prior parents removed. If set to false, parents are not changed.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] send_notification_emails
|
|
|
|
# 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.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
2019-04-25 00:37:02 +00:00
|
|
|
# requester will be granted access if the file ID parameter refers to a shared
|
|
|
|
# drive and the requester is an administrator of the domain to which the shared
|
|
|
|
# drive belongs.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Permission]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def insert_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_emails: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2020-04-13 16:49:10 +00:00
|
|
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
|
|
|
command.query['moveToNewOwnersRoot'] = move_to_new_owners_root unless move_to_new_owners_root.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['sendNotificationEmails'] = send_notification_emails unless send_notification_emails.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Lists a file's or shared drive's permissions.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# The ID for the file or shared drive.
|
2020-08-07 00:38:13 +00:00
|
|
|
# @param [String] include_permissions_for_view
|
|
|
|
# Specifies which additional view's permissions to include in the response. Only
|
|
|
|
# 'published' is supported.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# The maximum number of permissions to return per page. When not set for files
|
2019-04-25 00:37:02 +00:00
|
|
|
# in a shared drive, at most 100 results will be returned. When not set for
|
|
|
|
# files that are not in a shared drive, the entire list will be returned.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] page_token
|
|
|
|
# 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.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
2019-04-25 00:37:02 +00:00
|
|
|
# requester will be granted access if the file ID parameter refers to a shared
|
|
|
|
# drive and the requester is an administrator of the domain to which the shared
|
|
|
|
# drive belongs.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::PermissionList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::PermissionList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-08-07 00:38:13 +00:00
|
|
|
def list_permissions(file_id, include_permissions_for_view: nil, max_results: nil, page_token: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::PermissionList::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::PermissionList
|
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
2020-08-07 00:38:13 +00:00
|
|
|
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2015-12-03 01:10:07 +00:00
|
|
|
# Updates a permission using patch semantics.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# The ID for the file or shared drive.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] permission_id
|
|
|
|
# The ID for the permission.
|
|
|
|
# @param [Google::Apis::DriveV2::Permission] permission_object
|
2016-06-09 20:22:21 +00:00
|
|
|
# @param [Boolean] remove_expiration
|
|
|
|
# Whether to remove the expiration date.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] transfer_ownership
|
|
|
|
# Whether changing a role to 'owner' downgrades the current owners to writers.
|
|
|
|
# Does nothing if the specified role is not 'owner'.
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
2019-04-25 00:37:02 +00:00
|
|
|
# requester will be granted access if the file ID parameter refers to a shared
|
|
|
|
# drive and the requester is an administrator of the domain to which the shared
|
|
|
|
# drive belongs.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Permission]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-04-25 00:37:02 +00:00
|
|
|
def patch_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2016-06-09 20:22:21 +00:00
|
|
|
command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Updates a permission.
|
|
|
|
# @param [String] file_id
|
2019-04-25 00:37:02 +00:00
|
|
|
# The ID for the file or shared drive.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] permission_id
|
|
|
|
# The ID for the permission.
|
|
|
|
# @param [Google::Apis::DriveV2::Permission] permission_object
|
2016-06-09 20:22:21 +00:00
|
|
|
# @param [Boolean] remove_expiration
|
|
|
|
# Whether to remove the expiration date.
|
2019-04-25 00:37:02 +00:00
|
|
|
# @param [Boolean] supports_all_drives
|
2020-06-20 00:38:16 +00:00
|
|
|
# Whether the requesting application supports both My Drives and shared drives.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Boolean] supports_team_drives
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use supportsAllDrives instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Boolean] transfer_ownership
|
|
|
|
# Whether changing a role to 'owner' downgrades the current owners to writers.
|
|
|
|
# Does nothing if the specified role is not 'owner'.
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
2019-04-25 00:37:02 +00:00
|
|
|
# requester will be granted access if the file ID parameter refers to a shared
|
|
|
|
# drive and the requester is an administrator of the domain to which the shared
|
|
|
|
# drive belongs.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Permission]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2019-04-25 00:37:02 +00:00
|
|
|
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'files/{fileId}/permissions/{permissionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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?
|
2016-06-09 20:22:21 +00:00
|
|
|
command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
|
2019-04-25 00:37:02 +00:00
|
|
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Deletes a property.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] property_key
|
|
|
|
# The key of the property.
|
|
|
|
# @param [String] visibility
|
|
|
|
# The visibility of the property.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{fileId}/properties/{propertyKey}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a property by its key.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] property_key
|
|
|
|
# The key of the property.
|
|
|
|
# @param [String] visibility
|
|
|
|
# The visibility of the property.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Property]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/properties/{propertyKey}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2016-01-08 00:23:51 +00:00
|
|
|
# Adds a property to a file, or updates it if it already exists.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [Google::Apis::DriveV2::Property] property_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Property]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/properties', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists a file's properties.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::PropertyList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::PropertyList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def list_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/properties', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2018-04-26 00:36:26 +00:00
|
|
|
# Updates a property.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] property_key
|
|
|
|
# The key of the property.
|
|
|
|
# @param [Google::Apis::DriveV2::Property] property_object
|
|
|
|
# @param [String] visibility
|
2018-04-06 00:35:48 +00:00
|
|
|
# The visibility of the property. Allowed values are PRIVATE and PUBLIC. (
|
|
|
|
# Default: PRIVATE)
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Property]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:patch, 'files/{fileId}/properties/{propertyKey}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2018-04-06 00:35:48 +00:00
|
|
|
# Updates a property.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] property_key
|
|
|
|
# The key of the property.
|
|
|
|
# @param [Google::Apis::DriveV2::Property] property_object
|
|
|
|
# @param [String] visibility
|
2018-04-06 00:35:48 +00:00
|
|
|
# The visibility of the property. Allowed values are PRIVATE and PUBLIC. (
|
|
|
|
# Default: PRIVATE)
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Property]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'files/{fileId}/properties/{propertyKey}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Deletes a reply.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [String] reply_id
|
|
|
|
# The ID of the reply.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a reply.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [String] reply_id
|
|
|
|
# The ID of the reply.
|
|
|
|
# @param [Boolean] include_deleted
|
|
|
|
# If set, this will succeed when retrieving a deleted reply.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::CommentReply]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Creates a new reply to the given comment.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::CommentReply]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists all of the replies to a comment.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [Boolean] include_deleted
|
|
|
|
# If set, all replies, including deleted replies (with content stripped) will be
|
|
|
|
# returned.
|
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# The maximum number of replies to include in the response, used for paging.
|
|
|
|
# @param [String] page_token
|
|
|
|
# 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.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::CommentReplyList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::CommentReplyList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-11-02 00:36:52 +00:00
|
|
|
# Updates an existing reply.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [String] reply_id
|
|
|
|
# The ID of the reply.
|
|
|
|
# @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::CommentReply]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Updates an existing reply.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] comment_id
|
|
|
|
# The ID of the comment.
|
|
|
|
# @param [String] reply_id
|
|
|
|
# The ID of the reply.
|
|
|
|
# @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::CommentReply]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-03-15 00:36:52 +00:00
|
|
|
# Permanently deletes a file version. You can only delete revisions for files
|
|
|
|
# with binary content, like images or videos. Revisions for other files, like
|
|
|
|
# Google Docs or Sheets, and the last remaining file version can't be deleted.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] revision_id
|
|
|
|
# The ID of the revision.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Gets a specific revision.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
|
|
|
# @param [String] revision_id
|
|
|
|
# The ID of the revision.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Revision]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def get_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists a file's revisions.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID of the file.
|
2016-10-12 22:52:51 +00:00
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of revisions to return.
|
|
|
|
# @param [String] page_token
|
|
|
|
# Page token for revisions. To get the next page of results, set this parameter
|
|
|
|
# to the value of "nextPageToken" from the previous response.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::RevisionList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::RevisionList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2016-10-12 22:52:51 +00:00
|
|
|
def list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
command.response_representation = Google::Apis::DriveV2::RevisionList::Representation
|
|
|
|
command.response_class = Google::Apis::DriveV2::RevisionList
|
|
|
|
command.params['fileId'] = file_id unless file_id.nil?
|
2016-10-12 22:52:51 +00:00
|
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
2019-11-02 00:36:52 +00:00
|
|
|
# Updates a revision.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] file_id
|
|
|
|
# The ID for the file.
|
|
|
|
# @param [String] revision_id
|
|
|
|
# The ID for the revision.
|
|
|
|
# @param [Google::Apis::DriveV2::Revision] revision_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Revision]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Updates a revision.
|
|
|
|
# @param [String] file_id
|
|
|
|
# The ID for the file.
|
|
|
|
# @param [String] revision_id
|
|
|
|
# The ID for the revision.
|
|
|
|
# @param [Google::Apis::DriveV2::Revision] revision_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2015-06-23 23:05:46 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::Revision]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'files/{fileId}/revisions/{revisionId}', options)
|
2015-06-23 23:05:46 +00:00
|
|
|
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
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use drives.delete instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
|
|
|
# The ID of the Team Drive
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [void]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-03-31 19:53:27 +00:00
|
|
|
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:delete, 'teamdrives/{teamDriveId}', options)
|
2017-03-10 21:11:09 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use drives.get instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
|
|
|
# The ID of the Team Drive
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
|
|
|
# requester will be granted access if they are an administrator of the domain to
|
|
|
|
# which the Team Drive belongs.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::TeamDrive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::TeamDrive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-11-01 00:35:09 +00:00
|
|
|
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'teamdrives/{teamDriveId}', options)
|
2017-03-10 21:11:09 +00:00
|
|
|
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?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use drives.insert instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] request_id
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::DriveV2::TeamDrive] team_drive_object
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::TeamDrive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::TeamDrive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-03-31 19:53:27 +00:00
|
|
|
def insert_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:post, 'teamdrives', options)
|
2017-03-10 21:11:09 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use drives.list instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of Team Drives to return.
|
|
|
|
# @param [String] page_token
|
|
|
|
# Page token for Team Drives.
|
2017-11-01 00:35:09 +00:00
|
|
|
# @param [String] q
|
|
|
|
# Query string for searching Team Drives.
|
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-07-11 00:36:18 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then all Team
|
|
|
|
# Drives of the domain in which the requester is an administrator are returned.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::TeamDriveList] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::TeamDriveList]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-11-01 00:35:09 +00:00
|
|
|
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)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:get, 'teamdrives', options)
|
2017-03-10 21:11:09 +00:00
|
|
|
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?
|
2017-11-01 00:35:09 +00:00
|
|
|
command.query['q'] = q unless q.nil?
|
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
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
|
|
|
|
|
2019-04-25 00:37:02 +00:00
|
|
|
# Deprecated use drives.update instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] team_drive_id
|
|
|
|
# The ID of the Team Drive
|
|
|
|
# @param [Google::Apis::DriveV2::TeamDrive] team_drive_object
|
2018-07-11 00:36:18 +00:00
|
|
|
# @param [Boolean] use_domain_admin_access
|
2018-08-22 21:14:52 +00:00
|
|
|
# Issue the request as a domain administrator; if set to true, then the
|
|
|
|
# requester will be granted access if they are an administrator of the domain to
|
|
|
|
# which the Team Drive belongs.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
2018-05-02 00:35:55 +00:00
|
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
|
|
# characters.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] user_ip
|
2018-05-02 00:35:55 +00:00
|
|
|
# Deprecated. Please use quotaUser instead.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::DriveV2::TeamDrive] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::DriveV2::TeamDrive]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2018-07-11 00:36:18 +00:00
|
|
|
def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2019-05-10 00:37:26 +00:00
|
|
|
command = make_simple_command(:put, 'teamdrives/{teamDriveId}', options)
|
2017-03-10 21:11:09 +00:00
|
|
|
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?
|
2018-07-11 00:36:18 +00:00
|
|
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
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
|
2015-06-23 23:05:46 +00:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def apply_command_defaults(command)
|
|
|
|
command.query['key'] = key unless key.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|