Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: generated/googleapis/lib/drive/v2.dart

Issue 1078053002: Roll of googleapis as of 4/7/2015. (Closed) Base URL: https://github.com/dart-lang/googleapis.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project).
2
1 library googleapis.drive.v2; 3 library googleapis.drive.v2;
2 4
3 import "dart:core" as core; 5 import 'dart:core' as core;
4 import "dart:collection" as collection; 6 import 'dart:collection' as collection;
5 import "dart:async" as async; 7 import 'dart:async' as async;
6 import "dart:convert" as convert_1; 8 import 'dart:convert' as convert_1;
7 9
8 import "package:crypto/crypto.dart" as crypto; 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
11 import 'package:crypto/crypto.dart' as crypto;
9 import 'package:http/http.dart' as http; 12 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common;
12 13
13 export '../common/common.dart' show ApiRequestError; 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 export '../common/common.dart' show DetailedApiRequestError; 15 ApiRequestError, DetailedApiRequestError, Media, UploadOptions,
16 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions,
17 ByteRange;
18
19 const core.String USER_AGENT = 'dart-api-client drive/v2';
15 20
16 /** The API to interact with Drive. */ 21 /** The API to interact with Drive. */
17 class DriveApi { 22 class DriveApi {
18 /** View and manage the files and documents in your Google Drive */ 23 /** View and manage the files in your Google Drive */
19 static const DriveScope = "https://www.googleapis.com/auth/drive"; 24 static const DriveScope = "https://www.googleapis.com/auth/drive";
20 25
21 /** View and manage its own configuration data in your Google Drive */ 26 /** View and manage its own configuration data in your Google Drive */
22 static const DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdat a"; 27 static const DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdat a";
23 28
24 /** View your Google Drive apps */ 29 /** View your Google Drive apps */
25 static const DriveAppsReadonlyScope = "https://www.googleapis.com/auth/drive.a pps.readonly"; 30 static const DriveAppsReadonlyScope = "https://www.googleapis.com/auth/drive.a pps.readonly";
26 31
27 /** 32 /**
28 * View and manage Google Drive files that you have opened or created with 33 * View and manage Google Drive files that you have opened or created with
29 * this app 34 * this app
30 */ 35 */
31 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file"; 36 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file";
32 37
33 /** View metadata for files and documents in your Google Drive */ 38 /** View metadata for files in your Google Drive */
34 static const DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/dri ve.metadata.readonly"; 39 static const DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/dri ve.metadata.readonly";
35 40
36 /** View the files and documents in your Google Drive */ 41 /** View the files in your Google Drive */
37 static const DriveReadonlyScope = "https://www.googleapis.com/auth/drive.reado nly"; 42 static const DriveReadonlyScope = "https://www.googleapis.com/auth/drive.reado nly";
38 43
39 /** Modify your Google Apps Script scripts' behavior */ 44 /** Modify your Google Apps Script scripts' behavior */
40 static const DriveScriptsScope = "https://www.googleapis.com/auth/drive.script s"; 45 static const DriveScriptsScope = "https://www.googleapis.com/auth/drive.script s";
41 46
42 47
43 final common_internal.ApiRequester _requester; 48 final commons.ApiRequester _requester;
44 49
45 AboutResourceApi get about => new AboutResourceApi(_requester); 50 AboutResourceApi get about => new AboutResourceApi(_requester);
46 AppsResourceApi get apps => new AppsResourceApi(_requester); 51 AppsResourceApi get apps => new AppsResourceApi(_requester);
47 ChangesResourceApi get changes => new ChangesResourceApi(_requester); 52 ChangesResourceApi get changes => new ChangesResourceApi(_requester);
48 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); 53 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester);
49 ChildrenResourceApi get children => new ChildrenResourceApi(_requester); 54 ChildrenResourceApi get children => new ChildrenResourceApi(_requester);
50 CommentsResourceApi get comments => new CommentsResourceApi(_requester); 55 CommentsResourceApi get comments => new CommentsResourceApi(_requester);
51 FilesResourceApi get files => new FilesResourceApi(_requester); 56 FilesResourceApi get files => new FilesResourceApi(_requester);
52 ParentsResourceApi get parents => new ParentsResourceApi(_requester); 57 ParentsResourceApi get parents => new ParentsResourceApi(_requester);
53 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r); 58 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r);
54 PropertiesResourceApi get properties => new PropertiesResourceApi(_requester); 59 PropertiesResourceApi get properties => new PropertiesResourceApi(_requester);
55 RealtimeResourceApi get realtime => new RealtimeResourceApi(_requester); 60 RealtimeResourceApi get realtime => new RealtimeResourceApi(_requester);
56 RepliesResourceApi get replies => new RepliesResourceApi(_requester); 61 RepliesResourceApi get replies => new RepliesResourceApi(_requester);
57 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); 62 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester);
58 63
59 DriveApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com /", core.String servicePath: "drive/v2/"}) : 64 DriveApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com /", core.String servicePath: "drive/v2/"}) :
60 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath ); 65 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
61 } 66 }
62 67
63 68
64 /** Not documented yet. */
65 class AboutResourceApi { 69 class AboutResourceApi {
66 final common_internal.ApiRequester _requester; 70 final commons.ApiRequester _requester;
67 71
68 AboutResourceApi(common_internal.ApiRequester client) : 72 AboutResourceApi(commons.ApiRequester client) :
69 _requester = client; 73 _requester = client;
70 74
71 /** 75 /**
72 * Gets the information about the current user along with Drive API settings 76 * Gets the information about the current user along with Drive API settings
73 * 77 *
74 * Request parameters: 78 * Request parameters:
75 * 79 *
76 * [includeSubscribed] - When calculating the number of remaining change IDs, 80 * [includeSubscribed] - When calculating the number of remaining change IDs,
77 * whether to include public files the user has opened and shared files. When 81 * whether to include public files the user has opened and shared files. When
78 * set to false, this counts only change IDs for owned files and any shared or 82 * set to false, this counts only change IDs for owned files and any shared or
79 * public files that the user has explicitly added to a folder they own. 83 * public files that the user has explicitly added to a folder they own.
80 * 84 *
81 * [maxChangeIdCount] - Maximum number of remaining change IDs to count 85 * [maxChangeIdCount] - Maximum number of remaining change IDs to count
82 * 86 *
83 * [startChangeId] - Change ID to start counting from when calculating number 87 * [startChangeId] - Change ID to start counting from when calculating number
84 * of remaining change IDs 88 * of remaining change IDs
85 * 89 *
86 * Completes with a [About]. 90 * Completes with a [About].
87 * 91 *
88 * Completes with a [common.ApiRequestError] if the API endpoint returned an 92 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
89 * error. 93 * error.
90 * 94 *
91 * If the used [http.Client] completes with an error when making a REST call, 95 * If the used [http.Client] completes with an error when making a REST call,
92 * this method will complete with the same error. 96 * this method will complete with the same error.
93 */ 97 */
94 async.Future<About> get({core.bool includeSubscribed, core.String maxChangeIdC ount, core.String startChangeId}) { 98 async.Future<About> get({core.bool includeSubscribed, core.String maxChangeIdC ount, core.String startChangeId}) {
95 var _url = null; 99 var _url = null;
96 var _queryParams = new core.Map(); 100 var _queryParams = new core.Map();
97 var _uploadMedia = null; 101 var _uploadMedia = null;
98 var _uploadOptions = null; 102 var _uploadOptions = null;
99 var _downloadOptions = common.DownloadOptions.Metadata; 103 var _downloadOptions = commons.DownloadOptions.Metadata;
100 var _body = null; 104 var _body = null;
101 105
102 if (includeSubscribed != null) { 106 if (includeSubscribed != null) {
103 _queryParams["includeSubscribed"] = ["${includeSubscribed}"]; 107 _queryParams["includeSubscribed"] = ["${includeSubscribed}"];
104 } 108 }
105 if (maxChangeIdCount != null) { 109 if (maxChangeIdCount != null) {
106 _queryParams["maxChangeIdCount"] = [maxChangeIdCount]; 110 _queryParams["maxChangeIdCount"] = [maxChangeIdCount];
107 } 111 }
108 if (startChangeId != null) { 112 if (startChangeId != null) {
109 _queryParams["startChangeId"] = [startChangeId]; 113 _queryParams["startChangeId"] = [startChangeId];
110 } 114 }
111 115
112 116
113 _url = 'about'; 117 _url = 'about';
114 118
115 var _response = _requester.request(_url, 119 var _response = _requester.request(_url,
116 "GET", 120 "GET",
117 body: _body, 121 body: _body,
118 queryParams: _queryParams, 122 queryParams: _queryParams,
119 uploadOptions: _uploadOptions, 123 uploadOptions: _uploadOptions,
120 uploadMedia: _uploadMedia, 124 uploadMedia: _uploadMedia,
121 downloadOptions: _downloadOptions); 125 downloadOptions: _downloadOptions);
122 return _response.then((data) => new About.fromJson(data)); 126 return _response.then((data) => new About.fromJson(data));
123 } 127 }
124 128
125 } 129 }
126 130
127 131
128 /** Not documented yet. */
129 class AppsResourceApi { 132 class AppsResourceApi {
130 final common_internal.ApiRequester _requester; 133 final commons.ApiRequester _requester;
131 134
132 AppsResourceApi(common_internal.ApiRequester client) : 135 AppsResourceApi(commons.ApiRequester client) :
133 _requester = client; 136 _requester = client;
134 137
135 /** 138 /**
136 * Gets a specific app. 139 * Gets a specific app.
137 * 140 *
138 * Request parameters: 141 * Request parameters:
139 * 142 *
140 * [appId] - The ID of the app. 143 * [appId] - The ID of the app.
141 * 144 *
142 * Completes with a [App]. 145 * Completes with a [App].
143 * 146 *
144 * Completes with a [common.ApiRequestError] if the API endpoint returned an 147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
145 * error. 148 * error.
146 * 149 *
147 * If the used [http.Client] completes with an error when making a REST call, 150 * If the used [http.Client] completes with an error when making a REST call,
148 * this method will complete with the same error. 151 * this method will complete with the same error.
149 */ 152 */
150 async.Future<App> get(core.String appId) { 153 async.Future<App> get(core.String appId) {
151 var _url = null; 154 var _url = null;
152 var _queryParams = new core.Map(); 155 var _queryParams = new core.Map();
153 var _uploadMedia = null; 156 var _uploadMedia = null;
154 var _uploadOptions = null; 157 var _uploadOptions = null;
155 var _downloadOptions = common.DownloadOptions.Metadata; 158 var _downloadOptions = commons.DownloadOptions.Metadata;
156 var _body = null; 159 var _body = null;
157 160
158 if (appId == null) { 161 if (appId == null) {
159 throw new core.ArgumentError("Parameter appId is required."); 162 throw new core.ArgumentError("Parameter appId is required.");
160 } 163 }
161 164
162 165
163 _url = 'apps/' + common_internal.Escaper.ecapeVariable('$appId'); 166 _url = 'apps/' + commons.Escaper.ecapeVariable('$appId');
164 167
165 var _response = _requester.request(_url, 168 var _response = _requester.request(_url,
166 "GET", 169 "GET",
167 body: _body, 170 body: _body,
168 queryParams: _queryParams, 171 queryParams: _queryParams,
169 uploadOptions: _uploadOptions, 172 uploadOptions: _uploadOptions,
170 uploadMedia: _uploadMedia, 173 uploadMedia: _uploadMedia,
171 downloadOptions: _downloadOptions); 174 downloadOptions: _downloadOptions);
172 return _response.then((data) => new App.fromJson(data)); 175 return _response.then((data) => new App.fromJson(data));
173 } 176 }
(...skipping 14 matching lines...) Expand all
188 * the given MIME types will be included in the response. If 191 * the given MIME types will be included in the response. If
189 * appFilterExtensions are provided as well, the result is a union of the two 192 * appFilterExtensions are provided as well, the result is a union of the two
190 * resulting app lists. 193 * resulting app lists.
191 * 194 *
192 * [languageCode] - A language or locale code, as defined by BCP 47, with some 195 * [languageCode] - A language or locale code, as defined by BCP 47, with some
193 * extensions from Unicode's LDML format 196 * extensions from Unicode's LDML format
194 * (http://www.unicode.org/reports/tr35/). 197 * (http://www.unicode.org/reports/tr35/).
195 * 198 *
196 * Completes with a [AppList]. 199 * Completes with a [AppList].
197 * 200 *
198 * Completes with a [common.ApiRequestError] if the API endpoint returned an 201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
199 * error. 202 * error.
200 * 203 *
201 * If the used [http.Client] completes with an error when making a REST call, 204 * If the used [http.Client] completes with an error when making a REST call,
202 * this method will complete with the same error. 205 * this method will complete with the same error.
203 */ 206 */
204 async.Future<AppList> list({core.String appFilterExtensions, core.String appFi lterMimeTypes, core.String languageCode}) { 207 async.Future<AppList> list({core.String appFilterExtensions, core.String appFi lterMimeTypes, core.String languageCode}) {
205 var _url = null; 208 var _url = null;
206 var _queryParams = new core.Map(); 209 var _queryParams = new core.Map();
207 var _uploadMedia = null; 210 var _uploadMedia = null;
208 var _uploadOptions = null; 211 var _uploadOptions = null;
209 var _downloadOptions = common.DownloadOptions.Metadata; 212 var _downloadOptions = commons.DownloadOptions.Metadata;
210 var _body = null; 213 var _body = null;
211 214
212 if (appFilterExtensions != null) { 215 if (appFilterExtensions != null) {
213 _queryParams["appFilterExtensions"] = [appFilterExtensions]; 216 _queryParams["appFilterExtensions"] = [appFilterExtensions];
214 } 217 }
215 if (appFilterMimeTypes != null) { 218 if (appFilterMimeTypes != null) {
216 _queryParams["appFilterMimeTypes"] = [appFilterMimeTypes]; 219 _queryParams["appFilterMimeTypes"] = [appFilterMimeTypes];
217 } 220 }
218 if (languageCode != null) { 221 if (languageCode != null) {
219 _queryParams["languageCode"] = [languageCode]; 222 _queryParams["languageCode"] = [languageCode];
220 } 223 }
221 224
222 225
223 _url = 'apps'; 226 _url = 'apps';
224 227
225 var _response = _requester.request(_url, 228 var _response = _requester.request(_url,
226 "GET", 229 "GET",
227 body: _body, 230 body: _body,
228 queryParams: _queryParams, 231 queryParams: _queryParams,
229 uploadOptions: _uploadOptions, 232 uploadOptions: _uploadOptions,
230 uploadMedia: _uploadMedia, 233 uploadMedia: _uploadMedia,
231 downloadOptions: _downloadOptions); 234 downloadOptions: _downloadOptions);
232 return _response.then((data) => new AppList.fromJson(data)); 235 return _response.then((data) => new AppList.fromJson(data));
233 } 236 }
234 237
235 } 238 }
236 239
237 240
238 /** Not documented yet. */
239 class ChangesResourceApi { 241 class ChangesResourceApi {
240 final common_internal.ApiRequester _requester; 242 final commons.ApiRequester _requester;
241 243
242 ChangesResourceApi(common_internal.ApiRequester client) : 244 ChangesResourceApi(commons.ApiRequester client) :
243 _requester = client; 245 _requester = client;
244 246
245 /** 247 /**
246 * Gets a specific change. 248 * Gets a specific change.
247 * 249 *
248 * Request parameters: 250 * Request parameters:
249 * 251 *
250 * [changeId] - The ID of the change. 252 * [changeId] - The ID of the change.
251 * 253 *
252 * Completes with a [Change]. 254 * Completes with a [Change].
253 * 255 *
254 * Completes with a [common.ApiRequestError] if the API endpoint returned an 256 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
255 * error. 257 * error.
256 * 258 *
257 * If the used [http.Client] completes with an error when making a REST call, 259 * If the used [http.Client] completes with an error when making a REST call,
258 * this method will complete with the same error. 260 * this method will complete with the same error.
259 */ 261 */
260 async.Future<Change> get(core.String changeId) { 262 async.Future<Change> get(core.String changeId) {
261 var _url = null; 263 var _url = null;
262 var _queryParams = new core.Map(); 264 var _queryParams = new core.Map();
263 var _uploadMedia = null; 265 var _uploadMedia = null;
264 var _uploadOptions = null; 266 var _uploadOptions = null;
265 var _downloadOptions = common.DownloadOptions.Metadata; 267 var _downloadOptions = commons.DownloadOptions.Metadata;
266 var _body = null; 268 var _body = null;
267 269
268 if (changeId == null) { 270 if (changeId == null) {
269 throw new core.ArgumentError("Parameter changeId is required."); 271 throw new core.ArgumentError("Parameter changeId is required.");
270 } 272 }
271 273
272 274
273 _url = 'changes/' + common_internal.Escaper.ecapeVariable('$changeId'); 275 _url = 'changes/' + commons.Escaper.ecapeVariable('$changeId');
274 276
275 var _response = _requester.request(_url, 277 var _response = _requester.request(_url,
276 "GET", 278 "GET",
277 body: _body, 279 body: _body,
278 queryParams: _queryParams, 280 queryParams: _queryParams,
279 uploadOptions: _uploadOptions, 281 uploadOptions: _uploadOptions,
280 uploadMedia: _uploadMedia, 282 uploadMedia: _uploadMedia,
281 downloadOptions: _downloadOptions); 283 downloadOptions: _downloadOptions);
282 return _response.then((data) => new Change.fromJson(data)); 284 return _response.then((data) => new Change.fromJson(data));
283 } 285 }
(...skipping 11 matching lines...) Expand all
295 * they own. 297 * they own.
296 * 298 *
297 * [maxResults] - Maximum number of changes to return. 299 * [maxResults] - Maximum number of changes to return.
298 * 300 *
299 * [pageToken] - Page token for changes. 301 * [pageToken] - Page token for changes.
300 * 302 *
301 * [startChangeId] - Change ID to start listing changes from. 303 * [startChangeId] - Change ID to start listing changes from.
302 * 304 *
303 * Completes with a [ChangeList]. 305 * Completes with a [ChangeList].
304 * 306 *
305 * Completes with a [common.ApiRequestError] if the API endpoint returned an 307 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
306 * error. 308 * error.
307 * 309 *
308 * If the used [http.Client] completes with an error when making a REST call, 310 * If the used [http.Client] completes with an error when making a REST call,
309 * this method will complete with the same error. 311 * this method will complete with the same error.
310 */ 312 */
311 async.Future<ChangeList> list({core.bool includeDeleted, core.bool includeSubs cribed, core.int maxResults, core.String pageToken, core.String startChangeId}) { 313 async.Future<ChangeList> list({core.bool includeDeleted, core.bool includeSubs cribed, core.int maxResults, core.String pageToken, core.String startChangeId}) {
312 var _url = null; 314 var _url = null;
313 var _queryParams = new core.Map(); 315 var _queryParams = new core.Map();
314 var _uploadMedia = null; 316 var _uploadMedia = null;
315 var _uploadOptions = null; 317 var _uploadOptions = null;
316 var _downloadOptions = common.DownloadOptions.Metadata; 318 var _downloadOptions = commons.DownloadOptions.Metadata;
317 var _body = null; 319 var _body = null;
318 320
319 if (includeDeleted != null) { 321 if (includeDeleted != null) {
320 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 322 _queryParams["includeDeleted"] = ["${includeDeleted}"];
321 } 323 }
322 if (includeSubscribed != null) { 324 if (includeSubscribed != null) {
323 _queryParams["includeSubscribed"] = ["${includeSubscribed}"]; 325 _queryParams["includeSubscribed"] = ["${includeSubscribed}"];
324 } 326 }
325 if (maxResults != null) { 327 if (maxResults != null) {
326 _queryParams["maxResults"] = ["${maxResults}"]; 328 _queryParams["maxResults"] = ["${maxResults}"];
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 * they own. 362 * they own.
361 * 363 *
362 * [maxResults] - Maximum number of changes to return. 364 * [maxResults] - Maximum number of changes to return.
363 * 365 *
364 * [pageToken] - Page token for changes. 366 * [pageToken] - Page token for changes.
365 * 367 *
366 * [startChangeId] - Change ID to start listing changes from. 368 * [startChangeId] - Change ID to start listing changes from.
367 * 369 *
368 * Completes with a [Channel]. 370 * Completes with a [Channel].
369 * 371 *
370 * Completes with a [common.ApiRequestError] if the API endpoint returned an 372 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
371 * error. 373 * error.
372 * 374 *
373 * If the used [http.Client] completes with an error when making a REST call, 375 * If the used [http.Client] completes with an error when making a REST call,
374 * this method will complete with the same error. 376 * this method will complete with the same error.
375 */ 377 */
376 async.Future<Channel> watch(Channel request, {core.bool includeDeleted, core.b ool includeSubscribed, core.int maxResults, core.String pageToken, core.String s tartChangeId}) { 378 async.Future<Channel> watch(Channel request, {core.bool includeDeleted, core.b ool includeSubscribed, core.int maxResults, core.String pageToken, core.String s tartChangeId}) {
377 var _url = null; 379 var _url = null;
378 var _queryParams = new core.Map(); 380 var _queryParams = new core.Map();
379 var _uploadMedia = null; 381 var _uploadMedia = null;
380 var _uploadOptions = null; 382 var _uploadOptions = null;
381 var _downloadOptions = common.DownloadOptions.Metadata; 383 var _downloadOptions = commons.DownloadOptions.Metadata;
382 var _body = null; 384 var _body = null;
383 385
384 if (request != null) { 386 if (request != null) {
385 _body = convert_1.JSON.encode((request).toJson()); 387 _body = convert_1.JSON.encode((request).toJson());
386 } 388 }
387 if (includeDeleted != null) { 389 if (includeDeleted != null) {
388 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 390 _queryParams["includeDeleted"] = ["${includeDeleted}"];
389 } 391 }
390 if (includeSubscribed != null) { 392 if (includeSubscribed != null) {
391 _queryParams["includeSubscribed"] = ["${includeSubscribed}"]; 393 _queryParams["includeSubscribed"] = ["${includeSubscribed}"];
(...skipping 17 matching lines...) Expand all
409 queryParams: _queryParams, 411 queryParams: _queryParams,
410 uploadOptions: _uploadOptions, 412 uploadOptions: _uploadOptions,
411 uploadMedia: _uploadMedia, 413 uploadMedia: _uploadMedia,
412 downloadOptions: _downloadOptions); 414 downloadOptions: _downloadOptions);
413 return _response.then((data) => new Channel.fromJson(data)); 415 return _response.then((data) => new Channel.fromJson(data));
414 } 416 }
415 417
416 } 418 }
417 419
418 420
419 /** Not documented yet. */
420 class ChannelsResourceApi { 421 class ChannelsResourceApi {
421 final common_internal.ApiRequester _requester; 422 final commons.ApiRequester _requester;
422 423
423 ChannelsResourceApi(common_internal.ApiRequester client) : 424 ChannelsResourceApi(commons.ApiRequester client) :
424 _requester = client; 425 _requester = client;
425 426
426 /** 427 /**
427 * Stop watching resources through this channel 428 * Stop watching resources through this channel
428 * 429 *
429 * [request] - The metadata request object. 430 * [request] - The metadata request object.
430 * 431 *
431 * Request parameters: 432 * Request parameters:
432 * 433 *
433 * Completes with a [common.ApiRequestError] if the API endpoint returned an 434 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
434 * error. 435 * error.
435 * 436 *
436 * If the used [http.Client] completes with an error when making a REST call, 437 * If the used [http.Client] completes with an error when making a REST call,
437 * this method will complete with the same error. 438 * this method will complete with the same error.
438 */ 439 */
439 async.Future stop(Channel request) { 440 async.Future stop(Channel request) {
440 var _url = null; 441 var _url = null;
441 var _queryParams = new core.Map(); 442 var _queryParams = new core.Map();
442 var _uploadMedia = null; 443 var _uploadMedia = null;
443 var _uploadOptions = null; 444 var _uploadOptions = null;
444 var _downloadOptions = common.DownloadOptions.Metadata; 445 var _downloadOptions = commons.DownloadOptions.Metadata;
445 var _body = null; 446 var _body = null;
446 447
447 if (request != null) { 448 if (request != null) {
448 _body = convert_1.JSON.encode((request).toJson()); 449 _body = convert_1.JSON.encode((request).toJson());
449 } 450 }
450 451
451 _downloadOptions = null; 452 _downloadOptions = null;
452 453
453 _url = 'channels/stop'; 454 _url = 'channels/stop';
454 455
455 var _response = _requester.request(_url, 456 var _response = _requester.request(_url,
456 "POST", 457 "POST",
457 body: _body, 458 body: _body,
458 queryParams: _queryParams, 459 queryParams: _queryParams,
459 uploadOptions: _uploadOptions, 460 uploadOptions: _uploadOptions,
460 uploadMedia: _uploadMedia, 461 uploadMedia: _uploadMedia,
461 downloadOptions: _downloadOptions); 462 downloadOptions: _downloadOptions);
462 return _response.then((data) => null); 463 return _response.then((data) => null);
463 } 464 }
464 465
465 } 466 }
466 467
467 468
468 /** Not documented yet. */
469 class ChildrenResourceApi { 469 class ChildrenResourceApi {
470 final common_internal.ApiRequester _requester; 470 final commons.ApiRequester _requester;
471 471
472 ChildrenResourceApi(common_internal.ApiRequester client) : 472 ChildrenResourceApi(commons.ApiRequester client) :
473 _requester = client; 473 _requester = client;
474 474
475 /** 475 /**
476 * Removes a child from a folder. 476 * Removes a child from a folder.
477 * 477 *
478 * Request parameters: 478 * Request parameters:
479 * 479 *
480 * [folderId] - The ID of the folder. 480 * [folderId] - The ID of the folder.
481 * 481 *
482 * [childId] - The ID of the child. 482 * [childId] - The ID of the child.
483 * 483 *
484 * Completes with a [common.ApiRequestError] if the API endpoint returned an 484 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
485 * error. 485 * error.
486 * 486 *
487 * If the used [http.Client] completes with an error when making a REST call, 487 * If the used [http.Client] completes with an error when making a REST call,
488 * this method will complete with the same error. 488 * this method will complete with the same error.
489 */ 489 */
490 async.Future delete(core.String folderId, core.String childId) { 490 async.Future delete(core.String folderId, core.String childId) {
491 var _url = null; 491 var _url = null;
492 var _queryParams = new core.Map(); 492 var _queryParams = new core.Map();
493 var _uploadMedia = null; 493 var _uploadMedia = null;
494 var _uploadOptions = null; 494 var _uploadOptions = null;
495 var _downloadOptions = common.DownloadOptions.Metadata; 495 var _downloadOptions = commons.DownloadOptions.Metadata;
496 var _body = null; 496 var _body = null;
497 497
498 if (folderId == null) { 498 if (folderId == null) {
499 throw new core.ArgumentError("Parameter folderId is required."); 499 throw new core.ArgumentError("Parameter folderId is required.");
500 } 500 }
501 if (childId == null) { 501 if (childId == null) {
502 throw new core.ArgumentError("Parameter childId is required."); 502 throw new core.ArgumentError("Parameter childId is required.");
503 } 503 }
504 504
505 _downloadOptions = null; 505 _downloadOptions = null;
506 506
507 _url = 'files/' + common_internal.Escaper.ecapeVariable('$folderId') + '/chi ldren/' + common_internal.Escaper.ecapeVariable('$childId'); 507 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children/' + commons.Escaper.ecapeVariable('$childId');
508 508
509 var _response = _requester.request(_url, 509 var _response = _requester.request(_url,
510 "DELETE", 510 "DELETE",
511 body: _body, 511 body: _body,
512 queryParams: _queryParams, 512 queryParams: _queryParams,
513 uploadOptions: _uploadOptions, 513 uploadOptions: _uploadOptions,
514 uploadMedia: _uploadMedia, 514 uploadMedia: _uploadMedia,
515 downloadOptions: _downloadOptions); 515 downloadOptions: _downloadOptions);
516 return _response.then((data) => null); 516 return _response.then((data) => null);
517 } 517 }
518 518
519 /** 519 /**
520 * Gets a specific child reference. 520 * Gets a specific child reference.
521 * 521 *
522 * Request parameters: 522 * Request parameters:
523 * 523 *
524 * [folderId] - The ID of the folder. 524 * [folderId] - The ID of the folder.
525 * 525 *
526 * [childId] - The ID of the child. 526 * [childId] - The ID of the child.
527 * 527 *
528 * Completes with a [ChildReference]. 528 * Completes with a [ChildReference].
529 * 529 *
530 * Completes with a [common.ApiRequestError] if the API endpoint returned an 530 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
531 * error. 531 * error.
532 * 532 *
533 * If the used [http.Client] completes with an error when making a REST call, 533 * If the used [http.Client] completes with an error when making a REST call,
534 * this method will complete with the same error. 534 * this method will complete with the same error.
535 */ 535 */
536 async.Future<ChildReference> get(core.String folderId, core.String childId) { 536 async.Future<ChildReference> get(core.String folderId, core.String childId) {
537 var _url = null; 537 var _url = null;
538 var _queryParams = new core.Map(); 538 var _queryParams = new core.Map();
539 var _uploadMedia = null; 539 var _uploadMedia = null;
540 var _uploadOptions = null; 540 var _uploadOptions = null;
541 var _downloadOptions = common.DownloadOptions.Metadata; 541 var _downloadOptions = commons.DownloadOptions.Metadata;
542 var _body = null; 542 var _body = null;
543 543
544 if (folderId == null) { 544 if (folderId == null) {
545 throw new core.ArgumentError("Parameter folderId is required."); 545 throw new core.ArgumentError("Parameter folderId is required.");
546 } 546 }
547 if (childId == null) { 547 if (childId == null) {
548 throw new core.ArgumentError("Parameter childId is required."); 548 throw new core.ArgumentError("Parameter childId is required.");
549 } 549 }
550 550
551 551
552 _url = 'files/' + common_internal.Escaper.ecapeVariable('$folderId') + '/chi ldren/' + common_internal.Escaper.ecapeVariable('$childId'); 552 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children/' + commons.Escaper.ecapeVariable('$childId');
553 553
554 var _response = _requester.request(_url, 554 var _response = _requester.request(_url,
555 "GET", 555 "GET",
556 body: _body, 556 body: _body,
557 queryParams: _queryParams, 557 queryParams: _queryParams,
558 uploadOptions: _uploadOptions, 558 uploadOptions: _uploadOptions,
559 uploadMedia: _uploadMedia, 559 uploadMedia: _uploadMedia,
560 downloadOptions: _downloadOptions); 560 downloadOptions: _downloadOptions);
561 return _response.then((data) => new ChildReference.fromJson(data)); 561 return _response.then((data) => new ChildReference.fromJson(data));
562 } 562 }
563 563
564 /** 564 /**
565 * Inserts a file into a folder. 565 * Inserts a file into a folder.
566 * 566 *
567 * [request] - The metadata request object. 567 * [request] - The metadata request object.
568 * 568 *
569 * Request parameters: 569 * Request parameters:
570 * 570 *
571 * [folderId] - The ID of the folder. 571 * [folderId] - The ID of the folder.
572 * 572 *
573 * Completes with a [ChildReference]. 573 * Completes with a [ChildReference].
574 * 574 *
575 * Completes with a [common.ApiRequestError] if the API endpoint returned an 575 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
576 * error. 576 * error.
577 * 577 *
578 * If the used [http.Client] completes with an error when making a REST call, 578 * If the used [http.Client] completes with an error when making a REST call,
579 * this method will complete with the same error. 579 * this method will complete with the same error.
580 */ 580 */
581 async.Future<ChildReference> insert(ChildReference request, core.String folder Id) { 581 async.Future<ChildReference> insert(ChildReference request, core.String folder Id) {
582 var _url = null; 582 var _url = null;
583 var _queryParams = new core.Map(); 583 var _queryParams = new core.Map();
584 var _uploadMedia = null; 584 var _uploadMedia = null;
585 var _uploadOptions = null; 585 var _uploadOptions = null;
586 var _downloadOptions = common.DownloadOptions.Metadata; 586 var _downloadOptions = commons.DownloadOptions.Metadata;
587 var _body = null; 587 var _body = null;
588 588
589 if (request != null) { 589 if (request != null) {
590 _body = convert_1.JSON.encode((request).toJson()); 590 _body = convert_1.JSON.encode((request).toJson());
591 } 591 }
592 if (folderId == null) { 592 if (folderId == null) {
593 throw new core.ArgumentError("Parameter folderId is required."); 593 throw new core.ArgumentError("Parameter folderId is required.");
594 } 594 }
595 595
596 596
597 _url = 'files/' + common_internal.Escaper.ecapeVariable('$folderId') + '/chi ldren'; 597 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children';
598 598
599 var _response = _requester.request(_url, 599 var _response = _requester.request(_url,
600 "POST", 600 "POST",
601 body: _body, 601 body: _body,
602 queryParams: _queryParams, 602 queryParams: _queryParams,
603 uploadOptions: _uploadOptions, 603 uploadOptions: _uploadOptions,
604 uploadMedia: _uploadMedia, 604 uploadMedia: _uploadMedia,
605 downloadOptions: _downloadOptions); 605 downloadOptions: _downloadOptions);
606 return _response.then((data) => new ChildReference.fromJson(data)); 606 return _response.then((data) => new ChildReference.fromJson(data));
607 } 607 }
608 608
609 /** 609 /**
610 * Lists a folder's children. 610 * Lists a folder's children.
611 * 611 *
612 * Request parameters: 612 * Request parameters:
613 * 613 *
614 * [folderId] - The ID of the folder. 614 * [folderId] - The ID of the folder.
615 * 615 *
616 * [maxResults] - Maximum number of children to return. 616 * [maxResults] - Maximum number of children to return.
617 * 617 *
618 * [pageToken] - Page token for children. 618 * [pageToken] - Page token for children.
619 * 619 *
620 * [q] - Query string for searching children. 620 * [q] - Query string for searching children.
621 * 621 *
622 * Completes with a [ChildList]. 622 * Completes with a [ChildList].
623 * 623 *
624 * Completes with a [common.ApiRequestError] if the API endpoint returned an 624 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
625 * error. 625 * error.
626 * 626 *
627 * If the used [http.Client] completes with an error when making a REST call, 627 * If the used [http.Client] completes with an error when making a REST call,
628 * this method will complete with the same error. 628 * this method will complete with the same error.
629 */ 629 */
630 async.Future<ChildList> list(core.String folderId, {core.int maxResults, core. String pageToken, core.String q}) { 630 async.Future<ChildList> list(core.String folderId, {core.int maxResults, core. String pageToken, core.String q}) {
631 var _url = null; 631 var _url = null;
632 var _queryParams = new core.Map(); 632 var _queryParams = new core.Map();
633 var _uploadMedia = null; 633 var _uploadMedia = null;
634 var _uploadOptions = null; 634 var _uploadOptions = null;
635 var _downloadOptions = common.DownloadOptions.Metadata; 635 var _downloadOptions = commons.DownloadOptions.Metadata;
636 var _body = null; 636 var _body = null;
637 637
638 if (folderId == null) { 638 if (folderId == null) {
639 throw new core.ArgumentError("Parameter folderId is required."); 639 throw new core.ArgumentError("Parameter folderId is required.");
640 } 640 }
641 if (maxResults != null) { 641 if (maxResults != null) {
642 _queryParams["maxResults"] = ["${maxResults}"]; 642 _queryParams["maxResults"] = ["${maxResults}"];
643 } 643 }
644 if (pageToken != null) { 644 if (pageToken != null) {
645 _queryParams["pageToken"] = [pageToken]; 645 _queryParams["pageToken"] = [pageToken];
646 } 646 }
647 if (q != null) { 647 if (q != null) {
648 _queryParams["q"] = [q]; 648 _queryParams["q"] = [q];
649 } 649 }
650 650
651 651
652 _url = 'files/' + common_internal.Escaper.ecapeVariable('$folderId') + '/chi ldren'; 652 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children';
653 653
654 var _response = _requester.request(_url, 654 var _response = _requester.request(_url,
655 "GET", 655 "GET",
656 body: _body, 656 body: _body,
657 queryParams: _queryParams, 657 queryParams: _queryParams,
658 uploadOptions: _uploadOptions, 658 uploadOptions: _uploadOptions,
659 uploadMedia: _uploadMedia, 659 uploadMedia: _uploadMedia,
660 downloadOptions: _downloadOptions); 660 downloadOptions: _downloadOptions);
661 return _response.then((data) => new ChildList.fromJson(data)); 661 return _response.then((data) => new ChildList.fromJson(data));
662 } 662 }
663 663
664 } 664 }
665 665
666 666
667 /** Not documented yet. */
668 class CommentsResourceApi { 667 class CommentsResourceApi {
669 final common_internal.ApiRequester _requester; 668 final commons.ApiRequester _requester;
670 669
671 CommentsResourceApi(common_internal.ApiRequester client) : 670 CommentsResourceApi(commons.ApiRequester client) :
672 _requester = client; 671 _requester = client;
673 672
674 /** 673 /**
675 * Deletes a comment. 674 * Deletes a comment.
676 * 675 *
677 * Request parameters: 676 * Request parameters:
678 * 677 *
679 * [fileId] - The ID of the file. 678 * [fileId] - The ID of the file.
680 * 679 *
681 * [commentId] - The ID of the comment. 680 * [commentId] - The ID of the comment.
682 * 681 *
683 * Completes with a [common.ApiRequestError] if the API endpoint returned an 682 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
684 * error. 683 * error.
685 * 684 *
686 * If the used [http.Client] completes with an error when making a REST call, 685 * If the used [http.Client] completes with an error when making a REST call,
687 * this method will complete with the same error. 686 * this method will complete with the same error.
688 */ 687 */
689 async.Future delete(core.String fileId, core.String commentId) { 688 async.Future delete(core.String fileId, core.String commentId) {
690 var _url = null; 689 var _url = null;
691 var _queryParams = new core.Map(); 690 var _queryParams = new core.Map();
692 var _uploadMedia = null; 691 var _uploadMedia = null;
693 var _uploadOptions = null; 692 var _uploadOptions = null;
694 var _downloadOptions = common.DownloadOptions.Metadata; 693 var _downloadOptions = commons.DownloadOptions.Metadata;
695 var _body = null; 694 var _body = null;
696 695
697 if (fileId == null) { 696 if (fileId == null) {
698 throw new core.ArgumentError("Parameter fileId is required."); 697 throw new core.ArgumentError("Parameter fileId is required.");
699 } 698 }
700 if (commentId == null) { 699 if (commentId == null) {
701 throw new core.ArgumentError("Parameter commentId is required."); 700 throw new core.ArgumentError("Parameter commentId is required.");
702 } 701 }
703 702
704 _downloadOptions = null; 703 _downloadOptions = null;
705 704
706 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId'); 705 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId');
707 706
708 var _response = _requester.request(_url, 707 var _response = _requester.request(_url,
709 "DELETE", 708 "DELETE",
710 body: _body, 709 body: _body,
711 queryParams: _queryParams, 710 queryParams: _queryParams,
712 uploadOptions: _uploadOptions, 711 uploadOptions: _uploadOptions,
713 uploadMedia: _uploadMedia, 712 uploadMedia: _uploadMedia,
714 downloadOptions: _downloadOptions); 713 downloadOptions: _downloadOptions);
715 return _response.then((data) => null); 714 return _response.then((data) => null);
716 } 715 }
717 716
718 /** 717 /**
719 * Gets a comment by ID. 718 * Gets a comment by ID.
720 * 719 *
721 * Request parameters: 720 * Request parameters:
722 * 721 *
723 * [fileId] - The ID of the file. 722 * [fileId] - The ID of the file.
724 * 723 *
725 * [commentId] - The ID of the comment. 724 * [commentId] - The ID of the comment.
726 * 725 *
727 * [includeDeleted] - If set, this will succeed when retrieving a deleted 726 * [includeDeleted] - If set, this will succeed when retrieving a deleted
728 * comment, and will include any deleted replies. 727 * comment, and will include any deleted replies.
729 * 728 *
730 * Completes with a [Comment]. 729 * Completes with a [Comment].
731 * 730 *
732 * Completes with a [common.ApiRequestError] if the API endpoint returned an 731 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
733 * error. 732 * error.
734 * 733 *
735 * If the used [http.Client] completes with an error when making a REST call, 734 * If the used [http.Client] completes with an error when making a REST call,
736 * this method will complete with the same error. 735 * this method will complete with the same error.
737 */ 736 */
738 async.Future<Comment> get(core.String fileId, core.String commentId, {core.boo l includeDeleted}) { 737 async.Future<Comment> get(core.String fileId, core.String commentId, {core.boo l includeDeleted}) {
739 var _url = null; 738 var _url = null;
740 var _queryParams = new core.Map(); 739 var _queryParams = new core.Map();
741 var _uploadMedia = null; 740 var _uploadMedia = null;
742 var _uploadOptions = null; 741 var _uploadOptions = null;
743 var _downloadOptions = common.DownloadOptions.Metadata; 742 var _downloadOptions = commons.DownloadOptions.Metadata;
744 var _body = null; 743 var _body = null;
745 744
746 if (fileId == null) { 745 if (fileId == null) {
747 throw new core.ArgumentError("Parameter fileId is required."); 746 throw new core.ArgumentError("Parameter fileId is required.");
748 } 747 }
749 if (commentId == null) { 748 if (commentId == null) {
750 throw new core.ArgumentError("Parameter commentId is required."); 749 throw new core.ArgumentError("Parameter commentId is required.");
751 } 750 }
752 if (includeDeleted != null) { 751 if (includeDeleted != null) {
753 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 752 _queryParams["includeDeleted"] = ["${includeDeleted}"];
754 } 753 }
755 754
756 755
757 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId'); 756 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId');
758 757
759 var _response = _requester.request(_url, 758 var _response = _requester.request(_url,
760 "GET", 759 "GET",
761 body: _body, 760 body: _body,
762 queryParams: _queryParams, 761 queryParams: _queryParams,
763 uploadOptions: _uploadOptions, 762 uploadOptions: _uploadOptions,
764 uploadMedia: _uploadMedia, 763 uploadMedia: _uploadMedia,
765 downloadOptions: _downloadOptions); 764 downloadOptions: _downloadOptions);
766 return _response.then((data) => new Comment.fromJson(data)); 765 return _response.then((data) => new Comment.fromJson(data));
767 } 766 }
768 767
769 /** 768 /**
770 * Creates a new comment on the given file. 769 * Creates a new comment on the given file.
771 * 770 *
772 * [request] - The metadata request object. 771 * [request] - The metadata request object.
773 * 772 *
774 * Request parameters: 773 * Request parameters:
775 * 774 *
776 * [fileId] - The ID of the file. 775 * [fileId] - The ID of the file.
777 * 776 *
778 * Completes with a [Comment]. 777 * Completes with a [Comment].
779 * 778 *
780 * Completes with a [common.ApiRequestError] if the API endpoint returned an 779 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
781 * error. 780 * error.
782 * 781 *
783 * If the used [http.Client] completes with an error when making a REST call, 782 * If the used [http.Client] completes with an error when making a REST call,
784 * this method will complete with the same error. 783 * this method will complete with the same error.
785 */ 784 */
786 async.Future<Comment> insert(Comment request, core.String fileId) { 785 async.Future<Comment> insert(Comment request, core.String fileId) {
787 var _url = null; 786 var _url = null;
788 var _queryParams = new core.Map(); 787 var _queryParams = new core.Map();
789 var _uploadMedia = null; 788 var _uploadMedia = null;
790 var _uploadOptions = null; 789 var _uploadOptions = null;
791 var _downloadOptions = common.DownloadOptions.Metadata; 790 var _downloadOptions = commons.DownloadOptions.Metadata;
792 var _body = null; 791 var _body = null;
793 792
794 if (request != null) { 793 if (request != null) {
795 _body = convert_1.JSON.encode((request).toJson()); 794 _body = convert_1.JSON.encode((request).toJson());
796 } 795 }
797 if (fileId == null) { 796 if (fileId == null) {
798 throw new core.ArgumentError("Parameter fileId is required."); 797 throw new core.ArgumentError("Parameter fileId is required.");
799 } 798 }
800 799
801 800
802 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts'; 801 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments';
803 802
804 var _response = _requester.request(_url, 803 var _response = _requester.request(_url,
805 "POST", 804 "POST",
806 body: _body, 805 body: _body,
807 queryParams: _queryParams, 806 queryParams: _queryParams,
808 uploadOptions: _uploadOptions, 807 uploadOptions: _uploadOptions,
809 uploadMedia: _uploadMedia, 808 uploadMedia: _uploadMedia,
810 downloadOptions: _downloadOptions); 809 downloadOptions: _downloadOptions);
811 return _response.then((data) => new Comment.fromJson(data)); 810 return _response.then((data) => new Comment.fromJson(data));
812 } 811 }
(...skipping 14 matching lines...) Expand all
827 * 826 *
828 * [pageToken] - The continuation token, used to page through large result 827 * [pageToken] - The continuation token, used to page through large result
829 * sets. To get the next page of results, set this parameter to the value of 828 * sets. To get the next page of results, set this parameter to the value of
830 * "nextPageToken" from the previous response. 829 * "nextPageToken" from the previous response.
831 * 830 *
832 * [updatedMin] - Only discussions that were updated after this timestamp will 831 * [updatedMin] - Only discussions that were updated after this timestamp will
833 * be returned. Formatted as an RFC 3339 timestamp. 832 * be returned. Formatted as an RFC 3339 timestamp.
834 * 833 *
835 * Completes with a [CommentList]. 834 * Completes with a [CommentList].
836 * 835 *
837 * Completes with a [common.ApiRequestError] if the API endpoint returned an 836 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
838 * error. 837 * error.
839 * 838 *
840 * If the used [http.Client] completes with an error when making a REST call, 839 * If the used [http.Client] completes with an error when making a REST call,
841 * this method will complete with the same error. 840 * this method will complete with the same error.
842 */ 841 */
843 async.Future<CommentList> list(core.String fileId, {core.bool includeDeleted, core.int maxResults, core.String pageToken, core.String updatedMin}) { 842 async.Future<CommentList> list(core.String fileId, {core.bool includeDeleted, core.int maxResults, core.String pageToken, core.String updatedMin}) {
844 var _url = null; 843 var _url = null;
845 var _queryParams = new core.Map(); 844 var _queryParams = new core.Map();
846 var _uploadMedia = null; 845 var _uploadMedia = null;
847 var _uploadOptions = null; 846 var _uploadOptions = null;
848 var _downloadOptions = common.DownloadOptions.Metadata; 847 var _downloadOptions = commons.DownloadOptions.Metadata;
849 var _body = null; 848 var _body = null;
850 849
851 if (fileId == null) { 850 if (fileId == null) {
852 throw new core.ArgumentError("Parameter fileId is required."); 851 throw new core.ArgumentError("Parameter fileId is required.");
853 } 852 }
854 if (includeDeleted != null) { 853 if (includeDeleted != null) {
855 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 854 _queryParams["includeDeleted"] = ["${includeDeleted}"];
856 } 855 }
857 if (maxResults != null) { 856 if (maxResults != null) {
858 _queryParams["maxResults"] = ["${maxResults}"]; 857 _queryParams["maxResults"] = ["${maxResults}"];
859 } 858 }
860 if (pageToken != null) { 859 if (pageToken != null) {
861 _queryParams["pageToken"] = [pageToken]; 860 _queryParams["pageToken"] = [pageToken];
862 } 861 }
863 if (updatedMin != null) { 862 if (updatedMin != null) {
864 _queryParams["updatedMin"] = [updatedMin]; 863 _queryParams["updatedMin"] = [updatedMin];
865 } 864 }
866 865
867 866
868 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts'; 867 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments';
869 868
870 var _response = _requester.request(_url, 869 var _response = _requester.request(_url,
871 "GET", 870 "GET",
872 body: _body, 871 body: _body,
873 queryParams: _queryParams, 872 queryParams: _queryParams,
874 uploadOptions: _uploadOptions, 873 uploadOptions: _uploadOptions,
875 uploadMedia: _uploadMedia, 874 uploadMedia: _uploadMedia,
876 downloadOptions: _downloadOptions); 875 downloadOptions: _downloadOptions);
877 return _response.then((data) => new CommentList.fromJson(data)); 876 return _response.then((data) => new CommentList.fromJson(data));
878 } 877 }
879 878
880 /** 879 /**
881 * Updates an existing comment. This method supports patch semantics. 880 * Updates an existing comment. This method supports patch semantics.
882 * 881 *
883 * [request] - The metadata request object. 882 * [request] - The metadata request object.
884 * 883 *
885 * Request parameters: 884 * Request parameters:
886 * 885 *
887 * [fileId] - The ID of the file. 886 * [fileId] - The ID of the file.
888 * 887 *
889 * [commentId] - The ID of the comment. 888 * [commentId] - The ID of the comment.
890 * 889 *
891 * Completes with a [Comment]. 890 * Completes with a [Comment].
892 * 891 *
893 * Completes with a [common.ApiRequestError] if the API endpoint returned an 892 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
894 * error. 893 * error.
895 * 894 *
896 * If the used [http.Client] completes with an error when making a REST call, 895 * If the used [http.Client] completes with an error when making a REST call,
897 * this method will complete with the same error. 896 * this method will complete with the same error.
898 */ 897 */
899 async.Future<Comment> patch(Comment request, core.String fileId, core.String c ommentId) { 898 async.Future<Comment> patch(Comment request, core.String fileId, core.String c ommentId) {
900 var _url = null; 899 var _url = null;
901 var _queryParams = new core.Map(); 900 var _queryParams = new core.Map();
902 var _uploadMedia = null; 901 var _uploadMedia = null;
903 var _uploadOptions = null; 902 var _uploadOptions = null;
904 var _downloadOptions = common.DownloadOptions.Metadata; 903 var _downloadOptions = commons.DownloadOptions.Metadata;
905 var _body = null; 904 var _body = null;
906 905
907 if (request != null) { 906 if (request != null) {
908 _body = convert_1.JSON.encode((request).toJson()); 907 _body = convert_1.JSON.encode((request).toJson());
909 } 908 }
910 if (fileId == null) { 909 if (fileId == null) {
911 throw new core.ArgumentError("Parameter fileId is required."); 910 throw new core.ArgumentError("Parameter fileId is required.");
912 } 911 }
913 if (commentId == null) { 912 if (commentId == null) {
914 throw new core.ArgumentError("Parameter commentId is required."); 913 throw new core.ArgumentError("Parameter commentId is required.");
915 } 914 }
916 915
917 916
918 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId'); 917 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId');
919 918
920 var _response = _requester.request(_url, 919 var _response = _requester.request(_url,
921 "PATCH", 920 "PATCH",
922 body: _body, 921 body: _body,
923 queryParams: _queryParams, 922 queryParams: _queryParams,
924 uploadOptions: _uploadOptions, 923 uploadOptions: _uploadOptions,
925 uploadMedia: _uploadMedia, 924 uploadMedia: _uploadMedia,
926 downloadOptions: _downloadOptions); 925 downloadOptions: _downloadOptions);
927 return _response.then((data) => new Comment.fromJson(data)); 926 return _response.then((data) => new Comment.fromJson(data));
928 } 927 }
929 928
930 /** 929 /**
931 * Updates an existing comment. 930 * Updates an existing comment.
932 * 931 *
933 * [request] - The metadata request object. 932 * [request] - The metadata request object.
934 * 933 *
935 * Request parameters: 934 * Request parameters:
936 * 935 *
937 * [fileId] - The ID of the file. 936 * [fileId] - The ID of the file.
938 * 937 *
939 * [commentId] - The ID of the comment. 938 * [commentId] - The ID of the comment.
940 * 939 *
941 * Completes with a [Comment]. 940 * Completes with a [Comment].
942 * 941 *
943 * Completes with a [common.ApiRequestError] if the API endpoint returned an 942 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
944 * error. 943 * error.
945 * 944 *
946 * If the used [http.Client] completes with an error when making a REST call, 945 * If the used [http.Client] completes with an error when making a REST call,
947 * this method will complete with the same error. 946 * this method will complete with the same error.
948 */ 947 */
949 async.Future<Comment> update(Comment request, core.String fileId, core.String commentId) { 948 async.Future<Comment> update(Comment request, core.String fileId, core.String commentId) {
950 var _url = null; 949 var _url = null;
951 var _queryParams = new core.Map(); 950 var _queryParams = new core.Map();
952 var _uploadMedia = null; 951 var _uploadMedia = null;
953 var _uploadOptions = null; 952 var _uploadOptions = null;
954 var _downloadOptions = common.DownloadOptions.Metadata; 953 var _downloadOptions = commons.DownloadOptions.Metadata;
955 var _body = null; 954 var _body = null;
956 955
957 if (request != null) { 956 if (request != null) {
958 _body = convert_1.JSON.encode((request).toJson()); 957 _body = convert_1.JSON.encode((request).toJson());
959 } 958 }
960 if (fileId == null) { 959 if (fileId == null) {
961 throw new core.ArgumentError("Parameter fileId is required."); 960 throw new core.ArgumentError("Parameter fileId is required.");
962 } 961 }
963 if (commentId == null) { 962 if (commentId == null) {
964 throw new core.ArgumentError("Parameter commentId is required."); 963 throw new core.ArgumentError("Parameter commentId is required.");
965 } 964 }
966 965
967 966
968 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId'); 967 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId');
969 968
970 var _response = _requester.request(_url, 969 var _response = _requester.request(_url,
971 "PUT", 970 "PUT",
972 body: _body, 971 body: _body,
973 queryParams: _queryParams, 972 queryParams: _queryParams,
974 uploadOptions: _uploadOptions, 973 uploadOptions: _uploadOptions,
975 uploadMedia: _uploadMedia, 974 uploadMedia: _uploadMedia,
976 downloadOptions: _downloadOptions); 975 downloadOptions: _downloadOptions);
977 return _response.then((data) => new Comment.fromJson(data)); 976 return _response.then((data) => new Comment.fromJson(data));
978 } 977 }
979 978
980 } 979 }
981 980
982 981
983 /** Not documented yet. */
984 class FilesResourceApi { 982 class FilesResourceApi {
985 final common_internal.ApiRequester _requester; 983 final commons.ApiRequester _requester;
986 984
987 FilesResourceApi(common_internal.ApiRequester client) : 985 FilesResourceApi(commons.ApiRequester client) :
988 _requester = client; 986 _requester = client;
989 987
990 /** 988 /**
991 * Creates a copy of the specified file. 989 * Creates a copy of the specified file.
992 * 990 *
993 * [request] - The metadata request object. 991 * [request] - The metadata request object.
994 * 992 *
995 * Request parameters: 993 * Request parameters:
996 * 994 *
997 * [fileId] - The ID of the file to copy. 995 * [fileId] - The ID of the file to copy.
(...skipping 15 matching lines...) Expand all
1013 * 1011 *
1014 * [visibility] - The visibility of the new file. This parameter is only 1012 * [visibility] - The visibility of the new file. This parameter is only
1015 * relevant when the source is not a native Google Doc and convert=false. 1013 * relevant when the source is not a native Google Doc and convert=false.
1016 * Possible string values are: 1014 * Possible string values are:
1017 * - "DEFAULT" : The visibility of the new file is determined by the user's 1015 * - "DEFAULT" : The visibility of the new file is determined by the user's
1018 * default visibility/sharing policies. 1016 * default visibility/sharing policies.
1019 * - "PRIVATE" : The new file will be visible to only the owner. 1017 * - "PRIVATE" : The new file will be visible to only the owner.
1020 * 1018 *
1021 * Completes with a [File]. 1019 * Completes with a [File].
1022 * 1020 *
1023 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1021 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1024 * error. 1022 * error.
1025 * 1023 *
1026 * If the used [http.Client] completes with an error when making a REST call, 1024 * If the used [http.Client] completes with an error when making a REST call,
1027 * this method will complete with the same error. 1025 * this method will complete with the same error.
1028 */ 1026 */
1029 async.Future<File> copy(File request, core.String fileId, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String timedTextL anguage, core.String timedTextTrackName, core.String visibility}) { 1027 async.Future<File> copy(File request, core.String fileId, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String timedTextL anguage, core.String timedTextTrackName, core.String visibility}) {
1030 var _url = null; 1028 var _url = null;
1031 var _queryParams = new core.Map(); 1029 var _queryParams = new core.Map();
1032 var _uploadMedia = null; 1030 var _uploadMedia = null;
1033 var _uploadOptions = null; 1031 var _uploadOptions = null;
1034 var _downloadOptions = common.DownloadOptions.Metadata; 1032 var _downloadOptions = commons.DownloadOptions.Metadata;
1035 var _body = null; 1033 var _body = null;
1036 1034
1037 if (request != null) { 1035 if (request != null) {
1038 _body = convert_1.JSON.encode((request).toJson()); 1036 _body = convert_1.JSON.encode((request).toJson());
1039 } 1037 }
1040 if (fileId == null) { 1038 if (fileId == null) {
1041 throw new core.ArgumentError("Parameter fileId is required."); 1039 throw new core.ArgumentError("Parameter fileId is required.");
1042 } 1040 }
1043 if (convert != null) { 1041 if (convert != null) {
1044 _queryParams["convert"] = ["${convert}"]; 1042 _queryParams["convert"] = ["${convert}"];
(...skipping 11 matching lines...) Expand all
1056 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 1054 _queryParams["timedTextLanguage"] = [timedTextLanguage];
1057 } 1055 }
1058 if (timedTextTrackName != null) { 1056 if (timedTextTrackName != null) {
1059 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1057 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1060 } 1058 }
1061 if (visibility != null) { 1059 if (visibility != null) {
1062 _queryParams["visibility"] = [visibility]; 1060 _queryParams["visibility"] = [visibility];
1063 } 1061 }
1064 1062
1065 1063
1066 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/copy' ; 1064 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/copy';
1067 1065
1068 var _response = _requester.request(_url, 1066 var _response = _requester.request(_url,
1069 "POST", 1067 "POST",
1070 body: _body, 1068 body: _body,
1071 queryParams: _queryParams, 1069 queryParams: _queryParams,
1072 uploadOptions: _uploadOptions, 1070 uploadOptions: _uploadOptions,
1073 uploadMedia: _uploadMedia, 1071 uploadMedia: _uploadMedia,
1074 downloadOptions: _downloadOptions); 1072 downloadOptions: _downloadOptions);
1075 return _response.then((data) => new File.fromJson(data)); 1073 return _response.then((data) => new File.fromJson(data));
1076 } 1074 }
1077 1075
1078 /** 1076 /**
1079 * Permanently deletes a file by ID. Skips the trash. 1077 * Permanently deletes a file by ID. Skips the trash. The currently
1078 * authenticated user must own the file.
1080 * 1079 *
1081 * Request parameters: 1080 * Request parameters:
1082 * 1081 *
1083 * [fileId] - The ID of the file to delete. 1082 * [fileId] - The ID of the file to delete.
1084 * 1083 *
1085 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1084 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1086 * error. 1085 * error.
1087 * 1086 *
1088 * If the used [http.Client] completes with an error when making a REST call, 1087 * If the used [http.Client] completes with an error when making a REST call,
1089 * this method will complete with the same error. 1088 * this method will complete with the same error.
1090 */ 1089 */
1091 async.Future delete(core.String fileId) { 1090 async.Future delete(core.String fileId) {
1092 var _url = null; 1091 var _url = null;
1093 var _queryParams = new core.Map(); 1092 var _queryParams = new core.Map();
1094 var _uploadMedia = null; 1093 var _uploadMedia = null;
1095 var _uploadOptions = null; 1094 var _uploadOptions = null;
1096 var _downloadOptions = common.DownloadOptions.Metadata; 1095 var _downloadOptions = commons.DownloadOptions.Metadata;
1097 var _body = null; 1096 var _body = null;
1098 1097
1099 if (fileId == null) { 1098 if (fileId == null) {
1100 throw new core.ArgumentError("Parameter fileId is required."); 1099 throw new core.ArgumentError("Parameter fileId is required.");
1101 } 1100 }
1102 1101
1103 _downloadOptions = null; 1102 _downloadOptions = null;
1104 1103
1105 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId'); 1104 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1106 1105
1107 var _response = _requester.request(_url, 1106 var _response = _requester.request(_url,
1108 "DELETE", 1107 "DELETE",
1109 body: _body, 1108 body: _body,
1110 queryParams: _queryParams, 1109 queryParams: _queryParams,
1111 uploadOptions: _uploadOptions, 1110 uploadOptions: _uploadOptions,
1112 uploadMedia: _uploadMedia, 1111 uploadMedia: _uploadMedia,
1113 downloadOptions: _downloadOptions); 1112 downloadOptions: _downloadOptions);
1114 return _response.then((data) => null); 1113 return _response.then((data) => null);
1115 } 1114 }
1116 1115
1117 /** 1116 /**
1118 * Permanently deletes all of the user's trashed files. 1117 * Permanently deletes all of the user's trashed files.
1119 * 1118 *
1120 * Request parameters: 1119 * Request parameters:
1121 * 1120 *
1122 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1121 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1123 * error. 1122 * error.
1124 * 1123 *
1125 * If the used [http.Client] completes with an error when making a REST call, 1124 * If the used [http.Client] completes with an error when making a REST call,
1126 * this method will complete with the same error. 1125 * this method will complete with the same error.
1127 */ 1126 */
1128 async.Future emptyTrash() { 1127 async.Future emptyTrash() {
1129 var _url = null; 1128 var _url = null;
1130 var _queryParams = new core.Map(); 1129 var _queryParams = new core.Map();
1131 var _uploadMedia = null; 1130 var _uploadMedia = null;
1132 var _uploadOptions = null; 1131 var _uploadOptions = null;
1133 var _downloadOptions = common.DownloadOptions.Metadata; 1132 var _downloadOptions = commons.DownloadOptions.Metadata;
1134 var _body = null; 1133 var _body = null;
1135 1134
1136 1135
1137 _downloadOptions = null; 1136 _downloadOptions = null;
1138 1137
1139 _url = 'files/trash'; 1138 _url = 'files/trash';
1140 1139
1141 var _response = _requester.request(_url, 1140 var _response = _requester.request(_url,
1142 "DELETE", 1141 "DELETE",
1143 body: _body, 1142 body: _body,
1144 queryParams: _queryParams, 1143 queryParams: _queryParams,
1145 uploadOptions: _uploadOptions, 1144 uploadOptions: _uploadOptions,
1146 uploadMedia: _uploadMedia, 1145 uploadMedia: _uploadMedia,
1147 downloadOptions: _downloadOptions); 1146 downloadOptions: _downloadOptions);
1148 return _response.then((data) => null); 1147 return _response.then((data) => null);
1149 } 1148 }
1150 1149
1151 /** 1150 /**
1152 * Gets a file's metadata by ID. 1151 * Gets a file's metadata by ID.
1153 * 1152 *
1154 * Request parameters: 1153 * Request parameters:
1155 * 1154 *
1156 * [fileId] - The ID for the file in question. 1155 * [fileId] - The ID for the file in question.
1157 * 1156 *
1158 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of 1157 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of
1159 * downloading known malware or other abusive files. 1158 * downloading known malware or other abusive files. Ignored unless alt=media
1159 * is specified.
1160 * 1160 *
1161 * [projection] - This parameter is deprecated and has no function. 1161 * [projection] - This parameter is deprecated and has no function.
1162 * Possible string values are: 1162 * Possible string values are:
1163 * - "BASIC" : Deprecated 1163 * - "BASIC" : Deprecated
1164 * - "FULL" : Deprecated 1164 * - "FULL" : Deprecated
1165 * 1165 *
1166 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored
1167 * unless alt=media is specified.
1168 *
1166 * [updateViewedDate] - Whether to update the view date after successfully 1169 * [updateViewedDate] - Whether to update the view date after successfully
1167 * retrieving the file. 1170 * retrieving the file.
1168 * 1171 *
1169 * [downloadOptions] - Options for downloading. A download can be either a 1172 * [downloadOptions] - Options for downloading. A download can be either a
1170 * Metadata (default) or Media download. Partial Media downloads are possible 1173 * Metadata (default) or Media download. Partial Media downloads are possible
1171 * as well. 1174 * as well.
1172 * 1175 *
1173 * Completes with a 1176 * Completes with a
1174 * 1177 *
1175 * - [File] for Metadata downloads (see [downloadOptions]). 1178 * - [File] for Metadata downloads (see [downloadOptions]).
1176 * 1179 *
1177 * - [common.Media] for Media downloads (see [downloadOptions]). 1180 * - [commons.Media] for Media downloads (see [downloadOptions]).
1178 * 1181 *
1179 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1182 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1180 * error. 1183 * error.
1181 * 1184 *
1182 * If the used [http.Client] completes with an error when making a REST call, 1185 * If the used [http.Client] completes with an error when making a REST call,
1183 * this method will complete with the same error. 1186 * this method will complete with the same error.
1184 */ 1187 */
1185 async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.bool updateViewedDate, common.DownloadOptions downloadOptions: common.DownloadOptions.Metadata}) { 1188 async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool updateViewedDate, commons.Download Options downloadOptions: commons.DownloadOptions.Metadata}) {
1186 var _url = null; 1189 var _url = null;
1187 var _queryParams = new core.Map(); 1190 var _queryParams = new core.Map();
1188 var _uploadMedia = null; 1191 var _uploadMedia = null;
1189 var _uploadOptions = null; 1192 var _uploadOptions = null;
1190 var _downloadOptions = common.DownloadOptions.Metadata; 1193 var _downloadOptions = commons.DownloadOptions.Metadata;
1191 var _body = null; 1194 var _body = null;
1192 1195
1193 if (fileId == null) { 1196 if (fileId == null) {
1194 throw new core.ArgumentError("Parameter fileId is required."); 1197 throw new core.ArgumentError("Parameter fileId is required.");
1195 } 1198 }
1196 if (acknowledgeAbuse != null) { 1199 if (acknowledgeAbuse != null) {
1197 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; 1200 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"];
1198 } 1201 }
1199 if (projection != null) { 1202 if (projection != null) {
1200 _queryParams["projection"] = [projection]; 1203 _queryParams["projection"] = [projection];
1201 } 1204 }
1205 if (revisionId != null) {
1206 _queryParams["revisionId"] = [revisionId];
1207 }
1202 if (updateViewedDate != null) { 1208 if (updateViewedDate != null) {
1203 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1209 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1204 } 1210 }
1205 1211
1206 _downloadOptions = downloadOptions; 1212 _downloadOptions = downloadOptions;
1207 1213
1208 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId'); 1214 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1209 1215
1210 var _response = _requester.request(_url, 1216 var _response = _requester.request(_url,
1211 "GET", 1217 "GET",
1212 body: _body, 1218 body: _body,
1213 queryParams: _queryParams, 1219 queryParams: _queryParams,
1214 uploadOptions: _uploadOptions, 1220 uploadOptions: _uploadOptions,
1215 uploadMedia: _uploadMedia, 1221 uploadMedia: _uploadMedia,
1216 downloadOptions: _downloadOptions); 1222 downloadOptions: _downloadOptions);
1217 if (_downloadOptions == null || 1223 if (_downloadOptions == null ||
1218 _downloadOptions == common.DownloadOptions.Metadata) { 1224 _downloadOptions == commons.DownloadOptions.Metadata) {
1219 return _response.then((data) => new File.fromJson(data)); 1225 return _response.then((data) => new File.fromJson(data));
1220 } else { 1226 } else {
1221 return _response; 1227 return _response;
1222 } 1228 }
1223 } 1229 }
1224 1230
1225 /** 1231 /**
1226 * Insert a new file. 1232 * Insert a new file.
1227 * 1233 *
1228 * [request] - The metadata request object. 1234 * [request] - The metadata request object.
(...skipping 24 matching lines...) Expand all
1253 * default visibility/sharing policies. 1259 * default visibility/sharing policies.
1254 * - "PRIVATE" : The new file will be visible to only the owner. 1260 * - "PRIVATE" : The new file will be visible to only the owner.
1255 * 1261 *
1256 * [uploadMedia] - The media to upload. 1262 * [uploadMedia] - The media to upload.
1257 * 1263 *
1258 * [uploadOptions] - Options for the media upload. Streaming Media without the 1264 * [uploadOptions] - Options for the media upload. Streaming Media without the
1259 * length being known ahead of time is only supported via resumable uploads. 1265 * length being known ahead of time is only supported via resumable uploads.
1260 * 1266 *
1261 * Completes with a [File]. 1267 * Completes with a [File].
1262 * 1268 *
1263 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1269 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1264 * error. 1270 * error.
1265 * 1271 *
1266 * If the used [http.Client] completes with an error when making a REST call, 1272 * If the used [http.Client] completes with an error when making a REST call,
1267 * this method will complete with the same error. 1273 * this method will complete with the same error.
1268 */ 1274 */
1269 async.Future<File> insert(File request, {core.bool convert, core.bool ocr, cor e.String ocrLanguage, core.bool pinned, core.String timedTextLanguage, core.Stri ng timedTextTrackName, core.bool useContentAsIndexableText, core.String visibili ty, common.UploadOptions uploadOptions : common.UploadOptions.Default, common.Me dia uploadMedia}) { 1275 async.Future<File> insert(File request, {core.bool convert, core.bool ocr, cor e.String ocrLanguage, core.bool pinned, core.String timedTextLanguage, core.Stri ng timedTextTrackName, core.bool useContentAsIndexableText, core.String visibili ty, commons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons .Media uploadMedia}) {
1270 var _url = null; 1276 var _url = null;
1271 var _queryParams = new core.Map(); 1277 var _queryParams = new core.Map();
1272 var _uploadMedia = null; 1278 var _uploadMedia = null;
1273 var _uploadOptions = null; 1279 var _uploadOptions = null;
1274 var _downloadOptions = common.DownloadOptions.Metadata; 1280 var _downloadOptions = commons.DownloadOptions.Metadata;
1275 var _body = null; 1281 var _body = null;
1276 1282
1277 if (request != null) { 1283 if (request != null) {
1278 _body = convert_1.JSON.encode((request).toJson()); 1284 _body = convert_1.JSON.encode((request).toJson());
1279 } 1285 }
1280 if (convert != null) { 1286 if (convert != null) {
1281 _queryParams["convert"] = ["${convert}"]; 1287 _queryParams["convert"] = ["${convert}"];
1282 } 1288 }
1283 if (ocr != null) { 1289 if (ocr != null) {
1284 _queryParams["ocr"] = ["${ocr}"]; 1290 _queryParams["ocr"] = ["${ocr}"];
(...skipping 15 matching lines...) Expand all
1300 } 1306 }
1301 if (visibility != null) { 1307 if (visibility != null) {
1302 _queryParams["visibility"] = [visibility]; 1308 _queryParams["visibility"] = [visibility];
1303 } 1309 }
1304 1310
1305 _uploadMedia = uploadMedia; 1311 _uploadMedia = uploadMedia;
1306 _uploadOptions = uploadOptions; 1312 _uploadOptions = uploadOptions;
1307 1313
1308 if (_uploadMedia == null) { 1314 if (_uploadMedia == null) {
1309 _url = 'files'; 1315 _url = 'files';
1310 } else if (_uploadOptions is common.ResumableUploadOptions) { 1316 } else if (_uploadOptions is commons.ResumableUploadOptions) {
1311 _url = '/resumable/upload/drive/v2/files'; 1317 _url = '/resumable/upload/drive/v2/files';
1312 } else { 1318 } else {
1313 _url = '/upload/drive/v2/files'; 1319 _url = '/upload/drive/v2/files';
1314 } 1320 }
1315 1321
1316 1322
1317 var _response = _requester.request(_url, 1323 var _response = _requester.request(_url,
1318 "POST", 1324 "POST",
1319 body: _body, 1325 body: _body,
1320 queryParams: _queryParams, 1326 queryParams: _queryParams,
(...skipping 19 matching lines...) Expand all
1340 * 1346 *
1341 * [projection] - This parameter is deprecated and has no function. 1347 * [projection] - This parameter is deprecated and has no function.
1342 * Possible string values are: 1348 * Possible string values are:
1343 * - "BASIC" : Deprecated 1349 * - "BASIC" : Deprecated
1344 * - "FULL" : Deprecated 1350 * - "FULL" : Deprecated
1345 * 1351 *
1346 * [q] - Query string for searching files. 1352 * [q] - Query string for searching files.
1347 * 1353 *
1348 * Completes with a [FileList]. 1354 * Completes with a [FileList].
1349 * 1355 *
1350 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1356 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1351 * error. 1357 * error.
1352 * 1358 *
1353 * If the used [http.Client] completes with an error when making a REST call, 1359 * If the used [http.Client] completes with an error when making a REST call,
1354 * this method will complete with the same error. 1360 * this method will complete with the same error.
1355 */ 1361 */
1356 async.Future<FileList> list({core.String corpus, core.int maxResults, core.Str ing pageToken, core.String projection, core.String q}) { 1362 async.Future<FileList> list({core.String corpus, core.int maxResults, core.Str ing pageToken, core.String projection, core.String q}) {
1357 var _url = null; 1363 var _url = null;
1358 var _queryParams = new core.Map(); 1364 var _queryParams = new core.Map();
1359 var _uploadMedia = null; 1365 var _uploadMedia = null;
1360 var _uploadOptions = null; 1366 var _uploadOptions = null;
1361 var _downloadOptions = common.DownloadOptions.Metadata; 1367 var _downloadOptions = commons.DownloadOptions.Metadata;
1362 var _body = null; 1368 var _body = null;
1363 1369
1364 if (corpus != null) { 1370 if (corpus != null) {
1365 _queryParams["corpus"] = [corpus]; 1371 _queryParams["corpus"] = [corpus];
1366 } 1372 }
1367 if (maxResults != null) { 1373 if (maxResults != null) {
1368 _queryParams["maxResults"] = ["${maxResults}"]; 1374 _queryParams["maxResults"] = ["${maxResults}"];
1369 } 1375 }
1370 if (pageToken != null) { 1376 if (pageToken != null) {
1371 _queryParams["pageToken"] = [pageToken]; 1377 _queryParams["pageToken"] = [pageToken];
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 * 1432 *
1427 * [timedTextTrackName] - The timed text track name. 1433 * [timedTextTrackName] - The timed text track name.
1428 * 1434 *
1429 * [updateViewedDate] - Whether to update the view date after successfully 1435 * [updateViewedDate] - Whether to update the view date after successfully
1430 * updating the file. 1436 * updating the file.
1431 * 1437 *
1432 * [useContentAsIndexableText] - Whether to use the content as indexable text. 1438 * [useContentAsIndexableText] - Whether to use the content as indexable text.
1433 * 1439 *
1434 * Completes with a [File]. 1440 * Completes with a [File].
1435 * 1441 *
1436 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1442 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1437 * error. 1443 * error.
1438 * 1444 *
1439 * If the used [http.Client] completes with an error when making a REST call, 1445 * If the used [http.Client] completes with an error when making a REST call,
1440 * this method will complete with the same error. 1446 * this method will complete with the same error.
1441 */ 1447 */
1442 async.Future<File> patch(File request, core.String fileId, {core.String addPar ents, core.bool convert, core.bool newRevision, core.bool ocr, core.String ocrLa nguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool updateV iewedDate, core.bool useContentAsIndexableText}) { 1448 async.Future<File> patch(File request, core.String fileId, {core.String addPar ents, core.bool convert, core.bool newRevision, core.bool ocr, core.String ocrLa nguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool updateV iewedDate, core.bool useContentAsIndexableText}) {
1443 var _url = null; 1449 var _url = null;
1444 var _queryParams = new core.Map(); 1450 var _queryParams = new core.Map();
1445 var _uploadMedia = null; 1451 var _uploadMedia = null;
1446 var _uploadOptions = null; 1452 var _uploadOptions = null;
1447 var _downloadOptions = common.DownloadOptions.Metadata; 1453 var _downloadOptions = commons.DownloadOptions.Metadata;
1448 var _body = null; 1454 var _body = null;
1449 1455
1450 if (request != null) { 1456 if (request != null) {
1451 _body = convert_1.JSON.encode((request).toJson()); 1457 _body = convert_1.JSON.encode((request).toJson());
1452 } 1458 }
1453 if (fileId == null) { 1459 if (fileId == null) {
1454 throw new core.ArgumentError("Parameter fileId is required."); 1460 throw new core.ArgumentError("Parameter fileId is required.");
1455 } 1461 }
1456 if (addParents != null) { 1462 if (addParents != null) {
1457 _queryParams["addParents"] = [addParents]; 1463 _queryParams["addParents"] = [addParents];
(...skipping 26 matching lines...) Expand all
1484 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1490 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1485 } 1491 }
1486 if (updateViewedDate != null) { 1492 if (updateViewedDate != null) {
1487 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1493 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1488 } 1494 }
1489 if (useContentAsIndexableText != null) { 1495 if (useContentAsIndexableText != null) {
1490 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "]; 1496 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "];
1491 } 1497 }
1492 1498
1493 1499
1494 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId'); 1500 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1495 1501
1496 var _response = _requester.request(_url, 1502 var _response = _requester.request(_url,
1497 "PATCH", 1503 "PATCH",
1498 body: _body, 1504 body: _body,
1499 queryParams: _queryParams, 1505 queryParams: _queryParams,
1500 uploadOptions: _uploadOptions, 1506 uploadOptions: _uploadOptions,
1501 uploadMedia: _uploadMedia, 1507 uploadMedia: _uploadMedia,
1502 downloadOptions: _downloadOptions); 1508 downloadOptions: _downloadOptions);
1503 return _response.then((data) => new File.fromJson(data)); 1509 return _response.then((data) => new File.fromJson(data));
1504 } 1510 }
1505 1511
1506 /** 1512 /**
1507 * Set the file's updated time to the current server time. 1513 * Set the file's updated time to the current server time.
1508 * 1514 *
1509 * Request parameters: 1515 * Request parameters:
1510 * 1516 *
1511 * [fileId] - The ID of the file to update. 1517 * [fileId] - The ID of the file to update.
1512 * 1518 *
1513 * Completes with a [File]. 1519 * Completes with a [File].
1514 * 1520 *
1515 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1521 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1516 * error. 1522 * error.
1517 * 1523 *
1518 * If the used [http.Client] completes with an error when making a REST call, 1524 * If the used [http.Client] completes with an error when making a REST call,
1519 * this method will complete with the same error. 1525 * this method will complete with the same error.
1520 */ 1526 */
1521 async.Future<File> touch(core.String fileId) { 1527 async.Future<File> touch(core.String fileId) {
1522 var _url = null; 1528 var _url = null;
1523 var _queryParams = new core.Map(); 1529 var _queryParams = new core.Map();
1524 var _uploadMedia = null; 1530 var _uploadMedia = null;
1525 var _uploadOptions = null; 1531 var _uploadOptions = null;
1526 var _downloadOptions = common.DownloadOptions.Metadata; 1532 var _downloadOptions = commons.DownloadOptions.Metadata;
1527 var _body = null; 1533 var _body = null;
1528 1534
1529 if (fileId == null) { 1535 if (fileId == null) {
1530 throw new core.ArgumentError("Parameter fileId is required."); 1536 throw new core.ArgumentError("Parameter fileId is required.");
1531 } 1537 }
1532 1538
1533 1539
1534 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/touch '; 1540 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/touch';
1535 1541
1536 var _response = _requester.request(_url, 1542 var _response = _requester.request(_url,
1537 "POST", 1543 "POST",
1538 body: _body, 1544 body: _body,
1539 queryParams: _queryParams, 1545 queryParams: _queryParams,
1540 uploadOptions: _uploadOptions, 1546 uploadOptions: _uploadOptions,
1541 uploadMedia: _uploadMedia, 1547 uploadMedia: _uploadMedia,
1542 downloadOptions: _downloadOptions); 1548 downloadOptions: _downloadOptions);
1543 return _response.then((data) => new File.fromJson(data)); 1549 return _response.then((data) => new File.fromJson(data));
1544 } 1550 }
1545 1551
1546 /** 1552 /**
1547 * Moves a file to the trash. 1553 * Moves a file to the trash.
1548 * 1554 *
1549 * Request parameters: 1555 * Request parameters:
1550 * 1556 *
1551 * [fileId] - The ID of the file to trash. 1557 * [fileId] - The ID of the file to trash.
1552 * 1558 *
1553 * Completes with a [File]. 1559 * Completes with a [File].
1554 * 1560 *
1555 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1561 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1556 * error. 1562 * error.
1557 * 1563 *
1558 * If the used [http.Client] completes with an error when making a REST call, 1564 * If the used [http.Client] completes with an error when making a REST call,
1559 * this method will complete with the same error. 1565 * this method will complete with the same error.
1560 */ 1566 */
1561 async.Future<File> trash(core.String fileId) { 1567 async.Future<File> trash(core.String fileId) {
1562 var _url = null; 1568 var _url = null;
1563 var _queryParams = new core.Map(); 1569 var _queryParams = new core.Map();
1564 var _uploadMedia = null; 1570 var _uploadMedia = null;
1565 var _uploadOptions = null; 1571 var _uploadOptions = null;
1566 var _downloadOptions = common.DownloadOptions.Metadata; 1572 var _downloadOptions = commons.DownloadOptions.Metadata;
1567 var _body = null; 1573 var _body = null;
1568 1574
1569 if (fileId == null) { 1575 if (fileId == null) {
1570 throw new core.ArgumentError("Parameter fileId is required."); 1576 throw new core.ArgumentError("Parameter fileId is required.");
1571 } 1577 }
1572 1578
1573 1579
1574 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/trash '; 1580 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/trash';
1575 1581
1576 var _response = _requester.request(_url, 1582 var _response = _requester.request(_url,
1577 "POST", 1583 "POST",
1578 body: _body, 1584 body: _body,
1579 queryParams: _queryParams, 1585 queryParams: _queryParams,
1580 uploadOptions: _uploadOptions, 1586 uploadOptions: _uploadOptions,
1581 uploadMedia: _uploadMedia, 1587 uploadMedia: _uploadMedia,
1582 downloadOptions: _downloadOptions); 1588 downloadOptions: _downloadOptions);
1583 return _response.then((data) => new File.fromJson(data)); 1589 return _response.then((data) => new File.fromJson(data));
1584 } 1590 }
1585 1591
1586 /** 1592 /**
1587 * Restores a file from the trash. 1593 * Restores a file from the trash.
1588 * 1594 *
1589 * Request parameters: 1595 * Request parameters:
1590 * 1596 *
1591 * [fileId] - The ID of the file to untrash. 1597 * [fileId] - The ID of the file to untrash.
1592 * 1598 *
1593 * Completes with a [File]. 1599 * Completes with a [File].
1594 * 1600 *
1595 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1601 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1596 * error. 1602 * error.
1597 * 1603 *
1598 * If the used [http.Client] completes with an error when making a REST call, 1604 * If the used [http.Client] completes with an error when making a REST call,
1599 * this method will complete with the same error. 1605 * this method will complete with the same error.
1600 */ 1606 */
1601 async.Future<File> untrash(core.String fileId) { 1607 async.Future<File> untrash(core.String fileId) {
1602 var _url = null; 1608 var _url = null;
1603 var _queryParams = new core.Map(); 1609 var _queryParams = new core.Map();
1604 var _uploadMedia = null; 1610 var _uploadMedia = null;
1605 var _uploadOptions = null; 1611 var _uploadOptions = null;
1606 var _downloadOptions = common.DownloadOptions.Metadata; 1612 var _downloadOptions = commons.DownloadOptions.Metadata;
1607 var _body = null; 1613 var _body = null;
1608 1614
1609 if (fileId == null) { 1615 if (fileId == null) {
1610 throw new core.ArgumentError("Parameter fileId is required."); 1616 throw new core.ArgumentError("Parameter fileId is required.");
1611 } 1617 }
1612 1618
1613 1619
1614 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/untra sh'; 1620 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/untrash';
1615 1621
1616 var _response = _requester.request(_url, 1622 var _response = _requester.request(_url,
1617 "POST", 1623 "POST",
1618 body: _body, 1624 body: _body,
1619 queryParams: _queryParams, 1625 queryParams: _queryParams,
1620 uploadOptions: _uploadOptions, 1626 uploadOptions: _uploadOptions,
1621 uploadMedia: _uploadMedia, 1627 uploadMedia: _uploadMedia,
1622 downloadOptions: _downloadOptions); 1628 downloadOptions: _downloadOptions);
1623 return _response.then((data) => new File.fromJson(data)); 1629 return _response.then((data) => new File.fromJson(data));
1624 } 1630 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 * 1670 *
1665 * [useContentAsIndexableText] - Whether to use the content as indexable text. 1671 * [useContentAsIndexableText] - Whether to use the content as indexable text.
1666 * 1672 *
1667 * [uploadMedia] - The media to upload. 1673 * [uploadMedia] - The media to upload.
1668 * 1674 *
1669 * [uploadOptions] - Options for the media upload. Streaming Media without the 1675 * [uploadOptions] - Options for the media upload. Streaming Media without the
1670 * length being known ahead of time is only supported via resumable uploads. 1676 * length being known ahead of time is only supported via resumable uploads.
1671 * 1677 *
1672 * Completes with a [File]. 1678 * Completes with a [File].
1673 * 1679 *
1674 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1680 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1675 * error. 1681 * error.
1676 * 1682 *
1677 * If the used [http.Client] completes with an error when making a REST call, 1683 * If the used [http.Client] completes with an error when making a REST call,
1678 * this method will complete with the same error. 1684 * this method will complete with the same error.
1679 */ 1685 */
1680 async.Future<File> update(File request, core.String fileId, {core.String addPa rents, core.bool convert, core.bool newRevision, core.bool ocr, core.String ocrL anguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool update ViewedDate, core.bool useContentAsIndexableText, common.UploadOptions uploadOpti ons : common.UploadOptions.Default, common.Media uploadMedia}) { 1686 async.Future<File> update(File request, core.String fileId, {core.String addPa rents, core.bool convert, core.bool newRevision, core.bool ocr, core.String ocrL anguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool update ViewedDate, core.bool useContentAsIndexableText, commons.UploadOptions uploadOpt ions : commons.UploadOptions.Default, commons.Media uploadMedia}) {
1681 var _url = null; 1687 var _url = null;
1682 var _queryParams = new core.Map(); 1688 var _queryParams = new core.Map();
1683 var _uploadMedia = null; 1689 var _uploadMedia = null;
1684 var _uploadOptions = null; 1690 var _uploadOptions = null;
1685 var _downloadOptions = common.DownloadOptions.Metadata; 1691 var _downloadOptions = commons.DownloadOptions.Metadata;
1686 var _body = null; 1692 var _body = null;
1687 1693
1688 if (request != null) { 1694 if (request != null) {
1689 _body = convert_1.JSON.encode((request).toJson()); 1695 _body = convert_1.JSON.encode((request).toJson());
1690 } 1696 }
1691 if (fileId == null) { 1697 if (fileId == null) {
1692 throw new core.ArgumentError("Parameter fileId is required."); 1698 throw new core.ArgumentError("Parameter fileId is required.");
1693 } 1699 }
1694 if (addParents != null) { 1700 if (addParents != null) {
1695 _queryParams["addParents"] = [addParents]; 1701 _queryParams["addParents"] = [addParents];
(...skipping 29 matching lines...) Expand all
1725 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1731 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1726 } 1732 }
1727 if (useContentAsIndexableText != null) { 1733 if (useContentAsIndexableText != null) {
1728 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "]; 1734 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "];
1729 } 1735 }
1730 1736
1731 _uploadMedia = uploadMedia; 1737 _uploadMedia = uploadMedia;
1732 _uploadOptions = uploadOptions; 1738 _uploadOptions = uploadOptions;
1733 1739
1734 if (_uploadMedia == null) { 1740 if (_uploadMedia == null) {
1735 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId'); 1741 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1736 } else if (_uploadOptions is common.ResumableUploadOptions) { 1742 } else if (_uploadOptions is commons.ResumableUploadOptions) {
1737 _url = '/resumable/upload/drive/v2/files/' + common_internal.Escaper.ecape Variable('$fileId'); 1743 _url = '/resumable/upload/drive/v2/files/' + commons.Escaper.ecapeVariable ('$fileId');
1738 } else { 1744 } else {
1739 _url = '/upload/drive/v2/files/' + common_internal.Escaper.ecapeVariable(' $fileId'); 1745 _url = '/upload/drive/v2/files/' + commons.Escaper.ecapeVariable('$fileId' );
1740 } 1746 }
1741 1747
1742 1748
1743 var _response = _requester.request(_url, 1749 var _response = _requester.request(_url,
1744 "PUT", 1750 "PUT",
1745 body: _body, 1751 body: _body,
1746 queryParams: _queryParams, 1752 queryParams: _queryParams,
1747 uploadOptions: _uploadOptions, 1753 uploadOptions: _uploadOptions,
1748 uploadMedia: _uploadMedia, 1754 uploadMedia: _uploadMedia,
1749 downloadOptions: _downloadOptions); 1755 downloadOptions: _downloadOptions);
1750 return _response.then((data) => new File.fromJson(data)); 1756 return _response.then((data) => new File.fromJson(data));
1751 } 1757 }
1752 1758
1753 /** 1759 /**
1754 * Subscribe to changes on a file 1760 * Subscribe to changes on a file
1755 * 1761 *
1756 * [request] - The metadata request object. 1762 * [request] - The metadata request object.
1757 * 1763 *
1758 * Request parameters: 1764 * Request parameters:
1759 * 1765 *
1760 * [fileId] - The ID for the file in question. 1766 * [fileId] - The ID for the file in question.
1761 * 1767 *
1762 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of 1768 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of
1763 * downloading known malware or other abusive files. 1769 * downloading known malware or other abusive files. Ignored unless alt=media
1770 * is specified.
1764 * 1771 *
1765 * [projection] - This parameter is deprecated and has no function. 1772 * [projection] - This parameter is deprecated and has no function.
1766 * Possible string values are: 1773 * Possible string values are:
1767 * - "BASIC" : Deprecated 1774 * - "BASIC" : Deprecated
1768 * - "FULL" : Deprecated 1775 * - "FULL" : Deprecated
1769 * 1776 *
1777 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored
1778 * unless alt=media is specified.
1779 *
1770 * [updateViewedDate] - Whether to update the view date after successfully 1780 * [updateViewedDate] - Whether to update the view date after successfully
1771 * retrieving the file. 1781 * retrieving the file.
1772 * 1782 *
1773 * [downloadOptions] - Options for downloading. A download can be either a 1783 * [downloadOptions] - Options for downloading. A download can be either a
1774 * Metadata (default) or Media download. Partial Media downloads are possible 1784 * Metadata (default) or Media download. Partial Media downloads are possible
1775 * as well. 1785 * as well.
1776 * 1786 *
1777 * Completes with a 1787 * Completes with a
1778 * 1788 *
1779 * - [Channel] for Metadata downloads (see [downloadOptions]). 1789 * - [Channel] for Metadata downloads (see [downloadOptions]).
1780 * 1790 *
1781 * - [common.Media] for Media downloads (see [downloadOptions]). 1791 * - [commons.Media] for Media downloads (see [downloadOptions]).
1782 * 1792 *
1783 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1793 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1784 * error. 1794 * error.
1785 * 1795 *
1786 * If the used [http.Client] completes with an error when making a REST call, 1796 * If the used [http.Client] completes with an error when making a REST call,
1787 * this method will complete with the same error. 1797 * this method will complete with the same error.
1788 */ 1798 */
1789 async.Future watch(Channel request, core.String fileId, {core.bool acknowledge Abuse, core.String projection, core.bool updateViewedDate, common.DownloadOption s downloadOptions: common.DownloadOptions.Metadata}) { 1799 async.Future watch(Channel request, core.String fileId, {core.bool acknowledge Abuse, core.String projection, core.String revisionId, core.bool updateViewedDat e, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) {
1790 var _url = null; 1800 var _url = null;
1791 var _queryParams = new core.Map(); 1801 var _queryParams = new core.Map();
1792 var _uploadMedia = null; 1802 var _uploadMedia = null;
1793 var _uploadOptions = null; 1803 var _uploadOptions = null;
1794 var _downloadOptions = common.DownloadOptions.Metadata; 1804 var _downloadOptions = commons.DownloadOptions.Metadata;
1795 var _body = null; 1805 var _body = null;
1796 1806
1797 if (request != null) { 1807 if (request != null) {
1798 _body = convert_1.JSON.encode((request).toJson()); 1808 _body = convert_1.JSON.encode((request).toJson());
1799 } 1809 }
1800 if (fileId == null) { 1810 if (fileId == null) {
1801 throw new core.ArgumentError("Parameter fileId is required."); 1811 throw new core.ArgumentError("Parameter fileId is required.");
1802 } 1812 }
1803 if (acknowledgeAbuse != null) { 1813 if (acknowledgeAbuse != null) {
1804 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; 1814 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"];
1805 } 1815 }
1806 if (projection != null) { 1816 if (projection != null) {
1807 _queryParams["projection"] = [projection]; 1817 _queryParams["projection"] = [projection];
1808 } 1818 }
1819 if (revisionId != null) {
1820 _queryParams["revisionId"] = [revisionId];
1821 }
1809 if (updateViewedDate != null) { 1822 if (updateViewedDate != null) {
1810 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1823 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1811 } 1824 }
1812 1825
1813 _downloadOptions = downloadOptions; 1826 _downloadOptions = downloadOptions;
1814 1827
1815 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/watch '; 1828 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/watch';
1816 1829
1817 var _response = _requester.request(_url, 1830 var _response = _requester.request(_url,
1818 "POST", 1831 "POST",
1819 body: _body, 1832 body: _body,
1820 queryParams: _queryParams, 1833 queryParams: _queryParams,
1821 uploadOptions: _uploadOptions, 1834 uploadOptions: _uploadOptions,
1822 uploadMedia: _uploadMedia, 1835 uploadMedia: _uploadMedia,
1823 downloadOptions: _downloadOptions); 1836 downloadOptions: _downloadOptions);
1824 if (_downloadOptions == null || 1837 if (_downloadOptions == null ||
1825 _downloadOptions == common.DownloadOptions.Metadata) { 1838 _downloadOptions == commons.DownloadOptions.Metadata) {
1826 return _response.then((data) => new Channel.fromJson(data)); 1839 return _response.then((data) => new Channel.fromJson(data));
1827 } else { 1840 } else {
1828 return _response; 1841 return _response;
1829 } 1842 }
1830 } 1843 }
1831 1844
1832 } 1845 }
1833 1846
1834 1847
1835 /** Not documented yet. */
1836 class ParentsResourceApi { 1848 class ParentsResourceApi {
1837 final common_internal.ApiRequester _requester; 1849 final commons.ApiRequester _requester;
1838 1850
1839 ParentsResourceApi(common_internal.ApiRequester client) : 1851 ParentsResourceApi(commons.ApiRequester client) :
1840 _requester = client; 1852 _requester = client;
1841 1853
1842 /** 1854 /**
1843 * Removes a parent from a file. 1855 * Removes a parent from a file.
1844 * 1856 *
1845 * Request parameters: 1857 * Request parameters:
1846 * 1858 *
1847 * [fileId] - The ID of the file. 1859 * [fileId] - The ID of the file.
1848 * 1860 *
1849 * [parentId] - The ID of the parent. 1861 * [parentId] - The ID of the parent.
1850 * 1862 *
1851 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1863 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1852 * error. 1864 * error.
1853 * 1865 *
1854 * If the used [http.Client] completes with an error when making a REST call, 1866 * If the used [http.Client] completes with an error when making a REST call,
1855 * this method will complete with the same error. 1867 * this method will complete with the same error.
1856 */ 1868 */
1857 async.Future delete(core.String fileId, core.String parentId) { 1869 async.Future delete(core.String fileId, core.String parentId) {
1858 var _url = null; 1870 var _url = null;
1859 var _queryParams = new core.Map(); 1871 var _queryParams = new core.Map();
1860 var _uploadMedia = null; 1872 var _uploadMedia = null;
1861 var _uploadOptions = null; 1873 var _uploadOptions = null;
1862 var _downloadOptions = common.DownloadOptions.Metadata; 1874 var _downloadOptions = commons.DownloadOptions.Metadata;
1863 var _body = null; 1875 var _body = null;
1864 1876
1865 if (fileId == null) { 1877 if (fileId == null) {
1866 throw new core.ArgumentError("Parameter fileId is required."); 1878 throw new core.ArgumentError("Parameter fileId is required.");
1867 } 1879 }
1868 if (parentId == null) { 1880 if (parentId == null) {
1869 throw new core.ArgumentError("Parameter parentId is required."); 1881 throw new core.ArgumentError("Parameter parentId is required.");
1870 } 1882 }
1871 1883
1872 _downloadOptions = null; 1884 _downloadOptions = null;
1873 1885
1874 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/paren ts/' + common_internal.Escaper.ecapeVariable('$parentId'); 1886 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents/' + c ommons.Escaper.ecapeVariable('$parentId');
1875 1887
1876 var _response = _requester.request(_url, 1888 var _response = _requester.request(_url,
1877 "DELETE", 1889 "DELETE",
1878 body: _body, 1890 body: _body,
1879 queryParams: _queryParams, 1891 queryParams: _queryParams,
1880 uploadOptions: _uploadOptions, 1892 uploadOptions: _uploadOptions,
1881 uploadMedia: _uploadMedia, 1893 uploadMedia: _uploadMedia,
1882 downloadOptions: _downloadOptions); 1894 downloadOptions: _downloadOptions);
1883 return _response.then((data) => null); 1895 return _response.then((data) => null);
1884 } 1896 }
1885 1897
1886 /** 1898 /**
1887 * Gets a specific parent reference. 1899 * Gets a specific parent reference.
1888 * 1900 *
1889 * Request parameters: 1901 * Request parameters:
1890 * 1902 *
1891 * [fileId] - The ID of the file. 1903 * [fileId] - The ID of the file.
1892 * 1904 *
1893 * [parentId] - The ID of the parent. 1905 * [parentId] - The ID of the parent.
1894 * 1906 *
1895 * Completes with a [ParentReference]. 1907 * Completes with a [ParentReference].
1896 * 1908 *
1897 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1909 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1898 * error. 1910 * error.
1899 * 1911 *
1900 * If the used [http.Client] completes with an error when making a REST call, 1912 * If the used [http.Client] completes with an error when making a REST call,
1901 * this method will complete with the same error. 1913 * this method will complete with the same error.
1902 */ 1914 */
1903 async.Future<ParentReference> get(core.String fileId, core.String parentId) { 1915 async.Future<ParentReference> get(core.String fileId, core.String parentId) {
1904 var _url = null; 1916 var _url = null;
1905 var _queryParams = new core.Map(); 1917 var _queryParams = new core.Map();
1906 var _uploadMedia = null; 1918 var _uploadMedia = null;
1907 var _uploadOptions = null; 1919 var _uploadOptions = null;
1908 var _downloadOptions = common.DownloadOptions.Metadata; 1920 var _downloadOptions = commons.DownloadOptions.Metadata;
1909 var _body = null; 1921 var _body = null;
1910 1922
1911 if (fileId == null) { 1923 if (fileId == null) {
1912 throw new core.ArgumentError("Parameter fileId is required."); 1924 throw new core.ArgumentError("Parameter fileId is required.");
1913 } 1925 }
1914 if (parentId == null) { 1926 if (parentId == null) {
1915 throw new core.ArgumentError("Parameter parentId is required."); 1927 throw new core.ArgumentError("Parameter parentId is required.");
1916 } 1928 }
1917 1929
1918 1930
1919 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/paren ts/' + common_internal.Escaper.ecapeVariable('$parentId'); 1931 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents/' + c ommons.Escaper.ecapeVariable('$parentId');
1920 1932
1921 var _response = _requester.request(_url, 1933 var _response = _requester.request(_url,
1922 "GET", 1934 "GET",
1923 body: _body, 1935 body: _body,
1924 queryParams: _queryParams, 1936 queryParams: _queryParams,
1925 uploadOptions: _uploadOptions, 1937 uploadOptions: _uploadOptions,
1926 uploadMedia: _uploadMedia, 1938 uploadMedia: _uploadMedia,
1927 downloadOptions: _downloadOptions); 1939 downloadOptions: _downloadOptions);
1928 return _response.then((data) => new ParentReference.fromJson(data)); 1940 return _response.then((data) => new ParentReference.fromJson(data));
1929 } 1941 }
1930 1942
1931 /** 1943 /**
1932 * Adds a parent folder for a file. 1944 * Adds a parent folder for a file.
1933 * 1945 *
1934 * [request] - The metadata request object. 1946 * [request] - The metadata request object.
1935 * 1947 *
1936 * Request parameters: 1948 * Request parameters:
1937 * 1949 *
1938 * [fileId] - The ID of the file. 1950 * [fileId] - The ID of the file.
1939 * 1951 *
1940 * Completes with a [ParentReference]. 1952 * Completes with a [ParentReference].
1941 * 1953 *
1942 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1954 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1943 * error. 1955 * error.
1944 * 1956 *
1945 * If the used [http.Client] completes with an error when making a REST call, 1957 * If the used [http.Client] completes with an error when making a REST call,
1946 * this method will complete with the same error. 1958 * this method will complete with the same error.
1947 */ 1959 */
1948 async.Future<ParentReference> insert(ParentReference request, core.String file Id) { 1960 async.Future<ParentReference> insert(ParentReference request, core.String file Id) {
1949 var _url = null; 1961 var _url = null;
1950 var _queryParams = new core.Map(); 1962 var _queryParams = new core.Map();
1951 var _uploadMedia = null; 1963 var _uploadMedia = null;
1952 var _uploadOptions = null; 1964 var _uploadOptions = null;
1953 var _downloadOptions = common.DownloadOptions.Metadata; 1965 var _downloadOptions = commons.DownloadOptions.Metadata;
1954 var _body = null; 1966 var _body = null;
1955 1967
1956 if (request != null) { 1968 if (request != null) {
1957 _body = convert_1.JSON.encode((request).toJson()); 1969 _body = convert_1.JSON.encode((request).toJson());
1958 } 1970 }
1959 if (fileId == null) { 1971 if (fileId == null) {
1960 throw new core.ArgumentError("Parameter fileId is required."); 1972 throw new core.ArgumentError("Parameter fileId is required.");
1961 } 1973 }
1962 1974
1963 1975
1964 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/paren ts'; 1976 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents';
1965 1977
1966 var _response = _requester.request(_url, 1978 var _response = _requester.request(_url,
1967 "POST", 1979 "POST",
1968 body: _body, 1980 body: _body,
1969 queryParams: _queryParams, 1981 queryParams: _queryParams,
1970 uploadOptions: _uploadOptions, 1982 uploadOptions: _uploadOptions,
1971 uploadMedia: _uploadMedia, 1983 uploadMedia: _uploadMedia,
1972 downloadOptions: _downloadOptions); 1984 downloadOptions: _downloadOptions);
1973 return _response.then((data) => new ParentReference.fromJson(data)); 1985 return _response.then((data) => new ParentReference.fromJson(data));
1974 } 1986 }
1975 1987
1976 /** 1988 /**
1977 * Lists a file's parents. 1989 * Lists a file's parents.
1978 * 1990 *
1979 * Request parameters: 1991 * Request parameters:
1980 * 1992 *
1981 * [fileId] - The ID of the file. 1993 * [fileId] - The ID of the file.
1982 * 1994 *
1983 * Completes with a [ParentList]. 1995 * Completes with a [ParentList].
1984 * 1996 *
1985 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1997 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1986 * error. 1998 * error.
1987 * 1999 *
1988 * If the used [http.Client] completes with an error when making a REST call, 2000 * If the used [http.Client] completes with an error when making a REST call,
1989 * this method will complete with the same error. 2001 * this method will complete with the same error.
1990 */ 2002 */
1991 async.Future<ParentList> list(core.String fileId) { 2003 async.Future<ParentList> list(core.String fileId) {
1992 var _url = null; 2004 var _url = null;
1993 var _queryParams = new core.Map(); 2005 var _queryParams = new core.Map();
1994 var _uploadMedia = null; 2006 var _uploadMedia = null;
1995 var _uploadOptions = null; 2007 var _uploadOptions = null;
1996 var _downloadOptions = common.DownloadOptions.Metadata; 2008 var _downloadOptions = commons.DownloadOptions.Metadata;
1997 var _body = null; 2009 var _body = null;
1998 2010
1999 if (fileId == null) { 2011 if (fileId == null) {
2000 throw new core.ArgumentError("Parameter fileId is required."); 2012 throw new core.ArgumentError("Parameter fileId is required.");
2001 } 2013 }
2002 2014
2003 2015
2004 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/paren ts'; 2016 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents';
2005 2017
2006 var _response = _requester.request(_url, 2018 var _response = _requester.request(_url,
2007 "GET", 2019 "GET",
2008 body: _body, 2020 body: _body,
2009 queryParams: _queryParams, 2021 queryParams: _queryParams,
2010 uploadOptions: _uploadOptions, 2022 uploadOptions: _uploadOptions,
2011 uploadMedia: _uploadMedia, 2023 uploadMedia: _uploadMedia,
2012 downloadOptions: _downloadOptions); 2024 downloadOptions: _downloadOptions);
2013 return _response.then((data) => new ParentList.fromJson(data)); 2025 return _response.then((data) => new ParentList.fromJson(data));
2014 } 2026 }
2015 2027
2016 } 2028 }
2017 2029
2018 2030
2019 /** Not documented yet. */
2020 class PermissionsResourceApi { 2031 class PermissionsResourceApi {
2021 final common_internal.ApiRequester _requester; 2032 final commons.ApiRequester _requester;
2022 2033
2023 PermissionsResourceApi(common_internal.ApiRequester client) : 2034 PermissionsResourceApi(commons.ApiRequester client) :
2024 _requester = client; 2035 _requester = client;
2025 2036
2026 /** 2037 /**
2027 * Deletes a permission from a file. 2038 * Deletes a permission from a file.
2028 * 2039 *
2029 * Request parameters: 2040 * Request parameters:
2030 * 2041 *
2031 * [fileId] - The ID for the file. 2042 * [fileId] - The ID for the file.
2032 * 2043 *
2033 * [permissionId] - The ID for the permission. 2044 * [permissionId] - The ID for the permission.
2034 * 2045 *
2035 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2046 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2036 * error. 2047 * error.
2037 * 2048 *
2038 * If the used [http.Client] completes with an error when making a REST call, 2049 * If the used [http.Client] completes with an error when making a REST call,
2039 * this method will complete with the same error. 2050 * this method will complete with the same error.
2040 */ 2051 */
2041 async.Future delete(core.String fileId, core.String permissionId) { 2052 async.Future delete(core.String fileId, core.String permissionId) {
2042 var _url = null; 2053 var _url = null;
2043 var _queryParams = new core.Map(); 2054 var _queryParams = new core.Map();
2044 var _uploadMedia = null; 2055 var _uploadMedia = null;
2045 var _uploadOptions = null; 2056 var _uploadOptions = null;
2046 var _downloadOptions = common.DownloadOptions.Metadata; 2057 var _downloadOptions = commons.DownloadOptions.Metadata;
2047 var _body = null; 2058 var _body = null;
2048 2059
2049 if (fileId == null) { 2060 if (fileId == null) {
2050 throw new core.ArgumentError("Parameter fileId is required."); 2061 throw new core.ArgumentError("Parameter fileId is required.");
2051 } 2062 }
2052 if (permissionId == null) { 2063 if (permissionId == null) {
2053 throw new core.ArgumentError("Parameter permissionId is required."); 2064 throw new core.ArgumentError("Parameter permissionId is required.");
2054 } 2065 }
2055 2066
2056 _downloadOptions = null; 2067 _downloadOptions = null;
2057 2068
2058 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/permi ssions/' + common_internal.Escaper.ecapeVariable('$permissionId'); 2069 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2059 2070
2060 var _response = _requester.request(_url, 2071 var _response = _requester.request(_url,
2061 "DELETE", 2072 "DELETE",
2062 body: _body, 2073 body: _body,
2063 queryParams: _queryParams, 2074 queryParams: _queryParams,
2064 uploadOptions: _uploadOptions, 2075 uploadOptions: _uploadOptions,
2065 uploadMedia: _uploadMedia, 2076 uploadMedia: _uploadMedia,
2066 downloadOptions: _downloadOptions); 2077 downloadOptions: _downloadOptions);
2067 return _response.then((data) => null); 2078 return _response.then((data) => null);
2068 } 2079 }
2069 2080
2070 /** 2081 /**
2071 * Gets a permission by ID. 2082 * Gets a permission by ID.
2072 * 2083 *
2073 * Request parameters: 2084 * Request parameters:
2074 * 2085 *
2075 * [fileId] - The ID for the file. 2086 * [fileId] - The ID for the file.
2076 * 2087 *
2077 * [permissionId] - The ID for the permission. 2088 * [permissionId] - The ID for the permission.
2078 * 2089 *
2079 * Completes with a [Permission]. 2090 * Completes with a [Permission].
2080 * 2091 *
2081 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2092 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2082 * error. 2093 * error.
2083 * 2094 *
2084 * If the used [http.Client] completes with an error when making a REST call, 2095 * If the used [http.Client] completes with an error when making a REST call,
2085 * this method will complete with the same error. 2096 * this method will complete with the same error.
2086 */ 2097 */
2087 async.Future<Permission> get(core.String fileId, core.String permissionId) { 2098 async.Future<Permission> get(core.String fileId, core.String permissionId) {
2088 var _url = null; 2099 var _url = null;
2089 var _queryParams = new core.Map(); 2100 var _queryParams = new core.Map();
2090 var _uploadMedia = null; 2101 var _uploadMedia = null;
2091 var _uploadOptions = null; 2102 var _uploadOptions = null;
2092 var _downloadOptions = common.DownloadOptions.Metadata; 2103 var _downloadOptions = commons.DownloadOptions.Metadata;
2093 var _body = null; 2104 var _body = null;
2094 2105
2095 if (fileId == null) { 2106 if (fileId == null) {
2096 throw new core.ArgumentError("Parameter fileId is required."); 2107 throw new core.ArgumentError("Parameter fileId is required.");
2097 } 2108 }
2098 if (permissionId == null) { 2109 if (permissionId == null) {
2099 throw new core.ArgumentError("Parameter permissionId is required."); 2110 throw new core.ArgumentError("Parameter permissionId is required.");
2100 } 2111 }
2101 2112
2102 2113
2103 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/permi ssions/' + common_internal.Escaper.ecapeVariable('$permissionId'); 2114 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2104 2115
2105 var _response = _requester.request(_url, 2116 var _response = _requester.request(_url,
2106 "GET", 2117 "GET",
2107 body: _body, 2118 body: _body,
2108 queryParams: _queryParams, 2119 queryParams: _queryParams,
2109 uploadOptions: _uploadOptions, 2120 uploadOptions: _uploadOptions,
2110 uploadMedia: _uploadMedia, 2121 uploadMedia: _uploadMedia,
2111 downloadOptions: _downloadOptions); 2122 downloadOptions: _downloadOptions);
2112 return _response.then((data) => new Permission.fromJson(data)); 2123 return _response.then((data) => new Permission.fromJson(data));
2113 } 2124 }
2114 2125
2115 /** 2126 /**
2116 * Returns the permission ID for an email address. 2127 * Returns the permission ID for an email address.
2117 * 2128 *
2118 * Request parameters: 2129 * Request parameters:
2119 * 2130 *
2120 * [email] - The email address for which to return a permission ID 2131 * [email] - The email address for which to return a permission ID
2121 * 2132 *
2122 * Completes with a [PermissionId]. 2133 * Completes with a [PermissionId].
2123 * 2134 *
2124 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2135 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2125 * error. 2136 * error.
2126 * 2137 *
2127 * If the used [http.Client] completes with an error when making a REST call, 2138 * If the used [http.Client] completes with an error when making a REST call,
2128 * this method will complete with the same error. 2139 * this method will complete with the same error.
2129 */ 2140 */
2130 async.Future<PermissionId> getIdForEmail(core.String email) { 2141 async.Future<PermissionId> getIdForEmail(core.String email) {
2131 var _url = null; 2142 var _url = null;
2132 var _queryParams = new core.Map(); 2143 var _queryParams = new core.Map();
2133 var _uploadMedia = null; 2144 var _uploadMedia = null;
2134 var _uploadOptions = null; 2145 var _uploadOptions = null;
2135 var _downloadOptions = common.DownloadOptions.Metadata; 2146 var _downloadOptions = commons.DownloadOptions.Metadata;
2136 var _body = null; 2147 var _body = null;
2137 2148
2138 if (email == null) { 2149 if (email == null) {
2139 throw new core.ArgumentError("Parameter email is required."); 2150 throw new core.ArgumentError("Parameter email is required.");
2140 } 2151 }
2141 2152
2142 2153
2143 _url = 'permissionIds/' + common_internal.Escaper.ecapeVariable('$email'); 2154 _url = 'permissionIds/' + commons.Escaper.ecapeVariable('$email');
2144 2155
2145 var _response = _requester.request(_url, 2156 var _response = _requester.request(_url,
2146 "GET", 2157 "GET",
2147 body: _body, 2158 body: _body,
2148 queryParams: _queryParams, 2159 queryParams: _queryParams,
2149 uploadOptions: _uploadOptions, 2160 uploadOptions: _uploadOptions,
2150 uploadMedia: _uploadMedia, 2161 uploadMedia: _uploadMedia,
2151 downloadOptions: _downloadOptions); 2162 downloadOptions: _downloadOptions);
2152 return _response.then((data) => new PermissionId.fromJson(data)); 2163 return _response.then((data) => new PermissionId.fromJson(data));
2153 } 2164 }
2154 2165
2155 /** 2166 /**
2156 * Inserts a permission for a file. 2167 * Inserts a permission for a file.
2157 * 2168 *
2158 * [request] - The metadata request object. 2169 * [request] - The metadata request object.
2159 * 2170 *
2160 * Request parameters: 2171 * Request parameters:
2161 * 2172 *
2162 * [fileId] - The ID for the file. 2173 * [fileId] - The ID for the file.
2163 * 2174 *
2164 * [emailMessage] - A custom message to include in notification emails. 2175 * [emailMessage] - A custom message to include in notification emails.
2165 * 2176 *
2166 * [sendNotificationEmails] - Whether to send notification emails when sharing 2177 * [sendNotificationEmails] - Whether to send notification emails when sharing
2167 * to users or groups. This parameter is ignored and an email is sent if the 2178 * to users or groups. This parameter is ignored and an email is sent if the
2168 * role is owner. 2179 * role is owner.
2169 * 2180 *
2170 * Completes with a [Permission]. 2181 * Completes with a [Permission].
2171 * 2182 *
2172 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2183 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2173 * error. 2184 * error.
2174 * 2185 *
2175 * If the used [http.Client] completes with an error when making a REST call, 2186 * If the used [http.Client] completes with an error when making a REST call,
2176 * this method will complete with the same error. 2187 * this method will complete with the same error.
2177 */ 2188 */
2178 async.Future<Permission> insert(Permission request, core.String fileId, {core. String emailMessage, core.bool sendNotificationEmails}) { 2189 async.Future<Permission> insert(Permission request, core.String fileId, {core. String emailMessage, core.bool sendNotificationEmails}) {
2179 var _url = null; 2190 var _url = null;
2180 var _queryParams = new core.Map(); 2191 var _queryParams = new core.Map();
2181 var _uploadMedia = null; 2192 var _uploadMedia = null;
2182 var _uploadOptions = null; 2193 var _uploadOptions = null;
2183 var _downloadOptions = common.DownloadOptions.Metadata; 2194 var _downloadOptions = commons.DownloadOptions.Metadata;
2184 var _body = null; 2195 var _body = null;
2185 2196
2186 if (request != null) { 2197 if (request != null) {
2187 _body = convert_1.JSON.encode((request).toJson()); 2198 _body = convert_1.JSON.encode((request).toJson());
2188 } 2199 }
2189 if (fileId == null) { 2200 if (fileId == null) {
2190 throw new core.ArgumentError("Parameter fileId is required."); 2201 throw new core.ArgumentError("Parameter fileId is required.");
2191 } 2202 }
2192 if (emailMessage != null) { 2203 if (emailMessage != null) {
2193 _queryParams["emailMessage"] = [emailMessage]; 2204 _queryParams["emailMessage"] = [emailMessage];
2194 } 2205 }
2195 if (sendNotificationEmails != null) { 2206 if (sendNotificationEmails != null) {
2196 _queryParams["sendNotificationEmails"] = ["${sendNotificationEmails}"]; 2207 _queryParams["sendNotificationEmails"] = ["${sendNotificationEmails}"];
2197 } 2208 }
2198 2209
2199 2210
2200 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/permi ssions'; 2211 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions';
2201 2212
2202 var _response = _requester.request(_url, 2213 var _response = _requester.request(_url,
2203 "POST", 2214 "POST",
2204 body: _body, 2215 body: _body,
2205 queryParams: _queryParams, 2216 queryParams: _queryParams,
2206 uploadOptions: _uploadOptions, 2217 uploadOptions: _uploadOptions,
2207 uploadMedia: _uploadMedia, 2218 uploadMedia: _uploadMedia,
2208 downloadOptions: _downloadOptions); 2219 downloadOptions: _downloadOptions);
2209 return _response.then((data) => new Permission.fromJson(data)); 2220 return _response.then((data) => new Permission.fromJson(data));
2210 } 2221 }
2211 2222
2212 /** 2223 /**
2213 * Lists a file's permissions. 2224 * Lists a file's permissions.
2214 * 2225 *
2215 * Request parameters: 2226 * Request parameters:
2216 * 2227 *
2217 * [fileId] - The ID for the file. 2228 * [fileId] - The ID for the file.
2218 * 2229 *
2219 * Completes with a [PermissionList]. 2230 * Completes with a [PermissionList].
2220 * 2231 *
2221 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2232 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2222 * error. 2233 * error.
2223 * 2234 *
2224 * If the used [http.Client] completes with an error when making a REST call, 2235 * If the used [http.Client] completes with an error when making a REST call,
2225 * this method will complete with the same error. 2236 * this method will complete with the same error.
2226 */ 2237 */
2227 async.Future<PermissionList> list(core.String fileId) { 2238 async.Future<PermissionList> list(core.String fileId) {
2228 var _url = null; 2239 var _url = null;
2229 var _queryParams = new core.Map(); 2240 var _queryParams = new core.Map();
2230 var _uploadMedia = null; 2241 var _uploadMedia = null;
2231 var _uploadOptions = null; 2242 var _uploadOptions = null;
2232 var _downloadOptions = common.DownloadOptions.Metadata; 2243 var _downloadOptions = commons.DownloadOptions.Metadata;
2233 var _body = null; 2244 var _body = null;
2234 2245
2235 if (fileId == null) { 2246 if (fileId == null) {
2236 throw new core.ArgumentError("Parameter fileId is required."); 2247 throw new core.ArgumentError("Parameter fileId is required.");
2237 } 2248 }
2238 2249
2239 2250
2240 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/permi ssions'; 2251 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions';
2241 2252
2242 var _response = _requester.request(_url, 2253 var _response = _requester.request(_url,
2243 "GET", 2254 "GET",
2244 body: _body, 2255 body: _body,
2245 queryParams: _queryParams, 2256 queryParams: _queryParams,
2246 uploadOptions: _uploadOptions, 2257 uploadOptions: _uploadOptions,
2247 uploadMedia: _uploadMedia, 2258 uploadMedia: _uploadMedia,
2248 downloadOptions: _downloadOptions); 2259 downloadOptions: _downloadOptions);
2249 return _response.then((data) => new PermissionList.fromJson(data)); 2260 return _response.then((data) => new PermissionList.fromJson(data));
2250 } 2261 }
2251 2262
2252 /** 2263 /**
2253 * Updates a permission. This method supports patch semantics. 2264 * Updates a permission. This method supports patch semantics.
2254 * 2265 *
2255 * [request] - The metadata request object. 2266 * [request] - The metadata request object.
2256 * 2267 *
2257 * Request parameters: 2268 * Request parameters:
2258 * 2269 *
2259 * [fileId] - The ID for the file. 2270 * [fileId] - The ID for the file.
2260 * 2271 *
2261 * [permissionId] - The ID for the permission. 2272 * [permissionId] - The ID for the permission.
2262 * 2273 *
2263 * [transferOwnership] - Whether changing a role to 'owner' should also 2274 * [transferOwnership] - Whether changing a role to 'owner' downgrades the
2264 * downgrade the current owners to writers. 2275 * current owners to writers. Does nothing if the specified role is not
2276 * 'owner'.
2265 * 2277 *
2266 * Completes with a [Permission]. 2278 * Completes with a [Permission].
2267 * 2279 *
2268 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2269 * error. 2281 * error.
2270 * 2282 *
2271 * If the used [http.Client] completes with an error when making a REST call, 2283 * If the used [http.Client] completes with an error when making a REST call,
2272 * this method will complete with the same error. 2284 * this method will complete with the same error.
2273 */ 2285 */
2274 async.Future<Permission> patch(Permission request, core.String fileId, core.St ring permissionId, {core.bool transferOwnership}) { 2286 async.Future<Permission> patch(Permission request, core.String fileId, core.St ring permissionId, {core.bool transferOwnership}) {
2275 var _url = null; 2287 var _url = null;
2276 var _queryParams = new core.Map(); 2288 var _queryParams = new core.Map();
2277 var _uploadMedia = null; 2289 var _uploadMedia = null;
2278 var _uploadOptions = null; 2290 var _uploadOptions = null;
2279 var _downloadOptions = common.DownloadOptions.Metadata; 2291 var _downloadOptions = commons.DownloadOptions.Metadata;
2280 var _body = null; 2292 var _body = null;
2281 2293
2282 if (request != null) { 2294 if (request != null) {
2283 _body = convert_1.JSON.encode((request).toJson()); 2295 _body = convert_1.JSON.encode((request).toJson());
2284 } 2296 }
2285 if (fileId == null) { 2297 if (fileId == null) {
2286 throw new core.ArgumentError("Parameter fileId is required."); 2298 throw new core.ArgumentError("Parameter fileId is required.");
2287 } 2299 }
2288 if (permissionId == null) { 2300 if (permissionId == null) {
2289 throw new core.ArgumentError("Parameter permissionId is required."); 2301 throw new core.ArgumentError("Parameter permissionId is required.");
2290 } 2302 }
2291 if (transferOwnership != null) { 2303 if (transferOwnership != null) {
2292 _queryParams["transferOwnership"] = ["${transferOwnership}"]; 2304 _queryParams["transferOwnership"] = ["${transferOwnership}"];
2293 } 2305 }
2294 2306
2295 2307
2296 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/permi ssions/' + common_internal.Escaper.ecapeVariable('$permissionId'); 2308 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2297 2309
2298 var _response = _requester.request(_url, 2310 var _response = _requester.request(_url,
2299 "PATCH", 2311 "PATCH",
2300 body: _body, 2312 body: _body,
2301 queryParams: _queryParams, 2313 queryParams: _queryParams,
2302 uploadOptions: _uploadOptions, 2314 uploadOptions: _uploadOptions,
2303 uploadMedia: _uploadMedia, 2315 uploadMedia: _uploadMedia,
2304 downloadOptions: _downloadOptions); 2316 downloadOptions: _downloadOptions);
2305 return _response.then((data) => new Permission.fromJson(data)); 2317 return _response.then((data) => new Permission.fromJson(data));
2306 } 2318 }
2307 2319
2308 /** 2320 /**
2309 * Updates a permission. 2321 * Updates a permission.
2310 * 2322 *
2311 * [request] - The metadata request object. 2323 * [request] - The metadata request object.
2312 * 2324 *
2313 * Request parameters: 2325 * Request parameters:
2314 * 2326 *
2315 * [fileId] - The ID for the file. 2327 * [fileId] - The ID for the file.
2316 * 2328 *
2317 * [permissionId] - The ID for the permission. 2329 * [permissionId] - The ID for the permission.
2318 * 2330 *
2319 * [transferOwnership] - Whether changing a role to 'owner' should also 2331 * [transferOwnership] - Whether changing a role to 'owner' downgrades the
2320 * downgrade the current owners to writers. 2332 * current owners to writers. Does nothing if the specified role is not
2333 * 'owner'.
2321 * 2334 *
2322 * Completes with a [Permission]. 2335 * Completes with a [Permission].
2323 * 2336 *
2324 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2337 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2325 * error. 2338 * error.
2326 * 2339 *
2327 * If the used [http.Client] completes with an error when making a REST call, 2340 * If the used [http.Client] completes with an error when making a REST call,
2328 * this method will complete with the same error. 2341 * this method will complete with the same error.
2329 */ 2342 */
2330 async.Future<Permission> update(Permission request, core.String fileId, core.S tring permissionId, {core.bool transferOwnership}) { 2343 async.Future<Permission> update(Permission request, core.String fileId, core.S tring permissionId, {core.bool transferOwnership}) {
2331 var _url = null; 2344 var _url = null;
2332 var _queryParams = new core.Map(); 2345 var _queryParams = new core.Map();
2333 var _uploadMedia = null; 2346 var _uploadMedia = null;
2334 var _uploadOptions = null; 2347 var _uploadOptions = null;
2335 var _downloadOptions = common.DownloadOptions.Metadata; 2348 var _downloadOptions = commons.DownloadOptions.Metadata;
2336 var _body = null; 2349 var _body = null;
2337 2350
2338 if (request != null) { 2351 if (request != null) {
2339 _body = convert_1.JSON.encode((request).toJson()); 2352 _body = convert_1.JSON.encode((request).toJson());
2340 } 2353 }
2341 if (fileId == null) { 2354 if (fileId == null) {
2342 throw new core.ArgumentError("Parameter fileId is required."); 2355 throw new core.ArgumentError("Parameter fileId is required.");
2343 } 2356 }
2344 if (permissionId == null) { 2357 if (permissionId == null) {
2345 throw new core.ArgumentError("Parameter permissionId is required."); 2358 throw new core.ArgumentError("Parameter permissionId is required.");
2346 } 2359 }
2347 if (transferOwnership != null) { 2360 if (transferOwnership != null) {
2348 _queryParams["transferOwnership"] = ["${transferOwnership}"]; 2361 _queryParams["transferOwnership"] = ["${transferOwnership}"];
2349 } 2362 }
2350 2363
2351 2364
2352 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/permi ssions/' + common_internal.Escaper.ecapeVariable('$permissionId'); 2365 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2353 2366
2354 var _response = _requester.request(_url, 2367 var _response = _requester.request(_url,
2355 "PUT", 2368 "PUT",
2356 body: _body, 2369 body: _body,
2357 queryParams: _queryParams, 2370 queryParams: _queryParams,
2358 uploadOptions: _uploadOptions, 2371 uploadOptions: _uploadOptions,
2359 uploadMedia: _uploadMedia, 2372 uploadMedia: _uploadMedia,
2360 downloadOptions: _downloadOptions); 2373 downloadOptions: _downloadOptions);
2361 return _response.then((data) => new Permission.fromJson(data)); 2374 return _response.then((data) => new Permission.fromJson(data));
2362 } 2375 }
2363 2376
2364 } 2377 }
2365 2378
2366 2379
2367 /** Not documented yet. */
2368 class PropertiesResourceApi { 2380 class PropertiesResourceApi {
2369 final common_internal.ApiRequester _requester; 2381 final commons.ApiRequester _requester;
2370 2382
2371 PropertiesResourceApi(common_internal.ApiRequester client) : 2383 PropertiesResourceApi(commons.ApiRequester client) :
2372 _requester = client; 2384 _requester = client;
2373 2385
2374 /** 2386 /**
2375 * Deletes a property. 2387 * Deletes a property.
2376 * 2388 *
2377 * Request parameters: 2389 * Request parameters:
2378 * 2390 *
2379 * [fileId] - The ID of the file. 2391 * [fileId] - The ID of the file.
2380 * 2392 *
2381 * [propertyKey] - The key of the property. 2393 * [propertyKey] - The key of the property.
2382 * 2394 *
2383 * [visibility] - The visibility of the property. 2395 * [visibility] - The visibility of the property.
2384 * 2396 *
2385 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2397 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2386 * error. 2398 * error.
2387 * 2399 *
2388 * If the used [http.Client] completes with an error when making a REST call, 2400 * If the used [http.Client] completes with an error when making a REST call,
2389 * this method will complete with the same error. 2401 * this method will complete with the same error.
2390 */ 2402 */
2391 async.Future delete(core.String fileId, core.String propertyKey, {core.String visibility}) { 2403 async.Future delete(core.String fileId, core.String propertyKey, {core.String visibility}) {
2392 var _url = null; 2404 var _url = null;
2393 var _queryParams = new core.Map(); 2405 var _queryParams = new core.Map();
2394 var _uploadMedia = null; 2406 var _uploadMedia = null;
2395 var _uploadOptions = null; 2407 var _uploadOptions = null;
2396 var _downloadOptions = common.DownloadOptions.Metadata; 2408 var _downloadOptions = commons.DownloadOptions.Metadata;
2397 var _body = null; 2409 var _body = null;
2398 2410
2399 if (fileId == null) { 2411 if (fileId == null) {
2400 throw new core.ArgumentError("Parameter fileId is required."); 2412 throw new core.ArgumentError("Parameter fileId is required.");
2401 } 2413 }
2402 if (propertyKey == null) { 2414 if (propertyKey == null) {
2403 throw new core.ArgumentError("Parameter propertyKey is required."); 2415 throw new core.ArgumentError("Parameter propertyKey is required.");
2404 } 2416 }
2405 if (visibility != null) { 2417 if (visibility != null) {
2406 _queryParams["visibility"] = [visibility]; 2418 _queryParams["visibility"] = [visibility];
2407 } 2419 }
2408 2420
2409 _downloadOptions = null; 2421 _downloadOptions = null;
2410 2422
2411 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/prope rties/' + common_internal.Escaper.ecapeVariable('$propertyKey'); 2423 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey');
2412 2424
2413 var _response = _requester.request(_url, 2425 var _response = _requester.request(_url,
2414 "DELETE", 2426 "DELETE",
2415 body: _body, 2427 body: _body,
2416 queryParams: _queryParams, 2428 queryParams: _queryParams,
2417 uploadOptions: _uploadOptions, 2429 uploadOptions: _uploadOptions,
2418 uploadMedia: _uploadMedia, 2430 uploadMedia: _uploadMedia,
2419 downloadOptions: _downloadOptions); 2431 downloadOptions: _downloadOptions);
2420 return _response.then((data) => null); 2432 return _response.then((data) => null);
2421 } 2433 }
2422 2434
2423 /** 2435 /**
2424 * Gets a property by its key. 2436 * Gets a property by its key.
2425 * 2437 *
2426 * Request parameters: 2438 * Request parameters:
2427 * 2439 *
2428 * [fileId] - The ID of the file. 2440 * [fileId] - The ID of the file.
2429 * 2441 *
2430 * [propertyKey] - The key of the property. 2442 * [propertyKey] - The key of the property.
2431 * 2443 *
2432 * [visibility] - The visibility of the property. 2444 * [visibility] - The visibility of the property.
2433 * 2445 *
2434 * Completes with a [Property]. 2446 * Completes with a [Property].
2435 * 2447 *
2436 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2448 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2437 * error. 2449 * error.
2438 * 2450 *
2439 * If the used [http.Client] completes with an error when making a REST call, 2451 * If the used [http.Client] completes with an error when making a REST call,
2440 * this method will complete with the same error. 2452 * this method will complete with the same error.
2441 */ 2453 */
2442 async.Future<Property> get(core.String fileId, core.String propertyKey, {core. String visibility}) { 2454 async.Future<Property> get(core.String fileId, core.String propertyKey, {core. String visibility}) {
2443 var _url = null; 2455 var _url = null;
2444 var _queryParams = new core.Map(); 2456 var _queryParams = new core.Map();
2445 var _uploadMedia = null; 2457 var _uploadMedia = null;
2446 var _uploadOptions = null; 2458 var _uploadOptions = null;
2447 var _downloadOptions = common.DownloadOptions.Metadata; 2459 var _downloadOptions = commons.DownloadOptions.Metadata;
2448 var _body = null; 2460 var _body = null;
2449 2461
2450 if (fileId == null) { 2462 if (fileId == null) {
2451 throw new core.ArgumentError("Parameter fileId is required."); 2463 throw new core.ArgumentError("Parameter fileId is required.");
2452 } 2464 }
2453 if (propertyKey == null) { 2465 if (propertyKey == null) {
2454 throw new core.ArgumentError("Parameter propertyKey is required."); 2466 throw new core.ArgumentError("Parameter propertyKey is required.");
2455 } 2467 }
2456 if (visibility != null) { 2468 if (visibility != null) {
2457 _queryParams["visibility"] = [visibility]; 2469 _queryParams["visibility"] = [visibility];
2458 } 2470 }
2459 2471
2460 2472
2461 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/prope rties/' + common_internal.Escaper.ecapeVariable('$propertyKey'); 2473 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey');
2462 2474
2463 var _response = _requester.request(_url, 2475 var _response = _requester.request(_url,
2464 "GET", 2476 "GET",
2465 body: _body, 2477 body: _body,
2466 queryParams: _queryParams, 2478 queryParams: _queryParams,
2467 uploadOptions: _uploadOptions, 2479 uploadOptions: _uploadOptions,
2468 uploadMedia: _uploadMedia, 2480 uploadMedia: _uploadMedia,
2469 downloadOptions: _downloadOptions); 2481 downloadOptions: _downloadOptions);
2470 return _response.then((data) => new Property.fromJson(data)); 2482 return _response.then((data) => new Property.fromJson(data));
2471 } 2483 }
2472 2484
2473 /** 2485 /**
2474 * Adds a property to a file. 2486 * Adds a property to a file.
2475 * 2487 *
2476 * [request] - The metadata request object. 2488 * [request] - The metadata request object.
2477 * 2489 *
2478 * Request parameters: 2490 * Request parameters:
2479 * 2491 *
2480 * [fileId] - The ID of the file. 2492 * [fileId] - The ID of the file.
2481 * 2493 *
2482 * Completes with a [Property]. 2494 * Completes with a [Property].
2483 * 2495 *
2484 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2496 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2485 * error. 2497 * error.
2486 * 2498 *
2487 * If the used [http.Client] completes with an error when making a REST call, 2499 * If the used [http.Client] completes with an error when making a REST call,
2488 * this method will complete with the same error. 2500 * this method will complete with the same error.
2489 */ 2501 */
2490 async.Future<Property> insert(Property request, core.String fileId) { 2502 async.Future<Property> insert(Property request, core.String fileId) {
2491 var _url = null; 2503 var _url = null;
2492 var _queryParams = new core.Map(); 2504 var _queryParams = new core.Map();
2493 var _uploadMedia = null; 2505 var _uploadMedia = null;
2494 var _uploadOptions = null; 2506 var _uploadOptions = null;
2495 var _downloadOptions = common.DownloadOptions.Metadata; 2507 var _downloadOptions = commons.DownloadOptions.Metadata;
2496 var _body = null; 2508 var _body = null;
2497 2509
2498 if (request != null) { 2510 if (request != null) {
2499 _body = convert_1.JSON.encode((request).toJson()); 2511 _body = convert_1.JSON.encode((request).toJson());
2500 } 2512 }
2501 if (fileId == null) { 2513 if (fileId == null) {
2502 throw new core.ArgumentError("Parameter fileId is required."); 2514 throw new core.ArgumentError("Parameter fileId is required.");
2503 } 2515 }
2504 2516
2505 2517
2506 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/prope rties'; 2518 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties';
2507 2519
2508 var _response = _requester.request(_url, 2520 var _response = _requester.request(_url,
2509 "POST", 2521 "POST",
2510 body: _body, 2522 body: _body,
2511 queryParams: _queryParams, 2523 queryParams: _queryParams,
2512 uploadOptions: _uploadOptions, 2524 uploadOptions: _uploadOptions,
2513 uploadMedia: _uploadMedia, 2525 uploadMedia: _uploadMedia,
2514 downloadOptions: _downloadOptions); 2526 downloadOptions: _downloadOptions);
2515 return _response.then((data) => new Property.fromJson(data)); 2527 return _response.then((data) => new Property.fromJson(data));
2516 } 2528 }
2517 2529
2518 /** 2530 /**
2519 * Lists a file's properties. 2531 * Lists a file's properties.
2520 * 2532 *
2521 * Request parameters: 2533 * Request parameters:
2522 * 2534 *
2523 * [fileId] - The ID of the file. 2535 * [fileId] - The ID of the file.
2524 * 2536 *
2525 * Completes with a [PropertyList]. 2537 * Completes with a [PropertyList].
2526 * 2538 *
2527 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2539 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2528 * error. 2540 * error.
2529 * 2541 *
2530 * If the used [http.Client] completes with an error when making a REST call, 2542 * If the used [http.Client] completes with an error when making a REST call,
2531 * this method will complete with the same error. 2543 * this method will complete with the same error.
2532 */ 2544 */
2533 async.Future<PropertyList> list(core.String fileId) { 2545 async.Future<PropertyList> list(core.String fileId) {
2534 var _url = null; 2546 var _url = null;
2535 var _queryParams = new core.Map(); 2547 var _queryParams = new core.Map();
2536 var _uploadMedia = null; 2548 var _uploadMedia = null;
2537 var _uploadOptions = null; 2549 var _uploadOptions = null;
2538 var _downloadOptions = common.DownloadOptions.Metadata; 2550 var _downloadOptions = commons.DownloadOptions.Metadata;
2539 var _body = null; 2551 var _body = null;
2540 2552
2541 if (fileId == null) { 2553 if (fileId == null) {
2542 throw new core.ArgumentError("Parameter fileId is required."); 2554 throw new core.ArgumentError("Parameter fileId is required.");
2543 } 2555 }
2544 2556
2545 2557
2546 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/prope rties'; 2558 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties';
2547 2559
2548 var _response = _requester.request(_url, 2560 var _response = _requester.request(_url,
2549 "GET", 2561 "GET",
2550 body: _body, 2562 body: _body,
2551 queryParams: _queryParams, 2563 queryParams: _queryParams,
2552 uploadOptions: _uploadOptions, 2564 uploadOptions: _uploadOptions,
2553 uploadMedia: _uploadMedia, 2565 uploadMedia: _uploadMedia,
2554 downloadOptions: _downloadOptions); 2566 downloadOptions: _downloadOptions);
2555 return _response.then((data) => new PropertyList.fromJson(data)); 2567 return _response.then((data) => new PropertyList.fromJson(data));
2556 } 2568 }
2557 2569
2558 /** 2570 /**
2559 * Updates a property. This method supports patch semantics. 2571 * Updates a property. This method supports patch semantics.
2560 * 2572 *
2561 * [request] - The metadata request object. 2573 * [request] - The metadata request object.
2562 * 2574 *
2563 * Request parameters: 2575 * Request parameters:
2564 * 2576 *
2565 * [fileId] - The ID of the file. 2577 * [fileId] - The ID of the file.
2566 * 2578 *
2567 * [propertyKey] - The key of the property. 2579 * [propertyKey] - The key of the property.
2568 * 2580 *
2569 * [visibility] - The visibility of the property. 2581 * [visibility] - The visibility of the property.
2570 * 2582 *
2571 * Completes with a [Property]. 2583 * Completes with a [Property].
2572 * 2584 *
2573 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2585 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2574 * error. 2586 * error.
2575 * 2587 *
2576 * If the used [http.Client] completes with an error when making a REST call, 2588 * If the used [http.Client] completes with an error when making a REST call,
2577 * this method will complete with the same error. 2589 * this method will complete with the same error.
2578 */ 2590 */
2579 async.Future<Property> patch(Property request, core.String fileId, core.String propertyKey, {core.String visibility}) { 2591 async.Future<Property> patch(Property request, core.String fileId, core.String propertyKey, {core.String visibility}) {
2580 var _url = null; 2592 var _url = null;
2581 var _queryParams = new core.Map(); 2593 var _queryParams = new core.Map();
2582 var _uploadMedia = null; 2594 var _uploadMedia = null;
2583 var _uploadOptions = null; 2595 var _uploadOptions = null;
2584 var _downloadOptions = common.DownloadOptions.Metadata; 2596 var _downloadOptions = commons.DownloadOptions.Metadata;
2585 var _body = null; 2597 var _body = null;
2586 2598
2587 if (request != null) { 2599 if (request != null) {
2588 _body = convert_1.JSON.encode((request).toJson()); 2600 _body = convert_1.JSON.encode((request).toJson());
2589 } 2601 }
2590 if (fileId == null) { 2602 if (fileId == null) {
2591 throw new core.ArgumentError("Parameter fileId is required."); 2603 throw new core.ArgumentError("Parameter fileId is required.");
2592 } 2604 }
2593 if (propertyKey == null) { 2605 if (propertyKey == null) {
2594 throw new core.ArgumentError("Parameter propertyKey is required."); 2606 throw new core.ArgumentError("Parameter propertyKey is required.");
2595 } 2607 }
2596 if (visibility != null) { 2608 if (visibility != null) {
2597 _queryParams["visibility"] = [visibility]; 2609 _queryParams["visibility"] = [visibility];
2598 } 2610 }
2599 2611
2600 2612
2601 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/prope rties/' + common_internal.Escaper.ecapeVariable('$propertyKey'); 2613 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey');
2602 2614
2603 var _response = _requester.request(_url, 2615 var _response = _requester.request(_url,
2604 "PATCH", 2616 "PATCH",
2605 body: _body, 2617 body: _body,
2606 queryParams: _queryParams, 2618 queryParams: _queryParams,
2607 uploadOptions: _uploadOptions, 2619 uploadOptions: _uploadOptions,
2608 uploadMedia: _uploadMedia, 2620 uploadMedia: _uploadMedia,
2609 downloadOptions: _downloadOptions); 2621 downloadOptions: _downloadOptions);
2610 return _response.then((data) => new Property.fromJson(data)); 2622 return _response.then((data) => new Property.fromJson(data));
2611 } 2623 }
2612 2624
2613 /** 2625 /**
2614 * Updates a property. 2626 * Updates a property.
2615 * 2627 *
2616 * [request] - The metadata request object. 2628 * [request] - The metadata request object.
2617 * 2629 *
2618 * Request parameters: 2630 * Request parameters:
2619 * 2631 *
2620 * [fileId] - The ID of the file. 2632 * [fileId] - The ID of the file.
2621 * 2633 *
2622 * [propertyKey] - The key of the property. 2634 * [propertyKey] - The key of the property.
2623 * 2635 *
2624 * [visibility] - The visibility of the property. 2636 * [visibility] - The visibility of the property.
2625 * 2637 *
2626 * Completes with a [Property]. 2638 * Completes with a [Property].
2627 * 2639 *
2628 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2640 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2629 * error. 2641 * error.
2630 * 2642 *
2631 * If the used [http.Client] completes with an error when making a REST call, 2643 * If the used [http.Client] completes with an error when making a REST call,
2632 * this method will complete with the same error. 2644 * this method will complete with the same error.
2633 */ 2645 */
2634 async.Future<Property> update(Property request, core.String fileId, core.Strin g propertyKey, {core.String visibility}) { 2646 async.Future<Property> update(Property request, core.String fileId, core.Strin g propertyKey, {core.String visibility}) {
2635 var _url = null; 2647 var _url = null;
2636 var _queryParams = new core.Map(); 2648 var _queryParams = new core.Map();
2637 var _uploadMedia = null; 2649 var _uploadMedia = null;
2638 var _uploadOptions = null; 2650 var _uploadOptions = null;
2639 var _downloadOptions = common.DownloadOptions.Metadata; 2651 var _downloadOptions = commons.DownloadOptions.Metadata;
2640 var _body = null; 2652 var _body = null;
2641 2653
2642 if (request != null) { 2654 if (request != null) {
2643 _body = convert_1.JSON.encode((request).toJson()); 2655 _body = convert_1.JSON.encode((request).toJson());
2644 } 2656 }
2645 if (fileId == null) { 2657 if (fileId == null) {
2646 throw new core.ArgumentError("Parameter fileId is required."); 2658 throw new core.ArgumentError("Parameter fileId is required.");
2647 } 2659 }
2648 if (propertyKey == null) { 2660 if (propertyKey == null) {
2649 throw new core.ArgumentError("Parameter propertyKey is required."); 2661 throw new core.ArgumentError("Parameter propertyKey is required.");
2650 } 2662 }
2651 if (visibility != null) { 2663 if (visibility != null) {
2652 _queryParams["visibility"] = [visibility]; 2664 _queryParams["visibility"] = [visibility];
2653 } 2665 }
2654 2666
2655 2667
2656 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/prope rties/' + common_internal.Escaper.ecapeVariable('$propertyKey'); 2668 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey');
2657 2669
2658 var _response = _requester.request(_url, 2670 var _response = _requester.request(_url,
2659 "PUT", 2671 "PUT",
2660 body: _body, 2672 body: _body,
2661 queryParams: _queryParams, 2673 queryParams: _queryParams,
2662 uploadOptions: _uploadOptions, 2674 uploadOptions: _uploadOptions,
2663 uploadMedia: _uploadMedia, 2675 uploadMedia: _uploadMedia,
2664 downloadOptions: _downloadOptions); 2676 downloadOptions: _downloadOptions);
2665 return _response.then((data) => new Property.fromJson(data)); 2677 return _response.then((data) => new Property.fromJson(data));
2666 } 2678 }
2667 2679
2668 } 2680 }
2669 2681
2670 2682
2671 /** Not documented yet. */
2672 class RealtimeResourceApi { 2683 class RealtimeResourceApi {
2673 final common_internal.ApiRequester _requester; 2684 final commons.ApiRequester _requester;
2674 2685
2675 RealtimeResourceApi(common_internal.ApiRequester client) : 2686 RealtimeResourceApi(commons.ApiRequester client) :
2676 _requester = client; 2687 _requester = client;
2677 2688
2678 /** 2689 /**
2679 * Exports the contents of the Realtime API data model associated with this 2690 * Exports the contents of the Realtime API data model associated with this
2680 * file as JSON. 2691 * file as JSON.
2681 * 2692 *
2682 * Request parameters: 2693 * Request parameters:
2683 * 2694 *
2684 * [fileId] - The ID of the file that the Realtime API data model is 2695 * [fileId] - The ID of the file that the Realtime API data model is
2685 * associated with. 2696 * associated with.
2686 * 2697 *
2687 * [revision] - The revision of the Realtime API data model to export. 2698 * [revision] - The revision of the Realtime API data model to export.
2688 * Revisions start at 1 (the initial empty data model) and are incremented 2699 * Revisions start at 1 (the initial empty data model) and are incremented
2689 * with each change. If this parameter is excluded, the most recent data model 2700 * with each change. If this parameter is excluded, the most recent data model
2690 * will be returned. 2701 * will be returned.
2691 * 2702 *
2692 * [downloadOptions] - Options for downloading. A download can be either a 2703 * [downloadOptions] - Options for downloading. A download can be either a
2693 * Metadata (default) or Media download. Partial Media downloads are possible 2704 * Metadata (default) or Media download. Partial Media downloads are possible
2694 * as well. 2705 * as well.
2695 * 2706 *
2696 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2697 * error. 2708 * error.
2698 * 2709 *
2699 * If the used [http.Client] completes with an error when making a REST call, 2710 * If the used [http.Client] completes with an error when making a REST call,
2700 * this method will complete with the same error. 2711 * this method will complete with the same error.
2701 */ 2712 */
2702 async.Future get(core.String fileId, {core.int revision, common.DownloadOption s downloadOptions: common.DownloadOptions.Metadata}) { 2713 async.Future get(core.String fileId, {core.int revision, commons.DownloadOptio ns downloadOptions: commons.DownloadOptions.Metadata}) {
2703 var _url = null; 2714 var _url = null;
2704 var _queryParams = new core.Map(); 2715 var _queryParams = new core.Map();
2705 var _uploadMedia = null; 2716 var _uploadMedia = null;
2706 var _uploadOptions = null; 2717 var _uploadOptions = null;
2707 var _downloadOptions = common.DownloadOptions.Metadata; 2718 var _downloadOptions = commons.DownloadOptions.Metadata;
2708 var _body = null; 2719 var _body = null;
2709 2720
2710 if (fileId == null) { 2721 if (fileId == null) {
2711 throw new core.ArgumentError("Parameter fileId is required."); 2722 throw new core.ArgumentError("Parameter fileId is required.");
2712 } 2723 }
2713 if (revision != null) { 2724 if (revision != null) {
2714 _queryParams["revision"] = ["${revision}"]; 2725 _queryParams["revision"] = ["${revision}"];
2715 } 2726 }
2716 2727
2717 _downloadOptions = downloadOptions; 2728 _downloadOptions = downloadOptions;
2718 2729
2719 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/realt ime'; 2730 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/realtime';
2720 2731
2721 var _response = _requester.request(_url, 2732 var _response = _requester.request(_url,
2722 "GET", 2733 "GET",
2723 body: _body, 2734 body: _body,
2724 queryParams: _queryParams, 2735 queryParams: _queryParams,
2725 uploadOptions: _uploadOptions, 2736 uploadOptions: _uploadOptions,
2726 uploadMedia: _uploadMedia, 2737 uploadMedia: _uploadMedia,
2727 downloadOptions: _downloadOptions); 2738 downloadOptions: _downloadOptions);
2728 if (_downloadOptions == null || 2739 if (_downloadOptions == null ||
2729 _downloadOptions == common.DownloadOptions.Metadata) { 2740 _downloadOptions == commons.DownloadOptions.Metadata) {
2730 return _response.then((data) => null); 2741 return _response.then((data) => null);
2731 } else { 2742 } else {
2732 return _response; 2743 return _response;
2733 } 2744 }
2734 } 2745 }
2735 2746
2736 /** 2747 /**
2737 * Overwrites the Realtime API data model associated with this file with the 2748 * Overwrites the Realtime API data model associated with this file with the
2738 * provided JSON data model. 2749 * provided JSON data model.
2739 * 2750 *
2740 * Request parameters: 2751 * Request parameters:
2741 * 2752 *
2742 * [fileId] - The ID of the file that the Realtime API data model is 2753 * [fileId] - The ID of the file that the Realtime API data model is
2743 * associated with. 2754 * associated with.
2744 * 2755 *
2745 * [baseRevision] - The revision of the model to diff the uploaded model 2756 * [baseRevision] - The revision of the model to diff the uploaded model
2746 * against. If set, the uploaded model is diffed against the provided revision 2757 * against. If set, the uploaded model is diffed against the provided revision
2747 * and those differences are merged with any changes made to the model after 2758 * and those differences are merged with any changes made to the model after
2748 * the provided revision. If not set, the uploaded model replaces the current 2759 * the provided revision. If not set, the uploaded model replaces the current
2749 * model on the server. 2760 * model on the server.
2750 * 2761 *
2751 * [uploadMedia] - The media to upload. 2762 * [uploadMedia] - The media to upload.
2752 * 2763 *
2753 * [uploadOptions] - Options for the media upload. Streaming Media without the 2764 * [uploadOptions] - Options for the media upload. Streaming Media without the
2754 * length being known ahead of time is only supported via resumable uploads. 2765 * length being known ahead of time is only supported via resumable uploads.
2755 * 2766 *
2756 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2767 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2757 * error. 2768 * error.
2758 * 2769 *
2759 * If the used [http.Client] completes with an error when making a REST call, 2770 * If the used [http.Client] completes with an error when making a REST call,
2760 * this method will complete with the same error. 2771 * this method will complete with the same error.
2761 */ 2772 */
2762 async.Future update(core.String fileId, {core.String baseRevision, common.Uplo adOptions uploadOptions : common.UploadOptions.Default, common.Media uploadMedia }) { 2773 async.Future update(core.String fileId, {core.String baseRevision, commons.Upl oadOptions uploadOptions : commons.UploadOptions.Default, commons.Media uploadMe dia}) {
2763 var _url = null; 2774 var _url = null;
2764 var _queryParams = new core.Map(); 2775 var _queryParams = new core.Map();
2765 var _uploadMedia = null; 2776 var _uploadMedia = null;
2766 var _uploadOptions = null; 2777 var _uploadOptions = null;
2767 var _downloadOptions = common.DownloadOptions.Metadata; 2778 var _downloadOptions = commons.DownloadOptions.Metadata;
2768 var _body = null; 2779 var _body = null;
2769 2780
2770 if (fileId == null) { 2781 if (fileId == null) {
2771 throw new core.ArgumentError("Parameter fileId is required."); 2782 throw new core.ArgumentError("Parameter fileId is required.");
2772 } 2783 }
2773 if (baseRevision != null) { 2784 if (baseRevision != null) {
2774 _queryParams["baseRevision"] = [baseRevision]; 2785 _queryParams["baseRevision"] = [baseRevision];
2775 } 2786 }
2776 2787
2777 _uploadMedia = uploadMedia; 2788 _uploadMedia = uploadMedia;
2778 _uploadOptions = uploadOptions; 2789 _uploadOptions = uploadOptions;
2779 _downloadOptions = null; 2790 _downloadOptions = null;
2780 2791
2781 if (_uploadMedia == null) { 2792 if (_uploadMedia == null) {
2782 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/rea ltime'; 2793 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/realtime';
2783 } else if (_uploadOptions is common.ResumableUploadOptions) { 2794 } else if (_uploadOptions is commons.ResumableUploadOptions) {
2784 _url = '/resumable/upload/drive/v2/files/' + common_internal.Escaper.ecape Variable('$fileId') + '/realtime'; 2795 _url = '/resumable/upload/drive/v2/files/' + commons.Escaper.ecapeVariable ('$fileId') + '/realtime';
2785 } else { 2796 } else {
2786 _url = '/upload/drive/v2/files/' + common_internal.Escaper.ecapeVariable(' $fileId') + '/realtime'; 2797 _url = '/upload/drive/v2/files/' + commons.Escaper.ecapeVariable('$fileId' ) + '/realtime';
2787 } 2798 }
2788 2799
2789 2800
2790 var _response = _requester.request(_url, 2801 var _response = _requester.request(_url,
2791 "PUT", 2802 "PUT",
2792 body: _body, 2803 body: _body,
2793 queryParams: _queryParams, 2804 queryParams: _queryParams,
2794 uploadOptions: _uploadOptions, 2805 uploadOptions: _uploadOptions,
2795 uploadMedia: _uploadMedia, 2806 uploadMedia: _uploadMedia,
2796 downloadOptions: _downloadOptions); 2807 downloadOptions: _downloadOptions);
2797 return _response.then((data) => null); 2808 return _response.then((data) => null);
2798 } 2809 }
2799 2810
2800 } 2811 }
2801 2812
2802 2813
2803 /** Not documented yet. */
2804 class RepliesResourceApi { 2814 class RepliesResourceApi {
2805 final common_internal.ApiRequester _requester; 2815 final commons.ApiRequester _requester;
2806 2816
2807 RepliesResourceApi(common_internal.ApiRequester client) : 2817 RepliesResourceApi(commons.ApiRequester client) :
2808 _requester = client; 2818 _requester = client;
2809 2819
2810 /** 2820 /**
2811 * Deletes a reply. 2821 * Deletes a reply.
2812 * 2822 *
2813 * Request parameters: 2823 * Request parameters:
2814 * 2824 *
2815 * [fileId] - The ID of the file. 2825 * [fileId] - The ID of the file.
2816 * 2826 *
2817 * [commentId] - The ID of the comment. 2827 * [commentId] - The ID of the comment.
2818 * 2828 *
2819 * [replyId] - The ID of the reply. 2829 * [replyId] - The ID of the reply.
2820 * 2830 *
2821 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2831 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2822 * error. 2832 * error.
2823 * 2833 *
2824 * If the used [http.Client] completes with an error when making a REST call, 2834 * If the used [http.Client] completes with an error when making a REST call,
2825 * this method will complete with the same error. 2835 * this method will complete with the same error.
2826 */ 2836 */
2827 async.Future delete(core.String fileId, core.String commentId, core.String rep lyId) { 2837 async.Future delete(core.String fileId, core.String commentId, core.String rep lyId) {
2828 var _url = null; 2838 var _url = null;
2829 var _queryParams = new core.Map(); 2839 var _queryParams = new core.Map();
2830 var _uploadMedia = null; 2840 var _uploadMedia = null;
2831 var _uploadOptions = null; 2841 var _uploadOptions = null;
2832 var _downloadOptions = common.DownloadOptions.Metadata; 2842 var _downloadOptions = commons.DownloadOptions.Metadata;
2833 var _body = null; 2843 var _body = null;
2834 2844
2835 if (fileId == null) { 2845 if (fileId == null) {
2836 throw new core.ArgumentError("Parameter fileId is required."); 2846 throw new core.ArgumentError("Parameter fileId is required.");
2837 } 2847 }
2838 if (commentId == null) { 2848 if (commentId == null) {
2839 throw new core.ArgumentError("Parameter commentId is required."); 2849 throw new core.ArgumentError("Parameter commentId is required.");
2840 } 2850 }
2841 if (replyId == null) { 2851 if (replyId == null) {
2842 throw new core.ArgumentError("Parameter replyId is required."); 2852 throw new core.ArgumentError("Parameter replyId is required.");
2843 } 2853 }
2844 2854
2845 _downloadOptions = null; 2855 _downloadOptions = null;
2846 2856
2847 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId') + '/replies/' + comm on_internal.Escaper.ecapeVariable('$replyId'); 2857 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId');
2848 2858
2849 var _response = _requester.request(_url, 2859 var _response = _requester.request(_url,
2850 "DELETE", 2860 "DELETE",
2851 body: _body, 2861 body: _body,
2852 queryParams: _queryParams, 2862 queryParams: _queryParams,
2853 uploadOptions: _uploadOptions, 2863 uploadOptions: _uploadOptions,
2854 uploadMedia: _uploadMedia, 2864 uploadMedia: _uploadMedia,
2855 downloadOptions: _downloadOptions); 2865 downloadOptions: _downloadOptions);
2856 return _response.then((data) => null); 2866 return _response.then((data) => null);
2857 } 2867 }
2858 2868
2859 /** 2869 /**
2860 * Gets a reply. 2870 * Gets a reply.
2861 * 2871 *
2862 * Request parameters: 2872 * Request parameters:
2863 * 2873 *
2864 * [fileId] - The ID of the file. 2874 * [fileId] - The ID of the file.
2865 * 2875 *
2866 * [commentId] - The ID of the comment. 2876 * [commentId] - The ID of the comment.
2867 * 2877 *
2868 * [replyId] - The ID of the reply. 2878 * [replyId] - The ID of the reply.
2869 * 2879 *
2870 * [includeDeleted] - If set, this will succeed when retrieving a deleted 2880 * [includeDeleted] - If set, this will succeed when retrieving a deleted
2871 * reply. 2881 * reply.
2872 * 2882 *
2873 * Completes with a [CommentReply]. 2883 * Completes with a [CommentReply].
2874 * 2884 *
2875 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2885 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2876 * error. 2886 * error.
2877 * 2887 *
2878 * If the used [http.Client] completes with an error when making a REST call, 2888 * If the used [http.Client] completes with an error when making a REST call,
2879 * this method will complete with the same error. 2889 * this method will complete with the same error.
2880 */ 2890 */
2881 async.Future<CommentReply> get(core.String fileId, core.String commentId, core .String replyId, {core.bool includeDeleted}) { 2891 async.Future<CommentReply> get(core.String fileId, core.String commentId, core .String replyId, {core.bool includeDeleted}) {
2882 var _url = null; 2892 var _url = null;
2883 var _queryParams = new core.Map(); 2893 var _queryParams = new core.Map();
2884 var _uploadMedia = null; 2894 var _uploadMedia = null;
2885 var _uploadOptions = null; 2895 var _uploadOptions = null;
2886 var _downloadOptions = common.DownloadOptions.Metadata; 2896 var _downloadOptions = commons.DownloadOptions.Metadata;
2887 var _body = null; 2897 var _body = null;
2888 2898
2889 if (fileId == null) { 2899 if (fileId == null) {
2890 throw new core.ArgumentError("Parameter fileId is required."); 2900 throw new core.ArgumentError("Parameter fileId is required.");
2891 } 2901 }
2892 if (commentId == null) { 2902 if (commentId == null) {
2893 throw new core.ArgumentError("Parameter commentId is required."); 2903 throw new core.ArgumentError("Parameter commentId is required.");
2894 } 2904 }
2895 if (replyId == null) { 2905 if (replyId == null) {
2896 throw new core.ArgumentError("Parameter replyId is required."); 2906 throw new core.ArgumentError("Parameter replyId is required.");
2897 } 2907 }
2898 if (includeDeleted != null) { 2908 if (includeDeleted != null) {
2899 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 2909 _queryParams["includeDeleted"] = ["${includeDeleted}"];
2900 } 2910 }
2901 2911
2902 2912
2903 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId') + '/replies/' + comm on_internal.Escaper.ecapeVariable('$replyId'); 2913 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId');
2904 2914
2905 var _response = _requester.request(_url, 2915 var _response = _requester.request(_url,
2906 "GET", 2916 "GET",
2907 body: _body, 2917 body: _body,
2908 queryParams: _queryParams, 2918 queryParams: _queryParams,
2909 uploadOptions: _uploadOptions, 2919 uploadOptions: _uploadOptions,
2910 uploadMedia: _uploadMedia, 2920 uploadMedia: _uploadMedia,
2911 downloadOptions: _downloadOptions); 2921 downloadOptions: _downloadOptions);
2912 return _response.then((data) => new CommentReply.fromJson(data)); 2922 return _response.then((data) => new CommentReply.fromJson(data));
2913 } 2923 }
2914 2924
2915 /** 2925 /**
2916 * Creates a new reply to the given comment. 2926 * Creates a new reply to the given comment.
2917 * 2927 *
2918 * [request] - The metadata request object. 2928 * [request] - The metadata request object.
2919 * 2929 *
2920 * Request parameters: 2930 * Request parameters:
2921 * 2931 *
2922 * [fileId] - The ID of the file. 2932 * [fileId] - The ID of the file.
2923 * 2933 *
2924 * [commentId] - The ID of the comment. 2934 * [commentId] - The ID of the comment.
2925 * 2935 *
2926 * Completes with a [CommentReply]. 2936 * Completes with a [CommentReply].
2927 * 2937 *
2928 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2938 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2929 * error. 2939 * error.
2930 * 2940 *
2931 * If the used [http.Client] completes with an error when making a REST call, 2941 * If the used [http.Client] completes with an error when making a REST call,
2932 * this method will complete with the same error. 2942 * this method will complete with the same error.
2933 */ 2943 */
2934 async.Future<CommentReply> insert(CommentReply request, core.String fileId, co re.String commentId) { 2944 async.Future<CommentReply> insert(CommentReply request, core.String fileId, co re.String commentId) {
2935 var _url = null; 2945 var _url = null;
2936 var _queryParams = new core.Map(); 2946 var _queryParams = new core.Map();
2937 var _uploadMedia = null; 2947 var _uploadMedia = null;
2938 var _uploadOptions = null; 2948 var _uploadOptions = null;
2939 var _downloadOptions = common.DownloadOptions.Metadata; 2949 var _downloadOptions = commons.DownloadOptions.Metadata;
2940 var _body = null; 2950 var _body = null;
2941 2951
2942 if (request != null) { 2952 if (request != null) {
2943 _body = convert_1.JSON.encode((request).toJson()); 2953 _body = convert_1.JSON.encode((request).toJson());
2944 } 2954 }
2945 if (fileId == null) { 2955 if (fileId == null) {
2946 throw new core.ArgumentError("Parameter fileId is required."); 2956 throw new core.ArgumentError("Parameter fileId is required.");
2947 } 2957 }
2948 if (commentId == null) { 2958 if (commentId == null) {
2949 throw new core.ArgumentError("Parameter commentId is required."); 2959 throw new core.ArgumentError("Parameter commentId is required.");
2950 } 2960 }
2951 2961
2952 2962
2953 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId') + '/replies'; 2963 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies';
2954 2964
2955 var _response = _requester.request(_url, 2965 var _response = _requester.request(_url,
2956 "POST", 2966 "POST",
2957 body: _body, 2967 body: _body,
2958 queryParams: _queryParams, 2968 queryParams: _queryParams,
2959 uploadOptions: _uploadOptions, 2969 uploadOptions: _uploadOptions,
2960 uploadMedia: _uploadMedia, 2970 uploadMedia: _uploadMedia,
2961 downloadOptions: _downloadOptions); 2971 downloadOptions: _downloadOptions);
2962 return _response.then((data) => new CommentReply.fromJson(data)); 2972 return _response.then((data) => new CommentReply.fromJson(data));
2963 } 2973 }
(...skipping 13 matching lines...) Expand all
2977 * [maxResults] - The maximum number of replies to include in the response, 2987 * [maxResults] - The maximum number of replies to include in the response,
2978 * used for paging. 2988 * used for paging.
2979 * Value must be between "0" and "100". 2989 * Value must be between "0" and "100".
2980 * 2990 *
2981 * [pageToken] - The continuation token, used to page through large result 2991 * [pageToken] - The continuation token, used to page through large result
2982 * sets. To get the next page of results, set this parameter to the value of 2992 * sets. To get the next page of results, set this parameter to the value of
2983 * "nextPageToken" from the previous response. 2993 * "nextPageToken" from the previous response.
2984 * 2994 *
2985 * Completes with a [CommentReplyList]. 2995 * Completes with a [CommentReplyList].
2986 * 2996 *
2987 * Completes with a [common.ApiRequestError] if the API endpoint returned an 2997 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2988 * error. 2998 * error.
2989 * 2999 *
2990 * If the used [http.Client] completes with an error when making a REST call, 3000 * If the used [http.Client] completes with an error when making a REST call,
2991 * this method will complete with the same error. 3001 * this method will complete with the same error.
2992 */ 3002 */
2993 async.Future<CommentReplyList> list(core.String fileId, core.String commentId, {core.bool includeDeleted, core.int maxResults, core.String pageToken}) { 3003 async.Future<CommentReplyList> list(core.String fileId, core.String commentId, {core.bool includeDeleted, core.int maxResults, core.String pageToken}) {
2994 var _url = null; 3004 var _url = null;
2995 var _queryParams = new core.Map(); 3005 var _queryParams = new core.Map();
2996 var _uploadMedia = null; 3006 var _uploadMedia = null;
2997 var _uploadOptions = null; 3007 var _uploadOptions = null;
2998 var _downloadOptions = common.DownloadOptions.Metadata; 3008 var _downloadOptions = commons.DownloadOptions.Metadata;
2999 var _body = null; 3009 var _body = null;
3000 3010
3001 if (fileId == null) { 3011 if (fileId == null) {
3002 throw new core.ArgumentError("Parameter fileId is required."); 3012 throw new core.ArgumentError("Parameter fileId is required.");
3003 } 3013 }
3004 if (commentId == null) { 3014 if (commentId == null) {
3005 throw new core.ArgumentError("Parameter commentId is required."); 3015 throw new core.ArgumentError("Parameter commentId is required.");
3006 } 3016 }
3007 if (includeDeleted != null) { 3017 if (includeDeleted != null) {
3008 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 3018 _queryParams["includeDeleted"] = ["${includeDeleted}"];
3009 } 3019 }
3010 if (maxResults != null) { 3020 if (maxResults != null) {
3011 _queryParams["maxResults"] = ["${maxResults}"]; 3021 _queryParams["maxResults"] = ["${maxResults}"];
3012 } 3022 }
3013 if (pageToken != null) { 3023 if (pageToken != null) {
3014 _queryParams["pageToken"] = [pageToken]; 3024 _queryParams["pageToken"] = [pageToken];
3015 } 3025 }
3016 3026
3017 3027
3018 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId') + '/replies'; 3028 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies';
3019 3029
3020 var _response = _requester.request(_url, 3030 var _response = _requester.request(_url,
3021 "GET", 3031 "GET",
3022 body: _body, 3032 body: _body,
3023 queryParams: _queryParams, 3033 queryParams: _queryParams,
3024 uploadOptions: _uploadOptions, 3034 uploadOptions: _uploadOptions,
3025 uploadMedia: _uploadMedia, 3035 uploadMedia: _uploadMedia,
3026 downloadOptions: _downloadOptions); 3036 downloadOptions: _downloadOptions);
3027 return _response.then((data) => new CommentReplyList.fromJson(data)); 3037 return _response.then((data) => new CommentReplyList.fromJson(data));
3028 } 3038 }
3029 3039
3030 /** 3040 /**
3031 * Updates an existing reply. This method supports patch semantics. 3041 * Updates an existing reply. This method supports patch semantics.
3032 * 3042 *
3033 * [request] - The metadata request object. 3043 * [request] - The metadata request object.
3034 * 3044 *
3035 * Request parameters: 3045 * Request parameters:
3036 * 3046 *
3037 * [fileId] - The ID of the file. 3047 * [fileId] - The ID of the file.
3038 * 3048 *
3039 * [commentId] - The ID of the comment. 3049 * [commentId] - The ID of the comment.
3040 * 3050 *
3041 * [replyId] - The ID of the reply. 3051 * [replyId] - The ID of the reply.
3042 * 3052 *
3043 * Completes with a [CommentReply]. 3053 * Completes with a [CommentReply].
3044 * 3054 *
3045 * Completes with a [common.ApiRequestError] if the API endpoint returned an 3055 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3046 * error. 3056 * error.
3047 * 3057 *
3048 * If the used [http.Client] completes with an error when making a REST call, 3058 * If the used [http.Client] completes with an error when making a REST call,
3049 * this method will complete with the same error. 3059 * this method will complete with the same error.
3050 */ 3060 */
3051 async.Future<CommentReply> patch(CommentReply request, core.String fileId, cor e.String commentId, core.String replyId) { 3061 async.Future<CommentReply> patch(CommentReply request, core.String fileId, cor e.String commentId, core.String replyId) {
3052 var _url = null; 3062 var _url = null;
3053 var _queryParams = new core.Map(); 3063 var _queryParams = new core.Map();
3054 var _uploadMedia = null; 3064 var _uploadMedia = null;
3055 var _uploadOptions = null; 3065 var _uploadOptions = null;
3056 var _downloadOptions = common.DownloadOptions.Metadata; 3066 var _downloadOptions = commons.DownloadOptions.Metadata;
3057 var _body = null; 3067 var _body = null;
3058 3068
3059 if (request != null) { 3069 if (request != null) {
3060 _body = convert_1.JSON.encode((request).toJson()); 3070 _body = convert_1.JSON.encode((request).toJson());
3061 } 3071 }
3062 if (fileId == null) { 3072 if (fileId == null) {
3063 throw new core.ArgumentError("Parameter fileId is required."); 3073 throw new core.ArgumentError("Parameter fileId is required.");
3064 } 3074 }
3065 if (commentId == null) { 3075 if (commentId == null) {
3066 throw new core.ArgumentError("Parameter commentId is required."); 3076 throw new core.ArgumentError("Parameter commentId is required.");
3067 } 3077 }
3068 if (replyId == null) { 3078 if (replyId == null) {
3069 throw new core.ArgumentError("Parameter replyId is required."); 3079 throw new core.ArgumentError("Parameter replyId is required.");
3070 } 3080 }
3071 3081
3072 3082
3073 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId') + '/replies/' + comm on_internal.Escaper.ecapeVariable('$replyId'); 3083 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId');
3074 3084
3075 var _response = _requester.request(_url, 3085 var _response = _requester.request(_url,
3076 "PATCH", 3086 "PATCH",
3077 body: _body, 3087 body: _body,
3078 queryParams: _queryParams, 3088 queryParams: _queryParams,
3079 uploadOptions: _uploadOptions, 3089 uploadOptions: _uploadOptions,
3080 uploadMedia: _uploadMedia, 3090 uploadMedia: _uploadMedia,
3081 downloadOptions: _downloadOptions); 3091 downloadOptions: _downloadOptions);
3082 return _response.then((data) => new CommentReply.fromJson(data)); 3092 return _response.then((data) => new CommentReply.fromJson(data));
3083 } 3093 }
3084 3094
3085 /** 3095 /**
3086 * Updates an existing reply. 3096 * Updates an existing reply.
3087 * 3097 *
3088 * [request] - The metadata request object. 3098 * [request] - The metadata request object.
3089 * 3099 *
3090 * Request parameters: 3100 * Request parameters:
3091 * 3101 *
3092 * [fileId] - The ID of the file. 3102 * [fileId] - The ID of the file.
3093 * 3103 *
3094 * [commentId] - The ID of the comment. 3104 * [commentId] - The ID of the comment.
3095 * 3105 *
3096 * [replyId] - The ID of the reply. 3106 * [replyId] - The ID of the reply.
3097 * 3107 *
3098 * Completes with a [CommentReply]. 3108 * Completes with a [CommentReply].
3099 * 3109 *
3100 * Completes with a [common.ApiRequestError] if the API endpoint returned an 3110 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3101 * error. 3111 * error.
3102 * 3112 *
3103 * If the used [http.Client] completes with an error when making a REST call, 3113 * If the used [http.Client] completes with an error when making a REST call,
3104 * this method will complete with the same error. 3114 * this method will complete with the same error.
3105 */ 3115 */
3106 async.Future<CommentReply> update(CommentReply request, core.String fileId, co re.String commentId, core.String replyId) { 3116 async.Future<CommentReply> update(CommentReply request, core.String fileId, co re.String commentId, core.String replyId) {
3107 var _url = null; 3117 var _url = null;
3108 var _queryParams = new core.Map(); 3118 var _queryParams = new core.Map();
3109 var _uploadMedia = null; 3119 var _uploadMedia = null;
3110 var _uploadOptions = null; 3120 var _uploadOptions = null;
3111 var _downloadOptions = common.DownloadOptions.Metadata; 3121 var _downloadOptions = commons.DownloadOptions.Metadata;
3112 var _body = null; 3122 var _body = null;
3113 3123
3114 if (request != null) { 3124 if (request != null) {
3115 _body = convert_1.JSON.encode((request).toJson()); 3125 _body = convert_1.JSON.encode((request).toJson());
3116 } 3126 }
3117 if (fileId == null) { 3127 if (fileId == null) {
3118 throw new core.ArgumentError("Parameter fileId is required."); 3128 throw new core.ArgumentError("Parameter fileId is required.");
3119 } 3129 }
3120 if (commentId == null) { 3130 if (commentId == null) {
3121 throw new core.ArgumentError("Parameter commentId is required."); 3131 throw new core.ArgumentError("Parameter commentId is required.");
3122 } 3132 }
3123 if (replyId == null) { 3133 if (replyId == null) {
3124 throw new core.ArgumentError("Parameter replyId is required."); 3134 throw new core.ArgumentError("Parameter replyId is required.");
3125 } 3135 }
3126 3136
3127 3137
3128 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/comme nts/' + common_internal.Escaper.ecapeVariable('$commentId') + '/replies/' + comm on_internal.Escaper.ecapeVariable('$replyId'); 3138 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId');
3129 3139
3130 var _response = _requester.request(_url, 3140 var _response = _requester.request(_url,
3131 "PUT", 3141 "PUT",
3132 body: _body, 3142 body: _body,
3133 queryParams: _queryParams, 3143 queryParams: _queryParams,
3134 uploadOptions: _uploadOptions, 3144 uploadOptions: _uploadOptions,
3135 uploadMedia: _uploadMedia, 3145 uploadMedia: _uploadMedia,
3136 downloadOptions: _downloadOptions); 3146 downloadOptions: _downloadOptions);
3137 return _response.then((data) => new CommentReply.fromJson(data)); 3147 return _response.then((data) => new CommentReply.fromJson(data));
3138 } 3148 }
3139 3149
3140 } 3150 }
3141 3151
3142 3152
3143 /** Not documented yet. */
3144 class RevisionsResourceApi { 3153 class RevisionsResourceApi {
3145 final common_internal.ApiRequester _requester; 3154 final commons.ApiRequester _requester;
3146 3155
3147 RevisionsResourceApi(common_internal.ApiRequester client) : 3156 RevisionsResourceApi(commons.ApiRequester client) :
3148 _requester = client; 3157 _requester = client;
3149 3158
3150 /** 3159 /**
3151 * Removes a revision. 3160 * Removes a revision.
3152 * 3161 *
3153 * Request parameters: 3162 * Request parameters:
3154 * 3163 *
3155 * [fileId] - The ID of the file. 3164 * [fileId] - The ID of the file.
3156 * 3165 *
3157 * [revisionId] - The ID of the revision. 3166 * [revisionId] - The ID of the revision.
3158 * 3167 *
3159 * Completes with a [common.ApiRequestError] if the API endpoint returned an 3168 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3160 * error. 3169 * error.
3161 * 3170 *
3162 * If the used [http.Client] completes with an error when making a REST call, 3171 * If the used [http.Client] completes with an error when making a REST call,
3163 * this method will complete with the same error. 3172 * this method will complete with the same error.
3164 */ 3173 */
3165 async.Future delete(core.String fileId, core.String revisionId) { 3174 async.Future delete(core.String fileId, core.String revisionId) {
3166 var _url = null; 3175 var _url = null;
3167 var _queryParams = new core.Map(); 3176 var _queryParams = new core.Map();
3168 var _uploadMedia = null; 3177 var _uploadMedia = null;
3169 var _uploadOptions = null; 3178 var _uploadOptions = null;
3170 var _downloadOptions = common.DownloadOptions.Metadata; 3179 var _downloadOptions = commons.DownloadOptions.Metadata;
3171 var _body = null; 3180 var _body = null;
3172 3181
3173 if (fileId == null) { 3182 if (fileId == null) {
3174 throw new core.ArgumentError("Parameter fileId is required."); 3183 throw new core.ArgumentError("Parameter fileId is required.");
3175 } 3184 }
3176 if (revisionId == null) { 3185 if (revisionId == null) {
3177 throw new core.ArgumentError("Parameter revisionId is required."); 3186 throw new core.ArgumentError("Parameter revisionId is required.");
3178 } 3187 }
3179 3188
3180 _downloadOptions = null; 3189 _downloadOptions = null;
3181 3190
3182 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/revis ions/' + common_internal.Escaper.ecapeVariable('$revisionId'); 3191 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId');
3183 3192
3184 var _response = _requester.request(_url, 3193 var _response = _requester.request(_url,
3185 "DELETE", 3194 "DELETE",
3186 body: _body, 3195 body: _body,
3187 queryParams: _queryParams, 3196 queryParams: _queryParams,
3188 uploadOptions: _uploadOptions, 3197 uploadOptions: _uploadOptions,
3189 uploadMedia: _uploadMedia, 3198 uploadMedia: _uploadMedia,
3190 downloadOptions: _downloadOptions); 3199 downloadOptions: _downloadOptions);
3191 return _response.then((data) => null); 3200 return _response.then((data) => null);
3192 } 3201 }
3193 3202
3194 /** 3203 /**
3195 * Gets a specific revision. 3204 * Gets a specific revision.
3196 * 3205 *
3197 * Request parameters: 3206 * Request parameters:
3198 * 3207 *
3199 * [fileId] - The ID of the file. 3208 * [fileId] - The ID of the file.
3200 * 3209 *
3201 * [revisionId] - The ID of the revision. 3210 * [revisionId] - The ID of the revision.
3202 * 3211 *
3203 * Completes with a [Revision]. 3212 * Completes with a [Revision].
3204 * 3213 *
3205 * Completes with a [common.ApiRequestError] if the API endpoint returned an 3214 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3206 * error. 3215 * error.
3207 * 3216 *
3208 * If the used [http.Client] completes with an error when making a REST call, 3217 * If the used [http.Client] completes with an error when making a REST call,
3209 * this method will complete with the same error. 3218 * this method will complete with the same error.
3210 */ 3219 */
3211 async.Future<Revision> get(core.String fileId, core.String revisionId) { 3220 async.Future<Revision> get(core.String fileId, core.String revisionId) {
3212 var _url = null; 3221 var _url = null;
3213 var _queryParams = new core.Map(); 3222 var _queryParams = new core.Map();
3214 var _uploadMedia = null; 3223 var _uploadMedia = null;
3215 var _uploadOptions = null; 3224 var _uploadOptions = null;
3216 var _downloadOptions = common.DownloadOptions.Metadata; 3225 var _downloadOptions = commons.DownloadOptions.Metadata;
3217 var _body = null; 3226 var _body = null;
3218 3227
3219 if (fileId == null) { 3228 if (fileId == null) {
3220 throw new core.ArgumentError("Parameter fileId is required."); 3229 throw new core.ArgumentError("Parameter fileId is required.");
3221 } 3230 }
3222 if (revisionId == null) { 3231 if (revisionId == null) {
3223 throw new core.ArgumentError("Parameter revisionId is required."); 3232 throw new core.ArgumentError("Parameter revisionId is required.");
3224 } 3233 }
3225 3234
3226 3235
3227 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/revis ions/' + common_internal.Escaper.ecapeVariable('$revisionId'); 3236 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId');
3228 3237
3229 var _response = _requester.request(_url, 3238 var _response = _requester.request(_url,
3230 "GET", 3239 "GET",
3231 body: _body, 3240 body: _body,
3232 queryParams: _queryParams, 3241 queryParams: _queryParams,
3233 uploadOptions: _uploadOptions, 3242 uploadOptions: _uploadOptions,
3234 uploadMedia: _uploadMedia, 3243 uploadMedia: _uploadMedia,
3235 downloadOptions: _downloadOptions); 3244 downloadOptions: _downloadOptions);
3236 return _response.then((data) => new Revision.fromJson(data)); 3245 return _response.then((data) => new Revision.fromJson(data));
3237 } 3246 }
3238 3247
3239 /** 3248 /**
3240 * Lists a file's revisions. 3249 * Lists a file's revisions.
3241 * 3250 *
3242 * Request parameters: 3251 * Request parameters:
3243 * 3252 *
3244 * [fileId] - The ID of the file. 3253 * [fileId] - The ID of the file.
3245 * 3254 *
3246 * Completes with a [RevisionList]. 3255 * Completes with a [RevisionList].
3247 * 3256 *
3248 * Completes with a [common.ApiRequestError] if the API endpoint returned an 3257 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3249 * error. 3258 * error.
3250 * 3259 *
3251 * If the used [http.Client] completes with an error when making a REST call, 3260 * If the used [http.Client] completes with an error when making a REST call,
3252 * this method will complete with the same error. 3261 * this method will complete with the same error.
3253 */ 3262 */
3254 async.Future<RevisionList> list(core.String fileId) { 3263 async.Future<RevisionList> list(core.String fileId) {
3255 var _url = null; 3264 var _url = null;
3256 var _queryParams = new core.Map(); 3265 var _queryParams = new core.Map();
3257 var _uploadMedia = null; 3266 var _uploadMedia = null;
3258 var _uploadOptions = null; 3267 var _uploadOptions = null;
3259 var _downloadOptions = common.DownloadOptions.Metadata; 3268 var _downloadOptions = commons.DownloadOptions.Metadata;
3260 var _body = null; 3269 var _body = null;
3261 3270
3262 if (fileId == null) { 3271 if (fileId == null) {
3263 throw new core.ArgumentError("Parameter fileId is required."); 3272 throw new core.ArgumentError("Parameter fileId is required.");
3264 } 3273 }
3265 3274
3266 3275
3267 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/revis ions'; 3276 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions';
3268 3277
3269 var _response = _requester.request(_url, 3278 var _response = _requester.request(_url,
3270 "GET", 3279 "GET",
3271 body: _body, 3280 body: _body,
3272 queryParams: _queryParams, 3281 queryParams: _queryParams,
3273 uploadOptions: _uploadOptions, 3282 uploadOptions: _uploadOptions,
3274 uploadMedia: _uploadMedia, 3283 uploadMedia: _uploadMedia,
3275 downloadOptions: _downloadOptions); 3284 downloadOptions: _downloadOptions);
3276 return _response.then((data) => new RevisionList.fromJson(data)); 3285 return _response.then((data) => new RevisionList.fromJson(data));
3277 } 3286 }
3278 3287
3279 /** 3288 /**
3280 * Updates a revision. This method supports patch semantics. 3289 * Updates a revision. This method supports patch semantics.
3281 * 3290 *
3282 * [request] - The metadata request object. 3291 * [request] - The metadata request object.
3283 * 3292 *
3284 * Request parameters: 3293 * Request parameters:
3285 * 3294 *
3286 * [fileId] - The ID for the file. 3295 * [fileId] - The ID for the file.
3287 * 3296 *
3288 * [revisionId] - The ID for the revision. 3297 * [revisionId] - The ID for the revision.
3289 * 3298 *
3290 * Completes with a [Revision]. 3299 * Completes with a [Revision].
3291 * 3300 *
3292 * Completes with a [common.ApiRequestError] if the API endpoint returned an 3301 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3293 * error. 3302 * error.
3294 * 3303 *
3295 * If the used [http.Client] completes with an error when making a REST call, 3304 * If the used [http.Client] completes with an error when making a REST call,
3296 * this method will complete with the same error. 3305 * this method will complete with the same error.
3297 */ 3306 */
3298 async.Future<Revision> patch(Revision request, core.String fileId, core.String revisionId) { 3307 async.Future<Revision> patch(Revision request, core.String fileId, core.String revisionId) {
3299 var _url = null; 3308 var _url = null;
3300 var _queryParams = new core.Map(); 3309 var _queryParams = new core.Map();
3301 var _uploadMedia = null; 3310 var _uploadMedia = null;
3302 var _uploadOptions = null; 3311 var _uploadOptions = null;
3303 var _downloadOptions = common.DownloadOptions.Metadata; 3312 var _downloadOptions = commons.DownloadOptions.Metadata;
3304 var _body = null; 3313 var _body = null;
3305 3314
3306 if (request != null) { 3315 if (request != null) {
3307 _body = convert_1.JSON.encode((request).toJson()); 3316 _body = convert_1.JSON.encode((request).toJson());
3308 } 3317 }
3309 if (fileId == null) { 3318 if (fileId == null) {
3310 throw new core.ArgumentError("Parameter fileId is required."); 3319 throw new core.ArgumentError("Parameter fileId is required.");
3311 } 3320 }
3312 if (revisionId == null) { 3321 if (revisionId == null) {
3313 throw new core.ArgumentError("Parameter revisionId is required."); 3322 throw new core.ArgumentError("Parameter revisionId is required.");
3314 } 3323 }
3315 3324
3316 3325
3317 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/revis ions/' + common_internal.Escaper.ecapeVariable('$revisionId'); 3326 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId');
3318 3327
3319 var _response = _requester.request(_url, 3328 var _response = _requester.request(_url,
3320 "PATCH", 3329 "PATCH",
3321 body: _body, 3330 body: _body,
3322 queryParams: _queryParams, 3331 queryParams: _queryParams,
3323 uploadOptions: _uploadOptions, 3332 uploadOptions: _uploadOptions,
3324 uploadMedia: _uploadMedia, 3333 uploadMedia: _uploadMedia,
3325 downloadOptions: _downloadOptions); 3334 downloadOptions: _downloadOptions);
3326 return _response.then((data) => new Revision.fromJson(data)); 3335 return _response.then((data) => new Revision.fromJson(data));
3327 } 3336 }
3328 3337
3329 /** 3338 /**
3330 * Updates a revision. 3339 * Updates a revision.
3331 * 3340 *
3332 * [request] - The metadata request object. 3341 * [request] - The metadata request object.
3333 * 3342 *
3334 * Request parameters: 3343 * Request parameters:
3335 * 3344 *
3336 * [fileId] - The ID for the file. 3345 * [fileId] - The ID for the file.
3337 * 3346 *
3338 * [revisionId] - The ID for the revision. 3347 * [revisionId] - The ID for the revision.
3339 * 3348 *
3340 * Completes with a [Revision]. 3349 * Completes with a [Revision].
3341 * 3350 *
3342 * Completes with a [common.ApiRequestError] if the API endpoint returned an 3351 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3343 * error. 3352 * error.
3344 * 3353 *
3345 * If the used [http.Client] completes with an error when making a REST call, 3354 * If the used [http.Client] completes with an error when making a REST call,
3346 * this method will complete with the same error. 3355 * this method will complete with the same error.
3347 */ 3356 */
3348 async.Future<Revision> update(Revision request, core.String fileId, core.Strin g revisionId) { 3357 async.Future<Revision> update(Revision request, core.String fileId, core.Strin g revisionId) {
3349 var _url = null; 3358 var _url = null;
3350 var _queryParams = new core.Map(); 3359 var _queryParams = new core.Map();
3351 var _uploadMedia = null; 3360 var _uploadMedia = null;
3352 var _uploadOptions = null; 3361 var _uploadOptions = null;
3353 var _downloadOptions = common.DownloadOptions.Metadata; 3362 var _downloadOptions = commons.DownloadOptions.Metadata;
3354 var _body = null; 3363 var _body = null;
3355 3364
3356 if (request != null) { 3365 if (request != null) {
3357 _body = convert_1.JSON.encode((request).toJson()); 3366 _body = convert_1.JSON.encode((request).toJson());
3358 } 3367 }
3359 if (fileId == null) { 3368 if (fileId == null) {
3360 throw new core.ArgumentError("Parameter fileId is required."); 3369 throw new core.ArgumentError("Parameter fileId is required.");
3361 } 3370 }
3362 if (revisionId == null) { 3371 if (revisionId == null) {
3363 throw new core.ArgumentError("Parameter revisionId is required."); 3372 throw new core.ArgumentError("Parameter revisionId is required.");
3364 } 3373 }
3365 3374
3366 3375
3367 _url = 'files/' + common_internal.Escaper.ecapeVariable('$fileId') + '/revis ions/' + common_internal.Escaper.ecapeVariable('$revisionId'); 3376 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId');
3368 3377
3369 var _response = _requester.request(_url, 3378 var _response = _requester.request(_url,
3370 "PUT", 3379 "PUT",
3371 body: _body, 3380 body: _body,
3372 queryParams: _queryParams, 3381 queryParams: _queryParams,
3373 uploadOptions: _uploadOptions, 3382 uploadOptions: _uploadOptions,
3374 uploadMedia: _uploadMedia, 3383 uploadMedia: _uploadMedia,
3375 downloadOptions: _downloadOptions); 3384 downloadOptions: _downloadOptions);
3376 return _response.then((data) => new Revision.fromJson(data)); 3385 return _response.then((data) => new Revision.fromJson(data));
3377 } 3386 }
3378 3387
3379 } 3388 }
3380 3389
3381 3390
3382 3391
3383 /** Not documented yet. */
3384 class AboutAdditionalRoleInfoRoleSets { 3392 class AboutAdditionalRoleInfoRoleSets {
3385 /** The supported additional roles with the primary role. */ 3393 /** The supported additional roles with the primary role. */
3386 core.List<core.String> additionalRoles; 3394 core.List<core.String> additionalRoles;
3387 3395
3388 /** A primary permission role. */ 3396 /** A primary permission role. */
3389 core.String primaryRole; 3397 core.String primaryRole;
3390 3398
3391 3399
3392 AboutAdditionalRoleInfoRoleSets(); 3400 AboutAdditionalRoleInfoRoleSets();
3393 3401
(...skipping 12 matching lines...) Expand all
3406 _json["additionalRoles"] = additionalRoles; 3414 _json["additionalRoles"] = additionalRoles;
3407 } 3415 }
3408 if (primaryRole != null) { 3416 if (primaryRole != null) {
3409 _json["primaryRole"] = primaryRole; 3417 _json["primaryRole"] = primaryRole;
3410 } 3418 }
3411 return _json; 3419 return _json;
3412 } 3420 }
3413 } 3421 }
3414 3422
3415 3423
3416 /** Not documented yet. */
3417 class AboutAdditionalRoleInfo { 3424 class AboutAdditionalRoleInfo {
3418 /** The supported additional roles per primary role. */ 3425 /** The supported additional roles per primary role. */
3419 core.List<AboutAdditionalRoleInfoRoleSets> roleSets; 3426 core.List<AboutAdditionalRoleInfoRoleSets> roleSets;
3420 3427
3421 /** The content type that this additional role info applies to. */ 3428 /** The content type that this additional role info applies to. */
3422 core.String type; 3429 core.String type;
3423 3430
3424 3431
3425 AboutAdditionalRoleInfo(); 3432 AboutAdditionalRoleInfo();
3426 3433
(...skipping 12 matching lines...) Expand all
3439 _json["roleSets"] = roleSets.map((value) => (value).toJson()).toList(); 3446 _json["roleSets"] = roleSets.map((value) => (value).toJson()).toList();
3440 } 3447 }
3441 if (type != null) { 3448 if (type != null) {
3442 _json["type"] = type; 3449 _json["type"] = type;
3443 } 3450 }
3444 return _json; 3451 return _json;
3445 } 3452 }
3446 } 3453 }
3447 3454
3448 3455
3449 /** Not documented yet. */
3450 class AboutExportFormats { 3456 class AboutExportFormats {
3451 /** The content type to convert from. */ 3457 /** The content type to convert from. */
3452 core.String source; 3458 core.String source;
3453 3459
3454 /** The possible content types to convert to. */ 3460 /** The possible content types to convert to. */
3455 core.List<core.String> targets; 3461 core.List<core.String> targets;
3456 3462
3457 3463
3458 AboutExportFormats(); 3464 AboutExportFormats();
3459 3465
(...skipping 12 matching lines...) Expand all
3472 _json["source"] = source; 3478 _json["source"] = source;
3473 } 3479 }
3474 if (targets != null) { 3480 if (targets != null) {
3475 _json["targets"] = targets; 3481 _json["targets"] = targets;
3476 } 3482 }
3477 return _json; 3483 return _json;
3478 } 3484 }
3479 } 3485 }
3480 3486
3481 3487
3482 /** Not documented yet. */
3483 class AboutFeatures { 3488 class AboutFeatures {
3484 /** The name of the feature. */ 3489 /** The name of the feature. */
3485 core.String featureName; 3490 core.String featureName;
3486 3491
3487 /** The request limit rate for this feature, in queries per second. */ 3492 /** The request limit rate for this feature, in queries per second. */
3488 core.double featureRate; 3493 core.double featureRate;
3489 3494
3490 3495
3491 AboutFeatures(); 3496 AboutFeatures();
3492 3497
(...skipping 12 matching lines...) Expand all
3505 _json["featureName"] = featureName; 3510 _json["featureName"] = featureName;
3506 } 3511 }
3507 if (featureRate != null) { 3512 if (featureRate != null) {
3508 _json["featureRate"] = featureRate; 3513 _json["featureRate"] = featureRate;
3509 } 3514 }
3510 return _json; 3515 return _json;
3511 } 3516 }
3512 } 3517 }
3513 3518
3514 3519
3515 /** Not documented yet. */
3516 class AboutImportFormats { 3520 class AboutImportFormats {
3517 /** The imported file's content type to convert from. */ 3521 /** The imported file's content type to convert from. */
3518 core.String source; 3522 core.String source;
3519 3523
3520 /** The possible content types to convert to. */ 3524 /** The possible content types to convert to. */
3521 core.List<core.String> targets; 3525 core.List<core.String> targets;
3522 3526
3523 3527
3524 AboutImportFormats(); 3528 AboutImportFormats();
3525 3529
(...skipping 12 matching lines...) Expand all
3538 _json["source"] = source; 3542 _json["source"] = source;
3539 } 3543 }
3540 if (targets != null) { 3544 if (targets != null) {
3541 _json["targets"] = targets; 3545 _json["targets"] = targets;
3542 } 3546 }
3543 return _json; 3547 return _json;
3544 } 3548 }
3545 } 3549 }
3546 3550
3547 3551
3548 /** Not documented yet. */
3549 class AboutMaxUploadSizes { 3552 class AboutMaxUploadSizes {
3550 /** The max upload size for this type. */ 3553 /** The max upload size for this type. */
3551 core.String size; 3554 core.String size;
3552 3555
3553 /** The file type. */ 3556 /** The file type. */
3554 core.String type; 3557 core.String type;
3555 3558
3556 3559
3557 AboutMaxUploadSizes(); 3560 AboutMaxUploadSizes();
3558 3561
(...skipping 12 matching lines...) Expand all
3571 _json["size"] = size; 3574 _json["size"] = size;
3572 } 3575 }
3573 if (type != null) { 3576 if (type != null) {
3574 _json["type"] = type; 3577 _json["type"] = type;
3575 } 3578 }
3576 return _json; 3579 return _json;
3577 } 3580 }
3578 } 3581 }
3579 3582
3580 3583
3581 /** Not documented yet. */
3582 class AboutQuotaBytesByService { 3584 class AboutQuotaBytesByService {
3583 /** The storage quota bytes used by the service. */ 3585 /** The storage quota bytes used by the service. */
3584 core.String bytesUsed; 3586 core.String bytesUsed;
3585 3587
3586 /** The service's name, e.g. DRIVE, GMAIL, or PHOTOS. */ 3588 /** The service's name, e.g. DRIVE, GMAIL, or PHOTOS. */
3587 core.String serviceName; 3589 core.String serviceName;
3588 3590
3589 3591
3590 AboutQuotaBytesByService(); 3592 AboutQuotaBytesByService();
3591 3593
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3854 _json["selfLink"] = selfLink; 3856 _json["selfLink"] = selfLink;
3855 } 3857 }
3856 if (user != null) { 3858 if (user != null) {
3857 _json["user"] = (user).toJson(); 3859 _json["user"] = (user).toJson();
3858 } 3860 }
3859 return _json; 3861 return _json;
3860 } 3862 }
3861 } 3863 }
3862 3864
3863 3865
3864 /** Not documented yet. */
3865 class AppIcons { 3866 class AppIcons {
3866 /** 3867 /**
3867 * Category of the icon. Allowed values are: 3868 * Category of the icon. Allowed values are:
3868 * - application - icon for the application 3869 * - application - icon for the application
3869 * - document - icon for a file associated with the app 3870 * - document - icon for a file associated with the app
3870 * - documentShared - icon for a shared file associated with the app 3871 * - documentShared - icon for a shared file associated with the app
3871 */ 3872 */
3872 core.String category; 3873 core.String category;
3873 3874
3874 /** URL for the icon. */ 3875 /** URL for the icon. */
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
3952 core.String name; 3953 core.String name;
3953 3954
3954 /** 3955 /**
3955 * The type of object this app creates (e.g. Chart). If empty, the app name 3956 * The type of object this app creates (e.g. Chart). If empty, the app name
3956 * should be used instead. 3957 * should be used instead.
3957 */ 3958 */
3958 core.String objectType; 3959 core.String objectType;
3959 3960
3960 /** 3961 /**
3961 * The template url for opening files with this app. The template will contain 3962 * The template url for opening files with this app. The template will contain
3962 * {ids} and/or {exportIds} to be replaced by the actual file ids. 3963 * {ids} and/or {exportIds} to be replaced by the actual file ids. See Open
3964 * Files for the full documentation.
3963 */ 3965 */
3964 core.String openUrlTemplate; 3966 core.String openUrlTemplate;
3965 3967
3966 /** The list of primary file extensions. */ 3968 /** The list of primary file extensions. */
3967 core.List<core.String> primaryFileExtensions; 3969 core.List<core.String> primaryFileExtensions;
3968 3970
3969 /** The list of primary mime types. */ 3971 /** The list of primary mime types. */
3970 core.List<core.String> primaryMimeTypes; 3972 core.List<core.String> primaryMimeTypes;
3971 3973
3972 /** The ID of the product listing for this app. */ 3974 /** The ID of the product listing for this app. */
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
5338 class FileLabels { 5340 class FileLabels {
5339 /** Deprecated. */ 5341 /** Deprecated. */
5340 core.bool hidden; 5342 core.bool hidden;
5341 5343
5342 /** Whether viewers are prevented from downloading this file. */ 5344 /** Whether viewers are prevented from downloading this file. */
5343 core.bool restricted; 5345 core.bool restricted;
5344 5346
5345 /** Whether this file is starred by the user. */ 5347 /** Whether this file is starred by the user. */
5346 core.bool starred; 5348 core.bool starred;
5347 5349
5348 /** Whether this file has been trashed. */ 5350 /**
5351 * Whether this file has been trashed. This label applies to all users
5352 * accessing the file; however, only owners are allowed to see and untrash
5353 * files.
5354 */
5349 core.bool trashed; 5355 core.bool trashed;
5350 5356
5351 /** Whether this file has been viewed by this user. */ 5357 /** Whether this file has been viewed by this user. */
5352 core.bool viewed; 5358 core.bool viewed;
5353 5359
5354 5360
5355 FileLabels(); 5361 FileLabels();
5356 5362
5357 FileLabels.fromJson(core.Map _json) { 5363 FileLabels.fromJson(core.Map _json) {
5358 if (_json.containsKey("hidden")) { 5364 if (_json.containsKey("hidden")) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
5392 return _json; 5398 return _json;
5393 } 5399 }
5394 } 5400 }
5395 5401
5396 5402
5397 /** 5403 /**
5398 * Thumbnail for the file. Only accepted on upload and for files that are not 5404 * Thumbnail for the file. Only accepted on upload and for files that are not
5399 * already thumbnailed by Google. 5405 * already thumbnailed by Google.
5400 */ 5406 */
5401 class FileThumbnail { 5407 class FileThumbnail {
5402 /** The URL-safe Base64 encoded bytes of the thumbnail image. */ 5408 /**
5409 * The URL-safe Base64 encoded bytes of the thumbnail image. It should conform
5410 * to RFC 4648 section 5.
5411 */
5403 core.String image; 5412 core.String image;
5404 5413
5405 core.List<core.int> get imageAsBytes { 5414 core.List<core.int> get imageAsBytes {
5406 return crypto.CryptoUtils.base64StringToBytes(image); 5415 return crypto.CryptoUtils.base64StringToBytes(image);
5407 } 5416 }
5408 5417
5409 void set imageAsBytes(core.List<core.int> _bytes) { 5418 void set imageAsBytes(core.List<core.int> _bytes) {
5410 image = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); 5419 image = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
5411 } 5420 }
5412 5421
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
5669 5678
5670 /** User that shared the item with the current user, if available. */ 5679 /** User that shared the item with the current user, if available. */
5671 User sharingUser; 5680 User sharingUser;
5672 5681
5673 /** 5682 /**
5674 * Thumbnail for the file. Only accepted on upload and for files that are not 5683 * Thumbnail for the file. Only accepted on upload and for files that are not
5675 * already thumbnailed by Google. 5684 * already thumbnailed by Google.
5676 */ 5685 */
5677 FileThumbnail thumbnail; 5686 FileThumbnail thumbnail;
5678 5687
5679 /** A link to the file's thumbnail. */ 5688 /**
5689 * A short-lived link to the file's thumbnail. Typically lasts on the order of
5690 * hours.
5691 */
5680 core.String thumbnailLink; 5692 core.String thumbnailLink;
5681 5693
5682 /** The title of this file. */ 5694 /** The title of this file. */
5683 core.String title; 5695 core.String title;
5684 5696
5685 /** The permissions for the authenticated user on this file. */ 5697 /** The permissions for the authenticated user on this file. */
5686 Permission userPermission; 5698 Permission userPermission;
5687 5699
5688 /** 5700 /**
5689 * A monotonically increasing version number for the file. This reflects every 5701 * A monotonically increasing version number for the file. This reflects every
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
6457 _json["kind"] = kind; 6469 _json["kind"] = kind;
6458 } 6470 }
6459 if (selfLink != null) { 6471 if (selfLink != null) {
6460 _json["selfLink"] = selfLink; 6472 _json["selfLink"] = selfLink;
6461 } 6473 }
6462 return _json; 6474 return _json;
6463 } 6475 }
6464 } 6476 }
6465 6477
6466 6478
6467 /** A key-value pair that is either public or private to an application. */ 6479 /**
6480 * A key-value pair attached to a file that is either public or private to an
6481 * application.
6482 * The following limits apply to file properties:
6483 * - Maximum of 100 properties total per file
6484 * - Maximum of 30 private properties per app
6485 * - Maximum of 30 public properties
6486 * - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding
6487 * for a single property.
6488 */
6468 class Property { 6489 class Property {
6469 /** ETag of the property. */ 6490 /** ETag of the property. */
6470 core.String etag; 6491 core.String etag;
6471 6492
6472 /** The key of this property. */ 6493 /** The key of this property. */
6473 core.String key; 6494 core.String key;
6474 6495
6475 /** This is always drive#property. */ 6496 /** This is always drive#property. */
6476 core.String kind; 6497 core.String kind;
6477 6498
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
6929 } 6950 }
6930 if (permissionId != null) { 6951 if (permissionId != null) {
6931 _json["permissionId"] = permissionId; 6952 _json["permissionId"] = permissionId;
6932 } 6953 }
6933 if (picture != null) { 6954 if (picture != null) {
6934 _json["picture"] = (picture).toJson(); 6955 _json["picture"] = (picture).toJson();
6935 } 6956 }
6936 return _json; 6957 return _json;
6937 } 6958 }
6938 } 6959 }
6939
6940
OLDNEW
« no previous file with comments | « generated/googleapis/lib/doubleclicksearch/v2.dart ('k') | generated/googleapis/lib/fitness/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698