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

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

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 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). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.drive.v2; 3 library googleapis.drive.v2;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert_1; 7 import 'dart:convert' as convert_1;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, 13 show
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, 14 ApiRequestError,
15 ByteRange; 15 DetailedApiRequestError,
16 Media,
17 UploadOptions,
18 ResumableUploadOptions,
19 DownloadOptions,
20 PartialDownloadOptions,
21 ByteRange;
16 22
17 const core.String USER_AGENT = 'dart-api-client drive/v2'; 23 const core.String USER_AGENT = 'dart-api-client drive/v2';
18 24
19 /** 25 /// Manages files in Drive including uploading, downloading, searching,
20 * Manages files in Drive including uploading, downloading, searching, detecting 26 /// detecting changes, and updating sharing permissions.
21 * changes, and updating sharing permissions.
22 */
23 class DriveApi { 27 class DriveApi {
24 /** View and manage the files in your Google Drive */ 28 /// View and manage the files in your Google Drive
25 static const DriveScope = "https://www.googleapis.com/auth/drive"; 29 static const DriveScope = "https://www.googleapis.com/auth/drive";
26 30
27 /** View and manage its own configuration data in your Google Drive */ 31 /// View and manage its own configuration data in your Google Drive
28 static const DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdat a"; 32 static const DriveAppdataScope =
33 "https://www.googleapis.com/auth/drive.appdata";
29 34
30 /** View your Google Drive apps */ 35 /// View your Google Drive apps
31 static const DriveAppsReadonlyScope = "https://www.googleapis.com/auth/drive.a pps.readonly"; 36 static const DriveAppsReadonlyScope =
37 "https://www.googleapis.com/auth/drive.apps.readonly";
32 38
33 /** 39 /// View and manage Google Drive files and folders that you have opened or
34 * View and manage Google Drive files and folders that you have opened or 40 /// created with this app
35 * created with this app
36 */
37 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file"; 41 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file";
38 42
39 /** View and manage metadata of files in your Google Drive */ 43 /// View and manage metadata of files in your Google Drive
40 static const DriveMetadataScope = "https://www.googleapis.com/auth/drive.metad ata"; 44 static const DriveMetadataScope =
45 "https://www.googleapis.com/auth/drive.metadata";
41 46
42 /** View metadata for files in your Google Drive */ 47 /// View metadata for files in your Google Drive
43 static const DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/dri ve.metadata.readonly"; 48 static const DriveMetadataReadonlyScope =
49 "https://www.googleapis.com/auth/drive.metadata.readonly";
44 50
45 /** View the photos, videos and albums in your Google Photos */ 51 /// View the photos, videos and albums in your Google Photos
46 static const DrivePhotosReadonlyScope = "https://www.googleapis.com/auth/drive .photos.readonly"; 52 static const DrivePhotosReadonlyScope =
53 "https://www.googleapis.com/auth/drive.photos.readonly";
47 54
48 /** View the files in your Google Drive */ 55 /// View the files in your Google Drive
49 static const DriveReadonlyScope = "https://www.googleapis.com/auth/drive.reado nly"; 56 static const DriveReadonlyScope =
57 "https://www.googleapis.com/auth/drive.readonly";
50 58
51 /** Modify your Google Apps Script scripts' behavior */ 59 /// Modify your Google Apps Script scripts' behavior
52 static const DriveScriptsScope = "https://www.googleapis.com/auth/drive.script s"; 60 static const DriveScriptsScope =
53 61 "https://www.googleapis.com/auth/drive.scripts";
54 62
55 final commons.ApiRequester _requester; 63 final commons.ApiRequester _requester;
56 64
57 AboutResourceApi get about => new AboutResourceApi(_requester); 65 AboutResourceApi get about => new AboutResourceApi(_requester);
58 AppsResourceApi get apps => new AppsResourceApi(_requester); 66 AppsResourceApi get apps => new AppsResourceApi(_requester);
59 ChangesResourceApi get changes => new ChangesResourceApi(_requester); 67 ChangesResourceApi get changes => new ChangesResourceApi(_requester);
60 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); 68 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester);
61 ChildrenResourceApi get children => new ChildrenResourceApi(_requester); 69 ChildrenResourceApi get children => new ChildrenResourceApi(_requester);
62 CommentsResourceApi get comments => new CommentsResourceApi(_requester); 70 CommentsResourceApi get comments => new CommentsResourceApi(_requester);
63 FilesResourceApi get files => new FilesResourceApi(_requester); 71 FilesResourceApi get files => new FilesResourceApi(_requester);
64 ParentsResourceApi get parents => new ParentsResourceApi(_requester); 72 ParentsResourceApi get parents => new ParentsResourceApi(_requester);
65 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r); 73 PermissionsResourceApi get permissions =>
74 new PermissionsResourceApi(_requester);
66 PropertiesResourceApi get properties => new PropertiesResourceApi(_requester); 75 PropertiesResourceApi get properties => new PropertiesResourceApi(_requester);
67 RealtimeResourceApi get realtime => new RealtimeResourceApi(_requester); 76 RealtimeResourceApi get realtime => new RealtimeResourceApi(_requester);
68 RepliesResourceApi get replies => new RepliesResourceApi(_requester); 77 RepliesResourceApi get replies => new RepliesResourceApi(_requester);
69 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); 78 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester);
70 TeamdrivesResourceApi get teamdrives => new TeamdrivesResourceApi(_requester); 79 TeamdrivesResourceApi get teamdrives => new TeamdrivesResourceApi(_requester);
71 80
72 DriveApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com /", core.String servicePath: "drive/v2/"}) : 81 DriveApi(http.Client client,
73 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 82 {core.String rootUrl: "https://www.googleapis.com/",
83 core.String servicePath: "drive/v2/"})
84 : _requester =
85 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
74 } 86 }
75 87
76
77 class AboutResourceApi { 88 class AboutResourceApi {
78 final commons.ApiRequester _requester; 89 final commons.ApiRequester _requester;
79 90
80 AboutResourceApi(commons.ApiRequester client) : 91 AboutResourceApi(commons.ApiRequester client) : _requester = client;
81 _requester = client;
82 92
83 /** 93 /// Gets the information about the current user along with Drive API settings
84 * Gets the information about the current user along with Drive API settings 94 ///
85 * 95 /// Request parameters:
86 * Request parameters: 96 ///
87 * 97 /// [includeSubscribed] - When calculating the number of remaining change
88 * [includeSubscribed] - When calculating the number of remaining change IDs, 98 /// IDs, whether to include public files the user has opened and shared
89 * whether to include public files the user has opened and shared files. When 99 /// files. When set to false, this counts only change IDs for owned files and
90 * set to false, this counts only change IDs for owned files and any shared or 100 /// any shared or public files that the user has explicitly added to a folder
91 * public files that the user has explicitly added to a folder they own. 101 /// they own.
92 * 102 ///
93 * [maxChangeIdCount] - Maximum number of remaining change IDs to count 103 /// [maxChangeIdCount] - Maximum number of remaining change IDs to count
94 * 104 ///
95 * [startChangeId] - Change ID to start counting from when calculating number 105 /// [startChangeId] - Change ID to start counting from when calculating
96 * of remaining change IDs 106 /// number of remaining change IDs
97 * 107 ///
98 * Completes with a [About]. 108 /// Completes with a [About].
99 * 109 ///
100 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 110 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
101 * error. 111 /// an error.
102 * 112 ///
103 * If the used [http.Client] completes with an error when making a REST call, 113 /// If the used [http.Client] completes with an error when making a REST
104 * this method will complete with the same error. 114 /// call, this method will complete with the same error.
105 */ 115 async.Future<About> get(
106 async.Future<About> get({core.bool includeSubscribed, core.String maxChangeIdC ount, core.String startChangeId}) { 116 {core.bool includeSubscribed,
117 core.String maxChangeIdCount,
118 core.String startChangeId}) {
107 var _url = null; 119 var _url = null;
108 var _queryParams = new core.Map(); 120 var _queryParams = new core.Map();
109 var _uploadMedia = null; 121 var _uploadMedia = null;
110 var _uploadOptions = null; 122 var _uploadOptions = null;
111 var _downloadOptions = commons.DownloadOptions.Metadata; 123 var _downloadOptions = commons.DownloadOptions.Metadata;
112 var _body = null; 124 var _body = null;
113 125
114 if (includeSubscribed != null) { 126 if (includeSubscribed != null) {
115 _queryParams["includeSubscribed"] = ["${includeSubscribed}"]; 127 _queryParams["includeSubscribed"] = ["${includeSubscribed}"];
116 } 128 }
117 if (maxChangeIdCount != null) { 129 if (maxChangeIdCount != null) {
118 _queryParams["maxChangeIdCount"] = [maxChangeIdCount]; 130 _queryParams["maxChangeIdCount"] = [maxChangeIdCount];
119 } 131 }
120 if (startChangeId != null) { 132 if (startChangeId != null) {
121 _queryParams["startChangeId"] = [startChangeId]; 133 _queryParams["startChangeId"] = [startChangeId];
122 } 134 }
123 135
124 _url = 'about'; 136 _url = 'about';
125 137
126 var _response = _requester.request(_url, 138 var _response = _requester.request(_url, "GET",
127 "GET", 139 body: _body,
128 body: _body, 140 queryParams: _queryParams,
129 queryParams: _queryParams, 141 uploadOptions: _uploadOptions,
130 uploadOptions: _uploadOptions, 142 uploadMedia: _uploadMedia,
131 uploadMedia: _uploadMedia, 143 downloadOptions: _downloadOptions);
132 downloadOptions: _downloadOptions);
133 return _response.then((data) => new About.fromJson(data)); 144 return _response.then((data) => new About.fromJson(data));
134 } 145 }
135
136 } 146 }
137 147
138
139 class AppsResourceApi { 148 class AppsResourceApi {
140 final commons.ApiRequester _requester; 149 final commons.ApiRequester _requester;
141 150
142 AppsResourceApi(commons.ApiRequester client) : 151 AppsResourceApi(commons.ApiRequester client) : _requester = client;
143 _requester = client;
144 152
145 /** 153 /// Gets a specific app.
146 * Gets a specific app. 154 ///
147 * 155 /// Request parameters:
148 * Request parameters: 156 ///
149 * 157 /// [appId] - The ID of the app.
150 * [appId] - The ID of the app. 158 ///
151 * 159 /// Completes with a [App].
152 * Completes with a [App]. 160 ///
153 * 161 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
154 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 162 /// an error.
155 * error. 163 ///
156 * 164 /// If the used [http.Client] completes with an error when making a REST
157 * If the used [http.Client] completes with an error when making a REST call, 165 /// call, this method will complete with the same error.
158 * this method will complete with the same error.
159 */
160 async.Future<App> get(core.String appId) { 166 async.Future<App> get(core.String appId) {
161 var _url = null; 167 var _url = null;
162 var _queryParams = new core.Map(); 168 var _queryParams = new core.Map();
163 var _uploadMedia = null; 169 var _uploadMedia = null;
164 var _uploadOptions = null; 170 var _uploadOptions = null;
165 var _downloadOptions = commons.DownloadOptions.Metadata; 171 var _downloadOptions = commons.DownloadOptions.Metadata;
166 var _body = null; 172 var _body = null;
167 173
168 if (appId == null) { 174 if (appId == null) {
169 throw new core.ArgumentError("Parameter appId is required."); 175 throw new core.ArgumentError("Parameter appId is required.");
170 } 176 }
171 177
172 _url = 'apps/' + commons.Escaper.ecapeVariable('$appId'); 178 _url = 'apps/' + commons.Escaper.ecapeVariable('$appId');
173 179
174 var _response = _requester.request(_url, 180 var _response = _requester.request(_url, "GET",
175 "GET", 181 body: _body,
176 body: _body, 182 queryParams: _queryParams,
177 queryParams: _queryParams, 183 uploadOptions: _uploadOptions,
178 uploadOptions: _uploadOptions, 184 uploadMedia: _uploadMedia,
179 uploadMedia: _uploadMedia, 185 downloadOptions: _downloadOptions);
180 downloadOptions: _downloadOptions);
181 return _response.then((data) => new App.fromJson(data)); 186 return _response.then((data) => new App.fromJson(data));
182 } 187 }
183 188
184 /** 189 /// Lists a user's installed apps.
185 * Lists a user's installed apps. 190 ///
186 * 191 /// Request parameters:
187 * Request parameters: 192 ///
188 * 193 /// [appFilterExtensions] - A comma-separated list of file extensions for
189 * [appFilterExtensions] - A comma-separated list of file extensions for open 194 /// open with filtering. All apps within the given app query scope which can
190 * with filtering. All apps within the given app query scope which can open 195 /// open any of the given file extensions will be included in the response.
191 * any of the given file extensions will be included in the response. If 196 /// If appFilterMimeTypes are provided as well, the result is a union of the
192 * appFilterMimeTypes are provided as well, the result is a union of the two 197 /// two resulting app lists.
193 * resulting app lists. 198 ///
194 * 199 /// [appFilterMimeTypes] - A comma-separated list of MIME types for open with
195 * [appFilterMimeTypes] - A comma-separated list of MIME types for open with 200 /// filtering. All apps within the given app query scope which can open any
196 * filtering. All apps within the given app query scope which can open any of 201 /// of the given MIME types will be included in the response. If
197 * the given MIME types will be included in the response. If 202 /// appFilterExtensions are provided as well, the result is a union of the
198 * appFilterExtensions are provided as well, the result is a union of the two 203 /// two resulting app lists.
199 * resulting app lists. 204 ///
200 * 205 /// [languageCode] - A language or locale code, as defined by BCP 47, with
201 * [languageCode] - A language or locale code, as defined by BCP 47, with some 206 /// some extensions from Unicode's LDML format
202 * extensions from Unicode's LDML format 207 /// (http://www.unicode.org/reports/tr35/).
203 * (http://www.unicode.org/reports/tr35/). 208 ///
204 * 209 /// Completes with a [AppList].
205 * Completes with a [AppList]. 210 ///
206 * 211 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 212 /// an error.
208 * error. 213 ///
209 * 214 /// If the used [http.Client] completes with an error when making a REST
210 * If the used [http.Client] completes with an error when making a REST call, 215 /// call, this method will complete with the same error.
211 * this method will complete with the same error. 216 async.Future<AppList> list(
212 */ 217 {core.String appFilterExtensions,
213 async.Future<AppList> list({core.String appFilterExtensions, core.String appFi lterMimeTypes, core.String languageCode}) { 218 core.String appFilterMimeTypes,
219 core.String languageCode}) {
214 var _url = null; 220 var _url = null;
215 var _queryParams = new core.Map(); 221 var _queryParams = new core.Map();
216 var _uploadMedia = null; 222 var _uploadMedia = null;
217 var _uploadOptions = null; 223 var _uploadOptions = null;
218 var _downloadOptions = commons.DownloadOptions.Metadata; 224 var _downloadOptions = commons.DownloadOptions.Metadata;
219 var _body = null; 225 var _body = null;
220 226
221 if (appFilterExtensions != null) { 227 if (appFilterExtensions != null) {
222 _queryParams["appFilterExtensions"] = [appFilterExtensions]; 228 _queryParams["appFilterExtensions"] = [appFilterExtensions];
223 } 229 }
224 if (appFilterMimeTypes != null) { 230 if (appFilterMimeTypes != null) {
225 _queryParams["appFilterMimeTypes"] = [appFilterMimeTypes]; 231 _queryParams["appFilterMimeTypes"] = [appFilterMimeTypes];
226 } 232 }
227 if (languageCode != null) { 233 if (languageCode != null) {
228 _queryParams["languageCode"] = [languageCode]; 234 _queryParams["languageCode"] = [languageCode];
229 } 235 }
230 236
231 _url = 'apps'; 237 _url = 'apps';
232 238
233 var _response = _requester.request(_url, 239 var _response = _requester.request(_url, "GET",
234 "GET", 240 body: _body,
235 body: _body, 241 queryParams: _queryParams,
236 queryParams: _queryParams, 242 uploadOptions: _uploadOptions,
237 uploadOptions: _uploadOptions, 243 uploadMedia: _uploadMedia,
238 uploadMedia: _uploadMedia, 244 downloadOptions: _downloadOptions);
239 downloadOptions: _downloadOptions);
240 return _response.then((data) => new AppList.fromJson(data)); 245 return _response.then((data) => new AppList.fromJson(data));
241 } 246 }
242
243 } 247 }
244 248
245
246 class ChangesResourceApi { 249 class ChangesResourceApi {
247 final commons.ApiRequester _requester; 250 final commons.ApiRequester _requester;
248 251
249 ChangesResourceApi(commons.ApiRequester client) : 252 ChangesResourceApi(commons.ApiRequester client) : _requester = client;
250 _requester = client;
251 253
252 /** 254 /// Gets a specific change.
253 * Gets a specific change. 255 ///
254 * 256 /// Request parameters:
255 * Request parameters: 257 ///
256 * 258 /// [changeId] - The ID of the change.
257 * [changeId] - The ID of the change. 259 ///
258 * 260 /// [supportsTeamDrives] - Whether the requesting application supports Team
259 * [supportsTeamDrives] - Whether the requesting application supports Team 261 /// Drives.
260 * Drives. 262 ///
261 * 263 /// [teamDriveId] - The Team Drive from which the change will be returned.
262 * [teamDriveId] - The Team Drive from which the change will be returned. 264 ///
263 * 265 /// Completes with a [Change].
264 * Completes with a [Change]. 266 ///
265 * 267 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
266 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 268 /// an error.
267 * error. 269 ///
268 * 270 /// If the used [http.Client] completes with an error when making a REST
269 * If the used [http.Client] completes with an error when making a REST call, 271 /// call, this method will complete with the same error.
270 * this method will complete with the same error. 272 async.Future<Change> get(core.String changeId,
271 */ 273 {core.bool supportsTeamDrives, core.String teamDriveId}) {
272 async.Future<Change> get(core.String changeId, {core.bool supportsTeamDrives, core.String teamDriveId}) {
273 var _url = null; 274 var _url = null;
274 var _queryParams = new core.Map(); 275 var _queryParams = new core.Map();
275 var _uploadMedia = null; 276 var _uploadMedia = null;
276 var _uploadOptions = null; 277 var _uploadOptions = null;
277 var _downloadOptions = commons.DownloadOptions.Metadata; 278 var _downloadOptions = commons.DownloadOptions.Metadata;
278 var _body = null; 279 var _body = null;
279 280
280 if (changeId == null) { 281 if (changeId == null) {
281 throw new core.ArgumentError("Parameter changeId is required."); 282 throw new core.ArgumentError("Parameter changeId is required.");
282 } 283 }
283 if (supportsTeamDrives != null) { 284 if (supportsTeamDrives != null) {
284 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 285 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
285 } 286 }
286 if (teamDriveId != null) { 287 if (teamDriveId != null) {
287 _queryParams["teamDriveId"] = [teamDriveId]; 288 _queryParams["teamDriveId"] = [teamDriveId];
288 } 289 }
289 290
290 _url = 'changes/' + commons.Escaper.ecapeVariable('$changeId'); 291 _url = 'changes/' + commons.Escaper.ecapeVariable('$changeId');
291 292
292 var _response = _requester.request(_url, 293 var _response = _requester.request(_url, "GET",
293 "GET", 294 body: _body,
294 body: _body, 295 queryParams: _queryParams,
295 queryParams: _queryParams, 296 uploadOptions: _uploadOptions,
296 uploadOptions: _uploadOptions, 297 uploadMedia: _uploadMedia,
297 uploadMedia: _uploadMedia, 298 downloadOptions: _downloadOptions);
298 downloadOptions: _downloadOptions);
299 return _response.then((data) => new Change.fromJson(data)); 299 return _response.then((data) => new Change.fromJson(data));
300 } 300 }
301 301
302 /** 302 /// Gets the starting pageToken for listing future changes.
303 * Gets the starting pageToken for listing future changes. 303 ///
304 * 304 /// Request parameters:
305 * Request parameters: 305 ///
306 * 306 /// [supportsTeamDrives] - Whether the requesting application supports Team
307 * [supportsTeamDrives] - Whether the requesting application supports Team 307 /// Drives.
308 * Drives. 308 ///
309 * 309 /// [teamDriveId] - The ID of the Team Drive for which the starting pageToken
310 * [teamDriveId] - The ID of the Team Drive for which the starting pageToken 310 /// for listing future changes from that Team Drive will be returned.
311 * for listing future changes from that Team Drive will be returned. 311 ///
312 * 312 /// Completes with a [StartPageToken].
313 * Completes with a [StartPageToken]. 313 ///
314 * 314 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 315 /// an error.
316 * error. 316 ///
317 * 317 /// If the used [http.Client] completes with an error when making a REST
318 * If the used [http.Client] completes with an error when making a REST call, 318 /// call, this method will complete with the same error.
319 * this method will complete with the same error. 319 async.Future<StartPageToken> getStartPageToken(
320 */ 320 {core.bool supportsTeamDrives, core.String teamDriveId}) {
321 async.Future<StartPageToken> getStartPageToken({core.bool supportsTeamDrives, core.String teamDriveId}) {
322 var _url = null; 321 var _url = null;
323 var _queryParams = new core.Map(); 322 var _queryParams = new core.Map();
324 var _uploadMedia = null; 323 var _uploadMedia = null;
325 var _uploadOptions = null; 324 var _uploadOptions = null;
326 var _downloadOptions = commons.DownloadOptions.Metadata; 325 var _downloadOptions = commons.DownloadOptions.Metadata;
327 var _body = null; 326 var _body = null;
328 327
329 if (supportsTeamDrives != null) { 328 if (supportsTeamDrives != null) {
330 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 329 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
331 } 330 }
332 if (teamDriveId != null) { 331 if (teamDriveId != null) {
333 _queryParams["teamDriveId"] = [teamDriveId]; 332 _queryParams["teamDriveId"] = [teamDriveId];
334 } 333 }
335 334
336 _url = 'changes/startPageToken'; 335 _url = 'changes/startPageToken';
337 336
338 var _response = _requester.request(_url, 337 var _response = _requester.request(_url, "GET",
339 "GET", 338 body: _body,
340 body: _body, 339 queryParams: _queryParams,
341 queryParams: _queryParams, 340 uploadOptions: _uploadOptions,
342 uploadOptions: _uploadOptions, 341 uploadMedia: _uploadMedia,
343 uploadMedia: _uploadMedia, 342 downloadOptions: _downloadOptions);
344 downloadOptions: _downloadOptions);
345 return _response.then((data) => new StartPageToken.fromJson(data)); 343 return _response.then((data) => new StartPageToken.fromJson(data));
346 } 344 }
347 345
348 /** 346 /// Lists the changes for a user or Team Drive.
349 * Lists the changes for a user or Team Drive. 347 ///
350 * 348 /// Request parameters:
351 * Request parameters: 349 ///
352 * 350 /// [includeCorpusRemovals] - Whether changes should include the file
353 * [includeCorpusRemovals] - Whether changes should include the file resource 351 /// resource if the file is still accessible by the user at the time of the
354 * if the file is still accessible by the user at the time of the request, 352 /// request, even when a file was removed from the list of changes and there
355 * even when a file was removed from the list of changes and there will be no 353 /// will be no further change entries for this file.
356 * further change entries for this file. 354 ///
357 * 355 /// [includeDeleted] - Whether to include changes indicating that items have
358 * [includeDeleted] - Whether to include changes indicating that items have 356 /// been removed from the list of changes, for example by deletion or loss of
359 * been removed from the list of changes, for example by deletion or loss of 357 /// access.
360 * access. 358 ///
361 * 359 /// [includeSubscribed] - Whether to include public files the user has opened
362 * [includeSubscribed] - Whether to include public files the user has opened 360 /// and shared files. When set to false, the list only includes owned files
363 * and shared files. When set to false, the list only includes owned files 361 /// plus any shared or public files the user has explicitly added to a folder
364 * plus any shared or public files the user has explicitly added to a folder 362 /// they own.
365 * they own. 363 ///
366 * 364 /// [includeTeamDriveItems] - Whether Team Drive files or changes should be
367 * [includeTeamDriveItems] - Whether Team Drive files or changes should be 365 /// included in results.
368 * included in results. 366 ///
369 * 367 /// [maxResults] - Maximum number of changes to return.
370 * [maxResults] - Maximum number of changes to return. 368 ///
371 * 369 /// [pageToken] - The token for continuing a previous list request on the
372 * [pageToken] - The token for continuing a previous list request on the next 370 /// next page. This should be set to the value of 'nextPageToken' from the
373 * page. This should be set to the value of 'nextPageToken' from the previous 371 /// previous response or to the response from the getStartPageToken method.
374 * response or to the response from the getStartPageToken method. 372 ///
375 * 373 /// [spaces] - A comma-separated list of spaces to query. Supported values
376 * [spaces] - A comma-separated list of spaces to query. Supported values are 374 /// are 'drive', 'appDataFolder' and 'photos'.
377 * 'drive', 'appDataFolder' and 'photos'. 375 ///
378 * 376 /// [startChangeId] - Change ID to start listing changes from.
379 * [startChangeId] - Change ID to start listing changes from. 377 ///
380 * 378 /// [supportsTeamDrives] - Whether the requesting application supports Team
381 * [supportsTeamDrives] - Whether the requesting application supports Team 379 /// Drives.
382 * Drives. 380 ///
383 * 381 /// [teamDriveId] - The Team Drive from which changes will be returned. If
384 * [teamDriveId] - The Team Drive from which changes will be returned. If 382 /// specified the change IDs will be reflective of the Team Drive; use the
385 * specified the change IDs will be reflective of the Team Drive; use the 383 /// combined Team Drive ID and change ID as an identifier.
386 * combined Team Drive ID and change ID as an identifier. 384 ///
387 * 385 /// Completes with a [ChangeList].
388 * Completes with a [ChangeList]. 386 ///
389 * 387 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
390 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 388 /// an error.
391 * error. 389 ///
392 * 390 /// If the used [http.Client] completes with an error when making a REST
393 * If the used [http.Client] completes with an error when making a REST call, 391 /// call, this method will complete with the same error.
394 * this method will complete with the same error. 392 async.Future<ChangeList> list(
395 */ 393 {core.bool includeCorpusRemovals,
396 async.Future<ChangeList> list({core.bool includeCorpusRemovals, core.bool incl udeDeleted, core.bool includeSubscribed, core.bool includeTeamDriveItems, core.i nt maxResults, core.String pageToken, core.String spaces, core.String startChang eId, core.bool supportsTeamDrives, core.String teamDriveId}) { 394 core.bool includeDeleted,
395 core.bool includeSubscribed,
396 core.bool includeTeamDriveItems,
397 core.int maxResults,
398 core.String pageToken,
399 core.String spaces,
400 core.String startChangeId,
401 core.bool supportsTeamDrives,
402 core.String teamDriveId}) {
397 var _url = null; 403 var _url = null;
398 var _queryParams = new core.Map(); 404 var _queryParams = new core.Map();
399 var _uploadMedia = null; 405 var _uploadMedia = null;
400 var _uploadOptions = null; 406 var _uploadOptions = null;
401 var _downloadOptions = commons.DownloadOptions.Metadata; 407 var _downloadOptions = commons.DownloadOptions.Metadata;
402 var _body = null; 408 var _body = null;
403 409
404 if (includeCorpusRemovals != null) { 410 if (includeCorpusRemovals != null) {
405 _queryParams["includeCorpusRemovals"] = ["${includeCorpusRemovals}"]; 411 _queryParams["includeCorpusRemovals"] = ["${includeCorpusRemovals}"];
406 } 412 }
(...skipping 20 matching lines...) Expand all
427 } 433 }
428 if (supportsTeamDrives != null) { 434 if (supportsTeamDrives != null) {
429 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 435 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
430 } 436 }
431 if (teamDriveId != null) { 437 if (teamDriveId != null) {
432 _queryParams["teamDriveId"] = [teamDriveId]; 438 _queryParams["teamDriveId"] = [teamDriveId];
433 } 439 }
434 440
435 _url = 'changes'; 441 _url = 'changes';
436 442
437 var _response = _requester.request(_url, 443 var _response = _requester.request(_url, "GET",
438 "GET", 444 body: _body,
439 body: _body, 445 queryParams: _queryParams,
440 queryParams: _queryParams, 446 uploadOptions: _uploadOptions,
441 uploadOptions: _uploadOptions, 447 uploadMedia: _uploadMedia,
442 uploadMedia: _uploadMedia, 448 downloadOptions: _downloadOptions);
443 downloadOptions: _downloadOptions);
444 return _response.then((data) => new ChangeList.fromJson(data)); 449 return _response.then((data) => new ChangeList.fromJson(data));
445 } 450 }
446 451
447 /** 452 /// Subscribe to changes for a user.
448 * Subscribe to changes for a user. 453 ///
449 * 454 /// [request] - The metadata request object.
450 * [request] - The metadata request object. 455 ///
451 * 456 /// Request parameters:
452 * Request parameters: 457 ///
453 * 458 /// [includeCorpusRemovals] - Whether changes should include the file
454 * [includeCorpusRemovals] - Whether changes should include the file resource 459 /// resource if the file is still accessible by the user at the time of the
455 * if the file is still accessible by the user at the time of the request, 460 /// request, even when a file was removed from the list of changes and there
456 * even when a file was removed from the list of changes and there will be no 461 /// will be no further change entries for this file.
457 * further change entries for this file. 462 ///
458 * 463 /// [includeDeleted] - Whether to include changes indicating that items have
459 * [includeDeleted] - Whether to include changes indicating that items have 464 /// been removed from the list of changes, for example by deletion or loss of
460 * been removed from the list of changes, for example by deletion or loss of 465 /// access.
461 * access. 466 ///
462 * 467 /// [includeSubscribed] - Whether to include public files the user has opened
463 * [includeSubscribed] - Whether to include public files the user has opened 468 /// and shared files. When set to false, the list only includes owned files
464 * and shared files. When set to false, the list only includes owned files 469 /// plus any shared or public files the user has explicitly added to a folder
465 * plus any shared or public files the user has explicitly added to a folder 470 /// they own.
466 * they own. 471 ///
467 * 472 /// [includeTeamDriveItems] - Whether Team Drive files or changes should be
468 * [includeTeamDriveItems] - Whether Team Drive files or changes should be 473 /// included in results.
469 * included in results. 474 ///
470 * 475 /// [maxResults] - Maximum number of changes to return.
471 * [maxResults] - Maximum number of changes to return. 476 ///
472 * 477 /// [pageToken] - The token for continuing a previous list request on the
473 * [pageToken] - The token for continuing a previous list request on the next 478 /// next page. This should be set to the value of 'nextPageToken' from the
474 * page. This should be set to the value of 'nextPageToken' from the previous 479 /// previous response or to the response from the getStartPageToken method.
475 * response or to the response from the getStartPageToken method. 480 ///
476 * 481 /// [spaces] - A comma-separated list of spaces to query. Supported values
477 * [spaces] - A comma-separated list of spaces to query. Supported values are 482 /// are 'drive', 'appDataFolder' and 'photos'.
478 * 'drive', 'appDataFolder' and 'photos'. 483 ///
479 * 484 /// [startChangeId] - Change ID to start listing changes from.
480 * [startChangeId] - Change ID to start listing changes from. 485 ///
481 * 486 /// [supportsTeamDrives] - Whether the requesting application supports Team
482 * [supportsTeamDrives] - Whether the requesting application supports Team 487 /// Drives.
483 * Drives. 488 ///
484 * 489 /// [teamDriveId] - The Team Drive from which changes will be returned. If
485 * [teamDriveId] - The Team Drive from which changes will be returned. If 490 /// specified the change IDs will be reflective of the Team Drive; use the
486 * specified the change IDs will be reflective of the Team Drive; use the 491 /// combined Team Drive ID and change ID as an identifier.
487 * combined Team Drive ID and change ID as an identifier. 492 ///
488 * 493 /// Completes with a [Channel].
489 * Completes with a [Channel]. 494 ///
490 * 495 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
491 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 496 /// an error.
492 * error. 497 ///
493 * 498 /// If the used [http.Client] completes with an error when making a REST
494 * If the used [http.Client] completes with an error when making a REST call, 499 /// call, this method will complete with the same error.
495 * this method will complete with the same error. 500 async.Future<Channel> watch(Channel request,
496 */ 501 {core.bool includeCorpusRemovals,
497 async.Future<Channel> watch(Channel request, {core.bool includeCorpusRemovals, core.bool includeDeleted, core.bool includeSubscribed, core.bool includeTeamDri veItems, core.int maxResults, core.String pageToken, core.String spaces, core.St ring startChangeId, core.bool supportsTeamDrives, core.String teamDriveId}) { 502 core.bool includeDeleted,
503 core.bool includeSubscribed,
504 core.bool includeTeamDriveItems,
505 core.int maxResults,
506 core.String pageToken,
507 core.String spaces,
508 core.String startChangeId,
509 core.bool supportsTeamDrives,
510 core.String teamDriveId}) {
498 var _url = null; 511 var _url = null;
499 var _queryParams = new core.Map(); 512 var _queryParams = new core.Map();
500 var _uploadMedia = null; 513 var _uploadMedia = null;
501 var _uploadOptions = null; 514 var _uploadOptions = null;
502 var _downloadOptions = commons.DownloadOptions.Metadata; 515 var _downloadOptions = commons.DownloadOptions.Metadata;
503 var _body = null; 516 var _body = null;
504 517
505 if (request != null) { 518 if (request != null) {
506 _body = convert_1.JSON.encode((request).toJson()); 519 _body = convert_1.JSON.encode((request).toJson());
507 } 520 }
(...skipping 23 matching lines...) Expand all
531 } 544 }
532 if (supportsTeamDrives != null) { 545 if (supportsTeamDrives != null) {
533 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 546 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
534 } 547 }
535 if (teamDriveId != null) { 548 if (teamDriveId != null) {
536 _queryParams["teamDriveId"] = [teamDriveId]; 549 _queryParams["teamDriveId"] = [teamDriveId];
537 } 550 }
538 551
539 _url = 'changes/watch'; 552 _url = 'changes/watch';
540 553
541 var _response = _requester.request(_url, 554 var _response = _requester.request(_url, "POST",
542 "POST", 555 body: _body,
543 body: _body, 556 queryParams: _queryParams,
544 queryParams: _queryParams, 557 uploadOptions: _uploadOptions,
545 uploadOptions: _uploadOptions, 558 uploadMedia: _uploadMedia,
546 uploadMedia: _uploadMedia, 559 downloadOptions: _downloadOptions);
547 downloadOptions: _downloadOptions);
548 return _response.then((data) => new Channel.fromJson(data)); 560 return _response.then((data) => new Channel.fromJson(data));
549 } 561 }
550
551 } 562 }
552 563
553
554 class ChannelsResourceApi { 564 class ChannelsResourceApi {
555 final commons.ApiRequester _requester; 565 final commons.ApiRequester _requester;
556 566
557 ChannelsResourceApi(commons.ApiRequester client) : 567 ChannelsResourceApi(commons.ApiRequester client) : _requester = client;
558 _requester = client;
559 568
560 /** 569 /// Stop watching resources through this channel
561 * Stop watching resources through this channel 570 ///
562 * 571 /// [request] - The metadata request object.
563 * [request] - The metadata request object. 572 ///
564 * 573 /// Request parameters:
565 * Request parameters: 574 ///
566 * 575 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
567 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 576 /// an error.
568 * error. 577 ///
569 * 578 /// If the used [http.Client] completes with an error when making a REST
570 * If the used [http.Client] completes with an error when making a REST call, 579 /// call, this method will complete with the same error.
571 * this method will complete with the same error.
572 */
573 async.Future stop(Channel request) { 580 async.Future stop(Channel request) {
574 var _url = null; 581 var _url = null;
575 var _queryParams = new core.Map(); 582 var _queryParams = new core.Map();
576 var _uploadMedia = null; 583 var _uploadMedia = null;
577 var _uploadOptions = null; 584 var _uploadOptions = null;
578 var _downloadOptions = commons.DownloadOptions.Metadata; 585 var _downloadOptions = commons.DownloadOptions.Metadata;
579 var _body = null; 586 var _body = null;
580 587
581 if (request != null) { 588 if (request != null) {
582 _body = convert_1.JSON.encode((request).toJson()); 589 _body = convert_1.JSON.encode((request).toJson());
583 } 590 }
584 591
585 _downloadOptions = null; 592 _downloadOptions = null;
586 593
587 _url = 'channels/stop'; 594 _url = 'channels/stop';
588 595
589 var _response = _requester.request(_url, 596 var _response = _requester.request(_url, "POST",
590 "POST", 597 body: _body,
591 body: _body, 598 queryParams: _queryParams,
592 queryParams: _queryParams, 599 uploadOptions: _uploadOptions,
593 uploadOptions: _uploadOptions, 600 uploadMedia: _uploadMedia,
594 uploadMedia: _uploadMedia, 601 downloadOptions: _downloadOptions);
595 downloadOptions: _downloadOptions);
596 return _response.then((data) => null); 602 return _response.then((data) => null);
597 } 603 }
598
599 } 604 }
600 605
601
602 class ChildrenResourceApi { 606 class ChildrenResourceApi {
603 final commons.ApiRequester _requester; 607 final commons.ApiRequester _requester;
604 608
605 ChildrenResourceApi(commons.ApiRequester client) : 609 ChildrenResourceApi(commons.ApiRequester client) : _requester = client;
606 _requester = client;
607 610
608 /** 611 /// Removes a child from a folder.
609 * Removes a child from a folder. 612 ///
610 * 613 /// Request parameters:
611 * Request parameters: 614 ///
612 * 615 /// [folderId] - The ID of the folder.
613 * [folderId] - The ID of the folder. 616 ///
614 * 617 /// [childId] - The ID of the child.
615 * [childId] - The ID of the child. 618 ///
616 * 619 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
617 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 620 /// an error.
618 * error. 621 ///
619 * 622 /// If the used [http.Client] completes with an error when making a REST
620 * If the used [http.Client] completes with an error when making a REST call, 623 /// call, this method will complete with the same error.
621 * this method will complete with the same error.
622 */
623 async.Future delete(core.String folderId, core.String childId) { 624 async.Future delete(core.String folderId, core.String childId) {
624 var _url = null; 625 var _url = null;
625 var _queryParams = new core.Map(); 626 var _queryParams = new core.Map();
626 var _uploadMedia = null; 627 var _uploadMedia = null;
627 var _uploadOptions = null; 628 var _uploadOptions = null;
628 var _downloadOptions = commons.DownloadOptions.Metadata; 629 var _downloadOptions = commons.DownloadOptions.Metadata;
629 var _body = null; 630 var _body = null;
630 631
631 if (folderId == null) { 632 if (folderId == null) {
632 throw new core.ArgumentError("Parameter folderId is required."); 633 throw new core.ArgumentError("Parameter folderId is required.");
633 } 634 }
634 if (childId == null) { 635 if (childId == null) {
635 throw new core.ArgumentError("Parameter childId is required."); 636 throw new core.ArgumentError("Parameter childId is required.");
636 } 637 }
637 638
638 _downloadOptions = null; 639 _downloadOptions = null;
639 640
640 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children/' + commons.Escaper.ecapeVariable('$childId'); 641 _url = 'files/' +
642 commons.Escaper.ecapeVariable('$folderId') +
643 '/children/' +
644 commons.Escaper.ecapeVariable('$childId');
641 645
642 var _response = _requester.request(_url, 646 var _response = _requester.request(_url, "DELETE",
643 "DELETE", 647 body: _body,
644 body: _body, 648 queryParams: _queryParams,
645 queryParams: _queryParams, 649 uploadOptions: _uploadOptions,
646 uploadOptions: _uploadOptions, 650 uploadMedia: _uploadMedia,
647 uploadMedia: _uploadMedia, 651 downloadOptions: _downloadOptions);
648 downloadOptions: _downloadOptions);
649 return _response.then((data) => null); 652 return _response.then((data) => null);
650 } 653 }
651 654
652 /** 655 /// Gets a specific child reference.
653 * Gets a specific child reference. 656 ///
654 * 657 /// Request parameters:
655 * Request parameters: 658 ///
656 * 659 /// [folderId] - The ID of the folder.
657 * [folderId] - The ID of the folder. 660 ///
658 * 661 /// [childId] - The ID of the child.
659 * [childId] - The ID of the child. 662 ///
660 * 663 /// Completes with a [ChildReference].
661 * Completes with a [ChildReference]. 664 ///
662 * 665 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
663 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 666 /// an error.
664 * error. 667 ///
665 * 668 /// If the used [http.Client] completes with an error when making a REST
666 * If the used [http.Client] completes with an error when making a REST call, 669 /// call, this method will complete with the same error.
667 * this method will complete with the same error.
668 */
669 async.Future<ChildReference> get(core.String folderId, core.String childId) { 670 async.Future<ChildReference> get(core.String folderId, core.String childId) {
670 var _url = null; 671 var _url = null;
671 var _queryParams = new core.Map(); 672 var _queryParams = new core.Map();
672 var _uploadMedia = null; 673 var _uploadMedia = null;
673 var _uploadOptions = null; 674 var _uploadOptions = null;
674 var _downloadOptions = commons.DownloadOptions.Metadata; 675 var _downloadOptions = commons.DownloadOptions.Metadata;
675 var _body = null; 676 var _body = null;
676 677
677 if (folderId == null) { 678 if (folderId == null) {
678 throw new core.ArgumentError("Parameter folderId is required."); 679 throw new core.ArgumentError("Parameter folderId is required.");
679 } 680 }
680 if (childId == null) { 681 if (childId == null) {
681 throw new core.ArgumentError("Parameter childId is required."); 682 throw new core.ArgumentError("Parameter childId is required.");
682 } 683 }
683 684
684 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children/' + commons.Escaper.ecapeVariable('$childId'); 685 _url = 'files/' +
686 commons.Escaper.ecapeVariable('$folderId') +
687 '/children/' +
688 commons.Escaper.ecapeVariable('$childId');
685 689
686 var _response = _requester.request(_url, 690 var _response = _requester.request(_url, "GET",
687 "GET", 691 body: _body,
688 body: _body, 692 queryParams: _queryParams,
689 queryParams: _queryParams, 693 uploadOptions: _uploadOptions,
690 uploadOptions: _uploadOptions, 694 uploadMedia: _uploadMedia,
691 uploadMedia: _uploadMedia, 695 downloadOptions: _downloadOptions);
692 downloadOptions: _downloadOptions);
693 return _response.then((data) => new ChildReference.fromJson(data)); 696 return _response.then((data) => new ChildReference.fromJson(data));
694 } 697 }
695 698
696 /** 699 /// Inserts a file into a folder.
697 * Inserts a file into a folder. 700 ///
698 * 701 /// [request] - The metadata request object.
699 * [request] - The metadata request object. 702 ///
700 * 703 /// Request parameters:
701 * Request parameters: 704 ///
702 * 705 /// [folderId] - The ID of the folder.
703 * [folderId] - The ID of the folder. 706 ///
704 * 707 /// [supportsTeamDrives] - Whether the requesting application supports Team
705 * [supportsTeamDrives] - Whether the requesting application supports Team 708 /// Drives.
706 * Drives. 709 ///
707 * 710 /// Completes with a [ChildReference].
708 * Completes with a [ChildReference]. 711 ///
709 * 712 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
710 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 713 /// an error.
711 * error. 714 ///
712 * 715 /// If the used [http.Client] completes with an error when making a REST
713 * If the used [http.Client] completes with an error when making a REST call, 716 /// call, this method will complete with the same error.
714 * this method will complete with the same error. 717 async.Future<ChildReference> insert(
715 */ 718 ChildReference request, core.String folderId,
716 async.Future<ChildReference> insert(ChildReference request, core.String folder Id, {core.bool supportsTeamDrives}) { 719 {core.bool supportsTeamDrives}) {
717 var _url = null; 720 var _url = null;
718 var _queryParams = new core.Map(); 721 var _queryParams = new core.Map();
719 var _uploadMedia = null; 722 var _uploadMedia = null;
720 var _uploadOptions = null; 723 var _uploadOptions = null;
721 var _downloadOptions = commons.DownloadOptions.Metadata; 724 var _downloadOptions = commons.DownloadOptions.Metadata;
722 var _body = null; 725 var _body = null;
723 726
724 if (request != null) { 727 if (request != null) {
725 _body = convert_1.JSON.encode((request).toJson()); 728 _body = convert_1.JSON.encode((request).toJson());
726 } 729 }
727 if (folderId == null) { 730 if (folderId == null) {
728 throw new core.ArgumentError("Parameter folderId is required."); 731 throw new core.ArgumentError("Parameter folderId is required.");
729 } 732 }
730 if (supportsTeamDrives != null) { 733 if (supportsTeamDrives != null) {
731 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 734 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
732 } 735 }
733 736
734 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children'; 737 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children';
735 738
736 var _response = _requester.request(_url, 739 var _response = _requester.request(_url, "POST",
737 "POST", 740 body: _body,
738 body: _body, 741 queryParams: _queryParams,
739 queryParams: _queryParams, 742 uploadOptions: _uploadOptions,
740 uploadOptions: _uploadOptions, 743 uploadMedia: _uploadMedia,
741 uploadMedia: _uploadMedia, 744 downloadOptions: _downloadOptions);
742 downloadOptions: _downloadOptions);
743 return _response.then((data) => new ChildReference.fromJson(data)); 745 return _response.then((data) => new ChildReference.fromJson(data));
744 } 746 }
745 747
746 /** 748 /// Lists a folder's children.
747 * Lists a folder's children. 749 ///
748 * 750 /// Request parameters:
749 * Request parameters: 751 ///
750 * 752 /// [folderId] - The ID of the folder.
751 * [folderId] - The ID of the folder. 753 ///
752 * 754 /// [maxResults] - Maximum number of children to return.
753 * [maxResults] - Maximum number of children to return. 755 ///
754 * 756 /// [orderBy] - A comma-separated list of sort keys. Valid keys are
755 * [orderBy] - A comma-separated list of sort keys. Valid keys are 757 /// 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate',
756 * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 758 /// 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate',
757 * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 759 /// 'starred', and 'title'. Each key sorts ascending by default, but may be
758 * and 'title'. Each key sorts ascending by default, but may be reversed with 760 /// reversed with the 'desc' modifier. Example usage:
759 * the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate 761 /// ?orderBy=folder,modifiedDate desc,title. Please note that there is a
760 * desc,title. Please note that there is a current limitation for users with 762 /// current limitation for users with approximately one million files in
761 * approximately one million files in which the requested sort order is 763 /// which the requested sort order is ignored.
762 * ignored. 764 ///
763 * 765 /// [pageToken] - Page token for children.
764 * [pageToken] - Page token for children. 766 ///
765 * 767 /// [q] - Query string for searching children.
766 * [q] - Query string for searching children. 768 ///
767 * 769 /// Completes with a [ChildList].
768 * Completes with a [ChildList]. 770 ///
769 * 771 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
770 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 772 /// an error.
771 * error. 773 ///
772 * 774 /// If the used [http.Client] completes with an error when making a REST
773 * If the used [http.Client] completes with an error when making a REST call, 775 /// call, this method will complete with the same error.
774 * this method will complete with the same error. 776 async.Future<ChildList> list(core.String folderId,
775 */ 777 {core.int maxResults,
776 async.Future<ChildList> list(core.String folderId, {core.int maxResults, core. String orderBy, core.String pageToken, core.String q}) { 778 core.String orderBy,
779 core.String pageToken,
780 core.String q}) {
777 var _url = null; 781 var _url = null;
778 var _queryParams = new core.Map(); 782 var _queryParams = new core.Map();
779 var _uploadMedia = null; 783 var _uploadMedia = null;
780 var _uploadOptions = null; 784 var _uploadOptions = null;
781 var _downloadOptions = commons.DownloadOptions.Metadata; 785 var _downloadOptions = commons.DownloadOptions.Metadata;
782 var _body = null; 786 var _body = null;
783 787
784 if (folderId == null) { 788 if (folderId == null) {
785 throw new core.ArgumentError("Parameter folderId is required."); 789 throw new core.ArgumentError("Parameter folderId is required.");
786 } 790 }
787 if (maxResults != null) { 791 if (maxResults != null) {
788 _queryParams["maxResults"] = ["${maxResults}"]; 792 _queryParams["maxResults"] = ["${maxResults}"];
789 } 793 }
790 if (orderBy != null) { 794 if (orderBy != null) {
791 _queryParams["orderBy"] = [orderBy]; 795 _queryParams["orderBy"] = [orderBy];
792 } 796 }
793 if (pageToken != null) { 797 if (pageToken != null) {
794 _queryParams["pageToken"] = [pageToken]; 798 _queryParams["pageToken"] = [pageToken];
795 } 799 }
796 if (q != null) { 800 if (q != null) {
797 _queryParams["q"] = [q]; 801 _queryParams["q"] = [q];
798 } 802 }
799 803
800 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children'; 804 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children';
801 805
802 var _response = _requester.request(_url, 806 var _response = _requester.request(_url, "GET",
803 "GET", 807 body: _body,
804 body: _body, 808 queryParams: _queryParams,
805 queryParams: _queryParams, 809 uploadOptions: _uploadOptions,
806 uploadOptions: _uploadOptions, 810 uploadMedia: _uploadMedia,
807 uploadMedia: _uploadMedia, 811 downloadOptions: _downloadOptions);
808 downloadOptions: _downloadOptions);
809 return _response.then((data) => new ChildList.fromJson(data)); 812 return _response.then((data) => new ChildList.fromJson(data));
810 } 813 }
811
812 } 814 }
813 815
814
815 class CommentsResourceApi { 816 class CommentsResourceApi {
816 final commons.ApiRequester _requester; 817 final commons.ApiRequester _requester;
817 818
818 CommentsResourceApi(commons.ApiRequester client) : 819 CommentsResourceApi(commons.ApiRequester client) : _requester = client;
819 _requester = client;
820 820
821 /** 821 /// Deletes a comment.
822 * Deletes a comment. 822 ///
823 * 823 /// Request parameters:
824 * Request parameters: 824 ///
825 * 825 /// [fileId] - The ID of the file.
826 * [fileId] - The ID of the file. 826 ///
827 * 827 /// [commentId] - The ID of the comment.
828 * [commentId] - The ID of the comment. 828 ///
829 * 829 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
830 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 830 /// an error.
831 * error. 831 ///
832 * 832 /// If the used [http.Client] completes with an error when making a REST
833 * If the used [http.Client] completes with an error when making a REST call, 833 /// call, this method will complete with the same error.
834 * this method will complete with the same error.
835 */
836 async.Future delete(core.String fileId, core.String commentId) { 834 async.Future delete(core.String fileId, core.String commentId) {
837 var _url = null; 835 var _url = null;
838 var _queryParams = new core.Map(); 836 var _queryParams = new core.Map();
839 var _uploadMedia = null; 837 var _uploadMedia = null;
840 var _uploadOptions = null; 838 var _uploadOptions = null;
841 var _downloadOptions = commons.DownloadOptions.Metadata; 839 var _downloadOptions = commons.DownloadOptions.Metadata;
842 var _body = null; 840 var _body = null;
843 841
844 if (fileId == null) { 842 if (fileId == null) {
845 throw new core.ArgumentError("Parameter fileId is required."); 843 throw new core.ArgumentError("Parameter fileId is required.");
846 } 844 }
847 if (commentId == null) { 845 if (commentId == null) {
848 throw new core.ArgumentError("Parameter commentId is required."); 846 throw new core.ArgumentError("Parameter commentId is required.");
849 } 847 }
850 848
851 _downloadOptions = null; 849 _downloadOptions = null;
852 850
853 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId'); 851 _url = 'files/' +
852 commons.Escaper.ecapeVariable('$fileId') +
853 '/comments/' +
854 commons.Escaper.ecapeVariable('$commentId');
854 855
855 var _response = _requester.request(_url, 856 var _response = _requester.request(_url, "DELETE",
856 "DELETE", 857 body: _body,
857 body: _body, 858 queryParams: _queryParams,
858 queryParams: _queryParams, 859 uploadOptions: _uploadOptions,
859 uploadOptions: _uploadOptions, 860 uploadMedia: _uploadMedia,
860 uploadMedia: _uploadMedia, 861 downloadOptions: _downloadOptions);
861 downloadOptions: _downloadOptions);
862 return _response.then((data) => null); 862 return _response.then((data) => null);
863 } 863 }
864 864
865 /** 865 /// Gets a comment by ID.
866 * Gets a comment by ID. 866 ///
867 * 867 /// Request parameters:
868 * Request parameters: 868 ///
869 * 869 /// [fileId] - The ID of the file.
870 * [fileId] - The ID of the file. 870 ///
871 * 871 /// [commentId] - The ID of the comment.
872 * [commentId] - The ID of the comment. 872 ///
873 * 873 /// [includeDeleted] - If set, this will succeed when retrieving a deleted
874 * [includeDeleted] - If set, this will succeed when retrieving a deleted 874 /// comment, and will include any deleted replies.
875 * comment, and will include any deleted replies. 875 ///
876 * 876 /// Completes with a [Comment].
877 * Completes with a [Comment]. 877 ///
878 * 878 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
879 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 879 /// an error.
880 * error. 880 ///
881 * 881 /// If the used [http.Client] completes with an error when making a REST
882 * If the used [http.Client] completes with an error when making a REST call, 882 /// call, this method will complete with the same error.
883 * this method will complete with the same error. 883 async.Future<Comment> get(core.String fileId, core.String commentId,
884 */ 884 {core.bool includeDeleted}) {
885 async.Future<Comment> get(core.String fileId, core.String commentId, {core.boo l includeDeleted}) {
886 var _url = null; 885 var _url = null;
887 var _queryParams = new core.Map(); 886 var _queryParams = new core.Map();
888 var _uploadMedia = null; 887 var _uploadMedia = null;
889 var _uploadOptions = null; 888 var _uploadOptions = null;
890 var _downloadOptions = commons.DownloadOptions.Metadata; 889 var _downloadOptions = commons.DownloadOptions.Metadata;
891 var _body = null; 890 var _body = null;
892 891
893 if (fileId == null) { 892 if (fileId == null) {
894 throw new core.ArgumentError("Parameter fileId is required."); 893 throw new core.ArgumentError("Parameter fileId is required.");
895 } 894 }
896 if (commentId == null) { 895 if (commentId == null) {
897 throw new core.ArgumentError("Parameter commentId is required."); 896 throw new core.ArgumentError("Parameter commentId is required.");
898 } 897 }
899 if (includeDeleted != null) { 898 if (includeDeleted != null) {
900 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 899 _queryParams["includeDeleted"] = ["${includeDeleted}"];
901 } 900 }
902 901
903 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId'); 902 _url = 'files/' +
903 commons.Escaper.ecapeVariable('$fileId') +
904 '/comments/' +
905 commons.Escaper.ecapeVariable('$commentId');
904 906
905 var _response = _requester.request(_url, 907 var _response = _requester.request(_url, "GET",
906 "GET", 908 body: _body,
907 body: _body, 909 queryParams: _queryParams,
908 queryParams: _queryParams, 910 uploadOptions: _uploadOptions,
909 uploadOptions: _uploadOptions, 911 uploadMedia: _uploadMedia,
910 uploadMedia: _uploadMedia, 912 downloadOptions: _downloadOptions);
911 downloadOptions: _downloadOptions);
912 return _response.then((data) => new Comment.fromJson(data)); 913 return _response.then((data) => new Comment.fromJson(data));
913 } 914 }
914 915
915 /** 916 /// Creates a new comment on the given file.
916 * Creates a new comment on the given file. 917 ///
917 * 918 /// [request] - The metadata request object.
918 * [request] - The metadata request object. 919 ///
919 * 920 /// Request parameters:
920 * Request parameters: 921 ///
921 * 922 /// [fileId] - The ID of the file.
922 * [fileId] - The ID of the file. 923 ///
923 * 924 /// Completes with a [Comment].
924 * Completes with a [Comment]. 925 ///
925 * 926 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
926 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 927 /// an error.
927 * error. 928 ///
928 * 929 /// If the used [http.Client] completes with an error when making a REST
929 * If the used [http.Client] completes with an error when making a REST call, 930 /// call, this method will complete with the same error.
930 * this method will complete with the same error.
931 */
932 async.Future<Comment> insert(Comment request, core.String fileId) { 931 async.Future<Comment> insert(Comment request, core.String fileId) {
933 var _url = null; 932 var _url = null;
934 var _queryParams = new core.Map(); 933 var _queryParams = new core.Map();
935 var _uploadMedia = null; 934 var _uploadMedia = null;
936 var _uploadOptions = null; 935 var _uploadOptions = null;
937 var _downloadOptions = commons.DownloadOptions.Metadata; 936 var _downloadOptions = commons.DownloadOptions.Metadata;
938 var _body = null; 937 var _body = null;
939 938
940 if (request != null) { 939 if (request != null) {
941 _body = convert_1.JSON.encode((request).toJson()); 940 _body = convert_1.JSON.encode((request).toJson());
942 } 941 }
943 if (fileId == null) { 942 if (fileId == null) {
944 throw new core.ArgumentError("Parameter fileId is required."); 943 throw new core.ArgumentError("Parameter fileId is required.");
945 } 944 }
946 945
947 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments'; 946 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments';
948 947
949 var _response = _requester.request(_url, 948 var _response = _requester.request(_url, "POST",
950 "POST", 949 body: _body,
951 body: _body, 950 queryParams: _queryParams,
952 queryParams: _queryParams, 951 uploadOptions: _uploadOptions,
953 uploadOptions: _uploadOptions, 952 uploadMedia: _uploadMedia,
954 uploadMedia: _uploadMedia, 953 downloadOptions: _downloadOptions);
955 downloadOptions: _downloadOptions);
956 return _response.then((data) => new Comment.fromJson(data)); 954 return _response.then((data) => new Comment.fromJson(data));
957 } 955 }
958 956
959 /** 957 /// Lists a file's comments.
960 * Lists a file's comments. 958 ///
961 * 959 /// Request parameters:
962 * Request parameters: 960 ///
963 * 961 /// [fileId] - The ID of the file.
964 * [fileId] - The ID of the file. 962 ///
965 * 963 /// [includeDeleted] - If set, all comments and replies, including deleted
966 * [includeDeleted] - If set, all comments and replies, including deleted 964 /// comments and replies (with content stripped) will be returned.
967 * comments and replies (with content stripped) will be returned. 965 ///
968 * 966 /// [maxResults] - The maximum number of discussions to include in the
969 * [maxResults] - The maximum number of discussions to include in the 967 /// response, used for paging.
970 * response, used for paging. 968 /// Value must be between "0" and "100".
971 * Value must be between "0" and "100". 969 ///
972 * 970 /// [pageToken] - The continuation token, used to page through large result
973 * [pageToken] - The continuation token, used to page through large result 971 /// sets. To get the next page of results, set this parameter to the value of
974 * sets. To get the next page of results, set this parameter to the value of 972 /// "nextPageToken" from the previous response.
975 * "nextPageToken" from the previous response. 973 ///
976 * 974 /// [updatedMin] - Only discussions that were updated after this timestamp
977 * [updatedMin] - Only discussions that were updated after this timestamp will 975 /// will be returned. Formatted as an RFC 3339 timestamp.
978 * be returned. Formatted as an RFC 3339 timestamp. 976 ///
979 * 977 /// Completes with a [CommentList].
980 * Completes with a [CommentList]. 978 ///
981 * 979 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
982 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 980 /// an error.
983 * error. 981 ///
984 * 982 /// If the used [http.Client] completes with an error when making a REST
985 * If the used [http.Client] completes with an error when making a REST call, 983 /// call, this method will complete with the same error.
986 * this method will complete with the same error. 984 async.Future<CommentList> list(core.String fileId,
987 */ 985 {core.bool includeDeleted,
988 async.Future<CommentList> list(core.String fileId, {core.bool includeDeleted, core.int maxResults, core.String pageToken, core.String updatedMin}) { 986 core.int maxResults,
987 core.String pageToken,
988 core.String updatedMin}) {
989 var _url = null; 989 var _url = null;
990 var _queryParams = new core.Map(); 990 var _queryParams = new core.Map();
991 var _uploadMedia = null; 991 var _uploadMedia = null;
992 var _uploadOptions = null; 992 var _uploadOptions = null;
993 var _downloadOptions = commons.DownloadOptions.Metadata; 993 var _downloadOptions = commons.DownloadOptions.Metadata;
994 var _body = null; 994 var _body = null;
995 995
996 if (fileId == null) { 996 if (fileId == null) {
997 throw new core.ArgumentError("Parameter fileId is required."); 997 throw new core.ArgumentError("Parameter fileId is required.");
998 } 998 }
999 if (includeDeleted != null) { 999 if (includeDeleted != null) {
1000 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 1000 _queryParams["includeDeleted"] = ["${includeDeleted}"];
1001 } 1001 }
1002 if (maxResults != null) { 1002 if (maxResults != null) {
1003 _queryParams["maxResults"] = ["${maxResults}"]; 1003 _queryParams["maxResults"] = ["${maxResults}"];
1004 } 1004 }
1005 if (pageToken != null) { 1005 if (pageToken != null) {
1006 _queryParams["pageToken"] = [pageToken]; 1006 _queryParams["pageToken"] = [pageToken];
1007 } 1007 }
1008 if (updatedMin != null) { 1008 if (updatedMin != null) {
1009 _queryParams["updatedMin"] = [updatedMin]; 1009 _queryParams["updatedMin"] = [updatedMin];
1010 } 1010 }
1011 1011
1012 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments'; 1012 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments';
1013 1013
1014 var _response = _requester.request(_url, 1014 var _response = _requester.request(_url, "GET",
1015 "GET", 1015 body: _body,
1016 body: _body, 1016 queryParams: _queryParams,
1017 queryParams: _queryParams, 1017 uploadOptions: _uploadOptions,
1018 uploadOptions: _uploadOptions, 1018 uploadMedia: _uploadMedia,
1019 uploadMedia: _uploadMedia, 1019 downloadOptions: _downloadOptions);
1020 downloadOptions: _downloadOptions);
1021 return _response.then((data) => new CommentList.fromJson(data)); 1020 return _response.then((data) => new CommentList.fromJson(data));
1022 } 1021 }
1023 1022
1024 /** 1023 /// Updates an existing comment. This method supports patch semantics.
1025 * Updates an existing comment. This method supports patch semantics. 1024 ///
1026 * 1025 /// [request] - The metadata request object.
1027 * [request] - The metadata request object. 1026 ///
1028 * 1027 /// Request parameters:
1029 * Request parameters: 1028 ///
1030 * 1029 /// [fileId] - The ID of the file.
1031 * [fileId] - The ID of the file. 1030 ///
1032 * 1031 /// [commentId] - The ID of the comment.
1033 * [commentId] - The ID of the comment. 1032 ///
1034 * 1033 /// Completes with a [Comment].
1035 * Completes with a [Comment]. 1034 ///
1036 * 1035 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1037 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1036 /// an error.
1038 * error. 1037 ///
1039 * 1038 /// If the used [http.Client] completes with an error when making a REST
1040 * If the used [http.Client] completes with an error when making a REST call, 1039 /// call, this method will complete with the same error.
1041 * this method will complete with the same error. 1040 async.Future<Comment> patch(
1042 */ 1041 Comment request, core.String fileId, core.String commentId) {
1043 async.Future<Comment> patch(Comment request, core.String fileId, core.String c ommentId) {
1044 var _url = null; 1042 var _url = null;
1045 var _queryParams = new core.Map(); 1043 var _queryParams = new core.Map();
1046 var _uploadMedia = null; 1044 var _uploadMedia = null;
1047 var _uploadOptions = null; 1045 var _uploadOptions = null;
1048 var _downloadOptions = commons.DownloadOptions.Metadata; 1046 var _downloadOptions = commons.DownloadOptions.Metadata;
1049 var _body = null; 1047 var _body = null;
1050 1048
1051 if (request != null) { 1049 if (request != null) {
1052 _body = convert_1.JSON.encode((request).toJson()); 1050 _body = convert_1.JSON.encode((request).toJson());
1053 } 1051 }
1054 if (fileId == null) { 1052 if (fileId == null) {
1055 throw new core.ArgumentError("Parameter fileId is required."); 1053 throw new core.ArgumentError("Parameter fileId is required.");
1056 } 1054 }
1057 if (commentId == null) { 1055 if (commentId == null) {
1058 throw new core.ArgumentError("Parameter commentId is required."); 1056 throw new core.ArgumentError("Parameter commentId is required.");
1059 } 1057 }
1060 1058
1061 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId'); 1059 _url = 'files/' +
1060 commons.Escaper.ecapeVariable('$fileId') +
1061 '/comments/' +
1062 commons.Escaper.ecapeVariable('$commentId');
1062 1063
1063 var _response = _requester.request(_url, 1064 var _response = _requester.request(_url, "PATCH",
1064 "PATCH", 1065 body: _body,
1065 body: _body, 1066 queryParams: _queryParams,
1066 queryParams: _queryParams, 1067 uploadOptions: _uploadOptions,
1067 uploadOptions: _uploadOptions, 1068 uploadMedia: _uploadMedia,
1068 uploadMedia: _uploadMedia, 1069 downloadOptions: _downloadOptions);
1069 downloadOptions: _downloadOptions);
1070 return _response.then((data) => new Comment.fromJson(data)); 1070 return _response.then((data) => new Comment.fromJson(data));
1071 } 1071 }
1072 1072
1073 /** 1073 /// Updates an existing comment.
1074 * Updates an existing comment. 1074 ///
1075 * 1075 /// [request] - The metadata request object.
1076 * [request] - The metadata request object. 1076 ///
1077 * 1077 /// Request parameters:
1078 * Request parameters: 1078 ///
1079 * 1079 /// [fileId] - The ID of the file.
1080 * [fileId] - The ID of the file. 1080 ///
1081 * 1081 /// [commentId] - The ID of the comment.
1082 * [commentId] - The ID of the comment. 1082 ///
1083 * 1083 /// Completes with a [Comment].
1084 * Completes with a [Comment]. 1084 ///
1085 * 1085 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1086 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1086 /// an error.
1087 * error. 1087 ///
1088 * 1088 /// If the used [http.Client] completes with an error when making a REST
1089 * If the used [http.Client] completes with an error when making a REST call, 1089 /// call, this method will complete with the same error.
1090 * this method will complete with the same error. 1090 async.Future<Comment> update(
1091 */ 1091 Comment request, core.String fileId, core.String commentId) {
1092 async.Future<Comment> update(Comment request, core.String fileId, core.String commentId) {
1093 var _url = null; 1092 var _url = null;
1094 var _queryParams = new core.Map(); 1093 var _queryParams = new core.Map();
1095 var _uploadMedia = null; 1094 var _uploadMedia = null;
1096 var _uploadOptions = null; 1095 var _uploadOptions = null;
1097 var _downloadOptions = commons.DownloadOptions.Metadata; 1096 var _downloadOptions = commons.DownloadOptions.Metadata;
1098 var _body = null; 1097 var _body = null;
1099 1098
1100 if (request != null) { 1099 if (request != null) {
1101 _body = convert_1.JSON.encode((request).toJson()); 1100 _body = convert_1.JSON.encode((request).toJson());
1102 } 1101 }
1103 if (fileId == null) { 1102 if (fileId == null) {
1104 throw new core.ArgumentError("Parameter fileId is required."); 1103 throw new core.ArgumentError("Parameter fileId is required.");
1105 } 1104 }
1106 if (commentId == null) { 1105 if (commentId == null) {
1107 throw new core.ArgumentError("Parameter commentId is required."); 1106 throw new core.ArgumentError("Parameter commentId is required.");
1108 } 1107 }
1109 1108
1110 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId'); 1109 _url = 'files/' +
1110 commons.Escaper.ecapeVariable('$fileId') +
1111 '/comments/' +
1112 commons.Escaper.ecapeVariable('$commentId');
1111 1113
1112 var _response = _requester.request(_url, 1114 var _response = _requester.request(_url, "PUT",
1113 "PUT", 1115 body: _body,
1114 body: _body, 1116 queryParams: _queryParams,
1115 queryParams: _queryParams, 1117 uploadOptions: _uploadOptions,
1116 uploadOptions: _uploadOptions, 1118 uploadMedia: _uploadMedia,
1117 uploadMedia: _uploadMedia, 1119 downloadOptions: _downloadOptions);
1118 downloadOptions: _downloadOptions);
1119 return _response.then((data) => new Comment.fromJson(data)); 1120 return _response.then((data) => new Comment.fromJson(data));
1120 } 1121 }
1121
1122 } 1122 }
1123 1123
1124
1125 class FilesResourceApi { 1124 class FilesResourceApi {
1126 final commons.ApiRequester _requester; 1125 final commons.ApiRequester _requester;
1127 1126
1128 FilesResourceApi(commons.ApiRequester client) : 1127 FilesResourceApi(commons.ApiRequester client) : _requester = client;
1129 _requester = client;
1130 1128
1131 /** 1129 /// Creates a copy of the specified file.
1132 * Creates a copy of the specified file. 1130 ///
1133 * 1131 /// [request] - The metadata request object.
1134 * [request] - The metadata request object. 1132 ///
1135 * 1133 /// Request parameters:
1136 * Request parameters: 1134 ///
1137 * 1135 /// [fileId] - The ID of the file to copy.
1138 * [fileId] - The ID of the file to copy. 1136 ///
1139 * 1137 /// [convert] - Whether to convert this file to the corresponding Google Docs
1140 * [convert] - Whether to convert this file to the corresponding Google Docs 1138 /// format.
1141 * format. 1139 ///
1142 * 1140 /// [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1143 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 1141 ///
1144 * 1142 /// [ocrLanguage] - If ocr is true, hints at the language to use. Valid
1145 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 1143 /// values are BCP 47 codes.
1146 * are BCP 47 codes. 1144 ///
1147 * 1145 /// [pinned] - Whether to pin the head revision of the new copy. A file can
1148 * [pinned] - Whether to pin the head revision of the new copy. A file can 1146 /// have a maximum of 200 pinned revisions.
1149 * have a maximum of 200 pinned revisions. 1147 ///
1150 * 1148 /// [supportsTeamDrives] - Whether the requesting application supports Team
1151 * [supportsTeamDrives] - Whether the requesting application supports Team 1149 /// Drives.
1152 * Drives. 1150 ///
1153 * 1151 /// [timedTextLanguage] - The language of the timed text.
1154 * [timedTextLanguage] - The language of the timed text. 1152 ///
1155 * 1153 /// [timedTextTrackName] - The timed text track name.
1156 * [timedTextTrackName] - The timed text track name. 1154 ///
1157 * 1155 /// [visibility] - The visibility of the new file. This parameter is only
1158 * [visibility] - The visibility of the new file. This parameter is only 1156 /// relevant when the source is not a native Google Doc and convert=false.
1159 * relevant when the source is not a native Google Doc and convert=false. 1157 /// Possible string values are:
1160 * Possible string values are: 1158 /// - "DEFAULT" : The visibility of the new file is determined by the user's
1161 * - "DEFAULT" : The visibility of the new file is determined by the user's 1159 /// default visibility/sharing policies.
1162 * default visibility/sharing policies. 1160 /// - "PRIVATE" : The new file will be visible to only the owner.
1163 * - "PRIVATE" : The new file will be visible to only the owner. 1161 ///
1164 * 1162 /// Completes with a [File].
1165 * Completes with a [File]. 1163 ///
1166 * 1164 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1167 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1165 /// an error.
1168 * error. 1166 ///
1169 * 1167 /// If the used [http.Client] completes with an error when making a REST
1170 * If the used [http.Client] completes with an error when making a REST call, 1168 /// call, this method will complete with the same error.
1171 * this method will complete with the same error. 1169 async.Future<File> copy(File request, core.String fileId,
1172 */ 1170 {core.bool convert,
1173 async.Future<File> copy(File request, core.String fileId, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.bool supportsTeam Drives, core.String timedTextLanguage, core.String timedTextTrackName, core.Stri ng visibility}) { 1171 core.bool ocr,
1172 core.String ocrLanguage,
1173 core.bool pinned,
1174 core.bool supportsTeamDrives,
1175 core.String timedTextLanguage,
1176 core.String timedTextTrackName,
1177 core.String visibility}) {
1174 var _url = null; 1178 var _url = null;
1175 var _queryParams = new core.Map(); 1179 var _queryParams = new core.Map();
1176 var _uploadMedia = null; 1180 var _uploadMedia = null;
1177 var _uploadOptions = null; 1181 var _uploadOptions = null;
1178 var _downloadOptions = commons.DownloadOptions.Metadata; 1182 var _downloadOptions = commons.DownloadOptions.Metadata;
1179 var _body = null; 1183 var _body = null;
1180 1184
1181 if (request != null) { 1185 if (request != null) {
1182 _body = convert_1.JSON.encode((request).toJson()); 1186 _body = convert_1.JSON.encode((request).toJson());
1183 } 1187 }
(...skipping 20 matching lines...) Expand all
1204 } 1208 }
1205 if (timedTextTrackName != null) { 1209 if (timedTextTrackName != null) {
1206 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1210 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1207 } 1211 }
1208 if (visibility != null) { 1212 if (visibility != null) {
1209 _queryParams["visibility"] = [visibility]; 1213 _queryParams["visibility"] = [visibility];
1210 } 1214 }
1211 1215
1212 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/copy'; 1216 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/copy';
1213 1217
1214 var _response = _requester.request(_url, 1218 var _response = _requester.request(_url, "POST",
1215 "POST", 1219 body: _body,
1216 body: _body, 1220 queryParams: _queryParams,
1217 queryParams: _queryParams, 1221 uploadOptions: _uploadOptions,
1218 uploadOptions: _uploadOptions, 1222 uploadMedia: _uploadMedia,
1219 uploadMedia: _uploadMedia, 1223 downloadOptions: _downloadOptions);
1220 downloadOptions: _downloadOptions);
1221 return _response.then((data) => new File.fromJson(data)); 1224 return _response.then((data) => new File.fromJson(data));
1222 } 1225 }
1223 1226
1224 /** 1227 /// Permanently deletes a file by ID. Skips the trash. The currently
1225 * Permanently deletes a file by ID. Skips the trash. The currently 1228 /// authenticated user must own the file or be an organizer on the parent for
1226 * authenticated user must own the file or be an organizer on the parent for 1229 /// Team Drive files.
1227 * Team Drive files. 1230 ///
1228 * 1231 /// Request parameters:
1229 * Request parameters: 1232 ///
1230 * 1233 /// [fileId] - The ID of the file to delete.
1231 * [fileId] - The ID of the file to delete. 1234 ///
1232 * 1235 /// [supportsTeamDrives] - Whether the requesting application supports Team
1233 * [supportsTeamDrives] - Whether the requesting application supports Team 1236 /// Drives.
1234 * Drives. 1237 ///
1235 * 1238 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1236 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1239 /// an error.
1237 * error. 1240 ///
1238 * 1241 /// If the used [http.Client] completes with an error when making a REST
1239 * If the used [http.Client] completes with an error when making a REST call, 1242 /// call, this method will complete with the same error.
1240 * this method will complete with the same error.
1241 */
1242 async.Future delete(core.String fileId, {core.bool supportsTeamDrives}) { 1243 async.Future delete(core.String fileId, {core.bool supportsTeamDrives}) {
1243 var _url = null; 1244 var _url = null;
1244 var _queryParams = new core.Map(); 1245 var _queryParams = new core.Map();
1245 var _uploadMedia = null; 1246 var _uploadMedia = null;
1246 var _uploadOptions = null; 1247 var _uploadOptions = null;
1247 var _downloadOptions = commons.DownloadOptions.Metadata; 1248 var _downloadOptions = commons.DownloadOptions.Metadata;
1248 var _body = null; 1249 var _body = null;
1249 1250
1250 if (fileId == null) { 1251 if (fileId == null) {
1251 throw new core.ArgumentError("Parameter fileId is required."); 1252 throw new core.ArgumentError("Parameter fileId is required.");
1252 } 1253 }
1253 if (supportsTeamDrives != null) { 1254 if (supportsTeamDrives != null) {
1254 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 1255 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1255 } 1256 }
1256 1257
1257 _downloadOptions = null; 1258 _downloadOptions = null;
1258 1259
1259 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); 1260 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1260 1261
1261 var _response = _requester.request(_url, 1262 var _response = _requester.request(_url, "DELETE",
1262 "DELETE", 1263 body: _body,
1263 body: _body, 1264 queryParams: _queryParams,
1264 queryParams: _queryParams, 1265 uploadOptions: _uploadOptions,
1265 uploadOptions: _uploadOptions, 1266 uploadMedia: _uploadMedia,
1266 uploadMedia: _uploadMedia, 1267 downloadOptions: _downloadOptions);
1267 downloadOptions: _downloadOptions);
1268 return _response.then((data) => null); 1268 return _response.then((data) => null);
1269 } 1269 }
1270 1270
1271 /** 1271 /// Permanently deletes all of the user's trashed files.
1272 * Permanently deletes all of the user's trashed files. 1272 ///
1273 * 1273 /// Request parameters:
1274 * Request parameters: 1274 ///
1275 * 1275 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1276 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1276 /// an error.
1277 * error. 1277 ///
1278 * 1278 /// If the used [http.Client] completes with an error when making a REST
1279 * If the used [http.Client] completes with an error when making a REST call, 1279 /// call, this method will complete with the same error.
1280 * this method will complete with the same error.
1281 */
1282 async.Future emptyTrash() { 1280 async.Future emptyTrash() {
1283 var _url = null; 1281 var _url = null;
1284 var _queryParams = new core.Map(); 1282 var _queryParams = new core.Map();
1285 var _uploadMedia = null; 1283 var _uploadMedia = null;
1286 var _uploadOptions = null; 1284 var _uploadOptions = null;
1287 var _downloadOptions = commons.DownloadOptions.Metadata; 1285 var _downloadOptions = commons.DownloadOptions.Metadata;
1288 var _body = null; 1286 var _body = null;
1289 1287
1290
1291 _downloadOptions = null; 1288 _downloadOptions = null;
1292 1289
1293 _url = 'files/trash'; 1290 _url = 'files/trash';
1294 1291
1295 var _response = _requester.request(_url, 1292 var _response = _requester.request(_url, "DELETE",
1296 "DELETE", 1293 body: _body,
1297 body: _body, 1294 queryParams: _queryParams,
1298 queryParams: _queryParams, 1295 uploadOptions: _uploadOptions,
1299 uploadOptions: _uploadOptions, 1296 uploadMedia: _uploadMedia,
1300 uploadMedia: _uploadMedia, 1297 downloadOptions: _downloadOptions);
1301 downloadOptions: _downloadOptions);
1302 return _response.then((data) => null); 1298 return _response.then((data) => null);
1303 } 1299 }
1304 1300
1305 /** 1301 /// Exports a Google Doc to the requested MIME type and returns the exported
1306 * Exports a Google Doc to the requested MIME type and returns the exported 1302 /// content. Please note that the exported content is limited to 10MB.
1307 * content. Please note that the exported content is limited to 10MB. 1303 ///
1308 * 1304 /// Request parameters:
1309 * Request parameters: 1305 ///
1310 * 1306 /// [fileId] - The ID of the file.
1311 * [fileId] - The ID of the file. 1307 ///
1312 * 1308 /// [mimeType] - The MIME type of the format requested for this export.
1313 * [mimeType] - The MIME type of the format requested for this export. 1309 ///
1314 * 1310 /// [downloadOptions] - Options for downloading. A download can be either a
1315 * [downloadOptions] - Options for downloading. A download can be either a 1311 /// Metadata (default) or Media download. Partial Media downloads are
1316 * Metadata (default) or Media download. Partial Media downloads are possible 1312 /// possible as well.
1317 * as well. 1313 ///
1318 * 1314 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1319 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1315 /// an error.
1320 * error. 1316 ///
1321 * 1317 /// If the used [http.Client] completes with an error when making a REST
1322 * If the used [http.Client] completes with an error when making a REST call, 1318 /// call, this method will complete with the same error.
1323 * this method will complete with the same error. 1319 async.Future export(core.String fileId, core.String mimeType,
1324 */ 1320 {commons.DownloadOptions downloadOptions:
1325 async.Future export(core.String fileId, core.String mimeType, {commons.Downloa dOptions downloadOptions: commons.DownloadOptions.Metadata}) { 1321 commons.DownloadOptions.Metadata}) {
1326 var _url = null; 1322 var _url = null;
1327 var _queryParams = new core.Map(); 1323 var _queryParams = new core.Map();
1328 var _uploadMedia = null; 1324 var _uploadMedia = null;
1329 var _uploadOptions = null; 1325 var _uploadOptions = null;
1330 var _downloadOptions = commons.DownloadOptions.Metadata; 1326 var _downloadOptions = commons.DownloadOptions.Metadata;
1331 var _body = null; 1327 var _body = null;
1332 1328
1333 if (fileId == null) { 1329 if (fileId == null) {
1334 throw new core.ArgumentError("Parameter fileId is required."); 1330 throw new core.ArgumentError("Parameter fileId is required.");
1335 } 1331 }
1336 if (mimeType == null) { 1332 if (mimeType == null) {
1337 throw new core.ArgumentError("Parameter mimeType is required."); 1333 throw new core.ArgumentError("Parameter mimeType is required.");
1338 } 1334 }
1339 _queryParams["mimeType"] = [mimeType]; 1335 _queryParams["mimeType"] = [mimeType];
1340 1336
1341 _downloadOptions = downloadOptions; 1337 _downloadOptions = downloadOptions;
1342 1338
1343 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/export'; 1339 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/export';
1344 1340
1345 var _response = _requester.request(_url, 1341 var _response = _requester.request(_url, "GET",
1346 "GET", 1342 body: _body,
1347 body: _body, 1343 queryParams: _queryParams,
1348 queryParams: _queryParams, 1344 uploadOptions: _uploadOptions,
1349 uploadOptions: _uploadOptions, 1345 uploadMedia: _uploadMedia,
1350 uploadMedia: _uploadMedia, 1346 downloadOptions: _downloadOptions);
1351 downloadOptions: _downloadOptions);
1352 if (_downloadOptions == null || 1347 if (_downloadOptions == null ||
1353 _downloadOptions == commons.DownloadOptions.Metadata) { 1348 _downloadOptions == commons.DownloadOptions.Metadata) {
1354 return _response.then((data) => null); 1349 return _response.then((data) => null);
1355 } else { 1350 } else {
1356 return _response; 1351 return _response;
1357 } 1352 }
1358 } 1353 }
1359 1354
1360 /** 1355 /// Generates a set of file IDs which can be provided in insert requests.
1361 * Generates a set of file IDs which can be provided in insert requests. 1356 ///
1362 * 1357 /// Request parameters:
1363 * Request parameters: 1358 ///
1364 * 1359 /// [maxResults] - Maximum number of IDs to return.
1365 * [maxResults] - Maximum number of IDs to return. 1360 /// Value must be between "1" and "1000".
1366 * Value must be between "1" and "1000". 1361 ///
1367 * 1362 /// [space] - The space in which the IDs can be used to create new files.
1368 * [space] - The space in which the IDs can be used to create new files. 1363 /// Supported values are 'drive' and 'appDataFolder'.
1369 * Supported values are 'drive' and 'appDataFolder'. 1364 ///
1370 * 1365 /// Completes with a [GeneratedIds].
1371 * Completes with a [GeneratedIds]. 1366 ///
1372 * 1367 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1373 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1368 /// an error.
1374 * error. 1369 ///
1375 * 1370 /// If the used [http.Client] completes with an error when making a REST
1376 * If the used [http.Client] completes with an error when making a REST call, 1371 /// call, this method will complete with the same error.
1377 * this method will complete with the same error. 1372 async.Future<GeneratedIds> generateIds(
1378 */ 1373 {core.int maxResults, core.String space}) {
1379 async.Future<GeneratedIds> generateIds({core.int maxResults, core.String space }) {
1380 var _url = null; 1374 var _url = null;
1381 var _queryParams = new core.Map(); 1375 var _queryParams = new core.Map();
1382 var _uploadMedia = null; 1376 var _uploadMedia = null;
1383 var _uploadOptions = null; 1377 var _uploadOptions = null;
1384 var _downloadOptions = commons.DownloadOptions.Metadata; 1378 var _downloadOptions = commons.DownloadOptions.Metadata;
1385 var _body = null; 1379 var _body = null;
1386 1380
1387 if (maxResults != null) { 1381 if (maxResults != null) {
1388 _queryParams["maxResults"] = ["${maxResults}"]; 1382 _queryParams["maxResults"] = ["${maxResults}"];
1389 } 1383 }
1390 if (space != null) { 1384 if (space != null) {
1391 _queryParams["space"] = [space]; 1385 _queryParams["space"] = [space];
1392 } 1386 }
1393 1387
1394 _url = 'files/generateIds'; 1388 _url = 'files/generateIds';
1395 1389
1396 var _response = _requester.request(_url, 1390 var _response = _requester.request(_url, "GET",
1397 "GET", 1391 body: _body,
1398 body: _body, 1392 queryParams: _queryParams,
1399 queryParams: _queryParams, 1393 uploadOptions: _uploadOptions,
1400 uploadOptions: _uploadOptions, 1394 uploadMedia: _uploadMedia,
1401 uploadMedia: _uploadMedia, 1395 downloadOptions: _downloadOptions);
1402 downloadOptions: _downloadOptions);
1403 return _response.then((data) => new GeneratedIds.fromJson(data)); 1396 return _response.then((data) => new GeneratedIds.fromJson(data));
1404 } 1397 }
1405 1398
1406 /** 1399 /// Gets a file's metadata by ID.
1407 * Gets a file's metadata by ID. 1400 ///
1408 * 1401 /// Request parameters:
1409 * Request parameters: 1402 ///
1410 * 1403 /// [fileId] - The ID for the file in question.
1411 * [fileId] - The ID for the file in question. 1404 ///
1412 * 1405 /// [acknowledgeAbuse] - Whether the user is acknowledging the risk of
1413 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of 1406 /// downloading known malware or other abusive files.
1414 * downloading known malware or other abusive files. 1407 ///
1415 * 1408 /// [projection] - This parameter is deprecated and has no function.
1416 * [projection] - This parameter is deprecated and has no function. 1409 /// Possible string values are:
1417 * Possible string values are: 1410 /// - "BASIC" : Deprecated
1418 * - "BASIC" : Deprecated 1411 /// - "FULL" : Deprecated
1419 * - "FULL" : Deprecated 1412 ///
1420 * 1413 /// [revisionId] - Specifies the Revision ID that should be downloaded.
1421 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored 1414 /// Ignored unless alt=media is specified.
1422 * unless alt=media is specified. 1415 ///
1423 * 1416 /// [supportsTeamDrives] - Whether the requesting application supports Team
1424 * [supportsTeamDrives] - Whether the requesting application supports Team 1417 /// Drives.
1425 * Drives. 1418 ///
1426 * 1419 /// [updateViewedDate] - Deprecated: Use files.update with
1427 * [updateViewedDate] - Deprecated: Use files.update with 1420 /// modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
1428 * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request 1421 /// body.
1429 * body. 1422 ///
1430 * 1423 /// [downloadOptions] - Options for downloading. A download can be either a
1431 * [downloadOptions] - Options for downloading. A download can be either a 1424 /// Metadata (default) or Media download. Partial Media downloads are
1432 * Metadata (default) or Media download. Partial Media downloads are possible 1425 /// possible as well.
1433 * as well. 1426 ///
1434 * 1427 /// Completes with a
1435 * Completes with a 1428 ///
1436 * 1429 /// - [File] for Metadata downloads (see [downloadOptions]).
1437 * - [File] for Metadata downloads (see [downloadOptions]). 1430 ///
1438 * 1431 /// - [commons.Media] for Media downloads (see [downloadOptions]).
1439 * - [commons.Media] for Media downloads (see [downloadOptions]). 1432 ///
1440 * 1433 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1441 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1434 /// an error.
1442 * error. 1435 ///
1443 * 1436 /// If the used [http.Client] completes with an error when making a REST
1444 * If the used [http.Client] completes with an error when making a REST call, 1437 /// call, this method will complete with the same error.
1445 * this method will complete with the same error. 1438 async.Future get(core.String fileId,
1446 */ 1439 {core.bool acknowledgeAbuse,
1447 async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool supportsTeamDrives, core.bool upda teViewedDate, commons.DownloadOptions downloadOptions: commons.DownloadOptions.M etadata}) { 1440 core.String projection,
1441 core.String revisionId,
1442 core.bool supportsTeamDrives,
1443 core.bool updateViewedDate,
1444 commons.DownloadOptions downloadOptions:
1445 commons.DownloadOptions.Metadata}) {
1448 var _url = null; 1446 var _url = null;
1449 var _queryParams = new core.Map(); 1447 var _queryParams = new core.Map();
1450 var _uploadMedia = null; 1448 var _uploadMedia = null;
1451 var _uploadOptions = null; 1449 var _uploadOptions = null;
1452 var _downloadOptions = commons.DownloadOptions.Metadata; 1450 var _downloadOptions = commons.DownloadOptions.Metadata;
1453 var _body = null; 1451 var _body = null;
1454 1452
1455 if (fileId == null) { 1453 if (fileId == null) {
1456 throw new core.ArgumentError("Parameter fileId is required."); 1454 throw new core.ArgumentError("Parameter fileId is required.");
1457 } 1455 }
(...skipping 10 matching lines...) Expand all
1468 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 1466 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1469 } 1467 }
1470 if (updateViewedDate != null) { 1468 if (updateViewedDate != null) {
1471 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1469 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1472 } 1470 }
1473 1471
1474 _downloadOptions = downloadOptions; 1472 _downloadOptions = downloadOptions;
1475 1473
1476 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); 1474 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1477 1475
1478 var _response = _requester.request(_url, 1476 var _response = _requester.request(_url, "GET",
1479 "GET", 1477 body: _body,
1480 body: _body, 1478 queryParams: _queryParams,
1481 queryParams: _queryParams, 1479 uploadOptions: _uploadOptions,
1482 uploadOptions: _uploadOptions, 1480 uploadMedia: _uploadMedia,
1483 uploadMedia: _uploadMedia, 1481 downloadOptions: _downloadOptions);
1484 downloadOptions: _downloadOptions);
1485 if (_downloadOptions == null || 1482 if (_downloadOptions == null ||
1486 _downloadOptions == commons.DownloadOptions.Metadata) { 1483 _downloadOptions == commons.DownloadOptions.Metadata) {
1487 return _response.then((data) => new File.fromJson(data)); 1484 return _response.then((data) => new File.fromJson(data));
1488 } else { 1485 } else {
1489 return _response; 1486 return _response;
1490 } 1487 }
1491 } 1488 }
1492 1489
1493 /** 1490 /// Insert a new file.
1494 * Insert a new file. 1491 ///
1495 * 1492 /// [request] - The metadata request object.
1496 * [request] - The metadata request object. 1493 ///
1497 * 1494 /// Request parameters:
1498 * Request parameters: 1495 ///
1499 * 1496 /// [convert] - Whether to convert this file to the corresponding Google Docs
1500 * [convert] - Whether to convert this file to the corresponding Google Docs 1497 /// format.
1501 * format. 1498 ///
1502 * 1499 /// [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1503 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 1500 ///
1504 * 1501 /// [ocrLanguage] - If ocr is true, hints at the language to use. Valid
1505 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 1502 /// values are BCP 47 codes.
1506 * are BCP 47 codes. 1503 ///
1507 * 1504 /// [pinned] - Whether to pin the head revision of the uploaded file. A file
1508 * [pinned] - Whether to pin the head revision of the uploaded file. A file 1505 /// can have a maximum of 200 pinned revisions.
1509 * can have a maximum of 200 pinned revisions. 1506 ///
1510 * 1507 /// [supportsTeamDrives] - Whether the requesting application supports Team
1511 * [supportsTeamDrives] - Whether the requesting application supports Team 1508 /// Drives.
1512 * Drives. 1509 ///
1513 * 1510 /// [timedTextLanguage] - The language of the timed text.
1514 * [timedTextLanguage] - The language of the timed text. 1511 ///
1515 * 1512 /// [timedTextTrackName] - The timed text track name.
1516 * [timedTextTrackName] - The timed text track name. 1513 ///
1517 * 1514 /// [useContentAsIndexableText] - Whether to use the content as indexable
1518 * [useContentAsIndexableText] - Whether to use the content as indexable text. 1515 /// text.
1519 * 1516 ///
1520 * [visibility] - The visibility of the new file. This parameter is only 1517 /// [visibility] - The visibility of the new file. This parameter is only
1521 * relevant when convert=false. 1518 /// relevant when convert=false.
1522 * Possible string values are: 1519 /// Possible string values are:
1523 * - "DEFAULT" : The visibility of the new file is determined by the user's 1520 /// - "DEFAULT" : The visibility of the new file is determined by the user's
1524 * default visibility/sharing policies. 1521 /// default visibility/sharing policies.
1525 * - "PRIVATE" : The new file will be visible to only the owner. 1522 /// - "PRIVATE" : The new file will be visible to only the owner.
1526 * 1523 ///
1527 * [uploadMedia] - The media to upload. 1524 /// [uploadMedia] - The media to upload.
1528 * 1525 ///
1529 * [uploadOptions] - Options for the media upload. Streaming Media without the 1526 /// [uploadOptions] - Options for the media upload. Streaming Media without
1530 * length being known ahead of time is only supported via resumable uploads. 1527 /// the length being known ahead of time is only supported via resumable
1531 * 1528 /// uploads.
1532 * Completes with a [File]. 1529 ///
1533 * 1530 /// Completes with a [File].
1534 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1531 ///
1535 * error. 1532 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1536 * 1533 /// an error.
1537 * If the used [http.Client] completes with an error when making a REST call, 1534 ///
1538 * this method will complete with the same error. 1535 /// If the used [http.Client] completes with an error when making a REST
1539 */ 1536 /// call, this method will complete with the same error.
1540 async.Future<File> insert(File request, {core.bool convert, core.bool ocr, cor e.String ocrLanguage, core.bool pinned, core.bool supportsTeamDrives, core.Strin g timedTextLanguage, core.String timedTextTrackName, core.bool useContentAsIndex ableText, core.String visibility, commons.UploadOptions uploadOptions : commons. UploadOptions.Default, commons.Media uploadMedia}) { 1537 async.Future<File> insert(File request,
1538 {core.bool convert,
1539 core.bool ocr,
1540 core.String ocrLanguage,
1541 core.bool pinned,
1542 core.bool supportsTeamDrives,
1543 core.String timedTextLanguage,
1544 core.String timedTextTrackName,
1545 core.bool useContentAsIndexableText,
1546 core.String visibility,
1547 commons.UploadOptions uploadOptions: commons.UploadOptions.Default,
1548 commons.Media uploadMedia}) {
1541 var _url = null; 1549 var _url = null;
1542 var _queryParams = new core.Map(); 1550 var _queryParams = new core.Map();
1543 var _uploadMedia = null; 1551 var _uploadMedia = null;
1544 var _uploadOptions = null; 1552 var _uploadOptions = null;
1545 var _downloadOptions = commons.DownloadOptions.Metadata; 1553 var _downloadOptions = commons.DownloadOptions.Metadata;
1546 var _body = null; 1554 var _body = null;
1547 1555
1548 if (request != null) { 1556 if (request != null) {
1549 _body = convert_1.JSON.encode((request).toJson()); 1557 _body = convert_1.JSON.encode((request).toJson());
1550 } 1558 }
(...skipping 12 matching lines...) Expand all
1563 if (supportsTeamDrives != null) { 1571 if (supportsTeamDrives != null) {
1564 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 1572 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1565 } 1573 }
1566 if (timedTextLanguage != null) { 1574 if (timedTextLanguage != null) {
1567 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 1575 _queryParams["timedTextLanguage"] = [timedTextLanguage];
1568 } 1576 }
1569 if (timedTextTrackName != null) { 1577 if (timedTextTrackName != null) {
1570 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1578 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1571 } 1579 }
1572 if (useContentAsIndexableText != null) { 1580 if (useContentAsIndexableText != null) {
1573 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "]; 1581 _queryParams["useContentAsIndexableText"] = [
1582 "${useContentAsIndexableText}"
1583 ];
1574 } 1584 }
1575 if (visibility != null) { 1585 if (visibility != null) {
1576 _queryParams["visibility"] = [visibility]; 1586 _queryParams["visibility"] = [visibility];
1577 } 1587 }
1578 1588
1579 _uploadMedia = uploadMedia; 1589 _uploadMedia = uploadMedia;
1580 _uploadOptions = uploadOptions; 1590 _uploadOptions = uploadOptions;
1581 1591
1582 if (_uploadMedia == null) { 1592 if (_uploadMedia == null) {
1583 _url = 'files'; 1593 _url = 'files';
1584 } else if (_uploadOptions is commons.ResumableUploadOptions) { 1594 } else if (_uploadOptions is commons.ResumableUploadOptions) {
1585 _url = '/resumable/upload/drive/v2/files'; 1595 _url = '/resumable/upload/drive/v2/files';
1586 } else { 1596 } else {
1587 _url = '/upload/drive/v2/files'; 1597 _url = '/upload/drive/v2/files';
1588 } 1598 }
1589 1599
1590 1600 var _response = _requester.request(_url, "POST",
1591 var _response = _requester.request(_url, 1601 body: _body,
1592 "POST", 1602 queryParams: _queryParams,
1593 body: _body, 1603 uploadOptions: _uploadOptions,
1594 queryParams: _queryParams, 1604 uploadMedia: _uploadMedia,
1595 uploadOptions: _uploadOptions, 1605 downloadOptions: _downloadOptions);
1596 uploadMedia: _uploadMedia,
1597 downloadOptions: _downloadOptions);
1598 return _response.then((data) => new File.fromJson(data)); 1606 return _response.then((data) => new File.fromJson(data));
1599 } 1607 }
1600 1608
1601 /** 1609 /// Lists the user's files.
1602 * Lists the user's files. 1610 ///
1603 * 1611 /// Request parameters:
1604 * Request parameters: 1612 ///
1605 * 1613 /// [corpora] - Comma-separated list of bodies of items (files/documents) to
1606 * [corpora] - Comma-separated list of bodies of items (files/documents) to 1614 /// which the query applies. Supported bodies are 'default', 'domain',
1607 * which the query applies. Supported bodies are 'default', 'domain', 1615 /// 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with
1608 * 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with 1616 /// 'default'; all other values must be used in isolation. Prefer 'default'
1609 * 'default'; all other values must be used in isolation. Prefer 'default' or 1617 /// or 'teamDrive' to 'allTeamDrives' for efficiency.
1610 * 'teamDrive' to 'allTeamDrives' for efficiency. 1618 ///
1611 * 1619 /// [corpus] - The body of items (files/documents) to which the query
1612 * [corpus] - The body of items (files/documents) to which the query applies. 1620 /// applies. Deprecated: use 'corpora' instead.
1613 * Deprecated: use 'corpora' instead. 1621 /// Possible string values are:
1614 * Possible string values are: 1622 /// - "DEFAULT" : The items that the user has accessed.
1615 * - "DEFAULT" : The items that the user has accessed. 1623 /// - "DOMAIN" : Items shared to the user's domain.
1616 * - "DOMAIN" : Items shared to the user's domain. 1624 ///
1617 * 1625 /// [includeTeamDriveItems] - Whether Team Drive items should be included in
1618 * [includeTeamDriveItems] - Whether Team Drive items should be included in 1626 /// results.
1619 * results. 1627 ///
1620 * 1628 /// [maxResults] - The maximum number of files to return per page. Partial or
1621 * [maxResults] - The maximum number of files to return per page. Partial or 1629 /// empty result pages are possible even before the end of the files list has
1622 * empty result pages are possible even before the end of the files list has 1630 /// been reached.
1623 * been reached. 1631 ///
1624 * 1632 /// [orderBy] - A comma-separated list of sort keys. Valid keys are
1625 * [orderBy] - A comma-separated list of sort keys. Valid keys are 1633 /// 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate',
1626 * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 1634 /// 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate',
1627 * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 1635 /// 'starred', 'title', and 'title_natural'. Each key sorts ascending by
1628 * and 'title'. Each key sorts ascending by default, but may be reversed with 1636 /// default, but may be reversed with the 'desc' modifier. Example usage:
1629 * the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate 1637 /// ?orderBy=folder,modifiedDate desc,title. Please note that there is a
1630 * desc,title. Please note that there is a current limitation for users with 1638 /// current limitation for users with approximately one million files in
1631 * approximately one million files in which the requested sort order is 1639 /// which the requested sort order is ignored.
1632 * ignored. 1640 ///
1633 * 1641 /// [pageToken] - Page token for files.
1634 * [pageToken] - Page token for files. 1642 ///
1635 * 1643 /// [projection] - This parameter is deprecated and has no function.
1636 * [projection] - This parameter is deprecated and has no function. 1644 /// Possible string values are:
1637 * Possible string values are: 1645 /// - "BASIC" : Deprecated
1638 * - "BASIC" : Deprecated 1646 /// - "FULL" : Deprecated
1639 * - "FULL" : Deprecated 1647 ///
1640 * 1648 /// [q] - Query string for searching files.
1641 * [q] - Query string for searching files. 1649 ///
1642 * 1650 /// [spaces] - A comma-separated list of spaces to query. Supported values
1643 * [spaces] - A comma-separated list of spaces to query. Supported values are 1651 /// are 'drive', 'appDataFolder' and 'photos'.
1644 * 'drive', 'appDataFolder' and 'photos'. 1652 ///
1645 * 1653 /// [supportsTeamDrives] - Whether the requesting application supports Team
1646 * [supportsTeamDrives] - Whether the requesting application supports Team 1654 /// Drives.
1647 * Drives. 1655 ///
1648 * 1656 /// [teamDriveId] - ID of Team Drive to search.
1649 * [teamDriveId] - ID of Team Drive to search. 1657 ///
1650 * 1658 /// Completes with a [FileList].
1651 * Completes with a [FileList]. 1659 ///
1652 * 1660 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1653 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1661 /// an error.
1654 * error. 1662 ///
1655 * 1663 /// If the used [http.Client] completes with an error when making a REST
1656 * If the used [http.Client] completes with an error when making a REST call, 1664 /// call, this method will complete with the same error.
1657 * this method will complete with the same error. 1665 async.Future<FileList> list(
1658 */ 1666 {core.String corpora,
1659 async.Future<FileList> list({core.String corpora, core.String corpus, core.boo l includeTeamDriveItems, core.int maxResults, core.String orderBy, core.String p ageToken, core.String projection, core.String q, core.String spaces, core.bool s upportsTeamDrives, core.String teamDriveId}) { 1667 core.String corpus,
1668 core.bool includeTeamDriveItems,
1669 core.int maxResults,
1670 core.String orderBy,
1671 core.String pageToken,
1672 core.String projection,
1673 core.String q,
1674 core.String spaces,
1675 core.bool supportsTeamDrives,
1676 core.String teamDriveId}) {
1660 var _url = null; 1677 var _url = null;
1661 var _queryParams = new core.Map(); 1678 var _queryParams = new core.Map();
1662 var _uploadMedia = null; 1679 var _uploadMedia = null;
1663 var _uploadOptions = null; 1680 var _uploadOptions = null;
1664 var _downloadOptions = commons.DownloadOptions.Metadata; 1681 var _downloadOptions = commons.DownloadOptions.Metadata;
1665 var _body = null; 1682 var _body = null;
1666 1683
1667 if (corpora != null) { 1684 if (corpora != null) {
1668 _queryParams["corpora"] = [corpora]; 1685 _queryParams["corpora"] = [corpora];
1669 } 1686 }
(...skipping 23 matching lines...) Expand all
1693 } 1710 }
1694 if (supportsTeamDrives != null) { 1711 if (supportsTeamDrives != null) {
1695 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 1712 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1696 } 1713 }
1697 if (teamDriveId != null) { 1714 if (teamDriveId != null) {
1698 _queryParams["teamDriveId"] = [teamDriveId]; 1715 _queryParams["teamDriveId"] = [teamDriveId];
1699 } 1716 }
1700 1717
1701 _url = 'files'; 1718 _url = 'files';
1702 1719
1703 var _response = _requester.request(_url, 1720 var _response = _requester.request(_url, "GET",
1704 "GET", 1721 body: _body,
1705 body: _body, 1722 queryParams: _queryParams,
1706 queryParams: _queryParams, 1723 uploadOptions: _uploadOptions,
1707 uploadOptions: _uploadOptions, 1724 uploadMedia: _uploadMedia,
1708 uploadMedia: _uploadMedia, 1725 downloadOptions: _downloadOptions);
1709 downloadOptions: _downloadOptions);
1710 return _response.then((data) => new FileList.fromJson(data)); 1726 return _response.then((data) => new FileList.fromJson(data));
1711 } 1727 }
1712 1728
1713 /** 1729 /// Updates file metadata and/or content. This method supports patch
1714 * Updates file metadata and/or content. This method supports patch semantics. 1730 /// semantics.
1715 * 1731 ///
1716 * [request] - The metadata request object. 1732 /// [request] - The metadata request object.
1717 * 1733 ///
1718 * Request parameters: 1734 /// Request parameters:
1719 * 1735 ///
1720 * [fileId] - The ID of the file to update. 1736 /// [fileId] - The ID of the file to update.
1721 * 1737 ///
1722 * [addParents] - Comma-separated list of parent IDs to add. 1738 /// [addParents] - Comma-separated list of parent IDs to add.
1723 * 1739 ///
1724 * [convert] - This parameter is deprecated and has no function. 1740 /// [convert] - This parameter is deprecated and has no function.
1725 * 1741 ///
1726 * [modifiedDateBehavior] - Determines the behavior in which modifiedDate is 1742 /// [modifiedDateBehavior] - Determines the behavior in which modifiedDate is
1727 * updated. This overrides setModifiedDate. 1743 /// updated. This overrides setModifiedDate.
1728 * Possible string values are: 1744 /// Possible string values are:
1729 * - "fromBody" : Set modifiedDate to the value provided in the body of the 1745 /// - "fromBody" : Set modifiedDate to the value provided in the body of the
1730 * request. No change if no value was provided. 1746 /// request. No change if no value was provided.
1731 * - "fromBodyIfNeeded" : Set modifiedDate to the value provided in the body 1747 /// - "fromBodyIfNeeded" : Set modifiedDate to the value provided in the body
1732 * of the request depending on other contents of the update. 1748 /// of the request depending on other contents of the update.
1733 * - "fromBodyOrNow" : Set modifiedDate to the value provided in the body of 1749 /// - "fromBodyOrNow" : Set modifiedDate to the value provided in the body of
1734 * the request, or to the current time if no value was provided. 1750 /// the request, or to the current time if no value was provided.
1735 * - "noChange" : Maintain the previous value of modifiedDate. 1751 /// - "noChange" : Maintain the previous value of modifiedDate.
1736 * - "now" : Set modifiedDate to the current time. 1752 /// - "now" : Set modifiedDate to the current time.
1737 * - "nowIfNeeded" : Set modifiedDate to the current time depending on 1753 /// - "nowIfNeeded" : Set modifiedDate to the current time depending on
1738 * contents of the update. 1754 /// contents of the update.
1739 * 1755 ///
1740 * [newRevision] - Whether a blob upload should create a new revision. If 1756 /// [newRevision] - Whether a blob upload should create a new revision. If
1741 * false, the blob data in the current head revision is replaced. If true or 1757 /// false, the blob data in the current head revision is replaced. If true or
1742 * not set, a new blob is created as head revision, and previous unpinned 1758 /// not set, a new blob is created as head revision, and previous unpinned
1743 * revisions are preserved for a short period of time. Pinned revisions are 1759 /// revisions are preserved for a short period of time. Pinned revisions are
1744 * stored indefinitely, using additional storage quota, up to a maximum of 200 1760 /// stored indefinitely, using additional storage quota, up to a maximum of
1745 * revisions. For details on how revisions are retained, see the Drive Help 1761 /// 200 revisions. For details on how revisions are retained, see the Drive
1746 * Center. 1762 /// Help Center.
1747 * 1763 ///
1748 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 1764 /// [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1749 * 1765 ///
1750 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 1766 /// [ocrLanguage] - If ocr is true, hints at the language to use. Valid
1751 * are BCP 47 codes. 1767 /// values are BCP 47 codes.
1752 * 1768 ///
1753 * [pinned] - Whether to pin the new revision. A file can have a maximum of 1769 /// [pinned] - Whether to pin the new revision. A file can have a maximum of
1754 * 200 pinned revisions. 1770 /// 200 pinned revisions.
1755 * 1771 ///
1756 * [removeParents] - Comma-separated list of parent IDs to remove. 1772 /// [removeParents] - Comma-separated list of parent IDs to remove.
1757 * 1773 ///
1758 * [setModifiedDate] - Whether to set the modified date with the supplied 1774 /// [setModifiedDate] - Whether to set the modified date with the supplied
1759 * modified date. 1775 /// modified date.
1760 * 1776 ///
1761 * [supportsTeamDrives] - Whether the requesting application supports Team 1777 /// [supportsTeamDrives] - Whether the requesting application supports Team
1762 * Drives. 1778 /// Drives.
1763 * 1779 ///
1764 * [timedTextLanguage] - The language of the timed text. 1780 /// [timedTextLanguage] - The language of the timed text.
1765 * 1781 ///
1766 * [timedTextTrackName] - The timed text track name. 1782 /// [timedTextTrackName] - The timed text track name.
1767 * 1783 ///
1768 * [updateViewedDate] - Whether to update the view date after successfully 1784 /// [updateViewedDate] - Whether to update the view date after successfully
1769 * updating the file. 1785 /// updating the file.
1770 * 1786 ///
1771 * [useContentAsIndexableText] - Whether to use the content as indexable text. 1787 /// [useContentAsIndexableText] - Whether to use the content as indexable
1772 * 1788 /// text.
1773 * Completes with a [File]. 1789 ///
1774 * 1790 /// Completes with a [File].
1775 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1791 ///
1776 * error. 1792 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1777 * 1793 /// an error.
1778 * If the used [http.Client] completes with an error when making a REST call, 1794 ///
1779 * this method will complete with the same error. 1795 /// If the used [http.Client] completes with an error when making a REST
1780 */ 1796 /// call, this method will complete with the same error.
1781 async.Future<File> patch(File request, core.String fileId, {core.String addPar ents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevision , core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removePa rents, core.bool setModifiedDate, core.bool supportsTeamDrives, core.String time dTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core. bool useContentAsIndexableText}) { 1797 async.Future<File> patch(File request, core.String fileId,
1798 {core.String addParents,
1799 core.bool convert,
1800 core.String modifiedDateBehavior,
1801 core.bool newRevision,
1802 core.bool ocr,
1803 core.String ocrLanguage,
1804 core.bool pinned,
1805 core.String removeParents,
1806 core.bool setModifiedDate,
1807 core.bool supportsTeamDrives,
1808 core.String timedTextLanguage,
1809 core.String timedTextTrackName,
1810 core.bool updateViewedDate,
1811 core.bool useContentAsIndexableText}) {
1782 var _url = null; 1812 var _url = null;
1783 var _queryParams = new core.Map(); 1813 var _queryParams = new core.Map();
1784 var _uploadMedia = null; 1814 var _uploadMedia = null;
1785 var _uploadOptions = null; 1815 var _uploadOptions = null;
1786 var _downloadOptions = commons.DownloadOptions.Metadata; 1816 var _downloadOptions = commons.DownloadOptions.Metadata;
1787 var _body = null; 1817 var _body = null;
1788 1818
1789 if (request != null) { 1819 if (request != null) {
1790 _body = convert_1.JSON.encode((request).toJson()); 1820 _body = convert_1.JSON.encode((request).toJson());
1791 } 1821 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 if (timedTextLanguage != null) { 1855 if (timedTextLanguage != null) {
1826 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 1856 _queryParams["timedTextLanguage"] = [timedTextLanguage];
1827 } 1857 }
1828 if (timedTextTrackName != null) { 1858 if (timedTextTrackName != null) {
1829 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1859 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1830 } 1860 }
1831 if (updateViewedDate != null) { 1861 if (updateViewedDate != null) {
1832 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1862 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1833 } 1863 }
1834 if (useContentAsIndexableText != null) { 1864 if (useContentAsIndexableText != null) {
1835 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "]; 1865 _queryParams["useContentAsIndexableText"] = [
1866 "${useContentAsIndexableText}"
1867 ];
1836 } 1868 }
1837 1869
1838 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); 1870 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1839 1871
1840 var _response = _requester.request(_url, 1872 var _response = _requester.request(_url, "PATCH",
1841 "PATCH", 1873 body: _body,
1842 body: _body, 1874 queryParams: _queryParams,
1843 queryParams: _queryParams, 1875 uploadOptions: _uploadOptions,
1844 uploadOptions: _uploadOptions, 1876 uploadMedia: _uploadMedia,
1845 uploadMedia: _uploadMedia, 1877 downloadOptions: _downloadOptions);
1846 downloadOptions: _downloadOptions);
1847 return _response.then((data) => new File.fromJson(data)); 1878 return _response.then((data) => new File.fromJson(data));
1848 } 1879 }
1849 1880
1850 /** 1881 /// Set the file's updated time to the current server time.
1851 * Set the file's updated time to the current server time. 1882 ///
1852 * 1883 /// Request parameters:
1853 * Request parameters: 1884 ///
1854 * 1885 /// [fileId] - The ID of the file to update.
1855 * [fileId] - The ID of the file to update. 1886 ///
1856 * 1887 /// [supportsTeamDrives] - Whether the requesting application supports Team
1857 * [supportsTeamDrives] - Whether the requesting application supports Team 1888 /// Drives.
1858 * Drives. 1889 ///
1859 * 1890 /// Completes with a [File].
1860 * Completes with a [File]. 1891 ///
1861 * 1892 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1862 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1893 /// an error.
1863 * error. 1894 ///
1864 * 1895 /// If the used [http.Client] completes with an error when making a REST
1865 * If the used [http.Client] completes with an error when making a REST call, 1896 /// call, this method will complete with the same error.
1866 * this method will complete with the same error.
1867 */
1868 async.Future<File> touch(core.String fileId, {core.bool supportsTeamDrives}) { 1897 async.Future<File> touch(core.String fileId, {core.bool supportsTeamDrives}) {
1869 var _url = null; 1898 var _url = null;
1870 var _queryParams = new core.Map(); 1899 var _queryParams = new core.Map();
1871 var _uploadMedia = null; 1900 var _uploadMedia = null;
1872 var _uploadOptions = null; 1901 var _uploadOptions = null;
1873 var _downloadOptions = commons.DownloadOptions.Metadata; 1902 var _downloadOptions = commons.DownloadOptions.Metadata;
1874 var _body = null; 1903 var _body = null;
1875 1904
1876 if (fileId == null) { 1905 if (fileId == null) {
1877 throw new core.ArgumentError("Parameter fileId is required."); 1906 throw new core.ArgumentError("Parameter fileId is required.");
1878 } 1907 }
1879 if (supportsTeamDrives != null) { 1908 if (supportsTeamDrives != null) {
1880 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 1909 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1881 } 1910 }
1882 1911
1883 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/touch'; 1912 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/touch';
1884 1913
1885 var _response = _requester.request(_url, 1914 var _response = _requester.request(_url, "POST",
1886 "POST", 1915 body: _body,
1887 body: _body, 1916 queryParams: _queryParams,
1888 queryParams: _queryParams, 1917 uploadOptions: _uploadOptions,
1889 uploadOptions: _uploadOptions, 1918 uploadMedia: _uploadMedia,
1890 uploadMedia: _uploadMedia, 1919 downloadOptions: _downloadOptions);
1891 downloadOptions: _downloadOptions);
1892 return _response.then((data) => new File.fromJson(data)); 1920 return _response.then((data) => new File.fromJson(data));
1893 } 1921 }
1894 1922
1895 /** 1923 /// Moves a file to the trash. The currently authenticated user must own the
1896 * Moves a file to the trash. The currently authenticated user must own the 1924 /// file or be an organizer on the parent for Team Drive files.
1897 * file or be an organizer on the parent for Team Drive files. 1925 ///
1898 * 1926 /// Request parameters:
1899 * Request parameters: 1927 ///
1900 * 1928 /// [fileId] - The ID of the file to trash.
1901 * [fileId] - The ID of the file to trash. 1929 ///
1902 * 1930 /// [supportsTeamDrives] - Whether the requesting application supports Team
1903 * [supportsTeamDrives] - Whether the requesting application supports Team 1931 /// Drives.
1904 * Drives. 1932 ///
1905 * 1933 /// Completes with a [File].
1906 * Completes with a [File]. 1934 ///
1907 * 1935 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1908 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1936 /// an error.
1909 * error. 1937 ///
1910 * 1938 /// If the used [http.Client] completes with an error when making a REST
1911 * If the used [http.Client] completes with an error when making a REST call, 1939 /// call, this method will complete with the same error.
1912 * this method will complete with the same error.
1913 */
1914 async.Future<File> trash(core.String fileId, {core.bool supportsTeamDrives}) { 1940 async.Future<File> trash(core.String fileId, {core.bool supportsTeamDrives}) {
1915 var _url = null; 1941 var _url = null;
1916 var _queryParams = new core.Map(); 1942 var _queryParams = new core.Map();
1917 var _uploadMedia = null; 1943 var _uploadMedia = null;
1918 var _uploadOptions = null; 1944 var _uploadOptions = null;
1919 var _downloadOptions = commons.DownloadOptions.Metadata; 1945 var _downloadOptions = commons.DownloadOptions.Metadata;
1920 var _body = null; 1946 var _body = null;
1921 1947
1922 if (fileId == null) { 1948 if (fileId == null) {
1923 throw new core.ArgumentError("Parameter fileId is required."); 1949 throw new core.ArgumentError("Parameter fileId is required.");
1924 } 1950 }
1925 if (supportsTeamDrives != null) { 1951 if (supportsTeamDrives != null) {
1926 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 1952 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1927 } 1953 }
1928 1954
1929 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/trash'; 1955 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/trash';
1930 1956
1931 var _response = _requester.request(_url, 1957 var _response = _requester.request(_url, "POST",
1932 "POST", 1958 body: _body,
1933 body: _body, 1959 queryParams: _queryParams,
1934 queryParams: _queryParams, 1960 uploadOptions: _uploadOptions,
1935 uploadOptions: _uploadOptions, 1961 uploadMedia: _uploadMedia,
1936 uploadMedia: _uploadMedia, 1962 downloadOptions: _downloadOptions);
1937 downloadOptions: _downloadOptions);
1938 return _response.then((data) => new File.fromJson(data)); 1963 return _response.then((data) => new File.fromJson(data));
1939 } 1964 }
1940 1965
1941 /** 1966 /// Restores a file from the trash.
1942 * Restores a file from the trash. 1967 ///
1943 * 1968 /// Request parameters:
1944 * Request parameters: 1969 ///
1945 * 1970 /// [fileId] - The ID of the file to untrash.
1946 * [fileId] - The ID of the file to untrash. 1971 ///
1947 * 1972 /// [supportsTeamDrives] - Whether the requesting application supports Team
1948 * [supportsTeamDrives] - Whether the requesting application supports Team 1973 /// Drives.
1949 * Drives. 1974 ///
1950 * 1975 /// Completes with a [File].
1951 * Completes with a [File]. 1976 ///
1952 * 1977 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1953 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1978 /// an error.
1954 * error. 1979 ///
1955 * 1980 /// If the used [http.Client] completes with an error when making a REST
1956 * If the used [http.Client] completes with an error when making a REST call, 1981 /// call, this method will complete with the same error.
1957 * this method will complete with the same error. 1982 async.Future<File> untrash(core.String fileId,
1958 */ 1983 {core.bool supportsTeamDrives}) {
1959 async.Future<File> untrash(core.String fileId, {core.bool supportsTeamDrives}) {
1960 var _url = null; 1984 var _url = null;
1961 var _queryParams = new core.Map(); 1985 var _queryParams = new core.Map();
1962 var _uploadMedia = null; 1986 var _uploadMedia = null;
1963 var _uploadOptions = null; 1987 var _uploadOptions = null;
1964 var _downloadOptions = commons.DownloadOptions.Metadata; 1988 var _downloadOptions = commons.DownloadOptions.Metadata;
1965 var _body = null; 1989 var _body = null;
1966 1990
1967 if (fileId == null) { 1991 if (fileId == null) {
1968 throw new core.ArgumentError("Parameter fileId is required."); 1992 throw new core.ArgumentError("Parameter fileId is required.");
1969 } 1993 }
1970 if (supportsTeamDrives != null) { 1994 if (supportsTeamDrives != null) {
1971 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 1995 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1972 } 1996 }
1973 1997
1974 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/untrash'; 1998 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/untrash';
1975 1999
1976 var _response = _requester.request(_url, 2000 var _response = _requester.request(_url, "POST",
1977 "POST", 2001 body: _body,
1978 body: _body, 2002 queryParams: _queryParams,
1979 queryParams: _queryParams, 2003 uploadOptions: _uploadOptions,
1980 uploadOptions: _uploadOptions, 2004 uploadMedia: _uploadMedia,
1981 uploadMedia: _uploadMedia, 2005 downloadOptions: _downloadOptions);
1982 downloadOptions: _downloadOptions);
1983 return _response.then((data) => new File.fromJson(data)); 2006 return _response.then((data) => new File.fromJson(data));
1984 } 2007 }
1985 2008
1986 /** 2009 /// Updates file metadata and/or content.
1987 * Updates file metadata and/or content. 2010 ///
1988 * 2011 /// [request] - The metadata request object.
1989 * [request] - The metadata request object. 2012 ///
1990 * 2013 /// Request parameters:
1991 * Request parameters: 2014 ///
1992 * 2015 /// [fileId] - The ID of the file to update.
1993 * [fileId] - The ID of the file to update. 2016 ///
1994 * 2017 /// [addParents] - Comma-separated list of parent IDs to add.
1995 * [addParents] - Comma-separated list of parent IDs to add. 2018 ///
1996 * 2019 /// [convert] - This parameter is deprecated and has no function.
1997 * [convert] - This parameter is deprecated and has no function. 2020 ///
1998 * 2021 /// [modifiedDateBehavior] - Determines the behavior in which modifiedDate is
1999 * [modifiedDateBehavior] - Determines the behavior in which modifiedDate is 2022 /// updated. This overrides setModifiedDate.
2000 * updated. This overrides setModifiedDate. 2023 /// Possible string values are:
2001 * Possible string values are: 2024 /// - "fromBody" : Set modifiedDate to the value provided in the body of the
2002 * - "fromBody" : Set modifiedDate to the value provided in the body of the 2025 /// request. No change if no value was provided.
2003 * request. No change if no value was provided. 2026 /// - "fromBodyIfNeeded" : Set modifiedDate to the value provided in the body
2004 * - "fromBodyIfNeeded" : Set modifiedDate to the value provided in the body 2027 /// of the request depending on other contents of the update.
2005 * of the request depending on other contents of the update. 2028 /// - "fromBodyOrNow" : Set modifiedDate to the value provided in the body of
2006 * - "fromBodyOrNow" : Set modifiedDate to the value provided in the body of 2029 /// the request, or to the current time if no value was provided.
2007 * the request, or to the current time if no value was provided. 2030 /// - "noChange" : Maintain the previous value of modifiedDate.
2008 * - "noChange" : Maintain the previous value of modifiedDate. 2031 /// - "now" : Set modifiedDate to the current time.
2009 * - "now" : Set modifiedDate to the current time. 2032 /// - "nowIfNeeded" : Set modifiedDate to the current time depending on
2010 * - "nowIfNeeded" : Set modifiedDate to the current time depending on 2033 /// contents of the update.
2011 * contents of the update. 2034 ///
2012 * 2035 /// [newRevision] - Whether a blob upload should create a new revision. If
2013 * [newRevision] - Whether a blob upload should create a new revision. If 2036 /// false, the blob data in the current head revision is replaced. If true or
2014 * false, the blob data in the current head revision is replaced. If true or 2037 /// not set, a new blob is created as head revision, and previous unpinned
2015 * not set, a new blob is created as head revision, and previous unpinned 2038 /// revisions are preserved for a short period of time. Pinned revisions are
2016 * revisions are preserved for a short period of time. Pinned revisions are 2039 /// stored indefinitely, using additional storage quota, up to a maximum of
2017 * stored indefinitely, using additional storage quota, up to a maximum of 200 2040 /// 200 revisions. For details on how revisions are retained, see the Drive
2018 * revisions. For details on how revisions are retained, see the Drive Help 2041 /// Help Center.
2019 * Center. 2042 ///
2020 * 2043 /// [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
2021 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 2044 ///
2022 * 2045 /// [ocrLanguage] - If ocr is true, hints at the language to use. Valid
2023 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 2046 /// values are BCP 47 codes.
2024 * are BCP 47 codes. 2047 ///
2025 * 2048 /// [pinned] - Whether to pin the new revision. A file can have a maximum of
2026 * [pinned] - Whether to pin the new revision. A file can have a maximum of 2049 /// 200 pinned revisions.
2027 * 200 pinned revisions. 2050 ///
2028 * 2051 /// [removeParents] - Comma-separated list of parent IDs to remove.
2029 * [removeParents] - Comma-separated list of parent IDs to remove. 2052 ///
2030 * 2053 /// [setModifiedDate] - Whether to set the modified date with the supplied
2031 * [setModifiedDate] - Whether to set the modified date with the supplied 2054 /// modified date.
2032 * modified date. 2055 ///
2033 * 2056 /// [supportsTeamDrives] - Whether the requesting application supports Team
2034 * [supportsTeamDrives] - Whether the requesting application supports Team 2057 /// Drives.
2035 * Drives. 2058 ///
2036 * 2059 /// [timedTextLanguage] - The language of the timed text.
2037 * [timedTextLanguage] - The language of the timed text. 2060 ///
2038 * 2061 /// [timedTextTrackName] - The timed text track name.
2039 * [timedTextTrackName] - The timed text track name. 2062 ///
2040 * 2063 /// [updateViewedDate] - Whether to update the view date after successfully
2041 * [updateViewedDate] - Whether to update the view date after successfully 2064 /// updating the file.
2042 * updating the file. 2065 ///
2043 * 2066 /// [useContentAsIndexableText] - Whether to use the content as indexable
2044 * [useContentAsIndexableText] - Whether to use the content as indexable text. 2067 /// text.
2045 * 2068 ///
2046 * [uploadMedia] - The media to upload. 2069 /// [uploadMedia] - The media to upload.
2047 * 2070 ///
2048 * [uploadOptions] - Options for the media upload. Streaming Media without the 2071 /// [uploadOptions] - Options for the media upload. Streaming Media without
2049 * length being known ahead of time is only supported via resumable uploads. 2072 /// the length being known ahead of time is only supported via resumable
2050 * 2073 /// uploads.
2051 * Completes with a [File]. 2074 ///
2052 * 2075 /// Completes with a [File].
2053 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2076 ///
2054 * error. 2077 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2055 * 2078 /// an error.
2056 * If the used [http.Client] completes with an error when making a REST call, 2079 ///
2057 * this method will complete with the same error. 2080 /// If the used [http.Client] completes with an error when making a REST
2058 */ 2081 /// call, this method will complete with the same error.
2059 async.Future<File> update(File request, core.String fileId, {core.String addPa rents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevisio n, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removeP arents, core.bool setModifiedDate, core.bool supportsTeamDrives, core.String tim edTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core .bool useContentAsIndexableText, commons.UploadOptions uploadOptions : commons.U ploadOptions.Default, commons.Media uploadMedia}) { 2082 async.Future<File> update(File request, core.String fileId,
2083 {core.String addParents,
2084 core.bool convert,
2085 core.String modifiedDateBehavior,
2086 core.bool newRevision,
2087 core.bool ocr,
2088 core.String ocrLanguage,
2089 core.bool pinned,
2090 core.String removeParents,
2091 core.bool setModifiedDate,
2092 core.bool supportsTeamDrives,
2093 core.String timedTextLanguage,
2094 core.String timedTextTrackName,
2095 core.bool updateViewedDate,
2096 core.bool useContentAsIndexableText,
2097 commons.UploadOptions uploadOptions: commons.UploadOptions.Default,
2098 commons.Media uploadMedia}) {
2060 var _url = null; 2099 var _url = null;
2061 var _queryParams = new core.Map(); 2100 var _queryParams = new core.Map();
2062 var _uploadMedia = null; 2101 var _uploadMedia = null;
2063 var _uploadOptions = null; 2102 var _uploadOptions = null;
2064 var _downloadOptions = commons.DownloadOptions.Metadata; 2103 var _downloadOptions = commons.DownloadOptions.Metadata;
2065 var _body = null; 2104 var _body = null;
2066 2105
2067 if (request != null) { 2106 if (request != null) {
2068 _body = convert_1.JSON.encode((request).toJson()); 2107 _body = convert_1.JSON.encode((request).toJson());
2069 } 2108 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 if (timedTextLanguage != null) { 2142 if (timedTextLanguage != null) {
2104 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 2143 _queryParams["timedTextLanguage"] = [timedTextLanguage];
2105 } 2144 }
2106 if (timedTextTrackName != null) { 2145 if (timedTextTrackName != null) {
2107 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 2146 _queryParams["timedTextTrackName"] = [timedTextTrackName];
2108 } 2147 }
2109 if (updateViewedDate != null) { 2148 if (updateViewedDate != null) {
2110 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 2149 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
2111 } 2150 }
2112 if (useContentAsIndexableText != null) { 2151 if (useContentAsIndexableText != null) {
2113 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "]; 2152 _queryParams["useContentAsIndexableText"] = [
2153 "${useContentAsIndexableText}"
2154 ];
2114 } 2155 }
2115 2156
2116 _uploadMedia = uploadMedia; 2157 _uploadMedia = uploadMedia;
2117 _uploadOptions = uploadOptions; 2158 _uploadOptions = uploadOptions;
2118 2159
2119 if (_uploadMedia == null) { 2160 if (_uploadMedia == null) {
2120 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); 2161 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
2121 } else if (_uploadOptions is commons.ResumableUploadOptions) { 2162 } else if (_uploadOptions is commons.ResumableUploadOptions) {
2122 _url = '/resumable/upload/drive/v2/files/' + commons.Escaper.ecapeVariable ('$fileId'); 2163 _url = '/resumable/upload/drive/v2/files/' +
2164 commons.Escaper.ecapeVariable('$fileId');
2123 } else { 2165 } else {
2124 _url = '/upload/drive/v2/files/' + commons.Escaper.ecapeVariable('$fileId' ); 2166 _url =
2167 '/upload/drive/v2/files/' + commons.Escaper.ecapeVariable('$fileId');
2125 } 2168 }
2126 2169
2127 2170 var _response = _requester.request(_url, "PUT",
2128 var _response = _requester.request(_url, 2171 body: _body,
2129 "PUT", 2172 queryParams: _queryParams,
2130 body: _body, 2173 uploadOptions: _uploadOptions,
2131 queryParams: _queryParams, 2174 uploadMedia: _uploadMedia,
2132 uploadOptions: _uploadOptions, 2175 downloadOptions: _downloadOptions);
2133 uploadMedia: _uploadMedia,
2134 downloadOptions: _downloadOptions);
2135 return _response.then((data) => new File.fromJson(data)); 2176 return _response.then((data) => new File.fromJson(data));
2136 } 2177 }
2137 2178
2138 /** 2179 /// Subscribe to changes on a file
2139 * Subscribe to changes on a file 2180 ///
2140 * 2181 /// [request] - The metadata request object.
2141 * [request] - The metadata request object. 2182 ///
2142 * 2183 /// Request parameters:
2143 * Request parameters: 2184 ///
2144 * 2185 /// [fileId] - The ID for the file in question.
2145 * [fileId] - The ID for the file in question. 2186 ///
2146 * 2187 /// [acknowledgeAbuse] - Whether the user is acknowledging the risk of
2147 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of 2188 /// downloading known malware or other abusive files.
2148 * downloading known malware or other abusive files. 2189 ///
2149 * 2190 /// [projection] - This parameter is deprecated and has no function.
2150 * [projection] - This parameter is deprecated and has no function. 2191 /// Possible string values are:
2151 * Possible string values are: 2192 /// - "BASIC" : Deprecated
2152 * - "BASIC" : Deprecated 2193 /// - "FULL" : Deprecated
2153 * - "FULL" : Deprecated 2194 ///
2154 * 2195 /// [revisionId] - Specifies the Revision ID that should be downloaded.
2155 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored 2196 /// Ignored unless alt=media is specified.
2156 * unless alt=media is specified. 2197 ///
2157 * 2198 /// [supportsTeamDrives] - Whether the requesting application supports Team
2158 * [supportsTeamDrives] - Whether the requesting application supports Team 2199 /// Drives.
2159 * Drives. 2200 ///
2160 * 2201 /// [updateViewedDate] - Deprecated: Use files.update with
2161 * [updateViewedDate] - Deprecated: Use files.update with 2202 /// modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
2162 * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request 2203 /// body.
2163 * body. 2204 ///
2164 * 2205 /// [downloadOptions] - Options for downloading. A download can be either a
2165 * [downloadOptions] - Options for downloading. A download can be either a 2206 /// Metadata (default) or Media download. Partial Media downloads are
2166 * Metadata (default) or Media download. Partial Media downloads are possible 2207 /// possible as well.
2167 * as well. 2208 ///
2168 * 2209 /// Completes with a
2169 * Completes with a 2210 ///
2170 * 2211 /// - [Channel] for Metadata downloads (see [downloadOptions]).
2171 * - [Channel] for Metadata downloads (see [downloadOptions]). 2212 ///
2172 * 2213 /// - [commons.Media] for Media downloads (see [downloadOptions]).
2173 * - [commons.Media] for Media downloads (see [downloadOptions]). 2214 ///
2174 * 2215 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2175 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2216 /// an error.
2176 * error. 2217 ///
2177 * 2218 /// If the used [http.Client] completes with an error when making a REST
2178 * If the used [http.Client] completes with an error when making a REST call, 2219 /// call, this method will complete with the same error.
2179 * this method will complete with the same error. 2220 async.Future watch(Channel request, core.String fileId,
2180 */ 2221 {core.bool acknowledgeAbuse,
2181 async.Future watch(Channel request, core.String fileId, {core.bool acknowledge Abuse, core.String projection, core.String revisionId, core.bool supportsTeamDri ves, core.bool updateViewedDate, commons.DownloadOptions downloadOptions: common s.DownloadOptions.Metadata}) { 2222 core.String projection,
2223 core.String revisionId,
2224 core.bool supportsTeamDrives,
2225 core.bool updateViewedDate,
2226 commons.DownloadOptions downloadOptions:
2227 commons.DownloadOptions.Metadata}) {
2182 var _url = null; 2228 var _url = null;
2183 var _queryParams = new core.Map(); 2229 var _queryParams = new core.Map();
2184 var _uploadMedia = null; 2230 var _uploadMedia = null;
2185 var _uploadOptions = null; 2231 var _uploadOptions = null;
2186 var _downloadOptions = commons.DownloadOptions.Metadata; 2232 var _downloadOptions = commons.DownloadOptions.Metadata;
2187 var _body = null; 2233 var _body = null;
2188 2234
2189 if (request != null) { 2235 if (request != null) {
2190 _body = convert_1.JSON.encode((request).toJson()); 2236 _body = convert_1.JSON.encode((request).toJson());
2191 } 2237 }
(...skipping 13 matching lines...) Expand all
2205 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2251 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2206 } 2252 }
2207 if (updateViewedDate != null) { 2253 if (updateViewedDate != null) {
2208 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 2254 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
2209 } 2255 }
2210 2256
2211 _downloadOptions = downloadOptions; 2257 _downloadOptions = downloadOptions;
2212 2258
2213 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/watch'; 2259 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/watch';
2214 2260
2215 var _response = _requester.request(_url, 2261 var _response = _requester.request(_url, "POST",
2216 "POST", 2262 body: _body,
2217 body: _body, 2263 queryParams: _queryParams,
2218 queryParams: _queryParams, 2264 uploadOptions: _uploadOptions,
2219 uploadOptions: _uploadOptions, 2265 uploadMedia: _uploadMedia,
2220 uploadMedia: _uploadMedia, 2266 downloadOptions: _downloadOptions);
2221 downloadOptions: _downloadOptions);
2222 if (_downloadOptions == null || 2267 if (_downloadOptions == null ||
2223 _downloadOptions == commons.DownloadOptions.Metadata) { 2268 _downloadOptions == commons.DownloadOptions.Metadata) {
2224 return _response.then((data) => new Channel.fromJson(data)); 2269 return _response.then((data) => new Channel.fromJson(data));
2225 } else { 2270 } else {
2226 return _response; 2271 return _response;
2227 } 2272 }
2228 } 2273 }
2229
2230 } 2274 }
2231 2275
2232
2233 class ParentsResourceApi { 2276 class ParentsResourceApi {
2234 final commons.ApiRequester _requester; 2277 final commons.ApiRequester _requester;
2235 2278
2236 ParentsResourceApi(commons.ApiRequester client) : 2279 ParentsResourceApi(commons.ApiRequester client) : _requester = client;
2237 _requester = client;
2238 2280
2239 /** 2281 /// Removes a parent from a file.
2240 * Removes a parent from a file. 2282 ///
2241 * 2283 /// Request parameters:
2242 * Request parameters: 2284 ///
2243 * 2285 /// [fileId] - The ID of the file.
2244 * [fileId] - The ID of the file. 2286 ///
2245 * 2287 /// [parentId] - The ID of the parent.
2246 * [parentId] - The ID of the parent. 2288 ///
2247 * 2289 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2248 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2290 /// an error.
2249 * error. 2291 ///
2250 * 2292 /// If the used [http.Client] completes with an error when making a REST
2251 * If the used [http.Client] completes with an error when making a REST call, 2293 /// call, this method will complete with the same error.
2252 * this method will complete with the same error.
2253 */
2254 async.Future delete(core.String fileId, core.String parentId) { 2294 async.Future delete(core.String fileId, core.String parentId) {
2255 var _url = null; 2295 var _url = null;
2256 var _queryParams = new core.Map(); 2296 var _queryParams = new core.Map();
2257 var _uploadMedia = null; 2297 var _uploadMedia = null;
2258 var _uploadOptions = null; 2298 var _uploadOptions = null;
2259 var _downloadOptions = commons.DownloadOptions.Metadata; 2299 var _downloadOptions = commons.DownloadOptions.Metadata;
2260 var _body = null; 2300 var _body = null;
2261 2301
2262 if (fileId == null) { 2302 if (fileId == null) {
2263 throw new core.ArgumentError("Parameter fileId is required."); 2303 throw new core.ArgumentError("Parameter fileId is required.");
2264 } 2304 }
2265 if (parentId == null) { 2305 if (parentId == null) {
2266 throw new core.ArgumentError("Parameter parentId is required."); 2306 throw new core.ArgumentError("Parameter parentId is required.");
2267 } 2307 }
2268 2308
2269 _downloadOptions = null; 2309 _downloadOptions = null;
2270 2310
2271 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents/' + c ommons.Escaper.ecapeVariable('$parentId'); 2311 _url = 'files/' +
2312 commons.Escaper.ecapeVariable('$fileId') +
2313 '/parents/' +
2314 commons.Escaper.ecapeVariable('$parentId');
2272 2315
2273 var _response = _requester.request(_url, 2316 var _response = _requester.request(_url, "DELETE",
2274 "DELETE", 2317 body: _body,
2275 body: _body, 2318 queryParams: _queryParams,
2276 queryParams: _queryParams, 2319 uploadOptions: _uploadOptions,
2277 uploadOptions: _uploadOptions, 2320 uploadMedia: _uploadMedia,
2278 uploadMedia: _uploadMedia, 2321 downloadOptions: _downloadOptions);
2279 downloadOptions: _downloadOptions);
2280 return _response.then((data) => null); 2322 return _response.then((data) => null);
2281 } 2323 }
2282 2324
2283 /** 2325 /// Gets a specific parent reference.
2284 * Gets a specific parent reference. 2326 ///
2285 * 2327 /// Request parameters:
2286 * Request parameters: 2328 ///
2287 * 2329 /// [fileId] - The ID of the file.
2288 * [fileId] - The ID of the file. 2330 ///
2289 * 2331 /// [parentId] - The ID of the parent.
2290 * [parentId] - The ID of the parent. 2332 ///
2291 * 2333 /// Completes with a [ParentReference].
2292 * Completes with a [ParentReference]. 2334 ///
2293 * 2335 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2294 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2336 /// an error.
2295 * error. 2337 ///
2296 * 2338 /// If the used [http.Client] completes with an error when making a REST
2297 * If the used [http.Client] completes with an error when making a REST call, 2339 /// call, this method will complete with the same error.
2298 * this method will complete with the same error.
2299 */
2300 async.Future<ParentReference> get(core.String fileId, core.String parentId) { 2340 async.Future<ParentReference> get(core.String fileId, core.String parentId) {
2301 var _url = null; 2341 var _url = null;
2302 var _queryParams = new core.Map(); 2342 var _queryParams = new core.Map();
2303 var _uploadMedia = null; 2343 var _uploadMedia = null;
2304 var _uploadOptions = null; 2344 var _uploadOptions = null;
2305 var _downloadOptions = commons.DownloadOptions.Metadata; 2345 var _downloadOptions = commons.DownloadOptions.Metadata;
2306 var _body = null; 2346 var _body = null;
2307 2347
2308 if (fileId == null) { 2348 if (fileId == null) {
2309 throw new core.ArgumentError("Parameter fileId is required."); 2349 throw new core.ArgumentError("Parameter fileId is required.");
2310 } 2350 }
2311 if (parentId == null) { 2351 if (parentId == null) {
2312 throw new core.ArgumentError("Parameter parentId is required."); 2352 throw new core.ArgumentError("Parameter parentId is required.");
2313 } 2353 }
2314 2354
2315 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents/' + c ommons.Escaper.ecapeVariable('$parentId'); 2355 _url = 'files/' +
2356 commons.Escaper.ecapeVariable('$fileId') +
2357 '/parents/' +
2358 commons.Escaper.ecapeVariable('$parentId');
2316 2359
2317 var _response = _requester.request(_url, 2360 var _response = _requester.request(_url, "GET",
2318 "GET", 2361 body: _body,
2319 body: _body, 2362 queryParams: _queryParams,
2320 queryParams: _queryParams, 2363 uploadOptions: _uploadOptions,
2321 uploadOptions: _uploadOptions, 2364 uploadMedia: _uploadMedia,
2322 uploadMedia: _uploadMedia, 2365 downloadOptions: _downloadOptions);
2323 downloadOptions: _downloadOptions);
2324 return _response.then((data) => new ParentReference.fromJson(data)); 2366 return _response.then((data) => new ParentReference.fromJson(data));
2325 } 2367 }
2326 2368
2327 /** 2369 /// Adds a parent folder for a file.
2328 * Adds a parent folder for a file. 2370 ///
2329 * 2371 /// [request] - The metadata request object.
2330 * [request] - The metadata request object. 2372 ///
2331 * 2373 /// Request parameters:
2332 * Request parameters: 2374 ///
2333 * 2375 /// [fileId] - The ID of the file.
2334 * [fileId] - The ID of the file. 2376 ///
2335 * 2377 /// [supportsTeamDrives] - Whether the requesting application supports Team
2336 * [supportsTeamDrives] - Whether the requesting application supports Team 2378 /// Drives.
2337 * Drives. 2379 ///
2338 * 2380 /// Completes with a [ParentReference].
2339 * Completes with a [ParentReference]. 2381 ///
2340 * 2382 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2341 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2383 /// an error.
2342 * error. 2384 ///
2343 * 2385 /// If the used [http.Client] completes with an error when making a REST
2344 * If the used [http.Client] completes with an error when making a REST call, 2386 /// call, this method will complete with the same error.
2345 * this method will complete with the same error. 2387 async.Future<ParentReference> insert(
2346 */ 2388 ParentReference request, core.String fileId,
2347 async.Future<ParentReference> insert(ParentReference request, core.String file Id, {core.bool supportsTeamDrives}) { 2389 {core.bool supportsTeamDrives}) {
2348 var _url = null; 2390 var _url = null;
2349 var _queryParams = new core.Map(); 2391 var _queryParams = new core.Map();
2350 var _uploadMedia = null; 2392 var _uploadMedia = null;
2351 var _uploadOptions = null; 2393 var _uploadOptions = null;
2352 var _downloadOptions = commons.DownloadOptions.Metadata; 2394 var _downloadOptions = commons.DownloadOptions.Metadata;
2353 var _body = null; 2395 var _body = null;
2354 2396
2355 if (request != null) { 2397 if (request != null) {
2356 _body = convert_1.JSON.encode((request).toJson()); 2398 _body = convert_1.JSON.encode((request).toJson());
2357 } 2399 }
2358 if (fileId == null) { 2400 if (fileId == null) {
2359 throw new core.ArgumentError("Parameter fileId is required."); 2401 throw new core.ArgumentError("Parameter fileId is required.");
2360 } 2402 }
2361 if (supportsTeamDrives != null) { 2403 if (supportsTeamDrives != null) {
2362 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2404 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2363 } 2405 }
2364 2406
2365 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents'; 2407 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents';
2366 2408
2367 var _response = _requester.request(_url, 2409 var _response = _requester.request(_url, "POST",
2368 "POST", 2410 body: _body,
2369 body: _body, 2411 queryParams: _queryParams,
2370 queryParams: _queryParams, 2412 uploadOptions: _uploadOptions,
2371 uploadOptions: _uploadOptions, 2413 uploadMedia: _uploadMedia,
2372 uploadMedia: _uploadMedia, 2414 downloadOptions: _downloadOptions);
2373 downloadOptions: _downloadOptions);
2374 return _response.then((data) => new ParentReference.fromJson(data)); 2415 return _response.then((data) => new ParentReference.fromJson(data));
2375 } 2416 }
2376 2417
2377 /** 2418 /// Lists a file's parents.
2378 * Lists a file's parents. 2419 ///
2379 * 2420 /// Request parameters:
2380 * Request parameters: 2421 ///
2381 * 2422 /// [fileId] - The ID of the file.
2382 * [fileId] - The ID of the file. 2423 ///
2383 * 2424 /// Completes with a [ParentList].
2384 * Completes with a [ParentList]. 2425 ///
2385 * 2426 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2386 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2427 /// an error.
2387 * error. 2428 ///
2388 * 2429 /// If the used [http.Client] completes with an error when making a REST
2389 * If the used [http.Client] completes with an error when making a REST call, 2430 /// call, this method will complete with the same error.
2390 * this method will complete with the same error.
2391 */
2392 async.Future<ParentList> list(core.String fileId) { 2431 async.Future<ParentList> list(core.String fileId) {
2393 var _url = null; 2432 var _url = null;
2394 var _queryParams = new core.Map(); 2433 var _queryParams = new core.Map();
2395 var _uploadMedia = null; 2434 var _uploadMedia = null;
2396 var _uploadOptions = null; 2435 var _uploadOptions = null;
2397 var _downloadOptions = commons.DownloadOptions.Metadata; 2436 var _downloadOptions = commons.DownloadOptions.Metadata;
2398 var _body = null; 2437 var _body = null;
2399 2438
2400 if (fileId == null) { 2439 if (fileId == null) {
2401 throw new core.ArgumentError("Parameter fileId is required."); 2440 throw new core.ArgumentError("Parameter fileId is required.");
2402 } 2441 }
2403 2442
2404 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents'; 2443 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents';
2405 2444
2406 var _response = _requester.request(_url, 2445 var _response = _requester.request(_url, "GET",
2407 "GET", 2446 body: _body,
2408 body: _body, 2447 queryParams: _queryParams,
2409 queryParams: _queryParams, 2448 uploadOptions: _uploadOptions,
2410 uploadOptions: _uploadOptions, 2449 uploadMedia: _uploadMedia,
2411 uploadMedia: _uploadMedia, 2450 downloadOptions: _downloadOptions);
2412 downloadOptions: _downloadOptions);
2413 return _response.then((data) => new ParentList.fromJson(data)); 2451 return _response.then((data) => new ParentList.fromJson(data));
2414 } 2452 }
2415
2416 } 2453 }
2417 2454
2418
2419 class PermissionsResourceApi { 2455 class PermissionsResourceApi {
2420 final commons.ApiRequester _requester; 2456 final commons.ApiRequester _requester;
2421 2457
2422 PermissionsResourceApi(commons.ApiRequester client) : 2458 PermissionsResourceApi(commons.ApiRequester client) : _requester = client;
2423 _requester = client;
2424 2459
2425 /** 2460 /// Deletes a permission from a file or Team Drive.
2426 * Deletes a permission from a file or Team Drive. 2461 ///
2427 * 2462 /// Request parameters:
2428 * Request parameters: 2463 ///
2429 * 2464 /// [fileId] - The ID for the file or Team Drive.
2430 * [fileId] - The ID for the file or Team Drive. 2465 ///
2431 * 2466 /// [permissionId] - The ID for the permission.
2432 * [permissionId] - The ID for the permission. 2467 ///
2433 * 2468 /// [supportsTeamDrives] - Whether the requesting application supports Team
2434 * [supportsTeamDrives] - Whether the requesting application supports Team 2469 /// Drives.
2435 * Drives. 2470 ///
2436 * 2471 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2437 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2472 /// an error.
2438 * error. 2473 ///
2439 * 2474 /// If the used [http.Client] completes with an error when making a REST
2440 * If the used [http.Client] completes with an error when making a REST call, 2475 /// call, this method will complete with the same error.
2441 * this method will complete with the same error. 2476 async.Future delete(core.String fileId, core.String permissionId,
2442 */ 2477 {core.bool supportsTeamDrives}) {
2443 async.Future delete(core.String fileId, core.String permissionId, {core.bool s upportsTeamDrives}) {
2444 var _url = null; 2478 var _url = null;
2445 var _queryParams = new core.Map(); 2479 var _queryParams = new core.Map();
2446 var _uploadMedia = null; 2480 var _uploadMedia = null;
2447 var _uploadOptions = null; 2481 var _uploadOptions = null;
2448 var _downloadOptions = commons.DownloadOptions.Metadata; 2482 var _downloadOptions = commons.DownloadOptions.Metadata;
2449 var _body = null; 2483 var _body = null;
2450 2484
2451 if (fileId == null) { 2485 if (fileId == null) {
2452 throw new core.ArgumentError("Parameter fileId is required."); 2486 throw new core.ArgumentError("Parameter fileId is required.");
2453 } 2487 }
2454 if (permissionId == null) { 2488 if (permissionId == null) {
2455 throw new core.ArgumentError("Parameter permissionId is required."); 2489 throw new core.ArgumentError("Parameter permissionId is required.");
2456 } 2490 }
2457 if (supportsTeamDrives != null) { 2491 if (supportsTeamDrives != null) {
2458 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2492 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2459 } 2493 }
2460 2494
2461 _downloadOptions = null; 2495 _downloadOptions = null;
2462 2496
2463 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2497 _url = 'files/' +
2498 commons.Escaper.ecapeVariable('$fileId') +
2499 '/permissions/' +
2500 commons.Escaper.ecapeVariable('$permissionId');
2464 2501
2465 var _response = _requester.request(_url, 2502 var _response = _requester.request(_url, "DELETE",
2466 "DELETE", 2503 body: _body,
2467 body: _body, 2504 queryParams: _queryParams,
2468 queryParams: _queryParams, 2505 uploadOptions: _uploadOptions,
2469 uploadOptions: _uploadOptions, 2506 uploadMedia: _uploadMedia,
2470 uploadMedia: _uploadMedia, 2507 downloadOptions: _downloadOptions);
2471 downloadOptions: _downloadOptions);
2472 return _response.then((data) => null); 2508 return _response.then((data) => null);
2473 } 2509 }
2474 2510
2475 /** 2511 /// Gets a permission by ID.
2476 * Gets a permission by ID. 2512 ///
2477 * 2513 /// Request parameters:
2478 * Request parameters: 2514 ///
2479 * 2515 /// [fileId] - The ID for the file or Team Drive.
2480 * [fileId] - The ID for the file or Team Drive. 2516 ///
2481 * 2517 /// [permissionId] - The ID for the permission.
2482 * [permissionId] - The ID for the permission. 2518 ///
2483 * 2519 /// [supportsTeamDrives] - Whether the requesting application supports Team
2484 * [supportsTeamDrives] - Whether the requesting application supports Team 2520 /// Drives.
2485 * Drives. 2521 ///
2486 * 2522 /// Completes with a [Permission].
2487 * Completes with a [Permission]. 2523 ///
2488 * 2524 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2489 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2525 /// an error.
2490 * error. 2526 ///
2491 * 2527 /// If the used [http.Client] completes with an error when making a REST
2492 * If the used [http.Client] completes with an error when making a REST call, 2528 /// call, this method will complete with the same error.
2493 * this method will complete with the same error. 2529 async.Future<Permission> get(core.String fileId, core.String permissionId,
2494 */ 2530 {core.bool supportsTeamDrives}) {
2495 async.Future<Permission> get(core.String fileId, core.String permissionId, {co re.bool supportsTeamDrives}) {
2496 var _url = null; 2531 var _url = null;
2497 var _queryParams = new core.Map(); 2532 var _queryParams = new core.Map();
2498 var _uploadMedia = null; 2533 var _uploadMedia = null;
2499 var _uploadOptions = null; 2534 var _uploadOptions = null;
2500 var _downloadOptions = commons.DownloadOptions.Metadata; 2535 var _downloadOptions = commons.DownloadOptions.Metadata;
2501 var _body = null; 2536 var _body = null;
2502 2537
2503 if (fileId == null) { 2538 if (fileId == null) {
2504 throw new core.ArgumentError("Parameter fileId is required."); 2539 throw new core.ArgumentError("Parameter fileId is required.");
2505 } 2540 }
2506 if (permissionId == null) { 2541 if (permissionId == null) {
2507 throw new core.ArgumentError("Parameter permissionId is required."); 2542 throw new core.ArgumentError("Parameter permissionId is required.");
2508 } 2543 }
2509 if (supportsTeamDrives != null) { 2544 if (supportsTeamDrives != null) {
2510 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2545 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2511 } 2546 }
2512 2547
2513 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2548 _url = 'files/' +
2549 commons.Escaper.ecapeVariable('$fileId') +
2550 '/permissions/' +
2551 commons.Escaper.ecapeVariable('$permissionId');
2514 2552
2515 var _response = _requester.request(_url, 2553 var _response = _requester.request(_url, "GET",
2516 "GET", 2554 body: _body,
2517 body: _body, 2555 queryParams: _queryParams,
2518 queryParams: _queryParams, 2556 uploadOptions: _uploadOptions,
2519 uploadOptions: _uploadOptions, 2557 uploadMedia: _uploadMedia,
2520 uploadMedia: _uploadMedia, 2558 downloadOptions: _downloadOptions);
2521 downloadOptions: _downloadOptions);
2522 return _response.then((data) => new Permission.fromJson(data)); 2559 return _response.then((data) => new Permission.fromJson(data));
2523 } 2560 }
2524 2561
2525 /** 2562 /// Returns the permission ID for an email address.
2526 * Returns the permission ID for an email address. 2563 ///
2527 * 2564 /// Request parameters:
2528 * Request parameters: 2565 ///
2529 * 2566 /// [email] - The email address for which to return a permission ID
2530 * [email] - The email address for which to return a permission ID 2567 ///
2531 * 2568 /// Completes with a [PermissionId].
2532 * Completes with a [PermissionId]. 2569 ///
2533 * 2570 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2534 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2571 /// an error.
2535 * error. 2572 ///
2536 * 2573 /// If the used [http.Client] completes with an error when making a REST
2537 * If the used [http.Client] completes with an error when making a REST call, 2574 /// call, this method will complete with the same error.
2538 * this method will complete with the same error.
2539 */
2540 async.Future<PermissionId> getIdForEmail(core.String email) { 2575 async.Future<PermissionId> getIdForEmail(core.String email) {
2541 var _url = null; 2576 var _url = null;
2542 var _queryParams = new core.Map(); 2577 var _queryParams = new core.Map();
2543 var _uploadMedia = null; 2578 var _uploadMedia = null;
2544 var _uploadOptions = null; 2579 var _uploadOptions = null;
2545 var _downloadOptions = commons.DownloadOptions.Metadata; 2580 var _downloadOptions = commons.DownloadOptions.Metadata;
2546 var _body = null; 2581 var _body = null;
2547 2582
2548 if (email == null) { 2583 if (email == null) {
2549 throw new core.ArgumentError("Parameter email is required."); 2584 throw new core.ArgumentError("Parameter email is required.");
2550 } 2585 }
2551 2586
2552 _url = 'permissionIds/' + commons.Escaper.ecapeVariable('$email'); 2587 _url = 'permissionIds/' + commons.Escaper.ecapeVariable('$email');
2553 2588
2554 var _response = _requester.request(_url, 2589 var _response = _requester.request(_url, "GET",
2555 "GET", 2590 body: _body,
2556 body: _body, 2591 queryParams: _queryParams,
2557 queryParams: _queryParams, 2592 uploadOptions: _uploadOptions,
2558 uploadOptions: _uploadOptions, 2593 uploadMedia: _uploadMedia,
2559 uploadMedia: _uploadMedia, 2594 downloadOptions: _downloadOptions);
2560 downloadOptions: _downloadOptions);
2561 return _response.then((data) => new PermissionId.fromJson(data)); 2595 return _response.then((data) => new PermissionId.fromJson(data));
2562 } 2596 }
2563 2597
2564 /** 2598 /// Inserts a permission for a file or Team Drive.
2565 * Inserts a permission for a file or Team Drive. 2599 ///
2566 * 2600 /// [request] - The metadata request object.
2567 * [request] - The metadata request object. 2601 ///
2568 * 2602 /// Request parameters:
2569 * Request parameters: 2603 ///
2570 * 2604 /// [fileId] - The ID for the file or Team Drive.
2571 * [fileId] - The ID for the file or Team Drive. 2605 ///
2572 * 2606 /// [emailMessage] - A custom message to include in notification emails.
2573 * [emailMessage] - A custom message to include in notification emails. 2607 ///
2574 * 2608 /// [sendNotificationEmails] - Whether to send notification emails when
2575 * [sendNotificationEmails] - Whether to send notification emails when sharing 2609 /// sharing to users or groups. This parameter is ignored and an email is
2576 * to users or groups. This parameter is ignored and an email is sent if the 2610 /// sent if the role is owner.
2577 * role is owner. 2611 ///
2578 * 2612 /// [supportsTeamDrives] - Whether the requesting application supports Team
2579 * [supportsTeamDrives] - Whether the requesting application supports Team 2613 /// Drives.
2580 * Drives. 2614 ///
2581 * 2615 /// Completes with a [Permission].
2582 * Completes with a [Permission]. 2616 ///
2583 * 2617 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2584 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2618 /// an error.
2585 * error. 2619 ///
2586 * 2620 /// If the used [http.Client] completes with an error when making a REST
2587 * If the used [http.Client] completes with an error when making a REST call, 2621 /// call, this method will complete with the same error.
2588 * this method will complete with the same error. 2622 async.Future<Permission> insert(Permission request, core.String fileId,
2589 */ 2623 {core.String emailMessage,
2590 async.Future<Permission> insert(Permission request, core.String fileId, {core. String emailMessage, core.bool sendNotificationEmails, core.bool supportsTeamDri ves}) { 2624 core.bool sendNotificationEmails,
2625 core.bool supportsTeamDrives}) {
2591 var _url = null; 2626 var _url = null;
2592 var _queryParams = new core.Map(); 2627 var _queryParams = new core.Map();
2593 var _uploadMedia = null; 2628 var _uploadMedia = null;
2594 var _uploadOptions = null; 2629 var _uploadOptions = null;
2595 var _downloadOptions = commons.DownloadOptions.Metadata; 2630 var _downloadOptions = commons.DownloadOptions.Metadata;
2596 var _body = null; 2631 var _body = null;
2597 2632
2598 if (request != null) { 2633 if (request != null) {
2599 _body = convert_1.JSON.encode((request).toJson()); 2634 _body = convert_1.JSON.encode((request).toJson());
2600 } 2635 }
2601 if (fileId == null) { 2636 if (fileId == null) {
2602 throw new core.ArgumentError("Parameter fileId is required."); 2637 throw new core.ArgumentError("Parameter fileId is required.");
2603 } 2638 }
2604 if (emailMessage != null) { 2639 if (emailMessage != null) {
2605 _queryParams["emailMessage"] = [emailMessage]; 2640 _queryParams["emailMessage"] = [emailMessage];
2606 } 2641 }
2607 if (sendNotificationEmails != null) { 2642 if (sendNotificationEmails != null) {
2608 _queryParams["sendNotificationEmails"] = ["${sendNotificationEmails}"]; 2643 _queryParams["sendNotificationEmails"] = ["${sendNotificationEmails}"];
2609 } 2644 }
2610 if (supportsTeamDrives != null) { 2645 if (supportsTeamDrives != null) {
2611 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2646 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2612 } 2647 }
2613 2648
2614 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; 2649 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions';
2615 2650
2616 var _response = _requester.request(_url, 2651 var _response = _requester.request(_url, "POST",
2617 "POST", 2652 body: _body,
2618 body: _body, 2653 queryParams: _queryParams,
2619 queryParams: _queryParams, 2654 uploadOptions: _uploadOptions,
2620 uploadOptions: _uploadOptions, 2655 uploadMedia: _uploadMedia,
2621 uploadMedia: _uploadMedia, 2656 downloadOptions: _downloadOptions);
2622 downloadOptions: _downloadOptions);
2623 return _response.then((data) => new Permission.fromJson(data)); 2657 return _response.then((data) => new Permission.fromJson(data));
2624 } 2658 }
2625 2659
2626 /** 2660 /// Lists a file's or Team Drive's permissions.
2627 * Lists a file's or Team Drive's permissions. 2661 ///
2628 * 2662 /// Request parameters:
2629 * Request parameters: 2663 ///
2630 * 2664 /// [fileId] - The ID for the file or Team Drive.
2631 * [fileId] - The ID for the file or Team Drive. 2665 ///
2632 * 2666 /// [maxResults] - The maximum number of permissions to return per page. When
2633 * [maxResults] - The maximum number of permissions to return per page. When 2667 /// not set for files in a Team Drive, at most 100 results will be returned.
2634 * not set for files in a Team Drive, at most 100 results will be returned. 2668 /// When not set for files that are not in a Team Drive, the entire list will
2635 * When not set for files that are not in a Team Drive, the entire list will 2669 /// be returned.
2636 * be returned. 2670 /// Value must be between "1" and "100".
2637 * Value must be between "1" and "100". 2671 ///
2638 * 2672 /// [pageToken] - The token for continuing a previous list request on the
2639 * [pageToken] - The token for continuing a previous list request on the next 2673 /// next page. This should be set to the value of 'nextPageToken' from the
2640 * page. This should be set to the value of 'nextPageToken' from the previous 2674 /// previous response.
2641 * response. 2675 ///
2642 * 2676 /// [supportsTeamDrives] - Whether the requesting application supports Team
2643 * [supportsTeamDrives] - Whether the requesting application supports Team 2677 /// Drives.
2644 * Drives. 2678 ///
2645 * 2679 /// Completes with a [PermissionList].
2646 * Completes with a [PermissionList]. 2680 ///
2647 * 2681 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2648 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2682 /// an error.
2649 * error. 2683 ///
2650 * 2684 /// If the used [http.Client] completes with an error when making a REST
2651 * If the used [http.Client] completes with an error when making a REST call, 2685 /// call, this method will complete with the same error.
2652 * this method will complete with the same error. 2686 async.Future<PermissionList> list(core.String fileId,
2653 */ 2687 {core.int maxResults,
2654 async.Future<PermissionList> list(core.String fileId, {core.int maxResults, co re.String pageToken, core.bool supportsTeamDrives}) { 2688 core.String pageToken,
2689 core.bool supportsTeamDrives}) {
2655 var _url = null; 2690 var _url = null;
2656 var _queryParams = new core.Map(); 2691 var _queryParams = new core.Map();
2657 var _uploadMedia = null; 2692 var _uploadMedia = null;
2658 var _uploadOptions = null; 2693 var _uploadOptions = null;
2659 var _downloadOptions = commons.DownloadOptions.Metadata; 2694 var _downloadOptions = commons.DownloadOptions.Metadata;
2660 var _body = null; 2695 var _body = null;
2661 2696
2662 if (fileId == null) { 2697 if (fileId == null) {
2663 throw new core.ArgumentError("Parameter fileId is required."); 2698 throw new core.ArgumentError("Parameter fileId is required.");
2664 } 2699 }
2665 if (maxResults != null) { 2700 if (maxResults != null) {
2666 _queryParams["maxResults"] = ["${maxResults}"]; 2701 _queryParams["maxResults"] = ["${maxResults}"];
2667 } 2702 }
2668 if (pageToken != null) { 2703 if (pageToken != null) {
2669 _queryParams["pageToken"] = [pageToken]; 2704 _queryParams["pageToken"] = [pageToken];
2670 } 2705 }
2671 if (supportsTeamDrives != null) { 2706 if (supportsTeamDrives != null) {
2672 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2707 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2673 } 2708 }
2674 2709
2675 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; 2710 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions';
2676 2711
2677 var _response = _requester.request(_url, 2712 var _response = _requester.request(_url, "GET",
2678 "GET", 2713 body: _body,
2679 body: _body, 2714 queryParams: _queryParams,
2680 queryParams: _queryParams, 2715 uploadOptions: _uploadOptions,
2681 uploadOptions: _uploadOptions, 2716 uploadMedia: _uploadMedia,
2682 uploadMedia: _uploadMedia, 2717 downloadOptions: _downloadOptions);
2683 downloadOptions: _downloadOptions);
2684 return _response.then((data) => new PermissionList.fromJson(data)); 2718 return _response.then((data) => new PermissionList.fromJson(data));
2685 } 2719 }
2686 2720
2687 /** 2721 /// Updates a permission using patch semantics.
2688 * Updates a permission using patch semantics. 2722 ///
2689 * 2723 /// [request] - The metadata request object.
2690 * [request] - The metadata request object. 2724 ///
2691 * 2725 /// Request parameters:
2692 * Request parameters: 2726 ///
2693 * 2727 /// [fileId] - The ID for the file or Team Drive.
2694 * [fileId] - The ID for the file or Team Drive. 2728 ///
2695 * 2729 /// [permissionId] - The ID for the permission.
2696 * [permissionId] - The ID for the permission. 2730 ///
2697 * 2731 /// [removeExpiration] - Whether to remove the expiration date.
2698 * [removeExpiration] - Whether to remove the expiration date. 2732 ///
2699 * 2733 /// [supportsTeamDrives] - Whether the requesting application supports Team
2700 * [supportsTeamDrives] - Whether the requesting application supports Team 2734 /// Drives.
2701 * Drives. 2735 ///
2702 * 2736 /// [transferOwnership] - Whether changing a role to 'owner' downgrades the
2703 * [transferOwnership] - Whether changing a role to 'owner' downgrades the 2737 /// current owners to writers. Does nothing if the specified role is not
2704 * current owners to writers. Does nothing if the specified role is not 2738 /// 'owner'.
2705 * 'owner'. 2739 ///
2706 * 2740 /// Completes with a [Permission].
2707 * Completes with a [Permission]. 2741 ///
2708 * 2742 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2709 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2743 /// an error.
2710 * error. 2744 ///
2711 * 2745 /// If the used [http.Client] completes with an error when making a REST
2712 * If the used [http.Client] completes with an error when making a REST call, 2746 /// call, this method will complete with the same error.
2713 * this method will complete with the same error. 2747 async.Future<Permission> patch(
2714 */ 2748 Permission request, core.String fileId, core.String permissionId,
2715 async.Future<Permission> patch(Permission request, core.String fileId, core.St ring permissionId, {core.bool removeExpiration, core.bool supportsTeamDrives, co re.bool transferOwnership}) { 2749 {core.bool removeExpiration,
2750 core.bool supportsTeamDrives,
2751 core.bool transferOwnership}) {
2716 var _url = null; 2752 var _url = null;
2717 var _queryParams = new core.Map(); 2753 var _queryParams = new core.Map();
2718 var _uploadMedia = null; 2754 var _uploadMedia = null;
2719 var _uploadOptions = null; 2755 var _uploadOptions = null;
2720 var _downloadOptions = commons.DownloadOptions.Metadata; 2756 var _downloadOptions = commons.DownloadOptions.Metadata;
2721 var _body = null; 2757 var _body = null;
2722 2758
2723 if (request != null) { 2759 if (request != null) {
2724 _body = convert_1.JSON.encode((request).toJson()); 2760 _body = convert_1.JSON.encode((request).toJson());
2725 } 2761 }
2726 if (fileId == null) { 2762 if (fileId == null) {
2727 throw new core.ArgumentError("Parameter fileId is required."); 2763 throw new core.ArgumentError("Parameter fileId is required.");
2728 } 2764 }
2729 if (permissionId == null) { 2765 if (permissionId == null) {
2730 throw new core.ArgumentError("Parameter permissionId is required."); 2766 throw new core.ArgumentError("Parameter permissionId is required.");
2731 } 2767 }
2732 if (removeExpiration != null) { 2768 if (removeExpiration != null) {
2733 _queryParams["removeExpiration"] = ["${removeExpiration}"]; 2769 _queryParams["removeExpiration"] = ["${removeExpiration}"];
2734 } 2770 }
2735 if (supportsTeamDrives != null) { 2771 if (supportsTeamDrives != null) {
2736 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2772 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2737 } 2773 }
2738 if (transferOwnership != null) { 2774 if (transferOwnership != null) {
2739 _queryParams["transferOwnership"] = ["${transferOwnership}"]; 2775 _queryParams["transferOwnership"] = ["${transferOwnership}"];
2740 } 2776 }
2741 2777
2742 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2778 _url = 'files/' +
2779 commons.Escaper.ecapeVariable('$fileId') +
2780 '/permissions/' +
2781 commons.Escaper.ecapeVariable('$permissionId');
2743 2782
2744 var _response = _requester.request(_url, 2783 var _response = _requester.request(_url, "PATCH",
2745 "PATCH", 2784 body: _body,
2746 body: _body, 2785 queryParams: _queryParams,
2747 queryParams: _queryParams, 2786 uploadOptions: _uploadOptions,
2748 uploadOptions: _uploadOptions, 2787 uploadMedia: _uploadMedia,
2749 uploadMedia: _uploadMedia, 2788 downloadOptions: _downloadOptions);
2750 downloadOptions: _downloadOptions);
2751 return _response.then((data) => new Permission.fromJson(data)); 2789 return _response.then((data) => new Permission.fromJson(data));
2752 } 2790 }
2753 2791
2754 /** 2792 /// Updates a permission.
2755 * Updates a permission. 2793 ///
2756 * 2794 /// [request] - The metadata request object.
2757 * [request] - The metadata request object. 2795 ///
2758 * 2796 /// Request parameters:
2759 * Request parameters: 2797 ///
2760 * 2798 /// [fileId] - The ID for the file or Team Drive.
2761 * [fileId] - The ID for the file or Team Drive. 2799 ///
2762 * 2800 /// [permissionId] - The ID for the permission.
2763 * [permissionId] - The ID for the permission. 2801 ///
2764 * 2802 /// [removeExpiration] - Whether to remove the expiration date.
2765 * [removeExpiration] - Whether to remove the expiration date. 2803 ///
2766 * 2804 /// [supportsTeamDrives] - Whether the requesting application supports Team
2767 * [supportsTeamDrives] - Whether the requesting application supports Team 2805 /// Drives.
2768 * Drives. 2806 ///
2769 * 2807 /// [transferOwnership] - Whether changing a role to 'owner' downgrades the
2770 * [transferOwnership] - Whether changing a role to 'owner' downgrades the 2808 /// current owners to writers. Does nothing if the specified role is not
2771 * current owners to writers. Does nothing if the specified role is not 2809 /// 'owner'.
2772 * 'owner'. 2810 ///
2773 * 2811 /// Completes with a [Permission].
2774 * Completes with a [Permission]. 2812 ///
2775 * 2813 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2776 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2814 /// an error.
2777 * error. 2815 ///
2778 * 2816 /// If the used [http.Client] completes with an error when making a REST
2779 * If the used [http.Client] completes with an error when making a REST call, 2817 /// call, this method will complete with the same error.
2780 * this method will complete with the same error. 2818 async.Future<Permission> update(
2781 */ 2819 Permission request, core.String fileId, core.String permissionId,
2782 async.Future<Permission> update(Permission request, core.String fileId, core.S tring permissionId, {core.bool removeExpiration, core.bool supportsTeamDrives, c ore.bool transferOwnership}) { 2820 {core.bool removeExpiration,
2821 core.bool supportsTeamDrives,
2822 core.bool transferOwnership}) {
2783 var _url = null; 2823 var _url = null;
2784 var _queryParams = new core.Map(); 2824 var _queryParams = new core.Map();
2785 var _uploadMedia = null; 2825 var _uploadMedia = null;
2786 var _uploadOptions = null; 2826 var _uploadOptions = null;
2787 var _downloadOptions = commons.DownloadOptions.Metadata; 2827 var _downloadOptions = commons.DownloadOptions.Metadata;
2788 var _body = null; 2828 var _body = null;
2789 2829
2790 if (request != null) { 2830 if (request != null) {
2791 _body = convert_1.JSON.encode((request).toJson()); 2831 _body = convert_1.JSON.encode((request).toJson());
2792 } 2832 }
2793 if (fileId == null) { 2833 if (fileId == null) {
2794 throw new core.ArgumentError("Parameter fileId is required."); 2834 throw new core.ArgumentError("Parameter fileId is required.");
2795 } 2835 }
2796 if (permissionId == null) { 2836 if (permissionId == null) {
2797 throw new core.ArgumentError("Parameter permissionId is required."); 2837 throw new core.ArgumentError("Parameter permissionId is required.");
2798 } 2838 }
2799 if (removeExpiration != null) { 2839 if (removeExpiration != null) {
2800 _queryParams["removeExpiration"] = ["${removeExpiration}"]; 2840 _queryParams["removeExpiration"] = ["${removeExpiration}"];
2801 } 2841 }
2802 if (supportsTeamDrives != null) { 2842 if (supportsTeamDrives != null) {
2803 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; 2843 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2804 } 2844 }
2805 if (transferOwnership != null) { 2845 if (transferOwnership != null) {
2806 _queryParams["transferOwnership"] = ["${transferOwnership}"]; 2846 _queryParams["transferOwnership"] = ["${transferOwnership}"];
2807 } 2847 }
2808 2848
2809 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2849 _url = 'files/' +
2850 commons.Escaper.ecapeVariable('$fileId') +
2851 '/permissions/' +
2852 commons.Escaper.ecapeVariable('$permissionId');
2810 2853
2811 var _response = _requester.request(_url, 2854 var _response = _requester.request(_url, "PUT",
2812 "PUT", 2855 body: _body,
2813 body: _body, 2856 queryParams: _queryParams,
2814 queryParams: _queryParams, 2857 uploadOptions: _uploadOptions,
2815 uploadOptions: _uploadOptions, 2858 uploadMedia: _uploadMedia,
2816 uploadMedia: _uploadMedia, 2859 downloadOptions: _downloadOptions);
2817 downloadOptions: _downloadOptions);
2818 return _response.then((data) => new Permission.fromJson(data)); 2860 return _response.then((data) => new Permission.fromJson(data));
2819 } 2861 }
2820
2821 } 2862 }
2822 2863
2823
2824 class PropertiesResourceApi { 2864 class PropertiesResourceApi {
2825 final commons.ApiRequester _requester; 2865 final commons.ApiRequester _requester;
2826 2866
2827 PropertiesResourceApi(commons.ApiRequester client) : 2867 PropertiesResourceApi(commons.ApiRequester client) : _requester = client;
2828 _requester = client;
2829 2868
2830 /** 2869 /// Deletes a property.
2831 * Deletes a property. 2870 ///
2832 * 2871 /// Request parameters:
2833 * Request parameters: 2872 ///
2834 * 2873 /// [fileId] - The ID of the file.
2835 * [fileId] - The ID of the file. 2874 ///
2836 * 2875 /// [propertyKey] - The key of the property.
2837 * [propertyKey] - The key of the property. 2876 ///
2838 * 2877 /// [visibility] - The visibility of the property.
2839 * [visibility] - The visibility of the property. 2878 ///
2840 * 2879 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2841 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2880 /// an error.
2842 * error. 2881 ///
2843 * 2882 /// If the used [http.Client] completes with an error when making a REST
2844 * If the used [http.Client] completes with an error when making a REST call, 2883 /// call, this method will complete with the same error.
2845 * this method will complete with the same error. 2884 async.Future delete(core.String fileId, core.String propertyKey,
2846 */ 2885 {core.String visibility}) {
2847 async.Future delete(core.String fileId, core.String propertyKey, {core.String visibility}) {
2848 var _url = null; 2886 var _url = null;
2849 var _queryParams = new core.Map(); 2887 var _queryParams = new core.Map();
2850 var _uploadMedia = null; 2888 var _uploadMedia = null;
2851 var _uploadOptions = null; 2889 var _uploadOptions = null;
2852 var _downloadOptions = commons.DownloadOptions.Metadata; 2890 var _downloadOptions = commons.DownloadOptions.Metadata;
2853 var _body = null; 2891 var _body = null;
2854 2892
2855 if (fileId == null) { 2893 if (fileId == null) {
2856 throw new core.ArgumentError("Parameter fileId is required."); 2894 throw new core.ArgumentError("Parameter fileId is required.");
2857 } 2895 }
2858 if (propertyKey == null) { 2896 if (propertyKey == null) {
2859 throw new core.ArgumentError("Parameter propertyKey is required."); 2897 throw new core.ArgumentError("Parameter propertyKey is required.");
2860 } 2898 }
2861 if (visibility != null) { 2899 if (visibility != null) {
2862 _queryParams["visibility"] = [visibility]; 2900 _queryParams["visibility"] = [visibility];
2863 } 2901 }
2864 2902
2865 _downloadOptions = null; 2903 _downloadOptions = null;
2866 2904
2867 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey'); 2905 _url = 'files/' +
2906 commons.Escaper.ecapeVariable('$fileId') +
2907 '/properties/' +
2908 commons.Escaper.ecapeVariable('$propertyKey');
2868 2909
2869 var _response = _requester.request(_url, 2910 var _response = _requester.request(_url, "DELETE",
2870 "DELETE", 2911 body: _body,
2871 body: _body, 2912 queryParams: _queryParams,
2872 queryParams: _queryParams, 2913 uploadOptions: _uploadOptions,
2873 uploadOptions: _uploadOptions, 2914 uploadMedia: _uploadMedia,
2874 uploadMedia: _uploadMedia, 2915 downloadOptions: _downloadOptions);
2875 downloadOptions: _downloadOptions);
2876 return _response.then((data) => null); 2916 return _response.then((data) => null);
2877 } 2917 }
2878 2918
2879 /** 2919 /// Gets a property by its key.
2880 * Gets a property by its key. 2920 ///
2881 * 2921 /// Request parameters:
2882 * Request parameters: 2922 ///
2883 * 2923 /// [fileId] - The ID of the file.
2884 * [fileId] - The ID of the file. 2924 ///
2885 * 2925 /// [propertyKey] - The key of the property.
2886 * [propertyKey] - The key of the property. 2926 ///
2887 * 2927 /// [visibility] - The visibility of the property.
2888 * [visibility] - The visibility of the property. 2928 ///
2889 * 2929 /// Completes with a [Property].
2890 * Completes with a [Property]. 2930 ///
2891 * 2931 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2892 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2932 /// an error.
2893 * error. 2933 ///
2894 * 2934 /// If the used [http.Client] completes with an error when making a REST
2895 * If the used [http.Client] completes with an error when making a REST call, 2935 /// call, this method will complete with the same error.
2896 * this method will complete with the same error. 2936 async.Future<Property> get(core.String fileId, core.String propertyKey,
2897 */ 2937 {core.String visibility}) {
2898 async.Future<Property> get(core.String fileId, core.String propertyKey, {core. String visibility}) {
2899 var _url = null; 2938 var _url = null;
2900 var _queryParams = new core.Map(); 2939 var _queryParams = new core.Map();
2901 var _uploadMedia = null; 2940 var _uploadMedia = null;
2902 var _uploadOptions = null; 2941 var _uploadOptions = null;
2903 var _downloadOptions = commons.DownloadOptions.Metadata; 2942 var _downloadOptions = commons.DownloadOptions.Metadata;
2904 var _body = null; 2943 var _body = null;
2905 2944
2906 if (fileId == null) { 2945 if (fileId == null) {
2907 throw new core.ArgumentError("Parameter fileId is required."); 2946 throw new core.ArgumentError("Parameter fileId is required.");
2908 } 2947 }
2909 if (propertyKey == null) { 2948 if (propertyKey == null) {
2910 throw new core.ArgumentError("Parameter propertyKey is required."); 2949 throw new core.ArgumentError("Parameter propertyKey is required.");
2911 } 2950 }
2912 if (visibility != null) { 2951 if (visibility != null) {
2913 _queryParams["visibility"] = [visibility]; 2952 _queryParams["visibility"] = [visibility];
2914 } 2953 }
2915 2954
2916 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey'); 2955 _url = 'files/' +
2956 commons.Escaper.ecapeVariable('$fileId') +
2957 '/properties/' +
2958 commons.Escaper.ecapeVariable('$propertyKey');
2917 2959
2918 var _response = _requester.request(_url, 2960 var _response = _requester.request(_url, "GET",
2919 "GET", 2961 body: _body,
2920 body: _body, 2962 queryParams: _queryParams,
2921 queryParams: _queryParams, 2963 uploadOptions: _uploadOptions,
2922 uploadOptions: _uploadOptions, 2964 uploadMedia: _uploadMedia,
2923 uploadMedia: _uploadMedia, 2965 downloadOptions: _downloadOptions);
2924 downloadOptions: _downloadOptions);
2925 return _response.then((data) => new Property.fromJson(data)); 2966 return _response.then((data) => new Property.fromJson(data));
2926 } 2967 }
2927 2968
2928 /** 2969 /// Adds a property to a file, or updates it if it already exists.
2929 * Adds a property to a file, or updates it if it already exists. 2970 ///
2930 * 2971 /// [request] - The metadata request object.
2931 * [request] - The metadata request object. 2972 ///
2932 * 2973 /// Request parameters:
2933 * Request parameters: 2974 ///
2934 * 2975 /// [fileId] - The ID of the file.
2935 * [fileId] - The ID of the file. 2976 ///
2936 * 2977 /// Completes with a [Property].
2937 * Completes with a [Property]. 2978 ///
2938 * 2979 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2939 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2980 /// an error.
2940 * error. 2981 ///
2941 * 2982 /// If the used [http.Client] completes with an error when making a REST
2942 * If the used [http.Client] completes with an error when making a REST call, 2983 /// call, this method will complete with the same error.
2943 * this method will complete with the same error.
2944 */
2945 async.Future<Property> insert(Property request, core.String fileId) { 2984 async.Future<Property> insert(Property request, core.String fileId) {
2946 var _url = null; 2985 var _url = null;
2947 var _queryParams = new core.Map(); 2986 var _queryParams = new core.Map();
2948 var _uploadMedia = null; 2987 var _uploadMedia = null;
2949 var _uploadOptions = null; 2988 var _uploadOptions = null;
2950 var _downloadOptions = commons.DownloadOptions.Metadata; 2989 var _downloadOptions = commons.DownloadOptions.Metadata;
2951 var _body = null; 2990 var _body = null;
2952 2991
2953 if (request != null) { 2992 if (request != null) {
2954 _body = convert_1.JSON.encode((request).toJson()); 2993 _body = convert_1.JSON.encode((request).toJson());
2955 } 2994 }
2956 if (fileId == null) { 2995 if (fileId == null) {
2957 throw new core.ArgumentError("Parameter fileId is required."); 2996 throw new core.ArgumentError("Parameter fileId is required.");
2958 } 2997 }
2959 2998
2960 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties'; 2999 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties';
2961 3000
2962 var _response = _requester.request(_url, 3001 var _response = _requester.request(_url, "POST",
2963 "POST", 3002 body: _body,
2964 body: _body, 3003 queryParams: _queryParams,
2965 queryParams: _queryParams, 3004 uploadOptions: _uploadOptions,
2966 uploadOptions: _uploadOptions, 3005 uploadMedia: _uploadMedia,
2967 uploadMedia: _uploadMedia, 3006 downloadOptions: _downloadOptions);
2968 downloadOptions: _downloadOptions);
2969 return _response.then((data) => new Property.fromJson(data)); 3007 return _response.then((data) => new Property.fromJson(data));
2970 } 3008 }
2971 3009
2972 /** 3010 /// Lists a file's properties.
2973 * Lists a file's properties. 3011 ///
2974 * 3012 /// Request parameters:
2975 * Request parameters: 3013 ///
2976 * 3014 /// [fileId] - The ID of the file.
2977 * [fileId] - The ID of the file. 3015 ///
2978 * 3016 /// Completes with a [PropertyList].
2979 * Completes with a [PropertyList]. 3017 ///
2980 * 3018 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2981 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3019 /// an error.
2982 * error. 3020 ///
2983 * 3021 /// If the used [http.Client] completes with an error when making a REST
2984 * If the used [http.Client] completes with an error when making a REST call, 3022 /// call, this method will complete with the same error.
2985 * this method will complete with the same error.
2986 */
2987 async.Future<PropertyList> list(core.String fileId) { 3023 async.Future<PropertyList> list(core.String fileId) {
2988 var _url = null; 3024 var _url = null;
2989 var _queryParams = new core.Map(); 3025 var _queryParams = new core.Map();
2990 var _uploadMedia = null; 3026 var _uploadMedia = null;
2991 var _uploadOptions = null; 3027 var _uploadOptions = null;
2992 var _downloadOptions = commons.DownloadOptions.Metadata; 3028 var _downloadOptions = commons.DownloadOptions.Metadata;
2993 var _body = null; 3029 var _body = null;
2994 3030
2995 if (fileId == null) { 3031 if (fileId == null) {
2996 throw new core.ArgumentError("Parameter fileId is required."); 3032 throw new core.ArgumentError("Parameter fileId is required.");
2997 } 3033 }
2998 3034
2999 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties'; 3035 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties';
3000 3036
3001 var _response = _requester.request(_url, 3037 var _response = _requester.request(_url, "GET",
3002 "GET", 3038 body: _body,
3003 body: _body, 3039 queryParams: _queryParams,
3004 queryParams: _queryParams, 3040 uploadOptions: _uploadOptions,
3005 uploadOptions: _uploadOptions, 3041 uploadMedia: _uploadMedia,
3006 uploadMedia: _uploadMedia, 3042 downloadOptions: _downloadOptions);
3007 downloadOptions: _downloadOptions);
3008 return _response.then((data) => new PropertyList.fromJson(data)); 3043 return _response.then((data) => new PropertyList.fromJson(data));
3009 } 3044 }
3010 3045
3011 /** 3046 /// Updates a property, or adds it if it doesn't exist. This method supports
3012 * Updates a property, or adds it if it doesn't exist. This method supports 3047 /// patch semantics.
3013 * patch semantics. 3048 ///
3014 * 3049 /// [request] - The metadata request object.
3015 * [request] - The metadata request object. 3050 ///
3016 * 3051 /// Request parameters:
3017 * Request parameters: 3052 ///
3018 * 3053 /// [fileId] - The ID of the file.
3019 * [fileId] - The ID of the file. 3054 ///
3020 * 3055 /// [propertyKey] - The key of the property.
3021 * [propertyKey] - The key of the property. 3056 ///
3022 * 3057 /// [visibility] - The visibility of the property.
3023 * [visibility] - The visibility of the property. 3058 ///
3024 * 3059 /// Completes with a [Property].
3025 * Completes with a [Property]. 3060 ///
3026 * 3061 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3027 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3062 /// an error.
3028 * error. 3063 ///
3029 * 3064 /// If the used [http.Client] completes with an error when making a REST
3030 * If the used [http.Client] completes with an error when making a REST call, 3065 /// call, this method will complete with the same error.
3031 * this method will complete with the same error. 3066 async.Future<Property> patch(
3032 */ 3067 Property request, core.String fileId, core.String propertyKey,
3033 async.Future<Property> patch(Property request, core.String fileId, core.String propertyKey, {core.String visibility}) { 3068 {core.String visibility}) {
3034 var _url = null; 3069 var _url = null;
3035 var _queryParams = new core.Map(); 3070 var _queryParams = new core.Map();
3036 var _uploadMedia = null; 3071 var _uploadMedia = null;
3037 var _uploadOptions = null; 3072 var _uploadOptions = null;
3038 var _downloadOptions = commons.DownloadOptions.Metadata; 3073 var _downloadOptions = commons.DownloadOptions.Metadata;
3039 var _body = null; 3074 var _body = null;
3040 3075
3041 if (request != null) { 3076 if (request != null) {
3042 _body = convert_1.JSON.encode((request).toJson()); 3077 _body = convert_1.JSON.encode((request).toJson());
3043 } 3078 }
3044 if (fileId == null) { 3079 if (fileId == null) {
3045 throw new core.ArgumentError("Parameter fileId is required."); 3080 throw new core.ArgumentError("Parameter fileId is required.");
3046 } 3081 }
3047 if (propertyKey == null) { 3082 if (propertyKey == null) {
3048 throw new core.ArgumentError("Parameter propertyKey is required."); 3083 throw new core.ArgumentError("Parameter propertyKey is required.");
3049 } 3084 }
3050 if (visibility != null) { 3085 if (visibility != null) {
3051 _queryParams["visibility"] = [visibility]; 3086 _queryParams["visibility"] = [visibility];
3052 } 3087 }
3053 3088
3054 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey'); 3089 _url = 'files/' +
3090 commons.Escaper.ecapeVariable('$fileId') +
3091 '/properties/' +
3092 commons.Escaper.ecapeVariable('$propertyKey');
3055 3093
3056 var _response = _requester.request(_url, 3094 var _response = _requester.request(_url, "PATCH",
3057 "PATCH", 3095 body: _body,
3058 body: _body, 3096 queryParams: _queryParams,
3059 queryParams: _queryParams, 3097 uploadOptions: _uploadOptions,
3060 uploadOptions: _uploadOptions, 3098 uploadMedia: _uploadMedia,
3061 uploadMedia: _uploadMedia, 3099 downloadOptions: _downloadOptions);
3062 downloadOptions: _downloadOptions);
3063 return _response.then((data) => new Property.fromJson(data)); 3100 return _response.then((data) => new Property.fromJson(data));
3064 } 3101 }
3065 3102
3066 /** 3103 /// Updates a property, or adds it if it doesn't exist.
3067 * Updates a property, or adds it if it doesn't exist. 3104 ///
3068 * 3105 /// [request] - The metadata request object.
3069 * [request] - The metadata request object. 3106 ///
3070 * 3107 /// Request parameters:
3071 * Request parameters: 3108 ///
3072 * 3109 /// [fileId] - The ID of the file.
3073 * [fileId] - The ID of the file. 3110 ///
3074 * 3111 /// [propertyKey] - The key of the property.
3075 * [propertyKey] - The key of the property. 3112 ///
3076 * 3113 /// [visibility] - The visibility of the property.
3077 * [visibility] - The visibility of the property. 3114 ///
3078 * 3115 /// Completes with a [Property].
3079 * Completes with a [Property]. 3116 ///
3080 * 3117 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3081 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3118 /// an error.
3082 * error. 3119 ///
3083 * 3120 /// If the used [http.Client] completes with an error when making a REST
3084 * If the used [http.Client] completes with an error when making a REST call, 3121 /// call, this method will complete with the same error.
3085 * this method will complete with the same error. 3122 async.Future<Property> update(
3086 */ 3123 Property request, core.String fileId, core.String propertyKey,
3087 async.Future<Property> update(Property request, core.String fileId, core.Strin g propertyKey, {core.String visibility}) { 3124 {core.String visibility}) {
3088 var _url = null; 3125 var _url = null;
3089 var _queryParams = new core.Map(); 3126 var _queryParams = new core.Map();
3090 var _uploadMedia = null; 3127 var _uploadMedia = null;
3091 var _uploadOptions = null; 3128 var _uploadOptions = null;
3092 var _downloadOptions = commons.DownloadOptions.Metadata; 3129 var _downloadOptions = commons.DownloadOptions.Metadata;
3093 var _body = null; 3130 var _body = null;
3094 3131
3095 if (request != null) { 3132 if (request != null) {
3096 _body = convert_1.JSON.encode((request).toJson()); 3133 _body = convert_1.JSON.encode((request).toJson());
3097 } 3134 }
3098 if (fileId == null) { 3135 if (fileId == null) {
3099 throw new core.ArgumentError("Parameter fileId is required."); 3136 throw new core.ArgumentError("Parameter fileId is required.");
3100 } 3137 }
3101 if (propertyKey == null) { 3138 if (propertyKey == null) {
3102 throw new core.ArgumentError("Parameter propertyKey is required."); 3139 throw new core.ArgumentError("Parameter propertyKey is required.");
3103 } 3140 }
3104 if (visibility != null) { 3141 if (visibility != null) {
3105 _queryParams["visibility"] = [visibility]; 3142 _queryParams["visibility"] = [visibility];
3106 } 3143 }
3107 3144
3108 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/properties/' + commons.Escaper.ecapeVariable('$propertyKey'); 3145 _url = 'files/' +
3146 commons.Escaper.ecapeVariable('$fileId') +
3147 '/properties/' +
3148 commons.Escaper.ecapeVariable('$propertyKey');
3109 3149
3110 var _response = _requester.request(_url, 3150 var _response = _requester.request(_url, "PUT",
3111 "PUT", 3151 body: _body,
3112 body: _body, 3152 queryParams: _queryParams,
3113 queryParams: _queryParams, 3153 uploadOptions: _uploadOptions,
3114 uploadOptions: _uploadOptions, 3154 uploadMedia: _uploadMedia,
3115 uploadMedia: _uploadMedia, 3155 downloadOptions: _downloadOptions);
3116 downloadOptions: _downloadOptions);
3117 return _response.then((data) => new Property.fromJson(data)); 3156 return _response.then((data) => new Property.fromJson(data));
3118 } 3157 }
3119
3120 } 3158 }
3121 3159
3122
3123 class RealtimeResourceApi { 3160 class RealtimeResourceApi {
3124 final commons.ApiRequester _requester; 3161 final commons.ApiRequester _requester;
3125 3162
3126 RealtimeResourceApi(commons.ApiRequester client) : 3163 RealtimeResourceApi(commons.ApiRequester client) : _requester = client;
3127 _requester = client;
3128 3164
3129 /** 3165 /// Exports the contents of the Realtime API data model associated with this
3130 * Exports the contents of the Realtime API data model associated with this 3166 /// file as JSON.
3131 * file as JSON. 3167 ///
3132 * 3168 /// Request parameters:
3133 * Request parameters: 3169 ///
3134 * 3170 /// [fileId] - The ID of the file that the Realtime API data model is
3135 * [fileId] - The ID of the file that the Realtime API data model is 3171 /// associated with.
3136 * associated with. 3172 ///
3137 * 3173 /// [revision] - The revision of the Realtime API data model to export.
3138 * [revision] - The revision of the Realtime API data model to export. 3174 /// Revisions start at 1 (the initial empty data model) and are incremented
3139 * Revisions start at 1 (the initial empty data model) and are incremented 3175 /// with each change. If this parameter is excluded, the most recent data
3140 * with each change. If this parameter is excluded, the most recent data model 3176 /// model will be returned.
3141 * will be returned. 3177 ///
3142 * 3178 /// [downloadOptions] - Options for downloading. A download can be either a
3143 * [downloadOptions] - Options for downloading. A download can be either a 3179 /// Metadata (default) or Media download. Partial Media downloads are
3144 * Metadata (default) or Media download. Partial Media downloads are possible 3180 /// possible as well.
3145 * as well. 3181 ///
3146 * 3182 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3183 /// an error.
3148 * error. 3184 ///
3149 * 3185 /// If the used [http.Client] completes with an error when making a REST
3150 * If the used [http.Client] completes with an error when making a REST call, 3186 /// call, this method will complete with the same error.
3151 * this method will complete with the same error. 3187 async.Future get(core.String fileId,
3152 */ 3188 {core.int revision,
3153 async.Future get(core.String fileId, {core.int revision, commons.DownloadOptio ns downloadOptions: commons.DownloadOptions.Metadata}) { 3189 commons.DownloadOptions downloadOptions:
3190 commons.DownloadOptions.Metadata}) {
3154 var _url = null; 3191 var _url = null;
3155 var _queryParams = new core.Map(); 3192 var _queryParams = new core.Map();
3156 var _uploadMedia = null; 3193 var _uploadMedia = null;
3157 var _uploadOptions = null; 3194 var _uploadOptions = null;
3158 var _downloadOptions = commons.DownloadOptions.Metadata; 3195 var _downloadOptions = commons.DownloadOptions.Metadata;
3159 var _body = null; 3196 var _body = null;
3160 3197
3161 if (fileId == null) { 3198 if (fileId == null) {
3162 throw new core.ArgumentError("Parameter fileId is required."); 3199 throw new core.ArgumentError("Parameter fileId is required.");
3163 } 3200 }
3164 if (revision != null) { 3201 if (revision != null) {
3165 _queryParams["revision"] = ["${revision}"]; 3202 _queryParams["revision"] = ["${revision}"];
3166 } 3203 }
3167 3204
3168 _downloadOptions = downloadOptions; 3205 _downloadOptions = downloadOptions;
3169 3206
3170 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/realtime'; 3207 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/realtime';
3171 3208
3172 var _response = _requester.request(_url, 3209 var _response = _requester.request(_url, "GET",
3173 "GET", 3210 body: _body,
3174 body: _body, 3211 queryParams: _queryParams,
3175 queryParams: _queryParams, 3212 uploadOptions: _uploadOptions,
3176 uploadOptions: _uploadOptions, 3213 uploadMedia: _uploadMedia,
3177 uploadMedia: _uploadMedia, 3214 downloadOptions: _downloadOptions);
3178 downloadOptions: _downloadOptions);
3179 if (_downloadOptions == null || 3215 if (_downloadOptions == null ||
3180 _downloadOptions == commons.DownloadOptions.Metadata) { 3216 _downloadOptions == commons.DownloadOptions.Metadata) {
3181 return _response.then((data) => null); 3217 return _response.then((data) => null);
3182 } else { 3218 } else {
3183 return _response; 3219 return _response;
3184 } 3220 }
3185 } 3221 }
3186 3222
3187 /** 3223 /// Overwrites the Realtime API data model associated with this file with the
3188 * Overwrites the Realtime API data model associated with this file with the 3224 /// provided JSON data model.
3189 * provided JSON data model. 3225 ///
3190 * 3226 /// Request parameters:
3191 * Request parameters: 3227 ///
3192 * 3228 /// [fileId] - The ID of the file that the Realtime API data model is
3193 * [fileId] - The ID of the file that the Realtime API data model is 3229 /// associated with.
3194 * associated with. 3230 ///
3195 * 3231 /// [baseRevision] - The revision of the model to diff the uploaded model
3196 * [baseRevision] - The revision of the model to diff the uploaded model 3232 /// against. If set, the uploaded model is diffed against the provided
3197 * against. If set, the uploaded model is diffed against the provided revision 3233 /// revision and those differences are merged with any changes made to the
3198 * and those differences are merged with any changes made to the model after 3234 /// model after the provided revision. If not set, the uploaded model
3199 * the provided revision. If not set, the uploaded model replaces the current 3235 /// replaces the current model on the server.
3200 * model on the server. 3236 ///
3201 * 3237 /// [uploadMedia] - The media to upload.
3202 * [uploadMedia] - The media to upload. 3238 ///
3203 * 3239 /// [uploadOptions] - Options for the media upload. Streaming Media without
3204 * [uploadOptions] - Options for the media upload. Streaming Media without the 3240 /// the length being known ahead of time is only supported via resumable
3205 * length being known ahead of time is only supported via resumable uploads. 3241 /// uploads.
3206 * 3242 ///
3207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3243 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3208 * error. 3244 /// an error.
3209 * 3245 ///
3210 * If the used [http.Client] completes with an error when making a REST call, 3246 /// If the used [http.Client] completes with an error when making a REST
3211 * this method will complete with the same error. 3247 /// call, this method will complete with the same error.
3212 */ 3248 async.Future update(core.String fileId,
3213 async.Future update(core.String fileId, {core.String baseRevision, commons.Upl oadOptions uploadOptions : commons.UploadOptions.Default, commons.Media uploadMe dia}) { 3249 {core.String baseRevision,
3250 commons.UploadOptions uploadOptions: commons.UploadOptions.Default,
3251 commons.Media uploadMedia}) {
3214 var _url = null; 3252 var _url = null;
3215 var _queryParams = new core.Map(); 3253 var _queryParams = new core.Map();
3216 var _uploadMedia = null; 3254 var _uploadMedia = null;
3217 var _uploadOptions = null; 3255 var _uploadOptions = null;
3218 var _downloadOptions = commons.DownloadOptions.Metadata; 3256 var _downloadOptions = commons.DownloadOptions.Metadata;
3219 var _body = null; 3257 var _body = null;
3220 3258
3221 if (fileId == null) { 3259 if (fileId == null) {
3222 throw new core.ArgumentError("Parameter fileId is required."); 3260 throw new core.ArgumentError("Parameter fileId is required.");
3223 } 3261 }
3224 if (baseRevision != null) { 3262 if (baseRevision != null) {
3225 _queryParams["baseRevision"] = [baseRevision]; 3263 _queryParams["baseRevision"] = [baseRevision];
3226 } 3264 }
3227 3265
3228 3266 _uploadMedia = uploadMedia;
3229 _uploadMedia = uploadMedia; 3267 _uploadOptions = uploadOptions;
3230 _uploadOptions = uploadOptions;
3231 _downloadOptions = null; 3268 _downloadOptions = null;
3232 3269
3233 if (_uploadMedia == null) { 3270 if (_uploadMedia == null) {
3234 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/realtime'; 3271 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/realtime';
3235 } else if (_uploadOptions is commons.ResumableUploadOptions) { 3272 } else if (_uploadOptions is commons.ResumableUploadOptions) {
3236 _url = '/resumable/upload/drive/v2/files/' + commons.Escaper.ecapeVariable ('$fileId') + '/realtime'; 3273 _url = '/resumable/upload/drive/v2/files/' +
3274 commons.Escaper.ecapeVariable('$fileId') +
3275 '/realtime';
3237 } else { 3276 } else {
3238 _url = '/upload/drive/v2/files/' + commons.Escaper.ecapeVariable('$fileId' ) + '/realtime'; 3277 _url = '/upload/drive/v2/files/' +
3278 commons.Escaper.ecapeVariable('$fileId') +
3279 '/realtime';
3239 } 3280 }
3240 3281
3241 3282 var _response = _requester.request(_url, "PUT",
3242 var _response = _requester.request(_url, 3283 body: _body,
3243 "PUT", 3284 queryParams: _queryParams,
3244 body: _body, 3285 uploadOptions: _uploadOptions,
3245 queryParams: _queryParams, 3286 uploadMedia: _uploadMedia,
3246 uploadOptions: _uploadOptions, 3287 downloadOptions: _downloadOptions);
3247 uploadMedia: _uploadMedia,
3248 downloadOptions: _downloadOptions);
3249 return _response.then((data) => null); 3288 return _response.then((data) => null);
3250 } 3289 }
3251
3252 } 3290 }
3253 3291
3254
3255 class RepliesResourceApi { 3292 class RepliesResourceApi {
3256 final commons.ApiRequester _requester; 3293 final commons.ApiRequester _requester;
3257 3294
3258 RepliesResourceApi(commons.ApiRequester client) : 3295 RepliesResourceApi(commons.ApiRequester client) : _requester = client;
3259 _requester = client;
3260 3296
3261 /** 3297 /// Deletes a reply.
3262 * Deletes a reply. 3298 ///
3263 * 3299 /// Request parameters:
3264 * Request parameters: 3300 ///
3265 * 3301 /// [fileId] - The ID of the file.
3266 * [fileId] - The ID of the file. 3302 ///
3267 * 3303 /// [commentId] - The ID of the comment.
3268 * [commentId] - The ID of the comment. 3304 ///
3269 * 3305 /// [replyId] - The ID of the reply.
3270 * [replyId] - The ID of the reply. 3306 ///
3271 * 3307 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3272 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3308 /// an error.
3273 * error. 3309 ///
3274 * 3310 /// If the used [http.Client] completes with an error when making a REST
3275 * If the used [http.Client] completes with an error when making a REST call, 3311 /// call, this method will complete with the same error.
3276 * this method will complete with the same error. 3312 async.Future delete(
3277 */ 3313 core.String fileId, core.String commentId, core.String replyId) {
3278 async.Future delete(core.String fileId, core.String commentId, core.String rep lyId) {
3279 var _url = null; 3314 var _url = null;
3280 var _queryParams = new core.Map(); 3315 var _queryParams = new core.Map();
3281 var _uploadMedia = null; 3316 var _uploadMedia = null;
3282 var _uploadOptions = null; 3317 var _uploadOptions = null;
3283 var _downloadOptions = commons.DownloadOptions.Metadata; 3318 var _downloadOptions = commons.DownloadOptions.Metadata;
3284 var _body = null; 3319 var _body = null;
3285 3320
3286 if (fileId == null) { 3321 if (fileId == null) {
3287 throw new core.ArgumentError("Parameter fileId is required."); 3322 throw new core.ArgumentError("Parameter fileId is required.");
3288 } 3323 }
3289 if (commentId == null) { 3324 if (commentId == null) {
3290 throw new core.ArgumentError("Parameter commentId is required."); 3325 throw new core.ArgumentError("Parameter commentId is required.");
3291 } 3326 }
3292 if (replyId == null) { 3327 if (replyId == null) {
3293 throw new core.ArgumentError("Parameter replyId is required."); 3328 throw new core.ArgumentError("Parameter replyId is required.");
3294 } 3329 }
3295 3330
3296 _downloadOptions = null; 3331 _downloadOptions = null;
3297 3332
3298 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId'); 3333 _url = 'files/' +
3334 commons.Escaper.ecapeVariable('$fileId') +
3335 '/comments/' +
3336 commons.Escaper.ecapeVariable('$commentId') +
3337 '/replies/' +
3338 commons.Escaper.ecapeVariable('$replyId');
3299 3339
3300 var _response = _requester.request(_url, 3340 var _response = _requester.request(_url, "DELETE",
3301 "DELETE", 3341 body: _body,
3302 body: _body, 3342 queryParams: _queryParams,
3303 queryParams: _queryParams, 3343 uploadOptions: _uploadOptions,
3304 uploadOptions: _uploadOptions, 3344 uploadMedia: _uploadMedia,
3305 uploadMedia: _uploadMedia, 3345 downloadOptions: _downloadOptions);
3306 downloadOptions: _downloadOptions);
3307 return _response.then((data) => null); 3346 return _response.then((data) => null);
3308 } 3347 }
3309 3348
3310 /** 3349 /// Gets a reply.
3311 * Gets a reply. 3350 ///
3312 * 3351 /// Request parameters:
3313 * Request parameters: 3352 ///
3314 * 3353 /// [fileId] - The ID of the file.
3315 * [fileId] - The ID of the file. 3354 ///
3316 * 3355 /// [commentId] - The ID of the comment.
3317 * [commentId] - The ID of the comment. 3356 ///
3318 * 3357 /// [replyId] - The ID of the reply.
3319 * [replyId] - The ID of the reply. 3358 ///
3320 * 3359 /// [includeDeleted] - If set, this will succeed when retrieving a deleted
3321 * [includeDeleted] - If set, this will succeed when retrieving a deleted 3360 /// reply.
3322 * reply. 3361 ///
3323 * 3362 /// Completes with a [CommentReply].
3324 * Completes with a [CommentReply]. 3363 ///
3325 * 3364 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3326 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3365 /// an error.
3327 * error. 3366 ///
3328 * 3367 /// If the used [http.Client] completes with an error when making a REST
3329 * If the used [http.Client] completes with an error when making a REST call, 3368 /// call, this method will complete with the same error.
3330 * this method will complete with the same error. 3369 async.Future<CommentReply> get(
3331 */ 3370 core.String fileId, core.String commentId, core.String replyId,
3332 async.Future<CommentReply> get(core.String fileId, core.String commentId, core .String replyId, {core.bool includeDeleted}) { 3371 {core.bool includeDeleted}) {
3333 var _url = null; 3372 var _url = null;
3334 var _queryParams = new core.Map(); 3373 var _queryParams = new core.Map();
3335 var _uploadMedia = null; 3374 var _uploadMedia = null;
3336 var _uploadOptions = null; 3375 var _uploadOptions = null;
3337 var _downloadOptions = commons.DownloadOptions.Metadata; 3376 var _downloadOptions = commons.DownloadOptions.Metadata;
3338 var _body = null; 3377 var _body = null;
3339 3378
3340 if (fileId == null) { 3379 if (fileId == null) {
3341 throw new core.ArgumentError("Parameter fileId is required."); 3380 throw new core.ArgumentError("Parameter fileId is required.");
3342 } 3381 }
3343 if (commentId == null) { 3382 if (commentId == null) {
3344 throw new core.ArgumentError("Parameter commentId is required."); 3383 throw new core.ArgumentError("Parameter commentId is required.");
3345 } 3384 }
3346 if (replyId == null) { 3385 if (replyId == null) {
3347 throw new core.ArgumentError("Parameter replyId is required."); 3386 throw new core.ArgumentError("Parameter replyId is required.");
3348 } 3387 }
3349 if (includeDeleted != null) { 3388 if (includeDeleted != null) {
3350 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 3389 _queryParams["includeDeleted"] = ["${includeDeleted}"];
3351 } 3390 }
3352 3391
3353 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId'); 3392 _url = 'files/' +
3393 commons.Escaper.ecapeVariable('$fileId') +
3394 '/comments/' +
3395 commons.Escaper.ecapeVariable('$commentId') +
3396 '/replies/' +
3397 commons.Escaper.ecapeVariable('$replyId');
3354 3398
3355 var _response = _requester.request(_url, 3399 var _response = _requester.request(_url, "GET",
3356 "GET", 3400 body: _body,
3357 body: _body, 3401 queryParams: _queryParams,
3358 queryParams: _queryParams, 3402 uploadOptions: _uploadOptions,
3359 uploadOptions: _uploadOptions, 3403 uploadMedia: _uploadMedia,
3360 uploadMedia: _uploadMedia, 3404 downloadOptions: _downloadOptions);
3361 downloadOptions: _downloadOptions);
3362 return _response.then((data) => new CommentReply.fromJson(data)); 3405 return _response.then((data) => new CommentReply.fromJson(data));
3363 } 3406 }
3364 3407
3365 /** 3408 /// Creates a new reply to the given comment.
3366 * Creates a new reply to the given comment. 3409 ///
3367 * 3410 /// [request] - The metadata request object.
3368 * [request] - The metadata request object. 3411 ///
3369 * 3412 /// Request parameters:
3370 * Request parameters: 3413 ///
3371 * 3414 /// [fileId] - The ID of the file.
3372 * [fileId] - The ID of the file. 3415 ///
3373 * 3416 /// [commentId] - The ID of the comment.
3374 * [commentId] - The ID of the comment. 3417 ///
3375 * 3418 /// Completes with a [CommentReply].
3376 * Completes with a [CommentReply]. 3419 ///
3377 * 3420 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3378 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3421 /// an error.
3379 * error. 3422 ///
3380 * 3423 /// If the used [http.Client] completes with an error when making a REST
3381 * If the used [http.Client] completes with an error when making a REST call, 3424 /// call, this method will complete with the same error.
3382 * this method will complete with the same error. 3425 async.Future<CommentReply> insert(
3383 */ 3426 CommentReply request, core.String fileId, core.String commentId) {
3384 async.Future<CommentReply> insert(CommentReply request, core.String fileId, co re.String commentId) {
3385 var _url = null; 3427 var _url = null;
3386 var _queryParams = new core.Map(); 3428 var _queryParams = new core.Map();
3387 var _uploadMedia = null; 3429 var _uploadMedia = null;
3388 var _uploadOptions = null; 3430 var _uploadOptions = null;
3389 var _downloadOptions = commons.DownloadOptions.Metadata; 3431 var _downloadOptions = commons.DownloadOptions.Metadata;
3390 var _body = null; 3432 var _body = null;
3391 3433
3392 if (request != null) { 3434 if (request != null) {
3393 _body = convert_1.JSON.encode((request).toJson()); 3435 _body = convert_1.JSON.encode((request).toJson());
3394 } 3436 }
3395 if (fileId == null) { 3437 if (fileId == null) {
3396 throw new core.ArgumentError("Parameter fileId is required."); 3438 throw new core.ArgumentError("Parameter fileId is required.");
3397 } 3439 }
3398 if (commentId == null) { 3440 if (commentId == null) {
3399 throw new core.ArgumentError("Parameter commentId is required."); 3441 throw new core.ArgumentError("Parameter commentId is required.");
3400 } 3442 }
3401 3443
3402 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies'; 3444 _url = 'files/' +
3445 commons.Escaper.ecapeVariable('$fileId') +
3446 '/comments/' +
3447 commons.Escaper.ecapeVariable('$commentId') +
3448 '/replies';
3403 3449
3404 var _response = _requester.request(_url, 3450 var _response = _requester.request(_url, "POST",
3405 "POST", 3451 body: _body,
3406 body: _body, 3452 queryParams: _queryParams,
3407 queryParams: _queryParams, 3453 uploadOptions: _uploadOptions,
3408 uploadOptions: _uploadOptions, 3454 uploadMedia: _uploadMedia,
3409 uploadMedia: _uploadMedia, 3455 downloadOptions: _downloadOptions);
3410 downloadOptions: _downloadOptions);
3411 return _response.then((data) => new CommentReply.fromJson(data)); 3456 return _response.then((data) => new CommentReply.fromJson(data));
3412 } 3457 }
3413 3458
3414 /** 3459 /// Lists all of the replies to a comment.
3415 * Lists all of the replies to a comment. 3460 ///
3416 * 3461 /// Request parameters:
3417 * Request parameters: 3462 ///
3418 * 3463 /// [fileId] - The ID of the file.
3419 * [fileId] - The ID of the file. 3464 ///
3420 * 3465 /// [commentId] - The ID of the comment.
3421 * [commentId] - The ID of the comment. 3466 ///
3422 * 3467 /// [includeDeleted] - If set, all replies, including deleted replies (with
3423 * [includeDeleted] - If set, all replies, including deleted replies (with 3468 /// content stripped) will be returned.
3424 * content stripped) will be returned. 3469 ///
3425 * 3470 /// [maxResults] - The maximum number of replies to include in the response,
3426 * [maxResults] - The maximum number of replies to include in the response, 3471 /// used for paging.
3427 * used for paging. 3472 /// Value must be between "0" and "100".
3428 * Value must be between "0" and "100". 3473 ///
3429 * 3474 /// [pageToken] - The continuation token, used to page through large result
3430 * [pageToken] - The continuation token, used to page through large result 3475 /// sets. To get the next page of results, set this parameter to the value of
3431 * sets. To get the next page of results, set this parameter to the value of 3476 /// "nextPageToken" from the previous response.
3432 * "nextPageToken" from the previous response. 3477 ///
3433 * 3478 /// Completes with a [CommentReplyList].
3434 * Completes with a [CommentReplyList]. 3479 ///
3435 * 3480 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3436 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3481 /// an error.
3437 * error. 3482 ///
3438 * 3483 /// If the used [http.Client] completes with an error when making a REST
3439 * If the used [http.Client] completes with an error when making a REST call, 3484 /// call, this method will complete with the same error.
3440 * this method will complete with the same error. 3485 async.Future<CommentReplyList> list(core.String fileId, core.String commentId,
3441 */ 3486 {core.bool includeDeleted, core.int maxResults, core.String pageToken}) {
3442 async.Future<CommentReplyList> list(core.String fileId, core.String commentId, {core.bool includeDeleted, core.int maxResults, core.String pageToken}) {
3443 var _url = null; 3487 var _url = null;
3444 var _queryParams = new core.Map(); 3488 var _queryParams = new core.Map();
3445 var _uploadMedia = null; 3489 var _uploadMedia = null;
3446 var _uploadOptions = null; 3490 var _uploadOptions = null;
3447 var _downloadOptions = commons.DownloadOptions.Metadata; 3491 var _downloadOptions = commons.DownloadOptions.Metadata;
3448 var _body = null; 3492 var _body = null;
3449 3493
3450 if (fileId == null) { 3494 if (fileId == null) {
3451 throw new core.ArgumentError("Parameter fileId is required."); 3495 throw new core.ArgumentError("Parameter fileId is required.");
3452 } 3496 }
3453 if (commentId == null) { 3497 if (commentId == null) {
3454 throw new core.ArgumentError("Parameter commentId is required."); 3498 throw new core.ArgumentError("Parameter commentId is required.");
3455 } 3499 }
3456 if (includeDeleted != null) { 3500 if (includeDeleted != null) {
3457 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 3501 _queryParams["includeDeleted"] = ["${includeDeleted}"];
3458 } 3502 }
3459 if (maxResults != null) { 3503 if (maxResults != null) {
3460 _queryParams["maxResults"] = ["${maxResults}"]; 3504 _queryParams["maxResults"] = ["${maxResults}"];
3461 } 3505 }
3462 if (pageToken != null) { 3506 if (pageToken != null) {
3463 _queryParams["pageToken"] = [pageToken]; 3507 _queryParams["pageToken"] = [pageToken];
3464 } 3508 }
3465 3509
3466 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies'; 3510 _url = 'files/' +
3511 commons.Escaper.ecapeVariable('$fileId') +
3512 '/comments/' +
3513 commons.Escaper.ecapeVariable('$commentId') +
3514 '/replies';
3467 3515
3468 var _response = _requester.request(_url, 3516 var _response = _requester.request(_url, "GET",
3469 "GET", 3517 body: _body,
3470 body: _body, 3518 queryParams: _queryParams,
3471 queryParams: _queryParams, 3519 uploadOptions: _uploadOptions,
3472 uploadOptions: _uploadOptions, 3520 uploadMedia: _uploadMedia,
3473 uploadMedia: _uploadMedia, 3521 downloadOptions: _downloadOptions);
3474 downloadOptions: _downloadOptions);
3475 return _response.then((data) => new CommentReplyList.fromJson(data)); 3522 return _response.then((data) => new CommentReplyList.fromJson(data));
3476 } 3523 }
3477 3524
3478 /** 3525 /// Updates an existing reply. This method supports patch semantics.
3479 * Updates an existing reply. This method supports patch semantics. 3526 ///
3480 * 3527 /// [request] - The metadata request object.
3481 * [request] - The metadata request object. 3528 ///
3482 * 3529 /// Request parameters:
3483 * Request parameters: 3530 ///
3484 * 3531 /// [fileId] - The ID of the file.
3485 * [fileId] - The ID of the file. 3532 ///
3486 * 3533 /// [commentId] - The ID of the comment.
3487 * [commentId] - The ID of the comment. 3534 ///
3488 * 3535 /// [replyId] - The ID of the reply.
3489 * [replyId] - The ID of the reply. 3536 ///
3490 * 3537 /// Completes with a [CommentReply].
3491 * Completes with a [CommentReply]. 3538 ///
3492 * 3539 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3493 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3540 /// an error.
3494 * error. 3541 ///
3495 * 3542 /// If the used [http.Client] completes with an error when making a REST
3496 * If the used [http.Client] completes with an error when making a REST call, 3543 /// call, this method will complete with the same error.
3497 * this method will complete with the same error. 3544 async.Future<CommentReply> patch(CommentReply request, core.String fileId,
3498 */ 3545 core.String commentId, core.String replyId) {
3499 async.Future<CommentReply> patch(CommentReply request, core.String fileId, cor e.String commentId, core.String replyId) {
3500 var _url = null; 3546 var _url = null;
3501 var _queryParams = new core.Map(); 3547 var _queryParams = new core.Map();
3502 var _uploadMedia = null; 3548 var _uploadMedia = null;
3503 var _uploadOptions = null; 3549 var _uploadOptions = null;
3504 var _downloadOptions = commons.DownloadOptions.Metadata; 3550 var _downloadOptions = commons.DownloadOptions.Metadata;
3505 var _body = null; 3551 var _body = null;
3506 3552
3507 if (request != null) { 3553 if (request != null) {
3508 _body = convert_1.JSON.encode((request).toJson()); 3554 _body = convert_1.JSON.encode((request).toJson());
3509 } 3555 }
3510 if (fileId == null) { 3556 if (fileId == null) {
3511 throw new core.ArgumentError("Parameter fileId is required."); 3557 throw new core.ArgumentError("Parameter fileId is required.");
3512 } 3558 }
3513 if (commentId == null) { 3559 if (commentId == null) {
3514 throw new core.ArgumentError("Parameter commentId is required."); 3560 throw new core.ArgumentError("Parameter commentId is required.");
3515 } 3561 }
3516 if (replyId == null) { 3562 if (replyId == null) {
3517 throw new core.ArgumentError("Parameter replyId is required."); 3563 throw new core.ArgumentError("Parameter replyId is required.");
3518 } 3564 }
3519 3565
3520 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId'); 3566 _url = 'files/' +
3567 commons.Escaper.ecapeVariable('$fileId') +
3568 '/comments/' +
3569 commons.Escaper.ecapeVariable('$commentId') +
3570 '/replies/' +
3571 commons.Escaper.ecapeVariable('$replyId');
3521 3572
3522 var _response = _requester.request(_url, 3573 var _response = _requester.request(_url, "PATCH",
3523 "PATCH", 3574 body: _body,
3524 body: _body, 3575 queryParams: _queryParams,
3525 queryParams: _queryParams, 3576 uploadOptions: _uploadOptions,
3526 uploadOptions: _uploadOptions, 3577 uploadMedia: _uploadMedia,
3527 uploadMedia: _uploadMedia, 3578 downloadOptions: _downloadOptions);
3528 downloadOptions: _downloadOptions);
3529 return _response.then((data) => new CommentReply.fromJson(data)); 3579 return _response.then((data) => new CommentReply.fromJson(data));
3530 } 3580 }
3531 3581
3532 /** 3582 /// Updates an existing reply.
3533 * Updates an existing reply. 3583 ///
3534 * 3584 /// [request] - The metadata request object.
3535 * [request] - The metadata request object. 3585 ///
3536 * 3586 /// Request parameters:
3537 * Request parameters: 3587 ///
3538 * 3588 /// [fileId] - The ID of the file.
3539 * [fileId] - The ID of the file. 3589 ///
3540 * 3590 /// [commentId] - The ID of the comment.
3541 * [commentId] - The ID of the comment. 3591 ///
3542 * 3592 /// [replyId] - The ID of the reply.
3543 * [replyId] - The ID of the reply. 3593 ///
3544 * 3594 /// Completes with a [CommentReply].
3545 * Completes with a [CommentReply]. 3595 ///
3546 * 3596 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3547 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3597 /// an error.
3548 * error. 3598 ///
3549 * 3599 /// If the used [http.Client] completes with an error when making a REST
3550 * If the used [http.Client] completes with an error when making a REST call, 3600 /// call, this method will complete with the same error.
3551 * this method will complete with the same error. 3601 async.Future<CommentReply> update(CommentReply request, core.String fileId,
3552 */ 3602 core.String commentId, core.String replyId) {
3553 async.Future<CommentReply> update(CommentReply request, core.String fileId, co re.String commentId, core.String replyId) {
3554 var _url = null; 3603 var _url = null;
3555 var _queryParams = new core.Map(); 3604 var _queryParams = new core.Map();
3556 var _uploadMedia = null; 3605 var _uploadMedia = null;
3557 var _uploadOptions = null; 3606 var _uploadOptions = null;
3558 var _downloadOptions = commons.DownloadOptions.Metadata; 3607 var _downloadOptions = commons.DownloadOptions.Metadata;
3559 var _body = null; 3608 var _body = null;
3560 3609
3561 if (request != null) { 3610 if (request != null) {
3562 _body = convert_1.JSON.encode((request).toJson()); 3611 _body = convert_1.JSON.encode((request).toJson());
3563 } 3612 }
3564 if (fileId == null) { 3613 if (fileId == null) {
3565 throw new core.ArgumentError("Parameter fileId is required."); 3614 throw new core.ArgumentError("Parameter fileId is required.");
3566 } 3615 }
3567 if (commentId == null) { 3616 if (commentId == null) {
3568 throw new core.ArgumentError("Parameter commentId is required."); 3617 throw new core.ArgumentError("Parameter commentId is required.");
3569 } 3618 }
3570 if (replyId == null) { 3619 if (replyId == null) {
3571 throw new core.ArgumentError("Parameter replyId is required."); 3620 throw new core.ArgumentError("Parameter replyId is required.");
3572 } 3621 }
3573 3622
3574 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' + commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap eVariable('$replyId'); 3623 _url = 'files/' +
3624 commons.Escaper.ecapeVariable('$fileId') +
3625 '/comments/' +
3626 commons.Escaper.ecapeVariable('$commentId') +
3627 '/replies/' +
3628 commons.Escaper.ecapeVariable('$replyId');
3575 3629
3576 var _response = _requester.request(_url, 3630 var _response = _requester.request(_url, "PUT",
3577 "PUT", 3631 body: _body,
3578 body: _body, 3632 queryParams: _queryParams,
3579 queryParams: _queryParams, 3633 uploadOptions: _uploadOptions,
3580 uploadOptions: _uploadOptions, 3634 uploadMedia: _uploadMedia,
3581 uploadMedia: _uploadMedia, 3635 downloadOptions: _downloadOptions);
3582 downloadOptions: _downloadOptions);
3583 return _response.then((data) => new CommentReply.fromJson(data)); 3636 return _response.then((data) => new CommentReply.fromJson(data));
3584 } 3637 }
3585
3586 } 3638 }
3587 3639
3588
3589 class RevisionsResourceApi { 3640 class RevisionsResourceApi {
3590 final commons.ApiRequester _requester; 3641 final commons.ApiRequester _requester;
3591 3642
3592 RevisionsResourceApi(commons.ApiRequester client) : 3643 RevisionsResourceApi(commons.ApiRequester client) : _requester = client;
3593 _requester = client;
3594 3644
3595 /** 3645 /// Removes a revision.
3596 * Removes a revision. 3646 ///
3597 * 3647 /// Request parameters:
3598 * Request parameters: 3648 ///
3599 * 3649 /// [fileId] - The ID of the file.
3600 * [fileId] - The ID of the file. 3650 ///
3601 * 3651 /// [revisionId] - The ID of the revision.
3602 * [revisionId] - The ID of the revision. 3652 ///
3603 * 3653 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3654 /// an error.
3605 * error. 3655 ///
3606 * 3656 /// If the used [http.Client] completes with an error when making a REST
3607 * If the used [http.Client] completes with an error when making a REST call, 3657 /// call, this method will complete with the same error.
3608 * this method will complete with the same error.
3609 */
3610 async.Future delete(core.String fileId, core.String revisionId) { 3658 async.Future delete(core.String fileId, core.String revisionId) {
3611 var _url = null; 3659 var _url = null;
3612 var _queryParams = new core.Map(); 3660 var _queryParams = new core.Map();
3613 var _uploadMedia = null; 3661 var _uploadMedia = null;
3614 var _uploadOptions = null; 3662 var _uploadOptions = null;
3615 var _downloadOptions = commons.DownloadOptions.Metadata; 3663 var _downloadOptions = commons.DownloadOptions.Metadata;
3616 var _body = null; 3664 var _body = null;
3617 3665
3618 if (fileId == null) { 3666 if (fileId == null) {
3619 throw new core.ArgumentError("Parameter fileId is required."); 3667 throw new core.ArgumentError("Parameter fileId is required.");
3620 } 3668 }
3621 if (revisionId == null) { 3669 if (revisionId == null) {
3622 throw new core.ArgumentError("Parameter revisionId is required."); 3670 throw new core.ArgumentError("Parameter revisionId is required.");
3623 } 3671 }
3624 3672
3625 _downloadOptions = null; 3673 _downloadOptions = null;
3626 3674
3627 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId'); 3675 _url = 'files/' +
3676 commons.Escaper.ecapeVariable('$fileId') +
3677 '/revisions/' +
3678 commons.Escaper.ecapeVariable('$revisionId');
3628 3679
3629 var _response = _requester.request(_url, 3680 var _response = _requester.request(_url, "DELETE",
3630 "DELETE", 3681 body: _body,
3631 body: _body, 3682 queryParams: _queryParams,
3632 queryParams: _queryParams, 3683 uploadOptions: _uploadOptions,
3633 uploadOptions: _uploadOptions, 3684 uploadMedia: _uploadMedia,
3634 uploadMedia: _uploadMedia, 3685 downloadOptions: _downloadOptions);
3635 downloadOptions: _downloadOptions);
3636 return _response.then((data) => null); 3686 return _response.then((data) => null);
3637 } 3687 }
3638 3688
3639 /** 3689 /// Gets a specific revision.
3640 * Gets a specific revision. 3690 ///
3641 * 3691 /// Request parameters:
3642 * Request parameters: 3692 ///
3643 * 3693 /// [fileId] - The ID of the file.
3644 * [fileId] - The ID of the file. 3694 ///
3645 * 3695 /// [revisionId] - The ID of the revision.
3646 * [revisionId] - The ID of the revision. 3696 ///
3647 * 3697 /// Completes with a [Revision].
3648 * Completes with a [Revision]. 3698 ///
3649 * 3699 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3650 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3700 /// an error.
3651 * error. 3701 ///
3652 * 3702 /// If the used [http.Client] completes with an error when making a REST
3653 * If the used [http.Client] completes with an error when making a REST call, 3703 /// call, this method will complete with the same error.
3654 * this method will complete with the same error.
3655 */
3656 async.Future<Revision> get(core.String fileId, core.String revisionId) { 3704 async.Future<Revision> get(core.String fileId, core.String revisionId) {
3657 var _url = null; 3705 var _url = null;
3658 var _queryParams = new core.Map(); 3706 var _queryParams = new core.Map();
3659 var _uploadMedia = null; 3707 var _uploadMedia = null;
3660 var _uploadOptions = null; 3708 var _uploadOptions = null;
3661 var _downloadOptions = commons.DownloadOptions.Metadata; 3709 var _downloadOptions = commons.DownloadOptions.Metadata;
3662 var _body = null; 3710 var _body = null;
3663 3711
3664 if (fileId == null) { 3712 if (fileId == null) {
3665 throw new core.ArgumentError("Parameter fileId is required."); 3713 throw new core.ArgumentError("Parameter fileId is required.");
3666 } 3714 }
3667 if (revisionId == null) { 3715 if (revisionId == null) {
3668 throw new core.ArgumentError("Parameter revisionId is required."); 3716 throw new core.ArgumentError("Parameter revisionId is required.");
3669 } 3717 }
3670 3718
3671 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId'); 3719 _url = 'files/' +
3720 commons.Escaper.ecapeVariable('$fileId') +
3721 '/revisions/' +
3722 commons.Escaper.ecapeVariable('$revisionId');
3672 3723
3673 var _response = _requester.request(_url, 3724 var _response = _requester.request(_url, "GET",
3674 "GET", 3725 body: _body,
3675 body: _body, 3726 queryParams: _queryParams,
3676 queryParams: _queryParams, 3727 uploadOptions: _uploadOptions,
3677 uploadOptions: _uploadOptions, 3728 uploadMedia: _uploadMedia,
3678 uploadMedia: _uploadMedia, 3729 downloadOptions: _downloadOptions);
3679 downloadOptions: _downloadOptions);
3680 return _response.then((data) => new Revision.fromJson(data)); 3730 return _response.then((data) => new Revision.fromJson(data));
3681 } 3731 }
3682 3732
3683 /** 3733 /// Lists a file's revisions.
3684 * Lists a file's revisions. 3734 ///
3685 * 3735 /// Request parameters:
3686 * Request parameters: 3736 ///
3687 * 3737 /// [fileId] - The ID of the file.
3688 * [fileId] - The ID of the file. 3738 ///
3689 * 3739 /// [maxResults] - Maximum number of revisions to return.
3690 * [maxResults] - Maximum number of revisions to return. 3740 /// Value must be between "1" and "1000".
3691 * Value must be between "1" and "1000". 3741 ///
3692 * 3742 /// [pageToken] - Page token for revisions. To get the next page of results,
3693 * [pageToken] - Page token for revisions. To get the next page of results, 3743 /// set this parameter to the value of "nextPageToken" from the previous
3694 * set this parameter to the value of "nextPageToken" from the previous 3744 /// response.
3695 * response. 3745 ///
3696 * 3746 /// Completes with a [RevisionList].
3697 * Completes with a [RevisionList]. 3747 ///
3698 * 3748 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3699 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3749 /// an error.
3700 * error. 3750 ///
3701 * 3751 /// If the used [http.Client] completes with an error when making a REST
3702 * If the used [http.Client] completes with an error when making a REST call, 3752 /// call, this method will complete with the same error.
3703 * this method will complete with the same error. 3753 async.Future<RevisionList> list(core.String fileId,
3704 */ 3754 {core.int maxResults, core.String pageToken}) {
3705 async.Future<RevisionList> list(core.String fileId, {core.int maxResults, core .String pageToken}) {
3706 var _url = null; 3755 var _url = null;
3707 var _queryParams = new core.Map(); 3756 var _queryParams = new core.Map();
3708 var _uploadMedia = null; 3757 var _uploadMedia = null;
3709 var _uploadOptions = null; 3758 var _uploadOptions = null;
3710 var _downloadOptions = commons.DownloadOptions.Metadata; 3759 var _downloadOptions = commons.DownloadOptions.Metadata;
3711 var _body = null; 3760 var _body = null;
3712 3761
3713 if (fileId == null) { 3762 if (fileId == null) {
3714 throw new core.ArgumentError("Parameter fileId is required."); 3763 throw new core.ArgumentError("Parameter fileId is required.");
3715 } 3764 }
3716 if (maxResults != null) { 3765 if (maxResults != null) {
3717 _queryParams["maxResults"] = ["${maxResults}"]; 3766 _queryParams["maxResults"] = ["${maxResults}"];
3718 } 3767 }
3719 if (pageToken != null) { 3768 if (pageToken != null) {
3720 _queryParams["pageToken"] = [pageToken]; 3769 _queryParams["pageToken"] = [pageToken];
3721 } 3770 }
3722 3771
3723 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions'; 3772 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions';
3724 3773
3725 var _response = _requester.request(_url, 3774 var _response = _requester.request(_url, "GET",
3726 "GET", 3775 body: _body,
3727 body: _body, 3776 queryParams: _queryParams,
3728 queryParams: _queryParams, 3777 uploadOptions: _uploadOptions,
3729 uploadOptions: _uploadOptions, 3778 uploadMedia: _uploadMedia,
3730 uploadMedia: _uploadMedia, 3779 downloadOptions: _downloadOptions);
3731 downloadOptions: _downloadOptions);
3732 return _response.then((data) => new RevisionList.fromJson(data)); 3780 return _response.then((data) => new RevisionList.fromJson(data));
3733 } 3781 }
3734 3782
3735 /** 3783 /// Updates a revision. This method supports patch semantics.
3736 * Updates a revision. This method supports patch semantics. 3784 ///
3737 * 3785 /// [request] - The metadata request object.
3738 * [request] - The metadata request object. 3786 ///
3739 * 3787 /// Request parameters:
3740 * Request parameters: 3788 ///
3741 * 3789 /// [fileId] - The ID for the file.
3742 * [fileId] - The ID for the file. 3790 ///
3743 * 3791 /// [revisionId] - The ID for the revision.
3744 * [revisionId] - The ID for the revision. 3792 ///
3745 * 3793 /// Completes with a [Revision].
3746 * Completes with a [Revision]. 3794 ///
3747 * 3795 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3748 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3796 /// an error.
3749 * error. 3797 ///
3750 * 3798 /// If the used [http.Client] completes with an error when making a REST
3751 * If the used [http.Client] completes with an error when making a REST call, 3799 /// call, this method will complete with the same error.
3752 * this method will complete with the same error. 3800 async.Future<Revision> patch(
3753 */ 3801 Revision request, core.String fileId, core.String revisionId) {
3754 async.Future<Revision> patch(Revision request, core.String fileId, core.String revisionId) {
3755 var _url = null; 3802 var _url = null;
3756 var _queryParams = new core.Map(); 3803 var _queryParams = new core.Map();
3757 var _uploadMedia = null; 3804 var _uploadMedia = null;
3758 var _uploadOptions = null; 3805 var _uploadOptions = null;
3759 var _downloadOptions = commons.DownloadOptions.Metadata; 3806 var _downloadOptions = commons.DownloadOptions.Metadata;
3760 var _body = null; 3807 var _body = null;
3761 3808
3762 if (request != null) { 3809 if (request != null) {
3763 _body = convert_1.JSON.encode((request).toJson()); 3810 _body = convert_1.JSON.encode((request).toJson());
3764 } 3811 }
3765 if (fileId == null) { 3812 if (fileId == null) {
3766 throw new core.ArgumentError("Parameter fileId is required."); 3813 throw new core.ArgumentError("Parameter fileId is required.");
3767 } 3814 }
3768 if (revisionId == null) { 3815 if (revisionId == null) {
3769 throw new core.ArgumentError("Parameter revisionId is required."); 3816 throw new core.ArgumentError("Parameter revisionId is required.");
3770 } 3817 }
3771 3818
3772 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId'); 3819 _url = 'files/' +
3820 commons.Escaper.ecapeVariable('$fileId') +
3821 '/revisions/' +
3822 commons.Escaper.ecapeVariable('$revisionId');
3773 3823
3774 var _response = _requester.request(_url, 3824 var _response = _requester.request(_url, "PATCH",
3775 "PATCH", 3825 body: _body,
3776 body: _body, 3826 queryParams: _queryParams,
3777 queryParams: _queryParams, 3827 uploadOptions: _uploadOptions,
3778 uploadOptions: _uploadOptions, 3828 uploadMedia: _uploadMedia,
3779 uploadMedia: _uploadMedia, 3829 downloadOptions: _downloadOptions);
3780 downloadOptions: _downloadOptions);
3781 return _response.then((data) => new Revision.fromJson(data)); 3830 return _response.then((data) => new Revision.fromJson(data));
3782 } 3831 }
3783 3832
3784 /** 3833 /// Updates a revision.
3785 * Updates a revision. 3834 ///
3786 * 3835 /// [request] - The metadata request object.
3787 * [request] - The metadata request object. 3836 ///
3788 * 3837 /// Request parameters:
3789 * Request parameters: 3838 ///
3790 * 3839 /// [fileId] - The ID for the file.
3791 * [fileId] - The ID for the file. 3840 ///
3792 * 3841 /// [revisionId] - The ID for the revision.
3793 * [revisionId] - The ID for the revision. 3842 ///
3794 * 3843 /// Completes with a [Revision].
3795 * Completes with a [Revision]. 3844 ///
3796 * 3845 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3797 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3846 /// an error.
3798 * error. 3847 ///
3799 * 3848 /// If the used [http.Client] completes with an error when making a REST
3800 * If the used [http.Client] completes with an error when making a REST call, 3849 /// call, this method will complete with the same error.
3801 * this method will complete with the same error. 3850 async.Future<Revision> update(
3802 */ 3851 Revision request, core.String fileId, core.String revisionId) {
3803 async.Future<Revision> update(Revision request, core.String fileId, core.Strin g revisionId) {
3804 var _url = null; 3852 var _url = null;
3805 var _queryParams = new core.Map(); 3853 var _queryParams = new core.Map();
3806 var _uploadMedia = null; 3854 var _uploadMedia = null;
3807 var _uploadOptions = null; 3855 var _uploadOptions = null;
3808 var _downloadOptions = commons.DownloadOptions.Metadata; 3856 var _downloadOptions = commons.DownloadOptions.Metadata;
3809 var _body = null; 3857 var _body = null;
3810 3858
3811 if (request != null) { 3859 if (request != null) {
3812 _body = convert_1.JSON.encode((request).toJson()); 3860 _body = convert_1.JSON.encode((request).toJson());
3813 } 3861 }
3814 if (fileId == null) { 3862 if (fileId == null) {
3815 throw new core.ArgumentError("Parameter fileId is required."); 3863 throw new core.ArgumentError("Parameter fileId is required.");
3816 } 3864 }
3817 if (revisionId == null) { 3865 if (revisionId == null) {
3818 throw new core.ArgumentError("Parameter revisionId is required."); 3866 throw new core.ArgumentError("Parameter revisionId is required.");
3819 } 3867 }
3820 3868
3821 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' + commons.Escaper.ecapeVariable('$revisionId'); 3869 _url = 'files/' +
3870 commons.Escaper.ecapeVariable('$fileId') +
3871 '/revisions/' +
3872 commons.Escaper.ecapeVariable('$revisionId');
3822 3873
3823 var _response = _requester.request(_url, 3874 var _response = _requester.request(_url, "PUT",
3824 "PUT", 3875 body: _body,
3825 body: _body, 3876 queryParams: _queryParams,
3826 queryParams: _queryParams, 3877 uploadOptions: _uploadOptions,
3827 uploadOptions: _uploadOptions, 3878 uploadMedia: _uploadMedia,
3828 uploadMedia: _uploadMedia, 3879 downloadOptions: _downloadOptions);
3829 downloadOptions: _downloadOptions);
3830 return _response.then((data) => new Revision.fromJson(data)); 3880 return _response.then((data) => new Revision.fromJson(data));
3831 } 3881 }
3832
3833 } 3882 }
3834 3883
3835
3836 class TeamdrivesResourceApi { 3884 class TeamdrivesResourceApi {
3837 final commons.ApiRequester _requester; 3885 final commons.ApiRequester _requester;
3838 3886
3839 TeamdrivesResourceApi(commons.ApiRequester client) : 3887 TeamdrivesResourceApi(commons.ApiRequester client) : _requester = client;
3840 _requester = client;
3841 3888
3842 /** 3889 /// Permanently deletes a Team Drive for which the user is an organizer. The
3843 * Permanently deletes a Team Drive for which the user is an organizer. The 3890 /// Team Drive cannot contain any untrashed items.
3844 * Team Drive cannot contain any untrashed items. 3891 ///
3845 * 3892 /// Request parameters:
3846 * Request parameters: 3893 ///
3847 * 3894 /// [teamDriveId] - The ID of the Team Drive
3848 * [teamDriveId] - The ID of the Team Drive 3895 ///
3849 * 3896 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3850 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3897 /// an error.
3851 * error. 3898 ///
3852 * 3899 /// If the used [http.Client] completes with an error when making a REST
3853 * If the used [http.Client] completes with an error when making a REST call, 3900 /// call, this method will complete with the same error.
3854 * this method will complete with the same error.
3855 */
3856 async.Future delete(core.String teamDriveId) { 3901 async.Future delete(core.String teamDriveId) {
3857 var _url = null; 3902 var _url = null;
3858 var _queryParams = new core.Map(); 3903 var _queryParams = new core.Map();
3859 var _uploadMedia = null; 3904 var _uploadMedia = null;
3860 var _uploadOptions = null; 3905 var _uploadOptions = null;
3861 var _downloadOptions = commons.DownloadOptions.Metadata; 3906 var _downloadOptions = commons.DownloadOptions.Metadata;
3862 var _body = null; 3907 var _body = null;
3863 3908
3864 if (teamDriveId == null) { 3909 if (teamDriveId == null) {
3865 throw new core.ArgumentError("Parameter teamDriveId is required."); 3910 throw new core.ArgumentError("Parameter teamDriveId is required.");
3866 } 3911 }
3867 3912
3868 _downloadOptions = null; 3913 _downloadOptions = null;
3869 3914
3870 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); 3915 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId');
3871 3916
3872 var _response = _requester.request(_url, 3917 var _response = _requester.request(_url, "DELETE",
3873 "DELETE", 3918 body: _body,
3874 body: _body, 3919 queryParams: _queryParams,
3875 queryParams: _queryParams, 3920 uploadOptions: _uploadOptions,
3876 uploadOptions: _uploadOptions, 3921 uploadMedia: _uploadMedia,
3877 uploadMedia: _uploadMedia, 3922 downloadOptions: _downloadOptions);
3878 downloadOptions: _downloadOptions);
3879 return _response.then((data) => null); 3923 return _response.then((data) => null);
3880 } 3924 }
3881 3925
3882 /** 3926 /// Gets a Team Drive's metadata by ID.
3883 * Gets a Team Drive's metadata by ID. 3927 ///
3884 * 3928 /// Request parameters:
3885 * Request parameters: 3929 ///
3886 * 3930 /// [teamDriveId] - The ID of the Team Drive
3887 * [teamDriveId] - The ID of the Team Drive 3931 ///
3888 * 3932 /// Completes with a [TeamDrive].
3889 * Completes with a [TeamDrive]. 3933 ///
3890 * 3934 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3891 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3935 /// an error.
3892 * error. 3936 ///
3893 * 3937 /// If the used [http.Client] completes with an error when making a REST
3894 * If the used [http.Client] completes with an error when making a REST call, 3938 /// call, this method will complete with the same error.
3895 * this method will complete with the same error.
3896 */
3897 async.Future<TeamDrive> get(core.String teamDriveId) { 3939 async.Future<TeamDrive> get(core.String teamDriveId) {
3898 var _url = null; 3940 var _url = null;
3899 var _queryParams = new core.Map(); 3941 var _queryParams = new core.Map();
3900 var _uploadMedia = null; 3942 var _uploadMedia = null;
3901 var _uploadOptions = null; 3943 var _uploadOptions = null;
3902 var _downloadOptions = commons.DownloadOptions.Metadata; 3944 var _downloadOptions = commons.DownloadOptions.Metadata;
3903 var _body = null; 3945 var _body = null;
3904 3946
3905 if (teamDriveId == null) { 3947 if (teamDriveId == null) {
3906 throw new core.ArgumentError("Parameter teamDriveId is required."); 3948 throw new core.ArgumentError("Parameter teamDriveId is required.");
3907 } 3949 }
3908 3950
3909 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); 3951 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId');
3910 3952
3911 var _response = _requester.request(_url, 3953 var _response = _requester.request(_url, "GET",
3912 "GET", 3954 body: _body,
3913 body: _body, 3955 queryParams: _queryParams,
3914 queryParams: _queryParams, 3956 uploadOptions: _uploadOptions,
3915 uploadOptions: _uploadOptions, 3957 uploadMedia: _uploadMedia,
3916 uploadMedia: _uploadMedia, 3958 downloadOptions: _downloadOptions);
3917 downloadOptions: _downloadOptions);
3918 return _response.then((data) => new TeamDrive.fromJson(data)); 3959 return _response.then((data) => new TeamDrive.fromJson(data));
3919 } 3960 }
3920 3961
3921 /** 3962 /// Creates a new Team Drive.
3922 * Creates a new Team Drive. 3963 ///
3923 * 3964 /// [request] - The metadata request object.
3924 * [request] - The metadata request object. 3965 ///
3925 * 3966 /// Request parameters:
3926 * Request parameters: 3967 ///
3927 * 3968 /// [requestId] - An ID, such as a random UUID, which uniquely identifies
3928 * [requestId] - An ID, such as a random UUID, which uniquely identifies this 3969 /// this user's request for idempotent creation of a Team Drive. A repeated
3929 * user's request for idempotent creation of a Team Drive. A repeated request 3970 /// request by the same user and with the same request ID will avoid creating
3930 * by the same user and with the same request ID will avoid creating 3971 /// duplicates by attempting to create the same Team Drive. If the Team Drive
3931 * duplicates by attempting to create the same Team Drive. If the Team Drive 3972 /// already exists a 409 error will be returned.
3932 * already exists a 409 error will be returned. 3973 ///
3933 * 3974 /// Completes with a [TeamDrive].
3934 * Completes with a [TeamDrive]. 3975 ///
3935 * 3976 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3936 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3977 /// an error.
3937 * error. 3978 ///
3938 * 3979 /// If the used [http.Client] completes with an error when making a REST
3939 * If the used [http.Client] completes with an error when making a REST call, 3980 /// call, this method will complete with the same error.
3940 * this method will complete with the same error.
3941 */
3942 async.Future<TeamDrive> insert(TeamDrive request, core.String requestId) { 3981 async.Future<TeamDrive> insert(TeamDrive request, core.String requestId) {
3943 var _url = null; 3982 var _url = null;
3944 var _queryParams = new core.Map(); 3983 var _queryParams = new core.Map();
3945 var _uploadMedia = null; 3984 var _uploadMedia = null;
3946 var _uploadOptions = null; 3985 var _uploadOptions = null;
3947 var _downloadOptions = commons.DownloadOptions.Metadata; 3986 var _downloadOptions = commons.DownloadOptions.Metadata;
3948 var _body = null; 3987 var _body = null;
3949 3988
3950 if (request != null) { 3989 if (request != null) {
3951 _body = convert_1.JSON.encode((request).toJson()); 3990 _body = convert_1.JSON.encode((request).toJson());
3952 } 3991 }
3953 if (requestId == null) { 3992 if (requestId == null) {
3954 throw new core.ArgumentError("Parameter requestId is required."); 3993 throw new core.ArgumentError("Parameter requestId is required.");
3955 } 3994 }
3956 _queryParams["requestId"] = [requestId]; 3995 _queryParams["requestId"] = [requestId];
3957 3996
3958 _url = 'teamdrives'; 3997 _url = 'teamdrives';
3959 3998
3960 var _response = _requester.request(_url, 3999 var _response = _requester.request(_url, "POST",
3961 "POST", 4000 body: _body,
3962 body: _body, 4001 queryParams: _queryParams,
3963 queryParams: _queryParams, 4002 uploadOptions: _uploadOptions,
3964 uploadOptions: _uploadOptions, 4003 uploadMedia: _uploadMedia,
3965 uploadMedia: _uploadMedia, 4004 downloadOptions: _downloadOptions);
3966 downloadOptions: _downloadOptions);
3967 return _response.then((data) => new TeamDrive.fromJson(data)); 4005 return _response.then((data) => new TeamDrive.fromJson(data));
3968 } 4006 }
3969 4007
3970 /** 4008 /// Lists the user's Team Drives.
3971 * Lists the user's Team Drives. 4009 ///
3972 * 4010 /// Request parameters:
3973 * Request parameters: 4011 ///
3974 * 4012 /// [maxResults] - Maximum number of Team Drives to return.
3975 * [maxResults] - Maximum number of Team Drives to return. 4013 /// Value must be between "1" and "100".
3976 * Value must be between "1" and "100". 4014 ///
3977 * 4015 /// [pageToken] - Page token for Team Drives.
3978 * [pageToken] - Page token for Team Drives. 4016 ///
3979 * 4017 /// Completes with a [TeamDriveList].
3980 * Completes with a [TeamDriveList]. 4018 ///
3981 * 4019 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3982 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 4020 /// an error.
3983 * error. 4021 ///
3984 * 4022 /// If the used [http.Client] completes with an error when making a REST
3985 * If the used [http.Client] completes with an error when making a REST call, 4023 /// call, this method will complete with the same error.
3986 * this method will complete with the same error. 4024 async.Future<TeamDriveList> list(
3987 */ 4025 {core.int maxResults, core.String pageToken}) {
3988 async.Future<TeamDriveList> list({core.int maxResults, core.String pageToken}) {
3989 var _url = null; 4026 var _url = null;
3990 var _queryParams = new core.Map(); 4027 var _queryParams = new core.Map();
3991 var _uploadMedia = null; 4028 var _uploadMedia = null;
3992 var _uploadOptions = null; 4029 var _uploadOptions = null;
3993 var _downloadOptions = commons.DownloadOptions.Metadata; 4030 var _downloadOptions = commons.DownloadOptions.Metadata;
3994 var _body = null; 4031 var _body = null;
3995 4032
3996 if (maxResults != null) { 4033 if (maxResults != null) {
3997 _queryParams["maxResults"] = ["${maxResults}"]; 4034 _queryParams["maxResults"] = ["${maxResults}"];
3998 } 4035 }
3999 if (pageToken != null) { 4036 if (pageToken != null) {
4000 _queryParams["pageToken"] = [pageToken]; 4037 _queryParams["pageToken"] = [pageToken];
4001 } 4038 }
4002 4039
4003 _url = 'teamdrives'; 4040 _url = 'teamdrives';
4004 4041
4005 var _response = _requester.request(_url, 4042 var _response = _requester.request(_url, "GET",
4006 "GET", 4043 body: _body,
4007 body: _body, 4044 queryParams: _queryParams,
4008 queryParams: _queryParams, 4045 uploadOptions: _uploadOptions,
4009 uploadOptions: _uploadOptions, 4046 uploadMedia: _uploadMedia,
4010 uploadMedia: _uploadMedia, 4047 downloadOptions: _downloadOptions);
4011 downloadOptions: _downloadOptions);
4012 return _response.then((data) => new TeamDriveList.fromJson(data)); 4048 return _response.then((data) => new TeamDriveList.fromJson(data));
4013 } 4049 }
4014 4050
4015 /** 4051 /// Updates a Team Drive's metadata
4016 * Updates a Team Drive's metadata 4052 ///
4017 * 4053 /// [request] - The metadata request object.
4018 * [request] - The metadata request object. 4054 ///
4019 * 4055 /// Request parameters:
4020 * Request parameters: 4056 ///
4021 * 4057 /// [teamDriveId] - The ID of the Team Drive
4022 * [teamDriveId] - The ID of the Team Drive 4058 ///
4023 * 4059 /// Completes with a [TeamDrive].
4024 * Completes with a [TeamDrive]. 4060 ///
4025 * 4061 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
4026 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 4062 /// an error.
4027 * error. 4063 ///
4028 * 4064 /// If the used [http.Client] completes with an error when making a REST
4029 * If the used [http.Client] completes with an error when making a REST call, 4065 /// call, this method will complete with the same error.
4030 * this method will complete with the same error.
4031 */
4032 async.Future<TeamDrive> update(TeamDrive request, core.String teamDriveId) { 4066 async.Future<TeamDrive> update(TeamDrive request, core.String teamDriveId) {
4033 var _url = null; 4067 var _url = null;
4034 var _queryParams = new core.Map(); 4068 var _queryParams = new core.Map();
4035 var _uploadMedia = null; 4069 var _uploadMedia = null;
4036 var _uploadOptions = null; 4070 var _uploadOptions = null;
4037 var _downloadOptions = commons.DownloadOptions.Metadata; 4071 var _downloadOptions = commons.DownloadOptions.Metadata;
4038 var _body = null; 4072 var _body = null;
4039 4073
4040 if (request != null) { 4074 if (request != null) {
4041 _body = convert_1.JSON.encode((request).toJson()); 4075 _body = convert_1.JSON.encode((request).toJson());
4042 } 4076 }
4043 if (teamDriveId == null) { 4077 if (teamDriveId == null) {
4044 throw new core.ArgumentError("Parameter teamDriveId is required."); 4078 throw new core.ArgumentError("Parameter teamDriveId is required.");
4045 } 4079 }
4046 4080
4047 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); 4081 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId');
4048 4082
4049 var _response = _requester.request(_url, 4083 var _response = _requester.request(_url, "PUT",
4050 "PUT", 4084 body: _body,
4051 body: _body, 4085 queryParams: _queryParams,
4052 queryParams: _queryParams, 4086 uploadOptions: _uploadOptions,
4053 uploadOptions: _uploadOptions, 4087 uploadMedia: _uploadMedia,
4054 uploadMedia: _uploadMedia, 4088 downloadOptions: _downloadOptions);
4055 downloadOptions: _downloadOptions);
4056 return _response.then((data) => new TeamDrive.fromJson(data)); 4089 return _response.then((data) => new TeamDrive.fromJson(data));
4057 } 4090 }
4058
4059 } 4091 }
4060 4092
4093 class AboutAdditionalRoleInfoRoleSets {
4094 /// The supported additional roles with the primary role.
4095 core.List<core.String> additionalRoles;
4061 4096
4062 4097 /// A primary permission role.
4063 class AboutAdditionalRoleInfoRoleSets {
4064 /** The supported additional roles with the primary role. */
4065 core.List<core.String> additionalRoles;
4066 /** A primary permission role. */
4067 core.String primaryRole; 4098 core.String primaryRole;
4068 4099
4069 AboutAdditionalRoleInfoRoleSets(); 4100 AboutAdditionalRoleInfoRoleSets();
4070 4101
4071 AboutAdditionalRoleInfoRoleSets.fromJson(core.Map _json) { 4102 AboutAdditionalRoleInfoRoleSets.fromJson(core.Map _json) {
4072 if (_json.containsKey("additionalRoles")) { 4103 if (_json.containsKey("additionalRoles")) {
4073 additionalRoles = _json["additionalRoles"]; 4104 additionalRoles = _json["additionalRoles"];
4074 } 4105 }
4075 if (_json.containsKey("primaryRole")) { 4106 if (_json.containsKey("primaryRole")) {
4076 primaryRole = _json["primaryRole"]; 4107 primaryRole = _json["primaryRole"];
4077 } 4108 }
4078 } 4109 }
4079 4110
4080 core.Map<core.String, core.Object> toJson() { 4111 core.Map<core.String, core.Object> toJson() {
4081 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4112 final core.Map<core.String, core.Object> _json =
4113 new core.Map<core.String, core.Object>();
4082 if (additionalRoles != null) { 4114 if (additionalRoles != null) {
4083 _json["additionalRoles"] = additionalRoles; 4115 _json["additionalRoles"] = additionalRoles;
4084 } 4116 }
4085 if (primaryRole != null) { 4117 if (primaryRole != null) {
4086 _json["primaryRole"] = primaryRole; 4118 _json["primaryRole"] = primaryRole;
4087 } 4119 }
4088 return _json; 4120 return _json;
4089 } 4121 }
4090 } 4122 }
4091 4123
4092 class AboutAdditionalRoleInfo { 4124 class AboutAdditionalRoleInfo {
4093 /** The supported additional roles per primary role. */ 4125 /// The supported additional roles per primary role.
4094 core.List<AboutAdditionalRoleInfoRoleSets> roleSets; 4126 core.List<AboutAdditionalRoleInfoRoleSets> roleSets;
4095 /** The content type that this additional role info applies to. */ 4127
4128 /// The content type that this additional role info applies to.
4096 core.String type; 4129 core.String type;
4097 4130
4098 AboutAdditionalRoleInfo(); 4131 AboutAdditionalRoleInfo();
4099 4132
4100 AboutAdditionalRoleInfo.fromJson(core.Map _json) { 4133 AboutAdditionalRoleInfo.fromJson(core.Map _json) {
4101 if (_json.containsKey("roleSets")) { 4134 if (_json.containsKey("roleSets")) {
4102 roleSets = _json["roleSets"].map((value) => new AboutAdditionalRoleInfoRol eSets.fromJson(value)).toList(); 4135 roleSets = _json["roleSets"]
4136 .map((value) => new AboutAdditionalRoleInfoRoleSets.fromJson(value))
4137 .toList();
4103 } 4138 }
4104 if (_json.containsKey("type")) { 4139 if (_json.containsKey("type")) {
4105 type = _json["type"]; 4140 type = _json["type"];
4106 } 4141 }
4107 } 4142 }
4108 4143
4109 core.Map<core.String, core.Object> toJson() { 4144 core.Map<core.String, core.Object> toJson() {
4110 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4145 final core.Map<core.String, core.Object> _json =
4146 new core.Map<core.String, core.Object>();
4111 if (roleSets != null) { 4147 if (roleSets != null) {
4112 _json["roleSets"] = roleSets.map((value) => (value).toJson()).toList(); 4148 _json["roleSets"] = roleSets.map((value) => (value).toJson()).toList();
4113 } 4149 }
4114 if (type != null) { 4150 if (type != null) {
4115 _json["type"] = type; 4151 _json["type"] = type;
4116 } 4152 }
4117 return _json; 4153 return _json;
4118 } 4154 }
4119 } 4155 }
4120 4156
4121 class AboutExportFormats { 4157 class AboutExportFormats {
4122 /** The content type to convert from. */ 4158 /// The content type to convert from.
4123 core.String source; 4159 core.String source;
4124 /** The possible content types to convert to. */ 4160
4161 /// The possible content types to convert to.
4125 core.List<core.String> targets; 4162 core.List<core.String> targets;
4126 4163
4127 AboutExportFormats(); 4164 AboutExportFormats();
4128 4165
4129 AboutExportFormats.fromJson(core.Map _json) { 4166 AboutExportFormats.fromJson(core.Map _json) {
4130 if (_json.containsKey("source")) { 4167 if (_json.containsKey("source")) {
4131 source = _json["source"]; 4168 source = _json["source"];
4132 } 4169 }
4133 if (_json.containsKey("targets")) { 4170 if (_json.containsKey("targets")) {
4134 targets = _json["targets"]; 4171 targets = _json["targets"];
4135 } 4172 }
4136 } 4173 }
4137 4174
4138 core.Map<core.String, core.Object> toJson() { 4175 core.Map<core.String, core.Object> toJson() {
4139 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4176 final core.Map<core.String, core.Object> _json =
4177 new core.Map<core.String, core.Object>();
4140 if (source != null) { 4178 if (source != null) {
4141 _json["source"] = source; 4179 _json["source"] = source;
4142 } 4180 }
4143 if (targets != null) { 4181 if (targets != null) {
4144 _json["targets"] = targets; 4182 _json["targets"] = targets;
4145 } 4183 }
4146 return _json; 4184 return _json;
4147 } 4185 }
4148 } 4186 }
4149 4187
4150 class AboutFeatures { 4188 class AboutFeatures {
4151 /** The name of the feature. */ 4189 /// The name of the feature.
4152 core.String featureName; 4190 core.String featureName;
4153 /** The request limit rate for this feature, in queries per second. */ 4191
4192 /// The request limit rate for this feature, in queries per second.
4154 core.double featureRate; 4193 core.double featureRate;
4155 4194
4156 AboutFeatures(); 4195 AboutFeatures();
4157 4196
4158 AboutFeatures.fromJson(core.Map _json) { 4197 AboutFeatures.fromJson(core.Map _json) {
4159 if (_json.containsKey("featureName")) { 4198 if (_json.containsKey("featureName")) {
4160 featureName = _json["featureName"]; 4199 featureName = _json["featureName"];
4161 } 4200 }
4162 if (_json.containsKey("featureRate")) { 4201 if (_json.containsKey("featureRate")) {
4163 featureRate = _json["featureRate"]; 4202 featureRate = _json["featureRate"];
4164 } 4203 }
4165 } 4204 }
4166 4205
4167 core.Map<core.String, core.Object> toJson() { 4206 core.Map<core.String, core.Object> toJson() {
4168 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4207 final core.Map<core.String, core.Object> _json =
4208 new core.Map<core.String, core.Object>();
4169 if (featureName != null) { 4209 if (featureName != null) {
4170 _json["featureName"] = featureName; 4210 _json["featureName"] = featureName;
4171 } 4211 }
4172 if (featureRate != null) { 4212 if (featureRate != null) {
4173 _json["featureRate"] = featureRate; 4213 _json["featureRate"] = featureRate;
4174 } 4214 }
4175 return _json; 4215 return _json;
4176 } 4216 }
4177 } 4217 }
4178 4218
4179 class AboutImportFormats { 4219 class AboutImportFormats {
4180 /** The imported file's content type to convert from. */ 4220 /// The imported file's content type to convert from.
4181 core.String source; 4221 core.String source;
4182 /** The possible content types to convert to. */ 4222
4223 /// The possible content types to convert to.
4183 core.List<core.String> targets; 4224 core.List<core.String> targets;
4184 4225
4185 AboutImportFormats(); 4226 AboutImportFormats();
4186 4227
4187 AboutImportFormats.fromJson(core.Map _json) { 4228 AboutImportFormats.fromJson(core.Map _json) {
4188 if (_json.containsKey("source")) { 4229 if (_json.containsKey("source")) {
4189 source = _json["source"]; 4230 source = _json["source"];
4190 } 4231 }
4191 if (_json.containsKey("targets")) { 4232 if (_json.containsKey("targets")) {
4192 targets = _json["targets"]; 4233 targets = _json["targets"];
4193 } 4234 }
4194 } 4235 }
4195 4236
4196 core.Map<core.String, core.Object> toJson() { 4237 core.Map<core.String, core.Object> toJson() {
4197 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4238 final core.Map<core.String, core.Object> _json =
4239 new core.Map<core.String, core.Object>();
4198 if (source != null) { 4240 if (source != null) {
4199 _json["source"] = source; 4241 _json["source"] = source;
4200 } 4242 }
4201 if (targets != null) { 4243 if (targets != null) {
4202 _json["targets"] = targets; 4244 _json["targets"] = targets;
4203 } 4245 }
4204 return _json; 4246 return _json;
4205 } 4247 }
4206 } 4248 }
4207 4249
4208 class AboutMaxUploadSizes { 4250 class AboutMaxUploadSizes {
4209 /** The max upload size for this type. */ 4251 /// The max upload size for this type.
4210 core.String size; 4252 core.String size;
4211 /** The file type. */ 4253
4254 /// The file type.
4212 core.String type; 4255 core.String type;
4213 4256
4214 AboutMaxUploadSizes(); 4257 AboutMaxUploadSizes();
4215 4258
4216 AboutMaxUploadSizes.fromJson(core.Map _json) { 4259 AboutMaxUploadSizes.fromJson(core.Map _json) {
4217 if (_json.containsKey("size")) { 4260 if (_json.containsKey("size")) {
4218 size = _json["size"]; 4261 size = _json["size"];
4219 } 4262 }
4220 if (_json.containsKey("type")) { 4263 if (_json.containsKey("type")) {
4221 type = _json["type"]; 4264 type = _json["type"];
4222 } 4265 }
4223 } 4266 }
4224 4267
4225 core.Map<core.String, core.Object> toJson() { 4268 core.Map<core.String, core.Object> toJson() {
4226 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4269 final core.Map<core.String, core.Object> _json =
4270 new core.Map<core.String, core.Object>();
4227 if (size != null) { 4271 if (size != null) {
4228 _json["size"] = size; 4272 _json["size"] = size;
4229 } 4273 }
4230 if (type != null) { 4274 if (type != null) {
4231 _json["type"] = type; 4275 _json["type"] = type;
4232 } 4276 }
4233 return _json; 4277 return _json;
4234 } 4278 }
4235 } 4279 }
4236 4280
4237 class AboutQuotaBytesByService { 4281 class AboutQuotaBytesByService {
4238 /** The storage quota bytes used by the service. */ 4282 /// The storage quota bytes used by the service.
4239 core.String bytesUsed; 4283 core.String bytesUsed;
4240 /** The service's name, e.g. DRIVE, GMAIL, or PHOTOS. */ 4284
4285 /// The service's name, e.g. DRIVE, GMAIL, or PHOTOS.
4241 core.String serviceName; 4286 core.String serviceName;
4242 4287
4243 AboutQuotaBytesByService(); 4288 AboutQuotaBytesByService();
4244 4289
4245 AboutQuotaBytesByService.fromJson(core.Map _json) { 4290 AboutQuotaBytesByService.fromJson(core.Map _json) {
4246 if (_json.containsKey("bytesUsed")) { 4291 if (_json.containsKey("bytesUsed")) {
4247 bytesUsed = _json["bytesUsed"]; 4292 bytesUsed = _json["bytesUsed"];
4248 } 4293 }
4249 if (_json.containsKey("serviceName")) { 4294 if (_json.containsKey("serviceName")) {
4250 serviceName = _json["serviceName"]; 4295 serviceName = _json["serviceName"];
4251 } 4296 }
4252 } 4297 }
4253 4298
4254 core.Map<core.String, core.Object> toJson() { 4299 core.Map<core.String, core.Object> toJson() {
4255 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4300 final core.Map<core.String, core.Object> _json =
4301 new core.Map<core.String, core.Object>();
4256 if (bytesUsed != null) { 4302 if (bytesUsed != null) {
4257 _json["bytesUsed"] = bytesUsed; 4303 _json["bytesUsed"] = bytesUsed;
4258 } 4304 }
4259 if (serviceName != null) { 4305 if (serviceName != null) {
4260 _json["serviceName"] = serviceName; 4306 _json["serviceName"] = serviceName;
4261 } 4307 }
4262 return _json; 4308 return _json;
4263 } 4309 }
4264 } 4310 }
4265 4311
4266 class AboutTeamDriveThemes { 4312 class AboutTeamDriveThemes {
4267 /** A link to this Team Drive theme's background image. */ 4313 /// A link to this Team Drive theme's background image.
4268 core.String backgroundImageLink; 4314 core.String backgroundImageLink;
4269 /** The color of this Team Drive theme as an RGB hex string. */ 4315
4316 /// The color of this Team Drive theme as an RGB hex string.
4270 core.String colorRgb; 4317 core.String colorRgb;
4271 /** The ID of the theme. */ 4318
4319 /// The ID of the theme.
4272 core.String id; 4320 core.String id;
4273 4321
4274 AboutTeamDriveThemes(); 4322 AboutTeamDriveThemes();
4275 4323
4276 AboutTeamDriveThemes.fromJson(core.Map _json) { 4324 AboutTeamDriveThemes.fromJson(core.Map _json) {
4277 if (_json.containsKey("backgroundImageLink")) { 4325 if (_json.containsKey("backgroundImageLink")) {
4278 backgroundImageLink = _json["backgroundImageLink"]; 4326 backgroundImageLink = _json["backgroundImageLink"];
4279 } 4327 }
4280 if (_json.containsKey("colorRgb")) { 4328 if (_json.containsKey("colorRgb")) {
4281 colorRgb = _json["colorRgb"]; 4329 colorRgb = _json["colorRgb"];
4282 } 4330 }
4283 if (_json.containsKey("id")) { 4331 if (_json.containsKey("id")) {
4284 id = _json["id"]; 4332 id = _json["id"];
4285 } 4333 }
4286 } 4334 }
4287 4335
4288 core.Map<core.String, core.Object> toJson() { 4336 core.Map<core.String, core.Object> toJson() {
4289 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4337 final core.Map<core.String, core.Object> _json =
4338 new core.Map<core.String, core.Object>();
4290 if (backgroundImageLink != null) { 4339 if (backgroundImageLink != null) {
4291 _json["backgroundImageLink"] = backgroundImageLink; 4340 _json["backgroundImageLink"] = backgroundImageLink;
4292 } 4341 }
4293 if (colorRgb != null) { 4342 if (colorRgb != null) {
4294 _json["colorRgb"] = colorRgb; 4343 _json["colorRgb"] = colorRgb;
4295 } 4344 }
4296 if (id != null) { 4345 if (id != null) {
4297 _json["id"] = id; 4346 _json["id"] = id;
4298 } 4347 }
4299 return _json; 4348 return _json;
4300 } 4349 }
4301 } 4350 }
4302 4351
4303 /** An item with user information and settings. */ 4352 /// An item with user information and settings.
4304 class About { 4353 class About {
4305 /** 4354 /// Information about supported additional roles per file type. The most
4306 * Information about supported additional roles per file type. The most 4355 /// specific type takes precedence.
4307 * specific type takes precedence.
4308 */
4309 core.List<AboutAdditionalRoleInfo> additionalRoleInfo; 4356 core.List<AboutAdditionalRoleInfo> additionalRoleInfo;
4310 /** 4357
4311 * The domain sharing policy for the current user. Possible values are: 4358 /// The domain sharing policy for the current user. Possible values are:
4312 * - allowed 4359 /// - allowed
4313 * - allowedWithWarning 4360 /// - allowedWithWarning
4314 * - incomingOnly 4361 /// - incomingOnly
4315 * - disallowed 4362 /// - disallowed
4316 */
4317 core.String domainSharingPolicy; 4363 core.String domainSharingPolicy;
4318 /** The ETag of the item. */ 4364
4365 /// The ETag of the item.
4319 core.String etag; 4366 core.String etag;
4320 /** The allowable export formats. */ 4367
4368 /// The allowable export formats.
4321 core.List<AboutExportFormats> exportFormats; 4369 core.List<AboutExportFormats> exportFormats;
4322 /** List of additional features enabled on this account. */ 4370
4371 /// List of additional features enabled on this account.
4323 core.List<AboutFeatures> features; 4372 core.List<AboutFeatures> features;
4324 /** The palette of allowable folder colors as RGB hex strings. */ 4373
4374 /// The palette of allowable folder colors as RGB hex strings.
4325 core.List<core.String> folderColorPalette; 4375 core.List<core.String> folderColorPalette;
4326 /** The allowable import formats. */ 4376
4377 /// The allowable import formats.
4327 core.List<AboutImportFormats> importFormats; 4378 core.List<AboutImportFormats> importFormats;
4328 /** 4379
4329 * A boolean indicating whether the authenticated app is installed by the 4380 /// A boolean indicating whether the authenticated app is installed by the
4330 * authenticated user. 4381 /// authenticated user.
4331 */
4332 core.bool isCurrentAppInstalled; 4382 core.bool isCurrentAppInstalled;
4333 /** This is always drive#about. */ 4383
4384 /// This is always drive#about.
4334 core.String kind; 4385 core.String kind;
4335 /** 4386
4336 * The user's language or locale code, as defined by BCP 47, with some 4387 /// The user's language or locale code, as defined by BCP 47, with some
4337 * extensions from Unicode's LDML format 4388 /// extensions from Unicode's LDML format
4338 * (http://www.unicode.org/reports/tr35/). 4389 /// (http://www.unicode.org/reports/tr35/).
4339 */
4340 core.String languageCode; 4390 core.String languageCode;
4341 /** The largest change id. */ 4391
4392 /// The largest change id.
4342 core.String largestChangeId; 4393 core.String largestChangeId;
4343 /** 4394
4344 * List of max upload sizes for each file type. The most specific type takes 4395 /// List of max upload sizes for each file type. The most specific type takes
4345 * precedence. 4396 /// precedence.
4346 */
4347 core.List<AboutMaxUploadSizes> maxUploadSizes; 4397 core.List<AboutMaxUploadSizes> maxUploadSizes;
4348 /** The name of the current user. */ 4398
4399 /// The name of the current user.
4349 core.String name; 4400 core.String name;
4350 /** The current user's ID as visible in the permissions collection. */ 4401
4402 /// The current user's ID as visible in the permissions collection.
4351 core.String permissionId; 4403 core.String permissionId;
4352 /** The amount of storage quota used by different Google services. */ 4404
4405 /// The amount of storage quota used by different Google services.
4353 core.List<AboutQuotaBytesByService> quotaBytesByService; 4406 core.List<AboutQuotaBytesByService> quotaBytesByService;
4354 /** The total number of quota bytes. */ 4407
4408 /// The total number of quota bytes.
4355 core.String quotaBytesTotal; 4409 core.String quotaBytesTotal;
4356 /** The number of quota bytes used by Google Drive. */ 4410
4411 /// The number of quota bytes used by Google Drive.
4357 core.String quotaBytesUsed; 4412 core.String quotaBytesUsed;
4358 /** 4413
4359 * The number of quota bytes used by all Google apps (Drive, Picasa, etc.). 4414 /// The number of quota bytes used by all Google apps (Drive, Picasa, etc.).
4360 */
4361 core.String quotaBytesUsedAggregate; 4415 core.String quotaBytesUsedAggregate;
4362 /** The number of quota bytes used by trashed items. */ 4416
4417 /// The number of quota bytes used by trashed items.
4363 core.String quotaBytesUsedInTrash; 4418 core.String quotaBytesUsedInTrash;
4364 /** 4419
4365 * The type of the user's storage quota. Possible values are: 4420 /// The type of the user's storage quota. Possible values are:
4366 * - LIMITED 4421 /// - LIMITED
4367 * - UNLIMITED 4422 /// - UNLIMITED
4368 */
4369 core.String quotaType; 4423 core.String quotaType;
4370 /** The number of remaining change ids, limited to no more than 2500. */ 4424
4425 /// The number of remaining change ids, limited to no more than 2500.
4371 core.String remainingChangeIds; 4426 core.String remainingChangeIds;
4372 /** The id of the root folder. */ 4427
4428 /// The id of the root folder.
4373 core.String rootFolderId; 4429 core.String rootFolderId;
4374 /** A link back to this item. */ 4430
4431 /// A link back to this item.
4375 core.String selfLink; 4432 core.String selfLink;
4376 /** A list of themes that are supported for Team Drives. */ 4433
4434 /// A list of themes that are supported for Team Drives.
4377 core.List<AboutTeamDriveThemes> teamDriveThemes; 4435 core.List<AboutTeamDriveThemes> teamDriveThemes;
4378 /** The authenticated user. */ 4436
4437 /// The authenticated user.
4379 User user; 4438 User user;
4380 4439
4381 About(); 4440 About();
4382 4441
4383 About.fromJson(core.Map _json) { 4442 About.fromJson(core.Map _json) {
4384 if (_json.containsKey("additionalRoleInfo")) { 4443 if (_json.containsKey("additionalRoleInfo")) {
4385 additionalRoleInfo = _json["additionalRoleInfo"].map((value) => new AboutA dditionalRoleInfo.fromJson(value)).toList(); 4444 additionalRoleInfo = _json["additionalRoleInfo"]
4445 .map((value) => new AboutAdditionalRoleInfo.fromJson(value))
4446 .toList();
4386 } 4447 }
4387 if (_json.containsKey("domainSharingPolicy")) { 4448 if (_json.containsKey("domainSharingPolicy")) {
4388 domainSharingPolicy = _json["domainSharingPolicy"]; 4449 domainSharingPolicy = _json["domainSharingPolicy"];
4389 } 4450 }
4390 if (_json.containsKey("etag")) { 4451 if (_json.containsKey("etag")) {
4391 etag = _json["etag"]; 4452 etag = _json["etag"];
4392 } 4453 }
4393 if (_json.containsKey("exportFormats")) { 4454 if (_json.containsKey("exportFormats")) {
4394 exportFormats = _json["exportFormats"].map((value) => new AboutExportForma ts.fromJson(value)).toList(); 4455 exportFormats = _json["exportFormats"]
4456 .map((value) => new AboutExportFormats.fromJson(value))
4457 .toList();
4395 } 4458 }
4396 if (_json.containsKey("features")) { 4459 if (_json.containsKey("features")) {
4397 features = _json["features"].map((value) => new AboutFeatures.fromJson(val ue)).toList(); 4460 features = _json["features"]
4461 .map((value) => new AboutFeatures.fromJson(value))
4462 .toList();
4398 } 4463 }
4399 if (_json.containsKey("folderColorPalette")) { 4464 if (_json.containsKey("folderColorPalette")) {
4400 folderColorPalette = _json["folderColorPalette"]; 4465 folderColorPalette = _json["folderColorPalette"];
4401 } 4466 }
4402 if (_json.containsKey("importFormats")) { 4467 if (_json.containsKey("importFormats")) {
4403 importFormats = _json["importFormats"].map((value) => new AboutImportForma ts.fromJson(value)).toList(); 4468 importFormats = _json["importFormats"]
4469 .map((value) => new AboutImportFormats.fromJson(value))
4470 .toList();
4404 } 4471 }
4405 if (_json.containsKey("isCurrentAppInstalled")) { 4472 if (_json.containsKey("isCurrentAppInstalled")) {
4406 isCurrentAppInstalled = _json["isCurrentAppInstalled"]; 4473 isCurrentAppInstalled = _json["isCurrentAppInstalled"];
4407 } 4474 }
4408 if (_json.containsKey("kind")) { 4475 if (_json.containsKey("kind")) {
4409 kind = _json["kind"]; 4476 kind = _json["kind"];
4410 } 4477 }
4411 if (_json.containsKey("languageCode")) { 4478 if (_json.containsKey("languageCode")) {
4412 languageCode = _json["languageCode"]; 4479 languageCode = _json["languageCode"];
4413 } 4480 }
4414 if (_json.containsKey("largestChangeId")) { 4481 if (_json.containsKey("largestChangeId")) {
4415 largestChangeId = _json["largestChangeId"]; 4482 largestChangeId = _json["largestChangeId"];
4416 } 4483 }
4417 if (_json.containsKey("maxUploadSizes")) { 4484 if (_json.containsKey("maxUploadSizes")) {
4418 maxUploadSizes = _json["maxUploadSizes"].map((value) => new AboutMaxUpload Sizes.fromJson(value)).toList(); 4485 maxUploadSizes = _json["maxUploadSizes"]
4486 .map((value) => new AboutMaxUploadSizes.fromJson(value))
4487 .toList();
4419 } 4488 }
4420 if (_json.containsKey("name")) { 4489 if (_json.containsKey("name")) {
4421 name = _json["name"]; 4490 name = _json["name"];
4422 } 4491 }
4423 if (_json.containsKey("permissionId")) { 4492 if (_json.containsKey("permissionId")) {
4424 permissionId = _json["permissionId"]; 4493 permissionId = _json["permissionId"];
4425 } 4494 }
4426 if (_json.containsKey("quotaBytesByService")) { 4495 if (_json.containsKey("quotaBytesByService")) {
4427 quotaBytesByService = _json["quotaBytesByService"].map((value) => new Abou tQuotaBytesByService.fromJson(value)).toList(); 4496 quotaBytesByService = _json["quotaBytesByService"]
4497 .map((value) => new AboutQuotaBytesByService.fromJson(value))
4498 .toList();
4428 } 4499 }
4429 if (_json.containsKey("quotaBytesTotal")) { 4500 if (_json.containsKey("quotaBytesTotal")) {
4430 quotaBytesTotal = _json["quotaBytesTotal"]; 4501 quotaBytesTotal = _json["quotaBytesTotal"];
4431 } 4502 }
4432 if (_json.containsKey("quotaBytesUsed")) { 4503 if (_json.containsKey("quotaBytesUsed")) {
4433 quotaBytesUsed = _json["quotaBytesUsed"]; 4504 quotaBytesUsed = _json["quotaBytesUsed"];
4434 } 4505 }
4435 if (_json.containsKey("quotaBytesUsedAggregate")) { 4506 if (_json.containsKey("quotaBytesUsedAggregate")) {
4436 quotaBytesUsedAggregate = _json["quotaBytesUsedAggregate"]; 4507 quotaBytesUsedAggregate = _json["quotaBytesUsedAggregate"];
4437 } 4508 }
4438 if (_json.containsKey("quotaBytesUsedInTrash")) { 4509 if (_json.containsKey("quotaBytesUsedInTrash")) {
4439 quotaBytesUsedInTrash = _json["quotaBytesUsedInTrash"]; 4510 quotaBytesUsedInTrash = _json["quotaBytesUsedInTrash"];
4440 } 4511 }
4441 if (_json.containsKey("quotaType")) { 4512 if (_json.containsKey("quotaType")) {
4442 quotaType = _json["quotaType"]; 4513 quotaType = _json["quotaType"];
4443 } 4514 }
4444 if (_json.containsKey("remainingChangeIds")) { 4515 if (_json.containsKey("remainingChangeIds")) {
4445 remainingChangeIds = _json["remainingChangeIds"]; 4516 remainingChangeIds = _json["remainingChangeIds"];
4446 } 4517 }
4447 if (_json.containsKey("rootFolderId")) { 4518 if (_json.containsKey("rootFolderId")) {
4448 rootFolderId = _json["rootFolderId"]; 4519 rootFolderId = _json["rootFolderId"];
4449 } 4520 }
4450 if (_json.containsKey("selfLink")) { 4521 if (_json.containsKey("selfLink")) {
4451 selfLink = _json["selfLink"]; 4522 selfLink = _json["selfLink"];
4452 } 4523 }
4453 if (_json.containsKey("teamDriveThemes")) { 4524 if (_json.containsKey("teamDriveThemes")) {
4454 teamDriveThemes = _json["teamDriveThemes"].map((value) => new AboutTeamDri veThemes.fromJson(value)).toList(); 4525 teamDriveThemes = _json["teamDriveThemes"]
4526 .map((value) => new AboutTeamDriveThemes.fromJson(value))
4527 .toList();
4455 } 4528 }
4456 if (_json.containsKey("user")) { 4529 if (_json.containsKey("user")) {
4457 user = new User.fromJson(_json["user"]); 4530 user = new User.fromJson(_json["user"]);
4458 } 4531 }
4459 } 4532 }
4460 4533
4461 core.Map<core.String, core.Object> toJson() { 4534 core.Map<core.String, core.Object> toJson() {
4462 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4535 final core.Map<core.String, core.Object> _json =
4536 new core.Map<core.String, core.Object>();
4463 if (additionalRoleInfo != null) { 4537 if (additionalRoleInfo != null) {
4464 _json["additionalRoleInfo"] = additionalRoleInfo.map((value) => (value).to Json()).toList(); 4538 _json["additionalRoleInfo"] =
4539 additionalRoleInfo.map((value) => (value).toJson()).toList();
4465 } 4540 }
4466 if (domainSharingPolicy != null) { 4541 if (domainSharingPolicy != null) {
4467 _json["domainSharingPolicy"] = domainSharingPolicy; 4542 _json["domainSharingPolicy"] = domainSharingPolicy;
4468 } 4543 }
4469 if (etag != null) { 4544 if (etag != null) {
4470 _json["etag"] = etag; 4545 _json["etag"] = etag;
4471 } 4546 }
4472 if (exportFormats != null) { 4547 if (exportFormats != null) {
4473 _json["exportFormats"] = exportFormats.map((value) => (value).toJson()).to List(); 4548 _json["exportFormats"] =
4549 exportFormats.map((value) => (value).toJson()).toList();
4474 } 4550 }
4475 if (features != null) { 4551 if (features != null) {
4476 _json["features"] = features.map((value) => (value).toJson()).toList(); 4552 _json["features"] = features.map((value) => (value).toJson()).toList();
4477 } 4553 }
4478 if (folderColorPalette != null) { 4554 if (folderColorPalette != null) {
4479 _json["folderColorPalette"] = folderColorPalette; 4555 _json["folderColorPalette"] = folderColorPalette;
4480 } 4556 }
4481 if (importFormats != null) { 4557 if (importFormats != null) {
4482 _json["importFormats"] = importFormats.map((value) => (value).toJson()).to List(); 4558 _json["importFormats"] =
4559 importFormats.map((value) => (value).toJson()).toList();
4483 } 4560 }
4484 if (isCurrentAppInstalled != null) { 4561 if (isCurrentAppInstalled != null) {
4485 _json["isCurrentAppInstalled"] = isCurrentAppInstalled; 4562 _json["isCurrentAppInstalled"] = isCurrentAppInstalled;
4486 } 4563 }
4487 if (kind != null) { 4564 if (kind != null) {
4488 _json["kind"] = kind; 4565 _json["kind"] = kind;
4489 } 4566 }
4490 if (languageCode != null) { 4567 if (languageCode != null) {
4491 _json["languageCode"] = languageCode; 4568 _json["languageCode"] = languageCode;
4492 } 4569 }
4493 if (largestChangeId != null) { 4570 if (largestChangeId != null) {
4494 _json["largestChangeId"] = largestChangeId; 4571 _json["largestChangeId"] = largestChangeId;
4495 } 4572 }
4496 if (maxUploadSizes != null) { 4573 if (maxUploadSizes != null) {
4497 _json["maxUploadSizes"] = maxUploadSizes.map((value) => (value).toJson()). toList(); 4574 _json["maxUploadSizes"] =
4575 maxUploadSizes.map((value) => (value).toJson()).toList();
4498 } 4576 }
4499 if (name != null) { 4577 if (name != null) {
4500 _json["name"] = name; 4578 _json["name"] = name;
4501 } 4579 }
4502 if (permissionId != null) { 4580 if (permissionId != null) {
4503 _json["permissionId"] = permissionId; 4581 _json["permissionId"] = permissionId;
4504 } 4582 }
4505 if (quotaBytesByService != null) { 4583 if (quotaBytesByService != null) {
4506 _json["quotaBytesByService"] = quotaBytesByService.map((value) => (value). toJson()).toList(); 4584 _json["quotaBytesByService"] =
4585 quotaBytesByService.map((value) => (value).toJson()).toList();
4507 } 4586 }
4508 if (quotaBytesTotal != null) { 4587 if (quotaBytesTotal != null) {
4509 _json["quotaBytesTotal"] = quotaBytesTotal; 4588 _json["quotaBytesTotal"] = quotaBytesTotal;
4510 } 4589 }
4511 if (quotaBytesUsed != null) { 4590 if (quotaBytesUsed != null) {
4512 _json["quotaBytesUsed"] = quotaBytesUsed; 4591 _json["quotaBytesUsed"] = quotaBytesUsed;
4513 } 4592 }
4514 if (quotaBytesUsedAggregate != null) { 4593 if (quotaBytesUsedAggregate != null) {
4515 _json["quotaBytesUsedAggregate"] = quotaBytesUsedAggregate; 4594 _json["quotaBytesUsedAggregate"] = quotaBytesUsedAggregate;
4516 } 4595 }
4517 if (quotaBytesUsedInTrash != null) { 4596 if (quotaBytesUsedInTrash != null) {
4518 _json["quotaBytesUsedInTrash"] = quotaBytesUsedInTrash; 4597 _json["quotaBytesUsedInTrash"] = quotaBytesUsedInTrash;
4519 } 4598 }
4520 if (quotaType != null) { 4599 if (quotaType != null) {
4521 _json["quotaType"] = quotaType; 4600 _json["quotaType"] = quotaType;
4522 } 4601 }
4523 if (remainingChangeIds != null) { 4602 if (remainingChangeIds != null) {
4524 _json["remainingChangeIds"] = remainingChangeIds; 4603 _json["remainingChangeIds"] = remainingChangeIds;
4525 } 4604 }
4526 if (rootFolderId != null) { 4605 if (rootFolderId != null) {
4527 _json["rootFolderId"] = rootFolderId; 4606 _json["rootFolderId"] = rootFolderId;
4528 } 4607 }
4529 if (selfLink != null) { 4608 if (selfLink != null) {
4530 _json["selfLink"] = selfLink; 4609 _json["selfLink"] = selfLink;
4531 } 4610 }
4532 if (teamDriveThemes != null) { 4611 if (teamDriveThemes != null) {
4533 _json["teamDriveThemes"] = teamDriveThemes.map((value) => (value).toJson() ).toList(); 4612 _json["teamDriveThemes"] =
4613 teamDriveThemes.map((value) => (value).toJson()).toList();
4534 } 4614 }
4535 if (user != null) { 4615 if (user != null) {
4536 _json["user"] = (user).toJson(); 4616 _json["user"] = (user).toJson();
4537 } 4617 }
4538 return _json; 4618 return _json;
4539 } 4619 }
4540 } 4620 }
4541 4621
4542 class AppIcons { 4622 class AppIcons {
4543 /** 4623 /// Category of the icon. Allowed values are:
4544 * Category of the icon. Allowed values are: 4624 /// - application - icon for the application
4545 * - application - icon for the application 4625 /// - document - icon for a file associated with the app
4546 * - document - icon for a file associated with the app 4626 /// - documentShared - icon for a shared file associated with the app
4547 * - documentShared - icon for a shared file associated with the app
4548 */
4549 core.String category; 4627 core.String category;
4550 /** URL for the icon. */ 4628
4629 /// URL for the icon.
4551 core.String iconUrl; 4630 core.String iconUrl;
4552 /** Size of the icon. Represented as the maximum of the width and height. */ 4631
4632 /// Size of the icon. Represented as the maximum of the width and height.
4553 core.int size; 4633 core.int size;
4554 4634
4555 AppIcons(); 4635 AppIcons();
4556 4636
4557 AppIcons.fromJson(core.Map _json) { 4637 AppIcons.fromJson(core.Map _json) {
4558 if (_json.containsKey("category")) { 4638 if (_json.containsKey("category")) {
4559 category = _json["category"]; 4639 category = _json["category"];
4560 } 4640 }
4561 if (_json.containsKey("iconUrl")) { 4641 if (_json.containsKey("iconUrl")) {
4562 iconUrl = _json["iconUrl"]; 4642 iconUrl = _json["iconUrl"];
4563 } 4643 }
4564 if (_json.containsKey("size")) { 4644 if (_json.containsKey("size")) {
4565 size = _json["size"]; 4645 size = _json["size"];
4566 } 4646 }
4567 } 4647 }
4568 4648
4569 core.Map<core.String, core.Object> toJson() { 4649 core.Map<core.String, core.Object> toJson() {
4570 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4650 final core.Map<core.String, core.Object> _json =
4651 new core.Map<core.String, core.Object>();
4571 if (category != null) { 4652 if (category != null) {
4572 _json["category"] = category; 4653 _json["category"] = category;
4573 } 4654 }
4574 if (iconUrl != null) { 4655 if (iconUrl != null) {
4575 _json["iconUrl"] = iconUrl; 4656 _json["iconUrl"] = iconUrl;
4576 } 4657 }
4577 if (size != null) { 4658 if (size != null) {
4578 _json["size"] = size; 4659 _json["size"] = size;
4579 } 4660 }
4580 return _json; 4661 return _json;
4581 } 4662 }
4582 } 4663 }
4583 4664
4584 /** 4665 /// The apps resource provides a list of the apps that a user has installed,
4585 * The apps resource provides a list of the apps that a user has installed, with 4666 /// with information about each app's supported MIME types, file extensions,
4586 * information about each app's supported MIME types, file extensions, and other 4667 /// and other details.
4587 * details.
4588 */
4589 class App { 4668 class App {
4590 /** Whether the app is authorized to access data on the user's Drive. */ 4669 /// Whether the app is authorized to access data on the user's Drive.
4591 core.bool authorized; 4670 core.bool authorized;
4592 /** 4671
4593 * The template url to create a new file with this app in a given folder. The 4672 /// The template url to create a new file with this app in a given folder.
4594 * template will contain {folderId} to be replaced by the folder to create the 4673 /// The template will contain {folderId} to be replaced by the folder to
4595 * new file in. 4674 /// create the new file in.
4596 */
4597 core.String createInFolderTemplate; 4675 core.String createInFolderTemplate;
4598 /** The url to create a new file with this app. */ 4676
4677 /// The url to create a new file with this app.
4599 core.String createUrl; 4678 core.String createUrl;
4600 /** 4679
4601 * Whether the app has drive-wide scope. An app with drive-wide scope can 4680 /// Whether the app has drive-wide scope. An app with drive-wide scope can
4602 * access all files in the user's drive. 4681 /// access all files in the user's drive.
4603 */
4604 core.bool hasDriveWideScope; 4682 core.bool hasDriveWideScope;
4605 /** The various icons for the app. */ 4683
4684 /// The various icons for the app.
4606 core.List<AppIcons> icons; 4685 core.List<AppIcons> icons;
4607 /** The ID of the app. */ 4686
4687 /// The ID of the app.
4608 core.String id; 4688 core.String id;
4609 /** Whether the app is installed. */ 4689
4690 /// Whether the app is installed.
4610 core.bool installed; 4691 core.bool installed;
4611 /** This is always drive#app. */ 4692
4693 /// This is always drive#app.
4612 core.String kind; 4694 core.String kind;
4613 /** A long description of the app. */ 4695
4696 /// A long description of the app.
4614 core.String longDescription; 4697 core.String longDescription;
4615 /** The name of the app. */ 4698
4699 /// The name of the app.
4616 core.String name; 4700 core.String name;
4617 /** 4701
4618 * The type of object this app creates (e.g. Chart). If empty, the app name 4702 /// The type of object this app creates (e.g. Chart). If empty, the app name
4619 * should be used instead. 4703 /// should be used instead.
4620 */
4621 core.String objectType; 4704 core.String objectType;
4622 /** 4705
4623 * The template url for opening files with this app. The template will contain 4706 /// The template url for opening files with this app. The template will
4624 * {ids} and/or {exportIds} to be replaced by the actual file ids. See Open 4707 /// contain {ids} and/or {exportIds} to be replaced by the actual file ids.
4625 * Files for the full documentation. 4708 /// See Open Files for the full documentation.
4626 */
4627 core.String openUrlTemplate; 4709 core.String openUrlTemplate;
4628 /** The list of primary file extensions. */ 4710
4711 /// The list of primary file extensions.
4629 core.List<core.String> primaryFileExtensions; 4712 core.List<core.String> primaryFileExtensions;
4630 /** The list of primary mime types. */ 4713
4714 /// The list of primary mime types.
4631 core.List<core.String> primaryMimeTypes; 4715 core.List<core.String> primaryMimeTypes;
4632 /** The ID of the product listing for this app. */ 4716
4717 /// The ID of the product listing for this app.
4633 core.String productId; 4718 core.String productId;
4634 /** A link to the product listing for this app. */ 4719
4720 /// A link to the product listing for this app.
4635 core.String productUrl; 4721 core.String productUrl;
4636 /** The list of secondary file extensions. */ 4722
4723 /// The list of secondary file extensions.
4637 core.List<core.String> secondaryFileExtensions; 4724 core.List<core.String> secondaryFileExtensions;
4638 /** The list of secondary mime types. */ 4725
4726 /// The list of secondary mime types.
4639 core.List<core.String> secondaryMimeTypes; 4727 core.List<core.String> secondaryMimeTypes;
4640 /** A short description of the app. */ 4728
4729 /// A short description of the app.
4641 core.String shortDescription; 4730 core.String shortDescription;
4642 /** Whether this app supports creating new objects. */ 4731
4732 /// Whether this app supports creating new objects.
4643 core.bool supportsCreate; 4733 core.bool supportsCreate;
4644 /** Whether this app supports importing Google Docs. */ 4734
4735 /// Whether this app supports importing Google Docs.
4645 core.bool supportsImport; 4736 core.bool supportsImport;
4646 /** Whether this app supports opening more than one file. */ 4737
4738 /// Whether this app supports opening more than one file.
4647 core.bool supportsMultiOpen; 4739 core.bool supportsMultiOpen;
4648 /** Whether this app supports creating new files when offline. */ 4740
4741 /// Whether this app supports creating new files when offline.
4649 core.bool supportsOfflineCreate; 4742 core.bool supportsOfflineCreate;
4650 /** 4743
4651 * Whether the app is selected as the default handler for the types it 4744 /// Whether the app is selected as the default handler for the types it
4652 * supports. 4745 /// supports.
4653 */
4654 core.bool useByDefault; 4746 core.bool useByDefault;
4655 4747
4656 App(); 4748 App();
4657 4749
4658 App.fromJson(core.Map _json) { 4750 App.fromJson(core.Map _json) {
4659 if (_json.containsKey("authorized")) { 4751 if (_json.containsKey("authorized")) {
4660 authorized = _json["authorized"]; 4752 authorized = _json["authorized"];
4661 } 4753 }
4662 if (_json.containsKey("createInFolderTemplate")) { 4754 if (_json.containsKey("createInFolderTemplate")) {
4663 createInFolderTemplate = _json["createInFolderTemplate"]; 4755 createInFolderTemplate = _json["createInFolderTemplate"];
4664 } 4756 }
4665 if (_json.containsKey("createUrl")) { 4757 if (_json.containsKey("createUrl")) {
4666 createUrl = _json["createUrl"]; 4758 createUrl = _json["createUrl"];
4667 } 4759 }
4668 if (_json.containsKey("hasDriveWideScope")) { 4760 if (_json.containsKey("hasDriveWideScope")) {
4669 hasDriveWideScope = _json["hasDriveWideScope"]; 4761 hasDriveWideScope = _json["hasDriveWideScope"];
4670 } 4762 }
4671 if (_json.containsKey("icons")) { 4763 if (_json.containsKey("icons")) {
4672 icons = _json["icons"].map((value) => new AppIcons.fromJson(value)).toList (); 4764 icons =
4765 _json["icons"].map((value) => new AppIcons.fromJson(value)).toList();
4673 } 4766 }
4674 if (_json.containsKey("id")) { 4767 if (_json.containsKey("id")) {
4675 id = _json["id"]; 4768 id = _json["id"];
4676 } 4769 }
4677 if (_json.containsKey("installed")) { 4770 if (_json.containsKey("installed")) {
4678 installed = _json["installed"]; 4771 installed = _json["installed"];
4679 } 4772 }
4680 if (_json.containsKey("kind")) { 4773 if (_json.containsKey("kind")) {
4681 kind = _json["kind"]; 4774 kind = _json["kind"];
4682 } 4775 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
4724 } 4817 }
4725 if (_json.containsKey("supportsOfflineCreate")) { 4818 if (_json.containsKey("supportsOfflineCreate")) {
4726 supportsOfflineCreate = _json["supportsOfflineCreate"]; 4819 supportsOfflineCreate = _json["supportsOfflineCreate"];
4727 } 4820 }
4728 if (_json.containsKey("useByDefault")) { 4821 if (_json.containsKey("useByDefault")) {
4729 useByDefault = _json["useByDefault"]; 4822 useByDefault = _json["useByDefault"];
4730 } 4823 }
4731 } 4824 }
4732 4825
4733 core.Map<core.String, core.Object> toJson() { 4826 core.Map<core.String, core.Object> toJson() {
4734 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4827 final core.Map<core.String, core.Object> _json =
4828 new core.Map<core.String, core.Object>();
4735 if (authorized != null) { 4829 if (authorized != null) {
4736 _json["authorized"] = authorized; 4830 _json["authorized"] = authorized;
4737 } 4831 }
4738 if (createInFolderTemplate != null) { 4832 if (createInFolderTemplate != null) {
4739 _json["createInFolderTemplate"] = createInFolderTemplate; 4833 _json["createInFolderTemplate"] = createInFolderTemplate;
4740 } 4834 }
4741 if (createUrl != null) { 4835 if (createUrl != null) {
4742 _json["createUrl"] = createUrl; 4836 _json["createUrl"] = createUrl;
4743 } 4837 }
4744 if (hasDriveWideScope != null) { 4838 if (hasDriveWideScope != null) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
4801 if (supportsOfflineCreate != null) { 4895 if (supportsOfflineCreate != null) {
4802 _json["supportsOfflineCreate"] = supportsOfflineCreate; 4896 _json["supportsOfflineCreate"] = supportsOfflineCreate;
4803 } 4897 }
4804 if (useByDefault != null) { 4898 if (useByDefault != null) {
4805 _json["useByDefault"] = useByDefault; 4899 _json["useByDefault"] = useByDefault;
4806 } 4900 }
4807 return _json; 4901 return _json;
4808 } 4902 }
4809 } 4903 }
4810 4904
4811 /** 4905 /// A list of third-party applications which the user has installed or given
4812 * A list of third-party applications which the user has installed or given 4906 /// access to Google Drive.
4813 * access to Google Drive.
4814 */
4815 class AppList { 4907 class AppList {
4816 /** 4908 /// List of app IDs that the user has specified to use by default. The list
4817 * List of app IDs that the user has specified to use by default. The list is 4909 /// is in reverse-priority order (lowest to highest).
4818 * in reverse-priority order (lowest to highest).
4819 */
4820 core.List<core.String> defaultAppIds; 4910 core.List<core.String> defaultAppIds;
4821 /** The ETag of the list. */ 4911
4912 /// The ETag of the list.
4822 core.String etag; 4913 core.String etag;
4823 /** The list of apps. */ 4914
4915 /// The list of apps.
4824 core.List<App> items; 4916 core.List<App> items;
4825 /** This is always drive#appList. */ 4917
4918 /// This is always drive#appList.
4826 core.String kind; 4919 core.String kind;
4827 /** A link back to this list. */ 4920
4921 /// A link back to this list.
4828 core.String selfLink; 4922 core.String selfLink;
4829 4923
4830 AppList(); 4924 AppList();
4831 4925
4832 AppList.fromJson(core.Map _json) { 4926 AppList.fromJson(core.Map _json) {
4833 if (_json.containsKey("defaultAppIds")) { 4927 if (_json.containsKey("defaultAppIds")) {
4834 defaultAppIds = _json["defaultAppIds"]; 4928 defaultAppIds = _json["defaultAppIds"];
4835 } 4929 }
4836 if (_json.containsKey("etag")) { 4930 if (_json.containsKey("etag")) {
4837 etag = _json["etag"]; 4931 etag = _json["etag"];
4838 } 4932 }
4839 if (_json.containsKey("items")) { 4933 if (_json.containsKey("items")) {
4840 items = _json["items"].map((value) => new App.fromJson(value)).toList(); 4934 items = _json["items"].map((value) => new App.fromJson(value)).toList();
4841 } 4935 }
4842 if (_json.containsKey("kind")) { 4936 if (_json.containsKey("kind")) {
4843 kind = _json["kind"]; 4937 kind = _json["kind"];
4844 } 4938 }
4845 if (_json.containsKey("selfLink")) { 4939 if (_json.containsKey("selfLink")) {
4846 selfLink = _json["selfLink"]; 4940 selfLink = _json["selfLink"];
4847 } 4941 }
4848 } 4942 }
4849 4943
4850 core.Map<core.String, core.Object> toJson() { 4944 core.Map<core.String, core.Object> toJson() {
4851 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4945 final core.Map<core.String, core.Object> _json =
4946 new core.Map<core.String, core.Object>();
4852 if (defaultAppIds != null) { 4947 if (defaultAppIds != null) {
4853 _json["defaultAppIds"] = defaultAppIds; 4948 _json["defaultAppIds"] = defaultAppIds;
4854 } 4949 }
4855 if (etag != null) { 4950 if (etag != null) {
4856 _json["etag"] = etag; 4951 _json["etag"] = etag;
4857 } 4952 }
4858 if (items != null) { 4953 if (items != null) {
4859 _json["items"] = items.map((value) => (value).toJson()).toList(); 4954 _json["items"] = items.map((value) => (value).toJson()).toList();
4860 } 4955 }
4861 if (kind != null) { 4956 if (kind != null) {
4862 _json["kind"] = kind; 4957 _json["kind"] = kind;
4863 } 4958 }
4864 if (selfLink != null) { 4959 if (selfLink != null) {
4865 _json["selfLink"] = selfLink; 4960 _json["selfLink"] = selfLink;
4866 } 4961 }
4867 return _json; 4962 return _json;
4868 } 4963 }
4869 } 4964 }
4870 4965
4871 /** Representation of a change to a file or Team Drive. */ 4966 /// Representation of a change to a file or Team Drive.
4872 class Change { 4967 class Change {
4873 /** 4968 /// Whether the file or Team Drive has been removed from this list of
4874 * Whether the file or Team Drive has been removed from this list of changes, 4969 /// changes, for example by deletion or loss of access.
4875 * for example by deletion or loss of access.
4876 */
4877 core.bool deleted; 4970 core.bool deleted;
4878 /** 4971
4879 * The updated state of the file. Present if the type is file and the file has 4972 /// The updated state of the file. Present if the type is file and the file
4880 * not been removed from this list of changes. 4973 /// has not been removed from this list of changes.
4881 */
4882 File file; 4974 File file;
4883 /** The ID of the file associated with this change. */ 4975
4976 /// The ID of the file associated with this change.
4884 core.String fileId; 4977 core.String fileId;
4885 /** The ID of the change. */ 4978
4979 /// The ID of the change.
4886 core.String id; 4980 core.String id;
4887 /** This is always drive#change. */ 4981
4982 /// This is always drive#change.
4888 core.String kind; 4983 core.String kind;
4889 /** The time of this modification. */ 4984
4985 /// The time of this modification.
4890 core.DateTime modificationDate; 4986 core.DateTime modificationDate;
4891 /** A link back to this change. */ 4987
4988 /// A link back to this change.
4892 core.String selfLink; 4989 core.String selfLink;
4893 /** 4990
4894 * The updated state of the Team Drive. Present if the type is teamDrive, the 4991 /// The updated state of the Team Drive. Present if the type is teamDrive,
4895 * user is still a member of the Team Drive, and the Team Drive has not been 4992 /// the user is still a member of the Team Drive, and the Team Drive has not
4896 * deleted. 4993 /// been deleted.
4897 */
4898 TeamDrive teamDrive; 4994 TeamDrive teamDrive;
4899 /** The ID of the Team Drive associated with this change. */ 4995
4996 /// The ID of the Team Drive associated with this change.
4900 core.String teamDriveId; 4997 core.String teamDriveId;
4901 /** The type of the change. Possible values are file and teamDrive. */ 4998
4999 /// The type of the change. Possible values are file and teamDrive.
4902 core.String type; 5000 core.String type;
4903 5001
4904 Change(); 5002 Change();
4905 5003
4906 Change.fromJson(core.Map _json) { 5004 Change.fromJson(core.Map _json) {
4907 if (_json.containsKey("deleted")) { 5005 if (_json.containsKey("deleted")) {
4908 deleted = _json["deleted"]; 5006 deleted = _json["deleted"];
4909 } 5007 }
4910 if (_json.containsKey("file")) { 5008 if (_json.containsKey("file")) {
4911 file = new File.fromJson(_json["file"]); 5009 file = new File.fromJson(_json["file"]);
(...skipping 18 matching lines...) Expand all
4930 } 5028 }
4931 if (_json.containsKey("teamDriveId")) { 5029 if (_json.containsKey("teamDriveId")) {
4932 teamDriveId = _json["teamDriveId"]; 5030 teamDriveId = _json["teamDriveId"];
4933 } 5031 }
4934 if (_json.containsKey("type")) { 5032 if (_json.containsKey("type")) {
4935 type = _json["type"]; 5033 type = _json["type"];
4936 } 5034 }
4937 } 5035 }
4938 5036
4939 core.Map<core.String, core.Object> toJson() { 5037 core.Map<core.String, core.Object> toJson() {
4940 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5038 final core.Map<core.String, core.Object> _json =
5039 new core.Map<core.String, core.Object>();
4941 if (deleted != null) { 5040 if (deleted != null) {
4942 _json["deleted"] = deleted; 5041 _json["deleted"] = deleted;
4943 } 5042 }
4944 if (file != null) { 5043 if (file != null) {
4945 _json["file"] = (file).toJson(); 5044 _json["file"] = (file).toJson();
4946 } 5045 }
4947 if (fileId != null) { 5046 if (fileId != null) {
4948 _json["fileId"] = fileId; 5047 _json["fileId"] = fileId;
4949 } 5048 }
4950 if (id != null) { 5049 if (id != null) {
(...skipping 14 matching lines...) Expand all
4965 if (teamDriveId != null) { 5064 if (teamDriveId != null) {
4966 _json["teamDriveId"] = teamDriveId; 5065 _json["teamDriveId"] = teamDriveId;
4967 } 5066 }
4968 if (type != null) { 5067 if (type != null) {
4969 _json["type"] = type; 5068 _json["type"] = type;
4970 } 5069 }
4971 return _json; 5070 return _json;
4972 } 5071 }
4973 } 5072 }
4974 5073
4975 /** A list of changes for a user. */ 5074 /// A list of changes for a user.
4976 class ChangeList { 5075 class ChangeList {
4977 /** The ETag of the list. */ 5076 /// The ETag of the list.
4978 core.String etag; 5077 core.String etag;
4979 /** 5078
4980 * The list of changes. If nextPageToken is populated, then this list may be 5079 /// The list of changes. If nextPageToken is populated, then this list may be
4981 * incomplete and an additional page of results should be fetched. 5080 /// incomplete and an additional page of results should be fetched.
4982 */
4983 core.List<Change> items; 5081 core.List<Change> items;
4984 /** This is always drive#changeList. */ 5082
5083 /// This is always drive#changeList.
4985 core.String kind; 5084 core.String kind;
4986 /** The current largest change ID. */ 5085
5086 /// The current largest change ID.
4987 core.String largestChangeId; 5087 core.String largestChangeId;
4988 /** 5088
4989 * The starting page token for future changes. This will be present only if 5089 /// The starting page token for future changes. This will be present only if
4990 * the end of the current changes list has been reached. 5090 /// the end of the current changes list has been reached.
4991 */
4992 core.String newStartPageToken; 5091 core.String newStartPageToken;
4993 /** A link to the next page of changes. */ 5092
5093 /// A link to the next page of changes.
4994 core.String nextLink; 5094 core.String nextLink;
4995 /** 5095
4996 * The page token for the next page of changes. This will be absent if the end 5096 /// The page token for the next page of changes. This will be absent if the
4997 * of the changes list has been reached. If the token is rejected for any 5097 /// end of the changes list has been reached. If the token is rejected for
4998 * reason, it should be discarded, and pagination should be restarted from the 5098 /// any reason, it should be discarded, and pagination should be restarted
4999 * first page of results. 5099 /// from the first page of results.
5000 */
5001 core.String nextPageToken; 5100 core.String nextPageToken;
5002 /** A link back to this list. */ 5101
5102 /// A link back to this list.
5003 core.String selfLink; 5103 core.String selfLink;
5004 5104
5005 ChangeList(); 5105 ChangeList();
5006 5106
5007 ChangeList.fromJson(core.Map _json) { 5107 ChangeList.fromJson(core.Map _json) {
5008 if (_json.containsKey("etag")) { 5108 if (_json.containsKey("etag")) {
5009 etag = _json["etag"]; 5109 etag = _json["etag"];
5010 } 5110 }
5011 if (_json.containsKey("items")) { 5111 if (_json.containsKey("items")) {
5012 items = _json["items"].map((value) => new Change.fromJson(value)).toList() ; 5112 items =
5113 _json["items"].map((value) => new Change.fromJson(value)).toList();
5013 } 5114 }
5014 if (_json.containsKey("kind")) { 5115 if (_json.containsKey("kind")) {
5015 kind = _json["kind"]; 5116 kind = _json["kind"];
5016 } 5117 }
5017 if (_json.containsKey("largestChangeId")) { 5118 if (_json.containsKey("largestChangeId")) {
5018 largestChangeId = _json["largestChangeId"]; 5119 largestChangeId = _json["largestChangeId"];
5019 } 5120 }
5020 if (_json.containsKey("newStartPageToken")) { 5121 if (_json.containsKey("newStartPageToken")) {
5021 newStartPageToken = _json["newStartPageToken"]; 5122 newStartPageToken = _json["newStartPageToken"];
5022 } 5123 }
5023 if (_json.containsKey("nextLink")) { 5124 if (_json.containsKey("nextLink")) {
5024 nextLink = _json["nextLink"]; 5125 nextLink = _json["nextLink"];
5025 } 5126 }
5026 if (_json.containsKey("nextPageToken")) { 5127 if (_json.containsKey("nextPageToken")) {
5027 nextPageToken = _json["nextPageToken"]; 5128 nextPageToken = _json["nextPageToken"];
5028 } 5129 }
5029 if (_json.containsKey("selfLink")) { 5130 if (_json.containsKey("selfLink")) {
5030 selfLink = _json["selfLink"]; 5131 selfLink = _json["selfLink"];
5031 } 5132 }
5032 } 5133 }
5033 5134
5034 core.Map<core.String, core.Object> toJson() { 5135 core.Map<core.String, core.Object> toJson() {
5035 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5136 final core.Map<core.String, core.Object> _json =
5137 new core.Map<core.String, core.Object>();
5036 if (etag != null) { 5138 if (etag != null) {
5037 _json["etag"] = etag; 5139 _json["etag"] = etag;
5038 } 5140 }
5039 if (items != null) { 5141 if (items != null) {
5040 _json["items"] = items.map((value) => (value).toJson()).toList(); 5142 _json["items"] = items.map((value) => (value).toJson()).toList();
5041 } 5143 }
5042 if (kind != null) { 5144 if (kind != null) {
5043 _json["kind"] = kind; 5145 _json["kind"] = kind;
5044 } 5146 }
5045 if (largestChangeId != null) { 5147 if (largestChangeId != null) {
5046 _json["largestChangeId"] = largestChangeId; 5148 _json["largestChangeId"] = largestChangeId;
5047 } 5149 }
5048 if (newStartPageToken != null) { 5150 if (newStartPageToken != null) {
5049 _json["newStartPageToken"] = newStartPageToken; 5151 _json["newStartPageToken"] = newStartPageToken;
5050 } 5152 }
5051 if (nextLink != null) { 5153 if (nextLink != null) {
5052 _json["nextLink"] = nextLink; 5154 _json["nextLink"] = nextLink;
5053 } 5155 }
5054 if (nextPageToken != null) { 5156 if (nextPageToken != null) {
5055 _json["nextPageToken"] = nextPageToken; 5157 _json["nextPageToken"] = nextPageToken;
5056 } 5158 }
5057 if (selfLink != null) { 5159 if (selfLink != null) {
5058 _json["selfLink"] = selfLink; 5160 _json["selfLink"] = selfLink;
5059 } 5161 }
5060 return _json; 5162 return _json;
5061 } 5163 }
5062 } 5164 }
5063 5165
5064 /** An notification channel used to watch for resource changes. */ 5166 /// An notification channel used to watch for resource changes.
5065 class Channel { 5167 class Channel {
5066 /** The address where notifications are delivered for this channel. */ 5168 /// The address where notifications are delivered for this channel.
5067 core.String address; 5169 core.String address;
5068 /** 5170
5069 * Date and time of notification channel expiration, expressed as a Unix 5171 /// Date and time of notification channel expiration, expressed as a Unix
5070 * timestamp, in milliseconds. Optional. 5172 /// timestamp, in milliseconds. Optional.
5071 */
5072 core.String expiration; 5173 core.String expiration;
5073 /** A UUID or similar unique string that identifies this channel. */ 5174
5175 /// A UUID or similar unique string that identifies this channel.
5074 core.String id; 5176 core.String id;
5075 /** 5177
5076 * Identifies this as a notification channel used to watch for changes to a 5178 /// Identifies this as a notification channel used to watch for changes to a
5077 * resource. Value: the fixed string "api#channel". 5179 /// resource. Value: the fixed string "api#channel".
5078 */
5079 core.String kind; 5180 core.String kind;
5080 /** Additional parameters controlling delivery channel behavior. Optional. */ 5181
5182 /// Additional parameters controlling delivery channel behavior. Optional.
5081 core.Map<core.String, core.String> params; 5183 core.Map<core.String, core.String> params;
5082 /** A Boolean value to indicate whether payload is wanted. Optional. */ 5184
5185 /// A Boolean value to indicate whether payload is wanted. Optional.
5083 core.bool payload; 5186 core.bool payload;
5084 /** 5187
5085 * An opaque ID that identifies the resource being watched on this channel. 5188 /// An opaque ID that identifies the resource being watched on this channel.
5086 * Stable across different API versions. 5189 /// Stable across different API versions.
5087 */
5088 core.String resourceId; 5190 core.String resourceId;
5089 /** A version-specific identifier for the watched resource. */ 5191
5192 /// A version-specific identifier for the watched resource.
5090 core.String resourceUri; 5193 core.String resourceUri;
5091 /** 5194
5092 * An arbitrary string delivered to the target address with each notification 5195 /// An arbitrary string delivered to the target address with each
5093 * delivered over this channel. Optional. 5196 /// notification delivered over this channel. Optional.
5094 */
5095 core.String token; 5197 core.String token;
5096 /** The type of delivery mechanism used for this channel. */ 5198
5199 /// The type of delivery mechanism used for this channel.
5097 core.String type; 5200 core.String type;
5098 5201
5099 Channel(); 5202 Channel();
5100 5203
5101 Channel.fromJson(core.Map _json) { 5204 Channel.fromJson(core.Map _json) {
5102 if (_json.containsKey("address")) { 5205 if (_json.containsKey("address")) {
5103 address = _json["address"]; 5206 address = _json["address"];
5104 } 5207 }
5105 if (_json.containsKey("expiration")) { 5208 if (_json.containsKey("expiration")) {
5106 expiration = _json["expiration"]; 5209 expiration = _json["expiration"];
(...skipping 18 matching lines...) Expand all
5125 } 5228 }
5126 if (_json.containsKey("token")) { 5229 if (_json.containsKey("token")) {
5127 token = _json["token"]; 5230 token = _json["token"];
5128 } 5231 }
5129 if (_json.containsKey("type")) { 5232 if (_json.containsKey("type")) {
5130 type = _json["type"]; 5233 type = _json["type"];
5131 } 5234 }
5132 } 5235 }
5133 5236
5134 core.Map<core.String, core.Object> toJson() { 5237 core.Map<core.String, core.Object> toJson() {
5135 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5238 final core.Map<core.String, core.Object> _json =
5239 new core.Map<core.String, core.Object>();
5136 if (address != null) { 5240 if (address != null) {
5137 _json["address"] = address; 5241 _json["address"] = address;
5138 } 5242 }
5139 if (expiration != null) { 5243 if (expiration != null) {
5140 _json["expiration"] = expiration; 5244 _json["expiration"] = expiration;
5141 } 5245 }
5142 if (id != null) { 5246 if (id != null) {
5143 _json["id"] = id; 5247 _json["id"] = id;
5144 } 5248 }
5145 if (kind != null) { 5249 if (kind != null) {
(...skipping 14 matching lines...) Expand all
5160 if (token != null) { 5264 if (token != null) {
5161 _json["token"] = token; 5265 _json["token"] = token;
5162 } 5266 }
5163 if (type != null) { 5267 if (type != null) {
5164 _json["type"] = type; 5268 _json["type"] = type;
5165 } 5269 }
5166 return _json; 5270 return _json;
5167 } 5271 }
5168 } 5272 }
5169 5273
5170 /** A list of children of a file. */ 5274 /// A list of children of a file.
5171 class ChildList { 5275 class ChildList {
5172 /** The ETag of the list. */ 5276 /// The ETag of the list.
5173 core.String etag; 5277 core.String etag;
5174 /** 5278
5175 * The list of children. If nextPageToken is populated, then this list may be 5279 /// The list of children. If nextPageToken is populated, then this list may
5176 * incomplete and an additional page of results should be fetched. 5280 /// be incomplete and an additional page of results should be fetched.
5177 */
5178 core.List<ChildReference> items; 5281 core.List<ChildReference> items;
5179 /** This is always drive#childList. */ 5282
5283 /// This is always drive#childList.
5180 core.String kind; 5284 core.String kind;
5181 /** A link to the next page of children. */ 5285
5286 /// A link to the next page of children.
5182 core.String nextLink; 5287 core.String nextLink;
5183 /** 5288
5184 * The page token for the next page of children. This will be absent if the 5289 /// The page token for the next page of children. This will be absent if the
5185 * end of the children list has been reached. If the token is rejected for any 5290 /// end of the children list has been reached. If the token is rejected for
5186 * reason, it should be discarded, and pagination should be restarted from the 5291 /// any reason, it should be discarded, and pagination should be restarted
5187 * first page of results. 5292 /// from the first page of results.
5188 */
5189 core.String nextPageToken; 5293 core.String nextPageToken;
5190 /** A link back to this list. */ 5294
5295 /// A link back to this list.
5191 core.String selfLink; 5296 core.String selfLink;
5192 5297
5193 ChildList(); 5298 ChildList();
5194 5299
5195 ChildList.fromJson(core.Map _json) { 5300 ChildList.fromJson(core.Map _json) {
5196 if (_json.containsKey("etag")) { 5301 if (_json.containsKey("etag")) {
5197 etag = _json["etag"]; 5302 etag = _json["etag"];
5198 } 5303 }
5199 if (_json.containsKey("items")) { 5304 if (_json.containsKey("items")) {
5200 items = _json["items"].map((value) => new ChildReference.fromJson(value)). toList(); 5305 items = _json["items"]
5306 .map((value) => new ChildReference.fromJson(value))
5307 .toList();
5201 } 5308 }
5202 if (_json.containsKey("kind")) { 5309 if (_json.containsKey("kind")) {
5203 kind = _json["kind"]; 5310 kind = _json["kind"];
5204 } 5311 }
5205 if (_json.containsKey("nextLink")) { 5312 if (_json.containsKey("nextLink")) {
5206 nextLink = _json["nextLink"]; 5313 nextLink = _json["nextLink"];
5207 } 5314 }
5208 if (_json.containsKey("nextPageToken")) { 5315 if (_json.containsKey("nextPageToken")) {
5209 nextPageToken = _json["nextPageToken"]; 5316 nextPageToken = _json["nextPageToken"];
5210 } 5317 }
5211 if (_json.containsKey("selfLink")) { 5318 if (_json.containsKey("selfLink")) {
5212 selfLink = _json["selfLink"]; 5319 selfLink = _json["selfLink"];
5213 } 5320 }
5214 } 5321 }
5215 5322
5216 core.Map<core.String, core.Object> toJson() { 5323 core.Map<core.String, core.Object> toJson() {
5217 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5324 final core.Map<core.String, core.Object> _json =
5325 new core.Map<core.String, core.Object>();
5218 if (etag != null) { 5326 if (etag != null) {
5219 _json["etag"] = etag; 5327 _json["etag"] = etag;
5220 } 5328 }
5221 if (items != null) { 5329 if (items != null) {
5222 _json["items"] = items.map((value) => (value).toJson()).toList(); 5330 _json["items"] = items.map((value) => (value).toJson()).toList();
5223 } 5331 }
5224 if (kind != null) { 5332 if (kind != null) {
5225 _json["kind"] = kind; 5333 _json["kind"] = kind;
5226 } 5334 }
5227 if (nextLink != null) { 5335 if (nextLink != null) {
5228 _json["nextLink"] = nextLink; 5336 _json["nextLink"] = nextLink;
5229 } 5337 }
5230 if (nextPageToken != null) { 5338 if (nextPageToken != null) {
5231 _json["nextPageToken"] = nextPageToken; 5339 _json["nextPageToken"] = nextPageToken;
5232 } 5340 }
5233 if (selfLink != null) { 5341 if (selfLink != null) {
5234 _json["selfLink"] = selfLink; 5342 _json["selfLink"] = selfLink;
5235 } 5343 }
5236 return _json; 5344 return _json;
5237 } 5345 }
5238 } 5346 }
5239 5347
5240 /** A reference to a folder's child. */ 5348 /// A reference to a folder's child.
5241 class ChildReference { 5349 class ChildReference {
5242 /** A link to the child. */ 5350 /// A link to the child.
5243 core.String childLink; 5351 core.String childLink;
5244 /** The ID of the child. */ 5352
5353 /// The ID of the child.
5245 core.String id; 5354 core.String id;
5246 /** This is always drive#childReference. */ 5355
5356 /// This is always drive#childReference.
5247 core.String kind; 5357 core.String kind;
5248 /** A link back to this reference. */ 5358
5359 /// A link back to this reference.
5249 core.String selfLink; 5360 core.String selfLink;
5250 5361
5251 ChildReference(); 5362 ChildReference();
5252 5363
5253 ChildReference.fromJson(core.Map _json) { 5364 ChildReference.fromJson(core.Map _json) {
5254 if (_json.containsKey("childLink")) { 5365 if (_json.containsKey("childLink")) {
5255 childLink = _json["childLink"]; 5366 childLink = _json["childLink"];
5256 } 5367 }
5257 if (_json.containsKey("id")) { 5368 if (_json.containsKey("id")) {
5258 id = _json["id"]; 5369 id = _json["id"];
5259 } 5370 }
5260 if (_json.containsKey("kind")) { 5371 if (_json.containsKey("kind")) {
5261 kind = _json["kind"]; 5372 kind = _json["kind"];
5262 } 5373 }
5263 if (_json.containsKey("selfLink")) { 5374 if (_json.containsKey("selfLink")) {
5264 selfLink = _json["selfLink"]; 5375 selfLink = _json["selfLink"];
5265 } 5376 }
5266 } 5377 }
5267 5378
5268 core.Map<core.String, core.Object> toJson() { 5379 core.Map<core.String, core.Object> toJson() {
5269 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5380 final core.Map<core.String, core.Object> _json =
5381 new core.Map<core.String, core.Object>();
5270 if (childLink != null) { 5382 if (childLink != null) {
5271 _json["childLink"] = childLink; 5383 _json["childLink"] = childLink;
5272 } 5384 }
5273 if (id != null) { 5385 if (id != null) {
5274 _json["id"] = id; 5386 _json["id"] = id;
5275 } 5387 }
5276 if (kind != null) { 5388 if (kind != null) {
5277 _json["kind"] = kind; 5389 _json["kind"] = kind;
5278 } 5390 }
5279 if (selfLink != null) { 5391 if (selfLink != null) {
5280 _json["selfLink"] = selfLink; 5392 _json["selfLink"] = selfLink;
5281 } 5393 }
5282 return _json; 5394 return _json;
5283 } 5395 }
5284 } 5396 }
5285 5397
5286 /** The context of the file which is being commented on. */ 5398 /// The context of the file which is being commented on.
5287 class CommentContext { 5399 class CommentContext {
5288 /** The MIME type of the context snippet. */ 5400 /// The MIME type of the context snippet.
5289 core.String type; 5401 core.String type;
5290 /** 5402
5291 * Data representation of the segment of the file being commented on. In the 5403 /// Data representation of the segment of the file being commented on. In the
5292 * case of a text file for example, this would be the actual text that the 5404 /// case of a text file for example, this would be the actual text that the
5293 * comment is about. 5405 /// comment is about.
5294 */
5295 core.String value; 5406 core.String value;
5296 5407
5297 CommentContext(); 5408 CommentContext();
5298 5409
5299 CommentContext.fromJson(core.Map _json) { 5410 CommentContext.fromJson(core.Map _json) {
5300 if (_json.containsKey("type")) { 5411 if (_json.containsKey("type")) {
5301 type = _json["type"]; 5412 type = _json["type"];
5302 } 5413 }
5303 if (_json.containsKey("value")) { 5414 if (_json.containsKey("value")) {
5304 value = _json["value"]; 5415 value = _json["value"];
5305 } 5416 }
5306 } 5417 }
5307 5418
5308 core.Map<core.String, core.Object> toJson() { 5419 core.Map<core.String, core.Object> toJson() {
5309 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5420 final core.Map<core.String, core.Object> _json =
5421 new core.Map<core.String, core.Object>();
5310 if (type != null) { 5422 if (type != null) {
5311 _json["type"] = type; 5423 _json["type"] = type;
5312 } 5424 }
5313 if (value != null) { 5425 if (value != null) {
5314 _json["value"] = value; 5426 _json["value"] = value;
5315 } 5427 }
5316 return _json; 5428 return _json;
5317 } 5429 }
5318 } 5430 }
5319 5431
5320 /** A comment on a file in Google Drive. */ 5432 /// A comment on a file in Google Drive.
5321 class Comment { 5433 class Comment {
5322 /** 5434 /// A region of the document represented as a JSON string. See anchor
5323 * A region of the document represented as a JSON string. See anchor 5435 /// documentation for details on how to define and interpret anchor
5324 * documentation for details on how to define and interpret anchor properties. 5436 /// properties.
5325 */
5326 core.String anchor; 5437 core.String anchor;
5327 /** The user who wrote this comment. */ 5438
5439 /// The user who wrote this comment.
5328 User author; 5440 User author;
5329 /** The ID of the comment. */ 5441
5442 /// The ID of the comment.
5330 core.String commentId; 5443 core.String commentId;
5331 /** 5444
5332 * The plain text content used to create this comment. This is not HTML safe 5445 /// The plain text content used to create this comment. This is not HTML safe
5333 * and should only be used as a starting point to make edits to a comment's 5446 /// and should only be used as a starting point to make edits to a comment's
5334 * content. 5447 /// content.
5335 */
5336 core.String content; 5448 core.String content;
5337 /** The context of the file which is being commented on. */ 5449
5450 /// The context of the file which is being commented on.
5338 CommentContext context; 5451 CommentContext context;
5339 /** The date when this comment was first created. */ 5452
5453 /// The date when this comment was first created.
5340 core.DateTime createdDate; 5454 core.DateTime createdDate;
5341 /** 5455
5342 * Whether this comment has been deleted. If a comment has been deleted the 5456 /// Whether this comment has been deleted. If a comment has been deleted the
5343 * content will be cleared and this will only represent a comment that once 5457 /// content will be cleared and this will only represent a comment that once
5344 * existed. 5458 /// existed.
5345 */
5346 core.bool deleted; 5459 core.bool deleted;
5347 /** The file which this comment is addressing. */ 5460
5461 /// The file which this comment is addressing.
5348 core.String fileId; 5462 core.String fileId;
5349 /** The title of the file which this comment is addressing. */ 5463
5464 /// The title of the file which this comment is addressing.
5350 core.String fileTitle; 5465 core.String fileTitle;
5351 /** HTML formatted content for this comment. */ 5466
5467 /// HTML formatted content for this comment.
5352 core.String htmlContent; 5468 core.String htmlContent;
5353 /** This is always drive#comment. */ 5469
5470 /// This is always drive#comment.
5354 core.String kind; 5471 core.String kind;
5355 /** The date when this comment or any of its replies were last modified. */ 5472
5473 /// The date when this comment or any of its replies were last modified.
5356 core.DateTime modifiedDate; 5474 core.DateTime modifiedDate;
5357 /** Replies to this post. */ 5475
5476 /// Replies to this post.
5358 core.List<CommentReply> replies; 5477 core.List<CommentReply> replies;
5359 /** A link back to this comment. */ 5478
5479 /// A link back to this comment.
5360 core.String selfLink; 5480 core.String selfLink;
5361 /** 5481
5362 * The status of this comment. Status can be changed by posting a reply to a 5482 /// The status of this comment. Status can be changed by posting a reply to a
5363 * comment with the desired status. 5483 /// comment with the desired status.
5364 * - "open" - The comment is still open. 5484 /// - "open" - The comment is still open.
5365 * - "resolved" - The comment has been resolved by one of its replies. 5485 /// - "resolved" - The comment has been resolved by one of its replies.
5366 */
5367 core.String status; 5486 core.String status;
5368 5487
5369 Comment(); 5488 Comment();
5370 5489
5371 Comment.fromJson(core.Map _json) { 5490 Comment.fromJson(core.Map _json) {
5372 if (_json.containsKey("anchor")) { 5491 if (_json.containsKey("anchor")) {
5373 anchor = _json["anchor"]; 5492 anchor = _json["anchor"];
5374 } 5493 }
5375 if (_json.containsKey("author")) { 5494 if (_json.containsKey("author")) {
5376 author = new User.fromJson(_json["author"]); 5495 author = new User.fromJson(_json["author"]);
(...skipping 22 matching lines...) Expand all
5399 if (_json.containsKey("htmlContent")) { 5518 if (_json.containsKey("htmlContent")) {
5400 htmlContent = _json["htmlContent"]; 5519 htmlContent = _json["htmlContent"];
5401 } 5520 }
5402 if (_json.containsKey("kind")) { 5521 if (_json.containsKey("kind")) {
5403 kind = _json["kind"]; 5522 kind = _json["kind"];
5404 } 5523 }
5405 if (_json.containsKey("modifiedDate")) { 5524 if (_json.containsKey("modifiedDate")) {
5406 modifiedDate = core.DateTime.parse(_json["modifiedDate"]); 5525 modifiedDate = core.DateTime.parse(_json["modifiedDate"]);
5407 } 5526 }
5408 if (_json.containsKey("replies")) { 5527 if (_json.containsKey("replies")) {
5409 replies = _json["replies"].map((value) => new CommentReply.fromJson(value) ).toList(); 5528 replies = _json["replies"]
5529 .map((value) => new CommentReply.fromJson(value))
5530 .toList();
5410 } 5531 }
5411 if (_json.containsKey("selfLink")) { 5532 if (_json.containsKey("selfLink")) {
5412 selfLink = _json["selfLink"]; 5533 selfLink = _json["selfLink"];
5413 } 5534 }
5414 if (_json.containsKey("status")) { 5535 if (_json.containsKey("status")) {
5415 status = _json["status"]; 5536 status = _json["status"];
5416 } 5537 }
5417 } 5538 }
5418 5539
5419 core.Map<core.String, core.Object> toJson() { 5540 core.Map<core.String, core.Object> toJson() {
5420 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5541 final core.Map<core.String, core.Object> _json =
5542 new core.Map<core.String, core.Object>();
5421 if (anchor != null) { 5543 if (anchor != null) {
5422 _json["anchor"] = anchor; 5544 _json["anchor"] = anchor;
5423 } 5545 }
5424 if (author != null) { 5546 if (author != null) {
5425 _json["author"] = (author).toJson(); 5547 _json["author"] = (author).toJson();
5426 } 5548 }
5427 if (commentId != null) { 5549 if (commentId != null) {
5428 _json["commentId"] = commentId; 5550 _json["commentId"] = commentId;
5429 } 5551 }
5430 if (content != null) { 5552 if (content != null) {
(...skipping 29 matching lines...) Expand all
5460 if (selfLink != null) { 5582 if (selfLink != null) {
5461 _json["selfLink"] = selfLink; 5583 _json["selfLink"] = selfLink;
5462 } 5584 }
5463 if (status != null) { 5585 if (status != null) {
5464 _json["status"] = status; 5586 _json["status"] = status;
5465 } 5587 }
5466 return _json; 5588 return _json;
5467 } 5589 }
5468 } 5590 }
5469 5591
5470 /** A list of comments on a file in Google Drive. */ 5592 /// A list of comments on a file in Google Drive.
5471 class CommentList { 5593 class CommentList {
5472 /** 5594 /// The list of comments. If nextPageToken is populated, then this list may
5473 * The list of comments. If nextPageToken is populated, then this list may be 5595 /// be incomplete and an additional page of results should be fetched.
5474 * incomplete and an additional page of results should be fetched.
5475 */
5476 core.List<Comment> items; 5596 core.List<Comment> items;
5477 /** This is always drive#commentList. */ 5597
5598 /// This is always drive#commentList.
5478 core.String kind; 5599 core.String kind;
5479 /** A link to the next page of comments. */ 5600
5601 /// A link to the next page of comments.
5480 core.String nextLink; 5602 core.String nextLink;
5481 /** 5603
5482 * The page token for the next page of comments. This will be absent if the 5604 /// The page token for the next page of comments. This will be absent if the
5483 * end of the comments list has been reached. If the token is rejected for any 5605 /// end of the comments list has been reached. If the token is rejected for
5484 * reason, it should be discarded, and pagination should be restarted from the 5606 /// any reason, it should be discarded, and pagination should be restarted
5485 * first page of results. 5607 /// from the first page of results.
5486 */
5487 core.String nextPageToken; 5608 core.String nextPageToken;
5488 /** A link back to this list. */ 5609
5610 /// A link back to this list.
5489 core.String selfLink; 5611 core.String selfLink;
5490 5612
5491 CommentList(); 5613 CommentList();
5492 5614
5493 CommentList.fromJson(core.Map _json) { 5615 CommentList.fromJson(core.Map _json) {
5494 if (_json.containsKey("items")) { 5616 if (_json.containsKey("items")) {
5495 items = _json["items"].map((value) => new Comment.fromJson(value)).toList( ); 5617 items =
5618 _json["items"].map((value) => new Comment.fromJson(value)).toList();
5496 } 5619 }
5497 if (_json.containsKey("kind")) { 5620 if (_json.containsKey("kind")) {
5498 kind = _json["kind"]; 5621 kind = _json["kind"];
5499 } 5622 }
5500 if (_json.containsKey("nextLink")) { 5623 if (_json.containsKey("nextLink")) {
5501 nextLink = _json["nextLink"]; 5624 nextLink = _json["nextLink"];
5502 } 5625 }
5503 if (_json.containsKey("nextPageToken")) { 5626 if (_json.containsKey("nextPageToken")) {
5504 nextPageToken = _json["nextPageToken"]; 5627 nextPageToken = _json["nextPageToken"];
5505 } 5628 }
5506 if (_json.containsKey("selfLink")) { 5629 if (_json.containsKey("selfLink")) {
5507 selfLink = _json["selfLink"]; 5630 selfLink = _json["selfLink"];
5508 } 5631 }
5509 } 5632 }
5510 5633
5511 core.Map<core.String, core.Object> toJson() { 5634 core.Map<core.String, core.Object> toJson() {
5512 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5635 final core.Map<core.String, core.Object> _json =
5636 new core.Map<core.String, core.Object>();
5513 if (items != null) { 5637 if (items != null) {
5514 _json["items"] = items.map((value) => (value).toJson()).toList(); 5638 _json["items"] = items.map((value) => (value).toJson()).toList();
5515 } 5639 }
5516 if (kind != null) { 5640 if (kind != null) {
5517 _json["kind"] = kind; 5641 _json["kind"] = kind;
5518 } 5642 }
5519 if (nextLink != null) { 5643 if (nextLink != null) {
5520 _json["nextLink"] = nextLink; 5644 _json["nextLink"] = nextLink;
5521 } 5645 }
5522 if (nextPageToken != null) { 5646 if (nextPageToken != null) {
5523 _json["nextPageToken"] = nextPageToken; 5647 _json["nextPageToken"] = nextPageToken;
5524 } 5648 }
5525 if (selfLink != null) { 5649 if (selfLink != null) {
5526 _json["selfLink"] = selfLink; 5650 _json["selfLink"] = selfLink;
5527 } 5651 }
5528 return _json; 5652 return _json;
5529 } 5653 }
5530 } 5654 }
5531 5655
5532 /** A comment on a file in Google Drive. */ 5656 /// A comment on a file in Google Drive.
5533 class CommentReply { 5657 class CommentReply {
5534 /** The user who wrote this reply. */ 5658 /// The user who wrote this reply.
5535 User author; 5659 User author;
5536 /** 5660
5537 * The plain text content used to create this reply. This is not HTML safe and 5661 /// The plain text content used to create this reply. This is not HTML safe
5538 * should only be used as a starting point to make edits to a reply's content. 5662 /// and should only be used as a starting point to make edits to a reply's
5539 * This field is required on inserts if no verb is specified (resolve/reopen). 5663 /// content. This field is required on inserts if no verb is specified
5540 */ 5664 /// (resolve/reopen).
5541 core.String content; 5665 core.String content;
5542 /** The date when this reply was first created. */ 5666
5667 /// The date when this reply was first created.
5543 core.DateTime createdDate; 5668 core.DateTime createdDate;
5544 /** 5669
5545 * Whether this reply has been deleted. If a reply has been deleted the 5670 /// Whether this reply has been deleted. If a reply has been deleted the
5546 * content will be cleared and this will only represent a reply that once 5671 /// content will be cleared and this will only represent a reply that once
5547 * existed. 5672 /// existed.
5548 */
5549 core.bool deleted; 5673 core.bool deleted;
5550 /** HTML formatted content for this reply. */ 5674
5675 /// HTML formatted content for this reply.
5551 core.String htmlContent; 5676 core.String htmlContent;
5552 /** This is always drive#commentReply. */ 5677
5678 /// This is always drive#commentReply.
5553 core.String kind; 5679 core.String kind;
5554 /** The date when this reply was last modified. */ 5680
5681 /// The date when this reply was last modified.
5555 core.DateTime modifiedDate; 5682 core.DateTime modifiedDate;
5556 /** The ID of the reply. */ 5683
5684 /// The ID of the reply.
5557 core.String replyId; 5685 core.String replyId;
5558 /** 5686
5559 * The action this reply performed to the parent comment. When creating a new 5687 /// The action this reply performed to the parent comment. When creating a
5560 * reply this is the action to be perform to the parent comment. Possible 5688 /// new reply this is the action to be perform to the parent comment.
5561 * values are: 5689 /// Possible values are:
5562 * - "resolve" - To resolve a comment. 5690 /// - "resolve" - To resolve a comment.
5563 * - "reopen" - To reopen (un-resolve) a comment. 5691 /// - "reopen" - To reopen (un-resolve) a comment.
5564 */
5565 core.String verb; 5692 core.String verb;
5566 5693
5567 CommentReply(); 5694 CommentReply();
5568 5695
5569 CommentReply.fromJson(core.Map _json) { 5696 CommentReply.fromJson(core.Map _json) {
5570 if (_json.containsKey("author")) { 5697 if (_json.containsKey("author")) {
5571 author = new User.fromJson(_json["author"]); 5698 author = new User.fromJson(_json["author"]);
5572 } 5699 }
5573 if (_json.containsKey("content")) { 5700 if (_json.containsKey("content")) {
5574 content = _json["content"]; 5701 content = _json["content"];
(...skipping 15 matching lines...) Expand all
5590 } 5717 }
5591 if (_json.containsKey("replyId")) { 5718 if (_json.containsKey("replyId")) {
5592 replyId = _json["replyId"]; 5719 replyId = _json["replyId"];
5593 } 5720 }
5594 if (_json.containsKey("verb")) { 5721 if (_json.containsKey("verb")) {
5595 verb = _json["verb"]; 5722 verb = _json["verb"];
5596 } 5723 }
5597 } 5724 }
5598 5725
5599 core.Map<core.String, core.Object> toJson() { 5726 core.Map<core.String, core.Object> toJson() {
5600 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5727 final core.Map<core.String, core.Object> _json =
5728 new core.Map<core.String, core.Object>();
5601 if (author != null) { 5729 if (author != null) {
5602 _json["author"] = (author).toJson(); 5730 _json["author"] = (author).toJson();
5603 } 5731 }
5604 if (content != null) { 5732 if (content != null) {
5605 _json["content"] = content; 5733 _json["content"] = content;
5606 } 5734 }
5607 if (createdDate != null) { 5735 if (createdDate != null) {
5608 _json["createdDate"] = (createdDate).toIso8601String(); 5736 _json["createdDate"] = (createdDate).toIso8601String();
5609 } 5737 }
5610 if (deleted != null) { 5738 if (deleted != null) {
(...skipping 11 matching lines...) Expand all
5622 if (replyId != null) { 5750 if (replyId != null) {
5623 _json["replyId"] = replyId; 5751 _json["replyId"] = replyId;
5624 } 5752 }
5625 if (verb != null) { 5753 if (verb != null) {
5626 _json["verb"] = verb; 5754 _json["verb"] = verb;
5627 } 5755 }
5628 return _json; 5756 return _json;
5629 } 5757 }
5630 } 5758 }
5631 5759
5632 /** A list of replies to a comment on a file in Google Drive. */ 5760 /// A list of replies to a comment on a file in Google Drive.
5633 class CommentReplyList { 5761 class CommentReplyList {
5634 /** 5762 /// The list of replies. If nextPageToken is populated, then this list may be
5635 * The list of replies. If nextPageToken is populated, then this list may be 5763 /// incomplete and an additional page of results should be fetched.
5636 * incomplete and an additional page of results should be fetched.
5637 */
5638 core.List<CommentReply> items; 5764 core.List<CommentReply> items;
5639 /** This is always drive#commentReplyList. */ 5765
5766 /// This is always drive#commentReplyList.
5640 core.String kind; 5767 core.String kind;
5641 /** A link to the next page of replies. */ 5768
5769 /// A link to the next page of replies.
5642 core.String nextLink; 5770 core.String nextLink;
5643 /** 5771
5644 * The page token for the next page of replies. This will be absent if the end 5772 /// The page token for the next page of replies. This will be absent if the
5645 * of the replies list has been reached. If the token is rejected for any 5773 /// end of the replies list has been reached. If the token is rejected for
5646 * reason, it should be discarded, and pagination should be restarted from the 5774 /// any reason, it should be discarded, and pagination should be restarted
5647 * first page of results. 5775 /// from the first page of results.
5648 */
5649 core.String nextPageToken; 5776 core.String nextPageToken;
5650 /** A link back to this list. */ 5777
5778 /// A link back to this list.
5651 core.String selfLink; 5779 core.String selfLink;
5652 5780
5653 CommentReplyList(); 5781 CommentReplyList();
5654 5782
5655 CommentReplyList.fromJson(core.Map _json) { 5783 CommentReplyList.fromJson(core.Map _json) {
5656 if (_json.containsKey("items")) { 5784 if (_json.containsKey("items")) {
5657 items = _json["items"].map((value) => new CommentReply.fromJson(value)).to List(); 5785 items = _json["items"]
5786 .map((value) => new CommentReply.fromJson(value))
5787 .toList();
5658 } 5788 }
5659 if (_json.containsKey("kind")) { 5789 if (_json.containsKey("kind")) {
5660 kind = _json["kind"]; 5790 kind = _json["kind"];
5661 } 5791 }
5662 if (_json.containsKey("nextLink")) { 5792 if (_json.containsKey("nextLink")) {
5663 nextLink = _json["nextLink"]; 5793 nextLink = _json["nextLink"];
5664 } 5794 }
5665 if (_json.containsKey("nextPageToken")) { 5795 if (_json.containsKey("nextPageToken")) {
5666 nextPageToken = _json["nextPageToken"]; 5796 nextPageToken = _json["nextPageToken"];
5667 } 5797 }
5668 if (_json.containsKey("selfLink")) { 5798 if (_json.containsKey("selfLink")) {
5669 selfLink = _json["selfLink"]; 5799 selfLink = _json["selfLink"];
5670 } 5800 }
5671 } 5801 }
5672 5802
5673 core.Map<core.String, core.Object> toJson() { 5803 core.Map<core.String, core.Object> toJson() {
5674 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5804 final core.Map<core.String, core.Object> _json =
5805 new core.Map<core.String, core.Object>();
5675 if (items != null) { 5806 if (items != null) {
5676 _json["items"] = items.map((value) => (value).toJson()).toList(); 5807 _json["items"] = items.map((value) => (value).toJson()).toList();
5677 } 5808 }
5678 if (kind != null) { 5809 if (kind != null) {
5679 _json["kind"] = kind; 5810 _json["kind"] = kind;
5680 } 5811 }
5681 if (nextLink != null) { 5812 if (nextLink != null) {
5682 _json["nextLink"] = nextLink; 5813 _json["nextLink"] = nextLink;
5683 } 5814 }
5684 if (nextPageToken != null) { 5815 if (nextPageToken != null) {
5685 _json["nextPageToken"] = nextPageToken; 5816 _json["nextPageToken"] = nextPageToken;
5686 } 5817 }
5687 if (selfLink != null) { 5818 if (selfLink != null) {
5688 _json["selfLink"] = selfLink; 5819 _json["selfLink"] = selfLink;
5689 } 5820 }
5690 return _json; 5821 return _json;
5691 } 5822 }
5692 } 5823 }
5693 5824
5694 /** 5825 /// Capabilities the current user has on this file. Each capability corresponds
5695 * Capabilities the current user has on this file. Each capability corresponds 5826 /// to a fine-grained action that a user may take.
5696 * to a fine-grained action that a user may take.
5697 */
5698 class FileCapabilities { 5827 class FileCapabilities {
5699 /** 5828 /// Whether the current user can add children to this folder. This is always
5700 * Whether the current user can add children to this folder. This is always 5829 /// false when the item is not a folder.
5701 * false when the item is not a folder.
5702 */
5703 core.bool canAddChildren; 5830 core.bool canAddChildren;
5704 /** 5831
5705 * Whether the current user can change the restricted download label of this 5832 /// Whether the current user can change the restricted download label of this
5706 * file. 5833 /// file.
5707 */
5708 core.bool canChangeRestrictedDownload; 5834 core.bool canChangeRestrictedDownload;
5709 /** Whether the current user can comment on this file. */ 5835
5836 /// Whether the current user can comment on this file.
5710 core.bool canComment; 5837 core.bool canComment;
5711 /** 5838
5712 * Whether the current user can copy this file. For a Team Drive item, whether 5839 /// Whether the current user can copy this file. For a Team Drive item,
5713 * the current user can copy non-folder descendants of this item, or this item 5840 /// whether the current user can copy non-folder descendants of this item, or
5714 * itself if it is not a folder. 5841 /// this item itself if it is not a folder.
5715 */
5716 core.bool canCopy; 5842 core.bool canCopy;
5717 /** Whether the current user can delete this file. */ 5843
5844 /// Whether the current user can delete this file.
5718 core.bool canDelete; 5845 core.bool canDelete;
5719 /** Whether the current user can download this file. */ 5846
5847 /// Whether the current user can download this file.
5720 core.bool canDownload; 5848 core.bool canDownload;
5721 /** Whether the current user can edit this file. */ 5849
5850 /// Whether the current user can edit this file.
5722 core.bool canEdit; 5851 core.bool canEdit;
5723 /** 5852
5724 * Whether the current user can list the children of this folder. This is 5853 /// Whether the current user can list the children of this folder. This is
5725 * always false when the item is not a folder. 5854 /// always false when the item is not a folder.
5726 */
5727 core.bool canListChildren; 5855 core.bool canListChildren;
5728 /** 5856
5729 * Whether the current user can move this item into a Team Drive. If the item 5857 /// Whether the current user can move this item into a Team Drive. If the
5730 * is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. 5858 /// item is in a Team Drive, this field is equivalent to
5731 */ 5859 /// canMoveTeamDriveItem.
5732 core.bool canMoveItemIntoTeamDrive; 5860 core.bool canMoveItemIntoTeamDrive;
5733 /** 5861
5734 * Whether the current user can move this Team Drive item by changing its 5862 /// Whether the current user can move this Team Drive item by changing its
5735 * parent. Note that a request to change the parent for this item may still 5863 /// parent. Note that a request to change the parent for this item may still
5736 * fail depending on the new parent that is being added. Only populated for 5864 /// fail depending on the new parent that is being added. Only populated for
5737 * Team Drive files. 5865 /// Team Drive files.
5738 */
5739 core.bool canMoveTeamDriveItem; 5866 core.bool canMoveTeamDriveItem;
5740 /** 5867
5741 * Whether the current user can read the revisions resource of this file. For 5868 /// Whether the current user can read the revisions resource of this file.
5742 * a Team Drive item, whether revisions of non-folder descendants of this 5869 /// For a Team Drive item, whether revisions of non-folder descendants of
5743 * item, or this item itself if it is not a folder, can be read. 5870 /// this item, or this item itself if it is not a folder, can be read.
5744 */
5745 core.bool canReadRevisions; 5871 core.bool canReadRevisions;
5746 /** 5872
5747 * Whether the current user can read the Team Drive to which this file 5873 /// Whether the current user can read the Team Drive to which this file
5748 * belongs. Only populated for Team Drive files. 5874 /// belongs. Only populated for Team Drive files.
5749 */
5750 core.bool canReadTeamDrive; 5875 core.bool canReadTeamDrive;
5751 /** 5876
5752 * Whether the current user can remove children from this folder. This is 5877 /// Whether the current user can remove children from this folder. This is
5753 * always false when the item is not a folder. 5878 /// always false when the item is not a folder.
5754 */
5755 core.bool canRemoveChildren; 5879 core.bool canRemoveChildren;
5756 /** Whether the current user can rename this file. */ 5880
5881 /// Whether the current user can rename this file.
5757 core.bool canRename; 5882 core.bool canRename;
5758 /** 5883
5759 * Whether the current user can modify the sharing settings for this file. 5884 /// Whether the current user can modify the sharing settings for this file.
5760 */
5761 core.bool canShare; 5885 core.bool canShare;
5762 /** Whether the current user can move this file to trash. */ 5886
5887 /// Whether the current user can move this file to trash.
5763 core.bool canTrash; 5888 core.bool canTrash;
5764 /** Whether the current user can restore this file from trash. */ 5889
5890 /// Whether the current user can restore this file from trash.
5765 core.bool canUntrash; 5891 core.bool canUntrash;
5766 5892
5767 FileCapabilities(); 5893 FileCapabilities();
5768 5894
5769 FileCapabilities.fromJson(core.Map _json) { 5895 FileCapabilities.fromJson(core.Map _json) {
5770 if (_json.containsKey("canAddChildren")) { 5896 if (_json.containsKey("canAddChildren")) {
5771 canAddChildren = _json["canAddChildren"]; 5897 canAddChildren = _json["canAddChildren"];
5772 } 5898 }
5773 if (_json.containsKey("canChangeRestrictedDownload")) { 5899 if (_json.containsKey("canChangeRestrictedDownload")) {
5774 canChangeRestrictedDownload = _json["canChangeRestrictedDownload"]; 5900 canChangeRestrictedDownload = _json["canChangeRestrictedDownload"];
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
5814 } 5940 }
5815 if (_json.containsKey("canTrash")) { 5941 if (_json.containsKey("canTrash")) {
5816 canTrash = _json["canTrash"]; 5942 canTrash = _json["canTrash"];
5817 } 5943 }
5818 if (_json.containsKey("canUntrash")) { 5944 if (_json.containsKey("canUntrash")) {
5819 canUntrash = _json["canUntrash"]; 5945 canUntrash = _json["canUntrash"];
5820 } 5946 }
5821 } 5947 }
5822 5948
5823 core.Map<core.String, core.Object> toJson() { 5949 core.Map<core.String, core.Object> toJson() {
5824 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5950 final core.Map<core.String, core.Object> _json =
5951 new core.Map<core.String, core.Object>();
5825 if (canAddChildren != null) { 5952 if (canAddChildren != null) {
5826 _json["canAddChildren"] = canAddChildren; 5953 _json["canAddChildren"] = canAddChildren;
5827 } 5954 }
5828 if (canChangeRestrictedDownload != null) { 5955 if (canChangeRestrictedDownload != null) {
5829 _json["canChangeRestrictedDownload"] = canChangeRestrictedDownload; 5956 _json["canChangeRestrictedDownload"] = canChangeRestrictedDownload;
5830 } 5957 }
5831 if (canComment != null) { 5958 if (canComment != null) {
5832 _json["canComment"] = canComment; 5959 _json["canComment"] = canComment;
5833 } 5960 }
5834 if (canCopy != null) { 5961 if (canCopy != null) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
5870 if (canTrash != null) { 5997 if (canTrash != null) {
5871 _json["canTrash"] = canTrash; 5998 _json["canTrash"] = canTrash;
5872 } 5999 }
5873 if (canUntrash != null) { 6000 if (canUntrash != null) {
5874 _json["canUntrash"] = canUntrash; 6001 _json["canUntrash"] = canUntrash;
5875 } 6002 }
5876 return _json; 6003 return _json;
5877 } 6004 }
5878 } 6005 }
5879 6006
5880 /** Geographic location information stored in the image. */ 6007 /// Geographic location information stored in the image.
5881 class FileImageMediaMetadataLocation { 6008 class FileImageMediaMetadataLocation {
5882 /** The altitude stored in the image. */ 6009 /// The altitude stored in the image.
5883 core.double altitude; 6010 core.double altitude;
5884 /** The latitude stored in the image. */ 6011
6012 /// The latitude stored in the image.
5885 core.double latitude; 6013 core.double latitude;
5886 /** The longitude stored in the image. */ 6014
6015 /// The longitude stored in the image.
5887 core.double longitude; 6016 core.double longitude;
5888 6017
5889 FileImageMediaMetadataLocation(); 6018 FileImageMediaMetadataLocation();
5890 6019
5891 FileImageMediaMetadataLocation.fromJson(core.Map _json) { 6020 FileImageMediaMetadataLocation.fromJson(core.Map _json) {
5892 if (_json.containsKey("altitude")) { 6021 if (_json.containsKey("altitude")) {
5893 altitude = _json["altitude"]; 6022 altitude = _json["altitude"];
5894 } 6023 }
5895 if (_json.containsKey("latitude")) { 6024 if (_json.containsKey("latitude")) {
5896 latitude = _json["latitude"]; 6025 latitude = _json["latitude"];
5897 } 6026 }
5898 if (_json.containsKey("longitude")) { 6027 if (_json.containsKey("longitude")) {
5899 longitude = _json["longitude"]; 6028 longitude = _json["longitude"];
5900 } 6029 }
5901 } 6030 }
5902 6031
5903 core.Map<core.String, core.Object> toJson() { 6032 core.Map<core.String, core.Object> toJson() {
5904 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 6033 final core.Map<core.String, core.Object> _json =
6034 new core.Map<core.String, core.Object>();
5905 if (altitude != null) { 6035 if (altitude != null) {
5906 _json["altitude"] = altitude; 6036 _json["altitude"] = altitude;
5907 } 6037 }
5908 if (latitude != null) { 6038 if (latitude != null) {
5909 _json["latitude"] = latitude; 6039 _json["latitude"] = latitude;
5910 } 6040 }
5911 if (longitude != null) { 6041 if (longitude != null) {
5912 _json["longitude"] = longitude; 6042 _json["longitude"] = longitude;
5913 } 6043 }
5914 return _json; 6044 return _json;
5915 } 6045 }
5916 } 6046 }
5917 6047
5918 /** 6048 /// Metadata about image media. This will only be present for image types, and
5919 * Metadata about image media. This will only be present for image types, and 6049 /// its contents will depend on what can be parsed from the image content.
5920 * its contents will depend on what can be parsed from the image content.
5921 */
5922 class FileImageMediaMetadata { 6050 class FileImageMediaMetadata {
5923 /** The aperture used to create the photo (f-number). */ 6051 /// The aperture used to create the photo (f-number).
5924 core.double aperture; 6052 core.double aperture;
5925 /** The make of the camera used to create the photo. */ 6053
6054 /// The make of the camera used to create the photo.
5926 core.String cameraMake; 6055 core.String cameraMake;
5927 /** The model of the camera used to create the photo. */ 6056
6057 /// The model of the camera used to create the photo.
5928 core.String cameraModel; 6058 core.String cameraModel;
5929 /** The color space of the photo. */ 6059
6060 /// The color space of the photo.
5930 core.String colorSpace; 6061 core.String colorSpace;
5931 /** The date and time the photo was taken (EXIF format timestamp). */ 6062
6063 /// The date and time the photo was taken (EXIF format timestamp).
5932 core.String date; 6064 core.String date;
5933 /** The exposure bias of the photo (APEX value). */ 6065
6066 /// The exposure bias of the photo (APEX value).
5934 core.double exposureBias; 6067 core.double exposureBias;
5935 /** The exposure mode used to create the photo. */ 6068
6069 /// The exposure mode used to create the photo.
5936 core.String exposureMode; 6070 core.String exposureMode;
5937 /** The length of the exposure, in seconds. */ 6071
6072 /// The length of the exposure, in seconds.
5938 core.double exposureTime; 6073 core.double exposureTime;
5939 /** Whether a flash was used to create the photo. */ 6074
6075 /// Whether a flash was used to create the photo.
5940 core.bool flashUsed; 6076 core.bool flashUsed;
5941 /** The focal length used to create the photo, in millimeters. */ 6077
6078 /// The focal length used to create the photo, in millimeters.
5942 core.double focalLength; 6079 core.double focalLength;
5943 /** The height of the image in pixels. */ 6080
6081 /// The height of the image in pixels.
5944 core.int height; 6082 core.int height;
5945 /** The ISO speed used to create the photo. */ 6083
6084 /// The ISO speed used to create the photo.
5946 core.int isoSpeed; 6085 core.int isoSpeed;
5947 /** The lens used to create the photo. */ 6086
6087 /// The lens used to create the photo.
5948 core.String lens; 6088 core.String lens;
5949 /** Geographic location information stored in the image. */ 6089
6090 /// Geographic location information stored in the image.
5950 FileImageMediaMetadataLocation location; 6091 FileImageMediaMetadataLocation location;
5951 /** 6092
5952 * The smallest f-number of the lens at the focal length used to create the 6093 /// The smallest f-number of the lens at the focal length used to create the
5953 * photo (APEX value). 6094 /// photo (APEX value).
5954 */
5955 core.double maxApertureValue; 6095 core.double maxApertureValue;
5956 /** The metering mode used to create the photo. */ 6096
6097 /// The metering mode used to create the photo.
5957 core.String meteringMode; 6098 core.String meteringMode;
5958 /** 6099
5959 * The rotation in clockwise degrees from the image's original orientation. 6100 /// The rotation in clockwise degrees from the image's original orientation.
5960 */
5961 core.int rotation; 6101 core.int rotation;
5962 /** The type of sensor used to create the photo. */ 6102
6103 /// The type of sensor used to create the photo.
5963 core.String sensor; 6104 core.String sensor;
5964 /** The distance to the subject of the photo, in meters. */ 6105
6106 /// The distance to the subject of the photo, in meters.
5965 core.int subjectDistance; 6107 core.int subjectDistance;
5966 /** The white balance mode used to create the photo. */ 6108
6109 /// The white balance mode used to create the photo.
5967 core.String whiteBalance; 6110 core.String whiteBalance;
5968 /** The width of the image in pixels. */ 6111
6112 /// The width of the image in pixels.
5969 core.int width; 6113 core.int width;
5970 6114
5971 FileImageMediaMetadata(); 6115 FileImageMediaMetadata();
5972 6116
5973 FileImageMediaMetadata.fromJson(core.Map _json) { 6117 FileImageMediaMetadata.fromJson(core.Map _json) {
5974 if (_json.containsKey("aperture")) { 6118 if (_json.containsKey("aperture")) {
5975 aperture = _json["aperture"]; 6119 aperture = _json["aperture"];
5976 } 6120 }
5977 if (_json.containsKey("cameraMake")) { 6121 if (_json.containsKey("cameraMake")) {
5978 cameraMake = _json["cameraMake"]; 6122 cameraMake = _json["cameraMake"];
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
6030 } 6174 }
6031 if (_json.containsKey("whiteBalance")) { 6175 if (_json.containsKey("whiteBalance")) {
6032 whiteBalance = _json["whiteBalance"]; 6176 whiteBalance = _json["whiteBalance"];
6033 } 6177 }
6034 if (_json.containsKey("width")) { 6178 if (_json.containsKey("width")) {
6035 width = _json["width"]; 6179 width = _json["width"];
6036 } 6180 }
6037 } 6181 }
6038 6182
6039 core.Map<core.String, core.Object> toJson() { 6183 core.Map<core.String, core.Object> toJson() {
6040 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 6184 final core.Map<core.String, core.Object> _json =
6185 new core.Map<core.String, core.Object>();
6041 if (aperture != null) { 6186 if (aperture != null) {
6042 _json["aperture"] = aperture; 6187 _json["aperture"] = aperture;
6043 } 6188 }
6044 if (cameraMake != null) { 6189 if (cameraMake != null) {
6045 _json["cameraMake"] = cameraMake; 6190 _json["cameraMake"] = cameraMake;
6046 } 6191 }
6047 if (cameraModel != null) { 6192 if (cameraModel != null) {
6048 _json["cameraModel"] = cameraModel; 6193 _json["cameraModel"] = cameraModel;
6049 } 6194 }
6050 if (colorSpace != null) { 6195 if (colorSpace != null) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
6098 if (whiteBalance != null) { 6243 if (whiteBalance != null) {
6099 _json["whiteBalance"] = whiteBalance; 6244 _json["whiteBalance"] = whiteBalance;
6100 } 6245 }
6101 if (width != null) { 6246 if (width != null) {
6102 _json["width"] = width; 6247 _json["width"] = width;
6103 } 6248 }
6104 return _json; 6249 return _json;
6105 } 6250 }
6106 } 6251 }
6107 6252
6108 /** Indexable text attributes for the file (can only be written) */ 6253 /// Indexable text attributes for the file (can only be written)
6109 class FileIndexableText { 6254 class FileIndexableText {
6110 /** The text to be indexed for this file. */ 6255 /// The text to be indexed for this file.
6111 core.String text; 6256 core.String text;
6112 6257
6113 FileIndexableText(); 6258 FileIndexableText();
6114 6259
6115 FileIndexableText.fromJson(core.Map _json) { 6260 FileIndexableText.fromJson(core.Map _json) {
6116 if (_json.containsKey("text")) { 6261 if (_json.containsKey("text")) {
6117 text = _json["text"]; 6262 text = _json["text"];
6118 } 6263 }
6119 } 6264 }
6120 6265
6121 core.Map<core.String, core.Object> toJson() { 6266 core.Map<core.String, core.Object> toJson() {
6122 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 6267 final core.Map<core.String, core.Object> _json =
6268 new core.Map<core.String, core.Object>();
6123 if (text != null) { 6269 if (text != null) {
6124 _json["text"] = text; 6270 _json["text"] = text;
6125 } 6271 }
6126 return _json; 6272 return _json;
6127 } 6273 }
6128 } 6274 }
6129 6275
6130 /** A group of labels for the file. */ 6276 /// A group of labels for the file.
6131 class FileLabels { 6277 class FileLabels {
6132 /** Deprecated. */ 6278 /// Deprecated.
6133 core.bool hidden; 6279 core.bool hidden;
6134 /** Whether the file has been modified by this user. */ 6280
6281 /// Whether the file has been modified by this user.
6135 core.bool modified; 6282 core.bool modified;
6136 /** 6283
6137 * Whether viewers and commenters are prevented from downloading, printing, 6284 /// Whether viewers and commenters are prevented from downloading, printing,
6138 * and copying this file. 6285 /// and copying this file.
6139 */
6140 core.bool restricted; 6286 core.bool restricted;
6141 /** Whether this file is starred by the user. */ 6287
6288 /// Whether this file is starred by the user.
6142 core.bool starred; 6289 core.bool starred;
6143 /** 6290
6144 * Whether this file has been trashed. This label applies to all users 6291 /// Whether this file has been trashed. This label applies to all users
6145 * accessing the file; however, only owners are allowed to see and untrash 6292 /// accessing the file; however, only owners are allowed to see and untrash
6146 * files. 6293 /// files.
6147 */
6148 core.bool trashed; 6294 core.bool trashed;
6149 /** Whether this file has been viewed by this user. */ 6295
6296 /// Whether this file has been viewed by this user.
6150 core.bool viewed; 6297 core.bool viewed;
6151 6298
6152 FileLabels(); 6299 FileLabels();
6153 6300
6154 FileLabels.fromJson(core.Map _json) { 6301 FileLabels.fromJson(core.Map _json) {
6155 if (_json.containsKey("hidden")) { 6302 if (_json.containsKey("hidden")) {
6156 hidden = _json["hidden"]; 6303 hidden = _json["hidden"];
6157 } 6304 }
6158 if (_json.containsKey("modified")) { 6305 if (_json.containsKey("modified")) {
6159 modified = _json["modified"]; 6306 modified = _json["modified"];
6160 } 6307 }
6161 if (_json.containsKey("restricted")) { 6308 if (_json.containsKey("restricted")) {
6162 restricted = _json["restricted"]; 6309 restricted = _json["restricted"];
6163 } 6310 }
6164 if (_json.containsKey("starred")) { 6311 if (_json.containsKey("starred")) {
6165 starred = _json["starred"]; 6312 starred = _json["starred"];
6166 } 6313 }
6167 if (_json.containsKey("trashed")) { 6314 if (_json.containsKey("trashed")) {
6168 trashed = _json["trashed"]; 6315 trashed = _json["trashed"];
6169 } 6316 }
6170 if (_json.containsKey("viewed")) { 6317 if (_json.containsKey("viewed")) {
6171 viewed = _json["viewed"]; 6318 viewed = _json["viewed"];
6172 } 6319 }
6173 } 6320 }
6174 6321
6175 core.Map<core.String, core.Object> toJson() { 6322 core.Map<core.String, core.Object> toJson() {
6176 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 6323 final core.Map<core.String, core.Object> _json =
6324 new core.Map<core.String, core.Object>();
6177 if (hidden != null) { 6325 if (hidden != null) {
6178 _json["hidden"] = hidden; 6326 _json["hidden"] = hidden;
6179 } 6327 }
6180 if (modified != null) { 6328 if (modified != null) {
6181 _json["modified"] = modified; 6329 _json["modified"] = modified;
6182 } 6330 }
6183 if (restricted != null) { 6331 if (restricted != null) {
6184 _json["restricted"] = restricted; 6332 _json["restricted"] = restricted;
6185 } 6333 }
6186 if (starred != null) { 6334 if (starred != null) {
6187 _json["starred"] = starred; 6335 _json["starred"] = starred;
6188 } 6336 }
6189 if (trashed != null) { 6337 if (trashed != null) {
6190 _json["trashed"] = trashed; 6338 _json["trashed"] = trashed;
6191 } 6339 }
6192 if (viewed != null) { 6340 if (viewed != null) {
6193 _json["viewed"] = viewed; 6341 _json["viewed"] = viewed;
6194 } 6342 }
6195 return _json; 6343 return _json;
6196 } 6344 }
6197 } 6345 }
6198 6346
6199 /** 6347 /// A thumbnail for the file. This will only be used if Drive cannot generate a
6200 * A thumbnail for the file. This will only be used if Drive cannot generate a 6348 /// standard thumbnail.
6201 * standard thumbnail.
6202 */
6203 class FileThumbnail { 6349 class FileThumbnail {
6204 /** 6350 /// The URL-safe Base64 encoded bytes of the thumbnail image. It should
6205 * The URL-safe Base64 encoded bytes of the thumbnail image. It should conform 6351 /// conform to RFC 4648 section 5.
6206 * to RFC 4648 section 5.
6207 */
6208 core.String image; 6352 core.String image;
6209 core.List<core.int> get imageAsBytes { 6353 core.List<core.int> get imageAsBytes {
6210 return convert_1.BASE64.decode(image); 6354 return convert_1.BASE64.decode(image);
6211 } 6355 }
6212 6356
6213 void set imageAsBytes(core.List<core.int> _bytes) { 6357 void set imageAsBytes(core.List<core.int> _bytes) {
6214 image = convert_1.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); 6358 image = convert_1.BASE64
6359 .encode(_bytes)
6360 .replaceAll("/", "_")
6361 .replaceAll("+", "-");
6215 } 6362 }
6216 /** The MIME type of the thumbnail. */ 6363
6364 /// The MIME type of the thumbnail.
6217 core.String mimeType; 6365 core.String mimeType;
6218 6366
6219 FileThumbnail(); 6367 FileThumbnail();
6220 6368
6221 FileThumbnail.fromJson(core.Map _json) { 6369 FileThumbnail.fromJson(core.Map _json) {
6222 if (_json.containsKey("image")) { 6370 if (_json.containsKey("image")) {
6223 image = _json["image"]; 6371 image = _json["image"];
6224 } 6372 }
6225 if (_json.containsKey("mimeType")) { 6373 if (_json.containsKey("mimeType")) {
6226 mimeType = _json["mimeType"]; 6374 mimeType = _json["mimeType"];
6227 } 6375 }
6228 } 6376 }
6229 6377
6230 core.Map<core.String, core.Object> toJson() { 6378 core.Map<core.String, core.Object> toJson() {
6231 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 6379 final core.Map<core.String, core.Object> _json =
6380 new core.Map<core.String, core.Object>();
6232 if (image != null) { 6381 if (image != null) {
6233 _json["image"] = image; 6382 _json["image"] = image;
6234 } 6383 }
6235 if (mimeType != null) { 6384 if (mimeType != null) {
6236 _json["mimeType"] = mimeType; 6385 _json["mimeType"] = mimeType;
6237 } 6386 }
6238 return _json; 6387 return _json;
6239 } 6388 }
6240 } 6389 }
6241 6390
6242 /** Metadata about video media. This will only be present for video types. */ 6391 /// Metadata about video media. This will only be present for video types.
6243 class FileVideoMediaMetadata { 6392 class FileVideoMediaMetadata {
6244 /** The duration of the video in milliseconds. */ 6393 /// The duration of the video in milliseconds.
6245 core.String durationMillis; 6394 core.String durationMillis;
6246 /** The height of the video in pixels. */ 6395
6396 /// The height of the video in pixels.
6247 core.int height; 6397 core.int height;
6248 /** The width of the video in pixels. */ 6398
6399 /// The width of the video in pixels.
6249 core.int width; 6400 core.int width;
6250 6401
6251 FileVideoMediaMetadata(); 6402 FileVideoMediaMetadata();
6252 6403
6253 FileVideoMediaMetadata.fromJson(core.Map _json) { 6404 FileVideoMediaMetadata.fromJson(core.Map _json) {
6254 if (_json.containsKey("durationMillis")) { 6405 if (_json.containsKey("durationMillis")) {
6255 durationMillis = _json["durationMillis"]; 6406 durationMillis = _json["durationMillis"];
6256 } 6407 }
6257 if (_json.containsKey("height")) { 6408 if (_json.containsKey("height")) {
6258 height = _json["height"]; 6409 height = _json["height"];
6259 } 6410 }
6260 if (_json.containsKey("width")) { 6411 if (_json.containsKey("width")) {
6261 width = _json["width"]; 6412 width = _json["width"];
6262 } 6413 }
6263 } 6414 }
6264 6415
6265 core.Map<core.String, core.Object> toJson() { 6416 core.Map<core.String, core.Object> toJson() {
6266 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 6417 final core.Map<core.String, core.Object> _json =
6418 new core.Map<core.String, core.Object>();
6267 if (durationMillis != null) { 6419 if (durationMillis != null) {
6268 _json["durationMillis"] = durationMillis; 6420 _json["durationMillis"] = durationMillis;
6269 } 6421 }
6270 if (height != null) { 6422 if (height != null) {
6271 _json["height"] = height; 6423 _json["height"] = height;
6272 } 6424 }
6273 if (width != null) { 6425 if (width != null) {
6274 _json["width"] = width; 6426 _json["width"] = width;
6275 } 6427 }
6276 return _json; 6428 return _json;
6277 } 6429 }
6278 } 6430 }
6279 6431
6280 /** The metadata for a file. */ 6432 /// The metadata for a file.
6281 class File { 6433 class File {
6282 /** A link for opening the file in a relevant Google editor or viewer. */ 6434 /// A link for opening the file in a relevant Google editor or viewer.
6283 core.String alternateLink; 6435 core.String alternateLink;
6284 /** Whether this file is in the Application Data folder. */ 6436
6437 /// Whether this file is in the Application Data folder.
6285 core.bool appDataContents; 6438 core.bool appDataContents;
6286 /** Deprecated: use capabilities/canComment. */ 6439
6440 /// Deprecated: use capabilities/canComment.
6287 core.bool canComment; 6441 core.bool canComment;
6288 /** Deprecated: use capabilities/canReadRevisions. */ 6442
6443 /// Deprecated: use capabilities/canReadRevisions.
6289 core.bool canReadRevisions; 6444 core.bool canReadRevisions;
6290 /** 6445
6291 * Capabilities the current user has on this file. Each capability corresponds 6446 /// Capabilities the current user has on this file. Each capability
6292 * to a fine-grained action that a user may take. 6447 /// corresponds to a fine-grained action that a user may take.
6293 */
6294 FileCapabilities capabilities; 6448 FileCapabilities capabilities;
6295 /** Deprecated: use capabilities/canCopy. */ 6449
6450 /// Deprecated: use capabilities/canCopy.
6296 core.bool copyable; 6451 core.bool copyable;
6297 /** Create time for this file (formatted RFC 3339 timestamp). */ 6452
6453 /// Create time for this file (formatted RFC 3339 timestamp).
6298 core.DateTime createdDate; 6454 core.DateTime createdDate;
6299 /** 6455
6300 * A link to open this file with the user's default app for this file. Only 6456 /// A link to open this file with the user's default app for this file. Only
6301 * populated when the drive.apps.readonly scope is used. 6457 /// populated when the drive.apps.readonly scope is used.
6302 */
6303 core.String defaultOpenWithLink; 6458 core.String defaultOpenWithLink;
6304 /** A short description of the file. */ 6459
6460 /// A short description of the file.
6305 core.String description; 6461 core.String description;
6306 core.String downloadUrl; 6462 core.String downloadUrl;
6307 /** Deprecated: use capabilities/canEdit. */ 6463
6464 /// Deprecated: use capabilities/canEdit.
6308 core.bool editable; 6465 core.bool editable;
6309 /** A link for embedding the file. */ 6466
6467 /// A link for embedding the file.
6310 core.String embedLink; 6468 core.String embedLink;
6311 /** ETag of the file. */ 6469
6470 /// ETag of the file.
6312 core.String etag; 6471 core.String etag;
6313 /** 6472
6314 * Whether this file has been explicitly trashed, as opposed to recursively 6473 /// Whether this file has been explicitly trashed, as opposed to recursively
6315 * trashed. 6474 /// trashed.
6316 */
6317 core.bool explicitlyTrashed; 6475 core.bool explicitlyTrashed;
6318 /** Links for exporting Google Docs to specific formats. */ 6476
6477 /// Links for exporting Google Docs to specific formats.
6319 core.Map<core.String, core.String> exportLinks; 6478 core.Map<core.String, core.String> exportLinks;
6320 /** 6479
6321 * The final component of fullFileExtension with trailing text that does not 6480 /// The final component of fullFileExtension with trailing text that does not
6322 * appear to be part of the extension removed. This field is only populated 6481 /// appear to be part of the extension removed. This field is only populated
6323 * for files with content stored in Drive; it is not populated for Google Docs 6482 /// for files with content stored in Drive; it is not populated for Google
6324 * or shortcut files. 6483 /// Docs or shortcut files.
6325 */
6326 core.String fileExtension; 6484 core.String fileExtension;
6327 /** 6485
6328 * The size of the file in bytes. This field is only populated for files with 6486 /// The size of the file in bytes. This field is only populated for files
6329 * content stored in Drive; it is not populated for Google Docs or shortcut 6487 /// with content stored in Drive; it is not populated for Google Docs or
6330 * files. 6488 /// shortcut files.
6331 */
6332 core.String fileSize; 6489 core.String fileSize;
6333 /** 6490
6334 * Folder color as an RGB hex string if the file is a folder. The list of 6491 /// Folder color as an RGB hex string if the file is a folder. The list of
6335 * supported colors is available in the folderColorPalette field of the About 6492 /// supported colors is available in the folderColorPalette field of the
6336 * resource. If an unsupported color is specified, it will be changed to the 6493 /// About resource. If an unsupported color is specified, it will be changed
6337 * closest color in the palette. Not populated for Team Drive files. 6494 /// to the closest color in the palette. Not populated for Team Drive files.
6338 */
6339 core.String folderColorRgb; 6495 core.String folderColorRgb;
6340 /** 6496
6341 * The full file extension; extracted from the title. May contain multiple 6497 /// The full file extension; extracted from the title. May contain multiple
6342 * concatenated extensions, such as "tar.gz". Removing an extension from the 6498 /// concatenated extensions, such as "tar.gz". Removing an extension from the
6343 * title does not clear this field; however, changing the extension on the 6499 /// title does not clear this field; however, changing the extension on the
6344 * title does update this field. This field is only populated for files with 6500 /// title does update this field. This field is only populated for files with
6345 * content stored in Drive; it is not populated for Google Docs or shortcut 6501 /// content stored in Drive; it is not populated for Google Docs or shortcut
6346 * files. 6502 /// files.
6347 */
6348 core.String fullFileExtension; 6503 core.String fullFileExtension;
6349 /** 6504
6350 * Whether any users are granted file access directly on this file. This field 6505 /// Whether any users are granted file access directly on this file. This
6351 * is only populated for Team Drive files. 6506 /// field is only populated for Team Drive files.
6352 */
6353 core.bool hasAugmentedPermissions; 6507 core.bool hasAugmentedPermissions;
6354 /** 6508
6355 * Whether this file has a thumbnail. This does not indicate whether the 6509 /// Whether this file has a thumbnail. This does not indicate whether the
6356 * requesting app has access to the thumbnail. To check access, look for the 6510 /// requesting app has access to the thumbnail. To check access, look for the
6357 * presence of the thumbnailLink field. 6511 /// presence of the thumbnailLink field.
6358 */
6359 core.bool hasThumbnail; 6512 core.bool hasThumbnail;
6360 /** 6513
6361 * The ID of the file's head revision. This field is only populated for files 6514 /// The ID of the file's head revision. This field is only populated for
6362 * with content stored in Drive; it is not populated for Google Docs or 6515 /// files with content stored in Drive; it is not populated for Google Docs
6363 * shortcut files. 6516 /// or shortcut files.
6364 */
6365 core.String headRevisionId; 6517 core.String headRevisionId;
6366 /** A link to the file's icon. */ 6518
6519 /// A link to the file's icon.
6367 core.String iconLink; 6520 core.String iconLink;
6368 /** The ID of the file. */ 6521
6522 /// The ID of the file.
6369 core.String id; 6523 core.String id;
6370 /** 6524
6371 * Metadata about image media. This will only be present for image types, and 6525 /// Metadata about image media. This will only be present for image types,
6372 * its contents will depend on what can be parsed from the image content. 6526 /// and its contents will depend on what can be parsed from the image
6373 */ 6527 /// content.
6374 FileImageMediaMetadata imageMediaMetadata; 6528 FileImageMediaMetadata imageMediaMetadata;
6375 /** Indexable text attributes for the file (can only be written) */ 6529
6530 /// Indexable text attributes for the file (can only be written)
6376 FileIndexableText indexableText; 6531 FileIndexableText indexableText;
6377 /** Whether the file was created or opened by the requesting app. */ 6532
6533 /// Whether the file was created or opened by the requesting app.
6378 core.bool isAppAuthorized; 6534 core.bool isAppAuthorized;
6379 /** The type of file. This is always drive#file. */ 6535
6536 /// The type of file. This is always drive#file.
6380 core.String kind; 6537 core.String kind;
6381 /** A group of labels for the file. */ 6538
6539 /// A group of labels for the file.
6382 FileLabels labels; 6540 FileLabels labels;
6383 /** The last user to modify this file. */ 6541
6542 /// The last user to modify this file.
6384 User lastModifyingUser; 6543 User lastModifyingUser;
6385 /** Name of the last user to modify this file. */ 6544
6545 /// Name of the last user to modify this file.
6386 core.String lastModifyingUserName; 6546 core.String lastModifyingUserName;
6387 /** 6547
6388 * Last time this file was viewed by the user (formatted RFC 3339 timestamp). 6548 /// Last time this file was viewed by the user (formatted RFC 3339
6389 */ 6549 /// timestamp).
6390 core.DateTime lastViewedByMeDate; 6550 core.DateTime lastViewedByMeDate;
6391 /** Deprecated. */ 6551
6552 /// Deprecated.
6392 core.DateTime markedViewedByMeDate; 6553 core.DateTime markedViewedByMeDate;
6393 /** 6554
6394 * An MD5 checksum for the content of this file. This field is only populated 6555 /// An MD5 checksum for the content of this file. This field is only
6395 * for files with content stored in Drive; it is not populated for Google Docs 6556 /// populated for files with content stored in Drive; it is not populated for
6396 * or shortcut files. 6557 /// Google Docs or shortcut files.
6397 */
6398 core.String md5Checksum; 6558 core.String md5Checksum;
6399 /** 6559
6400 * The MIME type of the file. This is only mutable on update when uploading 6560 /// The MIME type of the file. This is only mutable on update when uploading
6401 * new content. This field can be left blank, and the mimetype will be 6561 /// new content. This field can be left blank, and the mimetype will be
6402 * determined from the uploaded content's MIME type. 6562 /// determined from the uploaded content's MIME type.
6403 */
6404 core.String mimeType; 6563 core.String mimeType;
6405 /** 6564
6406 * Last time this file was modified by the user (formatted RFC 3339 6565 /// Last time this file was modified by the user (formatted RFC 3339
6407 * timestamp). Note that setting modifiedDate will also update the 6566 /// timestamp). Note that setting modifiedDate will also update the
6408 * modifiedByMe date for the user which set the date. 6567 /// modifiedByMe date for the user which set the date.
6409 */
6410 core.DateTime modifiedByMeDate; 6568 core.DateTime modifiedByMeDate;
6411 /** 6569
6412 * Last time this file was modified by anyone (formatted RFC 3339 timestamp). 6570 /// Last time this file was modified by anyone (formatted RFC 3339
6413 * This is only mutable on update when the setModifiedDate parameter is set. 6571 /// timestamp). This is only mutable on update when the setModifiedDate
6414 */ 6572 /// parameter is set.
6415 core.DateTime modifiedDate; 6573 core.DateTime modifiedDate;
6416 /** 6574
6417 * A map of the id of each of the user's apps to a link to open this file with 6575 /// A map of the id of each of the user's apps to a link to open this file
6418 * that app. Only populated when the drive.apps.readonly scope is used. 6576 /// with that app. Only populated when the drive.apps.readonly scope is used.
6419 */
6420 core.Map<core.String, core.String> openWithLinks; 6577 core.Map<core.String, core.String> openWithLinks;
6421 /** 6578
6422 * The original filename of the uploaded content if available, or else the 6579 /// The original filename of the uploaded content if available, or else the
6423 * original value of the title field. This is only available for files with 6580 /// original value of the title field. This is only available for files with
6424 * binary content in Drive. 6581 /// binary content in Drive.
6425 */
6426 core.String originalFilename; 6582 core.String originalFilename;
6427 /** 6583
6428 * Whether the file is owned by the current user. Not populated for Team Drive 6584 /// Whether the file is owned by the current user. Not populated for Team
6429 * files. 6585 /// Drive files.
6430 */
6431 core.bool ownedByMe; 6586 core.bool ownedByMe;
6432 /** 6587
6433 * Name(s) of the owner(s) of this file. Not populated for Team Drive files. 6588 /// Name(s) of the owner(s) of this file. Not populated for Team Drive files.
6434 */
6435 core.List<core.String> ownerNames; 6589 core.List<core.String> ownerNames;
6436 /** The owner(s) of this file. Not populated for Team Drive files. */ 6590
6591 /// The owner(s) of this file. Not populated for Team Drive files.
6437 core.List<User> owners; 6592 core.List<User> owners;
6438 /** 6593
6439 * Collection of parent folders which contain this file. 6594 /// Collection of parent folders which contain this file.
6440 * Setting this field will put the file in all of the provided folders. On 6595 /// Setting this field will put the file in all of the provided folders. On
6441 * insert, if no folders are provided, the file will be placed in the default 6596 /// insert, if no folders are provided, the file will be placed in the
6442 * root folder. 6597 /// default root folder.
6443 */
6444 core.List<ParentReference> parents; 6598 core.List<ParentReference> parents;
6445 /** 6599
6446 * The list of permissions for users with access to this file. Not populated 6600 /// List of permission IDs for users with access to this file.
6447 * for Team Drive files. 6601 core.List<core.String> permissionIds;
6448 */ 6602
6603 /// The list of permissions for users with access to this file. Not populated
6604 /// for Team Drive files.
6449 core.List<Permission> permissions; 6605 core.List<Permission> permissions;
6450 /** The list of properties. */ 6606
6607 /// The list of properties.
6451 core.List<Property> properties; 6608 core.List<Property> properties;
6452 /** The number of quota bytes used by this file. */ 6609
6610 /// The number of quota bytes used by this file.
6453 core.String quotaBytesUsed; 6611 core.String quotaBytesUsed;
6454 /** A link back to this file. */ 6612
6613 /// A link back to this file.
6455 core.String selfLink; 6614 core.String selfLink;
6456 /** Deprecated: use capabilities/canShare. */ 6615
6616 /// Deprecated: use capabilities/canShare.
6457 core.bool shareable; 6617 core.bool shareable;
6458 /** Whether the file has been shared. Not populated for Team Drive files. */ 6618
6619 /// Whether the file has been shared. Not populated for Team Drive files.
6459 core.bool shared; 6620 core.bool shared;
6460 /** 6621
6461 * Time at which this file was shared with the user (formatted RFC 3339 6622 /// Time at which this file was shared with the user (formatted RFC 3339
6462 * timestamp). 6623 /// timestamp).
6463 */
6464 core.DateTime sharedWithMeDate; 6624 core.DateTime sharedWithMeDate;
6465 /** User that shared the item with the current user, if available. */ 6625
6626 /// User that shared the item with the current user, if available.
6466 User sharingUser; 6627 User sharingUser;
6467 /** 6628
6468 * The list of spaces which contain the file. Supported values are 'drive', 6629 /// The list of spaces which contain the file. Supported values are 'drive',
6469 * 'appDataFolder' and 'photos'. 6630 /// 'appDataFolder' and 'photos'.
6470 */
6471 core.List<core.String> spaces; 6631 core.List<core.String> spaces;
6472 /** ID of the Team Drive the file resides in. */ 6632
6633 /// ID of the Team Drive the file resides in.
6473 core.String teamDriveId; 6634 core.String teamDriveId;
6474 /** 6635
6475 * A thumbnail for the file. This will only be used if Drive cannot generate a 6636 /// A thumbnail for the file. This will only be used if Drive cannot generate
6476 * standard thumbnail. 6637 /// a standard thumbnail.
6477 */
6478 FileThumbnail thumbnail; 6638 FileThumbnail thumbnail;
6479 /** 6639
6480 * A short-lived link to the file's thumbnail. Typically lasts on the order of 6640 /// A short-lived link to the file's thumbnail. Typically lasts on the order
6481 * hours. Only populated when the requesting app can access the file's 6641 /// of hours. Only populated when the requesting app can access the file's
6482 * content. 6642 /// content.
6483 */
6484 core.String thumbnailLink; 6643 core.String thumbnailLink;
6485 /** The thumbnail version for use in thumbnail cache invalidation. */ 6644
6645 /// The thumbnail version for use in thumbnail cache invalidation.
6486 core.String thumbnailVersion; 6646 core.String thumbnailVersion;
6487 /** 6647
6488 * The title of this file. Note that for immutable items such as the top level 6648 /// The title of this file. Note that for immutable items such as the top
6489 * folders of Team Drives, My Drive root folder, and Application Data folder 6649 /// level folders of Team Drives, My Drive root folder, and Application Data
6490 * the title is constant. 6650 /// folder the title is constant.
6491 */
6492 core.String title; 6651 core.String title;
6493 /** 6652
6494 * The time that the item was trashed (formatted RFC 3339 timestamp). Only 6653 /// The time that the item was trashed (formatted RFC 3339 timestamp). Only
6495 * populated for Team Drive files. 6654 /// populated for Team Drive files.
6496 */
6497 core.DateTime trashedDate; 6655 core.DateTime trashedDate;
6498 /** 6656
6499 * If the file has been explicitly trashed, the user who trashed it. Only 6657 /// If the file has been explicitly trashed, the user who trashed it. Only
6500 * populated for Team Drive files. 6658 /// populated for Team Drive files.
6501 */
6502 User trashingUser; 6659 User trashingUser;
6503 /** The permissions for the authenticated user on this file. */ 6660
6661 /// The permissions for the authenticated user on this file.
6504 Permission userPermission; 6662 Permission userPermission;
6505 /** 6663
6506 * A monotonically increasing version number for the file. This reflects every 6664 /// A monotonically increasing version number for the file. This reflects
6507 * change made to the file on the server, even those not visible to the 6665 /// every change made to the file on the server, even those not visible to
6508 * requesting user. 6666 /// the requesting user.
6509 */
6510 core.String version; 6667 core.String version;
6511 /** Metadata about video media. This will only be present for video types. */ 6668
6669 /// Metadata about video media. This will only be present for video types.
6512 FileVideoMediaMetadata videoMediaMetadata; 6670 FileVideoMediaMetadata videoMediaMetadata;
6513 /** 6671
6514 * A link for downloading the content of the file in a browser using cookie 6672 /// A link for downloading the content of the file in a browser using cookie
6515 * based authentication. In cases where the content is shared publicly, the 6673 /// based authentication. In cases where the content is shared publicly, the
6516 * content can be downloaded without any credentials. 6674 /// content can be downloaded without any credentials.
6517 */
6518 core.String webContentLink; 6675 core.String webContentLink;
6519 /** 6676
6520 * A link only available on public folders for viewing their static web assets 6677 /// A link only available on public folders for viewing their static web
6521 * (HTML, CSS, JS, etc) via Google Drive's Website Hosting. 6678 /// assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
6522 */
6523 core.String webViewLink; 6679 core.String webViewLink;
6524 /** 6680
6525 * Whether writers can share the document with other users. Not populated for 6681 /// Whether writers can share the document with other users. Not populated
6526 * Team Drive files. 6682 /// for Team Drive files.
6527 */
6528 core.bool writersCanShare; 6683 core.bool writersCanShare;
6529 6684
6530 File(); 6685 File();
6531 6686
6532 File.fromJson(core.Map _json) { 6687 File.fromJson(core.Map _json) {
6533 if (_json.containsKey("alternateLink")) { 6688 if (_json.containsKey("alternateLink")) {
6534 alternateLink = _json["alternateLink"]; 6689 alternateLink = _json["alternateLink"];
6535 } 6690 }
6536 if (_json.containsKey("appDataContents")) { 6691 if (_json.containsKey("appDataContents")) {
6537 appDataContents = _json["appDataContents"]; 6692 appDataContents = _json["appDataContents"];
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
6596 if (_json.containsKey("headRevisionId")) { 6751 if (_json.containsKey("headRevisionId")) {
6597 headRevisionId = _json["headRevisionId"]; 6752 headRevisionId = _json["headRevisionId"];
6598 } 6753 }
6599 if (_json.containsKey("iconLink")) { 6754 if (_json.containsKey("iconLink")) {
6600 iconLink = _json["iconLink"]; 6755 iconLink = _json["iconLink"];
6601 } 6756 }
6602 if (_json.containsKey("id")) { 6757 if (_json.containsKey("id")) {
6603 id = _json["id"]; 6758 id = _json["id"];
6604 } 6759 }
6605 if (_json.containsKey("imageMediaMetadata")) { 6760 if (_json.containsKey("imageMediaMetadata")) {
6606 imageMediaMetadata = new FileImageMediaMetadata.fromJson(_json["imageMedia Metadata"]); 6761 imageMediaMetadata =
6762 new FileImageMediaMetadata.fromJson(_json["imageMediaMetadata"]);
6607 } 6763 }
6608 if (_json.containsKey("indexableText")) { 6764 if (_json.containsKey("indexableText")) {
6609 indexableText = new FileIndexableText.fromJson(_json["indexableText"]); 6765 indexableText = new FileIndexableText.fromJson(_json["indexableText"]);
6610 } 6766 }
6611 if (_json.containsKey("isAppAuthorized")) { 6767 if (_json.containsKey("isAppAuthorized")) {
6612 isAppAuthorized = _json["isAppAuthorized"]; 6768 isAppAuthorized = _json["isAppAuthorized"];
6613 } 6769 }
6614 if (_json.containsKey("kind")) { 6770 if (_json.containsKey("kind")) {
6615 kind = _json["kind"]; 6771 kind = _json["kind"];
6616 } 6772 }
(...skipping 30 matching lines...) Expand all
6647 if (_json.containsKey("originalFilename")) { 6803 if (_json.containsKey("originalFilename")) {
6648 originalFilename = _json["originalFilename"]; 6804 originalFilename = _json["originalFilename"];
6649 } 6805 }
6650 if (_json.containsKey("ownedByMe")) { 6806 if (_json.containsKey("ownedByMe")) {
6651 ownedByMe = _json["ownedByMe"]; 6807 ownedByMe = _json["ownedByMe"];
6652 } 6808 }
6653 if (_json.containsKey("ownerNames")) { 6809 if (_json.containsKey("ownerNames")) {
6654 ownerNames = _json["ownerNames"]; 6810 ownerNames = _json["ownerNames"];
6655 } 6811 }
6656 if (_json.containsKey("owners")) { 6812 if (_json.containsKey("owners")) {
6657 owners = _json["owners"].map((value) => new User.fromJson(value)).toList() ; 6813 owners =
6814 _json["owners"].map((value) => new User.fromJson(value)).toList();
6658 } 6815 }
6659 if (_json.containsKey("parents")) { 6816 if (_json.containsKey("parents")) {
6660 parents = _json["parents"].map((value) => new ParentReference.fromJson(val ue)).toList(); 6817 parents = _json["parents"]
6818 .map((value) => new ParentReference.fromJson(value))
6819 .toList();
6820 }
6821 if (_json.containsKey("permissionIds")) {
6822 permissionIds = _json["permissionIds"];
6661 } 6823 }
6662 if (_json.containsKey("permissions")) { 6824 if (_json.containsKey("permissions")) {
6663 permissions = _json["permissions"].map((value) => new Permission.fromJson( value)).toList(); 6825 permissions = _json["permissions"]
6826 .map((value) => new Permission.fromJson(value))
6827 .toList();
6664 } 6828 }
6665 if (_json.containsKey("properties")) { 6829 if (_json.containsKey("properties")) {
6666 properties = _json["properties"].map((value) => new Property.fromJson(valu e)).toList(); 6830 properties = _json["properties"]
6831 .map((value) => new Property.fromJson(value))
6832 .toList();
6667 } 6833 }
6668 if (_json.containsKey("quotaBytesUsed")) { 6834 if (_json.containsKey("quotaBytesUsed")) {
6669 quotaBytesUsed = _json["quotaBytesUsed"]; 6835 quotaBytesUsed = _json["quotaBytesUsed"];
6670 } 6836 }
6671 if (_json.containsKey("selfLink")) { 6837 if (_json.containsKey("selfLink")) {
6672 selfLink = _json["selfLink"]; 6838 selfLink = _json["selfLink"];
6673 } 6839 }
6674 if (_json.containsKey("shareable")) { 6840 if (_json.containsKey("shareable")) {
6675 shareable = _json["shareable"]; 6841 shareable = _json["shareable"];
6676 } 6842 }
(...skipping 30 matching lines...) Expand all
6707 if (_json.containsKey("trashingUser")) { 6873 if (_json.containsKey("trashingUser")) {
6708 trashingUser = new User.fromJson(_json["trashingUser"]); 6874 trashingUser = new User.fromJson(_json["trashingUser"]);
6709 } 6875 }
6710 if (_json.containsKey("userPermission")) { 6876 if (_json.containsKey("userPermission")) {
6711 userPermission = new Permission.fromJson(_json["userPermission"]); 6877 userPermission = new Permission.fromJson(_json["userPermission"]);
6712 } 6878 }
6713 if (_json.containsKey("version")) { 6879 if (_json.containsKey("version")) {
6714 version = _json["version"]; 6880 version = _json["version"];
6715 } 6881 }
6716 if (_json.containsKey("videoMediaMetadata")) { 6882 if (_json.containsKey("videoMediaMetadata")) {
6717 videoMediaMetadata = new FileVideoMediaMetadata.fromJson(_json["videoMedia Metadata"]); 6883 videoMediaMetadata =
6884 new FileVideoMediaMetadata.fromJson(_json["videoMediaMetadata"]);
6718 } 6885 }
6719 if (_json.containsKey("webContentLink")) { 6886 if (_json.containsKey("webContentLink")) {
6720 webContentLink = _json["webContentLink"]; 6887 webContentLink = _json["webContentLink"];
6721 } 6888 }
6722 if (_json.containsKey("webViewLink")) { 6889 if (_json.containsKey("webViewLink")) {
6723 webViewLink = _json["webViewLink"]; 6890 webViewLink = _json["webViewLink"];
6724 } 6891 }
6725 if (_json.containsKey("writersCanShare")) { 6892 if (_json.containsKey("writersCanShare")) {
6726 writersCanShare = _json["writersCanShare"]; 6893 writersCanShare = _json["writersCanShare"];
6727 } 6894 }
6728 } 6895 }
6729 6896
6730 core.Map<core.String, core.Object> toJson() { 6897 core.Map<core.String, core.Object> toJson() {
6731 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 6898 final core.Map<core.String, core.Object> _json =
6899 new core.Map<core.String, core.Object>();
6732 if (alternateLink != null) { 6900 if (alternateLink != null) {
6733 _json["alternateLink"] = alternateLink; 6901 _json["alternateLink"] = alternateLink;
6734 } 6902 }
6735 if (appDataContents != null) { 6903 if (appDataContents != null) {
6736 _json["appDataContents"] = appDataContents; 6904 _json["appDataContents"] = appDataContents;
6737 } 6905 }
6738 if (canComment != null) { 6906 if (canComment != null) {
6739 _json["canComment"] = canComment; 6907 _json["canComment"] = canComment;
6740 } 6908 }
6741 if (canReadRevisions != null) { 6909 if (canReadRevisions != null) {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
6851 } 7019 }
6852 if (ownerNames != null) { 7020 if (ownerNames != null) {
6853 _json["ownerNames"] = ownerNames; 7021 _json["ownerNames"] = ownerNames;
6854 } 7022 }
6855 if (owners != null) { 7023 if (owners != null) {
6856 _json["owners"] = owners.map((value) => (value).toJson()).toList(); 7024 _json["owners"] = owners.map((value) => (value).toJson()).toList();
6857 } 7025 }
6858 if (parents != null) { 7026 if (parents != null) {
6859 _json["parents"] = parents.map((value) => (value).toJson()).toList(); 7027 _json["parents"] = parents.map((value) => (value).toJson()).toList();
6860 } 7028 }
7029 if (permissionIds != null) {
7030 _json["permissionIds"] = permissionIds;
7031 }
6861 if (permissions != null) { 7032 if (permissions != null) {
6862 _json["permissions"] = permissions.map((value) => (value).toJson()).toList (); 7033 _json["permissions"] =
7034 permissions.map((value) => (value).toJson()).toList();
6863 } 7035 }
6864 if (properties != null) { 7036 if (properties != null) {
6865 _json["properties"] = properties.map((value) => (value).toJson()).toList() ; 7037 _json["properties"] =
7038 properties.map((value) => (value).toJson()).toList();
6866 } 7039 }
6867 if (quotaBytesUsed != null) { 7040 if (quotaBytesUsed != null) {
6868 _json["quotaBytesUsed"] = quotaBytesUsed; 7041 _json["quotaBytesUsed"] = quotaBytesUsed;
6869 } 7042 }
6870 if (selfLink != null) { 7043 if (selfLink != null) {
6871 _json["selfLink"] = selfLink; 7044 _json["selfLink"] = selfLink;
6872 } 7045 }
6873 if (shareable != null) { 7046 if (shareable != null) {
6874 _json["shareable"] = shareable; 7047 _json["shareable"] = shareable;
6875 } 7048 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
6921 if (webViewLink != null) { 7094 if (webViewLink != null) {
6922 _json["webViewLink"] = webViewLink; 7095 _json["webViewLink"] = webViewLink;
6923 } 7096 }
6924 if (writersCanShare != null) { 7097 if (writersCanShare != null) {
6925 _json["writersCanShare"] = writersCanShare; 7098 _json["writersCanShare"] = writersCanShare;
6926 } 7099 }
6927 return _json; 7100 return _json;
6928 } 7101 }
6929 } 7102 }
6930 7103
6931 /** A list of files. */ 7104 /// A list of files.
6932 class FileList { 7105 class FileList {
6933 /** The ETag of the list. */ 7106 /// The ETag of the list.
6934 core.String etag; 7107 core.String etag;
6935 /** 7108
6936 * Whether the search process was incomplete. If true, then some search 7109 /// Whether the search process was incomplete. If true, then some search
6937 * results may be missing, since all documents were not searched. This may 7110 /// results may be missing, since all documents were not searched. This may
6938 * occur when searching multiple Team Drives with the "default,allTeamDrives" 7111 /// occur when searching multiple Team Drives with the
6939 * corpora, but all corpora could not be searched. When this happens, it is 7112 /// "default,allTeamDrives" corpora, but all corpora could not be searched.
6940 * suggested that clients narrow their query by choosing a different corpus 7113 /// When this happens, it is suggested that clients narrow their query by
6941 * such as "default" or "teamDrive". 7114 /// choosing a different corpus such as "default" or "teamDrive".
6942 */
6943 core.bool incompleteSearch; 7115 core.bool incompleteSearch;
6944 /** 7116
6945 * The list of files. If nextPageToken is populated, then this list may be 7117 /// The list of files. If nextPageToken is populated, then this list may be
6946 * incomplete and an additional page of results should be fetched. 7118 /// incomplete and an additional page of results should be fetched.
6947 */
6948 core.List<File> items; 7119 core.List<File> items;
6949 /** This is always drive#fileList. */ 7120
7121 /// This is always drive#fileList.
6950 core.String kind; 7122 core.String kind;
6951 /** A link to the next page of files. */ 7123
7124 /// A link to the next page of files.
6952 core.String nextLink; 7125 core.String nextLink;
6953 /** 7126
6954 * The page token for the next page of files. This will be absent if the end 7127 /// The page token for the next page of files. This will be absent if the end
6955 * of the files list has been reached. If the token is rejected for any 7128 /// of the files list has been reached. If the token is rejected for any
6956 * reason, it should be discarded, and pagination should be restarted from the 7129 /// reason, it should be discarded, and pagination should be restarted from
6957 * first page of results. 7130 /// the first page of results.
6958 */
6959 core.String nextPageToken; 7131 core.String nextPageToken;
6960 /** A link back to this list. */ 7132
7133 /// A link back to this list.
6961 core.String selfLink; 7134 core.String selfLink;
6962 7135
6963 FileList(); 7136 FileList();
6964 7137
6965 FileList.fromJson(core.Map _json) { 7138 FileList.fromJson(core.Map _json) {
6966 if (_json.containsKey("etag")) { 7139 if (_json.containsKey("etag")) {
6967 etag = _json["etag"]; 7140 etag = _json["etag"];
6968 } 7141 }
6969 if (_json.containsKey("incompleteSearch")) { 7142 if (_json.containsKey("incompleteSearch")) {
6970 incompleteSearch = _json["incompleteSearch"]; 7143 incompleteSearch = _json["incompleteSearch"];
6971 } 7144 }
6972 if (_json.containsKey("items")) { 7145 if (_json.containsKey("items")) {
6973 items = _json["items"].map((value) => new File.fromJson(value)).toList(); 7146 items = _json["items"].map((value) => new File.fromJson(value)).toList();
6974 } 7147 }
6975 if (_json.containsKey("kind")) { 7148 if (_json.containsKey("kind")) {
6976 kind = _json["kind"]; 7149 kind = _json["kind"];
6977 } 7150 }
6978 if (_json.containsKey("nextLink")) { 7151 if (_json.containsKey("nextLink")) {
6979 nextLink = _json["nextLink"]; 7152 nextLink = _json["nextLink"];
6980 } 7153 }
6981 if (_json.containsKey("nextPageToken")) { 7154 if (_json.containsKey("nextPageToken")) {
6982 nextPageToken = _json["nextPageToken"]; 7155 nextPageToken = _json["nextPageToken"];
6983 } 7156 }
6984 if (_json.containsKey("selfLink")) { 7157 if (_json.containsKey("selfLink")) {
6985 selfLink = _json["selfLink"]; 7158 selfLink = _json["selfLink"];
6986 } 7159 }
6987 } 7160 }
6988 7161
6989 core.Map<core.String, core.Object> toJson() { 7162 core.Map<core.String, core.Object> toJson() {
6990 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7163 final core.Map<core.String, core.Object> _json =
7164 new core.Map<core.String, core.Object>();
6991 if (etag != null) { 7165 if (etag != null) {
6992 _json["etag"] = etag; 7166 _json["etag"] = etag;
6993 } 7167 }
6994 if (incompleteSearch != null) { 7168 if (incompleteSearch != null) {
6995 _json["incompleteSearch"] = incompleteSearch; 7169 _json["incompleteSearch"] = incompleteSearch;
6996 } 7170 }
6997 if (items != null) { 7171 if (items != null) {
6998 _json["items"] = items.map((value) => (value).toJson()).toList(); 7172 _json["items"] = items.map((value) => (value).toJson()).toList();
6999 } 7173 }
7000 if (kind != null) { 7174 if (kind != null) {
7001 _json["kind"] = kind; 7175 _json["kind"] = kind;
7002 } 7176 }
7003 if (nextLink != null) { 7177 if (nextLink != null) {
7004 _json["nextLink"] = nextLink; 7178 _json["nextLink"] = nextLink;
7005 } 7179 }
7006 if (nextPageToken != null) { 7180 if (nextPageToken != null) {
7007 _json["nextPageToken"] = nextPageToken; 7181 _json["nextPageToken"] = nextPageToken;
7008 } 7182 }
7009 if (selfLink != null) { 7183 if (selfLink != null) {
7010 _json["selfLink"] = selfLink; 7184 _json["selfLink"] = selfLink;
7011 } 7185 }
7012 return _json; 7186 return _json;
7013 } 7187 }
7014 } 7188 }
7015 7189
7016 /** A list of generated IDs which can be provided in insert requests */ 7190 /// A list of generated IDs which can be provided in insert requests
7017 class GeneratedIds { 7191 class GeneratedIds {
7018 /** The IDs generated for the requesting user in the specified space. */ 7192 /// The IDs generated for the requesting user in the specified space.
7019 core.List<core.String> ids; 7193 core.List<core.String> ids;
7020 /** This is always drive#generatedIds */ 7194
7195 /// This is always drive#generatedIds
7021 core.String kind; 7196 core.String kind;
7022 /** The type of file that can be created with these IDs. */ 7197
7198 /// The type of file that can be created with these IDs.
7023 core.String space; 7199 core.String space;
7024 7200
7025 GeneratedIds(); 7201 GeneratedIds();
7026 7202
7027 GeneratedIds.fromJson(core.Map _json) { 7203 GeneratedIds.fromJson(core.Map _json) {
7028 if (_json.containsKey("ids")) { 7204 if (_json.containsKey("ids")) {
7029 ids = _json["ids"]; 7205 ids = _json["ids"];
7030 } 7206 }
7031 if (_json.containsKey("kind")) { 7207 if (_json.containsKey("kind")) {
7032 kind = _json["kind"]; 7208 kind = _json["kind"];
7033 } 7209 }
7034 if (_json.containsKey("space")) { 7210 if (_json.containsKey("space")) {
7035 space = _json["space"]; 7211 space = _json["space"];
7036 } 7212 }
7037 } 7213 }
7038 7214
7039 core.Map<core.String, core.Object> toJson() { 7215 core.Map<core.String, core.Object> toJson() {
7040 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7216 final core.Map<core.String, core.Object> _json =
7217 new core.Map<core.String, core.Object>();
7041 if (ids != null) { 7218 if (ids != null) {
7042 _json["ids"] = ids; 7219 _json["ids"] = ids;
7043 } 7220 }
7044 if (kind != null) { 7221 if (kind != null) {
7045 _json["kind"] = kind; 7222 _json["kind"] = kind;
7046 } 7223 }
7047 if (space != null) { 7224 if (space != null) {
7048 _json["space"] = space; 7225 _json["space"] = space;
7049 } 7226 }
7050 return _json; 7227 return _json;
7051 } 7228 }
7052 } 7229 }
7053 7230
7054 /** A list of a file's parents. */ 7231 /// A list of a file's parents.
7055 class ParentList { 7232 class ParentList {
7056 /** The ETag of the list. */ 7233 /// The ETag of the list.
7057 core.String etag; 7234 core.String etag;
7058 /** The list of parents. */ 7235
7236 /// The list of parents.
7059 core.List<ParentReference> items; 7237 core.List<ParentReference> items;
7060 /** This is always drive#parentList. */ 7238
7239 /// This is always drive#parentList.
7061 core.String kind; 7240 core.String kind;
7062 /** A link back to this list. */ 7241
7242 /// A link back to this list.
7063 core.String selfLink; 7243 core.String selfLink;
7064 7244
7065 ParentList(); 7245 ParentList();
7066 7246
7067 ParentList.fromJson(core.Map _json) { 7247 ParentList.fromJson(core.Map _json) {
7068 if (_json.containsKey("etag")) { 7248 if (_json.containsKey("etag")) {
7069 etag = _json["etag"]; 7249 etag = _json["etag"];
7070 } 7250 }
7071 if (_json.containsKey("items")) { 7251 if (_json.containsKey("items")) {
7072 items = _json["items"].map((value) => new ParentReference.fromJson(value)) .toList(); 7252 items = _json["items"]
7253 .map((value) => new ParentReference.fromJson(value))
7254 .toList();
7073 } 7255 }
7074 if (_json.containsKey("kind")) { 7256 if (_json.containsKey("kind")) {
7075 kind = _json["kind"]; 7257 kind = _json["kind"];
7076 } 7258 }
7077 if (_json.containsKey("selfLink")) { 7259 if (_json.containsKey("selfLink")) {
7078 selfLink = _json["selfLink"]; 7260 selfLink = _json["selfLink"];
7079 } 7261 }
7080 } 7262 }
7081 7263
7082 core.Map<core.String, core.Object> toJson() { 7264 core.Map<core.String, core.Object> toJson() {
7083 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7265 final core.Map<core.String, core.Object> _json =
7266 new core.Map<core.String, core.Object>();
7084 if (etag != null) { 7267 if (etag != null) {
7085 _json["etag"] = etag; 7268 _json["etag"] = etag;
7086 } 7269 }
7087 if (items != null) { 7270 if (items != null) {
7088 _json["items"] = items.map((value) => (value).toJson()).toList(); 7271 _json["items"] = items.map((value) => (value).toJson()).toList();
7089 } 7272 }
7090 if (kind != null) { 7273 if (kind != null) {
7091 _json["kind"] = kind; 7274 _json["kind"] = kind;
7092 } 7275 }
7093 if (selfLink != null) { 7276 if (selfLink != null) {
7094 _json["selfLink"] = selfLink; 7277 _json["selfLink"] = selfLink;
7095 } 7278 }
7096 return _json; 7279 return _json;
7097 } 7280 }
7098 } 7281 }
7099 7282
7100 /** A reference to a file's parent. */ 7283 /// A reference to a file's parent.
7101 class ParentReference { 7284 class ParentReference {
7102 /** The ID of the parent. */ 7285 /// The ID of the parent.
7103 core.String id; 7286 core.String id;
7104 /** Whether or not the parent is the root folder. */ 7287
7288 /// Whether or not the parent is the root folder.
7105 core.bool isRoot; 7289 core.bool isRoot;
7106 /** This is always drive#parentReference. */ 7290
7291 /// This is always drive#parentReference.
7107 core.String kind; 7292 core.String kind;
7108 /** A link to the parent. */ 7293
7294 /// A link to the parent.
7109 core.String parentLink; 7295 core.String parentLink;
7110 /** A link back to this reference. */ 7296
7297 /// A link back to this reference.
7111 core.String selfLink; 7298 core.String selfLink;
7112 7299
7113 ParentReference(); 7300 ParentReference();
7114 7301
7115 ParentReference.fromJson(core.Map _json) { 7302 ParentReference.fromJson(core.Map _json) {
7116 if (_json.containsKey("id")) { 7303 if (_json.containsKey("id")) {
7117 id = _json["id"]; 7304 id = _json["id"];
7118 } 7305 }
7119 if (_json.containsKey("isRoot")) { 7306 if (_json.containsKey("isRoot")) {
7120 isRoot = _json["isRoot"]; 7307 isRoot = _json["isRoot"];
7121 } 7308 }
7122 if (_json.containsKey("kind")) { 7309 if (_json.containsKey("kind")) {
7123 kind = _json["kind"]; 7310 kind = _json["kind"];
7124 } 7311 }
7125 if (_json.containsKey("parentLink")) { 7312 if (_json.containsKey("parentLink")) {
7126 parentLink = _json["parentLink"]; 7313 parentLink = _json["parentLink"];
7127 } 7314 }
7128 if (_json.containsKey("selfLink")) { 7315 if (_json.containsKey("selfLink")) {
7129 selfLink = _json["selfLink"]; 7316 selfLink = _json["selfLink"];
7130 } 7317 }
7131 } 7318 }
7132 7319
7133 core.Map<core.String, core.Object> toJson() { 7320 core.Map<core.String, core.Object> toJson() {
7134 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7321 final core.Map<core.String, core.Object> _json =
7322 new core.Map<core.String, core.Object>();
7135 if (id != null) { 7323 if (id != null) {
7136 _json["id"] = id; 7324 _json["id"] = id;
7137 } 7325 }
7138 if (isRoot != null) { 7326 if (isRoot != null) {
7139 _json["isRoot"] = isRoot; 7327 _json["isRoot"] = isRoot;
7140 } 7328 }
7141 if (kind != null) { 7329 if (kind != null) {
7142 _json["kind"] = kind; 7330 _json["kind"] = kind;
7143 } 7331 }
7144 if (parentLink != null) { 7332 if (parentLink != null) {
7145 _json["parentLink"] = parentLink; 7333 _json["parentLink"] = parentLink;
7146 } 7334 }
7147 if (selfLink != null) { 7335 if (selfLink != null) {
7148 _json["selfLink"] = selfLink; 7336 _json["selfLink"] = selfLink;
7149 } 7337 }
7150 return _json; 7338 return _json;
7151 } 7339 }
7152 } 7340 }
7153 7341
7154 class PermissionTeamDrivePermissionDetails { 7342 class PermissionTeamDrivePermissionDetails {
7155 /** 7343 /// Additional roles for this user. Only commenter is currently possible,
7156 * Additional roles for this user. Only commenter is currently possible, 7344 /// though more may be supported in the future.
7157 * though more may be supported in the future.
7158 */
7159 core.List<core.String> additionalRoles; 7345 core.List<core.String> additionalRoles;
7160 /** 7346
7161 * Whether this permission is inherited. This field is always populated. This 7347 /// Whether this permission is inherited. This field is always populated.
7162 * is an output-only field. 7348 /// This is an output-only field.
7163 */
7164 core.bool inherited; 7349 core.bool inherited;
7165 /** 7350
7166 * The ID of the item from which this permission is inherited. This is an 7351 /// The ID of the item from which this permission is inherited. This is an
7167 * output-only field and is only populated for members of the Team Drive. 7352 /// output-only field and is only populated for members of the Team Drive.
7168 */
7169 core.String inheritedFrom; 7353 core.String inheritedFrom;
7170 /** 7354
7171 * The primary role for this user. While new values may be added in the 7355 /// The primary role for this user. While new values may be added in the
7172 * future, the following are currently possible: 7356 /// future, the following are currently possible:
7173 * - organizer 7357 /// - organizer
7174 * - reader 7358 /// - reader
7175 * - writer 7359 /// - writer
7176 */
7177 core.String role; 7360 core.String role;
7178 /** 7361
7179 * The Team Drive permission type for this user. While new values may be added 7362 /// The Team Drive permission type for this user. While new values may be
7180 * in future, the following are currently possible: 7363 /// added in future, the following are currently possible:
7181 * - file 7364 /// - file
7182 * - member 7365 /// - member
7183 */
7184 core.String teamDrivePermissionType; 7366 core.String teamDrivePermissionType;
7185 7367
7186 PermissionTeamDrivePermissionDetails(); 7368 PermissionTeamDrivePermissionDetails();
7187 7369
7188 PermissionTeamDrivePermissionDetails.fromJson(core.Map _json) { 7370 PermissionTeamDrivePermissionDetails.fromJson(core.Map _json) {
7189 if (_json.containsKey("additionalRoles")) { 7371 if (_json.containsKey("additionalRoles")) {
7190 additionalRoles = _json["additionalRoles"]; 7372 additionalRoles = _json["additionalRoles"];
7191 } 7373 }
7192 if (_json.containsKey("inherited")) { 7374 if (_json.containsKey("inherited")) {
7193 inherited = _json["inherited"]; 7375 inherited = _json["inherited"];
7194 } 7376 }
7195 if (_json.containsKey("inheritedFrom")) { 7377 if (_json.containsKey("inheritedFrom")) {
7196 inheritedFrom = _json["inheritedFrom"]; 7378 inheritedFrom = _json["inheritedFrom"];
7197 } 7379 }
7198 if (_json.containsKey("role")) { 7380 if (_json.containsKey("role")) {
7199 role = _json["role"]; 7381 role = _json["role"];
7200 } 7382 }
7201 if (_json.containsKey("teamDrivePermissionType")) { 7383 if (_json.containsKey("teamDrivePermissionType")) {
7202 teamDrivePermissionType = _json["teamDrivePermissionType"]; 7384 teamDrivePermissionType = _json["teamDrivePermissionType"];
7203 } 7385 }
7204 } 7386 }
7205 7387
7206 core.Map<core.String, core.Object> toJson() { 7388 core.Map<core.String, core.Object> toJson() {
7207 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7389 final core.Map<core.String, core.Object> _json =
7390 new core.Map<core.String, core.Object>();
7208 if (additionalRoles != null) { 7391 if (additionalRoles != null) {
7209 _json["additionalRoles"] = additionalRoles; 7392 _json["additionalRoles"] = additionalRoles;
7210 } 7393 }
7211 if (inherited != null) { 7394 if (inherited != null) {
7212 _json["inherited"] = inherited; 7395 _json["inherited"] = inherited;
7213 } 7396 }
7214 if (inheritedFrom != null) { 7397 if (inheritedFrom != null) {
7215 _json["inheritedFrom"] = inheritedFrom; 7398 _json["inheritedFrom"] = inheritedFrom;
7216 } 7399 }
7217 if (role != null) { 7400 if (role != null) {
7218 _json["role"] = role; 7401 _json["role"] = role;
7219 } 7402 }
7220 if (teamDrivePermissionType != null) { 7403 if (teamDrivePermissionType != null) {
7221 _json["teamDrivePermissionType"] = teamDrivePermissionType; 7404 _json["teamDrivePermissionType"] = teamDrivePermissionType;
7222 } 7405 }
7223 return _json; 7406 return _json;
7224 } 7407 }
7225 } 7408 }
7226 7409
7227 /** A permission for a file. */ 7410 /// A permission for a file.
7228 class Permission { 7411 class Permission {
7229 /** 7412 /// Additional roles for this user. Only commenter is currently allowed,
7230 * Additional roles for this user. Only commenter is currently allowed, though 7413 /// though more may be supported in the future.
7231 * more may be supported in the future.
7232 */
7233 core.List<core.String> additionalRoles; 7414 core.List<core.String> additionalRoles;
7234 /** Deprecated. */ 7415
7416 /// Deprecated.
7235 core.String authKey; 7417 core.String authKey;
7236 /** 7418
7237 * Whether the account associated with this permission has been deleted. This 7419 /// Whether the account associated with this permission has been deleted.
7238 * field only pertains to user and group permissions. 7420 /// This field only pertains to user and group permissions.
7239 */
7240 core.bool deleted; 7421 core.bool deleted;
7241 /** 7422
7242 * The domain name of the entity this permission refers to. This is an 7423 /// The domain name of the entity this permission refers to. This is an
7243 * output-only field which is present when the permission type is user, group 7424 /// output-only field which is present when the permission type is user,
7244 * or domain. 7425 /// group or domain.
7245 */
7246 core.String domain; 7426 core.String domain;
7247 /** 7427
7248 * The email address of the user or group this permission refers to. This is 7428 /// The email address of the user or group this permission refers to. This is
7249 * an output-only field which is present when the permission type is user or 7429 /// an output-only field which is present when the permission type is user or
7250 * group. 7430 /// group.
7251 */
7252 core.String emailAddress; 7431 core.String emailAddress;
7253 /** The ETag of the permission. */ 7432
7433 /// The ETag of the permission.
7254 core.String etag; 7434 core.String etag;
7255 /** 7435
7256 * The time at which this permission will expire (RFC 3339 date-time). 7436 /// The time at which this permission will expire (RFC 3339 date-time).
7257 * Expiration dates have the following restrictions: 7437 /// Expiration dates have the following restrictions:
7258 * - They can only be set on user and group permissions 7438 /// - They can only be set on user and group permissions
7259 * - The date must be in the future 7439 /// - The date must be in the future
7260 * - The date cannot be more than a year in the future 7440 /// - The date cannot be more than a year in the future
7261 * - The date can only be set on drive.permissions.update requests 7441 /// - The date can only be set on drive.permissions.update requests
7262 */
7263 core.DateTime expirationDate; 7442 core.DateTime expirationDate;
7264 /** 7443
7265 * The ID of the user this permission refers to, and identical to the 7444 /// The ID of the user this permission refers to, and identical to the
7266 * permissionId in the About and Files resources. When making a 7445 /// permissionId in the About and Files resources. When making a
7267 * drive.permissions.insert request, exactly one of the id or value fields 7446 /// drive.permissions.insert request, exactly one of the id or value fields
7268 * must be specified unless the permission type is anyone, in which case both 7447 /// must be specified unless the permission type is anyone, in which case
7269 * id and value are ignored. 7448 /// both id and value are ignored.
7270 */
7271 core.String id; 7449 core.String id;
7272 /** This is always drive#permission. */ 7450
7451 /// This is always drive#permission.
7273 core.String kind; 7452 core.String kind;
7274 /** The name for this permission. */ 7453
7454 /// The name for this permission.
7275 core.String name; 7455 core.String name;
7276 /** A link to the profile photo, if available. */ 7456
7457 /// A link to the profile photo, if available.
7277 core.String photoLink; 7458 core.String photoLink;
7278 /** 7459
7279 * The primary role for this user. While new values may be supported in the 7460 /// The primary role for this user. While new values may be supported in the
7280 * future, the following are currently allowed: 7461 /// future, the following are currently allowed:
7281 * - organizer 7462 /// - organizer
7282 * - owner 7463 /// - owner
7283 * - reader 7464 /// - reader
7284 * - writer 7465 /// - writer
7285 */
7286 core.String role; 7466 core.String role;
7287 /** A link back to this permission. */ 7467
7468 /// A link back to this permission.
7288 core.String selfLink; 7469 core.String selfLink;
7289 /** 7470
7290 * Details of whether the permissions on this Team Drive item are inherited or 7471 /// Details of whether the permissions on this Team Drive item are inherited
7291 * directly on this item. This is an output-only field which is present only 7472 /// or directly on this item. This is an output-only field which is present
7292 * for Team Drive items. 7473 /// only for Team Drive items.
7293 */
7294 core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails; 7474 core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails;
7295 /** 7475
7296 * The account type. Allowed values are: 7476 /// The account type. Allowed values are:
7297 * - user 7477 /// - user
7298 * - group 7478 /// - group
7299 * - domain 7479 /// - domain
7300 * - anyone 7480 /// - anyone
7301 */
7302 core.String type; 7481 core.String type;
7303 /** 7482
7304 * The email address or domain name for the entity. This is used during 7483 /// The email address or domain name for the entity. This is used during
7305 * inserts and is not populated in responses. When making a 7484 /// inserts and is not populated in responses. When making a
7306 * drive.permissions.insert request, exactly one of the id or value fields 7485 /// drive.permissions.insert request, exactly one of the id or value fields
7307 * must be specified unless the permission type is anyone, in which case both 7486 /// must be specified unless the permission type is anyone, in which case
7308 * id and value are ignored. 7487 /// both id and value are ignored.
7309 */
7310 core.String value; 7488 core.String value;
7311 /** Whether the link is required for this permission. */ 7489
7490 /// Whether the link is required for this permission.
7312 core.bool withLink; 7491 core.bool withLink;
7313 7492
7314 Permission(); 7493 Permission();
7315 7494
7316 Permission.fromJson(core.Map _json) { 7495 Permission.fromJson(core.Map _json) {
7317 if (_json.containsKey("additionalRoles")) { 7496 if (_json.containsKey("additionalRoles")) {
7318 additionalRoles = _json["additionalRoles"]; 7497 additionalRoles = _json["additionalRoles"];
7319 } 7498 }
7320 if (_json.containsKey("authKey")) { 7499 if (_json.containsKey("authKey")) {
7321 authKey = _json["authKey"]; 7500 authKey = _json["authKey"];
(...skipping 25 matching lines...) Expand all
7347 if (_json.containsKey("photoLink")) { 7526 if (_json.containsKey("photoLink")) {
7348 photoLink = _json["photoLink"]; 7527 photoLink = _json["photoLink"];
7349 } 7528 }
7350 if (_json.containsKey("role")) { 7529 if (_json.containsKey("role")) {
7351 role = _json["role"]; 7530 role = _json["role"];
7352 } 7531 }
7353 if (_json.containsKey("selfLink")) { 7532 if (_json.containsKey("selfLink")) {
7354 selfLink = _json["selfLink"]; 7533 selfLink = _json["selfLink"];
7355 } 7534 }
7356 if (_json.containsKey("teamDrivePermissionDetails")) { 7535 if (_json.containsKey("teamDrivePermissionDetails")) {
7357 teamDrivePermissionDetails = _json["teamDrivePermissionDetails"].map((valu e) => new PermissionTeamDrivePermissionDetails.fromJson(value)).toList(); 7536 teamDrivePermissionDetails = _json["teamDrivePermissionDetails"]
7537 .map((value) =>
7538 new PermissionTeamDrivePermissionDetails.fromJson(value))
7539 .toList();
7358 } 7540 }
7359 if (_json.containsKey("type")) { 7541 if (_json.containsKey("type")) {
7360 type = _json["type"]; 7542 type = _json["type"];
7361 } 7543 }
7362 if (_json.containsKey("value")) { 7544 if (_json.containsKey("value")) {
7363 value = _json["value"]; 7545 value = _json["value"];
7364 } 7546 }
7365 if (_json.containsKey("withLink")) { 7547 if (_json.containsKey("withLink")) {
7366 withLink = _json["withLink"]; 7548 withLink = _json["withLink"];
7367 } 7549 }
7368 } 7550 }
7369 7551
7370 core.Map<core.String, core.Object> toJson() { 7552 core.Map<core.String, core.Object> toJson() {
7371 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7553 final core.Map<core.String, core.Object> _json =
7554 new core.Map<core.String, core.Object>();
7372 if (additionalRoles != null) { 7555 if (additionalRoles != null) {
7373 _json["additionalRoles"] = additionalRoles; 7556 _json["additionalRoles"] = additionalRoles;
7374 } 7557 }
7375 if (authKey != null) { 7558 if (authKey != null) {
7376 _json["authKey"] = authKey; 7559 _json["authKey"] = authKey;
7377 } 7560 }
7378 if (deleted != null) { 7561 if (deleted != null) {
7379 _json["deleted"] = deleted; 7562 _json["deleted"] = deleted;
7380 } 7563 }
7381 if (domain != null) { 7564 if (domain != null) {
(...skipping 20 matching lines...) Expand all
7402 if (photoLink != null) { 7585 if (photoLink != null) {
7403 _json["photoLink"] = photoLink; 7586 _json["photoLink"] = photoLink;
7404 } 7587 }
7405 if (role != null) { 7588 if (role != null) {
7406 _json["role"] = role; 7589 _json["role"] = role;
7407 } 7590 }
7408 if (selfLink != null) { 7591 if (selfLink != null) {
7409 _json["selfLink"] = selfLink; 7592 _json["selfLink"] = selfLink;
7410 } 7593 }
7411 if (teamDrivePermissionDetails != null) { 7594 if (teamDrivePermissionDetails != null) {
7412 _json["teamDrivePermissionDetails"] = teamDrivePermissionDetails.map((valu e) => (value).toJson()).toList(); 7595 _json["teamDrivePermissionDetails"] =
7596 teamDrivePermissionDetails.map((value) => (value).toJson()).toList();
7413 } 7597 }
7414 if (type != null) { 7598 if (type != null) {
7415 _json["type"] = type; 7599 _json["type"] = type;
7416 } 7600 }
7417 if (value != null) { 7601 if (value != null) {
7418 _json["value"] = value; 7602 _json["value"] = value;
7419 } 7603 }
7420 if (withLink != null) { 7604 if (withLink != null) {
7421 _json["withLink"] = withLink; 7605 _json["withLink"] = withLink;
7422 } 7606 }
7423 return _json; 7607 return _json;
7424 } 7608 }
7425 } 7609 }
7426 7610
7427 /** An ID for a user or group as seen in Permission items. */ 7611 /// An ID for a user or group as seen in Permission items.
7428 class PermissionId { 7612 class PermissionId {
7429 /** The permission ID. */ 7613 /// The permission ID.
7430 core.String id; 7614 core.String id;
7431 /** This is always drive#permissionId. */ 7615
7616 /// This is always drive#permissionId.
7432 core.String kind; 7617 core.String kind;
7433 7618
7434 PermissionId(); 7619 PermissionId();
7435 7620
7436 PermissionId.fromJson(core.Map _json) { 7621 PermissionId.fromJson(core.Map _json) {
7437 if (_json.containsKey("id")) { 7622 if (_json.containsKey("id")) {
7438 id = _json["id"]; 7623 id = _json["id"];
7439 } 7624 }
7440 if (_json.containsKey("kind")) { 7625 if (_json.containsKey("kind")) {
7441 kind = _json["kind"]; 7626 kind = _json["kind"];
7442 } 7627 }
7443 } 7628 }
7444 7629
7445 core.Map<core.String, core.Object> toJson() { 7630 core.Map<core.String, core.Object> toJson() {
7446 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7631 final core.Map<core.String, core.Object> _json =
7632 new core.Map<core.String, core.Object>();
7447 if (id != null) { 7633 if (id != null) {
7448 _json["id"] = id; 7634 _json["id"] = id;
7449 } 7635 }
7450 if (kind != null) { 7636 if (kind != null) {
7451 _json["kind"] = kind; 7637 _json["kind"] = kind;
7452 } 7638 }
7453 return _json; 7639 return _json;
7454 } 7640 }
7455 } 7641 }
7456 7642
7457 /** A list of permissions associated with a file. */ 7643 /// A list of permissions associated with a file.
7458 class PermissionList { 7644 class PermissionList {
7459 /** The ETag of the list. */ 7645 /// The ETag of the list.
7460 core.String etag; 7646 core.String etag;
7461 /** The list of permissions. */ 7647
7648 /// The list of permissions.
7462 core.List<Permission> items; 7649 core.List<Permission> items;
7463 /** This is always drive#permissionList. */ 7650
7651 /// This is always drive#permissionList.
7464 core.String kind; 7652 core.String kind;
7465 /** 7653
7466 * The page token for the next page of permissions. This field will be absent 7654 /// The page token for the next page of permissions. This field will be
7467 * if the end of the permissions list has been reached. If the token is 7655 /// absent if the end of the permissions list has been reached. If the token
7468 * rejected for any reason, it should be discarded, and pagination should be 7656 /// is rejected for any reason, it should be discarded, and pagination should
7469 * restarted from the first page of results. 7657 /// be restarted from the first page of results.
7470 */
7471 core.String nextPageToken; 7658 core.String nextPageToken;
7472 /** A link back to this list. */ 7659
7660 /// A link back to this list.
7473 core.String selfLink; 7661 core.String selfLink;
7474 7662
7475 PermissionList(); 7663 PermissionList();
7476 7664
7477 PermissionList.fromJson(core.Map _json) { 7665 PermissionList.fromJson(core.Map _json) {
7478 if (_json.containsKey("etag")) { 7666 if (_json.containsKey("etag")) {
7479 etag = _json["etag"]; 7667 etag = _json["etag"];
7480 } 7668 }
7481 if (_json.containsKey("items")) { 7669 if (_json.containsKey("items")) {
7482 items = _json["items"].map((value) => new Permission.fromJson(value)).toLi st(); 7670 items = _json["items"]
7671 .map((value) => new Permission.fromJson(value))
7672 .toList();
7483 } 7673 }
7484 if (_json.containsKey("kind")) { 7674 if (_json.containsKey("kind")) {
7485 kind = _json["kind"]; 7675 kind = _json["kind"];
7486 } 7676 }
7487 if (_json.containsKey("nextPageToken")) { 7677 if (_json.containsKey("nextPageToken")) {
7488 nextPageToken = _json["nextPageToken"]; 7678 nextPageToken = _json["nextPageToken"];
7489 } 7679 }
7490 if (_json.containsKey("selfLink")) { 7680 if (_json.containsKey("selfLink")) {
7491 selfLink = _json["selfLink"]; 7681 selfLink = _json["selfLink"];
7492 } 7682 }
7493 } 7683 }
7494 7684
7495 core.Map<core.String, core.Object> toJson() { 7685 core.Map<core.String, core.Object> toJson() {
7496 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7686 final core.Map<core.String, core.Object> _json =
7687 new core.Map<core.String, core.Object>();
7497 if (etag != null) { 7688 if (etag != null) {
7498 _json["etag"] = etag; 7689 _json["etag"] = etag;
7499 } 7690 }
7500 if (items != null) { 7691 if (items != null) {
7501 _json["items"] = items.map((value) => (value).toJson()).toList(); 7692 _json["items"] = items.map((value) => (value).toJson()).toList();
7502 } 7693 }
7503 if (kind != null) { 7694 if (kind != null) {
7504 _json["kind"] = kind; 7695 _json["kind"] = kind;
7505 } 7696 }
7506 if (nextPageToken != null) { 7697 if (nextPageToken != null) {
7507 _json["nextPageToken"] = nextPageToken; 7698 _json["nextPageToken"] = nextPageToken;
7508 } 7699 }
7509 if (selfLink != null) { 7700 if (selfLink != null) {
7510 _json["selfLink"] = selfLink; 7701 _json["selfLink"] = selfLink;
7511 } 7702 }
7512 return _json; 7703 return _json;
7513 } 7704 }
7514 } 7705 }
7515 7706
7516 /** 7707 /// A key-value pair attached to a file that is either public or private to an
7517 * A key-value pair attached to a file that is either public or private to an 7708 /// application.
7518 * application. 7709 /// The following limits apply to file properties:
7519 * The following limits apply to file properties: 7710 /// - Maximum of 100 properties total per file
7520 * - Maximum of 100 properties total per file 7711 /// - Maximum of 30 private properties per app
7521 * - Maximum of 30 private properties per app 7712 /// - Maximum of 30 public properties
7522 * - Maximum of 30 public properties 7713 /// - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding
7523 * - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding 7714 /// for a single property.
7524 * for a single property.
7525 */
7526 class Property { 7715 class Property {
7527 /** ETag of the property. */ 7716 /// ETag of the property.
7528 core.String etag; 7717 core.String etag;
7529 /** The key of this property. */ 7718
7719 /// The key of this property.
7530 core.String key; 7720 core.String key;
7531 /** This is always drive#property. */ 7721
7722 /// This is always drive#property.
7532 core.String kind; 7723 core.String kind;
7533 /** The link back to this property. */ 7724
7725 /// The link back to this property.
7534 core.String selfLink; 7726 core.String selfLink;
7535 /** The value of this property. */ 7727
7728 /// The value of this property.
7536 core.String value; 7729 core.String value;
7537 /** The visibility of this property. */ 7730
7731 /// The visibility of this property.
7538 core.String visibility; 7732 core.String visibility;
7539 7733
7540 Property(); 7734 Property();
7541 7735
7542 Property.fromJson(core.Map _json) { 7736 Property.fromJson(core.Map _json) {
7543 if (_json.containsKey("etag")) { 7737 if (_json.containsKey("etag")) {
7544 etag = _json["etag"]; 7738 etag = _json["etag"];
7545 } 7739 }
7546 if (_json.containsKey("key")) { 7740 if (_json.containsKey("key")) {
7547 key = _json["key"]; 7741 key = _json["key"];
7548 } 7742 }
7549 if (_json.containsKey("kind")) { 7743 if (_json.containsKey("kind")) {
7550 kind = _json["kind"]; 7744 kind = _json["kind"];
7551 } 7745 }
7552 if (_json.containsKey("selfLink")) { 7746 if (_json.containsKey("selfLink")) {
7553 selfLink = _json["selfLink"]; 7747 selfLink = _json["selfLink"];
7554 } 7748 }
7555 if (_json.containsKey("value")) { 7749 if (_json.containsKey("value")) {
7556 value = _json["value"]; 7750 value = _json["value"];
7557 } 7751 }
7558 if (_json.containsKey("visibility")) { 7752 if (_json.containsKey("visibility")) {
7559 visibility = _json["visibility"]; 7753 visibility = _json["visibility"];
7560 } 7754 }
7561 } 7755 }
7562 7756
7563 core.Map<core.String, core.Object> toJson() { 7757 core.Map<core.String, core.Object> toJson() {
7564 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7758 final core.Map<core.String, core.Object> _json =
7759 new core.Map<core.String, core.Object>();
7565 if (etag != null) { 7760 if (etag != null) {
7566 _json["etag"] = etag; 7761 _json["etag"] = etag;
7567 } 7762 }
7568 if (key != null) { 7763 if (key != null) {
7569 _json["key"] = key; 7764 _json["key"] = key;
7570 } 7765 }
7571 if (kind != null) { 7766 if (kind != null) {
7572 _json["kind"] = kind; 7767 _json["kind"] = kind;
7573 } 7768 }
7574 if (selfLink != null) { 7769 if (selfLink != null) {
7575 _json["selfLink"] = selfLink; 7770 _json["selfLink"] = selfLink;
7576 } 7771 }
7577 if (value != null) { 7772 if (value != null) {
7578 _json["value"] = value; 7773 _json["value"] = value;
7579 } 7774 }
7580 if (visibility != null) { 7775 if (visibility != null) {
7581 _json["visibility"] = visibility; 7776 _json["visibility"] = visibility;
7582 } 7777 }
7583 return _json; 7778 return _json;
7584 } 7779 }
7585 } 7780 }
7586 7781
7587 /** 7782 /// A collection of properties, key-value pairs that are either public or
7588 * A collection of properties, key-value pairs that are either public or private 7783 /// private to an application.
7589 * to an application.
7590 */
7591 class PropertyList { 7784 class PropertyList {
7592 /** The ETag of the list. */ 7785 /// The ETag of the list.
7593 core.String etag; 7786 core.String etag;
7594 /** The list of properties. */ 7787
7788 /// The list of properties.
7595 core.List<Property> items; 7789 core.List<Property> items;
7596 /** This is always drive#propertyList. */ 7790
7791 /// This is always drive#propertyList.
7597 core.String kind; 7792 core.String kind;
7598 /** The link back to this list. */ 7793
7794 /// The link back to this list.
7599 core.String selfLink; 7795 core.String selfLink;
7600 7796
7601 PropertyList(); 7797 PropertyList();
7602 7798
7603 PropertyList.fromJson(core.Map _json) { 7799 PropertyList.fromJson(core.Map _json) {
7604 if (_json.containsKey("etag")) { 7800 if (_json.containsKey("etag")) {
7605 etag = _json["etag"]; 7801 etag = _json["etag"];
7606 } 7802 }
7607 if (_json.containsKey("items")) { 7803 if (_json.containsKey("items")) {
7608 items = _json["items"].map((value) => new Property.fromJson(value)).toList (); 7804 items =
7805 _json["items"].map((value) => new Property.fromJson(value)).toList();
7609 } 7806 }
7610 if (_json.containsKey("kind")) { 7807 if (_json.containsKey("kind")) {
7611 kind = _json["kind"]; 7808 kind = _json["kind"];
7612 } 7809 }
7613 if (_json.containsKey("selfLink")) { 7810 if (_json.containsKey("selfLink")) {
7614 selfLink = _json["selfLink"]; 7811 selfLink = _json["selfLink"];
7615 } 7812 }
7616 } 7813 }
7617 7814
7618 core.Map<core.String, core.Object> toJson() { 7815 core.Map<core.String, core.Object> toJson() {
7619 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7816 final core.Map<core.String, core.Object> _json =
7817 new core.Map<core.String, core.Object>();
7620 if (etag != null) { 7818 if (etag != null) {
7621 _json["etag"] = etag; 7819 _json["etag"] = etag;
7622 } 7820 }
7623 if (items != null) { 7821 if (items != null) {
7624 _json["items"] = items.map((value) => (value).toJson()).toList(); 7822 _json["items"] = items.map((value) => (value).toJson()).toList();
7625 } 7823 }
7626 if (kind != null) { 7824 if (kind != null) {
7627 _json["kind"] = kind; 7825 _json["kind"] = kind;
7628 } 7826 }
7629 if (selfLink != null) { 7827 if (selfLink != null) {
7630 _json["selfLink"] = selfLink; 7828 _json["selfLink"] = selfLink;
7631 } 7829 }
7632 return _json; 7830 return _json;
7633 } 7831 }
7634 } 7832 }
7635 7833
7636 /** A revision of a file. */ 7834 /// A revision of a file.
7637 class Revision { 7835 class Revision {
7638 /** 7836 /// Short term download URL for the file. This will only be populated on
7639 * Short term download URL for the file. This will only be populated on files 7837 /// files with content stored in Drive.
7640 * with content stored in Drive.
7641 */
7642 core.String downloadUrl; 7838 core.String downloadUrl;
7643 /** The ETag of the revision. */ 7839
7840 /// The ETag of the revision.
7644 core.String etag; 7841 core.String etag;
7645 /** Links for exporting Google Docs to specific formats. */ 7842
7843 /// Links for exporting Google Docs to specific formats.
7646 core.Map<core.String, core.String> exportLinks; 7844 core.Map<core.String, core.String> exportLinks;
7647 /** 7845
7648 * The size of the revision in bytes. This will only be populated on files 7846 /// The size of the revision in bytes. This will only be populated on files
7649 * with content stored in Drive. 7847 /// with content stored in Drive.
7650 */
7651 core.String fileSize; 7848 core.String fileSize;
7652 /** The ID of the revision. */ 7849
7850 /// The ID of the revision.
7653 core.String id; 7851 core.String id;
7654 /** This is always drive#revision. */ 7852
7853 /// This is always drive#revision.
7655 core.String kind; 7854 core.String kind;
7656 /** The last user to modify this revision. */ 7855
7856 /// The last user to modify this revision.
7657 User lastModifyingUser; 7857 User lastModifyingUser;
7658 /** Name of the last user to modify this revision. */ 7858
7859 /// Name of the last user to modify this revision.
7659 core.String lastModifyingUserName; 7860 core.String lastModifyingUserName;
7660 /** 7861
7661 * An MD5 checksum for the content of this revision. This will only be 7862 /// An MD5 checksum for the content of this revision. This will only be
7662 * populated on files with content stored in Drive. 7863 /// populated on files with content stored in Drive.
7663 */
7664 core.String md5Checksum; 7864 core.String md5Checksum;
7665 /** The MIME type of the revision. */ 7865
7866 /// The MIME type of the revision.
7666 core.String mimeType; 7867 core.String mimeType;
7667 /** Last time this revision was modified (formatted RFC 3339 timestamp). */ 7868
7869 /// Last time this revision was modified (formatted RFC 3339 timestamp).
7668 core.DateTime modifiedDate; 7870 core.DateTime modifiedDate;
7669 /** 7871
7670 * The original filename when this revision was created. This will only be 7872 /// The original filename when this revision was created. This will only be
7671 * populated on files with content stored in Drive. 7873 /// populated on files with content stored in Drive.
7672 */
7673 core.String originalFilename; 7874 core.String originalFilename;
7674 /** 7875
7675 * Whether this revision is pinned to prevent automatic purging. This will 7876 /// Whether this revision is pinned to prevent automatic purging. This will
7676 * only be populated and can only be modified on files with content stored in 7877 /// only be populated and can only be modified on files with content stored
7677 * Drive which are not Google Docs. Revisions can also be pinned when they are 7878 /// in Drive which are not Google Docs. Revisions can also be pinned when
7678 * created through the drive.files.insert/update/copy by using the pinned 7879 /// they are created through the drive.files.insert/update/copy by using the
7679 * query parameter. 7880 /// pinned query parameter.
7680 */
7681 core.bool pinned; 7881 core.bool pinned;
7682 /** 7882
7683 * Whether subsequent revisions will be automatically republished. This is 7883 /// Whether subsequent revisions will be automatically republished. This is
7684 * only populated and can only be modified for Google Docs. 7884 /// only populated and can only be modified for Google Docs.
7685 */
7686 core.bool publishAuto; 7885 core.bool publishAuto;
7687 /** 7886
7688 * Whether this revision is published. This is only populated and can only be 7887 /// Whether this revision is published. This is only populated and can only
7689 * modified for Google Docs. 7888 /// be modified for Google Docs.
7690 */
7691 core.bool published; 7889 core.bool published;
7692 /** A link to the published revision. */ 7890
7891 /// A link to the published revision.
7693 core.String publishedLink; 7892 core.String publishedLink;
7694 /** 7893
7695 * Whether this revision is published outside the domain. This is only 7894 /// Whether this revision is published outside the domain. This is only
7696 * populated and can only be modified for Google Docs. 7895 /// populated and can only be modified for Google Docs.
7697 */
7698 core.bool publishedOutsideDomain; 7896 core.bool publishedOutsideDomain;
7699 /** A link back to this revision. */ 7897
7898 /// A link back to this revision.
7700 core.String selfLink; 7899 core.String selfLink;
7701 7900
7702 Revision(); 7901 Revision();
7703 7902
7704 Revision.fromJson(core.Map _json) { 7903 Revision.fromJson(core.Map _json) {
7705 if (_json.containsKey("downloadUrl")) { 7904 if (_json.containsKey("downloadUrl")) {
7706 downloadUrl = _json["downloadUrl"]; 7905 downloadUrl = _json["downloadUrl"];
7707 } 7906 }
7708 if (_json.containsKey("etag")) { 7907 if (_json.containsKey("etag")) {
7709 etag = _json["etag"]; 7908 etag = _json["etag"];
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
7752 } 7951 }
7753 if (_json.containsKey("publishedOutsideDomain")) { 7952 if (_json.containsKey("publishedOutsideDomain")) {
7754 publishedOutsideDomain = _json["publishedOutsideDomain"]; 7953 publishedOutsideDomain = _json["publishedOutsideDomain"];
7755 } 7954 }
7756 if (_json.containsKey("selfLink")) { 7955 if (_json.containsKey("selfLink")) {
7757 selfLink = _json["selfLink"]; 7956 selfLink = _json["selfLink"];
7758 } 7957 }
7759 } 7958 }
7760 7959
7761 core.Map<core.String, core.Object> toJson() { 7960 core.Map<core.String, core.Object> toJson() {
7762 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 7961 final core.Map<core.String, core.Object> _json =
7962 new core.Map<core.String, core.Object>();
7763 if (downloadUrl != null) { 7963 if (downloadUrl != null) {
7764 _json["downloadUrl"] = downloadUrl; 7964 _json["downloadUrl"] = downloadUrl;
7765 } 7965 }
7766 if (etag != null) { 7966 if (etag != null) {
7767 _json["etag"] = etag; 7967 _json["etag"] = etag;
7768 } 7968 }
7769 if (exportLinks != null) { 7969 if (exportLinks != null) {
7770 _json["exportLinks"] = exportLinks; 7970 _json["exportLinks"] = exportLinks;
7771 } 7971 }
7772 if (fileSize != null) { 7972 if (fileSize != null) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
7811 if (publishedOutsideDomain != null) { 8011 if (publishedOutsideDomain != null) {
7812 _json["publishedOutsideDomain"] = publishedOutsideDomain; 8012 _json["publishedOutsideDomain"] = publishedOutsideDomain;
7813 } 8013 }
7814 if (selfLink != null) { 8014 if (selfLink != null) {
7815 _json["selfLink"] = selfLink; 8015 _json["selfLink"] = selfLink;
7816 } 8016 }
7817 return _json; 8017 return _json;
7818 } 8018 }
7819 } 8019 }
7820 8020
7821 /** A list of revisions of a file. */ 8021 /// A list of revisions of a file.
7822 class RevisionList { 8022 class RevisionList {
7823 /** The ETag of the list. */ 8023 /// The ETag of the list.
7824 core.String etag; 8024 core.String etag;
7825 /** 8025
7826 * The list of revisions. If nextPageToken is populated, then this list may be 8026 /// The list of revisions. If nextPageToken is populated, then this list may
7827 * incomplete and an additional page of results should be fetched. 8027 /// be incomplete and an additional page of results should be fetched.
7828 */
7829 core.List<Revision> items; 8028 core.List<Revision> items;
7830 /** This is always drive#revisionList. */ 8029
8030 /// This is always drive#revisionList.
7831 core.String kind; 8031 core.String kind;
7832 /** 8032
7833 * The page token for the next page of revisions. This field will be absent if 8033 /// The page token for the next page of revisions. This field will be absent
7834 * the end of the revisions list has been reached. If the token is rejected 8034 /// if the end of the revisions list has been reached. If the token is
7835 * for any reason, it should be discarded and pagination should be restarted 8035 /// rejected for any reason, it should be discarded and pagination should be
7836 * from the first page of results. 8036 /// restarted from the first page of results.
7837 */
7838 core.String nextPageToken; 8037 core.String nextPageToken;
7839 /** A link back to this list. */ 8038
8039 /// A link back to this list.
7840 core.String selfLink; 8040 core.String selfLink;
7841 8041
7842 RevisionList(); 8042 RevisionList();
7843 8043
7844 RevisionList.fromJson(core.Map _json) { 8044 RevisionList.fromJson(core.Map _json) {
7845 if (_json.containsKey("etag")) { 8045 if (_json.containsKey("etag")) {
7846 etag = _json["etag"]; 8046 etag = _json["etag"];
7847 } 8047 }
7848 if (_json.containsKey("items")) { 8048 if (_json.containsKey("items")) {
7849 items = _json["items"].map((value) => new Revision.fromJson(value)).toList (); 8049 items =
8050 _json["items"].map((value) => new Revision.fromJson(value)).toList();
7850 } 8051 }
7851 if (_json.containsKey("kind")) { 8052 if (_json.containsKey("kind")) {
7852 kind = _json["kind"]; 8053 kind = _json["kind"];
7853 } 8054 }
7854 if (_json.containsKey("nextPageToken")) { 8055 if (_json.containsKey("nextPageToken")) {
7855 nextPageToken = _json["nextPageToken"]; 8056 nextPageToken = _json["nextPageToken"];
7856 } 8057 }
7857 if (_json.containsKey("selfLink")) { 8058 if (_json.containsKey("selfLink")) {
7858 selfLink = _json["selfLink"]; 8059 selfLink = _json["selfLink"];
7859 } 8060 }
7860 } 8061 }
7861 8062
7862 core.Map<core.String, core.Object> toJson() { 8063 core.Map<core.String, core.Object> toJson() {
7863 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8064 final core.Map<core.String, core.Object> _json =
8065 new core.Map<core.String, core.Object>();
7864 if (etag != null) { 8066 if (etag != null) {
7865 _json["etag"] = etag; 8067 _json["etag"] = etag;
7866 } 8068 }
7867 if (items != null) { 8069 if (items != null) {
7868 _json["items"] = items.map((value) => (value).toJson()).toList(); 8070 _json["items"] = items.map((value) => (value).toJson()).toList();
7869 } 8071 }
7870 if (kind != null) { 8072 if (kind != null) {
7871 _json["kind"] = kind; 8073 _json["kind"] = kind;
7872 } 8074 }
7873 if (nextPageToken != null) { 8075 if (nextPageToken != null) {
7874 _json["nextPageToken"] = nextPageToken; 8076 _json["nextPageToken"] = nextPageToken;
7875 } 8077 }
7876 if (selfLink != null) { 8078 if (selfLink != null) {
7877 _json["selfLink"] = selfLink; 8079 _json["selfLink"] = selfLink;
7878 } 8080 }
7879 return _json; 8081 return _json;
7880 } 8082 }
7881 } 8083 }
7882 8084
7883 class StartPageToken { 8085 class StartPageToken {
7884 /** 8086 /// Identifies what kind of resource this is. Value: the fixed string
7885 * Identifies what kind of resource this is. Value: the fixed string 8087 /// "drive#startPageToken".
7886 * "drive#startPageToken".
7887 */
7888 core.String kind; 8088 core.String kind;
7889 /** The starting page token for listing changes. */ 8089
8090 /// The starting page token for listing changes.
7890 core.String startPageToken; 8091 core.String startPageToken;
7891 8092
7892 StartPageToken(); 8093 StartPageToken();
7893 8094
7894 StartPageToken.fromJson(core.Map _json) { 8095 StartPageToken.fromJson(core.Map _json) {
7895 if (_json.containsKey("kind")) { 8096 if (_json.containsKey("kind")) {
7896 kind = _json["kind"]; 8097 kind = _json["kind"];
7897 } 8098 }
7898 if (_json.containsKey("startPageToken")) { 8099 if (_json.containsKey("startPageToken")) {
7899 startPageToken = _json["startPageToken"]; 8100 startPageToken = _json["startPageToken"];
7900 } 8101 }
7901 } 8102 }
7902 8103
7903 core.Map<core.String, core.Object> toJson() { 8104 core.Map<core.String, core.Object> toJson() {
7904 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8105 final core.Map<core.String, core.Object> _json =
8106 new core.Map<core.String, core.Object>();
7905 if (kind != null) { 8107 if (kind != null) {
7906 _json["kind"] = kind; 8108 _json["kind"] = kind;
7907 } 8109 }
7908 if (startPageToken != null) { 8110 if (startPageToken != null) {
7909 _json["startPageToken"] = startPageToken; 8111 _json["startPageToken"] = startPageToken;
7910 } 8112 }
7911 return _json; 8113 return _json;
7912 } 8114 }
7913 } 8115 }
7914 8116
7915 /** 8117 /// An image file and cropping parameters from which a background image for
7916 * An image file and cropping parameters from which a background image for this 8118 /// this Team Drive is set. This is a write only field; it can only be set on
7917 * Team Drive is set. This is a write only field; it can only be set on 8119 /// drive.teamdrives.update requests that don't set themeId. When specified,
7918 * drive.teamdrives.update requests that don't set themeId. When specified, all 8120 /// all fields of the backgroundImageFile must be set.
7919 * fields of the backgroundImageFile must be set.
7920 */
7921 class TeamDriveBackgroundImageFile { 8121 class TeamDriveBackgroundImageFile {
7922 /** The ID of an image file in Drive to use for the background image. */ 8122 /// The ID of an image file in Drive to use for the background image.
7923 core.String id; 8123 core.String id;
7924 /** 8124
7925 * The width of the cropped image in the closed range of 0 to 1. This value 8125 /// The width of the cropped image in the closed range of 0 to 1. This value
7926 * represents the width of the cropped image divided by the width of the 8126 /// represents the width of the cropped image divided by the width of the
7927 * entire image. The height is computed by applying a width to height aspect 8127 /// entire image. The height is computed by applying a width to height aspect
7928 * ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 8128 /// ratio of 80 to 9. The resulting image must be at least 1280 pixels wide
7929 * 144 pixels high. 8129 /// and 144 pixels high.
7930 */
7931 core.double width; 8130 core.double width;
7932 /** 8131
7933 * The X coordinate of the upper left corner of the cropping area in the 8132 /// The X coordinate of the upper left corner of the cropping area in the
7934 * background image. This is a value in the closed range of 0 to 1. This value 8133 /// background image. This is a value in the closed range of 0 to 1. This
7935 * represents the horizontal distance from the left side of the entire image 8134 /// value represents the horizontal distance from the left side of the entire
7936 * to the left side of the cropping area divided by the width of the entire 8135 /// image to the left side of the cropping area divided by the width of the
7937 * image. 8136 /// entire image.
7938 */
7939 core.double xCoordinate; 8137 core.double xCoordinate;
7940 /** 8138
7941 * The Y coordinate of the upper left corner of the cropping area in the 8139 /// The Y coordinate of the upper left corner of the cropping area in the
7942 * background image. This is a value in the closed range of 0 to 1. This value 8140 /// background image. This is a value in the closed range of 0 to 1. This
7943 * represents the vertical distance from the top side of the entire image to 8141 /// value represents the vertical distance from the top side of the entire
7944 * the top side of the cropping area divided by the height of the entire 8142 /// image to the top side of the cropping area divided by the height of the
7945 * image. 8143 /// entire image.
7946 */
7947 core.double yCoordinate; 8144 core.double yCoordinate;
7948 8145
7949 TeamDriveBackgroundImageFile(); 8146 TeamDriveBackgroundImageFile();
7950 8147
7951 TeamDriveBackgroundImageFile.fromJson(core.Map _json) { 8148 TeamDriveBackgroundImageFile.fromJson(core.Map _json) {
7952 if (_json.containsKey("id")) { 8149 if (_json.containsKey("id")) {
7953 id = _json["id"]; 8150 id = _json["id"];
7954 } 8151 }
7955 if (_json.containsKey("width")) { 8152 if (_json.containsKey("width")) {
7956 width = _json["width"]; 8153 width = _json["width"];
7957 } 8154 }
7958 if (_json.containsKey("xCoordinate")) { 8155 if (_json.containsKey("xCoordinate")) {
7959 xCoordinate = _json["xCoordinate"]; 8156 xCoordinate = _json["xCoordinate"];
7960 } 8157 }
7961 if (_json.containsKey("yCoordinate")) { 8158 if (_json.containsKey("yCoordinate")) {
7962 yCoordinate = _json["yCoordinate"]; 8159 yCoordinate = _json["yCoordinate"];
7963 } 8160 }
7964 } 8161 }
7965 8162
7966 core.Map<core.String, core.Object> toJson() { 8163 core.Map<core.String, core.Object> toJson() {
7967 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8164 final core.Map<core.String, core.Object> _json =
8165 new core.Map<core.String, core.Object>();
7968 if (id != null) { 8166 if (id != null) {
7969 _json["id"] = id; 8167 _json["id"] = id;
7970 } 8168 }
7971 if (width != null) { 8169 if (width != null) {
7972 _json["width"] = width; 8170 _json["width"] = width;
7973 } 8171 }
7974 if (xCoordinate != null) { 8172 if (xCoordinate != null) {
7975 _json["xCoordinate"] = xCoordinate; 8173 _json["xCoordinate"] = xCoordinate;
7976 } 8174 }
7977 if (yCoordinate != null) { 8175 if (yCoordinate != null) {
7978 _json["yCoordinate"] = yCoordinate; 8176 _json["yCoordinate"] = yCoordinate;
7979 } 8177 }
7980 return _json; 8178 return _json;
7981 } 8179 }
7982 } 8180 }
7983 8181
7984 /** Capabilities the current user has on this Team Drive. */ 8182 /// Capabilities the current user has on this Team Drive.
7985 class TeamDriveCapabilities { 8183 class TeamDriveCapabilities {
7986 /** 8184 /// Whether the current user can add children to folders in this Team Drive.
7987 * Whether the current user can add children to folders in this Team Drive.
7988 */
7989 core.bool canAddChildren; 8185 core.bool canAddChildren;
7990 /** Whether the current user can change the background of this Team Drive. */ 8186
8187 /// Whether the current user can change the background of this Team Drive.
7991 core.bool canChangeTeamDriveBackground; 8188 core.bool canChangeTeamDriveBackground;
7992 /** Whether the current user can comment on files in this Team Drive. */ 8189
8190 /// Whether the current user can comment on files in this Team Drive.
7993 core.bool canComment; 8191 core.bool canComment;
7994 /** Whether the current user can copy files in this Team Drive. */ 8192
8193 /// Whether the current user can copy files in this Team Drive.
7995 core.bool canCopy; 8194 core.bool canCopy;
7996 /** 8195
7997 * Whether the current user can delete this Team Drive. Attempting to delete 8196 /// Whether the current user can delete this Team Drive. Attempting to delete
7998 * the Team Drive may still fail if there are untrashed items inside the Team 8197 /// the Team Drive may still fail if there are untrashed items inside the
7999 * Drive. 8198 /// Team Drive.
8000 */
8001 core.bool canDeleteTeamDrive; 8199 core.bool canDeleteTeamDrive;
8002 /** Whether the current user can download files in this Team Drive. */ 8200
8201 /// Whether the current user can download files in this Team Drive.
8003 core.bool canDownload; 8202 core.bool canDownload;
8004 /** Whether the current user can edit files in this Team Drive */ 8203
8204 /// Whether the current user can edit files in this Team Drive
8005 core.bool canEdit; 8205 core.bool canEdit;
8006 /** 8206
8007 * Whether the current user can list the children of folders in this Team 8207 /// Whether the current user can list the children of folders in this Team
8008 * Drive. 8208 /// Drive.
8009 */
8010 core.bool canListChildren; 8209 core.bool canListChildren;
8011 /** 8210
8012 * Whether the current user can add members to this Team Drive or remove them 8211 /// Whether the current user can add members to this Team Drive or remove
8013 * or change their role. 8212 /// them or change their role.
8014 */
8015 core.bool canManageMembers; 8213 core.bool canManageMembers;
8016 /** 8214
8017 * Whether the current user can read the revisions resource of files in this 8215 /// Whether the current user can read the revisions resource of files in this
8018 * Team Drive. 8216 /// Team Drive.
8019 */
8020 core.bool canReadRevisions; 8217 core.bool canReadRevisions;
8021 /** 8218
8022 * Whether the current user can remove children from folders in this Team 8219 /// Whether the current user can remove children from folders in this Team
8023 * Drive. 8220 /// Drive.
8024 */
8025 core.bool canRemoveChildren; 8221 core.bool canRemoveChildren;
8026 /** 8222
8027 * Whether the current user can rename files or folders in this Team Drive. 8223 /// Whether the current user can rename files or folders in this Team Drive.
8028 */
8029 core.bool canRename; 8224 core.bool canRename;
8030 /** Whether the current user can rename this Team Drive. */ 8225
8226 /// Whether the current user can rename this Team Drive.
8031 core.bool canRenameTeamDrive; 8227 core.bool canRenameTeamDrive;
8032 /** 8228
8033 * Whether the current user can share files or folders in this Team Drive. 8229 /// Whether the current user can share files or folders in this Team Drive.
8034 */
8035 core.bool canShare; 8230 core.bool canShare;
8036 8231
8037 TeamDriveCapabilities(); 8232 TeamDriveCapabilities();
8038 8233
8039 TeamDriveCapabilities.fromJson(core.Map _json) { 8234 TeamDriveCapabilities.fromJson(core.Map _json) {
8040 if (_json.containsKey("canAddChildren")) { 8235 if (_json.containsKey("canAddChildren")) {
8041 canAddChildren = _json["canAddChildren"]; 8236 canAddChildren = _json["canAddChildren"];
8042 } 8237 }
8043 if (_json.containsKey("canChangeTeamDriveBackground")) { 8238 if (_json.containsKey("canChangeTeamDriveBackground")) {
8044 canChangeTeamDriveBackground = _json["canChangeTeamDriveBackground"]; 8239 canChangeTeamDriveBackground = _json["canChangeTeamDriveBackground"];
(...skipping 30 matching lines...) Expand all
8075 } 8270 }
8076 if (_json.containsKey("canRenameTeamDrive")) { 8271 if (_json.containsKey("canRenameTeamDrive")) {
8077 canRenameTeamDrive = _json["canRenameTeamDrive"]; 8272 canRenameTeamDrive = _json["canRenameTeamDrive"];
8078 } 8273 }
8079 if (_json.containsKey("canShare")) { 8274 if (_json.containsKey("canShare")) {
8080 canShare = _json["canShare"]; 8275 canShare = _json["canShare"];
8081 } 8276 }
8082 } 8277 }
8083 8278
8084 core.Map<core.String, core.Object> toJson() { 8279 core.Map<core.String, core.Object> toJson() {
8085 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8280 final core.Map<core.String, core.Object> _json =
8281 new core.Map<core.String, core.Object>();
8086 if (canAddChildren != null) { 8282 if (canAddChildren != null) {
8087 _json["canAddChildren"] = canAddChildren; 8283 _json["canAddChildren"] = canAddChildren;
8088 } 8284 }
8089 if (canChangeTeamDriveBackground != null) { 8285 if (canChangeTeamDriveBackground != null) {
8090 _json["canChangeTeamDriveBackground"] = canChangeTeamDriveBackground; 8286 _json["canChangeTeamDriveBackground"] = canChangeTeamDriveBackground;
8091 } 8287 }
8092 if (canComment != null) { 8288 if (canComment != null) {
8093 _json["canComment"] = canComment; 8289 _json["canComment"] = canComment;
8094 } 8290 }
8095 if (canCopy != null) { 8291 if (canCopy != null) {
(...skipping 26 matching lines...) Expand all
8122 if (canRenameTeamDrive != null) { 8318 if (canRenameTeamDrive != null) {
8123 _json["canRenameTeamDrive"] = canRenameTeamDrive; 8319 _json["canRenameTeamDrive"] = canRenameTeamDrive;
8124 } 8320 }
8125 if (canShare != null) { 8321 if (canShare != null) {
8126 _json["canShare"] = canShare; 8322 _json["canShare"] = canShare;
8127 } 8323 }
8128 return _json; 8324 return _json;
8129 } 8325 }
8130 } 8326 }
8131 8327
8132 /** Representation of a Team Drive. */ 8328 /// Representation of a Team Drive.
8133 class TeamDrive { 8329 class TeamDrive {
8134 /** 8330 /// An image file and cropping parameters from which a background image for
8135 * An image file and cropping parameters from which a background image for 8331 /// this Team Drive is set. This is a write only field; it can only be set on
8136 * this Team Drive is set. This is a write only field; it can only be set on 8332 /// drive.teamdrives.update requests that don't set themeId. When specified,
8137 * drive.teamdrives.update requests that don't set themeId. When specified, 8333 /// all fields of the backgroundImageFile must be set.
8138 * all fields of the backgroundImageFile must be set.
8139 */
8140 TeamDriveBackgroundImageFile backgroundImageFile; 8334 TeamDriveBackgroundImageFile backgroundImageFile;
8141 /** A short-lived link to this Team Drive's background image. */ 8335
8336 /// A short-lived link to this Team Drive's background image.
8142 core.String backgroundImageLink; 8337 core.String backgroundImageLink;
8143 /** Capabilities the current user has on this Team Drive. */ 8338
8339 /// Capabilities the current user has on this Team Drive.
8144 TeamDriveCapabilities capabilities; 8340 TeamDriveCapabilities capabilities;
8145 /** 8341
8146 * The color of this Team Drive as an RGB hex string. It can only be set on a 8342 /// The color of this Team Drive as an RGB hex string. It can only be set on
8147 * drive.teamdrives.update request that does not set themeId. 8343 /// a drive.teamdrives.update request that does not set themeId.
8148 */
8149 core.String colorRgb; 8344 core.String colorRgb;
8150 /** 8345
8151 * The ID of this Team Drive which is also the ID of the top level folder for 8346 /// The ID of this Team Drive which is also the ID of the top level folder
8152 * this Team Drive. 8347 /// for this Team Drive.
8153 */
8154 core.String id; 8348 core.String id;
8155 /** This is always drive#teamDrive */ 8349
8350 /// This is always drive#teamDrive
8156 core.String kind; 8351 core.String kind;
8157 /** The name of this Team Drive. */ 8352
8353 /// The name of this Team Drive.
8158 core.String name; 8354 core.String name;
8159 /** 8355
8160 * The ID of the theme from which the background image and color will be set. 8356 /// The ID of the theme from which the background image and color will be
8161 * The set of possible teamDriveThemes can be retrieved from a drive.about.get 8357 /// set. The set of possible teamDriveThemes can be retrieved from a
8162 * response. When not specified on a drive.teamdrives.insert request, a random 8358 /// drive.about.get response. When not specified on a drive.teamdrives.insert
8163 * theme is chosen from which the background image and color are set. This is 8359 /// request, a random theme is chosen from which the background image and
8164 * a write-only field; it can only be set on requests that don't set colorRgb 8360 /// color are set. This is a write-only field; it can only be set on requests
8165 * or backgroundImageFile. 8361 /// that don't set colorRgb or backgroundImageFile.
8166 */
8167 core.String themeId; 8362 core.String themeId;
8168 8363
8169 TeamDrive(); 8364 TeamDrive();
8170 8365
8171 TeamDrive.fromJson(core.Map _json) { 8366 TeamDrive.fromJson(core.Map _json) {
8172 if (_json.containsKey("backgroundImageFile")) { 8367 if (_json.containsKey("backgroundImageFile")) {
8173 backgroundImageFile = new TeamDriveBackgroundImageFile.fromJson(_json["bac kgroundImageFile"]); 8368 backgroundImageFile = new TeamDriveBackgroundImageFile.fromJson(
8369 _json["backgroundImageFile"]);
8174 } 8370 }
8175 if (_json.containsKey("backgroundImageLink")) { 8371 if (_json.containsKey("backgroundImageLink")) {
8176 backgroundImageLink = _json["backgroundImageLink"]; 8372 backgroundImageLink = _json["backgroundImageLink"];
8177 } 8373 }
8178 if (_json.containsKey("capabilities")) { 8374 if (_json.containsKey("capabilities")) {
8179 capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]); 8375 capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]);
8180 } 8376 }
8181 if (_json.containsKey("colorRgb")) { 8377 if (_json.containsKey("colorRgb")) {
8182 colorRgb = _json["colorRgb"]; 8378 colorRgb = _json["colorRgb"];
8183 } 8379 }
8184 if (_json.containsKey("id")) { 8380 if (_json.containsKey("id")) {
8185 id = _json["id"]; 8381 id = _json["id"];
8186 } 8382 }
8187 if (_json.containsKey("kind")) { 8383 if (_json.containsKey("kind")) {
8188 kind = _json["kind"]; 8384 kind = _json["kind"];
8189 } 8385 }
8190 if (_json.containsKey("name")) { 8386 if (_json.containsKey("name")) {
8191 name = _json["name"]; 8387 name = _json["name"];
8192 } 8388 }
8193 if (_json.containsKey("themeId")) { 8389 if (_json.containsKey("themeId")) {
8194 themeId = _json["themeId"]; 8390 themeId = _json["themeId"];
8195 } 8391 }
8196 } 8392 }
8197 8393
8198 core.Map<core.String, core.Object> toJson() { 8394 core.Map<core.String, core.Object> toJson() {
8199 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8395 final core.Map<core.String, core.Object> _json =
8396 new core.Map<core.String, core.Object>();
8200 if (backgroundImageFile != null) { 8397 if (backgroundImageFile != null) {
8201 _json["backgroundImageFile"] = (backgroundImageFile).toJson(); 8398 _json["backgroundImageFile"] = (backgroundImageFile).toJson();
8202 } 8399 }
8203 if (backgroundImageLink != null) { 8400 if (backgroundImageLink != null) {
8204 _json["backgroundImageLink"] = backgroundImageLink; 8401 _json["backgroundImageLink"] = backgroundImageLink;
8205 } 8402 }
8206 if (capabilities != null) { 8403 if (capabilities != null) {
8207 _json["capabilities"] = (capabilities).toJson(); 8404 _json["capabilities"] = (capabilities).toJson();
8208 } 8405 }
8209 if (colorRgb != null) { 8406 if (colorRgb != null) {
8210 _json["colorRgb"] = colorRgb; 8407 _json["colorRgb"] = colorRgb;
8211 } 8408 }
8212 if (id != null) { 8409 if (id != null) {
8213 _json["id"] = id; 8410 _json["id"] = id;
8214 } 8411 }
8215 if (kind != null) { 8412 if (kind != null) {
8216 _json["kind"] = kind; 8413 _json["kind"] = kind;
8217 } 8414 }
8218 if (name != null) { 8415 if (name != null) {
8219 _json["name"] = name; 8416 _json["name"] = name;
8220 } 8417 }
8221 if (themeId != null) { 8418 if (themeId != null) {
8222 _json["themeId"] = themeId; 8419 _json["themeId"] = themeId;
8223 } 8420 }
8224 return _json; 8421 return _json;
8225 } 8422 }
8226 } 8423 }
8227 8424
8228 /** A list of Team Drives. */ 8425 /// A list of Team Drives.
8229 class TeamDriveList { 8426 class TeamDriveList {
8230 /** The list of Team Drives. */ 8427 /// The list of Team Drives.
8231 core.List<TeamDrive> items; 8428 core.List<TeamDrive> items;
8232 /** This is always drive#teamDriveList */ 8429
8430 /// This is always drive#teamDriveList
8233 core.String kind; 8431 core.String kind;
8234 /** The page token for the next page of Team Drives. */ 8432
8433 /// The page token for the next page of Team Drives.
8235 core.String nextPageToken; 8434 core.String nextPageToken;
8236 8435
8237 TeamDriveList(); 8436 TeamDriveList();
8238 8437
8239 TeamDriveList.fromJson(core.Map _json) { 8438 TeamDriveList.fromJson(core.Map _json) {
8240 if (_json.containsKey("items")) { 8439 if (_json.containsKey("items")) {
8241 items = _json["items"].map((value) => new TeamDrive.fromJson(value)).toLis t(); 8440 items =
8441 _json["items"].map((value) => new TeamDrive.fromJson(value)).toList();
8242 } 8442 }
8243 if (_json.containsKey("kind")) { 8443 if (_json.containsKey("kind")) {
8244 kind = _json["kind"]; 8444 kind = _json["kind"];
8245 } 8445 }
8246 if (_json.containsKey("nextPageToken")) { 8446 if (_json.containsKey("nextPageToken")) {
8247 nextPageToken = _json["nextPageToken"]; 8447 nextPageToken = _json["nextPageToken"];
8248 } 8448 }
8249 } 8449 }
8250 8450
8251 core.Map<core.String, core.Object> toJson() { 8451 core.Map<core.String, core.Object> toJson() {
8252 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8452 final core.Map<core.String, core.Object> _json =
8453 new core.Map<core.String, core.Object>();
8253 if (items != null) { 8454 if (items != null) {
8254 _json["items"] = items.map((value) => (value).toJson()).toList(); 8455 _json["items"] = items.map((value) => (value).toJson()).toList();
8255 } 8456 }
8256 if (kind != null) { 8457 if (kind != null) {
8257 _json["kind"] = kind; 8458 _json["kind"] = kind;
8258 } 8459 }
8259 if (nextPageToken != null) { 8460 if (nextPageToken != null) {
8260 _json["nextPageToken"] = nextPageToken; 8461 _json["nextPageToken"] = nextPageToken;
8261 } 8462 }
8262 return _json; 8463 return _json;
8263 } 8464 }
8264 } 8465 }
8265 8466
8266 /** The user's profile picture. */ 8467 /// The user's profile picture.
8267 class UserPicture { 8468 class UserPicture {
8268 /** A URL that points to a profile picture of this user. */ 8469 /// A URL that points to a profile picture of this user.
8269 core.String url; 8470 core.String url;
8270 8471
8271 UserPicture(); 8472 UserPicture();
8272 8473
8273 UserPicture.fromJson(core.Map _json) { 8474 UserPicture.fromJson(core.Map _json) {
8274 if (_json.containsKey("url")) { 8475 if (_json.containsKey("url")) {
8275 url = _json["url"]; 8476 url = _json["url"];
8276 } 8477 }
8277 } 8478 }
8278 8479
8279 core.Map<core.String, core.Object> toJson() { 8480 core.Map<core.String, core.Object> toJson() {
8280 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8481 final core.Map<core.String, core.Object> _json =
8482 new core.Map<core.String, core.Object>();
8281 if (url != null) { 8483 if (url != null) {
8282 _json["url"] = url; 8484 _json["url"] = url;
8283 } 8485 }
8284 return _json; 8486 return _json;
8285 } 8487 }
8286 } 8488 }
8287 8489
8288 /** Information about a Drive user. */ 8490 /// Information about a Drive user.
8289 class User { 8491 class User {
8290 /** A plain text displayable name for this user. */ 8492 /// A plain text displayable name for this user.
8291 core.String displayName; 8493 core.String displayName;
8292 /** The email address of the user. */ 8494
8495 /// The email address of the user.
8293 core.String emailAddress; 8496 core.String emailAddress;
8294 /** 8497
8295 * Whether this user is the same as the authenticated user for whom the 8498 /// Whether this user is the same as the authenticated user for whom the
8296 * request was made. 8499 /// request was made.
8297 */
8298 core.bool isAuthenticatedUser; 8500 core.bool isAuthenticatedUser;
8299 /** This is always drive#user. */ 8501
8502 /// This is always drive#user.
8300 core.String kind; 8503 core.String kind;
8301 /** The user's ID as visible in the permissions collection. */ 8504
8505 /// The user's ID as visible in the permissions collection.
8302 core.String permissionId; 8506 core.String permissionId;
8303 /** The user's profile picture. */ 8507
8508 /// The user's profile picture.
8304 UserPicture picture; 8509 UserPicture picture;
8305 8510
8306 User(); 8511 User();
8307 8512
8308 User.fromJson(core.Map _json) { 8513 User.fromJson(core.Map _json) {
8309 if (_json.containsKey("displayName")) { 8514 if (_json.containsKey("displayName")) {
8310 displayName = _json["displayName"]; 8515 displayName = _json["displayName"];
8311 } 8516 }
8312 if (_json.containsKey("emailAddress")) { 8517 if (_json.containsKey("emailAddress")) {
8313 emailAddress = _json["emailAddress"]; 8518 emailAddress = _json["emailAddress"];
8314 } 8519 }
8315 if (_json.containsKey("isAuthenticatedUser")) { 8520 if (_json.containsKey("isAuthenticatedUser")) {
8316 isAuthenticatedUser = _json["isAuthenticatedUser"]; 8521 isAuthenticatedUser = _json["isAuthenticatedUser"];
8317 } 8522 }
8318 if (_json.containsKey("kind")) { 8523 if (_json.containsKey("kind")) {
8319 kind = _json["kind"]; 8524 kind = _json["kind"];
8320 } 8525 }
8321 if (_json.containsKey("permissionId")) { 8526 if (_json.containsKey("permissionId")) {
8322 permissionId = _json["permissionId"]; 8527 permissionId = _json["permissionId"];
8323 } 8528 }
8324 if (_json.containsKey("picture")) { 8529 if (_json.containsKey("picture")) {
8325 picture = new UserPicture.fromJson(_json["picture"]); 8530 picture = new UserPicture.fromJson(_json["picture"]);
8326 } 8531 }
8327 } 8532 }
8328 8533
8329 core.Map<core.String, core.Object> toJson() { 8534 core.Map<core.String, core.Object> toJson() {
8330 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 8535 final core.Map<core.String, core.Object> _json =
8536 new core.Map<core.String, core.Object>();
8331 if (displayName != null) { 8537 if (displayName != null) {
8332 _json["displayName"] = displayName; 8538 _json["displayName"] = displayName;
8333 } 8539 }
8334 if (emailAddress != null) { 8540 if (emailAddress != null) {
8335 _json["emailAddress"] = emailAddress; 8541 _json["emailAddress"] = emailAddress;
8336 } 8542 }
8337 if (isAuthenticatedUser != null) { 8543 if (isAuthenticatedUser != null) {
8338 _json["isAuthenticatedUser"] = isAuthenticatedUser; 8544 _json["isAuthenticatedUser"] = isAuthenticatedUser;
8339 } 8545 }
8340 if (kind != null) { 8546 if (kind != null) {
8341 _json["kind"] = kind; 8547 _json["kind"] = kind;
8342 } 8548 }
8343 if (permissionId != null) { 8549 if (permissionId != null) {
8344 _json["permissionId"] = permissionId; 8550 _json["permissionId"] = permissionId;
8345 } 8551 }
8346 if (picture != null) { 8552 if (picture != null) {
8347 _json["picture"] = (picture).toJson(); 8553 _json["picture"] = (picture).toJson();
8348 } 8554 }
8349 return _json; 8555 return _json;
8350 } 8556 }
8351 } 8557 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/doubleclicksearch/v2.dart ('k') | generated/googleapis/lib/drive/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698