google-apis-drive_v3 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-drive_v3.rb +15 -0
- data/lib/google/apis/drive_v3.rb +58 -0
- data/lib/google/apis/drive_v3/classes.rb +3038 -0
- data/lib/google/apis/drive_v3/gem_version.rb +28 -0
- data/lib/google/apis/drive_v3/representations.rb +927 -0
- data/lib/google/apis/drive_v3/service.rb +2210 -0
- metadata +76 -0
@@ -0,0 +1,2210 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module DriveV3
|
23
|
+
# Drive API
|
24
|
+
#
|
25
|
+
# Manages files in Drive including uploading, downloading, searching, detecting
|
26
|
+
# changes, and updating sharing permissions.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/drive_v3'
|
30
|
+
#
|
31
|
+
# Drive = Google::Apis::DriveV3 # Alias the module
|
32
|
+
# service = Drive::DriveService.new
|
33
|
+
#
|
34
|
+
# @see https://developers.google.com/drive/
|
35
|
+
class DriveService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
43
|
+
# characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
# @return [String]
|
47
|
+
# Deprecated. Please use quotaUser instead.
|
48
|
+
attr_accessor :user_ip
|
49
|
+
|
50
|
+
def initialize
|
51
|
+
super('https://www.googleapis.com/', 'drive/v3/',
|
52
|
+
client_name: 'google-apis-drive_v3',
|
53
|
+
client_version: Google::Apis::DriveV3::GEM_VERSION)
|
54
|
+
@batch_path = 'batch/drive/v3'
|
55
|
+
end
|
56
|
+
|
57
|
+
# Gets information about the user, the user's Drive, and system capabilities.
|
58
|
+
# @param [String] fields
|
59
|
+
# Selector specifying which fields to include in a partial response.
|
60
|
+
# @param [String] quota_user
|
61
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
62
|
+
# characters.
|
63
|
+
# @param [String] user_ip
|
64
|
+
# Deprecated. Please use quotaUser instead.
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
66
|
+
# Request-specific options
|
67
|
+
#
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
69
|
+
# @yieldparam result [Google::Apis::DriveV3::About] parsed result object
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
71
|
+
#
|
72
|
+
# @return [Google::Apis::DriveV3::About]
|
73
|
+
#
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
+
def get_about(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
78
|
+
command = make_simple_command(:get, 'about', options)
|
79
|
+
command.response_representation = Google::Apis::DriveV3::About::Representation
|
80
|
+
command.response_class = Google::Apis::DriveV3::About
|
81
|
+
command.query['fields'] = fields unless fields.nil?
|
82
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
84
|
+
execute_or_queue_command(command, &block)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Gets the starting pageToken for listing future changes.
|
88
|
+
# @param [String] drive_id
|
89
|
+
# The ID of the shared drive for which the starting pageToken for listing future
|
90
|
+
# changes from that shared drive is returned.
|
91
|
+
# @param [Boolean] supports_all_drives
|
92
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
93
|
+
# @param [Boolean] supports_team_drives
|
94
|
+
# Deprecated use supportsAllDrives instead.
|
95
|
+
# @param [String] team_drive_id
|
96
|
+
# Deprecated use driveId instead.
|
97
|
+
# @param [String] fields
|
98
|
+
# Selector specifying which fields to include in a partial response.
|
99
|
+
# @param [String] quota_user
|
100
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
101
|
+
# characters.
|
102
|
+
# @param [String] user_ip
|
103
|
+
# Deprecated. Please use quotaUser instead.
|
104
|
+
# @param [Google::Apis::RequestOptions] options
|
105
|
+
# Request-specific options
|
106
|
+
#
|
107
|
+
# @yield [result, err] Result & error if block supplied
|
108
|
+
# @yieldparam result [Google::Apis::DriveV3::StartPageToken] parsed result object
|
109
|
+
# @yieldparam err [StandardError] error object if request failed
|
110
|
+
#
|
111
|
+
# @return [Google::Apis::DriveV3::StartPageToken]
|
112
|
+
#
|
113
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
+
def get_changes_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)
|
117
|
+
command = make_simple_command(:get, 'changes/startPageToken', options)
|
118
|
+
command.response_representation = Google::Apis::DriveV3::StartPageToken::Representation
|
119
|
+
command.response_class = Google::Apis::DriveV3::StartPageToken
|
120
|
+
command.query['driveId'] = drive_id unless drive_id.nil?
|
121
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
122
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
123
|
+
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
124
|
+
command.query['fields'] = fields unless fields.nil?
|
125
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
126
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
127
|
+
execute_or_queue_command(command, &block)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Lists the changes for a user or shared drive.
|
131
|
+
# @param [String] page_token
|
132
|
+
# The token for continuing a previous list request on the next page. This should
|
133
|
+
# be set to the value of 'nextPageToken' from the previous response or to the
|
134
|
+
# response from the getStartPageToken method.
|
135
|
+
# @param [String] drive_id
|
136
|
+
# The shared drive from which changes are returned. If specified the change IDs
|
137
|
+
# will be reflective of the shared drive; use the combined drive ID and change
|
138
|
+
# ID as an identifier.
|
139
|
+
# @param [Boolean] include_corpus_removals
|
140
|
+
# Whether changes should include the file resource if the file is still
|
141
|
+
# accessible by the user at the time of the request, even when a file was
|
142
|
+
# removed from the list of changes and there will be no further change entries
|
143
|
+
# for this file.
|
144
|
+
# @param [Boolean] include_items_from_all_drives
|
145
|
+
# Whether both My Drive and shared drive items should be included in results.
|
146
|
+
# @param [String] include_permissions_for_view
|
147
|
+
# Specifies which additional view's permissions to include in the response. Only
|
148
|
+
# 'published' is supported.
|
149
|
+
# @param [Boolean] include_removed
|
150
|
+
# Whether to include changes indicating that items have been removed from the
|
151
|
+
# list of changes, for example by deletion or loss of access.
|
152
|
+
# @param [Boolean] include_team_drive_items
|
153
|
+
# Deprecated use includeItemsFromAllDrives instead.
|
154
|
+
# @param [Fixnum] page_size
|
155
|
+
# The maximum number of changes to return per page.
|
156
|
+
# @param [Boolean] restrict_to_my_drive
|
157
|
+
# Whether to restrict the results to changes inside the My Drive hierarchy. This
|
158
|
+
# omits changes to files such as those in the Application Data folder or shared
|
159
|
+
# files which have not been added to My Drive.
|
160
|
+
# @param [String] spaces
|
161
|
+
# A comma-separated list of spaces to query within the user corpus. Supported
|
162
|
+
# values are 'drive', 'appDataFolder' and 'photos'.
|
163
|
+
# @param [Boolean] supports_all_drives
|
164
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
165
|
+
# @param [Boolean] supports_team_drives
|
166
|
+
# Deprecated use supportsAllDrives instead.
|
167
|
+
# @param [String] team_drive_id
|
168
|
+
# Deprecated use driveId instead.
|
169
|
+
# @param [String] fields
|
170
|
+
# Selector specifying which fields to include in a partial response.
|
171
|
+
# @param [String] quota_user
|
172
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
173
|
+
# characters.
|
174
|
+
# @param [String] user_ip
|
175
|
+
# Deprecated. Please use quotaUser instead.
|
176
|
+
# @param [Google::Apis::RequestOptions] options
|
177
|
+
# Request-specific options
|
178
|
+
#
|
179
|
+
# @yield [result, err] Result & error if block supplied
|
180
|
+
# @yieldparam result [Google::Apis::DriveV3::ChangeList] parsed result object
|
181
|
+
# @yieldparam err [StandardError] error object if request failed
|
182
|
+
#
|
183
|
+
# @return [Google::Apis::DriveV3::ChangeList]
|
184
|
+
#
|
185
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
186
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
187
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
188
|
+
def list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: 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)
|
189
|
+
command = make_simple_command(:get, 'changes', options)
|
190
|
+
command.response_representation = Google::Apis::DriveV3::ChangeList::Representation
|
191
|
+
command.response_class = Google::Apis::DriveV3::ChangeList
|
192
|
+
command.query['driveId'] = drive_id unless drive_id.nil?
|
193
|
+
command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
|
194
|
+
command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
|
195
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
196
|
+
command.query['includeRemoved'] = include_removed unless include_removed.nil?
|
197
|
+
command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
|
198
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
199
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
200
|
+
command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil?
|
201
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
202
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
203
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
204
|
+
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
205
|
+
command.query['fields'] = fields unless fields.nil?
|
206
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
207
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
208
|
+
execute_or_queue_command(command, &block)
|
209
|
+
end
|
210
|
+
|
211
|
+
# Subscribes to changes for a user.
|
212
|
+
# @param [String] page_token
|
213
|
+
# The token for continuing a previous list request on the next page. This should
|
214
|
+
# be set to the value of 'nextPageToken' from the previous response or to the
|
215
|
+
# response from the getStartPageToken method.
|
216
|
+
# @param [Google::Apis::DriveV3::Channel] channel_object
|
217
|
+
# @param [String] drive_id
|
218
|
+
# The shared drive from which changes are returned. If specified the change IDs
|
219
|
+
# will be reflective of the shared drive; use the combined drive ID and change
|
220
|
+
# ID as an identifier.
|
221
|
+
# @param [Boolean] include_corpus_removals
|
222
|
+
# Whether changes should include the file resource if the file is still
|
223
|
+
# accessible by the user at the time of the request, even when a file was
|
224
|
+
# removed from the list of changes and there will be no further change entries
|
225
|
+
# for this file.
|
226
|
+
# @param [Boolean] include_items_from_all_drives
|
227
|
+
# Whether both My Drive and shared drive items should be included in results.
|
228
|
+
# @param [String] include_permissions_for_view
|
229
|
+
# Specifies which additional view's permissions to include in the response. Only
|
230
|
+
# 'published' is supported.
|
231
|
+
# @param [Boolean] include_removed
|
232
|
+
# Whether to include changes indicating that items have been removed from the
|
233
|
+
# list of changes, for example by deletion or loss of access.
|
234
|
+
# @param [Boolean] include_team_drive_items
|
235
|
+
# Deprecated use includeItemsFromAllDrives instead.
|
236
|
+
# @param [Fixnum] page_size
|
237
|
+
# The maximum number of changes to return per page.
|
238
|
+
# @param [Boolean] restrict_to_my_drive
|
239
|
+
# Whether to restrict the results to changes inside the My Drive hierarchy. This
|
240
|
+
# omits changes to files such as those in the Application Data folder or shared
|
241
|
+
# files which have not been added to My Drive.
|
242
|
+
# @param [String] spaces
|
243
|
+
# A comma-separated list of spaces to query within the user corpus. Supported
|
244
|
+
# values are 'drive', 'appDataFolder' and 'photos'.
|
245
|
+
# @param [Boolean] supports_all_drives
|
246
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
247
|
+
# @param [Boolean] supports_team_drives
|
248
|
+
# Deprecated use supportsAllDrives instead.
|
249
|
+
# @param [String] team_drive_id
|
250
|
+
# Deprecated use driveId instead.
|
251
|
+
# @param [String] fields
|
252
|
+
# Selector specifying which fields to include in a partial response.
|
253
|
+
# @param [String] quota_user
|
254
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
255
|
+
# characters.
|
256
|
+
# @param [String] user_ip
|
257
|
+
# Deprecated. Please use quotaUser instead.
|
258
|
+
# @param [Google::Apis::RequestOptions] options
|
259
|
+
# Request-specific options
|
260
|
+
#
|
261
|
+
# @yield [result, err] Result & error if block supplied
|
262
|
+
# @yieldparam result [Google::Apis::DriveV3::Channel] parsed result object
|
263
|
+
# @yieldparam err [StandardError] error object if request failed
|
264
|
+
#
|
265
|
+
# @return [Google::Apis::DriveV3::Channel]
|
266
|
+
#
|
267
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
268
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
269
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
270
|
+
def watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: 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)
|
271
|
+
command = make_simple_command(:post, 'changes/watch', options)
|
272
|
+
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
273
|
+
command.request_object = channel_object
|
274
|
+
command.response_representation = Google::Apis::DriveV3::Channel::Representation
|
275
|
+
command.response_class = Google::Apis::DriveV3::Channel
|
276
|
+
command.query['driveId'] = drive_id unless drive_id.nil?
|
277
|
+
command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
|
278
|
+
command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
|
279
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
280
|
+
command.query['includeRemoved'] = include_removed unless include_removed.nil?
|
281
|
+
command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
|
282
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
283
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
284
|
+
command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil?
|
285
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
286
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
287
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
288
|
+
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
289
|
+
command.query['fields'] = fields unless fields.nil?
|
290
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
291
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
292
|
+
execute_or_queue_command(command, &block)
|
293
|
+
end
|
294
|
+
|
295
|
+
# Stop watching resources through this channel
|
296
|
+
# @param [Google::Apis::DriveV3::Channel] channel_object
|
297
|
+
# @param [String] fields
|
298
|
+
# Selector specifying which fields to include in a partial response.
|
299
|
+
# @param [String] quota_user
|
300
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
301
|
+
# characters.
|
302
|
+
# @param [String] user_ip
|
303
|
+
# Deprecated. Please use quotaUser instead.
|
304
|
+
# @param [Google::Apis::RequestOptions] options
|
305
|
+
# Request-specific options
|
306
|
+
#
|
307
|
+
# @yield [result, err] Result & error if block supplied
|
308
|
+
# @yieldparam result [NilClass] No result returned for this method
|
309
|
+
# @yieldparam err [StandardError] error object if request failed
|
310
|
+
#
|
311
|
+
# @return [void]
|
312
|
+
#
|
313
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
314
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
315
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
316
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
317
|
+
command = make_simple_command(:post, 'channels/stop', options)
|
318
|
+
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
319
|
+
command.request_object = channel_object
|
320
|
+
command.query['fields'] = fields unless fields.nil?
|
321
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
322
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
323
|
+
execute_or_queue_command(command, &block)
|
324
|
+
end
|
325
|
+
|
326
|
+
# Creates a new comment on a file.
|
327
|
+
# @param [String] file_id
|
328
|
+
# The ID of the file.
|
329
|
+
# @param [Google::Apis::DriveV3::Comment] comment_object
|
330
|
+
# @param [String] fields
|
331
|
+
# Selector specifying which fields to include in a partial response.
|
332
|
+
# @param [String] quota_user
|
333
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
334
|
+
# characters.
|
335
|
+
# @param [String] user_ip
|
336
|
+
# Deprecated. Please use quotaUser instead.
|
337
|
+
# @param [Google::Apis::RequestOptions] options
|
338
|
+
# Request-specific options
|
339
|
+
#
|
340
|
+
# @yield [result, err] Result & error if block supplied
|
341
|
+
# @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
|
342
|
+
# @yieldparam err [StandardError] error object if request failed
|
343
|
+
#
|
344
|
+
# @return [Google::Apis::DriveV3::Comment]
|
345
|
+
#
|
346
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
347
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
348
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
349
|
+
def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
350
|
+
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
351
|
+
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
352
|
+
command.request_object = comment_object
|
353
|
+
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
354
|
+
command.response_class = Google::Apis::DriveV3::Comment
|
355
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
356
|
+
command.query['fields'] = fields unless fields.nil?
|
357
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
358
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
359
|
+
execute_or_queue_command(command, &block)
|
360
|
+
end
|
361
|
+
|
362
|
+
# Deletes a comment.
|
363
|
+
# @param [String] file_id
|
364
|
+
# The ID of the file.
|
365
|
+
# @param [String] comment_id
|
366
|
+
# The ID of the comment.
|
367
|
+
# @param [String] fields
|
368
|
+
# Selector specifying which fields to include in a partial response.
|
369
|
+
# @param [String] quota_user
|
370
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
371
|
+
# characters.
|
372
|
+
# @param [String] user_ip
|
373
|
+
# Deprecated. Please use quotaUser instead.
|
374
|
+
# @param [Google::Apis::RequestOptions] options
|
375
|
+
# Request-specific options
|
376
|
+
#
|
377
|
+
# @yield [result, err] Result & error if block supplied
|
378
|
+
# @yieldparam result [NilClass] No result returned for this method
|
379
|
+
# @yieldparam err [StandardError] error object if request failed
|
380
|
+
#
|
381
|
+
# @return [void]
|
382
|
+
#
|
383
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
384
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
385
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
386
|
+
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
387
|
+
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
388
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
389
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
390
|
+
command.query['fields'] = fields unless fields.nil?
|
391
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
392
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
393
|
+
execute_or_queue_command(command, &block)
|
394
|
+
end
|
395
|
+
|
396
|
+
# Gets a comment by ID.
|
397
|
+
# @param [String] file_id
|
398
|
+
# The ID of the file.
|
399
|
+
# @param [String] comment_id
|
400
|
+
# The ID of the comment.
|
401
|
+
# @param [Boolean] include_deleted
|
402
|
+
# Whether to return deleted comments. Deleted comments will not include their
|
403
|
+
# original content.
|
404
|
+
# @param [String] fields
|
405
|
+
# Selector specifying which fields to include in a partial response.
|
406
|
+
# @param [String] quota_user
|
407
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
408
|
+
# characters.
|
409
|
+
# @param [String] user_ip
|
410
|
+
# Deprecated. Please use quotaUser instead.
|
411
|
+
# @param [Google::Apis::RequestOptions] options
|
412
|
+
# Request-specific options
|
413
|
+
#
|
414
|
+
# @yield [result, err] Result & error if block supplied
|
415
|
+
# @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
|
416
|
+
# @yieldparam err [StandardError] error object if request failed
|
417
|
+
#
|
418
|
+
# @return [Google::Apis::DriveV3::Comment]
|
419
|
+
#
|
420
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
421
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
422
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
423
|
+
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
424
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
425
|
+
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
426
|
+
command.response_class = Google::Apis::DriveV3::Comment
|
427
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
428
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
429
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
430
|
+
command.query['fields'] = fields unless fields.nil?
|
431
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
432
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
433
|
+
execute_or_queue_command(command, &block)
|
434
|
+
end
|
435
|
+
|
436
|
+
# Lists a file's comments.
|
437
|
+
# @param [String] file_id
|
438
|
+
# The ID of the file.
|
439
|
+
# @param [Boolean] include_deleted
|
440
|
+
# Whether to include deleted comments. Deleted comments will not include their
|
441
|
+
# original content.
|
442
|
+
# @param [Fixnum] page_size
|
443
|
+
# The maximum number of comments to return per page.
|
444
|
+
# @param [String] page_token
|
445
|
+
# The token for continuing a previous list request on the next page. This should
|
446
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
447
|
+
# @param [String] start_modified_time
|
448
|
+
# The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-
|
449
|
+
# time).
|
450
|
+
# @param [String] fields
|
451
|
+
# Selector specifying which fields to include in a partial response.
|
452
|
+
# @param [String] quota_user
|
453
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
454
|
+
# characters.
|
455
|
+
# @param [String] user_ip
|
456
|
+
# Deprecated. Please use quotaUser instead.
|
457
|
+
# @param [Google::Apis::RequestOptions] options
|
458
|
+
# Request-specific options
|
459
|
+
#
|
460
|
+
# @yield [result, err] Result & error if block supplied
|
461
|
+
# @yieldparam result [Google::Apis::DriveV3::CommentList] parsed result object
|
462
|
+
# @yieldparam err [StandardError] error object if request failed
|
463
|
+
#
|
464
|
+
# @return [Google::Apis::DriveV3::CommentList]
|
465
|
+
#
|
466
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
467
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
468
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
469
|
+
def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
470
|
+
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
471
|
+
command.response_representation = Google::Apis::DriveV3::CommentList::Representation
|
472
|
+
command.response_class = Google::Apis::DriveV3::CommentList
|
473
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
474
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
475
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
476
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
477
|
+
command.query['startModifiedTime'] = start_modified_time unless start_modified_time.nil?
|
478
|
+
command.query['fields'] = fields unless fields.nil?
|
479
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
480
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
481
|
+
execute_or_queue_command(command, &block)
|
482
|
+
end
|
483
|
+
|
484
|
+
# Updates a comment with patch semantics.
|
485
|
+
# @param [String] file_id
|
486
|
+
# The ID of the file.
|
487
|
+
# @param [String] comment_id
|
488
|
+
# The ID of the comment.
|
489
|
+
# @param [Google::Apis::DriveV3::Comment] comment_object
|
490
|
+
# @param [String] fields
|
491
|
+
# Selector specifying which fields to include in a partial response.
|
492
|
+
# @param [String] quota_user
|
493
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
494
|
+
# characters.
|
495
|
+
# @param [String] user_ip
|
496
|
+
# Deprecated. Please use quotaUser instead.
|
497
|
+
# @param [Google::Apis::RequestOptions] options
|
498
|
+
# Request-specific options
|
499
|
+
#
|
500
|
+
# @yield [result, err] Result & error if block supplied
|
501
|
+
# @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
|
502
|
+
# @yieldparam err [StandardError] error object if request failed
|
503
|
+
#
|
504
|
+
# @return [Google::Apis::DriveV3::Comment]
|
505
|
+
#
|
506
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
507
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
508
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
509
|
+
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
510
|
+
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
511
|
+
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
512
|
+
command.request_object = comment_object
|
513
|
+
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
514
|
+
command.response_class = Google::Apis::DriveV3::Comment
|
515
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
516
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
517
|
+
command.query['fields'] = fields unless fields.nil?
|
518
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
519
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
520
|
+
execute_or_queue_command(command, &block)
|
521
|
+
end
|
522
|
+
|
523
|
+
# Creates a new shared drive.
|
524
|
+
# @param [String] request_id
|
525
|
+
# An ID, such as a random UUID, which uniquely identifies this user's request
|
526
|
+
# for idempotent creation of a shared drive. A repeated request by the same user
|
527
|
+
# and with the same request ID will avoid creating duplicates by attempting to
|
528
|
+
# create the same shared drive. If the shared drive already exists a 409 error
|
529
|
+
# will be returned.
|
530
|
+
# @param [Google::Apis::DriveV3::Drive] drive_object
|
531
|
+
# @param [String] fields
|
532
|
+
# Selector specifying which fields to include in a partial response.
|
533
|
+
# @param [String] quota_user
|
534
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
535
|
+
# characters.
|
536
|
+
# @param [String] user_ip
|
537
|
+
# Deprecated. Please use quotaUser instead.
|
538
|
+
# @param [Google::Apis::RequestOptions] options
|
539
|
+
# Request-specific options
|
540
|
+
#
|
541
|
+
# @yield [result, err] Result & error if block supplied
|
542
|
+
# @yieldparam result [Google::Apis::DriveV3::Drive] parsed result object
|
543
|
+
# @yieldparam err [StandardError] error object if request failed
|
544
|
+
#
|
545
|
+
# @return [Google::Apis::DriveV3::Drive]
|
546
|
+
#
|
547
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
548
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
549
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
550
|
+
def create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
551
|
+
command = make_simple_command(:post, 'drives', options)
|
552
|
+
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
553
|
+
command.request_object = drive_object
|
554
|
+
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
555
|
+
command.response_class = Google::Apis::DriveV3::Drive
|
556
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
557
|
+
command.query['fields'] = fields unless fields.nil?
|
558
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
559
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
560
|
+
execute_or_queue_command(command, &block)
|
561
|
+
end
|
562
|
+
|
563
|
+
# Permanently deletes a shared drive for which the user is an organizer. The
|
564
|
+
# shared drive cannot contain any untrashed items.
|
565
|
+
# @param [String] drive_id
|
566
|
+
# The ID of the shared drive.
|
567
|
+
# @param [String] fields
|
568
|
+
# Selector specifying which fields to include in a partial response.
|
569
|
+
# @param [String] quota_user
|
570
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
571
|
+
# characters.
|
572
|
+
# @param [String] user_ip
|
573
|
+
# Deprecated. Please use quotaUser instead.
|
574
|
+
# @param [Google::Apis::RequestOptions] options
|
575
|
+
# Request-specific options
|
576
|
+
#
|
577
|
+
# @yield [result, err] Result & error if block supplied
|
578
|
+
# @yieldparam result [NilClass] No result returned for this method
|
579
|
+
# @yieldparam err [StandardError] error object if request failed
|
580
|
+
#
|
581
|
+
# @return [void]
|
582
|
+
#
|
583
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
584
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
585
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
586
|
+
def delete_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
587
|
+
command = make_simple_command(:delete, 'drives/{driveId}', options)
|
588
|
+
command.params['driveId'] = drive_id unless drive_id.nil?
|
589
|
+
command.query['fields'] = fields unless fields.nil?
|
590
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
591
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
592
|
+
execute_or_queue_command(command, &block)
|
593
|
+
end
|
594
|
+
|
595
|
+
# Gets a shared drive's metadata by ID.
|
596
|
+
# @param [String] drive_id
|
597
|
+
# The ID of the shared drive.
|
598
|
+
# @param [Boolean] use_domain_admin_access
|
599
|
+
# Issue the request as a domain administrator; if set to true, then the
|
600
|
+
# requester will be granted access if they are an administrator of the domain to
|
601
|
+
# which the shared drive belongs.
|
602
|
+
# @param [String] fields
|
603
|
+
# Selector specifying which fields to include in a partial response.
|
604
|
+
# @param [String] quota_user
|
605
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
606
|
+
# characters.
|
607
|
+
# @param [String] user_ip
|
608
|
+
# Deprecated. Please use quotaUser instead.
|
609
|
+
# @param [Google::Apis::RequestOptions] options
|
610
|
+
# Request-specific options
|
611
|
+
#
|
612
|
+
# @yield [result, err] Result & error if block supplied
|
613
|
+
# @yieldparam result [Google::Apis::DriveV3::Drive] parsed result object
|
614
|
+
# @yieldparam err [StandardError] error object if request failed
|
615
|
+
#
|
616
|
+
# @return [Google::Apis::DriveV3::Drive]
|
617
|
+
#
|
618
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
619
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
620
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
621
|
+
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
622
|
+
command = make_simple_command(:get, 'drives/{driveId}', options)
|
623
|
+
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
624
|
+
command.response_class = Google::Apis::DriveV3::Drive
|
625
|
+
command.params['driveId'] = drive_id unless drive_id.nil?
|
626
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
627
|
+
command.query['fields'] = fields unless fields.nil?
|
628
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
629
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
630
|
+
execute_or_queue_command(command, &block)
|
631
|
+
end
|
632
|
+
|
633
|
+
# Hides a shared drive from the default view.
|
634
|
+
# @param [String] drive_id
|
635
|
+
# The ID of the shared drive.
|
636
|
+
# @param [String] fields
|
637
|
+
# Selector specifying which fields to include in a partial response.
|
638
|
+
# @param [String] quota_user
|
639
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
640
|
+
# characters.
|
641
|
+
# @param [String] user_ip
|
642
|
+
# Deprecated. Please use quotaUser instead.
|
643
|
+
# @param [Google::Apis::RequestOptions] options
|
644
|
+
# Request-specific options
|
645
|
+
#
|
646
|
+
# @yield [result, err] Result & error if block supplied
|
647
|
+
# @yieldparam result [Google::Apis::DriveV3::Drive] parsed result object
|
648
|
+
# @yieldparam err [StandardError] error object if request failed
|
649
|
+
#
|
650
|
+
# @return [Google::Apis::DriveV3::Drive]
|
651
|
+
#
|
652
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
653
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
654
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
655
|
+
def hide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
656
|
+
command = make_simple_command(:post, 'drives/{driveId}/hide', options)
|
657
|
+
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
658
|
+
command.response_class = Google::Apis::DriveV3::Drive
|
659
|
+
command.params['driveId'] = drive_id unless drive_id.nil?
|
660
|
+
command.query['fields'] = fields unless fields.nil?
|
661
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
662
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
663
|
+
execute_or_queue_command(command, &block)
|
664
|
+
end
|
665
|
+
|
666
|
+
# Lists the user's shared drives.
|
667
|
+
# @param [Fixnum] page_size
|
668
|
+
# Maximum number of shared drives to return.
|
669
|
+
# @param [String] page_token
|
670
|
+
# Page token for shared drives.
|
671
|
+
# @param [String] q
|
672
|
+
# Query string for searching shared drives.
|
673
|
+
# @param [Boolean] use_domain_admin_access
|
674
|
+
# Issue the request as a domain administrator; if set to true, then all shared
|
675
|
+
# drives of the domain in which the requester is an administrator are returned.
|
676
|
+
# @param [String] fields
|
677
|
+
# Selector specifying which fields to include in a partial response.
|
678
|
+
# @param [String] quota_user
|
679
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
680
|
+
# characters.
|
681
|
+
# @param [String] user_ip
|
682
|
+
# Deprecated. Please use quotaUser instead.
|
683
|
+
# @param [Google::Apis::RequestOptions] options
|
684
|
+
# Request-specific options
|
685
|
+
#
|
686
|
+
# @yield [result, err] Result & error if block supplied
|
687
|
+
# @yieldparam result [Google::Apis::DriveV3::DriveList] parsed result object
|
688
|
+
# @yieldparam err [StandardError] error object if request failed
|
689
|
+
#
|
690
|
+
# @return [Google::Apis::DriveV3::DriveList]
|
691
|
+
#
|
692
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
693
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
694
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
695
|
+
def list_drives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
696
|
+
command = make_simple_command(:get, 'drives', options)
|
697
|
+
command.response_representation = Google::Apis::DriveV3::DriveList::Representation
|
698
|
+
command.response_class = Google::Apis::DriveV3::DriveList
|
699
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
700
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
701
|
+
command.query['q'] = q unless q.nil?
|
702
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
703
|
+
command.query['fields'] = fields unless fields.nil?
|
704
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
705
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
706
|
+
execute_or_queue_command(command, &block)
|
707
|
+
end
|
708
|
+
|
709
|
+
# Restores a shared drive to the default view.
|
710
|
+
# @param [String] drive_id
|
711
|
+
# The ID of the shared drive.
|
712
|
+
# @param [String] fields
|
713
|
+
# Selector specifying which fields to include in a partial response.
|
714
|
+
# @param [String] quota_user
|
715
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
716
|
+
# characters.
|
717
|
+
# @param [String] user_ip
|
718
|
+
# Deprecated. Please use quotaUser instead.
|
719
|
+
# @param [Google::Apis::RequestOptions] options
|
720
|
+
# Request-specific options
|
721
|
+
#
|
722
|
+
# @yield [result, err] Result & error if block supplied
|
723
|
+
# @yieldparam result [Google::Apis::DriveV3::Drive] parsed result object
|
724
|
+
# @yieldparam err [StandardError] error object if request failed
|
725
|
+
#
|
726
|
+
# @return [Google::Apis::DriveV3::Drive]
|
727
|
+
#
|
728
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
729
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
730
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
731
|
+
def unhide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
732
|
+
command = make_simple_command(:post, 'drives/{driveId}/unhide', options)
|
733
|
+
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
734
|
+
command.response_class = Google::Apis::DriveV3::Drive
|
735
|
+
command.params['driveId'] = drive_id unless drive_id.nil?
|
736
|
+
command.query['fields'] = fields unless fields.nil?
|
737
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
738
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
739
|
+
execute_or_queue_command(command, &block)
|
740
|
+
end
|
741
|
+
|
742
|
+
# Updates the metadate for a shared drive.
|
743
|
+
# @param [String] drive_id
|
744
|
+
# The ID of the shared drive.
|
745
|
+
# @param [Google::Apis::DriveV3::Drive] drive_object
|
746
|
+
# @param [Boolean] use_domain_admin_access
|
747
|
+
# Issue the request as a domain administrator; if set to true, then the
|
748
|
+
# requester will be granted access if they are an administrator of the domain to
|
749
|
+
# which the shared drive belongs.
|
750
|
+
# @param [String] fields
|
751
|
+
# Selector specifying which fields to include in a partial response.
|
752
|
+
# @param [String] quota_user
|
753
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
754
|
+
# characters.
|
755
|
+
# @param [String] user_ip
|
756
|
+
# Deprecated. Please use quotaUser instead.
|
757
|
+
# @param [Google::Apis::RequestOptions] options
|
758
|
+
# Request-specific options
|
759
|
+
#
|
760
|
+
# @yield [result, err] Result & error if block supplied
|
761
|
+
# @yieldparam result [Google::Apis::DriveV3::Drive] parsed result object
|
762
|
+
# @yieldparam err [StandardError] error object if request failed
|
763
|
+
#
|
764
|
+
# @return [Google::Apis::DriveV3::Drive]
|
765
|
+
#
|
766
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
767
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
768
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
769
|
+
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
770
|
+
command = make_simple_command(:patch, 'drives/{driveId}', options)
|
771
|
+
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
772
|
+
command.request_object = drive_object
|
773
|
+
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
774
|
+
command.response_class = Google::Apis::DriveV3::Drive
|
775
|
+
command.params['driveId'] = drive_id unless drive_id.nil?
|
776
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
777
|
+
command.query['fields'] = fields unless fields.nil?
|
778
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
779
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
780
|
+
execute_or_queue_command(command, &block)
|
781
|
+
end
|
782
|
+
|
783
|
+
# Creates a copy of a file and applies any requested updates with patch
|
784
|
+
# semantics. Folders cannot be copied.
|
785
|
+
# @param [String] file_id
|
786
|
+
# The ID of the file.
|
787
|
+
# @param [Google::Apis::DriveV3::File] file_object
|
788
|
+
# @param [Boolean] enforce_single_parent
|
789
|
+
# Deprecated. Copying files into multiple folders is no longer supported. Use
|
790
|
+
# shortcuts instead.
|
791
|
+
# @param [Boolean] ignore_default_visibility
|
792
|
+
# Whether to ignore the domain's default visibility settings for the created
|
793
|
+
# file. Domain administrators can choose to make all uploaded files visible to
|
794
|
+
# the domain by default; this parameter bypasses that behavior for the request.
|
795
|
+
# Permissions are still inherited from parent folders.
|
796
|
+
# @param [String] include_permissions_for_view
|
797
|
+
# Specifies which additional view's permissions to include in the response. Only
|
798
|
+
# 'published' is supported.
|
799
|
+
# @param [Boolean] keep_revision_forever
|
800
|
+
# Whether to set the 'keepForever' field in the new head revision. This is only
|
801
|
+
# applicable to files with binary content in Google Drive. Only 200 revisions
|
802
|
+
# for the file can be kept forever. If the limit is reached, try deleting pinned
|
803
|
+
# revisions.
|
804
|
+
# @param [String] ocr_language
|
805
|
+
# A language hint for OCR processing during image import (ISO 639-1 code).
|
806
|
+
# @param [Boolean] supports_all_drives
|
807
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
808
|
+
# @param [Boolean] supports_team_drives
|
809
|
+
# Deprecated use supportsAllDrives instead.
|
810
|
+
# @param [String] fields
|
811
|
+
# Selector specifying which fields to include in a partial response.
|
812
|
+
# @param [String] quota_user
|
813
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
814
|
+
# characters.
|
815
|
+
# @param [String] user_ip
|
816
|
+
# Deprecated. Please use quotaUser instead.
|
817
|
+
# @param [Google::Apis::RequestOptions] options
|
818
|
+
# Request-specific options
|
819
|
+
#
|
820
|
+
# @yield [result, err] Result & error if block supplied
|
821
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
822
|
+
# @yieldparam err [StandardError] error object if request failed
|
823
|
+
#
|
824
|
+
# @return [Google::Apis::DriveV3::File]
|
825
|
+
#
|
826
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
827
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
828
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
829
|
+
def copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
830
|
+
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
831
|
+
command.request_representation = Google::Apis::DriveV3::File::Representation
|
832
|
+
command.request_object = file_object
|
833
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
834
|
+
command.response_class = Google::Apis::DriveV3::File
|
835
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
836
|
+
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
837
|
+
command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil?
|
838
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
839
|
+
command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
|
840
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
841
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
842
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
843
|
+
command.query['fields'] = fields unless fields.nil?
|
844
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
845
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
846
|
+
execute_or_queue_command(command, &block)
|
847
|
+
end
|
848
|
+
|
849
|
+
# Creates a new file.
|
850
|
+
# @param [Google::Apis::DriveV3::File] file_object
|
851
|
+
# @param [Boolean] enforce_single_parent
|
852
|
+
# Deprecated. Creating files in multiple folders is no longer supported.
|
853
|
+
# @param [Boolean] ignore_default_visibility
|
854
|
+
# Whether to ignore the domain's default visibility settings for the created
|
855
|
+
# file. Domain administrators can choose to make all uploaded files visible to
|
856
|
+
# the domain by default; this parameter bypasses that behavior for the request.
|
857
|
+
# Permissions are still inherited from parent folders.
|
858
|
+
# @param [String] include_permissions_for_view
|
859
|
+
# Specifies which additional view's permissions to include in the response. Only
|
860
|
+
# 'published' is supported.
|
861
|
+
# @param [Boolean] keep_revision_forever
|
862
|
+
# Whether to set the 'keepForever' field in the new head revision. This is only
|
863
|
+
# applicable to files with binary content in Google Drive. Only 200 revisions
|
864
|
+
# for the file can be kept forever. If the limit is reached, try deleting pinned
|
865
|
+
# revisions.
|
866
|
+
# @param [String] ocr_language
|
867
|
+
# A language hint for OCR processing during image import (ISO 639-1 code).
|
868
|
+
# @param [Boolean] supports_all_drives
|
869
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
870
|
+
# @param [Boolean] supports_team_drives
|
871
|
+
# Deprecated use supportsAllDrives instead.
|
872
|
+
# @param [Boolean] use_content_as_indexable_text
|
873
|
+
# Whether to use the uploaded content as indexable text.
|
874
|
+
# @param [String] fields
|
875
|
+
# Selector specifying which fields to include in a partial response.
|
876
|
+
# @param [String] quota_user
|
877
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
878
|
+
# characters.
|
879
|
+
# @param [String] user_ip
|
880
|
+
# Deprecated. Please use quotaUser instead.
|
881
|
+
# @param [IO, String] upload_source
|
882
|
+
# IO stream or filename containing content to upload
|
883
|
+
# @param [String] content_type
|
884
|
+
# Content type of the uploaded content.
|
885
|
+
# @param [Google::Apis::RequestOptions] options
|
886
|
+
# Request-specific options
|
887
|
+
#
|
888
|
+
# @yield [result, err] Result & error if block supplied
|
889
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
890
|
+
# @yieldparam err [StandardError] error object if request failed
|
891
|
+
#
|
892
|
+
# @return [Google::Apis::DriveV3::File]
|
893
|
+
#
|
894
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
895
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
896
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
897
|
+
def create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
898
|
+
if upload_source.nil?
|
899
|
+
command = make_simple_command(:post, 'files', options)
|
900
|
+
else
|
901
|
+
command = make_upload_command(:post, 'files', options)
|
902
|
+
command.upload_source = upload_source
|
903
|
+
command.upload_content_type = content_type
|
904
|
+
end
|
905
|
+
command.request_representation = Google::Apis::DriveV3::File::Representation
|
906
|
+
command.request_object = file_object
|
907
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
908
|
+
command.response_class = Google::Apis::DriveV3::File
|
909
|
+
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
910
|
+
command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil?
|
911
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
912
|
+
command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
|
913
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
914
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
915
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
916
|
+
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
917
|
+
command.query['fields'] = fields unless fields.nil?
|
918
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
919
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
920
|
+
execute_or_queue_command(command, &block)
|
921
|
+
end
|
922
|
+
|
923
|
+
# Permanently deletes a file owned by the user without moving it to the trash.
|
924
|
+
# If the file belongs to a shared drive the user must be an organizer on the
|
925
|
+
# parent. If the target is a folder, all descendants owned by the user are also
|
926
|
+
# deleted.
|
927
|
+
# @param [String] file_id
|
928
|
+
# The ID of the file.
|
929
|
+
# @param [Boolean] enforce_single_parent
|
930
|
+
# Deprecated. If an item is not in a shared drive and its last parent is deleted
|
931
|
+
# but the item itself is not, the item will be placed under its owner's root.
|
932
|
+
# @param [Boolean] supports_all_drives
|
933
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
934
|
+
# @param [Boolean] supports_team_drives
|
935
|
+
# Deprecated use supportsAllDrives instead.
|
936
|
+
# @param [String] fields
|
937
|
+
# Selector specifying which fields to include in a partial response.
|
938
|
+
# @param [String] quota_user
|
939
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
940
|
+
# characters.
|
941
|
+
# @param [String] user_ip
|
942
|
+
# Deprecated. Please use quotaUser instead.
|
943
|
+
# @param [Google::Apis::RequestOptions] options
|
944
|
+
# Request-specific options
|
945
|
+
#
|
946
|
+
# @yield [result, err] Result & error if block supplied
|
947
|
+
# @yieldparam result [NilClass] No result returned for this method
|
948
|
+
# @yieldparam err [StandardError] error object if request failed
|
949
|
+
#
|
950
|
+
# @return [void]
|
951
|
+
#
|
952
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
953
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
954
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
955
|
+
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)
|
956
|
+
command = make_simple_command(:delete, 'files/{fileId}', options)
|
957
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
958
|
+
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
959
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
960
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
961
|
+
command.query['fields'] = fields unless fields.nil?
|
962
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
963
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
964
|
+
execute_or_queue_command(command, &block)
|
965
|
+
end
|
966
|
+
|
967
|
+
# Permanently deletes all of the user's trashed files.
|
968
|
+
# @param [Boolean] enforce_single_parent
|
969
|
+
# Deprecated. If an item is not in a shared drive and its last parent is deleted
|
970
|
+
# but the item itself is not, the item will be placed under its owner's root.
|
971
|
+
# @param [String] fields
|
972
|
+
# Selector specifying which fields to include in a partial response.
|
973
|
+
# @param [String] quota_user
|
974
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
975
|
+
# characters.
|
976
|
+
# @param [String] user_ip
|
977
|
+
# Deprecated. Please use quotaUser instead.
|
978
|
+
# @param [Google::Apis::RequestOptions] options
|
979
|
+
# Request-specific options
|
980
|
+
#
|
981
|
+
# @yield [result, err] Result & error if block supplied
|
982
|
+
# @yieldparam result [NilClass] No result returned for this method
|
983
|
+
# @yieldparam err [StandardError] error object if request failed
|
984
|
+
#
|
985
|
+
# @return [void]
|
986
|
+
#
|
987
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
988
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
989
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
990
|
+
def empty_file_trash(enforce_single_parent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
991
|
+
command = make_simple_command(:delete, 'files/trash', options)
|
992
|
+
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
993
|
+
command.query['fields'] = fields unless fields.nil?
|
994
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
995
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
996
|
+
execute_or_queue_command(command, &block)
|
997
|
+
end
|
998
|
+
|
999
|
+
# Exports a Google Doc to the requested MIME type and returns the exported
|
1000
|
+
# content. Please note that the exported content is limited to 10MB.
|
1001
|
+
# @param [String] file_id
|
1002
|
+
# The ID of the file.
|
1003
|
+
# @param [String] mime_type
|
1004
|
+
# The MIME type of the format requested for this export.
|
1005
|
+
# @param [String] fields
|
1006
|
+
# Selector specifying which fields to include in a partial response.
|
1007
|
+
# @param [String] quota_user
|
1008
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1009
|
+
# characters.
|
1010
|
+
# @param [String] user_ip
|
1011
|
+
# Deprecated. Please use quotaUser instead.
|
1012
|
+
# @param [IO, String] download_dest
|
1013
|
+
# IO stream or filename to receive content download
|
1014
|
+
# @param [Google::Apis::RequestOptions] options
|
1015
|
+
# Request-specific options
|
1016
|
+
#
|
1017
|
+
# @yield [result, err] Result & error if block supplied
|
1018
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1019
|
+
# @yieldparam err [StandardError] error object if request failed
|
1020
|
+
#
|
1021
|
+
# @return [void]
|
1022
|
+
#
|
1023
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1024
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1025
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1026
|
+
def export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
1027
|
+
if download_dest.nil?
|
1028
|
+
command = make_simple_command(:get, 'files/{fileId}/export', options)
|
1029
|
+
else
|
1030
|
+
command = make_download_command(:get, 'files/{fileId}/export', options)
|
1031
|
+
command.download_dest = download_dest
|
1032
|
+
end
|
1033
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1034
|
+
command.query['mimeType'] = mime_type unless mime_type.nil?
|
1035
|
+
command.query['fields'] = fields unless fields.nil?
|
1036
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1037
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1038
|
+
execute_or_queue_command(command, &block)
|
1039
|
+
end
|
1040
|
+
|
1041
|
+
# Generates a set of file IDs which can be provided in create or copy requests.
|
1042
|
+
# @param [Fixnum] count
|
1043
|
+
# The number of IDs to return.
|
1044
|
+
# @param [String] space
|
1045
|
+
# The space in which the IDs can be used to create new files. Supported values
|
1046
|
+
# are 'drive' and 'appDataFolder'.
|
1047
|
+
# @param [String] fields
|
1048
|
+
# Selector specifying which fields to include in a partial response.
|
1049
|
+
# @param [String] quota_user
|
1050
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1051
|
+
# characters.
|
1052
|
+
# @param [String] user_ip
|
1053
|
+
# Deprecated. Please use quotaUser instead.
|
1054
|
+
# @param [Google::Apis::RequestOptions] options
|
1055
|
+
# Request-specific options
|
1056
|
+
#
|
1057
|
+
# @yield [result, err] Result & error if block supplied
|
1058
|
+
# @yieldparam result [Google::Apis::DriveV3::GeneratedIds] parsed result object
|
1059
|
+
# @yieldparam err [StandardError] error object if request failed
|
1060
|
+
#
|
1061
|
+
# @return [Google::Apis::DriveV3::GeneratedIds]
|
1062
|
+
#
|
1063
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1064
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1065
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1066
|
+
def generate_file_ids(count: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1067
|
+
command = make_simple_command(:get, 'files/generateIds', options)
|
1068
|
+
command.response_representation = Google::Apis::DriveV3::GeneratedIds::Representation
|
1069
|
+
command.response_class = Google::Apis::DriveV3::GeneratedIds
|
1070
|
+
command.query['count'] = count unless count.nil?
|
1071
|
+
command.query['space'] = space unless space.nil?
|
1072
|
+
command.query['fields'] = fields unless fields.nil?
|
1073
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1074
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1075
|
+
execute_or_queue_command(command, &block)
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
# Gets a file's metadata or content by ID.
|
1079
|
+
# @param [String] file_id
|
1080
|
+
# The ID of the file.
|
1081
|
+
# @param [Boolean] acknowledge_abuse
|
1082
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
1083
|
+
# other abusive files. This is only applicable when alt=media.
|
1084
|
+
# @param [String] include_permissions_for_view
|
1085
|
+
# Specifies which additional view's permissions to include in the response. Only
|
1086
|
+
# 'published' is supported.
|
1087
|
+
# @param [Boolean] supports_all_drives
|
1088
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1089
|
+
# @param [Boolean] supports_team_drives
|
1090
|
+
# Deprecated use supportsAllDrives instead.
|
1091
|
+
# @param [String] fields
|
1092
|
+
# Selector specifying which fields to include in a partial response.
|
1093
|
+
# @param [String] quota_user
|
1094
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1095
|
+
# characters.
|
1096
|
+
# @param [String] user_ip
|
1097
|
+
# Deprecated. Please use quotaUser instead.
|
1098
|
+
# @param [IO, String] download_dest
|
1099
|
+
# IO stream or filename to receive content download
|
1100
|
+
# @param [Google::Apis::RequestOptions] options
|
1101
|
+
# Request-specific options
|
1102
|
+
#
|
1103
|
+
# @yield [result, err] Result & error if block supplied
|
1104
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
1105
|
+
# @yieldparam err [StandardError] error object if request failed
|
1106
|
+
#
|
1107
|
+
# @return [Google::Apis::DriveV3::File]
|
1108
|
+
#
|
1109
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1110
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1111
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1112
|
+
def get_file(file_id, acknowledge_abuse: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
1113
|
+
if download_dest.nil?
|
1114
|
+
command = make_simple_command(:get, 'files/{fileId}', options)
|
1115
|
+
else
|
1116
|
+
command = make_download_command(:get, 'files/{fileId}', options)
|
1117
|
+
command.download_dest = download_dest
|
1118
|
+
end
|
1119
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
1120
|
+
command.response_class = Google::Apis::DriveV3::File
|
1121
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1122
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
1123
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
1124
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1125
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1126
|
+
command.query['fields'] = fields unless fields.nil?
|
1127
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1128
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1129
|
+
execute_or_queue_command(command, &block)
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
# Lists or searches files.
|
1133
|
+
# @param [String] corpora
|
1134
|
+
# Groupings of files to which the query applies. Supported groupings are: 'user'
|
1135
|
+
# (files created by, opened by, or shared directly with the user), 'drive' (
|
1136
|
+
# files in the specified shared drive as indicated by the 'driveId'), 'domain' (
|
1137
|
+
# files shared to the user's domain), and 'allDrives' (A combination of 'user'
|
1138
|
+
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
1139
|
+
# or 'drive', instead of 'allDrives', for efficiency.
|
1140
|
+
# @param [String] corpus
|
1141
|
+
# The source of files to list. Deprecated: use 'corpora' instead.
|
1142
|
+
# @param [String] drive_id
|
1143
|
+
# ID of the shared drive to search.
|
1144
|
+
# @param [Boolean] include_items_from_all_drives
|
1145
|
+
# Whether both My Drive and shared drive items should be included in results.
|
1146
|
+
# @param [String] include_permissions_for_view
|
1147
|
+
# Specifies which additional view's permissions to include in the response. Only
|
1148
|
+
# 'published' is supported.
|
1149
|
+
# @param [Boolean] include_team_drive_items
|
1150
|
+
# Deprecated use includeItemsFromAllDrives instead.
|
1151
|
+
# @param [String] order_by
|
1152
|
+
# A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', '
|
1153
|
+
# modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', '
|
1154
|
+
# recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts
|
1155
|
+
# ascending by default, but may be reversed with the 'desc' modifier. Example
|
1156
|
+
# usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a
|
1157
|
+
# current limitation for users with approximately one million files in which the
|
1158
|
+
# requested sort order is ignored.
|
1159
|
+
# @param [Fixnum] page_size
|
1160
|
+
# The maximum number of files to return per page. Partial or empty result pages
|
1161
|
+
# are possible even before the end of the files list has been reached.
|
1162
|
+
# @param [String] page_token
|
1163
|
+
# The token for continuing a previous list request on the next page. This should
|
1164
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
1165
|
+
# @param [String] q
|
1166
|
+
# A query for filtering the file results. See the "Search for Files" guide for
|
1167
|
+
# supported syntax.
|
1168
|
+
# @param [String] spaces
|
1169
|
+
# A comma-separated list of spaces to query within the corpus. Supported values
|
1170
|
+
# are 'drive', 'appDataFolder' and 'photos'.
|
1171
|
+
# @param [Boolean] supports_all_drives
|
1172
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1173
|
+
# @param [Boolean] supports_team_drives
|
1174
|
+
# Deprecated use supportsAllDrives instead.
|
1175
|
+
# @param [String] team_drive_id
|
1176
|
+
# Deprecated use driveId instead.
|
1177
|
+
# @param [String] fields
|
1178
|
+
# Selector specifying which fields to include in a partial response.
|
1179
|
+
# @param [String] quota_user
|
1180
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1181
|
+
# characters.
|
1182
|
+
# @param [String] user_ip
|
1183
|
+
# Deprecated. Please use quotaUser instead.
|
1184
|
+
# @param [Google::Apis::RequestOptions] options
|
1185
|
+
# Request-specific options
|
1186
|
+
#
|
1187
|
+
# @yield [result, err] Result & error if block supplied
|
1188
|
+
# @yieldparam result [Google::Apis::DriveV3::FileList] parsed result object
|
1189
|
+
# @yieldparam err [StandardError] error object if request failed
|
1190
|
+
#
|
1191
|
+
# @return [Google::Apis::DriveV3::FileList]
|
1192
|
+
#
|
1193
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1194
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1195
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1196
|
+
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, order_by: nil, page_size: nil, page_token: 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)
|
1197
|
+
command = make_simple_command(:get, 'files', options)
|
1198
|
+
command.response_representation = Google::Apis::DriveV3::FileList::Representation
|
1199
|
+
command.response_class = Google::Apis::DriveV3::FileList
|
1200
|
+
command.query['corpora'] = corpora unless corpora.nil?
|
1201
|
+
command.query['corpus'] = corpus unless corpus.nil?
|
1202
|
+
command.query['driveId'] = drive_id unless drive_id.nil?
|
1203
|
+
command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
|
1204
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
1205
|
+
command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
|
1206
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
1207
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1208
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1209
|
+
command.query['q'] = q unless q.nil?
|
1210
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
1211
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1212
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1213
|
+
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
1214
|
+
command.query['fields'] = fields unless fields.nil?
|
1215
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1216
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1217
|
+
execute_or_queue_command(command, &block)
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
# Updates a file's metadata and/or content. This method supports patch semantics.
|
1221
|
+
# @param [String] file_id
|
1222
|
+
# The ID of the file.
|
1223
|
+
# @param [Google::Apis::DriveV3::File] file_object
|
1224
|
+
# @param [String] add_parents
|
1225
|
+
# A comma-separated list of parent IDs to add.
|
1226
|
+
# @param [Boolean] enforce_single_parent
|
1227
|
+
# Deprecated. Adding files to multiple folders is no longer supported. Use
|
1228
|
+
# shortcuts instead.
|
1229
|
+
# @param [String] include_permissions_for_view
|
1230
|
+
# Specifies which additional view's permissions to include in the response. Only
|
1231
|
+
# 'published' is supported.
|
1232
|
+
# @param [Boolean] keep_revision_forever
|
1233
|
+
# Whether to set the 'keepForever' field in the new head revision. This is only
|
1234
|
+
# applicable to files with binary content in Google Drive. Only 200 revisions
|
1235
|
+
# for the file can be kept forever. If the limit is reached, try deleting pinned
|
1236
|
+
# revisions.
|
1237
|
+
# @param [String] ocr_language
|
1238
|
+
# A language hint for OCR processing during image import (ISO 639-1 code).
|
1239
|
+
# @param [String] remove_parents
|
1240
|
+
# A comma-separated list of parent IDs to remove.
|
1241
|
+
# @param [Boolean] supports_all_drives
|
1242
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1243
|
+
# @param [Boolean] supports_team_drives
|
1244
|
+
# Deprecated use supportsAllDrives instead.
|
1245
|
+
# @param [Boolean] use_content_as_indexable_text
|
1246
|
+
# Whether to use the uploaded content as indexable text.
|
1247
|
+
# @param [String] fields
|
1248
|
+
# Selector specifying which fields to include in a partial response.
|
1249
|
+
# @param [String] quota_user
|
1250
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1251
|
+
# characters.
|
1252
|
+
# @param [String] user_ip
|
1253
|
+
# Deprecated. Please use quotaUser instead.
|
1254
|
+
# @param [IO, String] upload_source
|
1255
|
+
# IO stream or filename containing content to upload
|
1256
|
+
# @param [String] content_type
|
1257
|
+
# Content type of the uploaded content.
|
1258
|
+
# @param [Google::Apis::RequestOptions] options
|
1259
|
+
# Request-specific options
|
1260
|
+
#
|
1261
|
+
# @yield [result, err] Result & error if block supplied
|
1262
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
1263
|
+
# @yieldparam err [StandardError] error object if request failed
|
1264
|
+
#
|
1265
|
+
# @return [Google::Apis::DriveV3::File]
|
1266
|
+
#
|
1267
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1268
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1269
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1270
|
+
def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
1271
|
+
if upload_source.nil?
|
1272
|
+
command = make_simple_command(:patch, 'files/{fileId}', options)
|
1273
|
+
else
|
1274
|
+
command = make_upload_command(:patch, 'files/{fileId}', options)
|
1275
|
+
command.upload_source = upload_source
|
1276
|
+
command.upload_content_type = content_type
|
1277
|
+
end
|
1278
|
+
command.request_representation = Google::Apis::DriveV3::File::Representation
|
1279
|
+
command.request_object = file_object
|
1280
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
1281
|
+
command.response_class = Google::Apis::DriveV3::File
|
1282
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1283
|
+
command.query['addParents'] = add_parents unless add_parents.nil?
|
1284
|
+
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
1285
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
1286
|
+
command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
|
1287
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
1288
|
+
command.query['removeParents'] = remove_parents unless remove_parents.nil?
|
1289
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1290
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1291
|
+
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
1292
|
+
command.query['fields'] = fields unless fields.nil?
|
1293
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1294
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1295
|
+
execute_or_queue_command(command, &block)
|
1296
|
+
end
|
1297
|
+
|
1298
|
+
# Subscribes to changes to a file
|
1299
|
+
# @param [String] file_id
|
1300
|
+
# The ID of the file.
|
1301
|
+
# @param [Google::Apis::DriveV3::Channel] channel_object
|
1302
|
+
# @param [Boolean] acknowledge_abuse
|
1303
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
1304
|
+
# other abusive files. This is only applicable when alt=media.
|
1305
|
+
# @param [String] include_permissions_for_view
|
1306
|
+
# Specifies which additional view's permissions to include in the response. Only
|
1307
|
+
# 'published' is supported.
|
1308
|
+
# @param [Boolean] supports_all_drives
|
1309
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1310
|
+
# @param [Boolean] supports_team_drives
|
1311
|
+
# Deprecated use supportsAllDrives instead.
|
1312
|
+
# @param [String] fields
|
1313
|
+
# Selector specifying which fields to include in a partial response.
|
1314
|
+
# @param [String] quota_user
|
1315
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1316
|
+
# characters.
|
1317
|
+
# @param [String] user_ip
|
1318
|
+
# Deprecated. Please use quotaUser instead.
|
1319
|
+
# @param [IO, String] download_dest
|
1320
|
+
# IO stream or filename to receive content download
|
1321
|
+
# @param [Google::Apis::RequestOptions] options
|
1322
|
+
# Request-specific options
|
1323
|
+
#
|
1324
|
+
# @yield [result, err] Result & error if block supplied
|
1325
|
+
# @yieldparam result [Google::Apis::DriveV3::Channel] parsed result object
|
1326
|
+
# @yieldparam err [StandardError] error object if request failed
|
1327
|
+
#
|
1328
|
+
# @return [Google::Apis::DriveV3::Channel]
|
1329
|
+
#
|
1330
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1331
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1332
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1333
|
+
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
1334
|
+
if download_dest.nil?
|
1335
|
+
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
1336
|
+
else
|
1337
|
+
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
1338
|
+
command.download_dest = download_dest
|
1339
|
+
end
|
1340
|
+
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
1341
|
+
command.request_object = channel_object
|
1342
|
+
command.response_representation = Google::Apis::DriveV3::Channel::Representation
|
1343
|
+
command.response_class = Google::Apis::DriveV3::Channel
|
1344
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1345
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
1346
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
1347
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1348
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1349
|
+
command.query['fields'] = fields unless fields.nil?
|
1350
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1351
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1352
|
+
execute_or_queue_command(command, &block)
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
# Creates a permission for a file or shared drive.
|
1356
|
+
# @param [String] file_id
|
1357
|
+
# The ID of the file or shared drive.
|
1358
|
+
# @param [Google::Apis::DriveV3::Permission] permission_object
|
1359
|
+
# @param [String] email_message
|
1360
|
+
# A plain text custom message to include in the notification email.
|
1361
|
+
# @param [Boolean] enforce_single_parent
|
1362
|
+
# Deprecated. See moveToNewOwnersRoot for details.
|
1363
|
+
# @param [Boolean] move_to_new_owners_root
|
1364
|
+
# This parameter will only take effect if the item is not in a shared drive and
|
1365
|
+
# the request is attempting to transfer the ownership of the item. If set to
|
1366
|
+
# true, the item will be moved to the new owner's My Drive root folder and all
|
1367
|
+
# prior parents removed. If set to false, parents are not changed.
|
1368
|
+
# @param [Boolean] send_notification_email
|
1369
|
+
# Whether to send a notification email when sharing to users or groups. This
|
1370
|
+
# defaults to true for users and groups, and is not allowed for other requests.
|
1371
|
+
# It must not be disabled for ownership transfers.
|
1372
|
+
# @param [Boolean] supports_all_drives
|
1373
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1374
|
+
# @param [Boolean] supports_team_drives
|
1375
|
+
# Deprecated use supportsAllDrives instead.
|
1376
|
+
# @param [Boolean] transfer_ownership
|
1377
|
+
# Whether to transfer ownership to the specified user and downgrade the current
|
1378
|
+
# owner to a writer. This parameter is required as an acknowledgement of the
|
1379
|
+
# side effect.
|
1380
|
+
# @param [Boolean] use_domain_admin_access
|
1381
|
+
# Issue the request as a domain administrator; if set to true, then the
|
1382
|
+
# requester will be granted access if the file ID parameter refers to a shared
|
1383
|
+
# drive and the requester is an administrator of the domain to which the shared
|
1384
|
+
# drive belongs.
|
1385
|
+
# @param [String] fields
|
1386
|
+
# Selector specifying which fields to include in a partial response.
|
1387
|
+
# @param [String] quota_user
|
1388
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1389
|
+
# characters.
|
1390
|
+
# @param [String] user_ip
|
1391
|
+
# Deprecated. Please use quotaUser instead.
|
1392
|
+
# @param [Google::Apis::RequestOptions] options
|
1393
|
+
# Request-specific options
|
1394
|
+
#
|
1395
|
+
# @yield [result, err] Result & error if block supplied
|
1396
|
+
# @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
|
1397
|
+
# @yieldparam err [StandardError] error object if request failed
|
1398
|
+
#
|
1399
|
+
# @return [Google::Apis::DriveV3::Permission]
|
1400
|
+
#
|
1401
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1402
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1403
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1404
|
+
def create_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_email: 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)
|
1405
|
+
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
1406
|
+
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1407
|
+
command.request_object = permission_object
|
1408
|
+
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
1409
|
+
command.response_class = Google::Apis::DriveV3::Permission
|
1410
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1411
|
+
command.query['emailMessage'] = email_message unless email_message.nil?
|
1412
|
+
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
1413
|
+
command.query['moveToNewOwnersRoot'] = move_to_new_owners_root unless move_to_new_owners_root.nil?
|
1414
|
+
command.query['sendNotificationEmail'] = send_notification_email unless send_notification_email.nil?
|
1415
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1416
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1417
|
+
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
1418
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1419
|
+
command.query['fields'] = fields unless fields.nil?
|
1420
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1421
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1422
|
+
execute_or_queue_command(command, &block)
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
# Deletes a permission.
|
1426
|
+
# @param [String] file_id
|
1427
|
+
# The ID of the file or shared drive.
|
1428
|
+
# @param [String] permission_id
|
1429
|
+
# The ID of the permission.
|
1430
|
+
# @param [Boolean] supports_all_drives
|
1431
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1432
|
+
# @param [Boolean] supports_team_drives
|
1433
|
+
# Deprecated use supportsAllDrives instead.
|
1434
|
+
# @param [Boolean] use_domain_admin_access
|
1435
|
+
# Issue the request as a domain administrator; if set to true, then the
|
1436
|
+
# requester will be granted access if the file ID parameter refers to a shared
|
1437
|
+
# drive and the requester is an administrator of the domain to which the shared
|
1438
|
+
# drive belongs.
|
1439
|
+
# @param [String] fields
|
1440
|
+
# Selector specifying which fields to include in a partial response.
|
1441
|
+
# @param [String] quota_user
|
1442
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1443
|
+
# characters.
|
1444
|
+
# @param [String] user_ip
|
1445
|
+
# Deprecated. Please use quotaUser instead.
|
1446
|
+
# @param [Google::Apis::RequestOptions] options
|
1447
|
+
# Request-specific options
|
1448
|
+
#
|
1449
|
+
# @yield [result, err] Result & error if block supplied
|
1450
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1451
|
+
# @yieldparam err [StandardError] error object if request failed
|
1452
|
+
#
|
1453
|
+
# @return [void]
|
1454
|
+
#
|
1455
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1456
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1457
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1458
|
+
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)
|
1459
|
+
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
1460
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1461
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
1462
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1463
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1464
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1465
|
+
command.query['fields'] = fields unless fields.nil?
|
1466
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1467
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1468
|
+
execute_or_queue_command(command, &block)
|
1469
|
+
end
|
1470
|
+
|
1471
|
+
# Gets a permission by ID.
|
1472
|
+
# @param [String] file_id
|
1473
|
+
# The ID of the file.
|
1474
|
+
# @param [String] permission_id
|
1475
|
+
# The ID of the permission.
|
1476
|
+
# @param [Boolean] supports_all_drives
|
1477
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1478
|
+
# @param [Boolean] supports_team_drives
|
1479
|
+
# Deprecated use supportsAllDrives instead.
|
1480
|
+
# @param [Boolean] use_domain_admin_access
|
1481
|
+
# Issue the request as a domain administrator; if set to true, then the
|
1482
|
+
# requester will be granted access if the file ID parameter refers to a shared
|
1483
|
+
# drive and the requester is an administrator of the domain to which the shared
|
1484
|
+
# drive belongs.
|
1485
|
+
# @param [String] fields
|
1486
|
+
# Selector specifying which fields to include in a partial response.
|
1487
|
+
# @param [String] quota_user
|
1488
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1489
|
+
# characters.
|
1490
|
+
# @param [String] user_ip
|
1491
|
+
# Deprecated. Please use quotaUser instead.
|
1492
|
+
# @param [Google::Apis::RequestOptions] options
|
1493
|
+
# Request-specific options
|
1494
|
+
#
|
1495
|
+
# @yield [result, err] Result & error if block supplied
|
1496
|
+
# @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
|
1497
|
+
# @yieldparam err [StandardError] error object if request failed
|
1498
|
+
#
|
1499
|
+
# @return [Google::Apis::DriveV3::Permission]
|
1500
|
+
#
|
1501
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1502
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1503
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1504
|
+
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)
|
1505
|
+
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
1506
|
+
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
1507
|
+
command.response_class = Google::Apis::DriveV3::Permission
|
1508
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1509
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
1510
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1511
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1512
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1513
|
+
command.query['fields'] = fields unless fields.nil?
|
1514
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1515
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1516
|
+
execute_or_queue_command(command, &block)
|
1517
|
+
end
|
1518
|
+
|
1519
|
+
# Lists a file's or shared drive's permissions.
|
1520
|
+
# @param [String] file_id
|
1521
|
+
# The ID of the file or shared drive.
|
1522
|
+
# @param [String] include_permissions_for_view
|
1523
|
+
# Specifies which additional view's permissions to include in the response. Only
|
1524
|
+
# 'published' is supported.
|
1525
|
+
# @param [Fixnum] page_size
|
1526
|
+
# The maximum number of permissions to return per page. When not set for files
|
1527
|
+
# in a shared drive, at most 100 results will be returned. When not set for
|
1528
|
+
# files that are not in a shared drive, the entire list will be returned.
|
1529
|
+
# @param [String] page_token
|
1530
|
+
# The token for continuing a previous list request on the next page. This should
|
1531
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
1532
|
+
# @param [Boolean] supports_all_drives
|
1533
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1534
|
+
# @param [Boolean] supports_team_drives
|
1535
|
+
# Deprecated use supportsAllDrives instead.
|
1536
|
+
# @param [Boolean] use_domain_admin_access
|
1537
|
+
# Issue the request as a domain administrator; if set to true, then the
|
1538
|
+
# requester will be granted access if the file ID parameter refers to a shared
|
1539
|
+
# drive and the requester is an administrator of the domain to which the shared
|
1540
|
+
# drive belongs.
|
1541
|
+
# @param [String] fields
|
1542
|
+
# Selector specifying which fields to include in a partial response.
|
1543
|
+
# @param [String] quota_user
|
1544
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1545
|
+
# characters.
|
1546
|
+
# @param [String] user_ip
|
1547
|
+
# Deprecated. Please use quotaUser instead.
|
1548
|
+
# @param [Google::Apis::RequestOptions] options
|
1549
|
+
# Request-specific options
|
1550
|
+
#
|
1551
|
+
# @yield [result, err] Result & error if block supplied
|
1552
|
+
# @yieldparam result [Google::Apis::DriveV3::PermissionList] parsed result object
|
1553
|
+
# @yieldparam err [StandardError] error object if request failed
|
1554
|
+
#
|
1555
|
+
# @return [Google::Apis::DriveV3::PermissionList]
|
1556
|
+
#
|
1557
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1558
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1559
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1560
|
+
def list_permissions(file_id, include_permissions_for_view: nil, page_size: 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)
|
1561
|
+
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
1562
|
+
command.response_representation = Google::Apis::DriveV3::PermissionList::Representation
|
1563
|
+
command.response_class = Google::Apis::DriveV3::PermissionList
|
1564
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1565
|
+
command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
|
1566
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1567
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1568
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1569
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1570
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1571
|
+
command.query['fields'] = fields unless fields.nil?
|
1572
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1573
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1574
|
+
execute_or_queue_command(command, &block)
|
1575
|
+
end
|
1576
|
+
|
1577
|
+
# Updates a permission with patch semantics.
|
1578
|
+
# @param [String] file_id
|
1579
|
+
# The ID of the file or shared drive.
|
1580
|
+
# @param [String] permission_id
|
1581
|
+
# The ID of the permission.
|
1582
|
+
# @param [Google::Apis::DriveV3::Permission] permission_object
|
1583
|
+
# @param [Boolean] remove_expiration
|
1584
|
+
# Whether to remove the expiration date.
|
1585
|
+
# @param [Boolean] supports_all_drives
|
1586
|
+
# Whether the requesting application supports both My Drives and shared drives.
|
1587
|
+
# @param [Boolean] supports_team_drives
|
1588
|
+
# Deprecated use supportsAllDrives instead.
|
1589
|
+
# @param [Boolean] transfer_ownership
|
1590
|
+
# Whether to transfer ownership to the specified user and downgrade the current
|
1591
|
+
# owner to a writer. This parameter is required as an acknowledgement of the
|
1592
|
+
# side effect.
|
1593
|
+
# @param [Boolean] use_domain_admin_access
|
1594
|
+
# Issue the request as a domain administrator; if set to true, then the
|
1595
|
+
# requester will be granted access if the file ID parameter refers to a shared
|
1596
|
+
# drive and the requester is an administrator of the domain to which the shared
|
1597
|
+
# drive belongs.
|
1598
|
+
# @param [String] fields
|
1599
|
+
# Selector specifying which fields to include in a partial response.
|
1600
|
+
# @param [String] quota_user
|
1601
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1602
|
+
# characters.
|
1603
|
+
# @param [String] user_ip
|
1604
|
+
# Deprecated. Please use quotaUser instead.
|
1605
|
+
# @param [Google::Apis::RequestOptions] options
|
1606
|
+
# Request-specific options
|
1607
|
+
#
|
1608
|
+
# @yield [result, err] Result & error if block supplied
|
1609
|
+
# @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
|
1610
|
+
# @yieldparam err [StandardError] error object if request failed
|
1611
|
+
#
|
1612
|
+
# @return [Google::Apis::DriveV3::Permission]
|
1613
|
+
#
|
1614
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1615
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1616
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1617
|
+
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)
|
1618
|
+
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
1619
|
+
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1620
|
+
command.request_object = permission_object
|
1621
|
+
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
1622
|
+
command.response_class = Google::Apis::DriveV3::Permission
|
1623
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1624
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
1625
|
+
command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
|
1626
|
+
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1627
|
+
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1628
|
+
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
1629
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1630
|
+
command.query['fields'] = fields unless fields.nil?
|
1631
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1632
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1633
|
+
execute_or_queue_command(command, &block)
|
1634
|
+
end
|
1635
|
+
|
1636
|
+
# Creates a new reply to a comment.
|
1637
|
+
# @param [String] file_id
|
1638
|
+
# The ID of the file.
|
1639
|
+
# @param [String] comment_id
|
1640
|
+
# The ID of the comment.
|
1641
|
+
# @param [Google::Apis::DriveV3::Reply] reply_object
|
1642
|
+
# @param [String] fields
|
1643
|
+
# Selector specifying which fields to include in a partial response.
|
1644
|
+
# @param [String] quota_user
|
1645
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1646
|
+
# characters.
|
1647
|
+
# @param [String] user_ip
|
1648
|
+
# Deprecated. Please use quotaUser instead.
|
1649
|
+
# @param [Google::Apis::RequestOptions] options
|
1650
|
+
# Request-specific options
|
1651
|
+
#
|
1652
|
+
# @yield [result, err] Result & error if block supplied
|
1653
|
+
# @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
|
1654
|
+
# @yieldparam err [StandardError] error object if request failed
|
1655
|
+
#
|
1656
|
+
# @return [Google::Apis::DriveV3::Reply]
|
1657
|
+
#
|
1658
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1659
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1660
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1661
|
+
def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1662
|
+
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
1663
|
+
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1664
|
+
command.request_object = reply_object
|
1665
|
+
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
1666
|
+
command.response_class = Google::Apis::DriveV3::Reply
|
1667
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1668
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
1669
|
+
command.query['fields'] = fields unless fields.nil?
|
1670
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1671
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1672
|
+
execute_or_queue_command(command, &block)
|
1673
|
+
end
|
1674
|
+
|
1675
|
+
# Deletes a reply.
|
1676
|
+
# @param [String] file_id
|
1677
|
+
# The ID of the file.
|
1678
|
+
# @param [String] comment_id
|
1679
|
+
# The ID of the comment.
|
1680
|
+
# @param [String] reply_id
|
1681
|
+
# The ID of the reply.
|
1682
|
+
# @param [String] fields
|
1683
|
+
# Selector specifying which fields to include in a partial response.
|
1684
|
+
# @param [String] quota_user
|
1685
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1686
|
+
# characters.
|
1687
|
+
# @param [String] user_ip
|
1688
|
+
# Deprecated. Please use quotaUser instead.
|
1689
|
+
# @param [Google::Apis::RequestOptions] options
|
1690
|
+
# Request-specific options
|
1691
|
+
#
|
1692
|
+
# @yield [result, err] Result & error if block supplied
|
1693
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1694
|
+
# @yieldparam err [StandardError] error object if request failed
|
1695
|
+
#
|
1696
|
+
# @return [void]
|
1697
|
+
#
|
1698
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1699
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1700
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1701
|
+
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1702
|
+
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1703
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1704
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
1705
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
1706
|
+
command.query['fields'] = fields unless fields.nil?
|
1707
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1708
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1709
|
+
execute_or_queue_command(command, &block)
|
1710
|
+
end
|
1711
|
+
|
1712
|
+
# Gets a reply by ID.
|
1713
|
+
# @param [String] file_id
|
1714
|
+
# The ID of the file.
|
1715
|
+
# @param [String] comment_id
|
1716
|
+
# The ID of the comment.
|
1717
|
+
# @param [String] reply_id
|
1718
|
+
# The ID of the reply.
|
1719
|
+
# @param [Boolean] include_deleted
|
1720
|
+
# Whether to return deleted replies. Deleted replies will not include their
|
1721
|
+
# original content.
|
1722
|
+
# @param [String] fields
|
1723
|
+
# Selector specifying which fields to include in a partial response.
|
1724
|
+
# @param [String] quota_user
|
1725
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1726
|
+
# characters.
|
1727
|
+
# @param [String] user_ip
|
1728
|
+
# Deprecated. Please use quotaUser instead.
|
1729
|
+
# @param [Google::Apis::RequestOptions] options
|
1730
|
+
# Request-specific options
|
1731
|
+
#
|
1732
|
+
# @yield [result, err] Result & error if block supplied
|
1733
|
+
# @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
|
1734
|
+
# @yieldparam err [StandardError] error object if request failed
|
1735
|
+
#
|
1736
|
+
# @return [Google::Apis::DriveV3::Reply]
|
1737
|
+
#
|
1738
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1739
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1740
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1741
|
+
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1742
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1743
|
+
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
1744
|
+
command.response_class = Google::Apis::DriveV3::Reply
|
1745
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1746
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
1747
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
1748
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
1749
|
+
command.query['fields'] = fields unless fields.nil?
|
1750
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1751
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1752
|
+
execute_or_queue_command(command, &block)
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
# Lists a comment's replies.
|
1756
|
+
# @param [String] file_id
|
1757
|
+
# The ID of the file.
|
1758
|
+
# @param [String] comment_id
|
1759
|
+
# The ID of the comment.
|
1760
|
+
# @param [Boolean] include_deleted
|
1761
|
+
# Whether to include deleted replies. Deleted replies will not include their
|
1762
|
+
# original content.
|
1763
|
+
# @param [Fixnum] page_size
|
1764
|
+
# The maximum number of replies to return per page.
|
1765
|
+
# @param [String] page_token
|
1766
|
+
# The token for continuing a previous list request on the next page. This should
|
1767
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
1768
|
+
# @param [String] fields
|
1769
|
+
# Selector specifying which fields to include in a partial response.
|
1770
|
+
# @param [String] quota_user
|
1771
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1772
|
+
# characters.
|
1773
|
+
# @param [String] user_ip
|
1774
|
+
# Deprecated. Please use quotaUser instead.
|
1775
|
+
# @param [Google::Apis::RequestOptions] options
|
1776
|
+
# Request-specific options
|
1777
|
+
#
|
1778
|
+
# @yield [result, err] Result & error if block supplied
|
1779
|
+
# @yieldparam result [Google::Apis::DriveV3::ReplyList] parsed result object
|
1780
|
+
# @yieldparam err [StandardError] error object if request failed
|
1781
|
+
#
|
1782
|
+
# @return [Google::Apis::DriveV3::ReplyList]
|
1783
|
+
#
|
1784
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1785
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1786
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1787
|
+
def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1788
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
1789
|
+
command.response_representation = Google::Apis::DriveV3::ReplyList::Representation
|
1790
|
+
command.response_class = Google::Apis::DriveV3::ReplyList
|
1791
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1792
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
1793
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
1794
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1795
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1796
|
+
command.query['fields'] = fields unless fields.nil?
|
1797
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1798
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1799
|
+
execute_or_queue_command(command, &block)
|
1800
|
+
end
|
1801
|
+
|
1802
|
+
# Updates a reply with patch semantics.
|
1803
|
+
# @param [String] file_id
|
1804
|
+
# The ID of the file.
|
1805
|
+
# @param [String] comment_id
|
1806
|
+
# The ID of the comment.
|
1807
|
+
# @param [String] reply_id
|
1808
|
+
# The ID of the reply.
|
1809
|
+
# @param [Google::Apis::DriveV3::Reply] reply_object
|
1810
|
+
# @param [String] fields
|
1811
|
+
# Selector specifying which fields to include in a partial response.
|
1812
|
+
# @param [String] quota_user
|
1813
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1814
|
+
# characters.
|
1815
|
+
# @param [String] user_ip
|
1816
|
+
# Deprecated. Please use quotaUser instead.
|
1817
|
+
# @param [Google::Apis::RequestOptions] options
|
1818
|
+
# Request-specific options
|
1819
|
+
#
|
1820
|
+
# @yield [result, err] Result & error if block supplied
|
1821
|
+
# @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
|
1822
|
+
# @yieldparam err [StandardError] error object if request failed
|
1823
|
+
#
|
1824
|
+
# @return [Google::Apis::DriveV3::Reply]
|
1825
|
+
#
|
1826
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1827
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1828
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1829
|
+
def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1830
|
+
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1831
|
+
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1832
|
+
command.request_object = reply_object
|
1833
|
+
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
1834
|
+
command.response_class = Google::Apis::DriveV3::Reply
|
1835
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1836
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
1837
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
1838
|
+
command.query['fields'] = fields unless fields.nil?
|
1839
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1840
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1841
|
+
execute_or_queue_command(command, &block)
|
1842
|
+
end
|
1843
|
+
|
1844
|
+
# Permanently deletes a file version. You can only delete revisions for files
|
1845
|
+
# with binary content in Google Drive, like images or videos. Revisions for
|
1846
|
+
# other files, like Google Docs or Sheets, and the last remaining file version
|
1847
|
+
# can't be deleted.
|
1848
|
+
# @param [String] file_id
|
1849
|
+
# The ID of the file.
|
1850
|
+
# @param [String] revision_id
|
1851
|
+
# The ID of the revision.
|
1852
|
+
# @param [String] fields
|
1853
|
+
# Selector specifying which fields to include in a partial response.
|
1854
|
+
# @param [String] quota_user
|
1855
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1856
|
+
# characters.
|
1857
|
+
# @param [String] user_ip
|
1858
|
+
# Deprecated. Please use quotaUser instead.
|
1859
|
+
# @param [Google::Apis::RequestOptions] options
|
1860
|
+
# Request-specific options
|
1861
|
+
#
|
1862
|
+
# @yield [result, err] Result & error if block supplied
|
1863
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1864
|
+
# @yieldparam err [StandardError] error object if request failed
|
1865
|
+
#
|
1866
|
+
# @return [void]
|
1867
|
+
#
|
1868
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1869
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1870
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1871
|
+
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1872
|
+
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
1873
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1874
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
1875
|
+
command.query['fields'] = fields unless fields.nil?
|
1876
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1877
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1878
|
+
execute_or_queue_command(command, &block)
|
1879
|
+
end
|
1880
|
+
|
1881
|
+
# Gets a revision's metadata or content by ID.
|
1882
|
+
# @param [String] file_id
|
1883
|
+
# The ID of the file.
|
1884
|
+
# @param [String] revision_id
|
1885
|
+
# The ID of the revision.
|
1886
|
+
# @param [Boolean] acknowledge_abuse
|
1887
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
1888
|
+
# other abusive files. This is only applicable when alt=media.
|
1889
|
+
# @param [String] fields
|
1890
|
+
# Selector specifying which fields to include in a partial response.
|
1891
|
+
# @param [String] quota_user
|
1892
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1893
|
+
# characters.
|
1894
|
+
# @param [String] user_ip
|
1895
|
+
# Deprecated. Please use quotaUser instead.
|
1896
|
+
# @param [IO, String] download_dest
|
1897
|
+
# IO stream or filename to receive content download
|
1898
|
+
# @param [Google::Apis::RequestOptions] options
|
1899
|
+
# Request-specific options
|
1900
|
+
#
|
1901
|
+
# @yield [result, err] Result & error if block supplied
|
1902
|
+
# @yieldparam result [Google::Apis::DriveV3::Revision] parsed result object
|
1903
|
+
# @yieldparam err [StandardError] error object if request failed
|
1904
|
+
#
|
1905
|
+
# @return [Google::Apis::DriveV3::Revision]
|
1906
|
+
#
|
1907
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1908
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1909
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1910
|
+
def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
1911
|
+
if download_dest.nil?
|
1912
|
+
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
1913
|
+
else
|
1914
|
+
command = make_download_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
1915
|
+
command.download_dest = download_dest
|
1916
|
+
end
|
1917
|
+
command.response_representation = Google::Apis::DriveV3::Revision::Representation
|
1918
|
+
command.response_class = Google::Apis::DriveV3::Revision
|
1919
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1920
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
1921
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
1922
|
+
command.query['fields'] = fields unless fields.nil?
|
1923
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1924
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1925
|
+
execute_or_queue_command(command, &block)
|
1926
|
+
end
|
1927
|
+
|
1928
|
+
# Lists a file's revisions.
|
1929
|
+
# @param [String] file_id
|
1930
|
+
# The ID of the file.
|
1931
|
+
# @param [Fixnum] page_size
|
1932
|
+
# The maximum number of revisions to return per page.
|
1933
|
+
# @param [String] page_token
|
1934
|
+
# The token for continuing a previous list request on the next page. This should
|
1935
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
1936
|
+
# @param [String] fields
|
1937
|
+
# Selector specifying which fields to include in a partial response.
|
1938
|
+
# @param [String] quota_user
|
1939
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1940
|
+
# characters.
|
1941
|
+
# @param [String] user_ip
|
1942
|
+
# Deprecated. Please use quotaUser instead.
|
1943
|
+
# @param [Google::Apis::RequestOptions] options
|
1944
|
+
# Request-specific options
|
1945
|
+
#
|
1946
|
+
# @yield [result, err] Result & error if block supplied
|
1947
|
+
# @yieldparam result [Google::Apis::DriveV3::RevisionList] parsed result object
|
1948
|
+
# @yieldparam err [StandardError] error object if request failed
|
1949
|
+
#
|
1950
|
+
# @return [Google::Apis::DriveV3::RevisionList]
|
1951
|
+
#
|
1952
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1953
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1954
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1955
|
+
def list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1956
|
+
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
1957
|
+
command.response_representation = Google::Apis::DriveV3::RevisionList::Representation
|
1958
|
+
command.response_class = Google::Apis::DriveV3::RevisionList
|
1959
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1960
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1961
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1962
|
+
command.query['fields'] = fields unless fields.nil?
|
1963
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1964
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1965
|
+
execute_or_queue_command(command, &block)
|
1966
|
+
end
|
1967
|
+
|
1968
|
+
# Updates a revision with patch semantics.
|
1969
|
+
# @param [String] file_id
|
1970
|
+
# The ID of the file.
|
1971
|
+
# @param [String] revision_id
|
1972
|
+
# The ID of the revision.
|
1973
|
+
# @param [Google::Apis::DriveV3::Revision] revision_object
|
1974
|
+
# @param [String] fields
|
1975
|
+
# Selector specifying which fields to include in a partial response.
|
1976
|
+
# @param [String] quota_user
|
1977
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1978
|
+
# characters.
|
1979
|
+
# @param [String] user_ip
|
1980
|
+
# Deprecated. Please use quotaUser instead.
|
1981
|
+
# @param [Google::Apis::RequestOptions] options
|
1982
|
+
# Request-specific options
|
1983
|
+
#
|
1984
|
+
# @yield [result, err] Result & error if block supplied
|
1985
|
+
# @yieldparam result [Google::Apis::DriveV3::Revision] parsed result object
|
1986
|
+
# @yieldparam err [StandardError] error object if request failed
|
1987
|
+
#
|
1988
|
+
# @return [Google::Apis::DriveV3::Revision]
|
1989
|
+
#
|
1990
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1991
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1992
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1993
|
+
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1994
|
+
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
1995
|
+
command.request_representation = Google::Apis::DriveV3::Revision::Representation
|
1996
|
+
command.request_object = revision_object
|
1997
|
+
command.response_representation = Google::Apis::DriveV3::Revision::Representation
|
1998
|
+
command.response_class = Google::Apis::DriveV3::Revision
|
1999
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
2000
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
2001
|
+
command.query['fields'] = fields unless fields.nil?
|
2002
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2003
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2004
|
+
execute_or_queue_command(command, &block)
|
2005
|
+
end
|
2006
|
+
|
2007
|
+
# Deprecated use drives.create instead.
|
2008
|
+
# @param [String] request_id
|
2009
|
+
# An ID, such as a random UUID, which uniquely identifies this user's request
|
2010
|
+
# for idempotent creation of a Team Drive. A repeated request by the same user
|
2011
|
+
# and with the same request ID will avoid creating duplicates by attempting to
|
2012
|
+
# create the same Team Drive. If the Team Drive already exists a 409 error will
|
2013
|
+
# be returned.
|
2014
|
+
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
2015
|
+
# @param [String] fields
|
2016
|
+
# Selector specifying which fields to include in a partial response.
|
2017
|
+
# @param [String] quota_user
|
2018
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2019
|
+
# characters.
|
2020
|
+
# @param [String] user_ip
|
2021
|
+
# Deprecated. Please use quotaUser instead.
|
2022
|
+
# @param [Google::Apis::RequestOptions] options
|
2023
|
+
# Request-specific options
|
2024
|
+
#
|
2025
|
+
# @yield [result, err] Result & error if block supplied
|
2026
|
+
# @yieldparam result [Google::Apis::DriveV3::TeamDrive] parsed result object
|
2027
|
+
# @yieldparam err [StandardError] error object if request failed
|
2028
|
+
#
|
2029
|
+
# @return [Google::Apis::DriveV3::TeamDrive]
|
2030
|
+
#
|
2031
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2032
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2033
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2034
|
+
def create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2035
|
+
command = make_simple_command(:post, 'teamdrives', options)
|
2036
|
+
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2037
|
+
command.request_object = team_drive_object
|
2038
|
+
command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2039
|
+
command.response_class = Google::Apis::DriveV3::TeamDrive
|
2040
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
2041
|
+
command.query['fields'] = fields unless fields.nil?
|
2042
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2043
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2044
|
+
execute_or_queue_command(command, &block)
|
2045
|
+
end
|
2046
|
+
|
2047
|
+
# Deprecated use drives.delete instead.
|
2048
|
+
# @param [String] team_drive_id
|
2049
|
+
# The ID of the Team Drive
|
2050
|
+
# @param [String] fields
|
2051
|
+
# Selector specifying which fields to include in a partial response.
|
2052
|
+
# @param [String] quota_user
|
2053
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2054
|
+
# characters.
|
2055
|
+
# @param [String] user_ip
|
2056
|
+
# Deprecated. Please use quotaUser instead.
|
2057
|
+
# @param [Google::Apis::RequestOptions] options
|
2058
|
+
# Request-specific options
|
2059
|
+
#
|
2060
|
+
# @yield [result, err] Result & error if block supplied
|
2061
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2062
|
+
# @yieldparam err [StandardError] error object if request failed
|
2063
|
+
#
|
2064
|
+
# @return [void]
|
2065
|
+
#
|
2066
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2067
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2068
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2069
|
+
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2070
|
+
command = make_simple_command(:delete, 'teamdrives/{teamDriveId}', options)
|
2071
|
+
command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2072
|
+
command.query['fields'] = fields unless fields.nil?
|
2073
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2074
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2075
|
+
execute_or_queue_command(command, &block)
|
2076
|
+
end
|
2077
|
+
|
2078
|
+
# Deprecated use drives.get instead.
|
2079
|
+
# @param [String] team_drive_id
|
2080
|
+
# The ID of the Team Drive
|
2081
|
+
# @param [Boolean] use_domain_admin_access
|
2082
|
+
# Issue the request as a domain administrator; if set to true, then the
|
2083
|
+
# requester will be granted access if they are an administrator of the domain to
|
2084
|
+
# which the Team Drive belongs.
|
2085
|
+
# @param [String] fields
|
2086
|
+
# Selector specifying which fields to include in a partial response.
|
2087
|
+
# @param [String] quota_user
|
2088
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2089
|
+
# characters.
|
2090
|
+
# @param [String] user_ip
|
2091
|
+
# Deprecated. Please use quotaUser instead.
|
2092
|
+
# @param [Google::Apis::RequestOptions] options
|
2093
|
+
# Request-specific options
|
2094
|
+
#
|
2095
|
+
# @yield [result, err] Result & error if block supplied
|
2096
|
+
# @yieldparam result [Google::Apis::DriveV3::TeamDrive] parsed result object
|
2097
|
+
# @yieldparam err [StandardError] error object if request failed
|
2098
|
+
#
|
2099
|
+
# @return [Google::Apis::DriveV3::TeamDrive]
|
2100
|
+
#
|
2101
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2102
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2103
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2104
|
+
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2105
|
+
command = make_simple_command(:get, 'teamdrives/{teamDriveId}', options)
|
2106
|
+
command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2107
|
+
command.response_class = Google::Apis::DriveV3::TeamDrive
|
2108
|
+
command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2109
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2110
|
+
command.query['fields'] = fields unless fields.nil?
|
2111
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2112
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2113
|
+
execute_or_queue_command(command, &block)
|
2114
|
+
end
|
2115
|
+
|
2116
|
+
# Deprecated use drives.list instead.
|
2117
|
+
# @param [Fixnum] page_size
|
2118
|
+
# Maximum number of Team Drives to return.
|
2119
|
+
# @param [String] page_token
|
2120
|
+
# Page token for Team Drives.
|
2121
|
+
# @param [String] q
|
2122
|
+
# Query string for searching Team Drives.
|
2123
|
+
# @param [Boolean] use_domain_admin_access
|
2124
|
+
# Issue the request as a domain administrator; if set to true, then all Team
|
2125
|
+
# Drives of the domain in which the requester is an administrator are returned.
|
2126
|
+
# @param [String] fields
|
2127
|
+
# Selector specifying which fields to include in a partial response.
|
2128
|
+
# @param [String] quota_user
|
2129
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2130
|
+
# characters.
|
2131
|
+
# @param [String] user_ip
|
2132
|
+
# Deprecated. Please use quotaUser instead.
|
2133
|
+
# @param [Google::Apis::RequestOptions] options
|
2134
|
+
# Request-specific options
|
2135
|
+
#
|
2136
|
+
# @yield [result, err] Result & error if block supplied
|
2137
|
+
# @yieldparam result [Google::Apis::DriveV3::TeamDriveList] parsed result object
|
2138
|
+
# @yieldparam err [StandardError] error object if request failed
|
2139
|
+
#
|
2140
|
+
# @return [Google::Apis::DriveV3::TeamDriveList]
|
2141
|
+
#
|
2142
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2143
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2144
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2145
|
+
def list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2146
|
+
command = make_simple_command(:get, 'teamdrives', options)
|
2147
|
+
command.response_representation = Google::Apis::DriveV3::TeamDriveList::Representation
|
2148
|
+
command.response_class = Google::Apis::DriveV3::TeamDriveList
|
2149
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
2150
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
2151
|
+
command.query['q'] = q unless q.nil?
|
2152
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2153
|
+
command.query['fields'] = fields unless fields.nil?
|
2154
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2155
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2156
|
+
execute_or_queue_command(command, &block)
|
2157
|
+
end
|
2158
|
+
|
2159
|
+
# Deprecated use drives.update instead
|
2160
|
+
# @param [String] team_drive_id
|
2161
|
+
# The ID of the Team Drive
|
2162
|
+
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
2163
|
+
# @param [Boolean] use_domain_admin_access
|
2164
|
+
# Issue the request as a domain administrator; if set to true, then the
|
2165
|
+
# requester will be granted access if they are an administrator of the domain to
|
2166
|
+
# which the Team Drive belongs.
|
2167
|
+
# @param [String] fields
|
2168
|
+
# Selector specifying which fields to include in a partial response.
|
2169
|
+
# @param [String] quota_user
|
2170
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2171
|
+
# characters.
|
2172
|
+
# @param [String] user_ip
|
2173
|
+
# Deprecated. Please use quotaUser instead.
|
2174
|
+
# @param [Google::Apis::RequestOptions] options
|
2175
|
+
# Request-specific options
|
2176
|
+
#
|
2177
|
+
# @yield [result, err] Result & error if block supplied
|
2178
|
+
# @yieldparam result [Google::Apis::DriveV3::TeamDrive] parsed result object
|
2179
|
+
# @yieldparam err [StandardError] error object if request failed
|
2180
|
+
#
|
2181
|
+
# @return [Google::Apis::DriveV3::TeamDrive]
|
2182
|
+
#
|
2183
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2184
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2185
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2186
|
+
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)
|
2187
|
+
command = make_simple_command(:patch, 'teamdrives/{teamDriveId}', options)
|
2188
|
+
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2189
|
+
command.request_object = team_drive_object
|
2190
|
+
command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2191
|
+
command.response_class = Google::Apis::DriveV3::TeamDrive
|
2192
|
+
command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2193
|
+
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2194
|
+
command.query['fields'] = fields unless fields.nil?
|
2195
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2196
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2197
|
+
execute_or_queue_command(command, &block)
|
2198
|
+
end
|
2199
|
+
|
2200
|
+
protected
|
2201
|
+
|
2202
|
+
def apply_command_defaults(command)
|
2203
|
+
command.query['key'] = key unless key.nil?
|
2204
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2205
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2206
|
+
end
|
2207
|
+
end
|
2208
|
+
end
|
2209
|
+
end
|
2210
|
+
end
|