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

Side by Side Diff: generated/googleapis/lib/storage/v1.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.storage.v1; 3 library googleapis.storage.v1;
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; 7 import 'dart:convert' as convert;
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 storage/v1'; 23 const core.String USER_AGENT = 'dart-api-client storage/v1';
18 24
19 /** Stores and retrieves potentially large, immutable data objects. */ 25 /// Stores and retrieves potentially large, immutable data objects.
20 class StorageApi { 26 class StorageApi {
21 /** View and manage your data across Google Cloud Platform services */ 27 /// View and manage your data across Google Cloud Platform services
22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 28 static const CloudPlatformScope =
29 "https://www.googleapis.com/auth/cloud-platform";
23 30
24 /** View your data across Google Cloud Platform services */ 31 /// View your data across Google Cloud Platform services
25 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo ud-platform.read-only"; 32 static const CloudPlatformReadOnlyScope =
33 "https://www.googleapis.com/auth/cloud-platform.read-only";
26 34
27 /** Manage your data and permissions in Google Cloud Storage */ 35 /// Manage your data and permissions in Google Cloud Storage
28 static const DevstorageFullControlScope = "https://www.googleapis.com/auth/dev storage.full_control"; 36 static const DevstorageFullControlScope =
37 "https://www.googleapis.com/auth/devstorage.full_control";
29 38
30 /** View your data in Google Cloud Storage */ 39 /// View your data in Google Cloud Storage
31 static const DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devsto rage.read_only"; 40 static const DevstorageReadOnlyScope =
41 "https://www.googleapis.com/auth/devstorage.read_only";
32 42
33 /** Manage your data in Google Cloud Storage */ 43 /// Manage your data in Google Cloud Storage
34 static const DevstorageReadWriteScope = "https://www.googleapis.com/auth/devst orage.read_write"; 44 static const DevstorageReadWriteScope =
35 45 "https://www.googleapis.com/auth/devstorage.read_write";
36 46
37 final commons.ApiRequester _requester; 47 final commons.ApiRequester _requester;
38 48
39 BucketAccessControlsResourceApi get bucketAccessControls => new BucketAccessCo ntrolsResourceApi(_requester); 49 BucketAccessControlsResourceApi get bucketAccessControls =>
50 new BucketAccessControlsResourceApi(_requester);
40 BucketsResourceApi get buckets => new BucketsResourceApi(_requester); 51 BucketsResourceApi get buckets => new BucketsResourceApi(_requester);
41 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); 52 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester);
42 DefaultObjectAccessControlsResourceApi get defaultObjectAccessControls => new DefaultObjectAccessControlsResourceApi(_requester); 53 DefaultObjectAccessControlsResourceApi get defaultObjectAccessControls =>
43 NotificationsResourceApi get notifications => new NotificationsResourceApi(_re quester); 54 new DefaultObjectAccessControlsResourceApi(_requester);
44 ObjectAccessControlsResourceApi get objectAccessControls => new ObjectAccessCo ntrolsResourceApi(_requester); 55 NotificationsResourceApi get notifications =>
56 new NotificationsResourceApi(_requester);
57 ObjectAccessControlsResourceApi get objectAccessControls =>
58 new ObjectAccessControlsResourceApi(_requester);
45 ObjectsResourceApi get objects => new ObjectsResourceApi(_requester); 59 ObjectsResourceApi get objects => new ObjectsResourceApi(_requester);
46 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 60 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
47 61
48 StorageApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c om/", core.String servicePath: "storage/v1/"}) : 62 StorageApi(http.Client client,
49 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 63 {core.String rootUrl: "https://www.googleapis.com/",
64 core.String servicePath: "storage/v1/"})
65 : _requester =
66 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
50 } 67 }
51 68
52
53 class BucketAccessControlsResourceApi { 69 class BucketAccessControlsResourceApi {
54 final commons.ApiRequester _requester; 70 final commons.ApiRequester _requester;
55 71
56 BucketAccessControlsResourceApi(commons.ApiRequester client) : 72 BucketAccessControlsResourceApi(commons.ApiRequester client)
57 _requester = client; 73 : _requester = client;
58 74
59 /** 75 /// Permanently deletes the ACL entry for the specified entity on the
60 * Permanently deletes the ACL entry for the specified entity on the specified 76 /// specified bucket.
61 * bucket. 77 ///
62 * 78 /// Request parameters:
63 * Request parameters: 79 ///
64 * 80 /// [bucket] - Name of a bucket.
65 * [bucket] - Name of a bucket. 81 ///
66 * 82 /// [entity] - The entity holding the permission. Can be user-userId,
67 * [entity] - The entity holding the permission. Can be user-userId, 83 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
68 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 84 /// allAuthenticatedUsers.
69 * allAuthenticatedUsers. 85 ///
70 * 86 /// [userProject] - The project to be billed for this request, for Requester
71 * [userProject] - The project to be billed for this request, for Requester 87 /// Pays buckets.
72 * Pays buckets. 88 ///
73 * 89 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
74 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 90 /// an error.
75 * error. 91 ///
76 * 92 /// If the used [http.Client] completes with an error when making a REST
77 * If the used [http.Client] completes with an error when making a REST call, 93 /// call, this method will complete with the same error.
78 * this method will complete with the same error. 94 async.Future delete(core.String bucket, core.String entity,
79 */ 95 {core.String userProject}) {
80 async.Future delete(core.String bucket, core.String entity, {core.String userP roject}) {
81 var _url = null; 96 var _url = null;
82 var _queryParams = new core.Map(); 97 var _queryParams = new core.Map();
83 var _uploadMedia = null; 98 var _uploadMedia = null;
84 var _uploadOptions = null; 99 var _uploadOptions = null;
85 var _downloadOptions = commons.DownloadOptions.Metadata; 100 var _downloadOptions = commons.DownloadOptions.Metadata;
86 var _body = null; 101 var _body = null;
87 102
88 if (bucket == null) { 103 if (bucket == null) {
89 throw new core.ArgumentError("Parameter bucket is required."); 104 throw new core.ArgumentError("Parameter bucket is required.");
90 } 105 }
91 if (entity == null) { 106 if (entity == null) {
92 throw new core.ArgumentError("Parameter entity is required."); 107 throw new core.ArgumentError("Parameter entity is required.");
93 } 108 }
94 if (userProject != null) { 109 if (userProject != null) {
95 _queryParams["userProject"] = [userProject]; 110 _queryParams["userProject"] = [userProject];
96 } 111 }
97 112
98 _downloadOptions = null; 113 _downloadOptions = null;
99 114
100 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E scaper.ecapeVariable('$entity'); 115 _url = 'b/' +
116 commons.Escaper.ecapeVariable('$bucket') +
117 '/acl/' +
118 commons.Escaper.ecapeVariable('$entity');
101 119
102 var _response = _requester.request(_url, 120 var _response = _requester.request(_url, "DELETE",
103 "DELETE", 121 body: _body,
104 body: _body, 122 queryParams: _queryParams,
105 queryParams: _queryParams, 123 uploadOptions: _uploadOptions,
106 uploadOptions: _uploadOptions, 124 uploadMedia: _uploadMedia,
107 uploadMedia: _uploadMedia, 125 downloadOptions: _downloadOptions);
108 downloadOptions: _downloadOptions);
109 return _response.then((data) => null); 126 return _response.then((data) => null);
110 } 127 }
111 128
112 /** 129 /// Returns the ACL entry for the specified entity on the specified bucket.
113 * Returns the ACL entry for the specified entity on the specified bucket. 130 ///
114 * 131 /// Request parameters:
115 * Request parameters: 132 ///
116 * 133 /// [bucket] - Name of a bucket.
117 * [bucket] - Name of a bucket. 134 ///
118 * 135 /// [entity] - The entity holding the permission. Can be user-userId,
119 * [entity] - The entity holding the permission. Can be user-userId, 136 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
120 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 137 /// allAuthenticatedUsers.
121 * allAuthenticatedUsers. 138 ///
122 * 139 /// [userProject] - The project to be billed for this request, for Requester
123 * [userProject] - The project to be billed for this request, for Requester 140 /// Pays buckets.
124 * Pays buckets. 141 ///
125 * 142 /// Completes with a [BucketAccessControl].
126 * Completes with a [BucketAccessControl]. 143 ///
127 * 144 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 145 /// an error.
129 * error. 146 ///
130 * 147 /// If the used [http.Client] completes with an error when making a REST
131 * If the used [http.Client] completes with an error when making a REST call, 148 /// call, this method will complete with the same error.
132 * this method will complete with the same error. 149 async.Future<BucketAccessControl> get(core.String bucket, core.String entity,
133 */ 150 {core.String userProject}) {
134 async.Future<BucketAccessControl> get(core.String bucket, core.String entity, {core.String userProject}) {
135 var _url = null; 151 var _url = null;
136 var _queryParams = new core.Map(); 152 var _queryParams = new core.Map();
137 var _uploadMedia = null; 153 var _uploadMedia = null;
138 var _uploadOptions = null; 154 var _uploadOptions = null;
139 var _downloadOptions = commons.DownloadOptions.Metadata; 155 var _downloadOptions = commons.DownloadOptions.Metadata;
140 var _body = null; 156 var _body = null;
141 157
142 if (bucket == null) { 158 if (bucket == null) {
143 throw new core.ArgumentError("Parameter bucket is required."); 159 throw new core.ArgumentError("Parameter bucket is required.");
144 } 160 }
145 if (entity == null) { 161 if (entity == null) {
146 throw new core.ArgumentError("Parameter entity is required."); 162 throw new core.ArgumentError("Parameter entity is required.");
147 } 163 }
148 if (userProject != null) { 164 if (userProject != null) {
149 _queryParams["userProject"] = [userProject]; 165 _queryParams["userProject"] = [userProject];
150 } 166 }
151 167
152 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E scaper.ecapeVariable('$entity'); 168 _url = 'b/' +
169 commons.Escaper.ecapeVariable('$bucket') +
170 '/acl/' +
171 commons.Escaper.ecapeVariable('$entity');
153 172
154 var _response = _requester.request(_url, 173 var _response = _requester.request(_url, "GET",
155 "GET", 174 body: _body,
156 body: _body, 175 queryParams: _queryParams,
157 queryParams: _queryParams, 176 uploadOptions: _uploadOptions,
158 uploadOptions: _uploadOptions, 177 uploadMedia: _uploadMedia,
159 uploadMedia: _uploadMedia, 178 downloadOptions: _downloadOptions);
160 downloadOptions: _downloadOptions);
161 return _response.then((data) => new BucketAccessControl.fromJson(data)); 179 return _response.then((data) => new BucketAccessControl.fromJson(data));
162 } 180 }
163 181
164 /** 182 /// Creates a new ACL entry on the specified bucket.
165 * Creates a new ACL entry on the specified bucket. 183 ///
166 * 184 /// [request] - The metadata request object.
167 * [request] - The metadata request object. 185 ///
168 * 186 /// Request parameters:
169 * Request parameters: 187 ///
170 * 188 /// [bucket] - Name of a bucket.
171 * [bucket] - Name of a bucket. 189 ///
172 * 190 /// [userProject] - The project to be billed for this request, for Requester
173 * [userProject] - The project to be billed for this request, for Requester 191 /// Pays buckets.
174 * Pays buckets. 192 ///
175 * 193 /// Completes with a [BucketAccessControl].
176 * Completes with a [BucketAccessControl]. 194 ///
177 * 195 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
178 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 196 /// an error.
179 * error. 197 ///
180 * 198 /// If the used [http.Client] completes with an error when making a REST
181 * If the used [http.Client] completes with an error when making a REST call, 199 /// call, this method will complete with the same error.
182 * this method will complete with the same error. 200 async.Future<BucketAccessControl> insert(
183 */ 201 BucketAccessControl request, core.String bucket,
184 async.Future<BucketAccessControl> insert(BucketAccessControl request, core.Str ing bucket, {core.String userProject}) { 202 {core.String userProject}) {
185 var _url = null; 203 var _url = null;
186 var _queryParams = new core.Map(); 204 var _queryParams = new core.Map();
187 var _uploadMedia = null; 205 var _uploadMedia = null;
188 var _uploadOptions = null; 206 var _uploadOptions = null;
189 var _downloadOptions = commons.DownloadOptions.Metadata; 207 var _downloadOptions = commons.DownloadOptions.Metadata;
190 var _body = null; 208 var _body = null;
191 209
192 if (request != null) { 210 if (request != null) {
193 _body = convert.JSON.encode((request).toJson()); 211 _body = convert.JSON.encode((request).toJson());
194 } 212 }
195 if (bucket == null) { 213 if (bucket == null) {
196 throw new core.ArgumentError("Parameter bucket is required."); 214 throw new core.ArgumentError("Parameter bucket is required.");
197 } 215 }
198 if (userProject != null) { 216 if (userProject != null) {
199 _queryParams["userProject"] = [userProject]; 217 _queryParams["userProject"] = [userProject];
200 } 218 }
201 219
202 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl'; 220 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl';
203 221
204 var _response = _requester.request(_url, 222 var _response = _requester.request(_url, "POST",
205 "POST", 223 body: _body,
206 body: _body, 224 queryParams: _queryParams,
207 queryParams: _queryParams, 225 uploadOptions: _uploadOptions,
208 uploadOptions: _uploadOptions, 226 uploadMedia: _uploadMedia,
209 uploadMedia: _uploadMedia, 227 downloadOptions: _downloadOptions);
210 downloadOptions: _downloadOptions);
211 return _response.then((data) => new BucketAccessControl.fromJson(data)); 228 return _response.then((data) => new BucketAccessControl.fromJson(data));
212 } 229 }
213 230
214 /** 231 /// Retrieves ACL entries on the specified bucket.
215 * Retrieves ACL entries on the specified bucket. 232 ///
216 * 233 /// Request parameters:
217 * Request parameters: 234 ///
218 * 235 /// [bucket] - Name of a bucket.
219 * [bucket] - Name of a bucket. 236 ///
220 * 237 /// [userProject] - The project to be billed for this request, for Requester
221 * [userProject] - The project to be billed for this request, for Requester 238 /// Pays buckets.
222 * Pays buckets. 239 ///
223 * 240 /// Completes with a [BucketAccessControls].
224 * Completes with a [BucketAccessControls]. 241 ///
225 * 242 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 243 /// an error.
227 * error. 244 ///
228 * 245 /// If the used [http.Client] completes with an error when making a REST
229 * If the used [http.Client] completes with an error when making a REST call, 246 /// call, this method will complete with the same error.
230 * this method will complete with the same error. 247 async.Future<BucketAccessControls> list(core.String bucket,
231 */ 248 {core.String userProject}) {
232 async.Future<BucketAccessControls> list(core.String bucket, {core.String userP roject}) {
233 var _url = null; 249 var _url = null;
234 var _queryParams = new core.Map(); 250 var _queryParams = new core.Map();
235 var _uploadMedia = null; 251 var _uploadMedia = null;
236 var _uploadOptions = null; 252 var _uploadOptions = null;
237 var _downloadOptions = commons.DownloadOptions.Metadata; 253 var _downloadOptions = commons.DownloadOptions.Metadata;
238 var _body = null; 254 var _body = null;
239 255
240 if (bucket == null) { 256 if (bucket == null) {
241 throw new core.ArgumentError("Parameter bucket is required."); 257 throw new core.ArgumentError("Parameter bucket is required.");
242 } 258 }
243 if (userProject != null) { 259 if (userProject != null) {
244 _queryParams["userProject"] = [userProject]; 260 _queryParams["userProject"] = [userProject];
245 } 261 }
246 262
247 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl'; 263 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl';
248 264
249 var _response = _requester.request(_url, 265 var _response = _requester.request(_url, "GET",
250 "GET", 266 body: _body,
251 body: _body, 267 queryParams: _queryParams,
252 queryParams: _queryParams, 268 uploadOptions: _uploadOptions,
253 uploadOptions: _uploadOptions, 269 uploadMedia: _uploadMedia,
254 uploadMedia: _uploadMedia, 270 downloadOptions: _downloadOptions);
255 downloadOptions: _downloadOptions);
256 return _response.then((data) => new BucketAccessControls.fromJson(data)); 271 return _response.then((data) => new BucketAccessControls.fromJson(data));
257 } 272 }
258 273
259 /** 274 /// Updates an ACL entry on the specified bucket. This method supports patch
260 * Updates an ACL entry on the specified bucket. This method supports patch 275 /// semantics.
261 * semantics. 276 ///
262 * 277 /// [request] - The metadata request object.
263 * [request] - The metadata request object. 278 ///
264 * 279 /// Request parameters:
265 * Request parameters: 280 ///
266 * 281 /// [bucket] - Name of a bucket.
267 * [bucket] - Name of a bucket. 282 ///
268 * 283 /// [entity] - The entity holding the permission. Can be user-userId,
269 * [entity] - The entity holding the permission. Can be user-userId, 284 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
270 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 285 /// allAuthenticatedUsers.
271 * allAuthenticatedUsers. 286 ///
272 * 287 /// [userProject] - The project to be billed for this request, for Requester
273 * [userProject] - The project to be billed for this request, for Requester 288 /// Pays buckets.
274 * Pays buckets. 289 ///
275 * 290 /// Completes with a [BucketAccessControl].
276 * Completes with a [BucketAccessControl]. 291 ///
277 * 292 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
278 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 293 /// an error.
279 * error. 294 ///
280 * 295 /// If the used [http.Client] completes with an error when making a REST
281 * If the used [http.Client] completes with an error when making a REST call, 296 /// call, this method will complete with the same error.
282 * this method will complete with the same error. 297 async.Future<BucketAccessControl> patch(
283 */ 298 BucketAccessControl request, core.String bucket, core.String entity,
284 async.Future<BucketAccessControl> patch(BucketAccessControl request, core.Stri ng bucket, core.String entity, {core.String userProject}) { 299 {core.String userProject}) {
285 var _url = null; 300 var _url = null;
286 var _queryParams = new core.Map(); 301 var _queryParams = new core.Map();
287 var _uploadMedia = null; 302 var _uploadMedia = null;
288 var _uploadOptions = null; 303 var _uploadOptions = null;
289 var _downloadOptions = commons.DownloadOptions.Metadata; 304 var _downloadOptions = commons.DownloadOptions.Metadata;
290 var _body = null; 305 var _body = null;
291 306
292 if (request != null) { 307 if (request != null) {
293 _body = convert.JSON.encode((request).toJson()); 308 _body = convert.JSON.encode((request).toJson());
294 } 309 }
295 if (bucket == null) { 310 if (bucket == null) {
296 throw new core.ArgumentError("Parameter bucket is required."); 311 throw new core.ArgumentError("Parameter bucket is required.");
297 } 312 }
298 if (entity == null) { 313 if (entity == null) {
299 throw new core.ArgumentError("Parameter entity is required."); 314 throw new core.ArgumentError("Parameter entity is required.");
300 } 315 }
301 if (userProject != null) { 316 if (userProject != null) {
302 _queryParams["userProject"] = [userProject]; 317 _queryParams["userProject"] = [userProject];
303 } 318 }
304 319
305 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E scaper.ecapeVariable('$entity'); 320 _url = 'b/' +
321 commons.Escaper.ecapeVariable('$bucket') +
322 '/acl/' +
323 commons.Escaper.ecapeVariable('$entity');
306 324
307 var _response = _requester.request(_url, 325 var _response = _requester.request(_url, "PATCH",
308 "PATCH", 326 body: _body,
309 body: _body, 327 queryParams: _queryParams,
310 queryParams: _queryParams, 328 uploadOptions: _uploadOptions,
311 uploadOptions: _uploadOptions, 329 uploadMedia: _uploadMedia,
312 uploadMedia: _uploadMedia, 330 downloadOptions: _downloadOptions);
313 downloadOptions: _downloadOptions);
314 return _response.then((data) => new BucketAccessControl.fromJson(data)); 331 return _response.then((data) => new BucketAccessControl.fromJson(data));
315 } 332 }
316 333
317 /** 334 /// Updates an ACL entry on the specified bucket.
318 * Updates an ACL entry on the specified bucket. 335 ///
319 * 336 /// [request] - The metadata request object.
320 * [request] - The metadata request object. 337 ///
321 * 338 /// Request parameters:
322 * Request parameters: 339 ///
323 * 340 /// [bucket] - Name of a bucket.
324 * [bucket] - Name of a bucket. 341 ///
325 * 342 /// [entity] - The entity holding the permission. Can be user-userId,
326 * [entity] - The entity holding the permission. Can be user-userId, 343 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
327 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 344 /// allAuthenticatedUsers.
328 * allAuthenticatedUsers. 345 ///
329 * 346 /// [userProject] - The project to be billed for this request, for Requester
330 * [userProject] - The project to be billed for this request, for Requester 347 /// Pays buckets.
331 * Pays buckets. 348 ///
332 * 349 /// Completes with a [BucketAccessControl].
333 * Completes with a [BucketAccessControl]. 350 ///
334 * 351 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
335 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 352 /// an error.
336 * error. 353 ///
337 * 354 /// If the used [http.Client] completes with an error when making a REST
338 * If the used [http.Client] completes with an error when making a REST call, 355 /// call, this method will complete with the same error.
339 * this method will complete with the same error. 356 async.Future<BucketAccessControl> update(
340 */ 357 BucketAccessControl request, core.String bucket, core.String entity,
341 async.Future<BucketAccessControl> update(BucketAccessControl request, core.Str ing bucket, core.String entity, {core.String userProject}) { 358 {core.String userProject}) {
342 var _url = null; 359 var _url = null;
343 var _queryParams = new core.Map(); 360 var _queryParams = new core.Map();
344 var _uploadMedia = null; 361 var _uploadMedia = null;
345 var _uploadOptions = null; 362 var _uploadOptions = null;
346 var _downloadOptions = commons.DownloadOptions.Metadata; 363 var _downloadOptions = commons.DownloadOptions.Metadata;
347 var _body = null; 364 var _body = null;
348 365
349 if (request != null) { 366 if (request != null) {
350 _body = convert.JSON.encode((request).toJson()); 367 _body = convert.JSON.encode((request).toJson());
351 } 368 }
352 if (bucket == null) { 369 if (bucket == null) {
353 throw new core.ArgumentError("Parameter bucket is required."); 370 throw new core.ArgumentError("Parameter bucket is required.");
354 } 371 }
355 if (entity == null) { 372 if (entity == null) {
356 throw new core.ArgumentError("Parameter entity is required."); 373 throw new core.ArgumentError("Parameter entity is required.");
357 } 374 }
358 if (userProject != null) { 375 if (userProject != null) {
359 _queryParams["userProject"] = [userProject]; 376 _queryParams["userProject"] = [userProject];
360 } 377 }
361 378
362 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E scaper.ecapeVariable('$entity'); 379 _url = 'b/' +
380 commons.Escaper.ecapeVariable('$bucket') +
381 '/acl/' +
382 commons.Escaper.ecapeVariable('$entity');
363 383
364 var _response = _requester.request(_url, 384 var _response = _requester.request(_url, "PUT",
365 "PUT", 385 body: _body,
366 body: _body, 386 queryParams: _queryParams,
367 queryParams: _queryParams, 387 uploadOptions: _uploadOptions,
368 uploadOptions: _uploadOptions, 388 uploadMedia: _uploadMedia,
369 uploadMedia: _uploadMedia, 389 downloadOptions: _downloadOptions);
370 downloadOptions: _downloadOptions);
371 return _response.then((data) => new BucketAccessControl.fromJson(data)); 390 return _response.then((data) => new BucketAccessControl.fromJson(data));
372 } 391 }
373
374 } 392 }
375 393
376
377 class BucketsResourceApi { 394 class BucketsResourceApi {
378 final commons.ApiRequester _requester; 395 final commons.ApiRequester _requester;
379 396
380 BucketsResourceApi(commons.ApiRequester client) : 397 BucketsResourceApi(commons.ApiRequester client) : _requester = client;
381 _requester = client;
382 398
383 /** 399 /// Permanently deletes an empty bucket.
384 * Permanently deletes an empty bucket. 400 ///
385 * 401 /// Request parameters:
386 * Request parameters: 402 ///
387 * 403 /// [bucket] - Name of a bucket.
388 * [bucket] - Name of a bucket. 404 ///
389 * 405 /// [ifMetagenerationMatch] - If set, only deletes the bucket if its
390 * [ifMetagenerationMatch] - If set, only deletes the bucket if its 406 /// metageneration matches this value.
391 * metageneration matches this value. 407 ///
392 * 408 /// [ifMetagenerationNotMatch] - If set, only deletes the bucket if its
393 * [ifMetagenerationNotMatch] - If set, only deletes the bucket if its 409 /// metageneration does not match this value.
394 * metageneration does not match this value. 410 ///
395 * 411 /// [userProject] - The project to be billed for this request, for Requester
396 * [userProject] - The project to be billed for this request, for Requester 412 /// Pays buckets.
397 * Pays buckets. 413 ///
398 * 414 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 415 /// an error.
400 * error. 416 ///
401 * 417 /// If the used [http.Client] completes with an error when making a REST
402 * If the used [http.Client] completes with an error when making a REST call, 418 /// call, this method will complete with the same error.
403 * this method will complete with the same error. 419 async.Future delete(core.String bucket,
404 */ 420 {core.String ifMetagenerationMatch,
405 async.Future delete(core.String bucket, {core.String ifMetagenerationMatch, co re.String ifMetagenerationNotMatch, core.String userProject}) { 421 core.String ifMetagenerationNotMatch,
422 core.String userProject}) {
406 var _url = null; 423 var _url = null;
407 var _queryParams = new core.Map(); 424 var _queryParams = new core.Map();
408 var _uploadMedia = null; 425 var _uploadMedia = null;
409 var _uploadOptions = null; 426 var _uploadOptions = null;
410 var _downloadOptions = commons.DownloadOptions.Metadata; 427 var _downloadOptions = commons.DownloadOptions.Metadata;
411 var _body = null; 428 var _body = null;
412 429
413 if (bucket == null) { 430 if (bucket == null) {
414 throw new core.ArgumentError("Parameter bucket is required."); 431 throw new core.ArgumentError("Parameter bucket is required.");
415 } 432 }
416 if (ifMetagenerationMatch != null) { 433 if (ifMetagenerationMatch != null) {
417 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; 434 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch];
418 } 435 }
419 if (ifMetagenerationNotMatch != null) { 436 if (ifMetagenerationNotMatch != null) {
420 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; 437 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch];
421 } 438 }
422 if (userProject != null) { 439 if (userProject != null) {
423 _queryParams["userProject"] = [userProject]; 440 _queryParams["userProject"] = [userProject];
424 } 441 }
425 442
426 _downloadOptions = null; 443 _downloadOptions = null;
427 444
428 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); 445 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket');
429 446
430 var _response = _requester.request(_url, 447 var _response = _requester.request(_url, "DELETE",
431 "DELETE", 448 body: _body,
432 body: _body, 449 queryParams: _queryParams,
433 queryParams: _queryParams, 450 uploadOptions: _uploadOptions,
434 uploadOptions: _uploadOptions, 451 uploadMedia: _uploadMedia,
435 uploadMedia: _uploadMedia, 452 downloadOptions: _downloadOptions);
436 downloadOptions: _downloadOptions);
437 return _response.then((data) => null); 453 return _response.then((data) => null);
438 } 454 }
439 455
440 /** 456 /// Returns metadata for the specified bucket.
441 * Returns metadata for the specified bucket. 457 ///
442 * 458 /// Request parameters:
443 * Request parameters: 459 ///
444 * 460 /// [bucket] - Name of a bucket.
445 * [bucket] - Name of a bucket. 461 ///
446 * 462 /// [ifMetagenerationMatch] - Makes the return of the bucket metadata
447 * [ifMetagenerationMatch] - Makes the return of the bucket metadata 463 /// conditional on whether the bucket's current metageneration matches the
448 * conditional on whether the bucket's current metageneration matches the 464 /// given value.
449 * given value. 465 ///
450 * 466 /// [ifMetagenerationNotMatch] - Makes the return of the bucket metadata
451 * [ifMetagenerationNotMatch] - Makes the return of the bucket metadata 467 /// conditional on whether the bucket's current metageneration does not match
452 * conditional on whether the bucket's current metageneration does not match 468 /// the given value.
453 * the given value. 469 ///
454 * 470 /// [projection] - Set of properties to return. Defaults to noAcl.
455 * [projection] - Set of properties to return. Defaults to noAcl. 471 /// Possible string values are:
456 * Possible string values are: 472 /// - "full" : Include all properties.
457 * - "full" : Include all properties. 473 /// - "noAcl" : Omit owner, acl and defaultObjectAcl properties.
458 * - "noAcl" : Omit owner, acl and defaultObjectAcl properties. 474 ///
459 * 475 /// [userProject] - The project to be billed for this request, for Requester
460 * [userProject] - The project to be billed for this request, for Requester 476 /// Pays buckets.
461 * Pays buckets. 477 ///
462 * 478 /// Completes with a [Bucket].
463 * Completes with a [Bucket]. 479 ///
464 * 480 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
465 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 481 /// an error.
466 * error. 482 ///
467 * 483 /// If the used [http.Client] completes with an error when making a REST
468 * If the used [http.Client] completes with an error when making a REST call, 484 /// call, this method will complete with the same error.
469 * this method will complete with the same error. 485 async.Future<Bucket> get(core.String bucket,
470 */ 486 {core.String ifMetagenerationMatch,
471 async.Future<Bucket> get(core.String bucket, {core.String ifMetagenerationMatc h, core.String ifMetagenerationNotMatch, core.String projection, core.String use rProject}) { 487 core.String ifMetagenerationNotMatch,
488 core.String projection,
489 core.String userProject}) {
472 var _url = null; 490 var _url = null;
473 var _queryParams = new core.Map(); 491 var _queryParams = new core.Map();
474 var _uploadMedia = null; 492 var _uploadMedia = null;
475 var _uploadOptions = null; 493 var _uploadOptions = null;
476 var _downloadOptions = commons.DownloadOptions.Metadata; 494 var _downloadOptions = commons.DownloadOptions.Metadata;
477 var _body = null; 495 var _body = null;
478 496
479 if (bucket == null) { 497 if (bucket == null) {
480 throw new core.ArgumentError("Parameter bucket is required."); 498 throw new core.ArgumentError("Parameter bucket is required.");
481 } 499 }
482 if (ifMetagenerationMatch != null) { 500 if (ifMetagenerationMatch != null) {
483 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; 501 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch];
484 } 502 }
485 if (ifMetagenerationNotMatch != null) { 503 if (ifMetagenerationNotMatch != null) {
486 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; 504 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch];
487 } 505 }
488 if (projection != null) { 506 if (projection != null) {
489 _queryParams["projection"] = [projection]; 507 _queryParams["projection"] = [projection];
490 } 508 }
491 if (userProject != null) { 509 if (userProject != null) {
492 _queryParams["userProject"] = [userProject]; 510 _queryParams["userProject"] = [userProject];
493 } 511 }
494 512
495 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); 513 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket');
496 514
497 var _response = _requester.request(_url, 515 var _response = _requester.request(_url, "GET",
498 "GET", 516 body: _body,
499 body: _body, 517 queryParams: _queryParams,
500 queryParams: _queryParams, 518 uploadOptions: _uploadOptions,
501 uploadOptions: _uploadOptions, 519 uploadMedia: _uploadMedia,
502 uploadMedia: _uploadMedia, 520 downloadOptions: _downloadOptions);
503 downloadOptions: _downloadOptions);
504 return _response.then((data) => new Bucket.fromJson(data)); 521 return _response.then((data) => new Bucket.fromJson(data));
505 } 522 }
506 523
507 /** 524 /// Returns an IAM policy for the specified bucket.
508 * Returns an IAM policy for the specified bucket. 525 ///
509 * 526 /// Request parameters:
510 * Request parameters: 527 ///
511 * 528 /// [bucket] - Name of a bucket.
512 * [bucket] - Name of a bucket. 529 ///
513 * 530 /// [userProject] - The project to be billed for this request, for Requester
514 * [userProject] - The project to be billed for this request, for Requester 531 /// Pays buckets.
515 * Pays buckets. 532 ///
516 * 533 /// Completes with a [Policy].
517 * Completes with a [Policy]. 534 ///
518 * 535 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
519 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 536 /// an error.
520 * error. 537 ///
521 * 538 /// If the used [http.Client] completes with an error when making a REST
522 * If the used [http.Client] completes with an error when making a REST call, 539 /// call, this method will complete with the same error.
523 * this method will complete with the same error. 540 async.Future<Policy> getIamPolicy(core.String bucket,
524 */ 541 {core.String userProject}) {
525 async.Future<Policy> getIamPolicy(core.String bucket, {core.String userProject }) {
526 var _url = null; 542 var _url = null;
527 var _queryParams = new core.Map(); 543 var _queryParams = new core.Map();
528 var _uploadMedia = null; 544 var _uploadMedia = null;
529 var _uploadOptions = null; 545 var _uploadOptions = null;
530 var _downloadOptions = commons.DownloadOptions.Metadata; 546 var _downloadOptions = commons.DownloadOptions.Metadata;
531 var _body = null; 547 var _body = null;
532 548
533 if (bucket == null) { 549 if (bucket == null) {
534 throw new core.ArgumentError("Parameter bucket is required."); 550 throw new core.ArgumentError("Parameter bucket is required.");
535 } 551 }
536 if (userProject != null) { 552 if (userProject != null) {
537 _queryParams["userProject"] = [userProject]; 553 _queryParams["userProject"] = [userProject];
538 } 554 }
539 555
540 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam'; 556 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam';
541 557
542 var _response = _requester.request(_url, 558 var _response = _requester.request(_url, "GET",
543 "GET", 559 body: _body,
544 body: _body, 560 queryParams: _queryParams,
545 queryParams: _queryParams, 561 uploadOptions: _uploadOptions,
546 uploadOptions: _uploadOptions, 562 uploadMedia: _uploadMedia,
547 uploadMedia: _uploadMedia, 563 downloadOptions: _downloadOptions);
548 downloadOptions: _downloadOptions);
549 return _response.then((data) => new Policy.fromJson(data)); 564 return _response.then((data) => new Policy.fromJson(data));
550 } 565 }
551 566
552 /** 567 /// Creates a new bucket.
553 * Creates a new bucket. 568 ///
554 * 569 /// [request] - The metadata request object.
555 * [request] - The metadata request object. 570 ///
556 * 571 /// Request parameters:
557 * Request parameters: 572 ///
558 * 573 /// [project] - A valid API project identifier.
559 * [project] - A valid API project identifier. 574 ///
560 * 575 /// [predefinedAcl] - Apply a predefined set of access controls to this
561 * [predefinedAcl] - Apply a predefined set of access controls to this bucket. 576 /// bucket.
562 * Possible string values are: 577 /// Possible string values are:
563 * - "authenticatedRead" : Project team owners get OWNER access, and 578 /// - "authenticatedRead" : Project team owners get OWNER access, and
564 * allAuthenticatedUsers get READER access. 579 /// allAuthenticatedUsers get READER access.
565 * - "private" : Project team owners get OWNER access. 580 /// - "private" : Project team owners get OWNER access.
566 * - "projectPrivate" : Project team members get access according to their 581 /// - "projectPrivate" : Project team members get access according to their
567 * roles. 582 /// roles.
568 * - "publicRead" : Project team owners get OWNER access, and allUsers get 583 /// - "publicRead" : Project team owners get OWNER access, and allUsers get
569 * READER access. 584 /// READER access.
570 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers 585 /// - "publicReadWrite" : Project team owners get OWNER access, and allUsers
571 * get WRITER access. 586 /// get WRITER access.
572 * 587 ///
573 * [predefinedDefaultObjectAcl] - Apply a predefined set of default object 588 /// [predefinedDefaultObjectAcl] - Apply a predefined set of default object
574 * access controls to this bucket. 589 /// access controls to this bucket.
575 * Possible string values are: 590 /// Possible string values are:
576 * - "authenticatedRead" : Object owner gets OWNER access, and 591 /// - "authenticatedRead" : Object owner gets OWNER access, and
577 * allAuthenticatedUsers get READER access. 592 /// allAuthenticatedUsers get READER access.
578 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 593 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
579 * team owners get OWNER access. 594 /// team owners get OWNER access.
580 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 595 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
581 * owners get READER access. 596 /// owners get READER access.
582 * - "private" : Object owner gets OWNER access. 597 /// - "private" : Object owner gets OWNER access.
583 * - "projectPrivate" : Object owner gets OWNER access, and project team 598 /// - "projectPrivate" : Object owner gets OWNER access, and project team
584 * members get access according to their roles. 599 /// members get access according to their roles.
585 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 600 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
586 * access. 601 /// access.
587 * 602 ///
588 * [projection] - Set of properties to return. Defaults to noAcl, unless the 603 /// [projection] - Set of properties to return. Defaults to noAcl, unless the
589 * bucket resource specifies acl or defaultObjectAcl properties, when it 604 /// bucket resource specifies acl or defaultObjectAcl properties, when it
590 * defaults to full. 605 /// defaults to full.
591 * Possible string values are: 606 /// Possible string values are:
592 * - "full" : Include all properties. 607 /// - "full" : Include all properties.
593 * - "noAcl" : Omit owner, acl and defaultObjectAcl properties. 608 /// - "noAcl" : Omit owner, acl and defaultObjectAcl properties.
594 * 609 ///
595 * Completes with a [Bucket]. 610 /// Completes with a [Bucket].
596 * 611 ///
597 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 612 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
598 * error. 613 /// an error.
599 * 614 ///
600 * If the used [http.Client] completes with an error when making a REST call, 615 /// If the used [http.Client] completes with an error when making a REST
601 * this method will complete with the same error. 616 /// call, this method will complete with the same error.
602 */ 617 async.Future<Bucket> insert(Bucket request, core.String project,
603 async.Future<Bucket> insert(Bucket request, core.String project, {core.String predefinedAcl, core.String predefinedDefaultObjectAcl, core.String projection}) { 618 {core.String predefinedAcl,
619 core.String predefinedDefaultObjectAcl,
620 core.String projection}) {
604 var _url = null; 621 var _url = null;
605 var _queryParams = new core.Map(); 622 var _queryParams = new core.Map();
606 var _uploadMedia = null; 623 var _uploadMedia = null;
607 var _uploadOptions = null; 624 var _uploadOptions = null;
608 var _downloadOptions = commons.DownloadOptions.Metadata; 625 var _downloadOptions = commons.DownloadOptions.Metadata;
609 var _body = null; 626 var _body = null;
610 627
611 if (request != null) { 628 if (request != null) {
612 _body = convert.JSON.encode((request).toJson()); 629 _body = convert.JSON.encode((request).toJson());
613 } 630 }
614 if (project == null) { 631 if (project == null) {
615 throw new core.ArgumentError("Parameter project is required."); 632 throw new core.ArgumentError("Parameter project is required.");
616 } 633 }
617 _queryParams["project"] = [project]; 634 _queryParams["project"] = [project];
618 if (predefinedAcl != null) { 635 if (predefinedAcl != null) {
619 _queryParams["predefinedAcl"] = [predefinedAcl]; 636 _queryParams["predefinedAcl"] = [predefinedAcl];
620 } 637 }
621 if (predefinedDefaultObjectAcl != null) { 638 if (predefinedDefaultObjectAcl != null) {
622 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; 639 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl];
623 } 640 }
624 if (projection != null) { 641 if (projection != null) {
625 _queryParams["projection"] = [projection]; 642 _queryParams["projection"] = [projection];
626 } 643 }
627 644
628 _url = 'b'; 645 _url = 'b';
629 646
630 var _response = _requester.request(_url, 647 var _response = _requester.request(_url, "POST",
631 "POST", 648 body: _body,
632 body: _body, 649 queryParams: _queryParams,
633 queryParams: _queryParams, 650 uploadOptions: _uploadOptions,
634 uploadOptions: _uploadOptions, 651 uploadMedia: _uploadMedia,
635 uploadMedia: _uploadMedia, 652 downloadOptions: _downloadOptions);
636 downloadOptions: _downloadOptions);
637 return _response.then((data) => new Bucket.fromJson(data)); 653 return _response.then((data) => new Bucket.fromJson(data));
638 } 654 }
639 655
640 /** 656 /// Retrieves a list of buckets for a given project.
641 * Retrieves a list of buckets for a given project. 657 ///
642 * 658 /// Request parameters:
643 * Request parameters: 659 ///
644 * 660 /// [project] - A valid API project identifier.
645 * [project] - A valid API project identifier. 661 ///
646 * 662 /// [maxResults] - Maximum number of buckets to return in a single response.
647 * [maxResults] - Maximum number of buckets to return in a single response. 663 /// The service will use this parameter or 1,000 items, whichever is smaller.
648 * The service will use this parameter or 1,000 items, whichever is smaller. 664 ///
649 * 665 /// [pageToken] - A previously-returned page token representing part of the
650 * [pageToken] - A previously-returned page token representing part of the 666 /// larger set of results to view.
651 * larger set of results to view. 667 ///
652 * 668 /// [prefix] - Filter results to buckets whose names begin with this prefix.
653 * [prefix] - Filter results to buckets whose names begin with this prefix. 669 ///
654 * 670 /// [projection] - Set of properties to return. Defaults to noAcl.
655 * [projection] - Set of properties to return. Defaults to noAcl. 671 /// Possible string values are:
656 * Possible string values are: 672 /// - "full" : Include all properties.
657 * - "full" : Include all properties. 673 /// - "noAcl" : Omit owner, acl and defaultObjectAcl properties.
658 * - "noAcl" : Omit owner, acl and defaultObjectAcl properties. 674 ///
659 * 675 /// Completes with a [Buckets].
660 * Completes with a [Buckets]. 676 ///
661 * 677 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
662 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 678 /// an error.
663 * error. 679 ///
664 * 680 /// If the used [http.Client] completes with an error when making a REST
665 * If the used [http.Client] completes with an error when making a REST call, 681 /// call, this method will complete with the same error.
666 * this method will complete with the same error. 682 async.Future<Buckets> list(core.String project,
667 */ 683 {core.int maxResults,
668 async.Future<Buckets> list(core.String project, {core.int maxResults, core.Str ing pageToken, core.String prefix, core.String projection}) { 684 core.String pageToken,
685 core.String prefix,
686 core.String projection}) {
669 var _url = null; 687 var _url = null;
670 var _queryParams = new core.Map(); 688 var _queryParams = new core.Map();
671 var _uploadMedia = null; 689 var _uploadMedia = null;
672 var _uploadOptions = null; 690 var _uploadOptions = null;
673 var _downloadOptions = commons.DownloadOptions.Metadata; 691 var _downloadOptions = commons.DownloadOptions.Metadata;
674 var _body = null; 692 var _body = null;
675 693
676 if (project == null) { 694 if (project == null) {
677 throw new core.ArgumentError("Parameter project is required."); 695 throw new core.ArgumentError("Parameter project is required.");
678 } 696 }
679 _queryParams["project"] = [project]; 697 _queryParams["project"] = [project];
680 if (maxResults != null) { 698 if (maxResults != null) {
681 _queryParams["maxResults"] = ["${maxResults}"]; 699 _queryParams["maxResults"] = ["${maxResults}"];
682 } 700 }
683 if (pageToken != null) { 701 if (pageToken != null) {
684 _queryParams["pageToken"] = [pageToken]; 702 _queryParams["pageToken"] = [pageToken];
685 } 703 }
686 if (prefix != null) { 704 if (prefix != null) {
687 _queryParams["prefix"] = [prefix]; 705 _queryParams["prefix"] = [prefix];
688 } 706 }
689 if (projection != null) { 707 if (projection != null) {
690 _queryParams["projection"] = [projection]; 708 _queryParams["projection"] = [projection];
691 } 709 }
692 710
693 _url = 'b'; 711 _url = 'b';
694 712
695 var _response = _requester.request(_url, 713 var _response = _requester.request(_url, "GET",
696 "GET", 714 body: _body,
697 body: _body, 715 queryParams: _queryParams,
698 queryParams: _queryParams, 716 uploadOptions: _uploadOptions,
699 uploadOptions: _uploadOptions, 717 uploadMedia: _uploadMedia,
700 uploadMedia: _uploadMedia, 718 downloadOptions: _downloadOptions);
701 downloadOptions: _downloadOptions);
702 return _response.then((data) => new Buckets.fromJson(data)); 719 return _response.then((data) => new Buckets.fromJson(data));
703 } 720 }
704 721
705 /** 722 /// Updates a bucket. Changes to the bucket will be readable immediately
706 * Updates a bucket. Changes to the bucket will be readable immediately after 723 /// after writing, but configuration changes may take time to propagate. This
707 * writing, but configuration changes may take time to propagate. This method 724 /// method supports patch semantics.
708 * supports patch semantics. 725 ///
709 * 726 /// [request] - The metadata request object.
710 * [request] - The metadata request object. 727 ///
711 * 728 /// Request parameters:
712 * Request parameters: 729 ///
713 * 730 /// [bucket] - Name of a bucket.
714 * [bucket] - Name of a bucket. 731 ///
715 * 732 /// [ifMetagenerationMatch] - Makes the return of the bucket metadata
716 * [ifMetagenerationMatch] - Makes the return of the bucket metadata 733 /// conditional on whether the bucket's current metageneration matches the
717 * conditional on whether the bucket's current metageneration matches the 734 /// given value.
718 * given value. 735 ///
719 * 736 /// [ifMetagenerationNotMatch] - Makes the return of the bucket metadata
720 * [ifMetagenerationNotMatch] - Makes the return of the bucket metadata 737 /// conditional on whether the bucket's current metageneration does not match
721 * conditional on whether the bucket's current metageneration does not match 738 /// the given value.
722 * the given value. 739 ///
723 * 740 /// [predefinedAcl] - Apply a predefined set of access controls to this
724 * [predefinedAcl] - Apply a predefined set of access controls to this bucket. 741 /// bucket.
725 * Possible string values are: 742 /// Possible string values are:
726 * - "authenticatedRead" : Project team owners get OWNER access, and 743 /// - "authenticatedRead" : Project team owners get OWNER access, and
727 * allAuthenticatedUsers get READER access. 744 /// allAuthenticatedUsers get READER access.
728 * - "private" : Project team owners get OWNER access. 745 /// - "private" : Project team owners get OWNER access.
729 * - "projectPrivate" : Project team members get access according to their 746 /// - "projectPrivate" : Project team members get access according to their
730 * roles. 747 /// roles.
731 * - "publicRead" : Project team owners get OWNER access, and allUsers get 748 /// - "publicRead" : Project team owners get OWNER access, and allUsers get
732 * READER access. 749 /// READER access.
733 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers 750 /// - "publicReadWrite" : Project team owners get OWNER access, and allUsers
734 * get WRITER access. 751 /// get WRITER access.
735 * 752 ///
736 * [predefinedDefaultObjectAcl] - Apply a predefined set of default object 753 /// [predefinedDefaultObjectAcl] - Apply a predefined set of default object
737 * access controls to this bucket. 754 /// access controls to this bucket.
738 * Possible string values are: 755 /// Possible string values are:
739 * - "authenticatedRead" : Object owner gets OWNER access, and 756 /// - "authenticatedRead" : Object owner gets OWNER access, and
740 * allAuthenticatedUsers get READER access. 757 /// allAuthenticatedUsers get READER access.
741 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 758 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
742 * team owners get OWNER access. 759 /// team owners get OWNER access.
743 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 760 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
744 * owners get READER access. 761 /// owners get READER access.
745 * - "private" : Object owner gets OWNER access. 762 /// - "private" : Object owner gets OWNER access.
746 * - "projectPrivate" : Object owner gets OWNER access, and project team 763 /// - "projectPrivate" : Object owner gets OWNER access, and project team
747 * members get access according to their roles. 764 /// members get access according to their roles.
748 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 765 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
749 * access. 766 /// access.
750 * 767 ///
751 * [projection] - Set of properties to return. Defaults to full. 768 /// [projection] - Set of properties to return. Defaults to full.
752 * Possible string values are: 769 /// Possible string values are:
753 * - "full" : Include all properties. 770 /// - "full" : Include all properties.
754 * - "noAcl" : Omit owner, acl and defaultObjectAcl properties. 771 /// - "noAcl" : Omit owner, acl and defaultObjectAcl properties.
755 * 772 ///
756 * [userProject] - The project to be billed for this request, for Requester 773 /// [userProject] - The project to be billed for this request, for Requester
757 * Pays buckets. 774 /// Pays buckets.
758 * 775 ///
759 * Completes with a [Bucket]. 776 /// Completes with a [Bucket].
760 * 777 ///
761 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 778 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
762 * error. 779 /// an error.
763 * 780 ///
764 * If the used [http.Client] completes with an error when making a REST call, 781 /// If the used [http.Client] completes with an error when making a REST
765 * this method will complete with the same error. 782 /// call, this method will complete with the same error.
766 */ 783 async.Future<Bucket> patch(Bucket request, core.String bucket,
767 async.Future<Bucket> patch(Bucket request, core.String bucket, {core.String if MetagenerationMatch, core.String ifMetagenerationNotMatch, core.String predefine dAcl, core.String predefinedDefaultObjectAcl, core.String projection, core.Strin g userProject}) { 784 {core.String ifMetagenerationMatch,
785 core.String ifMetagenerationNotMatch,
786 core.String predefinedAcl,
787 core.String predefinedDefaultObjectAcl,
788 core.String projection,
789 core.String userProject}) {
768 var _url = null; 790 var _url = null;
769 var _queryParams = new core.Map(); 791 var _queryParams = new core.Map();
770 var _uploadMedia = null; 792 var _uploadMedia = null;
771 var _uploadOptions = null; 793 var _uploadOptions = null;
772 var _downloadOptions = commons.DownloadOptions.Metadata; 794 var _downloadOptions = commons.DownloadOptions.Metadata;
773 var _body = null; 795 var _body = null;
774 796
775 if (request != null) { 797 if (request != null) {
776 _body = convert.JSON.encode((request).toJson()); 798 _body = convert.JSON.encode((request).toJson());
777 } 799 }
(...skipping 14 matching lines...) Expand all
792 } 814 }
793 if (projection != null) { 815 if (projection != null) {
794 _queryParams["projection"] = [projection]; 816 _queryParams["projection"] = [projection];
795 } 817 }
796 if (userProject != null) { 818 if (userProject != null) {
797 _queryParams["userProject"] = [userProject]; 819 _queryParams["userProject"] = [userProject];
798 } 820 }
799 821
800 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); 822 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket');
801 823
802 var _response = _requester.request(_url, 824 var _response = _requester.request(_url, "PATCH",
803 "PATCH", 825 body: _body,
804 body: _body, 826 queryParams: _queryParams,
805 queryParams: _queryParams, 827 uploadOptions: _uploadOptions,
806 uploadOptions: _uploadOptions, 828 uploadMedia: _uploadMedia,
807 uploadMedia: _uploadMedia, 829 downloadOptions: _downloadOptions);
808 downloadOptions: _downloadOptions);
809 return _response.then((data) => new Bucket.fromJson(data)); 830 return _response.then((data) => new Bucket.fromJson(data));
810 } 831 }
811 832
812 /** 833 /// Updates an IAM policy for the specified bucket.
813 * Updates an IAM policy for the specified bucket. 834 ///
814 * 835 /// [request] - The metadata request object.
815 * [request] - The metadata request object. 836 ///
816 * 837 /// Request parameters:
817 * Request parameters: 838 ///
818 * 839 /// [bucket] - Name of a bucket.
819 * [bucket] - Name of a bucket. 840 ///
820 * 841 /// [userProject] - The project to be billed for this request, for Requester
821 * [userProject] - The project to be billed for this request, for Requester 842 /// Pays buckets.
822 * Pays buckets. 843 ///
823 * 844 /// Completes with a [Policy].
824 * Completes with a [Policy]. 845 ///
825 * 846 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
826 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 847 /// an error.
827 * error. 848 ///
828 * 849 /// If the used [http.Client] completes with an error when making a REST
829 * If the used [http.Client] completes with an error when making a REST call, 850 /// call, this method will complete with the same error.
830 * this method will complete with the same error. 851 async.Future<Policy> setIamPolicy(Policy request, core.String bucket,
831 */ 852 {core.String userProject}) {
832 async.Future<Policy> setIamPolicy(Policy request, core.String bucket, {core.St ring userProject}) {
833 var _url = null; 853 var _url = null;
834 var _queryParams = new core.Map(); 854 var _queryParams = new core.Map();
835 var _uploadMedia = null; 855 var _uploadMedia = null;
836 var _uploadOptions = null; 856 var _uploadOptions = null;
837 var _downloadOptions = commons.DownloadOptions.Metadata; 857 var _downloadOptions = commons.DownloadOptions.Metadata;
838 var _body = null; 858 var _body = null;
839 859
840 if (request != null) { 860 if (request != null) {
841 _body = convert.JSON.encode((request).toJson()); 861 _body = convert.JSON.encode((request).toJson());
842 } 862 }
843 if (bucket == null) { 863 if (bucket == null) {
844 throw new core.ArgumentError("Parameter bucket is required."); 864 throw new core.ArgumentError("Parameter bucket is required.");
845 } 865 }
846 if (userProject != null) { 866 if (userProject != null) {
847 _queryParams["userProject"] = [userProject]; 867 _queryParams["userProject"] = [userProject];
848 } 868 }
849 869
850 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam'; 870 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam';
851 871
852 var _response = _requester.request(_url, 872 var _response = _requester.request(_url, "PUT",
853 "PUT", 873 body: _body,
854 body: _body, 874 queryParams: _queryParams,
855 queryParams: _queryParams, 875 uploadOptions: _uploadOptions,
856 uploadOptions: _uploadOptions, 876 uploadMedia: _uploadMedia,
857 uploadMedia: _uploadMedia, 877 downloadOptions: _downloadOptions);
858 downloadOptions: _downloadOptions);
859 return _response.then((data) => new Policy.fromJson(data)); 878 return _response.then((data) => new Policy.fromJson(data));
860 } 879 }
861 880
862 /** 881 /// Tests a set of permissions on the given bucket to see which, if any, are
863 * Tests a set of permissions on the given bucket to see which, if any, are 882 /// held by the caller.
864 * held by the caller. 883 ///
865 * 884 /// Request parameters:
866 * Request parameters: 885 ///
867 * 886 /// [bucket] - Name of a bucket.
868 * [bucket] - Name of a bucket. 887 ///
869 * 888 /// [permissions] - Permissions to test.
870 * [permissions] - Permissions to test. 889 ///
871 * 890 /// [userProject] - The project to be billed for this request, for Requester
872 * [userProject] - The project to be billed for this request, for Requester 891 /// Pays buckets.
873 * Pays buckets. 892 ///
874 * 893 /// Completes with a [TestIamPermissionsResponse].
875 * Completes with a [TestIamPermissionsResponse]. 894 ///
876 * 895 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
877 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 896 /// an error.
878 * error. 897 ///
879 * 898 /// If the used [http.Client] completes with an error when making a REST
880 * If the used [http.Client] completes with an error when making a REST call, 899 /// call, this method will complete with the same error.
881 * this method will complete with the same error. 900 async.Future<TestIamPermissionsResponse> testIamPermissions(
882 */ 901 core.String bucket, core.List<core.String> permissions,
883 async.Future<TestIamPermissionsResponse> testIamPermissions(core.String bucket , core.List<core.String> permissions, {core.String userProject}) { 902 {core.String userProject}) {
884 var _url = null; 903 var _url = null;
885 var _queryParams = new core.Map(); 904 var _queryParams = new core.Map();
886 var _uploadMedia = null; 905 var _uploadMedia = null;
887 var _uploadOptions = null; 906 var _uploadOptions = null;
888 var _downloadOptions = commons.DownloadOptions.Metadata; 907 var _downloadOptions = commons.DownloadOptions.Metadata;
889 var _body = null; 908 var _body = null;
890 909
891 if (bucket == null) { 910 if (bucket == null) {
892 throw new core.ArgumentError("Parameter bucket is required."); 911 throw new core.ArgumentError("Parameter bucket is required.");
893 } 912 }
894 if (permissions == null || permissions.isEmpty) { 913 if (permissions == null || permissions.isEmpty) {
895 throw new core.ArgumentError("Parameter permissions is required."); 914 throw new core.ArgumentError("Parameter permissions is required.");
896 } 915 }
897 _queryParams["permissions"] = permissions; 916 _queryParams["permissions"] = permissions;
898 if (userProject != null) { 917 if (userProject != null) {
899 _queryParams["userProject"] = [userProject]; 918 _queryParams["userProject"] = [userProject];
900 } 919 }
901 920
902 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam/testPermissio ns'; 921 _url = 'b/' +
922 commons.Escaper.ecapeVariable('$bucket') +
923 '/iam/testPermissions';
903 924
904 var _response = _requester.request(_url, 925 var _response = _requester.request(_url, "GET",
905 "GET", 926 body: _body,
906 body: _body, 927 queryParams: _queryParams,
907 queryParams: _queryParams, 928 uploadOptions: _uploadOptions,
908 uploadOptions: _uploadOptions, 929 uploadMedia: _uploadMedia,
909 uploadMedia: _uploadMedia, 930 downloadOptions: _downloadOptions);
910 downloadOptions: _downloadOptions); 931 return _response
911 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data )); 932 .then((data) => new TestIamPermissionsResponse.fromJson(data));
912 } 933 }
913 934
914 /** 935 /// Updates a bucket. Changes to the bucket will be readable immediately
915 * Updates a bucket. Changes to the bucket will be readable immediately after 936 /// after writing, but configuration changes may take time to propagate.
916 * writing, but configuration changes may take time to propagate. 937 ///
917 * 938 /// [request] - The metadata request object.
918 * [request] - The metadata request object. 939 ///
919 * 940 /// Request parameters:
920 * Request parameters: 941 ///
921 * 942 /// [bucket] - Name of a bucket.
922 * [bucket] - Name of a bucket. 943 ///
923 * 944 /// [ifMetagenerationMatch] - Makes the return of the bucket metadata
924 * [ifMetagenerationMatch] - Makes the return of the bucket metadata 945 /// conditional on whether the bucket's current metageneration matches the
925 * conditional on whether the bucket's current metageneration matches the 946 /// given value.
926 * given value. 947 ///
927 * 948 /// [ifMetagenerationNotMatch] - Makes the return of the bucket metadata
928 * [ifMetagenerationNotMatch] - Makes the return of the bucket metadata 949 /// conditional on whether the bucket's current metageneration does not match
929 * conditional on whether the bucket's current metageneration does not match 950 /// the given value.
930 * the given value. 951 ///
931 * 952 /// [predefinedAcl] - Apply a predefined set of access controls to this
932 * [predefinedAcl] - Apply a predefined set of access controls to this bucket. 953 /// bucket.
933 * Possible string values are: 954 /// Possible string values are:
934 * - "authenticatedRead" : Project team owners get OWNER access, and 955 /// - "authenticatedRead" : Project team owners get OWNER access, and
935 * allAuthenticatedUsers get READER access. 956 /// allAuthenticatedUsers get READER access.
936 * - "private" : Project team owners get OWNER access. 957 /// - "private" : Project team owners get OWNER access.
937 * - "projectPrivate" : Project team members get access according to their 958 /// - "projectPrivate" : Project team members get access according to their
938 * roles. 959 /// roles.
939 * - "publicRead" : Project team owners get OWNER access, and allUsers get 960 /// - "publicRead" : Project team owners get OWNER access, and allUsers get
940 * READER access. 961 /// READER access.
941 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers 962 /// - "publicReadWrite" : Project team owners get OWNER access, and allUsers
942 * get WRITER access. 963 /// get WRITER access.
943 * 964 ///
944 * [predefinedDefaultObjectAcl] - Apply a predefined set of default object 965 /// [predefinedDefaultObjectAcl] - Apply a predefined set of default object
945 * access controls to this bucket. 966 /// access controls to this bucket.
946 * Possible string values are: 967 /// Possible string values are:
947 * - "authenticatedRead" : Object owner gets OWNER access, and 968 /// - "authenticatedRead" : Object owner gets OWNER access, and
948 * allAuthenticatedUsers get READER access. 969 /// allAuthenticatedUsers get READER access.
949 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 970 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
950 * team owners get OWNER access. 971 /// team owners get OWNER access.
951 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 972 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
952 * owners get READER access. 973 /// owners get READER access.
953 * - "private" : Object owner gets OWNER access. 974 /// - "private" : Object owner gets OWNER access.
954 * - "projectPrivate" : Object owner gets OWNER access, and project team 975 /// - "projectPrivate" : Object owner gets OWNER access, and project team
955 * members get access according to their roles. 976 /// members get access according to their roles.
956 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 977 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
957 * access. 978 /// access.
958 * 979 ///
959 * [projection] - Set of properties to return. Defaults to full. 980 /// [projection] - Set of properties to return. Defaults to full.
960 * Possible string values are: 981 /// Possible string values are:
961 * - "full" : Include all properties. 982 /// - "full" : Include all properties.
962 * - "noAcl" : Omit owner, acl and defaultObjectAcl properties. 983 /// - "noAcl" : Omit owner, acl and defaultObjectAcl properties.
963 * 984 ///
964 * [userProject] - The project to be billed for this request, for Requester 985 /// [userProject] - The project to be billed for this request, for Requester
965 * Pays buckets. 986 /// Pays buckets.
966 * 987 ///
967 * Completes with a [Bucket]. 988 /// Completes with a [Bucket].
968 * 989 ///
969 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 990 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
970 * error. 991 /// an error.
971 * 992 ///
972 * If the used [http.Client] completes with an error when making a REST call, 993 /// If the used [http.Client] completes with an error when making a REST
973 * this method will complete with the same error. 994 /// call, this method will complete with the same error.
974 */ 995 async.Future<Bucket> update(Bucket request, core.String bucket,
975 async.Future<Bucket> update(Bucket request, core.String bucket, {core.String i fMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String predefin edAcl, core.String predefinedDefaultObjectAcl, core.String projection, core.Stri ng userProject}) { 996 {core.String ifMetagenerationMatch,
997 core.String ifMetagenerationNotMatch,
998 core.String predefinedAcl,
999 core.String predefinedDefaultObjectAcl,
1000 core.String projection,
1001 core.String userProject}) {
976 var _url = null; 1002 var _url = null;
977 var _queryParams = new core.Map(); 1003 var _queryParams = new core.Map();
978 var _uploadMedia = null; 1004 var _uploadMedia = null;
979 var _uploadOptions = null; 1005 var _uploadOptions = null;
980 var _downloadOptions = commons.DownloadOptions.Metadata; 1006 var _downloadOptions = commons.DownloadOptions.Metadata;
981 var _body = null; 1007 var _body = null;
982 1008
983 if (request != null) { 1009 if (request != null) {
984 _body = convert.JSON.encode((request).toJson()); 1010 _body = convert.JSON.encode((request).toJson());
985 } 1011 }
(...skipping 14 matching lines...) Expand all
1000 } 1026 }
1001 if (projection != null) { 1027 if (projection != null) {
1002 _queryParams["projection"] = [projection]; 1028 _queryParams["projection"] = [projection];
1003 } 1029 }
1004 if (userProject != null) { 1030 if (userProject != null) {
1005 _queryParams["userProject"] = [userProject]; 1031 _queryParams["userProject"] = [userProject];
1006 } 1032 }
1007 1033
1008 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); 1034 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket');
1009 1035
1010 var _response = _requester.request(_url, 1036 var _response = _requester.request(_url, "PUT",
1011 "PUT", 1037 body: _body,
1012 body: _body, 1038 queryParams: _queryParams,
1013 queryParams: _queryParams, 1039 uploadOptions: _uploadOptions,
1014 uploadOptions: _uploadOptions, 1040 uploadMedia: _uploadMedia,
1015 uploadMedia: _uploadMedia, 1041 downloadOptions: _downloadOptions);
1016 downloadOptions: _downloadOptions);
1017 return _response.then((data) => new Bucket.fromJson(data)); 1042 return _response.then((data) => new Bucket.fromJson(data));
1018 } 1043 }
1019
1020 } 1044 }
1021 1045
1022
1023 class ChannelsResourceApi { 1046 class ChannelsResourceApi {
1024 final commons.ApiRequester _requester; 1047 final commons.ApiRequester _requester;
1025 1048
1026 ChannelsResourceApi(commons.ApiRequester client) : 1049 ChannelsResourceApi(commons.ApiRequester client) : _requester = client;
1027 _requester = client;
1028 1050
1029 /** 1051 /// Stop watching resources through this channel
1030 * Stop watching resources through this channel 1052 ///
1031 * 1053 /// [request] - The metadata request object.
1032 * [request] - The metadata request object. 1054 ///
1033 * 1055 /// Request parameters:
1034 * Request parameters: 1056 ///
1035 * 1057 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1036 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1058 /// an error.
1037 * error. 1059 ///
1038 * 1060 /// If the used [http.Client] completes with an error when making a REST
1039 * If the used [http.Client] completes with an error when making a REST call, 1061 /// call, this method will complete with the same error.
1040 * this method will complete with the same error.
1041 */
1042 async.Future stop(Channel request) { 1062 async.Future stop(Channel request) {
1043 var _url = null; 1063 var _url = null;
1044 var _queryParams = new core.Map(); 1064 var _queryParams = new core.Map();
1045 var _uploadMedia = null; 1065 var _uploadMedia = null;
1046 var _uploadOptions = null; 1066 var _uploadOptions = null;
1047 var _downloadOptions = commons.DownloadOptions.Metadata; 1067 var _downloadOptions = commons.DownloadOptions.Metadata;
1048 var _body = null; 1068 var _body = null;
1049 1069
1050 if (request != null) { 1070 if (request != null) {
1051 _body = convert.JSON.encode((request).toJson()); 1071 _body = convert.JSON.encode((request).toJson());
1052 } 1072 }
1053 1073
1054 _downloadOptions = null; 1074 _downloadOptions = null;
1055 1075
1056 _url = 'channels/stop'; 1076 _url = 'channels/stop';
1057 1077
1058 var _response = _requester.request(_url, 1078 var _response = _requester.request(_url, "POST",
1059 "POST", 1079 body: _body,
1060 body: _body, 1080 queryParams: _queryParams,
1061 queryParams: _queryParams, 1081 uploadOptions: _uploadOptions,
1062 uploadOptions: _uploadOptions, 1082 uploadMedia: _uploadMedia,
1063 uploadMedia: _uploadMedia, 1083 downloadOptions: _downloadOptions);
1064 downloadOptions: _downloadOptions);
1065 return _response.then((data) => null); 1084 return _response.then((data) => null);
1066 } 1085 }
1067
1068 } 1086 }
1069 1087
1070
1071 class DefaultObjectAccessControlsResourceApi { 1088 class DefaultObjectAccessControlsResourceApi {
1072 final commons.ApiRequester _requester; 1089 final commons.ApiRequester _requester;
1073 1090
1074 DefaultObjectAccessControlsResourceApi(commons.ApiRequester client) : 1091 DefaultObjectAccessControlsResourceApi(commons.ApiRequester client)
1075 _requester = client; 1092 : _requester = client;
1076 1093
1077 /** 1094 /// Permanently deletes the default object ACL entry for the specified entity
1078 * Permanently deletes the default object ACL entry for the specified entity 1095 /// on the specified bucket.
1079 * on the specified bucket. 1096 ///
1080 * 1097 /// Request parameters:
1081 * Request parameters: 1098 ///
1082 * 1099 /// [bucket] - Name of a bucket.
1083 * [bucket] - Name of a bucket. 1100 ///
1084 * 1101 /// [entity] - The entity holding the permission. Can be user-userId,
1085 * [entity] - The entity holding the permission. Can be user-userId, 1102 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1086 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1103 /// allAuthenticatedUsers.
1087 * allAuthenticatedUsers. 1104 ///
1088 * 1105 /// [userProject] - The project to be billed for this request, for Requester
1089 * [userProject] - The project to be billed for this request, for Requester 1106 /// Pays buckets.
1090 * Pays buckets. 1107 ///
1091 * 1108 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1092 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1109 /// an error.
1093 * error. 1110 ///
1094 * 1111 /// If the used [http.Client] completes with an error when making a REST
1095 * If the used [http.Client] completes with an error when making a REST call, 1112 /// call, this method will complete with the same error.
1096 * this method will complete with the same error. 1113 async.Future delete(core.String bucket, core.String entity,
1097 */ 1114 {core.String userProject}) {
1098 async.Future delete(core.String bucket, core.String entity, {core.String userP roject}) {
1099 var _url = null; 1115 var _url = null;
1100 var _queryParams = new core.Map(); 1116 var _queryParams = new core.Map();
1101 var _uploadMedia = null; 1117 var _uploadMedia = null;
1102 var _uploadOptions = null; 1118 var _uploadOptions = null;
1103 var _downloadOptions = commons.DownloadOptions.Metadata; 1119 var _downloadOptions = commons.DownloadOptions.Metadata;
1104 var _body = null; 1120 var _body = null;
1105 1121
1106 if (bucket == null) { 1122 if (bucket == null) {
1107 throw new core.ArgumentError("Parameter bucket is required."); 1123 throw new core.ArgumentError("Parameter bucket is required.");
1108 } 1124 }
1109 if (entity == null) { 1125 if (entity == null) {
1110 throw new core.ArgumentError("Parameter entity is required."); 1126 throw new core.ArgumentError("Parameter entity is required.");
1111 } 1127 }
1112 if (userProject != null) { 1128 if (userProject != null) {
1113 _queryParams["userProject"] = [userProject]; 1129 _queryParams["userProject"] = [userProject];
1114 } 1130 }
1115 1131
1116 _downloadOptions = null; 1132 _downloadOptions = null;
1117 1133
1118 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/ ' + commons.Escaper.ecapeVariable('$entity'); 1134 _url = 'b/' +
1135 commons.Escaper.ecapeVariable('$bucket') +
1136 '/defaultObjectAcl/' +
1137 commons.Escaper.ecapeVariable('$entity');
1119 1138
1120 var _response = _requester.request(_url, 1139 var _response = _requester.request(_url, "DELETE",
1121 "DELETE", 1140 body: _body,
1122 body: _body, 1141 queryParams: _queryParams,
1123 queryParams: _queryParams, 1142 uploadOptions: _uploadOptions,
1124 uploadOptions: _uploadOptions, 1143 uploadMedia: _uploadMedia,
1125 uploadMedia: _uploadMedia, 1144 downloadOptions: _downloadOptions);
1126 downloadOptions: _downloadOptions);
1127 return _response.then((data) => null); 1145 return _response.then((data) => null);
1128 } 1146 }
1129 1147
1130 /** 1148 /// Returns the default object ACL entry for the specified entity on the
1131 * Returns the default object ACL entry for the specified entity on the 1149 /// specified bucket.
1132 * specified bucket. 1150 ///
1133 * 1151 /// Request parameters:
1134 * Request parameters: 1152 ///
1135 * 1153 /// [bucket] - Name of a bucket.
1136 * [bucket] - Name of a bucket. 1154 ///
1137 * 1155 /// [entity] - The entity holding the permission. Can be user-userId,
1138 * [entity] - The entity holding the permission. Can be user-userId, 1156 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1139 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1157 /// allAuthenticatedUsers.
1140 * allAuthenticatedUsers. 1158 ///
1141 * 1159 /// [userProject] - The project to be billed for this request, for Requester
1142 * [userProject] - The project to be billed for this request, for Requester 1160 /// Pays buckets.
1143 * Pays buckets. 1161 ///
1144 * 1162 /// Completes with a [ObjectAccessControl].
1145 * Completes with a [ObjectAccessControl]. 1163 ///
1146 * 1164 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1165 /// an error.
1148 * error. 1166 ///
1149 * 1167 /// If the used [http.Client] completes with an error when making a REST
1150 * If the used [http.Client] completes with an error when making a REST call, 1168 /// call, this method will complete with the same error.
1151 * this method will complete with the same error. 1169 async.Future<ObjectAccessControl> get(core.String bucket, core.String entity,
1152 */ 1170 {core.String userProject}) {
1153 async.Future<ObjectAccessControl> get(core.String bucket, core.String entity, {core.String userProject}) {
1154 var _url = null; 1171 var _url = null;
1155 var _queryParams = new core.Map(); 1172 var _queryParams = new core.Map();
1156 var _uploadMedia = null; 1173 var _uploadMedia = null;
1157 var _uploadOptions = null; 1174 var _uploadOptions = null;
1158 var _downloadOptions = commons.DownloadOptions.Metadata; 1175 var _downloadOptions = commons.DownloadOptions.Metadata;
1159 var _body = null; 1176 var _body = null;
1160 1177
1161 if (bucket == null) { 1178 if (bucket == null) {
1162 throw new core.ArgumentError("Parameter bucket is required."); 1179 throw new core.ArgumentError("Parameter bucket is required.");
1163 } 1180 }
1164 if (entity == null) { 1181 if (entity == null) {
1165 throw new core.ArgumentError("Parameter entity is required."); 1182 throw new core.ArgumentError("Parameter entity is required.");
1166 } 1183 }
1167 if (userProject != null) { 1184 if (userProject != null) {
1168 _queryParams["userProject"] = [userProject]; 1185 _queryParams["userProject"] = [userProject];
1169 } 1186 }
1170 1187
1171 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/ ' + commons.Escaper.ecapeVariable('$entity'); 1188 _url = 'b/' +
1189 commons.Escaper.ecapeVariable('$bucket') +
1190 '/defaultObjectAcl/' +
1191 commons.Escaper.ecapeVariable('$entity');
1172 1192
1173 var _response = _requester.request(_url, 1193 var _response = _requester.request(_url, "GET",
1174 "GET", 1194 body: _body,
1175 body: _body, 1195 queryParams: _queryParams,
1176 queryParams: _queryParams, 1196 uploadOptions: _uploadOptions,
1177 uploadOptions: _uploadOptions, 1197 uploadMedia: _uploadMedia,
1178 uploadMedia: _uploadMedia, 1198 downloadOptions: _downloadOptions);
1179 downloadOptions: _downloadOptions);
1180 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 1199 return _response.then((data) => new ObjectAccessControl.fromJson(data));
1181 } 1200 }
1182 1201
1183 /** 1202 /// Creates a new default object ACL entry on the specified bucket.
1184 * Creates a new default object ACL entry on the specified bucket. 1203 ///
1185 * 1204 /// [request] - The metadata request object.
1186 * [request] - The metadata request object. 1205 ///
1187 * 1206 /// Request parameters:
1188 * Request parameters: 1207 ///
1189 * 1208 /// [bucket] - Name of a bucket.
1190 * [bucket] - Name of a bucket. 1209 ///
1191 * 1210 /// [userProject] - The project to be billed for this request, for Requester
1192 * [userProject] - The project to be billed for this request, for Requester 1211 /// Pays buckets.
1193 * Pays buckets. 1212 ///
1194 * 1213 /// Completes with a [ObjectAccessControl].
1195 * Completes with a [ObjectAccessControl]. 1214 ///
1196 * 1215 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1197 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1216 /// an error.
1198 * error. 1217 ///
1199 * 1218 /// If the used [http.Client] completes with an error when making a REST
1200 * If the used [http.Client] completes with an error when making a REST call, 1219 /// call, this method will complete with the same error.
1201 * this method will complete with the same error. 1220 async.Future<ObjectAccessControl> insert(
1202 */ 1221 ObjectAccessControl request, core.String bucket,
1203 async.Future<ObjectAccessControl> insert(ObjectAccessControl request, core.Str ing bucket, {core.String userProject}) { 1222 {core.String userProject}) {
1204 var _url = null; 1223 var _url = null;
1205 var _queryParams = new core.Map(); 1224 var _queryParams = new core.Map();
1206 var _uploadMedia = null; 1225 var _uploadMedia = null;
1207 var _uploadOptions = null; 1226 var _uploadOptions = null;
1208 var _downloadOptions = commons.DownloadOptions.Metadata; 1227 var _downloadOptions = commons.DownloadOptions.Metadata;
1209 var _body = null; 1228 var _body = null;
1210 1229
1211 if (request != null) { 1230 if (request != null) {
1212 _body = convert.JSON.encode((request).toJson()); 1231 _body = convert.JSON.encode((request).toJson());
1213 } 1232 }
1214 if (bucket == null) { 1233 if (bucket == null) {
1215 throw new core.ArgumentError("Parameter bucket is required."); 1234 throw new core.ArgumentError("Parameter bucket is required.");
1216 } 1235 }
1217 if (userProject != null) { 1236 if (userProject != null) {
1218 _queryParams["userProject"] = [userProject]; 1237 _queryParams["userProject"] = [userProject];
1219 } 1238 }
1220 1239
1221 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl' ; 1240 _url =
1241 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl';
1222 1242
1223 var _response = _requester.request(_url, 1243 var _response = _requester.request(_url, "POST",
1224 "POST", 1244 body: _body,
1225 body: _body, 1245 queryParams: _queryParams,
1226 queryParams: _queryParams, 1246 uploadOptions: _uploadOptions,
1227 uploadOptions: _uploadOptions, 1247 uploadMedia: _uploadMedia,
1228 uploadMedia: _uploadMedia, 1248 downloadOptions: _downloadOptions);
1229 downloadOptions: _downloadOptions);
1230 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 1249 return _response.then((data) => new ObjectAccessControl.fromJson(data));
1231 } 1250 }
1232 1251
1233 /** 1252 /// Retrieves default object ACL entries on the specified bucket.
1234 * Retrieves default object ACL entries on the specified bucket. 1253 ///
1235 * 1254 /// Request parameters:
1236 * Request parameters: 1255 ///
1237 * 1256 /// [bucket] - Name of a bucket.
1238 * [bucket] - Name of a bucket. 1257 ///
1239 * 1258 /// [ifMetagenerationMatch] - If present, only return default ACL listing if
1240 * [ifMetagenerationMatch] - If present, only return default ACL listing if 1259 /// the bucket's current metageneration matches this value.
1241 * the bucket's current metageneration matches this value. 1260 ///
1242 * 1261 /// [ifMetagenerationNotMatch] - If present, only return default ACL listing
1243 * [ifMetagenerationNotMatch] - If present, only return default ACL listing if 1262 /// if the bucket's current metageneration does not match the given value.
1244 * the bucket's current metageneration does not match the given value. 1263 ///
1245 * 1264 /// [userProject] - The project to be billed for this request, for Requester
1246 * [userProject] - The project to be billed for this request, for Requester 1265 /// Pays buckets.
1247 * Pays buckets. 1266 ///
1248 * 1267 /// Completes with a [ObjectAccessControls].
1249 * Completes with a [ObjectAccessControls]. 1268 ///
1250 * 1269 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1251 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1270 /// an error.
1252 * error. 1271 ///
1253 * 1272 /// If the used [http.Client] completes with an error when making a REST
1254 * If the used [http.Client] completes with an error when making a REST call, 1273 /// call, this method will complete with the same error.
1255 * this method will complete with the same error. 1274 async.Future<ObjectAccessControls> list(core.String bucket,
1256 */ 1275 {core.String ifMetagenerationMatch,
1257 async.Future<ObjectAccessControls> list(core.String bucket, {core.String ifMet agenerationMatch, core.String ifMetagenerationNotMatch, core.String userProject} ) { 1276 core.String ifMetagenerationNotMatch,
1277 core.String userProject}) {
1258 var _url = null; 1278 var _url = null;
1259 var _queryParams = new core.Map(); 1279 var _queryParams = new core.Map();
1260 var _uploadMedia = null; 1280 var _uploadMedia = null;
1261 var _uploadOptions = null; 1281 var _uploadOptions = null;
1262 var _downloadOptions = commons.DownloadOptions.Metadata; 1282 var _downloadOptions = commons.DownloadOptions.Metadata;
1263 var _body = null; 1283 var _body = null;
1264 1284
1265 if (bucket == null) { 1285 if (bucket == null) {
1266 throw new core.ArgumentError("Parameter bucket is required."); 1286 throw new core.ArgumentError("Parameter bucket is required.");
1267 } 1287 }
1268 if (ifMetagenerationMatch != null) { 1288 if (ifMetagenerationMatch != null) {
1269 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; 1289 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch];
1270 } 1290 }
1271 if (ifMetagenerationNotMatch != null) { 1291 if (ifMetagenerationNotMatch != null) {
1272 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; 1292 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch];
1273 } 1293 }
1274 if (userProject != null) { 1294 if (userProject != null) {
1275 _queryParams["userProject"] = [userProject]; 1295 _queryParams["userProject"] = [userProject];
1276 } 1296 }
1277 1297
1278 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl' ; 1298 _url =
1299 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl';
1279 1300
1280 var _response = _requester.request(_url, 1301 var _response = _requester.request(_url, "GET",
1281 "GET", 1302 body: _body,
1282 body: _body, 1303 queryParams: _queryParams,
1283 queryParams: _queryParams, 1304 uploadOptions: _uploadOptions,
1284 uploadOptions: _uploadOptions, 1305 uploadMedia: _uploadMedia,
1285 uploadMedia: _uploadMedia, 1306 downloadOptions: _downloadOptions);
1286 downloadOptions: _downloadOptions);
1287 return _response.then((data) => new ObjectAccessControls.fromJson(data)); 1307 return _response.then((data) => new ObjectAccessControls.fromJson(data));
1288 } 1308 }
1289 1309
1290 /** 1310 /// Updates a default object ACL entry on the specified bucket. This method
1291 * Updates a default object ACL entry on the specified bucket. This method 1311 /// supports patch semantics.
1292 * supports patch semantics. 1312 ///
1293 * 1313 /// [request] - The metadata request object.
1294 * [request] - The metadata request object. 1314 ///
1295 * 1315 /// Request parameters:
1296 * Request parameters: 1316 ///
1297 * 1317 /// [bucket] - Name of a bucket.
1298 * [bucket] - Name of a bucket. 1318 ///
1299 * 1319 /// [entity] - The entity holding the permission. Can be user-userId,
1300 * [entity] - The entity holding the permission. Can be user-userId, 1320 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1301 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1321 /// allAuthenticatedUsers.
1302 * allAuthenticatedUsers. 1322 ///
1303 * 1323 /// [userProject] - The project to be billed for this request, for Requester
1304 * [userProject] - The project to be billed for this request, for Requester 1324 /// Pays buckets.
1305 * Pays buckets. 1325 ///
1306 * 1326 /// Completes with a [ObjectAccessControl].
1307 * Completes with a [ObjectAccessControl]. 1327 ///
1308 * 1328 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1309 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1329 /// an error.
1310 * error. 1330 ///
1311 * 1331 /// If the used [http.Client] completes with an error when making a REST
1312 * If the used [http.Client] completes with an error when making a REST call, 1332 /// call, this method will complete with the same error.
1313 * this method will complete with the same error. 1333 async.Future<ObjectAccessControl> patch(
1314 */ 1334 ObjectAccessControl request, core.String bucket, core.String entity,
1315 async.Future<ObjectAccessControl> patch(ObjectAccessControl request, core.Stri ng bucket, core.String entity, {core.String userProject}) { 1335 {core.String userProject}) {
1316 var _url = null; 1336 var _url = null;
1317 var _queryParams = new core.Map(); 1337 var _queryParams = new core.Map();
1318 var _uploadMedia = null; 1338 var _uploadMedia = null;
1319 var _uploadOptions = null; 1339 var _uploadOptions = null;
1320 var _downloadOptions = commons.DownloadOptions.Metadata; 1340 var _downloadOptions = commons.DownloadOptions.Metadata;
1321 var _body = null; 1341 var _body = null;
1322 1342
1323 if (request != null) { 1343 if (request != null) {
1324 _body = convert.JSON.encode((request).toJson()); 1344 _body = convert.JSON.encode((request).toJson());
1325 } 1345 }
1326 if (bucket == null) { 1346 if (bucket == null) {
1327 throw new core.ArgumentError("Parameter bucket is required."); 1347 throw new core.ArgumentError("Parameter bucket is required.");
1328 } 1348 }
1329 if (entity == null) { 1349 if (entity == null) {
1330 throw new core.ArgumentError("Parameter entity is required."); 1350 throw new core.ArgumentError("Parameter entity is required.");
1331 } 1351 }
1332 if (userProject != null) { 1352 if (userProject != null) {
1333 _queryParams["userProject"] = [userProject]; 1353 _queryParams["userProject"] = [userProject];
1334 } 1354 }
1335 1355
1336 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/ ' + commons.Escaper.ecapeVariable('$entity'); 1356 _url = 'b/' +
1357 commons.Escaper.ecapeVariable('$bucket') +
1358 '/defaultObjectAcl/' +
1359 commons.Escaper.ecapeVariable('$entity');
1337 1360
1338 var _response = _requester.request(_url, 1361 var _response = _requester.request(_url, "PATCH",
1339 "PATCH", 1362 body: _body,
1340 body: _body, 1363 queryParams: _queryParams,
1341 queryParams: _queryParams, 1364 uploadOptions: _uploadOptions,
1342 uploadOptions: _uploadOptions, 1365 uploadMedia: _uploadMedia,
1343 uploadMedia: _uploadMedia, 1366 downloadOptions: _downloadOptions);
1344 downloadOptions: _downloadOptions);
1345 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 1367 return _response.then((data) => new ObjectAccessControl.fromJson(data));
1346 } 1368 }
1347 1369
1348 /** 1370 /// Updates a default object ACL entry on the specified bucket.
1349 * Updates a default object ACL entry on the specified bucket. 1371 ///
1350 * 1372 /// [request] - The metadata request object.
1351 * [request] - The metadata request object. 1373 ///
1352 * 1374 /// Request parameters:
1353 * Request parameters: 1375 ///
1354 * 1376 /// [bucket] - Name of a bucket.
1355 * [bucket] - Name of a bucket. 1377 ///
1356 * 1378 /// [entity] - The entity holding the permission. Can be user-userId,
1357 * [entity] - The entity holding the permission. Can be user-userId, 1379 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1358 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1380 /// allAuthenticatedUsers.
1359 * allAuthenticatedUsers. 1381 ///
1360 * 1382 /// [userProject] - The project to be billed for this request, for Requester
1361 * [userProject] - The project to be billed for this request, for Requester 1383 /// Pays buckets.
1362 * Pays buckets. 1384 ///
1363 * 1385 /// Completes with a [ObjectAccessControl].
1364 * Completes with a [ObjectAccessControl]. 1386 ///
1365 * 1387 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1388 /// an error.
1367 * error. 1389 ///
1368 * 1390 /// If the used [http.Client] completes with an error when making a REST
1369 * If the used [http.Client] completes with an error when making a REST call, 1391 /// call, this method will complete with the same error.
1370 * this method will complete with the same error. 1392 async.Future<ObjectAccessControl> update(
1371 */ 1393 ObjectAccessControl request, core.String bucket, core.String entity,
1372 async.Future<ObjectAccessControl> update(ObjectAccessControl request, core.Str ing bucket, core.String entity, {core.String userProject}) { 1394 {core.String userProject}) {
1373 var _url = null; 1395 var _url = null;
1374 var _queryParams = new core.Map(); 1396 var _queryParams = new core.Map();
1375 var _uploadMedia = null; 1397 var _uploadMedia = null;
1376 var _uploadOptions = null; 1398 var _uploadOptions = null;
1377 var _downloadOptions = commons.DownloadOptions.Metadata; 1399 var _downloadOptions = commons.DownloadOptions.Metadata;
1378 var _body = null; 1400 var _body = null;
1379 1401
1380 if (request != null) { 1402 if (request != null) {
1381 _body = convert.JSON.encode((request).toJson()); 1403 _body = convert.JSON.encode((request).toJson());
1382 } 1404 }
1383 if (bucket == null) { 1405 if (bucket == null) {
1384 throw new core.ArgumentError("Parameter bucket is required."); 1406 throw new core.ArgumentError("Parameter bucket is required.");
1385 } 1407 }
1386 if (entity == null) { 1408 if (entity == null) {
1387 throw new core.ArgumentError("Parameter entity is required."); 1409 throw new core.ArgumentError("Parameter entity is required.");
1388 } 1410 }
1389 if (userProject != null) { 1411 if (userProject != null) {
1390 _queryParams["userProject"] = [userProject]; 1412 _queryParams["userProject"] = [userProject];
1391 } 1413 }
1392 1414
1393 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/ ' + commons.Escaper.ecapeVariable('$entity'); 1415 _url = 'b/' +
1416 commons.Escaper.ecapeVariable('$bucket') +
1417 '/defaultObjectAcl/' +
1418 commons.Escaper.ecapeVariable('$entity');
1394 1419
1395 var _response = _requester.request(_url, 1420 var _response = _requester.request(_url, "PUT",
1396 "PUT", 1421 body: _body,
1397 body: _body, 1422 queryParams: _queryParams,
1398 queryParams: _queryParams, 1423 uploadOptions: _uploadOptions,
1399 uploadOptions: _uploadOptions, 1424 uploadMedia: _uploadMedia,
1400 uploadMedia: _uploadMedia, 1425 downloadOptions: _downloadOptions);
1401 downloadOptions: _downloadOptions);
1402 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 1426 return _response.then((data) => new ObjectAccessControl.fromJson(data));
1403 } 1427 }
1404
1405 } 1428 }
1406 1429
1407
1408 class NotificationsResourceApi { 1430 class NotificationsResourceApi {
1409 final commons.ApiRequester _requester; 1431 final commons.ApiRequester _requester;
1410 1432
1411 NotificationsResourceApi(commons.ApiRequester client) : 1433 NotificationsResourceApi(commons.ApiRequester client) : _requester = client;
1412 _requester = client;
1413 1434
1414 /** 1435 /// Permanently deletes a notification subscription.
1415 * Permanently deletes a notification subscription. 1436 ///
1416 * 1437 /// Request parameters:
1417 * Request parameters: 1438 ///
1418 * 1439 /// [bucket] - The parent bucket of the notification.
1419 * [bucket] - The parent bucket of the notification. 1440 ///
1420 * 1441 /// [notification] - ID of the notification to delete.
1421 * [notification] - ID of the notification to delete. 1442 ///
1422 * 1443 /// [userProject] - The project to be billed for this request, for Requester
1423 * [userProject] - The project to be billed for this request, for Requester 1444 /// Pays buckets.
1424 * Pays buckets. 1445 ///
1425 * 1446 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1426 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1447 /// an error.
1427 * error. 1448 ///
1428 * 1449 /// If the used [http.Client] completes with an error when making a REST
1429 * If the used [http.Client] completes with an error when making a REST call, 1450 /// call, this method will complete with the same error.
1430 * this method will complete with the same error. 1451 async.Future delete(core.String bucket, core.String notification,
1431 */ 1452 {core.String userProject}) {
1432 async.Future delete(core.String bucket, core.String notification, {core.String userProject}) {
1433 var _url = null; 1453 var _url = null;
1434 var _queryParams = new core.Map(); 1454 var _queryParams = new core.Map();
1435 var _uploadMedia = null; 1455 var _uploadMedia = null;
1436 var _uploadOptions = null; 1456 var _uploadOptions = null;
1437 var _downloadOptions = commons.DownloadOptions.Metadata; 1457 var _downloadOptions = commons.DownloadOptions.Metadata;
1438 var _body = null; 1458 var _body = null;
1439 1459
1440 if (bucket == null) { 1460 if (bucket == null) {
1441 throw new core.ArgumentError("Parameter bucket is required."); 1461 throw new core.ArgumentError("Parameter bucket is required.");
1442 } 1462 }
1443 if (notification == null) { 1463 if (notification == null) {
1444 throw new core.ArgumentError("Parameter notification is required."); 1464 throw new core.ArgumentError("Parameter notification is required.");
1445 } 1465 }
1446 if (userProject != null) { 1466 if (userProject != null) {
1447 _queryParams["userProject"] = [userProject]; 1467 _queryParams["userProject"] = [userProject];
1448 } 1468 }
1449 1469
1450 _downloadOptions = null; 1470 _downloadOptions = null;
1451 1471
1452 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/notificationConfi gs/' + commons.Escaper.ecapeVariable('$notification'); 1472 _url = 'b/' +
1473 commons.Escaper.ecapeVariable('$bucket') +
1474 '/notificationConfigs/' +
1475 commons.Escaper.ecapeVariable('$notification');
1453 1476
1454 var _response = _requester.request(_url, 1477 var _response = _requester.request(_url, "DELETE",
1455 "DELETE", 1478 body: _body,
1456 body: _body, 1479 queryParams: _queryParams,
1457 queryParams: _queryParams, 1480 uploadOptions: _uploadOptions,
1458 uploadOptions: _uploadOptions, 1481 uploadMedia: _uploadMedia,
1459 uploadMedia: _uploadMedia, 1482 downloadOptions: _downloadOptions);
1460 downloadOptions: _downloadOptions);
1461 return _response.then((data) => null); 1483 return _response.then((data) => null);
1462 } 1484 }
1463 1485
1464 /** 1486 /// View a notification configuration.
1465 * View a notification configuration. 1487 ///
1466 * 1488 /// Request parameters:
1467 * Request parameters: 1489 ///
1468 * 1490 /// [bucket] - The parent bucket of the notification.
1469 * [bucket] - The parent bucket of the notification. 1491 ///
1470 * 1492 /// [notification] - Notification ID
1471 * [notification] - Notification ID 1493 ///
1472 * 1494 /// [userProject] - The project to be billed for this request, for Requester
1473 * [userProject] - The project to be billed for this request, for Requester 1495 /// Pays buckets.
1474 * Pays buckets. 1496 ///
1475 * 1497 /// Completes with a [Notification].
1476 * Completes with a [Notification]. 1498 ///
1477 * 1499 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1478 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1500 /// an error.
1479 * error. 1501 ///
1480 * 1502 /// If the used [http.Client] completes with an error when making a REST
1481 * If the used [http.Client] completes with an error when making a REST call, 1503 /// call, this method will complete with the same error.
1482 * this method will complete with the same error. 1504 async.Future<Notification> get(core.String bucket, core.String notification,
1483 */ 1505 {core.String userProject}) {
1484 async.Future<Notification> get(core.String bucket, core.String notification, { core.String userProject}) {
1485 var _url = null; 1506 var _url = null;
1486 var _queryParams = new core.Map(); 1507 var _queryParams = new core.Map();
1487 var _uploadMedia = null; 1508 var _uploadMedia = null;
1488 var _uploadOptions = null; 1509 var _uploadOptions = null;
1489 var _downloadOptions = commons.DownloadOptions.Metadata; 1510 var _downloadOptions = commons.DownloadOptions.Metadata;
1490 var _body = null; 1511 var _body = null;
1491 1512
1492 if (bucket == null) { 1513 if (bucket == null) {
1493 throw new core.ArgumentError("Parameter bucket is required."); 1514 throw new core.ArgumentError("Parameter bucket is required.");
1494 } 1515 }
1495 if (notification == null) { 1516 if (notification == null) {
1496 throw new core.ArgumentError("Parameter notification is required."); 1517 throw new core.ArgumentError("Parameter notification is required.");
1497 } 1518 }
1498 if (userProject != null) { 1519 if (userProject != null) {
1499 _queryParams["userProject"] = [userProject]; 1520 _queryParams["userProject"] = [userProject];
1500 } 1521 }
1501 1522
1502 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/notificationConfi gs/' + commons.Escaper.ecapeVariable('$notification'); 1523 _url = 'b/' +
1524 commons.Escaper.ecapeVariable('$bucket') +
1525 '/notificationConfigs/' +
1526 commons.Escaper.ecapeVariable('$notification');
1503 1527
1504 var _response = _requester.request(_url, 1528 var _response = _requester.request(_url, "GET",
1505 "GET", 1529 body: _body,
1506 body: _body, 1530 queryParams: _queryParams,
1507 queryParams: _queryParams, 1531 uploadOptions: _uploadOptions,
1508 uploadOptions: _uploadOptions, 1532 uploadMedia: _uploadMedia,
1509 uploadMedia: _uploadMedia, 1533 downloadOptions: _downloadOptions);
1510 downloadOptions: _downloadOptions);
1511 return _response.then((data) => new Notification.fromJson(data)); 1534 return _response.then((data) => new Notification.fromJson(data));
1512 } 1535 }
1513 1536
1514 /** 1537 /// Creates a notification subscription for a given bucket.
1515 * Creates a notification subscription for a given bucket. 1538 ///
1516 * 1539 /// [request] - The metadata request object.
1517 * [request] - The metadata request object. 1540 ///
1518 * 1541 /// Request parameters:
1519 * Request parameters: 1542 ///
1520 * 1543 /// [bucket] - The parent bucket of the notification.
1521 * [bucket] - The parent bucket of the notification. 1544 ///
1522 * 1545 /// [userProject] - The project to be billed for this request, for Requester
1523 * [userProject] - The project to be billed for this request, for Requester 1546 /// Pays buckets.
1524 * Pays buckets. 1547 ///
1525 * 1548 /// Completes with a [Notification].
1526 * Completes with a [Notification]. 1549 ///
1527 * 1550 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1528 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1551 /// an error.
1529 * error. 1552 ///
1530 * 1553 /// If the used [http.Client] completes with an error when making a REST
1531 * If the used [http.Client] completes with an error when making a REST call, 1554 /// call, this method will complete with the same error.
1532 * this method will complete with the same error. 1555 async.Future<Notification> insert(Notification request, core.String bucket,
1533 */ 1556 {core.String userProject}) {
1534 async.Future<Notification> insert(Notification request, core.String bucket, {c ore.String userProject}) {
1535 var _url = null; 1557 var _url = null;
1536 var _queryParams = new core.Map(); 1558 var _queryParams = new core.Map();
1537 var _uploadMedia = null; 1559 var _uploadMedia = null;
1538 var _uploadOptions = null; 1560 var _uploadOptions = null;
1539 var _downloadOptions = commons.DownloadOptions.Metadata; 1561 var _downloadOptions = commons.DownloadOptions.Metadata;
1540 var _body = null; 1562 var _body = null;
1541 1563
1542 if (request != null) { 1564 if (request != null) {
1543 _body = convert.JSON.encode((request).toJson()); 1565 _body = convert.JSON.encode((request).toJson());
1544 } 1566 }
1545 if (bucket == null) { 1567 if (bucket == null) {
1546 throw new core.ArgumentError("Parameter bucket is required."); 1568 throw new core.ArgumentError("Parameter bucket is required.");
1547 } 1569 }
1548 if (userProject != null) { 1570 if (userProject != null) {
1549 _queryParams["userProject"] = [userProject]; 1571 _queryParams["userProject"] = [userProject];
1550 } 1572 }
1551 1573
1552 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/notificationConfi gs'; 1574 _url = 'b/' +
1575 commons.Escaper.ecapeVariable('$bucket') +
1576 '/notificationConfigs';
1553 1577
1554 var _response = _requester.request(_url, 1578 var _response = _requester.request(_url, "POST",
1555 "POST", 1579 body: _body,
1556 body: _body, 1580 queryParams: _queryParams,
1557 queryParams: _queryParams, 1581 uploadOptions: _uploadOptions,
1558 uploadOptions: _uploadOptions, 1582 uploadMedia: _uploadMedia,
1559 uploadMedia: _uploadMedia, 1583 downloadOptions: _downloadOptions);
1560 downloadOptions: _downloadOptions);
1561 return _response.then((data) => new Notification.fromJson(data)); 1584 return _response.then((data) => new Notification.fromJson(data));
1562 } 1585 }
1563 1586
1564 /** 1587 /// Retrieves a list of notification subscriptions for a given bucket.
1565 * Retrieves a list of notification subscriptions for a given bucket. 1588 ///
1566 * 1589 /// Request parameters:
1567 * Request parameters: 1590 ///
1568 * 1591 /// [bucket] - Name of a Google Cloud Storage bucket.
1569 * [bucket] - Name of a Google Cloud Storage bucket. 1592 ///
1570 * 1593 /// [userProject] - The project to be billed for this request, for Requester
1571 * [userProject] - The project to be billed for this request, for Requester 1594 /// Pays buckets.
1572 * Pays buckets. 1595 ///
1573 * 1596 /// Completes with a [Notifications].
1574 * Completes with a [Notifications]. 1597 ///
1575 * 1598 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1576 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1599 /// an error.
1577 * error. 1600 ///
1578 * 1601 /// If the used [http.Client] completes with an error when making a REST
1579 * If the used [http.Client] completes with an error when making a REST call, 1602 /// call, this method will complete with the same error.
1580 * this method will complete with the same error. 1603 async.Future<Notifications> list(core.String bucket,
1581 */ 1604 {core.String userProject}) {
1582 async.Future<Notifications> list(core.String bucket, {core.String userProject} ) {
1583 var _url = null; 1605 var _url = null;
1584 var _queryParams = new core.Map(); 1606 var _queryParams = new core.Map();
1585 var _uploadMedia = null; 1607 var _uploadMedia = null;
1586 var _uploadOptions = null; 1608 var _uploadOptions = null;
1587 var _downloadOptions = commons.DownloadOptions.Metadata; 1609 var _downloadOptions = commons.DownloadOptions.Metadata;
1588 var _body = null; 1610 var _body = null;
1589 1611
1590 if (bucket == null) { 1612 if (bucket == null) {
1591 throw new core.ArgumentError("Parameter bucket is required."); 1613 throw new core.ArgumentError("Parameter bucket is required.");
1592 } 1614 }
1593 if (userProject != null) { 1615 if (userProject != null) {
1594 _queryParams["userProject"] = [userProject]; 1616 _queryParams["userProject"] = [userProject];
1595 } 1617 }
1596 1618
1597 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/notificationConfi gs'; 1619 _url = 'b/' +
1620 commons.Escaper.ecapeVariable('$bucket') +
1621 '/notificationConfigs';
1598 1622
1599 var _response = _requester.request(_url, 1623 var _response = _requester.request(_url, "GET",
1600 "GET", 1624 body: _body,
1601 body: _body, 1625 queryParams: _queryParams,
1602 queryParams: _queryParams, 1626 uploadOptions: _uploadOptions,
1603 uploadOptions: _uploadOptions, 1627 uploadMedia: _uploadMedia,
1604 uploadMedia: _uploadMedia, 1628 downloadOptions: _downloadOptions);
1605 downloadOptions: _downloadOptions);
1606 return _response.then((data) => new Notifications.fromJson(data)); 1629 return _response.then((data) => new Notifications.fromJson(data));
1607 } 1630 }
1608
1609 } 1631 }
1610 1632
1611
1612 class ObjectAccessControlsResourceApi { 1633 class ObjectAccessControlsResourceApi {
1613 final commons.ApiRequester _requester; 1634 final commons.ApiRequester _requester;
1614 1635
1615 ObjectAccessControlsResourceApi(commons.ApiRequester client) : 1636 ObjectAccessControlsResourceApi(commons.ApiRequester client)
1616 _requester = client; 1637 : _requester = client;
1617 1638
1618 /** 1639 /// Permanently deletes the ACL entry for the specified entity on the
1619 * Permanently deletes the ACL entry for the specified entity on the specified 1640 /// specified object.
1620 * object. 1641 ///
1621 * 1642 /// Request parameters:
1622 * Request parameters: 1643 ///
1623 * 1644 /// [bucket] - Name of a bucket.
1624 * [bucket] - Name of a bucket. 1645 ///
1625 * 1646 /// [object] - Name of the object. For information about how to URL encode
1626 * [object] - Name of the object. For information about how to URL encode 1647 /// object names to be path safe, see Encoding URI Path Parts.
1627 * object names to be path safe, see Encoding URI Path Parts. 1648 ///
1628 * 1649 /// [entity] - The entity holding the permission. Can be user-userId,
1629 * [entity] - The entity holding the permission. Can be user-userId, 1650 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1630 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1651 /// allAuthenticatedUsers.
1631 * allAuthenticatedUsers. 1652 ///
1632 * 1653 /// [generation] - If present, selects a specific revision of this object (as
1633 * [generation] - If present, selects a specific revision of this object (as 1654 /// opposed to the latest version, the default).
1634 * opposed to the latest version, the default). 1655 ///
1635 * 1656 /// [userProject] - The project to be billed for this request, for Requester
1636 * [userProject] - The project to be billed for this request, for Requester 1657 /// Pays buckets.
1637 * Pays buckets. 1658 ///
1638 * 1659 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1639 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1660 /// an error.
1640 * error. 1661 ///
1641 * 1662 /// If the used [http.Client] completes with an error when making a REST
1642 * If the used [http.Client] completes with an error when making a REST call, 1663 /// call, this method will complete with the same error.
1643 * this method will complete with the same error. 1664 async.Future delete(
1644 */ 1665 core.String bucket, core.String object, core.String entity,
1645 async.Future delete(core.String bucket, core.String object, core.String entity , {core.String generation, core.String userProject}) { 1666 {core.String generation, core.String userProject}) {
1646 var _url = null; 1667 var _url = null;
1647 var _queryParams = new core.Map(); 1668 var _queryParams = new core.Map();
1648 var _uploadMedia = null; 1669 var _uploadMedia = null;
1649 var _uploadOptions = null; 1670 var _uploadOptions = null;
1650 var _downloadOptions = commons.DownloadOptions.Metadata; 1671 var _downloadOptions = commons.DownloadOptions.Metadata;
1651 var _body = null; 1672 var _body = null;
1652 1673
1653 if (bucket == null) { 1674 if (bucket == null) {
1654 throw new core.ArgumentError("Parameter bucket is required."); 1675 throw new core.ArgumentError("Parameter bucket is required.");
1655 } 1676 }
1656 if (object == null) { 1677 if (object == null) {
1657 throw new core.ArgumentError("Parameter object is required."); 1678 throw new core.ArgumentError("Parameter object is required.");
1658 } 1679 }
1659 if (entity == null) { 1680 if (entity == null) {
1660 throw new core.ArgumentError("Parameter entity is required."); 1681 throw new core.ArgumentError("Parameter entity is required.");
1661 } 1682 }
1662 if (generation != null) { 1683 if (generation != null) {
1663 _queryParams["generation"] = [generation]; 1684 _queryParams["generation"] = [generation];
1664 } 1685 }
1665 if (userProject != null) { 1686 if (userProject != null) {
1666 _queryParams["userProject"] = [userProject]; 1687 _queryParams["userProject"] = [userProject];
1667 } 1688 }
1668 1689
1669 _downloadOptions = null; 1690 _downloadOptions = null;
1670 1691
1671 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity '); 1692 _url = 'b/' +
1693 commons.Escaper.ecapeVariable('$bucket') +
1694 '/o/' +
1695 commons.Escaper.ecapeVariable('$object') +
1696 '/acl/' +
1697 commons.Escaper.ecapeVariable('$entity');
1672 1698
1673 var _response = _requester.request(_url, 1699 var _response = _requester.request(_url, "DELETE",
1674 "DELETE", 1700 body: _body,
1675 body: _body, 1701 queryParams: _queryParams,
1676 queryParams: _queryParams, 1702 uploadOptions: _uploadOptions,
1677 uploadOptions: _uploadOptions, 1703 uploadMedia: _uploadMedia,
1678 uploadMedia: _uploadMedia, 1704 downloadOptions: _downloadOptions);
1679 downloadOptions: _downloadOptions);
1680 return _response.then((data) => null); 1705 return _response.then((data) => null);
1681 } 1706 }
1682 1707
1683 /** 1708 /// Returns the ACL entry for the specified entity on the specified object.
1684 * Returns the ACL entry for the specified entity on the specified object. 1709 ///
1685 * 1710 /// Request parameters:
1686 * Request parameters: 1711 ///
1687 * 1712 /// [bucket] - Name of a bucket.
1688 * [bucket] - Name of a bucket. 1713 ///
1689 * 1714 /// [object] - Name of the object. For information about how to URL encode
1690 * [object] - Name of the object. For information about how to URL encode 1715 /// object names to be path safe, see Encoding URI Path Parts.
1691 * object names to be path safe, see Encoding URI Path Parts. 1716 ///
1692 * 1717 /// [entity] - The entity holding the permission. Can be user-userId,
1693 * [entity] - The entity holding the permission. Can be user-userId, 1718 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1694 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1719 /// allAuthenticatedUsers.
1695 * allAuthenticatedUsers. 1720 ///
1696 * 1721 /// [generation] - If present, selects a specific revision of this object (as
1697 * [generation] - If present, selects a specific revision of this object (as 1722 /// opposed to the latest version, the default).
1698 * opposed to the latest version, the default). 1723 ///
1699 * 1724 /// [userProject] - The project to be billed for this request, for Requester
1700 * [userProject] - The project to be billed for this request, for Requester 1725 /// Pays buckets.
1701 * Pays buckets. 1726 ///
1702 * 1727 /// Completes with a [ObjectAccessControl].
1703 * Completes with a [ObjectAccessControl]. 1728 ///
1704 * 1729 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1705 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1730 /// an error.
1706 * error. 1731 ///
1707 * 1732 /// If the used [http.Client] completes with an error when making a REST
1708 * If the used [http.Client] completes with an error when making a REST call, 1733 /// call, this method will complete with the same error.
1709 * this method will complete with the same error. 1734 async.Future<ObjectAccessControl> get(
1710 */ 1735 core.String bucket, core.String object, core.String entity,
1711 async.Future<ObjectAccessControl> get(core.String bucket, core.String object, core.String entity, {core.String generation, core.String userProject}) { 1736 {core.String generation, core.String userProject}) {
1712 var _url = null; 1737 var _url = null;
1713 var _queryParams = new core.Map(); 1738 var _queryParams = new core.Map();
1714 var _uploadMedia = null; 1739 var _uploadMedia = null;
1715 var _uploadOptions = null; 1740 var _uploadOptions = null;
1716 var _downloadOptions = commons.DownloadOptions.Metadata; 1741 var _downloadOptions = commons.DownloadOptions.Metadata;
1717 var _body = null; 1742 var _body = null;
1718 1743
1719 if (bucket == null) { 1744 if (bucket == null) {
1720 throw new core.ArgumentError("Parameter bucket is required."); 1745 throw new core.ArgumentError("Parameter bucket is required.");
1721 } 1746 }
1722 if (object == null) { 1747 if (object == null) {
1723 throw new core.ArgumentError("Parameter object is required."); 1748 throw new core.ArgumentError("Parameter object is required.");
1724 } 1749 }
1725 if (entity == null) { 1750 if (entity == null) {
1726 throw new core.ArgumentError("Parameter entity is required."); 1751 throw new core.ArgumentError("Parameter entity is required.");
1727 } 1752 }
1728 if (generation != null) { 1753 if (generation != null) {
1729 _queryParams["generation"] = [generation]; 1754 _queryParams["generation"] = [generation];
1730 } 1755 }
1731 if (userProject != null) { 1756 if (userProject != null) {
1732 _queryParams["userProject"] = [userProject]; 1757 _queryParams["userProject"] = [userProject];
1733 } 1758 }
1734 1759
1735 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity '); 1760 _url = 'b/' +
1761 commons.Escaper.ecapeVariable('$bucket') +
1762 '/o/' +
1763 commons.Escaper.ecapeVariable('$object') +
1764 '/acl/' +
1765 commons.Escaper.ecapeVariable('$entity');
1736 1766
1737 var _response = _requester.request(_url, 1767 var _response = _requester.request(_url, "GET",
1738 "GET", 1768 body: _body,
1739 body: _body, 1769 queryParams: _queryParams,
1740 queryParams: _queryParams, 1770 uploadOptions: _uploadOptions,
1741 uploadOptions: _uploadOptions, 1771 uploadMedia: _uploadMedia,
1742 uploadMedia: _uploadMedia, 1772 downloadOptions: _downloadOptions);
1743 downloadOptions: _downloadOptions);
1744 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 1773 return _response.then((data) => new ObjectAccessControl.fromJson(data));
1745 } 1774 }
1746 1775
1747 /** 1776 /// Creates a new ACL entry on the specified object.
1748 * Creates a new ACL entry on the specified object. 1777 ///
1749 * 1778 /// [request] - The metadata request object.
1750 * [request] - The metadata request object. 1779 ///
1751 * 1780 /// Request parameters:
1752 * Request parameters: 1781 ///
1753 * 1782 /// [bucket] - Name of a bucket.
1754 * [bucket] - Name of a bucket. 1783 ///
1755 * 1784 /// [object] - Name of the object. For information about how to URL encode
1756 * [object] - Name of the object. For information about how to URL encode 1785 /// object names to be path safe, see Encoding URI Path Parts.
1757 * object names to be path safe, see Encoding URI Path Parts. 1786 ///
1758 * 1787 /// [generation] - If present, selects a specific revision of this object (as
1759 * [generation] - If present, selects a specific revision of this object (as 1788 /// opposed to the latest version, the default).
1760 * opposed to the latest version, the default). 1789 ///
1761 * 1790 /// [userProject] - The project to be billed for this request, for Requester
1762 * [userProject] - The project to be billed for this request, for Requester 1791 /// Pays buckets.
1763 * Pays buckets. 1792 ///
1764 * 1793 /// Completes with a [ObjectAccessControl].
1765 * Completes with a [ObjectAccessControl]. 1794 ///
1766 * 1795 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1767 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1796 /// an error.
1768 * error. 1797 ///
1769 * 1798 /// If the used [http.Client] completes with an error when making a REST
1770 * If the used [http.Client] completes with an error when making a REST call, 1799 /// call, this method will complete with the same error.
1771 * this method will complete with the same error. 1800 async.Future<ObjectAccessControl> insert(
1772 */ 1801 ObjectAccessControl request, core.String bucket, core.String object,
1773 async.Future<ObjectAccessControl> insert(ObjectAccessControl request, core.Str ing bucket, core.String object, {core.String generation, core.String userProject }) { 1802 {core.String generation, core.String userProject}) {
1774 var _url = null; 1803 var _url = null;
1775 var _queryParams = new core.Map(); 1804 var _queryParams = new core.Map();
1776 var _uploadMedia = null; 1805 var _uploadMedia = null;
1777 var _uploadOptions = null; 1806 var _uploadOptions = null;
1778 var _downloadOptions = commons.DownloadOptions.Metadata; 1807 var _downloadOptions = commons.DownloadOptions.Metadata;
1779 var _body = null; 1808 var _body = null;
1780 1809
1781 if (request != null) { 1810 if (request != null) {
1782 _body = convert.JSON.encode((request).toJson()); 1811 _body = convert.JSON.encode((request).toJson());
1783 } 1812 }
1784 if (bucket == null) { 1813 if (bucket == null) {
1785 throw new core.ArgumentError("Parameter bucket is required."); 1814 throw new core.ArgumentError("Parameter bucket is required.");
1786 } 1815 }
1787 if (object == null) { 1816 if (object == null) {
1788 throw new core.ArgumentError("Parameter object is required."); 1817 throw new core.ArgumentError("Parameter object is required.");
1789 } 1818 }
1790 if (generation != null) { 1819 if (generation != null) {
1791 _queryParams["generation"] = [generation]; 1820 _queryParams["generation"] = [generation];
1792 } 1821 }
1793 if (userProject != null) { 1822 if (userProject != null) {
1794 _queryParams["userProject"] = [userProject]; 1823 _queryParams["userProject"] = [userProject];
1795 } 1824 }
1796 1825
1797 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/acl'; 1826 _url = 'b/' +
1827 commons.Escaper.ecapeVariable('$bucket') +
1828 '/o/' +
1829 commons.Escaper.ecapeVariable('$object') +
1830 '/acl';
1798 1831
1799 var _response = _requester.request(_url, 1832 var _response = _requester.request(_url, "POST",
1800 "POST", 1833 body: _body,
1801 body: _body, 1834 queryParams: _queryParams,
1802 queryParams: _queryParams, 1835 uploadOptions: _uploadOptions,
1803 uploadOptions: _uploadOptions, 1836 uploadMedia: _uploadMedia,
1804 uploadMedia: _uploadMedia, 1837 downloadOptions: _downloadOptions);
1805 downloadOptions: _downloadOptions);
1806 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 1838 return _response.then((data) => new ObjectAccessControl.fromJson(data));
1807 } 1839 }
1808 1840
1809 /** 1841 /// Retrieves ACL entries on the specified object.
1810 * Retrieves ACL entries on the specified object. 1842 ///
1811 * 1843 /// Request parameters:
1812 * Request parameters: 1844 ///
1813 * 1845 /// [bucket] - Name of a bucket.
1814 * [bucket] - Name of a bucket. 1846 ///
1815 * 1847 /// [object] - Name of the object. For information about how to URL encode
1816 * [object] - Name of the object. For information about how to URL encode 1848 /// object names to be path safe, see Encoding URI Path Parts.
1817 * object names to be path safe, see Encoding URI Path Parts. 1849 ///
1818 * 1850 /// [generation] - If present, selects a specific revision of this object (as
1819 * [generation] - If present, selects a specific revision of this object (as 1851 /// opposed to the latest version, the default).
1820 * opposed to the latest version, the default). 1852 ///
1821 * 1853 /// [userProject] - The project to be billed for this request, for Requester
1822 * [userProject] - The project to be billed for this request, for Requester 1854 /// Pays buckets.
1823 * Pays buckets. 1855 ///
1824 * 1856 /// Completes with a [ObjectAccessControls].
1825 * Completes with a [ObjectAccessControls]. 1857 ///
1826 * 1858 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1827 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1859 /// an error.
1828 * error. 1860 ///
1829 * 1861 /// If the used [http.Client] completes with an error when making a REST
1830 * If the used [http.Client] completes with an error when making a REST call, 1862 /// call, this method will complete with the same error.
1831 * this method will complete with the same error. 1863 async.Future<ObjectAccessControls> list(
1832 */ 1864 core.String bucket, core.String object,
1833 async.Future<ObjectAccessControls> list(core.String bucket, core.String object , {core.String generation, core.String userProject}) { 1865 {core.String generation, core.String userProject}) {
1834 var _url = null; 1866 var _url = null;
1835 var _queryParams = new core.Map(); 1867 var _queryParams = new core.Map();
1836 var _uploadMedia = null; 1868 var _uploadMedia = null;
1837 var _uploadOptions = null; 1869 var _uploadOptions = null;
1838 var _downloadOptions = commons.DownloadOptions.Metadata; 1870 var _downloadOptions = commons.DownloadOptions.Metadata;
1839 var _body = null; 1871 var _body = null;
1840 1872
1841 if (bucket == null) { 1873 if (bucket == null) {
1842 throw new core.ArgumentError("Parameter bucket is required."); 1874 throw new core.ArgumentError("Parameter bucket is required.");
1843 } 1875 }
1844 if (object == null) { 1876 if (object == null) {
1845 throw new core.ArgumentError("Parameter object is required."); 1877 throw new core.ArgumentError("Parameter object is required.");
1846 } 1878 }
1847 if (generation != null) { 1879 if (generation != null) {
1848 _queryParams["generation"] = [generation]; 1880 _queryParams["generation"] = [generation];
1849 } 1881 }
1850 if (userProject != null) { 1882 if (userProject != null) {
1851 _queryParams["userProject"] = [userProject]; 1883 _queryParams["userProject"] = [userProject];
1852 } 1884 }
1853 1885
1854 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/acl'; 1886 _url = 'b/' +
1887 commons.Escaper.ecapeVariable('$bucket') +
1888 '/o/' +
1889 commons.Escaper.ecapeVariable('$object') +
1890 '/acl';
1855 1891
1856 var _response = _requester.request(_url, 1892 var _response = _requester.request(_url, "GET",
1857 "GET", 1893 body: _body,
1858 body: _body, 1894 queryParams: _queryParams,
1859 queryParams: _queryParams, 1895 uploadOptions: _uploadOptions,
1860 uploadOptions: _uploadOptions, 1896 uploadMedia: _uploadMedia,
1861 uploadMedia: _uploadMedia, 1897 downloadOptions: _downloadOptions);
1862 downloadOptions: _downloadOptions);
1863 return _response.then((data) => new ObjectAccessControls.fromJson(data)); 1898 return _response.then((data) => new ObjectAccessControls.fromJson(data));
1864 } 1899 }
1865 1900
1866 /** 1901 /// Updates an ACL entry on the specified object. This method supports patch
1867 * Updates an ACL entry on the specified object. This method supports patch 1902 /// semantics.
1868 * semantics. 1903 ///
1869 * 1904 /// [request] - The metadata request object.
1870 * [request] - The metadata request object. 1905 ///
1871 * 1906 /// Request parameters:
1872 * Request parameters: 1907 ///
1873 * 1908 /// [bucket] - Name of a bucket.
1874 * [bucket] - Name of a bucket. 1909 ///
1875 * 1910 /// [object] - Name of the object. For information about how to URL encode
1876 * [object] - Name of the object. For information about how to URL encode 1911 /// object names to be path safe, see Encoding URI Path Parts.
1877 * object names to be path safe, see Encoding URI Path Parts. 1912 ///
1878 * 1913 /// [entity] - The entity holding the permission. Can be user-userId,
1879 * [entity] - The entity holding the permission. Can be user-userId, 1914 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1880 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1915 /// allAuthenticatedUsers.
1881 * allAuthenticatedUsers. 1916 ///
1882 * 1917 /// [generation] - If present, selects a specific revision of this object (as
1883 * [generation] - If present, selects a specific revision of this object (as 1918 /// opposed to the latest version, the default).
1884 * opposed to the latest version, the default). 1919 ///
1885 * 1920 /// [userProject] - The project to be billed for this request, for Requester
1886 * [userProject] - The project to be billed for this request, for Requester 1921 /// Pays buckets.
1887 * Pays buckets. 1922 ///
1888 * 1923 /// Completes with a [ObjectAccessControl].
1889 * Completes with a [ObjectAccessControl]. 1924 ///
1890 * 1925 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1891 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1926 /// an error.
1892 * error. 1927 ///
1893 * 1928 /// If the used [http.Client] completes with an error when making a REST
1894 * If the used [http.Client] completes with an error when making a REST call, 1929 /// call, this method will complete with the same error.
1895 * this method will complete with the same error. 1930 async.Future<ObjectAccessControl> patch(ObjectAccessControl request,
1896 */ 1931 core.String bucket, core.String object, core.String entity,
1897 async.Future<ObjectAccessControl> patch(ObjectAccessControl request, core.Stri ng bucket, core.String object, core.String entity, {core.String generation, core .String userProject}) { 1932 {core.String generation, core.String userProject}) {
1898 var _url = null; 1933 var _url = null;
1899 var _queryParams = new core.Map(); 1934 var _queryParams = new core.Map();
1900 var _uploadMedia = null; 1935 var _uploadMedia = null;
1901 var _uploadOptions = null; 1936 var _uploadOptions = null;
1902 var _downloadOptions = commons.DownloadOptions.Metadata; 1937 var _downloadOptions = commons.DownloadOptions.Metadata;
1903 var _body = null; 1938 var _body = null;
1904 1939
1905 if (request != null) { 1940 if (request != null) {
1906 _body = convert.JSON.encode((request).toJson()); 1941 _body = convert.JSON.encode((request).toJson());
1907 } 1942 }
1908 if (bucket == null) { 1943 if (bucket == null) {
1909 throw new core.ArgumentError("Parameter bucket is required."); 1944 throw new core.ArgumentError("Parameter bucket is required.");
1910 } 1945 }
1911 if (object == null) { 1946 if (object == null) {
1912 throw new core.ArgumentError("Parameter object is required."); 1947 throw new core.ArgumentError("Parameter object is required.");
1913 } 1948 }
1914 if (entity == null) { 1949 if (entity == null) {
1915 throw new core.ArgumentError("Parameter entity is required."); 1950 throw new core.ArgumentError("Parameter entity is required.");
1916 } 1951 }
1917 if (generation != null) { 1952 if (generation != null) {
1918 _queryParams["generation"] = [generation]; 1953 _queryParams["generation"] = [generation];
1919 } 1954 }
1920 if (userProject != null) { 1955 if (userProject != null) {
1921 _queryParams["userProject"] = [userProject]; 1956 _queryParams["userProject"] = [userProject];
1922 } 1957 }
1923 1958
1924 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity '); 1959 _url = 'b/' +
1960 commons.Escaper.ecapeVariable('$bucket') +
1961 '/o/' +
1962 commons.Escaper.ecapeVariable('$object') +
1963 '/acl/' +
1964 commons.Escaper.ecapeVariable('$entity');
1925 1965
1926 var _response = _requester.request(_url, 1966 var _response = _requester.request(_url, "PATCH",
1927 "PATCH", 1967 body: _body,
1928 body: _body, 1968 queryParams: _queryParams,
1929 queryParams: _queryParams, 1969 uploadOptions: _uploadOptions,
1930 uploadOptions: _uploadOptions, 1970 uploadMedia: _uploadMedia,
1931 uploadMedia: _uploadMedia, 1971 downloadOptions: _downloadOptions);
1932 downloadOptions: _downloadOptions);
1933 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 1972 return _response.then((data) => new ObjectAccessControl.fromJson(data));
1934 } 1973 }
1935 1974
1936 /** 1975 /// Updates an ACL entry on the specified object.
1937 * Updates an ACL entry on the specified object. 1976 ///
1938 * 1977 /// [request] - The metadata request object.
1939 * [request] - The metadata request object. 1978 ///
1940 * 1979 /// Request parameters:
1941 * Request parameters: 1980 ///
1942 * 1981 /// [bucket] - Name of a bucket.
1943 * [bucket] - Name of a bucket. 1982 ///
1944 * 1983 /// [object] - Name of the object. For information about how to URL encode
1945 * [object] - Name of the object. For information about how to URL encode 1984 /// object names to be path safe, see Encoding URI Path Parts.
1946 * object names to be path safe, see Encoding URI Path Parts. 1985 ///
1947 * 1986 /// [entity] - The entity holding the permission. Can be user-userId,
1948 * [entity] - The entity holding the permission. Can be user-userId, 1987 /// user-emailAddress, group-groupId, group-emailAddress, allUsers, or
1949 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or 1988 /// allAuthenticatedUsers.
1950 * allAuthenticatedUsers. 1989 ///
1951 * 1990 /// [generation] - If present, selects a specific revision of this object (as
1952 * [generation] - If present, selects a specific revision of this object (as 1991 /// opposed to the latest version, the default).
1953 * opposed to the latest version, the default). 1992 ///
1954 * 1993 /// [userProject] - The project to be billed for this request, for Requester
1955 * [userProject] - The project to be billed for this request, for Requester 1994 /// Pays buckets.
1956 * Pays buckets. 1995 ///
1957 * 1996 /// Completes with a [ObjectAccessControl].
1958 * Completes with a [ObjectAccessControl]. 1997 ///
1959 * 1998 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1999 /// an error.
1961 * error. 2000 ///
1962 * 2001 /// If the used [http.Client] completes with an error when making a REST
1963 * If the used [http.Client] completes with an error when making a REST call, 2002 /// call, this method will complete with the same error.
1964 * this method will complete with the same error. 2003 async.Future<ObjectAccessControl> update(ObjectAccessControl request,
1965 */ 2004 core.String bucket, core.String object, core.String entity,
1966 async.Future<ObjectAccessControl> update(ObjectAccessControl request, core.Str ing bucket, core.String object, core.String entity, {core.String generation, cor e.String userProject}) { 2005 {core.String generation, core.String userProject}) {
1967 var _url = null; 2006 var _url = null;
1968 var _queryParams = new core.Map(); 2007 var _queryParams = new core.Map();
1969 var _uploadMedia = null; 2008 var _uploadMedia = null;
1970 var _uploadOptions = null; 2009 var _uploadOptions = null;
1971 var _downloadOptions = commons.DownloadOptions.Metadata; 2010 var _downloadOptions = commons.DownloadOptions.Metadata;
1972 var _body = null; 2011 var _body = null;
1973 2012
1974 if (request != null) { 2013 if (request != null) {
1975 _body = convert.JSON.encode((request).toJson()); 2014 _body = convert.JSON.encode((request).toJson());
1976 } 2015 }
1977 if (bucket == null) { 2016 if (bucket == null) {
1978 throw new core.ArgumentError("Parameter bucket is required."); 2017 throw new core.ArgumentError("Parameter bucket is required.");
1979 } 2018 }
1980 if (object == null) { 2019 if (object == null) {
1981 throw new core.ArgumentError("Parameter object is required."); 2020 throw new core.ArgumentError("Parameter object is required.");
1982 } 2021 }
1983 if (entity == null) { 2022 if (entity == null) {
1984 throw new core.ArgumentError("Parameter entity is required."); 2023 throw new core.ArgumentError("Parameter entity is required.");
1985 } 2024 }
1986 if (generation != null) { 2025 if (generation != null) {
1987 _queryParams["generation"] = [generation]; 2026 _queryParams["generation"] = [generation];
1988 } 2027 }
1989 if (userProject != null) { 2028 if (userProject != null) {
1990 _queryParams["userProject"] = [userProject]; 2029 _queryParams["userProject"] = [userProject];
1991 } 2030 }
1992 2031
1993 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity '); 2032 _url = 'b/' +
2033 commons.Escaper.ecapeVariable('$bucket') +
2034 '/o/' +
2035 commons.Escaper.ecapeVariable('$object') +
2036 '/acl/' +
2037 commons.Escaper.ecapeVariable('$entity');
1994 2038
1995 var _response = _requester.request(_url, 2039 var _response = _requester.request(_url, "PUT",
1996 "PUT", 2040 body: _body,
1997 body: _body, 2041 queryParams: _queryParams,
1998 queryParams: _queryParams, 2042 uploadOptions: _uploadOptions,
1999 uploadOptions: _uploadOptions, 2043 uploadMedia: _uploadMedia,
2000 uploadMedia: _uploadMedia, 2044 downloadOptions: _downloadOptions);
2001 downloadOptions: _downloadOptions);
2002 return _response.then((data) => new ObjectAccessControl.fromJson(data)); 2045 return _response.then((data) => new ObjectAccessControl.fromJson(data));
2003 } 2046 }
2004
2005 } 2047 }
2006 2048
2007
2008 class ObjectsResourceApi { 2049 class ObjectsResourceApi {
2009 final commons.ApiRequester _requester; 2050 final commons.ApiRequester _requester;
2010 2051
2011 ObjectsResourceApi(commons.ApiRequester client) : 2052 ObjectsResourceApi(commons.ApiRequester client) : _requester = client;
2012 _requester = client;
2013 2053
2014 /** 2054 /// Concatenates a list of existing objects into a new object in the same
2015 * Concatenates a list of existing objects into a new object in the same 2055 /// bucket.
2016 * bucket. 2056 ///
2017 * 2057 /// [request] - The metadata request object.
2018 * [request] - The metadata request object. 2058 ///
2019 * 2059 /// Request parameters:
2020 * Request parameters: 2060 ///
2021 * 2061 /// [destinationBucket] - Name of the bucket in which to store the new
2022 * [destinationBucket] - Name of the bucket in which to store the new object. 2062 /// object.
2023 * 2063 ///
2024 * [destinationObject] - Name of the new object. For information about how to 2064 /// [destinationObject] - Name of the new object. For information about how
2025 * URL encode object names to be path safe, see Encoding URI Path Parts. 2065 /// to URL encode object names to be path safe, see Encoding URI Path Parts.
2026 * 2066 ///
2027 * [destinationPredefinedAcl] - Apply a predefined set of access controls to 2067 /// [destinationPredefinedAcl] - Apply a predefined set of access controls to
2028 * the destination object. 2068 /// the destination object.
2029 * Possible string values are: 2069 /// Possible string values are:
2030 * - "authenticatedRead" : Object owner gets OWNER access, and 2070 /// - "authenticatedRead" : Object owner gets OWNER access, and
2031 * allAuthenticatedUsers get READER access. 2071 /// allAuthenticatedUsers get READER access.
2032 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 2072 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
2033 * team owners get OWNER access. 2073 /// team owners get OWNER access.
2034 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 2074 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
2035 * owners get READER access. 2075 /// owners get READER access.
2036 * - "private" : Object owner gets OWNER access. 2076 /// - "private" : Object owner gets OWNER access.
2037 * - "projectPrivate" : Object owner gets OWNER access, and project team 2077 /// - "projectPrivate" : Object owner gets OWNER access, and project team
2038 * members get access according to their roles. 2078 /// members get access according to their roles.
2039 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 2079 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
2040 * access. 2080 /// access.
2041 * 2081 ///
2042 * [ifGenerationMatch] - Makes the operation conditional on whether the 2082 /// [ifGenerationMatch] - Makes the operation conditional on whether the
2043 * object's current generation matches the given value. Setting to 0 makes the 2083 /// object's current generation matches the given value. Setting to 0 makes
2044 * operation succeed only if there are no live versions of the object. 2084 /// the operation succeed only if there are no live versions of the object.
2045 * 2085 ///
2046 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 2086 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
2047 * object's current metageneration matches the given value. 2087 /// object's current metageneration matches the given value.
2048 * 2088 ///
2049 * [kmsKeyName] - Resource name of the Cloud KMS key, of the form 2089 /// [kmsKeyName] - Resource name of the Cloud KMS key, of the form
2050 * projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that 2090 /// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key,
2051 * will be used to encrypt the object. Overrides the object metadata's 2091 /// that will be used to encrypt the object. Overrides the object metadata's
2052 * kms_key_name value, if any. 2092 /// kms_key_name value, if any.
2053 * 2093 ///
2054 * [userProject] - The project to be billed for this request, for Requester 2094 /// [userProject] - The project to be billed for this request, for Requester
2055 * Pays buckets. 2095 /// Pays buckets.
2056 * 2096 ///
2057 * [downloadOptions] - Options for downloading. A download can be either a 2097 /// [downloadOptions] - Options for downloading. A download can be either a
2058 * Metadata (default) or Media download. Partial Media downloads are possible 2098 /// Metadata (default) or Media download. Partial Media downloads are
2059 * as well. 2099 /// possible as well.
2060 * 2100 ///
2061 * Completes with a 2101 /// Completes with a
2062 * 2102 ///
2063 * - [Object] for Metadata downloads (see [downloadOptions]). 2103 /// - [Object] for Metadata downloads (see [downloadOptions]).
2064 * 2104 ///
2065 * - [commons.Media] for Media downloads (see [downloadOptions]). 2105 /// - [commons.Media] for Media downloads (see [downloadOptions]).
2066 * 2106 ///
2067 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2107 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2068 * error. 2108 /// an error.
2069 * 2109 ///
2070 * If the used [http.Client] completes with an error when making a REST call, 2110 /// If the used [http.Client] completes with an error when making a REST
2071 * this method will complete with the same error. 2111 /// call, this method will complete with the same error.
2072 */ 2112 async.Future compose(ComposeRequest request, core.String destinationBucket,
2073 async.Future compose(ComposeRequest request, core.String destinationBucket, co re.String destinationObject, {core.String destinationPredefinedAcl, core.String ifGenerationMatch, core.String ifMetagenerationMatch, core.String kmsKeyName, co re.String userProject, commons.DownloadOptions downloadOptions: commons.Download Options.Metadata}) { 2113 core.String destinationObject,
2114 {core.String destinationPredefinedAcl,
2115 core.String ifGenerationMatch,
2116 core.String ifMetagenerationMatch,
2117 core.String kmsKeyName,
2118 core.String userProject,
2119 commons.DownloadOptions downloadOptions:
2120 commons.DownloadOptions.Metadata}) {
2074 var _url = null; 2121 var _url = null;
2075 var _queryParams = new core.Map(); 2122 var _queryParams = new core.Map();
2076 var _uploadMedia = null; 2123 var _uploadMedia = null;
2077 var _uploadOptions = null; 2124 var _uploadOptions = null;
2078 var _downloadOptions = commons.DownloadOptions.Metadata; 2125 var _downloadOptions = commons.DownloadOptions.Metadata;
2079 var _body = null; 2126 var _body = null;
2080 2127
2081 if (request != null) { 2128 if (request != null) {
2082 _body = convert.JSON.encode((request).toJson()); 2129 _body = convert.JSON.encode((request).toJson());
2083 } 2130 }
(...skipping 14 matching lines...) Expand all
2098 } 2145 }
2099 if (kmsKeyName != null) { 2146 if (kmsKeyName != null) {
2100 _queryParams["kmsKeyName"] = [kmsKeyName]; 2147 _queryParams["kmsKeyName"] = [kmsKeyName];
2101 } 2148 }
2102 if (userProject != null) { 2149 if (userProject != null) {
2103 _queryParams["userProject"] = [userProject]; 2150 _queryParams["userProject"] = [userProject];
2104 } 2151 }
2105 2152
2106 _downloadOptions = downloadOptions; 2153 _downloadOptions = downloadOptions;
2107 2154
2108 _url = 'b/' + commons.Escaper.ecapeVariable('$destinationBucket') + '/o/' + commons.Escaper.ecapeVariable('$destinationObject') + '/compose'; 2155 _url = 'b/' +
2156 commons.Escaper.ecapeVariable('$destinationBucket') +
2157 '/o/' +
2158 commons.Escaper.ecapeVariable('$destinationObject') +
2159 '/compose';
2109 2160
2110 var _response = _requester.request(_url, 2161 var _response = _requester.request(_url, "POST",
2111 "POST", 2162 body: _body,
2112 body: _body, 2163 queryParams: _queryParams,
2113 queryParams: _queryParams, 2164 uploadOptions: _uploadOptions,
2114 uploadOptions: _uploadOptions, 2165 uploadMedia: _uploadMedia,
2115 uploadMedia: _uploadMedia, 2166 downloadOptions: _downloadOptions);
2116 downloadOptions: _downloadOptions);
2117 if (_downloadOptions == null || 2167 if (_downloadOptions == null ||
2118 _downloadOptions == commons.DownloadOptions.Metadata) { 2168 _downloadOptions == commons.DownloadOptions.Metadata) {
2119 return _response.then((data) => new Object.fromJson(data)); 2169 return _response.then((data) => new Object.fromJson(data));
2120 } else { 2170 } else {
2121 return _response; 2171 return _response;
2122 } 2172 }
2123 } 2173 }
2124 2174
2125 /** 2175 /// Copies a source object to a destination object. Optionally overrides
2126 * Copies a source object to a destination object. Optionally overrides 2176 /// metadata.
2127 * metadata. 2177 ///
2128 * 2178 /// [request] - The metadata request object.
2129 * [request] - The metadata request object. 2179 ///
2130 * 2180 /// Request parameters:
2131 * Request parameters: 2181 ///
2132 * 2182 /// [sourceBucket] - Name of the bucket in which to find the source object.
2133 * [sourceBucket] - Name of the bucket in which to find the source object. 2183 ///
2134 * 2184 /// [sourceObject] - Name of the source object. For information about how to
2135 * [sourceObject] - Name of the source object. For information about how to 2185 /// URL encode object names to be path safe, see Encoding URI Path Parts.
2136 * URL encode object names to be path safe, see Encoding URI Path Parts. 2186 ///
2137 * 2187 /// [destinationBucket] - Name of the bucket in which to store the new
2138 * [destinationBucket] - Name of the bucket in which to store the new object. 2188 /// object. Overrides the provided object metadata's bucket value, if any.For
2139 * Overrides the provided object metadata's bucket value, if any.For 2189 /// information about how to URL encode object names to be path safe, see
2140 * information about how to URL encode object names to be path safe, see 2190 /// Encoding URI Path Parts.
2141 * Encoding URI Path Parts. 2191 ///
2142 * 2192 /// [destinationObject] - Name of the new object. Required when the object
2143 * [destinationObject] - Name of the new object. Required when the object 2193 /// metadata is not otherwise provided. Overrides the object metadata's name
2144 * metadata is not otherwise provided. Overrides the object metadata's name 2194 /// value, if any.
2145 * value, if any. 2195 ///
2146 * 2196 /// [destinationPredefinedAcl] - Apply a predefined set of access controls to
2147 * [destinationPredefinedAcl] - Apply a predefined set of access controls to 2197 /// the destination object.
2148 * the destination object. 2198 /// Possible string values are:
2149 * Possible string values are: 2199 /// - "authenticatedRead" : Object owner gets OWNER access, and
2150 * - "authenticatedRead" : Object owner gets OWNER access, and 2200 /// allAuthenticatedUsers get READER access.
2151 * allAuthenticatedUsers get READER access. 2201 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
2152 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 2202 /// team owners get OWNER access.
2153 * team owners get OWNER access. 2203 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
2154 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 2204 /// owners get READER access.
2155 * owners get READER access. 2205 /// - "private" : Object owner gets OWNER access.
2156 * - "private" : Object owner gets OWNER access. 2206 /// - "projectPrivate" : Object owner gets OWNER access, and project team
2157 * - "projectPrivate" : Object owner gets OWNER access, and project team 2207 /// members get access according to their roles.
2158 * members get access according to their roles. 2208 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
2159 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 2209 /// access.
2160 * access. 2210 ///
2161 * 2211 /// [ifGenerationMatch] - Makes the operation conditional on whether the
2162 * [ifGenerationMatch] - Makes the operation conditional on whether the 2212 /// destination object's current generation matches the given value. Setting
2163 * destination object's current generation matches the given value. Setting to 2213 /// to 0 makes the operation succeed only if there are no live versions of
2164 * 0 makes the operation succeed only if there are no live versions of the 2214 /// the object.
2165 * object. 2215 ///
2166 * 2216 /// [ifGenerationNotMatch] - Makes the operation conditional on whether the
2167 * [ifGenerationNotMatch] - Makes the operation conditional on whether the 2217 /// destination object's current generation does not match the given value.
2168 * destination object's current generation does not match the given value. If 2218 /// If no live object exists, the precondition fails. Setting to 0 makes the
2169 * no live object exists, the precondition fails. Setting to 0 makes the 2219 /// operation succeed only if there is a live version of the object.
2170 * operation succeed only if there is a live version of the object. 2220 ///
2171 * 2221 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
2172 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 2222 /// destination object's current metageneration matches the given value.
2173 * destination object's current metageneration matches the given value. 2223 ///
2174 * 2224 /// [ifMetagenerationNotMatch] - Makes the operation conditional on whether
2175 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the 2225 /// the destination object's current metageneration does not match the given
2176 * destination object's current metageneration does not match the given value. 2226 /// value.
2177 * 2227 ///
2178 * [ifSourceGenerationMatch] - Makes the operation conditional on whether the 2228 /// [ifSourceGenerationMatch] - Makes the operation conditional on whether
2179 * source object's current generation matches the given value. 2229 /// the source object's current generation matches the given value.
2180 * 2230 ///
2181 * [ifSourceGenerationNotMatch] - Makes the operation conditional on whether 2231 /// [ifSourceGenerationNotMatch] - Makes the operation conditional on whether
2182 * the source object's current generation does not match the given value. 2232 /// the source object's current generation does not match the given value.
2183 * 2233 ///
2184 * [ifSourceMetagenerationMatch] - Makes the operation conditional on whether 2234 /// [ifSourceMetagenerationMatch] - Makes the operation conditional on
2185 * the source object's current metageneration matches the given value. 2235 /// whether the source object's current metageneration matches the given
2186 * 2236 /// value.
2187 * [ifSourceMetagenerationNotMatch] - Makes the operation conditional on 2237 ///
2188 * whether the source object's current metageneration does not match the given 2238 /// [ifSourceMetagenerationNotMatch] - Makes the operation conditional on
2189 * value. 2239 /// whether the source object's current metageneration does not match the
2190 * 2240 /// given value.
2191 * [projection] - Set of properties to return. Defaults to noAcl, unless the 2241 ///
2192 * object resource specifies the acl property, when it defaults to full. 2242 /// [projection] - Set of properties to return. Defaults to noAcl, unless the
2193 * Possible string values are: 2243 /// object resource specifies the acl property, when it defaults to full.
2194 * - "full" : Include all properties. 2244 /// Possible string values are:
2195 * - "noAcl" : Omit the owner, acl property. 2245 /// - "full" : Include all properties.
2196 * 2246 /// - "noAcl" : Omit the owner, acl property.
2197 * [sourceGeneration] - If present, selects a specific revision of the source 2247 ///
2198 * object (as opposed to the latest version, the default). 2248 /// [sourceGeneration] - If present, selects a specific revision of the
2199 * 2249 /// source object (as opposed to the latest version, the default).
2200 * [userProject] - The project to be billed for this request, for Requester 2250 ///
2201 * Pays buckets. 2251 /// [userProject] - The project to be billed for this request, for Requester
2202 * 2252 /// Pays buckets.
2203 * [downloadOptions] - Options for downloading. A download can be either a 2253 ///
2204 * Metadata (default) or Media download. Partial Media downloads are possible 2254 /// [downloadOptions] - Options for downloading. A download can be either a
2205 * as well. 2255 /// Metadata (default) or Media download. Partial Media downloads are
2206 * 2256 /// possible as well.
2207 * Completes with a 2257 ///
2208 * 2258 /// Completes with a
2209 * - [Object] for Metadata downloads (see [downloadOptions]). 2259 ///
2210 * 2260 /// - [Object] for Metadata downloads (see [downloadOptions]).
2211 * - [commons.Media] for Media downloads (see [downloadOptions]). 2261 ///
2212 * 2262 /// - [commons.Media] for Media downloads (see [downloadOptions]).
2213 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2263 ///
2214 * error. 2264 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2215 * 2265 /// an error.
2216 * If the used [http.Client] completes with an error when making a REST call, 2266 ///
2217 * this method will complete with the same error. 2267 /// If the used [http.Client] completes with an error when making a REST
2218 */ 2268 /// call, this method will complete with the same error.
2219 async.Future copy(Object request, core.String sourceBucket, core.String source Object, core.String destinationBucket, core.String destinationObject, {core.Stri ng destinationPredefinedAcl, core.String ifGenerationMatch, core.String ifGenera tionNotMatch, core.String ifMetagenerationMatch, core.String ifMetagenerationNot Match, core.String ifSourceGenerationMatch, core.String ifSourceGenerationNotMat ch, core.String ifSourceMetagenerationMatch, core.String ifSourceMetagenerationN otMatch, core.String projection, core.String sourceGeneration, core.String userP roject, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadat a}) { 2269 async.Future copy(
2270 Object request,
2271 core.String sourceBucket,
2272 core.String sourceObject,
2273 core.String destinationBucket,
2274 core.String destinationObject,
2275 {core.String destinationPredefinedAcl,
2276 core.String ifGenerationMatch,
2277 core.String ifGenerationNotMatch,
2278 core.String ifMetagenerationMatch,
2279 core.String ifMetagenerationNotMatch,
2280 core.String ifSourceGenerationMatch,
2281 core.String ifSourceGenerationNotMatch,
2282 core.String ifSourceMetagenerationMatch,
2283 core.String ifSourceMetagenerationNotMatch,
2284 core.String projection,
2285 core.String sourceGeneration,
2286 core.String userProject,
2287 commons.DownloadOptions downloadOptions:
2288 commons.DownloadOptions.Metadata}) {
2220 var _url = null; 2289 var _url = null;
2221 var _queryParams = new core.Map(); 2290 var _queryParams = new core.Map();
2222 var _uploadMedia = null; 2291 var _uploadMedia = null;
2223 var _uploadOptions = null; 2292 var _uploadOptions = null;
2224 var _downloadOptions = commons.DownloadOptions.Metadata; 2293 var _downloadOptions = commons.DownloadOptions.Metadata;
2225 var _body = null; 2294 var _body = null;
2226 2295
2227 if (request != null) { 2296 if (request != null) {
2228 _body = convert.JSON.encode((request).toJson()); 2297 _body = convert.JSON.encode((request).toJson());
2229 } 2298 }
(...skipping 24 matching lines...) Expand all
2254 if (ifMetagenerationNotMatch != null) { 2323 if (ifMetagenerationNotMatch != null) {
2255 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; 2324 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch];
2256 } 2325 }
2257 if (ifSourceGenerationMatch != null) { 2326 if (ifSourceGenerationMatch != null) {
2258 _queryParams["ifSourceGenerationMatch"] = [ifSourceGenerationMatch]; 2327 _queryParams["ifSourceGenerationMatch"] = [ifSourceGenerationMatch];
2259 } 2328 }
2260 if (ifSourceGenerationNotMatch != null) { 2329 if (ifSourceGenerationNotMatch != null) {
2261 _queryParams["ifSourceGenerationNotMatch"] = [ifSourceGenerationNotMatch]; 2330 _queryParams["ifSourceGenerationNotMatch"] = [ifSourceGenerationNotMatch];
2262 } 2331 }
2263 if (ifSourceMetagenerationMatch != null) { 2332 if (ifSourceMetagenerationMatch != null) {
2264 _queryParams["ifSourceMetagenerationMatch"] = [ifSourceMetagenerationMatch ]; 2333 _queryParams["ifSourceMetagenerationMatch"] = [
2334 ifSourceMetagenerationMatch
2335 ];
2265 } 2336 }
2266 if (ifSourceMetagenerationNotMatch != null) { 2337 if (ifSourceMetagenerationNotMatch != null) {
2267 _queryParams["ifSourceMetagenerationNotMatch"] = [ifSourceMetagenerationNo tMatch]; 2338 _queryParams["ifSourceMetagenerationNotMatch"] = [
2339 ifSourceMetagenerationNotMatch
2340 ];
2268 } 2341 }
2269 if (projection != null) { 2342 if (projection != null) {
2270 _queryParams["projection"] = [projection]; 2343 _queryParams["projection"] = [projection];
2271 } 2344 }
2272 if (sourceGeneration != null) { 2345 if (sourceGeneration != null) {
2273 _queryParams["sourceGeneration"] = [sourceGeneration]; 2346 _queryParams["sourceGeneration"] = [sourceGeneration];
2274 } 2347 }
2275 if (userProject != null) { 2348 if (userProject != null) {
2276 _queryParams["userProject"] = [userProject]; 2349 _queryParams["userProject"] = [userProject];
2277 } 2350 }
2278 2351
2279 _downloadOptions = downloadOptions; 2352 _downloadOptions = downloadOptions;
2280 2353
2281 _url = 'b/' + commons.Escaper.ecapeVariable('$sourceBucket') + '/o/' + commo ns.Escaper.ecapeVariable('$sourceObject') + '/copyTo/b/' + commons.Escaper.ecape Variable('$destinationBucket') + '/o/' + commons.Escaper.ecapeVariable('$destina tionObject'); 2354 _url = 'b/' +
2355 commons.Escaper.ecapeVariable('$sourceBucket') +
2356 '/o/' +
2357 commons.Escaper.ecapeVariable('$sourceObject') +
2358 '/copyTo/b/' +
2359 commons.Escaper.ecapeVariable('$destinationBucket') +
2360 '/o/' +
2361 commons.Escaper.ecapeVariable('$destinationObject');
2282 2362
2283 var _response = _requester.request(_url, 2363 var _response = _requester.request(_url, "POST",
2284 "POST", 2364 body: _body,
2285 body: _body, 2365 queryParams: _queryParams,
2286 queryParams: _queryParams, 2366 uploadOptions: _uploadOptions,
2287 uploadOptions: _uploadOptions, 2367 uploadMedia: _uploadMedia,
2288 uploadMedia: _uploadMedia, 2368 downloadOptions: _downloadOptions);
2289 downloadOptions: _downloadOptions);
2290 if (_downloadOptions == null || 2369 if (_downloadOptions == null ||
2291 _downloadOptions == commons.DownloadOptions.Metadata) { 2370 _downloadOptions == commons.DownloadOptions.Metadata) {
2292 return _response.then((data) => new Object.fromJson(data)); 2371 return _response.then((data) => new Object.fromJson(data));
2293 } else { 2372 } else {
2294 return _response; 2373 return _response;
2295 } 2374 }
2296 } 2375 }
2297 2376
2298 /** 2377 /// Deletes an object and its metadata. Deletions are permanent if versioning
2299 * Deletes an object and its metadata. Deletions are permanent if versioning 2378 /// is not enabled for the bucket, or if the generation parameter is used.
2300 * is not enabled for the bucket, or if the generation parameter is used. 2379 ///
2301 * 2380 /// Request parameters:
2302 * Request parameters: 2381 ///
2303 * 2382 /// [bucket] - Name of the bucket in which the object resides.
2304 * [bucket] - Name of the bucket in which the object resides. 2383 ///
2305 * 2384 /// [object] - Name of the object. For information about how to URL encode
2306 * [object] - Name of the object. For information about how to URL encode 2385 /// object names to be path safe, see Encoding URI Path Parts.
2307 * object names to be path safe, see Encoding URI Path Parts. 2386 ///
2308 * 2387 /// [generation] - If present, permanently deletes a specific revision of
2309 * [generation] - If present, permanently deletes a specific revision of this 2388 /// this object (as opposed to the latest version, the default).
2310 * object (as opposed to the latest version, the default). 2389 ///
2311 * 2390 /// [ifGenerationMatch] - Makes the operation conditional on whether the
2312 * [ifGenerationMatch] - Makes the operation conditional on whether the 2391 /// object's current generation matches the given value. Setting to 0 makes
2313 * object's current generation matches the given value. Setting to 0 makes the 2392 /// the operation succeed only if there are no live versions of the object.
2314 * operation succeed only if there are no live versions of the object. 2393 ///
2315 * 2394 /// [ifGenerationNotMatch] - Makes the operation conditional on whether the
2316 * [ifGenerationNotMatch] - Makes the operation conditional on whether the 2395 /// object's current generation does not match the given value. If no live
2317 * object's current generation does not match the given value. If no live 2396 /// object exists, the precondition fails. Setting to 0 makes the operation
2318 * object exists, the precondition fails. Setting to 0 makes the operation 2397 /// succeed only if there is a live version of the object.
2319 * succeed only if there is a live version of the object. 2398 ///
2320 * 2399 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
2321 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 2400 /// object's current metageneration matches the given value.
2322 * object's current metageneration matches the given value. 2401 ///
2323 * 2402 /// [ifMetagenerationNotMatch] - Makes the operation conditional on whether
2324 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the 2403 /// the object's current metageneration does not match the given value.
2325 * object's current metageneration does not match the given value. 2404 ///
2326 * 2405 /// [userProject] - The project to be billed for this request, for Requester
2327 * [userProject] - The project to be billed for this request, for Requester 2406 /// Pays buckets.
2328 * Pays buckets. 2407 ///
2329 * 2408 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2330 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2409 /// an error.
2331 * error. 2410 ///
2332 * 2411 /// If the used [http.Client] completes with an error when making a REST
2333 * If the used [http.Client] completes with an error when making a REST call, 2412 /// call, this method will complete with the same error.
2334 * this method will complete with the same error. 2413 async.Future delete(core.String bucket, core.String object,
2335 */ 2414 {core.String generation,
2336 async.Future delete(core.String bucket, core.String object, {core.String gener ation, core.String ifGenerationMatch, core.String ifGenerationNotMatch, core.Str ing ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String use rProject}) { 2415 core.String ifGenerationMatch,
2416 core.String ifGenerationNotMatch,
2417 core.String ifMetagenerationMatch,
2418 core.String ifMetagenerationNotMatch,
2419 core.String userProject}) {
2337 var _url = null; 2420 var _url = null;
2338 var _queryParams = new core.Map(); 2421 var _queryParams = new core.Map();
2339 var _uploadMedia = null; 2422 var _uploadMedia = null;
2340 var _uploadOptions = null; 2423 var _uploadOptions = null;
2341 var _downloadOptions = commons.DownloadOptions.Metadata; 2424 var _downloadOptions = commons.DownloadOptions.Metadata;
2342 var _body = null; 2425 var _body = null;
2343 2426
2344 if (bucket == null) { 2427 if (bucket == null) {
2345 throw new core.ArgumentError("Parameter bucket is required."); 2428 throw new core.ArgumentError("Parameter bucket is required.");
2346 } 2429 }
(...skipping 14 matching lines...) Expand all
2361 } 2444 }
2362 if (ifMetagenerationNotMatch != null) { 2445 if (ifMetagenerationNotMatch != null) {
2363 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; 2446 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch];
2364 } 2447 }
2365 if (userProject != null) { 2448 if (userProject != null) {
2366 _queryParams["userProject"] = [userProject]; 2449 _queryParams["userProject"] = [userProject];
2367 } 2450 }
2368 2451
2369 _downloadOptions = null; 2452 _downloadOptions = null;
2370 2453
2371 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object'); 2454 _url = 'b/' +
2455 commons.Escaper.ecapeVariable('$bucket') +
2456 '/o/' +
2457 commons.Escaper.ecapeVariable('$object');
2372 2458
2373 var _response = _requester.request(_url, 2459 var _response = _requester.request(_url, "DELETE",
2374 "DELETE", 2460 body: _body,
2375 body: _body, 2461 queryParams: _queryParams,
2376 queryParams: _queryParams, 2462 uploadOptions: _uploadOptions,
2377 uploadOptions: _uploadOptions, 2463 uploadMedia: _uploadMedia,
2378 uploadMedia: _uploadMedia, 2464 downloadOptions: _downloadOptions);
2379 downloadOptions: _downloadOptions);
2380 return _response.then((data) => null); 2465 return _response.then((data) => null);
2381 } 2466 }
2382 2467
2383 /** 2468 /// Retrieves an object or its metadata.
2384 * Retrieves an object or its metadata. 2469 ///
2385 * 2470 /// Request parameters:
2386 * Request parameters: 2471 ///
2387 * 2472 /// [bucket] - Name of the bucket in which the object resides.
2388 * [bucket] - Name of the bucket in which the object resides. 2473 ///
2389 * 2474 /// [object] - Name of the object. For information about how to URL encode
2390 * [object] - Name of the object. For information about how to URL encode 2475 /// object names to be path safe, see Encoding URI Path Parts.
2391 * object names to be path safe, see Encoding URI Path Parts. 2476 ///
2392 * 2477 /// [generation] - If present, selects a specific revision of this object (as
2393 * [generation] - If present, selects a specific revision of this object (as 2478 /// opposed to the latest version, the default).
2394 * opposed to the latest version, the default). 2479 ///
2395 * 2480 /// [ifGenerationMatch] - Makes the operation conditional on whether the
2396 * [ifGenerationMatch] - Makes the operation conditional on whether the 2481 /// object's current generation matches the given value. Setting to 0 makes
2397 * object's current generation matches the given value. Setting to 0 makes the 2482 /// the operation succeed only if there are no live versions of the object.
2398 * operation succeed only if there are no live versions of the object. 2483 ///
2399 * 2484 /// [ifGenerationNotMatch] - Makes the operation conditional on whether the
2400 * [ifGenerationNotMatch] - Makes the operation conditional on whether the 2485 /// object's current generation does not match the given value. If no live
2401 * object's current generation does not match the given value. If no live 2486 /// object exists, the precondition fails. Setting to 0 makes the operation
2402 * object exists, the precondition fails. Setting to 0 makes the operation 2487 /// succeed only if there is a live version of the object.
2403 * succeed only if there is a live version of the object. 2488 ///
2404 * 2489 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
2405 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 2490 /// object's current metageneration matches the given value.
2406 * object's current metageneration matches the given value. 2491 ///
2407 * 2492 /// [ifMetagenerationNotMatch] - Makes the operation conditional on whether
2408 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the 2493 /// the object's current metageneration does not match the given value.
2409 * object's current metageneration does not match the given value. 2494 ///
2410 * 2495 /// [projection] - Set of properties to return. Defaults to noAcl.
2411 * [projection] - Set of properties to return. Defaults to noAcl. 2496 /// Possible string values are:
2412 * Possible string values are: 2497 /// - "full" : Include all properties.
2413 * - "full" : Include all properties. 2498 /// - "noAcl" : Omit the owner, acl property.
2414 * - "noAcl" : Omit the owner, acl property. 2499 ///
2415 * 2500 /// [userProject] - The project to be billed for this request, for Requester
2416 * [userProject] - The project to be billed for this request, for Requester 2501 /// Pays buckets.
2417 * Pays buckets. 2502 ///
2418 * 2503 /// [downloadOptions] - Options for downloading. A download can be either a
2419 * [downloadOptions] - Options for downloading. A download can be either a 2504 /// Metadata (default) or Media download. Partial Media downloads are
2420 * Metadata (default) or Media download. Partial Media downloads are possible 2505 /// possible as well.
2421 * as well. 2506 ///
2422 * 2507 /// Completes with a
2423 * Completes with a 2508 ///
2424 * 2509 /// - [Object] for Metadata downloads (see [downloadOptions]).
2425 * - [Object] for Metadata downloads (see [downloadOptions]). 2510 ///
2426 * 2511 /// - [commons.Media] for Media downloads (see [downloadOptions]).
2427 * - [commons.Media] for Media downloads (see [downloadOptions]). 2512 ///
2428 * 2513 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2429 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2514 /// an error.
2430 * error. 2515 ///
2431 * 2516 /// If the used [http.Client] completes with an error when making a REST
2432 * If the used [http.Client] completes with an error when making a REST call, 2517 /// call, this method will complete with the same error.
2433 * this method will complete with the same error. 2518 async.Future get(core.String bucket, core.String object,
2434 */ 2519 {core.String generation,
2435 async.Future get(core.String bucket, core.String object, {core.String generati on, core.String ifGenerationMatch, core.String ifGenerationNotMatch, core.String ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String projec tion, core.String userProject, commons.DownloadOptions downloadOptions: commons. DownloadOptions.Metadata}) { 2520 core.String ifGenerationMatch,
2521 core.String ifGenerationNotMatch,
2522 core.String ifMetagenerationMatch,
2523 core.String ifMetagenerationNotMatch,
2524 core.String projection,
2525 core.String userProject,
2526 commons.DownloadOptions downloadOptions:
2527 commons.DownloadOptions.Metadata}) {
2436 var _url = null; 2528 var _url = null;
2437 var _queryParams = new core.Map(); 2529 var _queryParams = new core.Map();
2438 var _uploadMedia = null; 2530 var _uploadMedia = null;
2439 var _uploadOptions = null; 2531 var _uploadOptions = null;
2440 var _downloadOptions = commons.DownloadOptions.Metadata; 2532 var _downloadOptions = commons.DownloadOptions.Metadata;
2441 var _body = null; 2533 var _body = null;
2442 2534
2443 if (bucket == null) { 2535 if (bucket == null) {
2444 throw new core.ArgumentError("Parameter bucket is required."); 2536 throw new core.ArgumentError("Parameter bucket is required.");
2445 } 2537 }
(...skipping 17 matching lines...) Expand all
2463 } 2555 }
2464 if (projection != null) { 2556 if (projection != null) {
2465 _queryParams["projection"] = [projection]; 2557 _queryParams["projection"] = [projection];
2466 } 2558 }
2467 if (userProject != null) { 2559 if (userProject != null) {
2468 _queryParams["userProject"] = [userProject]; 2560 _queryParams["userProject"] = [userProject];
2469 } 2561 }
2470 2562
2471 _downloadOptions = downloadOptions; 2563 _downloadOptions = downloadOptions;
2472 2564
2473 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object'); 2565 _url = 'b/' +
2566 commons.Escaper.ecapeVariable('$bucket') +
2567 '/o/' +
2568 commons.Escaper.ecapeVariable('$object');
2474 2569
2475 var _response = _requester.request(_url, 2570 var _response = _requester.request(_url, "GET",
2476 "GET", 2571 body: _body,
2477 body: _body, 2572 queryParams: _queryParams,
2478 queryParams: _queryParams, 2573 uploadOptions: _uploadOptions,
2479 uploadOptions: _uploadOptions, 2574 uploadMedia: _uploadMedia,
2480 uploadMedia: _uploadMedia, 2575 downloadOptions: _downloadOptions);
2481 downloadOptions: _downloadOptions);
2482 if (_downloadOptions == null || 2576 if (_downloadOptions == null ||
2483 _downloadOptions == commons.DownloadOptions.Metadata) { 2577 _downloadOptions == commons.DownloadOptions.Metadata) {
2484 return _response.then((data) => new Object.fromJson(data)); 2578 return _response.then((data) => new Object.fromJson(data));
2485 } else { 2579 } else {
2486 return _response; 2580 return _response;
2487 } 2581 }
2488 } 2582 }
2489 2583
2490 /** 2584 /// Returns an IAM policy for the specified object.
2491 * Returns an IAM policy for the specified object. 2585 ///
2492 * 2586 /// Request parameters:
2493 * Request parameters: 2587 ///
2494 * 2588 /// [bucket] - Name of the bucket in which the object resides.
2495 * [bucket] - Name of the bucket in which the object resides. 2589 ///
2496 * 2590 /// [object] - Name of the object. For information about how to URL encode
2497 * [object] - Name of the object. For information about how to URL encode 2591 /// object names to be path safe, see Encoding URI Path Parts.
2498 * object names to be path safe, see Encoding URI Path Parts. 2592 ///
2499 * 2593 /// [generation] - If present, selects a specific revision of this object (as
2500 * [generation] - If present, selects a specific revision of this object (as 2594 /// opposed to the latest version, the default).
2501 * opposed to the latest version, the default). 2595 ///
2502 * 2596 /// [userProject] - The project to be billed for this request, for Requester
2503 * [userProject] - The project to be billed for this request, for Requester 2597 /// Pays buckets.
2504 * Pays buckets. 2598 ///
2505 * 2599 /// Completes with a [Policy].
2506 * Completes with a [Policy]. 2600 ///
2507 * 2601 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2508 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2602 /// an error.
2509 * error. 2603 ///
2510 * 2604 /// If the used [http.Client] completes with an error when making a REST
2511 * If the used [http.Client] completes with an error when making a REST call, 2605 /// call, this method will complete with the same error.
2512 * this method will complete with the same error. 2606 async.Future<Policy> getIamPolicy(core.String bucket, core.String object,
2513 */ 2607 {core.String generation, core.String userProject}) {
2514 async.Future<Policy> getIamPolicy(core.String bucket, core.String object, {cor e.String generation, core.String userProject}) {
2515 var _url = null; 2608 var _url = null;
2516 var _queryParams = new core.Map(); 2609 var _queryParams = new core.Map();
2517 var _uploadMedia = null; 2610 var _uploadMedia = null;
2518 var _uploadOptions = null; 2611 var _uploadOptions = null;
2519 var _downloadOptions = commons.DownloadOptions.Metadata; 2612 var _downloadOptions = commons.DownloadOptions.Metadata;
2520 var _body = null; 2613 var _body = null;
2521 2614
2522 if (bucket == null) { 2615 if (bucket == null) {
2523 throw new core.ArgumentError("Parameter bucket is required."); 2616 throw new core.ArgumentError("Parameter bucket is required.");
2524 } 2617 }
2525 if (object == null) { 2618 if (object == null) {
2526 throw new core.ArgumentError("Parameter object is required."); 2619 throw new core.ArgumentError("Parameter object is required.");
2527 } 2620 }
2528 if (generation != null) { 2621 if (generation != null) {
2529 _queryParams["generation"] = [generation]; 2622 _queryParams["generation"] = [generation];
2530 } 2623 }
2531 if (userProject != null) { 2624 if (userProject != null) {
2532 _queryParams["userProject"] = [userProject]; 2625 _queryParams["userProject"] = [userProject];
2533 } 2626 }
2534 2627
2535 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/iam'; 2628 _url = 'b/' +
2629 commons.Escaper.ecapeVariable('$bucket') +
2630 '/o/' +
2631 commons.Escaper.ecapeVariable('$object') +
2632 '/iam';
2536 2633
2537 var _response = _requester.request(_url, 2634 var _response = _requester.request(_url, "GET",
2538 "GET", 2635 body: _body,
2539 body: _body, 2636 queryParams: _queryParams,
2540 queryParams: _queryParams, 2637 uploadOptions: _uploadOptions,
2541 uploadOptions: _uploadOptions, 2638 uploadMedia: _uploadMedia,
2542 uploadMedia: _uploadMedia, 2639 downloadOptions: _downloadOptions);
2543 downloadOptions: _downloadOptions);
2544 return _response.then((data) => new Policy.fromJson(data)); 2640 return _response.then((data) => new Policy.fromJson(data));
2545 } 2641 }
2546 2642
2547 /** 2643 /// Stores a new object and metadata.
2548 * Stores a new object and metadata. 2644 ///
2549 * 2645 /// [request] - The metadata request object.
2550 * [request] - The metadata request object. 2646 ///
2551 * 2647 /// Request parameters:
2552 * Request parameters: 2648 ///
2553 * 2649 /// [bucket] - Name of the bucket in which to store the new object. Overrides
2554 * [bucket] - Name of the bucket in which to store the new object. Overrides 2650 /// the provided object metadata's bucket value, if any.
2555 * the provided object metadata's bucket value, if any. 2651 ///
2556 * 2652 /// [contentEncoding] - If set, sets the contentEncoding property of the
2557 * [contentEncoding] - If set, sets the contentEncoding property of the final 2653 /// final object to this value. Setting this parameter is equivalent to
2558 * object to this value. Setting this parameter is equivalent to setting the 2654 /// setting the contentEncoding metadata property. This can be useful when
2559 * contentEncoding metadata property. This can be useful when uploading an 2655 /// uploading an object with uploadType=media to indicate the encoding of the
2560 * object with uploadType=media to indicate the encoding of the content being 2656 /// content being uploaded.
2561 * uploaded. 2657 ///
2562 * 2658 /// [ifGenerationMatch] - Makes the operation conditional on whether the
2563 * [ifGenerationMatch] - Makes the operation conditional on whether the 2659 /// object's current generation matches the given value. Setting to 0 makes
2564 * object's current generation matches the given value. Setting to 0 makes the 2660 /// the operation succeed only if there are no live versions of the object.
2565 * operation succeed only if there are no live versions of the object. 2661 ///
2566 * 2662 /// [ifGenerationNotMatch] - Makes the operation conditional on whether the
2567 * [ifGenerationNotMatch] - Makes the operation conditional on whether the 2663 /// object's current generation does not match the given value. If no live
2568 * object's current generation does not match the given value. If no live 2664 /// object exists, the precondition fails. Setting to 0 makes the operation
2569 * object exists, the precondition fails. Setting to 0 makes the operation 2665 /// succeed only if there is a live version of the object.
2570 * succeed only if there is a live version of the object. 2666 ///
2571 * 2667 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
2572 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 2668 /// object's current metageneration matches the given value.
2573 * object's current metageneration matches the given value. 2669 ///
2574 * 2670 /// [ifMetagenerationNotMatch] - Makes the operation conditional on whether
2575 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the 2671 /// the object's current metageneration does not match the given value.
2576 * object's current metageneration does not match the given value. 2672 ///
2577 * 2673 /// [kmsKeyName] - Resource name of the Cloud KMS key, of the form
2578 * [kmsKeyName] - Resource name of the Cloud KMS key, of the form 2674 /// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key,
2579 * projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that 2675 /// that will be used to encrypt the object. Overrides the object metadata's
2580 * will be used to encrypt the object. Overrides the object metadata's 2676 /// kms_key_name value, if any.
2581 * kms_key_name value, if any. 2677 ///
2582 * 2678 /// [name] - Name of the object. Required when the object metadata is not
2583 * [name] - Name of the object. Required when the object metadata is not 2679 /// otherwise provided. Overrides the object metadata's name value, if any.
2584 * otherwise provided. Overrides the object metadata's name value, if any. For 2680 /// For information about how to URL encode object names to be path safe, see
2585 * information about how to URL encode object names to be path safe, see 2681 /// Encoding URI Path Parts.
2586 * Encoding URI Path Parts. 2682 ///
2587 * 2683 /// [predefinedAcl] - Apply a predefined set of access controls to this
2588 * [predefinedAcl] - Apply a predefined set of access controls to this object. 2684 /// object.
2589 * Possible string values are: 2685 /// Possible string values are:
2590 * - "authenticatedRead" : Object owner gets OWNER access, and 2686 /// - "authenticatedRead" : Object owner gets OWNER access, and
2591 * allAuthenticatedUsers get READER access. 2687 /// allAuthenticatedUsers get READER access.
2592 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 2688 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
2593 * team owners get OWNER access. 2689 /// team owners get OWNER access.
2594 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 2690 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
2595 * owners get READER access. 2691 /// owners get READER access.
2596 * - "private" : Object owner gets OWNER access. 2692 /// - "private" : Object owner gets OWNER access.
2597 * - "projectPrivate" : Object owner gets OWNER access, and project team 2693 /// - "projectPrivate" : Object owner gets OWNER access, and project team
2598 * members get access according to their roles. 2694 /// members get access according to their roles.
2599 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 2695 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
2600 * access. 2696 /// access.
2601 * 2697 ///
2602 * [projection] - Set of properties to return. Defaults to noAcl, unless the 2698 /// [projection] - Set of properties to return. Defaults to noAcl, unless the
2603 * object resource specifies the acl property, when it defaults to full. 2699 /// object resource specifies the acl property, when it defaults to full.
2604 * Possible string values are: 2700 /// Possible string values are:
2605 * - "full" : Include all properties. 2701 /// - "full" : Include all properties.
2606 * - "noAcl" : Omit the owner, acl property. 2702 /// - "noAcl" : Omit the owner, acl property.
2607 * 2703 ///
2608 * [userProject] - The project to be billed for this request, for Requester 2704 /// [userProject] - The project to be billed for this request, for Requester
2609 * Pays buckets. 2705 /// Pays buckets.
2610 * 2706 ///
2611 * [uploadMedia] - The media to upload. 2707 /// [uploadMedia] - The media to upload.
2612 * 2708 ///
2613 * [uploadOptions] - Options for the media upload. Streaming Media without the 2709 /// [uploadOptions] - Options for the media upload. Streaming Media without
2614 * length being known ahead of time is only supported via resumable uploads. 2710 /// the length being known ahead of time is only supported via resumable
2615 * 2711 /// uploads.
2616 * [downloadOptions] - Options for downloading. A download can be either a 2712 ///
2617 * Metadata (default) or Media download. Partial Media downloads are possible 2713 /// [downloadOptions] - Options for downloading. A download can be either a
2618 * as well. 2714 /// Metadata (default) or Media download. Partial Media downloads are
2619 * 2715 /// possible as well.
2620 * Completes with a 2716 ///
2621 * 2717 /// Completes with a
2622 * - [Object] for Metadata downloads (see [downloadOptions]). 2718 ///
2623 * 2719 /// - [Object] for Metadata downloads (see [downloadOptions]).
2624 * - [commons.Media] for Media downloads (see [downloadOptions]). 2720 ///
2625 * 2721 /// - [commons.Media] for Media downloads (see [downloadOptions]).
2626 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2722 ///
2627 * error. 2723 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2628 * 2724 /// an error.
2629 * If the used [http.Client] completes with an error when making a REST call, 2725 ///
2630 * this method will complete with the same error. 2726 /// If the used [http.Client] completes with an error when making a REST
2631 */ 2727 /// call, this method will complete with the same error.
2632 async.Future insert(Object request, core.String bucket, {core.String contentEn coding, core.String ifGenerationMatch, core.String ifGenerationNotMatch, core.St ring ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String km sKeyName, core.String name, core.String predefinedAcl, core.String projection, c ore.String userProject, commons.UploadOptions uploadOptions : commons.UploadOpti ons.Default, commons.Media uploadMedia, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { 2728 async.Future insert(Object request, core.String bucket,
2729 {core.String contentEncoding,
2730 core.String ifGenerationMatch,
2731 core.String ifGenerationNotMatch,
2732 core.String ifMetagenerationMatch,
2733 core.String ifMetagenerationNotMatch,
2734 core.String kmsKeyName,
2735 core.String name,
2736 core.String predefinedAcl,
2737 core.String projection,
2738 core.String userProject,
2739 commons.UploadOptions uploadOptions: commons.UploadOptions.Default,
2740 commons.Media uploadMedia,
2741 commons.DownloadOptions downloadOptions:
2742 commons.DownloadOptions.Metadata}) {
2633 var _url = null; 2743 var _url = null;
2634 var _queryParams = new core.Map(); 2744 var _queryParams = new core.Map();
2635 var _uploadMedia = null; 2745 var _uploadMedia = null;
2636 var _uploadOptions = null; 2746 var _uploadOptions = null;
2637 var _downloadOptions = commons.DownloadOptions.Metadata; 2747 var _downloadOptions = commons.DownloadOptions.Metadata;
2638 var _body = null; 2748 var _body = null;
2639 2749
2640 if (request != null) { 2750 if (request != null) {
2641 _body = convert.JSON.encode((request).toJson()); 2751 _body = convert.JSON.encode((request).toJson());
2642 } 2752 }
(...skipping 24 matching lines...) Expand all
2667 if (predefinedAcl != null) { 2777 if (predefinedAcl != null) {
2668 _queryParams["predefinedAcl"] = [predefinedAcl]; 2778 _queryParams["predefinedAcl"] = [predefinedAcl];
2669 } 2779 }
2670 if (projection != null) { 2780 if (projection != null) {
2671 _queryParams["projection"] = [projection]; 2781 _queryParams["projection"] = [projection];
2672 } 2782 }
2673 if (userProject != null) { 2783 if (userProject != null) {
2674 _queryParams["userProject"] = [userProject]; 2784 _queryParams["userProject"] = [userProject];
2675 } 2785 }
2676 2786
2677 2787 _uploadMedia = uploadMedia;
2678 _uploadMedia = uploadMedia; 2788 _uploadOptions = uploadOptions;
2679 _uploadOptions = uploadOptions;
2680 _downloadOptions = downloadOptions; 2789 _downloadOptions = downloadOptions;
2681 2790
2682 if (_uploadMedia == null) { 2791 if (_uploadMedia == null) {
2683 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o'; 2792 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o';
2684 } else if (_uploadOptions is commons.ResumableUploadOptions) { 2793 } else if (_uploadOptions is commons.ResumableUploadOptions) {
2685 _url = '/resumable/upload/storage/v1/b/' + commons.Escaper.ecapeVariable(' $bucket') + '/o'; 2794 _url = '/resumable/upload/storage/v1/b/' +
2795 commons.Escaper.ecapeVariable('$bucket') +
2796 '/o';
2686 } else { 2797 } else {
2687 _url = '/upload/storage/v1/b/' + commons.Escaper.ecapeVariable('$bucket') + '/o'; 2798 _url = '/upload/storage/v1/b/' +
2799 commons.Escaper.ecapeVariable('$bucket') +
2800 '/o';
2688 } 2801 }
2689 2802
2690 2803 var _response = _requester.request(_url, "POST",
2691 var _response = _requester.request(_url, 2804 body: _body,
2692 "POST", 2805 queryParams: _queryParams,
2693 body: _body, 2806 uploadOptions: _uploadOptions,
2694 queryParams: _queryParams, 2807 uploadMedia: _uploadMedia,
2695 uploadOptions: _uploadOptions, 2808 downloadOptions: _downloadOptions);
2696 uploadMedia: _uploadMedia,
2697 downloadOptions: _downloadOptions);
2698 if (_downloadOptions == null || 2809 if (_downloadOptions == null ||
2699 _downloadOptions == commons.DownloadOptions.Metadata) { 2810 _downloadOptions == commons.DownloadOptions.Metadata) {
2700 return _response.then((data) => new Object.fromJson(data)); 2811 return _response.then((data) => new Object.fromJson(data));
2701 } else { 2812 } else {
2702 return _response; 2813 return _response;
2703 } 2814 }
2704 } 2815 }
2705 2816
2706 /** 2817 /// Retrieves a list of objects matching the criteria.
2707 * Retrieves a list of objects matching the criteria. 2818 ///
2708 * 2819 /// Request parameters:
2709 * Request parameters: 2820 ///
2710 * 2821 /// [bucket] - Name of the bucket in which to look for objects.
2711 * [bucket] - Name of the bucket in which to look for objects. 2822 ///
2712 * 2823 /// [delimiter] - Returns results in a directory-like mode. items will
2713 * [delimiter] - Returns results in a directory-like mode. items will contain 2824 /// contain only objects whose names, aside from the prefix, do not contain
2714 * only objects whose names, aside from the prefix, do not contain delimiter. 2825 /// delimiter. Objects whose names, aside from the prefix, contain delimiter
2715 * Objects whose names, aside from the prefix, contain delimiter will have 2826 /// will have their name, truncated after the delimiter, returned in
2716 * their name, truncated after the delimiter, returned in prefixes. Duplicate 2827 /// prefixes. Duplicate prefixes are omitted.
2717 * prefixes are omitted. 2828 ///
2718 * 2829 /// [maxResults] - Maximum number of items plus prefixes to return in a
2719 * [maxResults] - Maximum number of items plus prefixes to return in a single 2830 /// single page of responses. As duplicate prefixes are omitted, fewer total
2720 * page of responses. As duplicate prefixes are omitted, fewer total results 2831 /// results may be returned than requested. The service will use this
2721 * may be returned than requested. The service will use this parameter or 2832 /// parameter or 1,000 items, whichever is smaller.
2722 * 1,000 items, whichever is smaller. 2833 ///
2723 * 2834 /// [pageToken] - A previously-returned page token representing part of the
2724 * [pageToken] - A previously-returned page token representing part of the 2835 /// larger set of results to view.
2725 * larger set of results to view. 2836 ///
2726 * 2837 /// [prefix] - Filter results to objects whose names begin with this prefix.
2727 * [prefix] - Filter results to objects whose names begin with this prefix. 2838 ///
2728 * 2839 /// [projection] - Set of properties to return. Defaults to noAcl.
2729 * [projection] - Set of properties to return. Defaults to noAcl. 2840 /// Possible string values are:
2730 * Possible string values are: 2841 /// - "full" : Include all properties.
2731 * - "full" : Include all properties. 2842 /// - "noAcl" : Omit the owner, acl property.
2732 * - "noAcl" : Omit the owner, acl property. 2843 ///
2733 * 2844 /// [userProject] - The project to be billed for this request, for Requester
2734 * [userProject] - The project to be billed for this request, for Requester 2845 /// Pays buckets.
2735 * Pays buckets. 2846 ///
2736 * 2847 /// [versions] - If true, lists all versions of an object as distinct
2737 * [versions] - If true, lists all versions of an object as distinct results. 2848 /// results. The default is false. For more information, see Object
2738 * The default is false. For more information, see Object Versioning. 2849 /// Versioning.
2739 * 2850 ///
2740 * Completes with a [Objects]. 2851 /// Completes with a [Objects].
2741 * 2852 ///
2742 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2853 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2743 * error. 2854 /// an error.
2744 * 2855 ///
2745 * If the used [http.Client] completes with an error when making a REST call, 2856 /// If the used [http.Client] completes with an error when making a REST
2746 * this method will complete with the same error. 2857 /// call, this method will complete with the same error.
2747 */ 2858 async.Future<Objects> list(core.String bucket,
2748 async.Future<Objects> list(core.String bucket, {core.String delimiter, core.in t maxResults, core.String pageToken, core.String prefix, core.String projection, core.String userProject, core.bool versions}) { 2859 {core.String delimiter,
2860 core.int maxResults,
2861 core.String pageToken,
2862 core.String prefix,
2863 core.String projection,
2864 core.String userProject,
2865 core.bool versions}) {
2749 var _url = null; 2866 var _url = null;
2750 var _queryParams = new core.Map(); 2867 var _queryParams = new core.Map();
2751 var _uploadMedia = null; 2868 var _uploadMedia = null;
2752 var _uploadOptions = null; 2869 var _uploadOptions = null;
2753 var _downloadOptions = commons.DownloadOptions.Metadata; 2870 var _downloadOptions = commons.DownloadOptions.Metadata;
2754 var _body = null; 2871 var _body = null;
2755 2872
2756 if (bucket == null) { 2873 if (bucket == null) {
2757 throw new core.ArgumentError("Parameter bucket is required."); 2874 throw new core.ArgumentError("Parameter bucket is required.");
2758 } 2875 }
(...skipping 14 matching lines...) Expand all
2773 } 2890 }
2774 if (userProject != null) { 2891 if (userProject != null) {
2775 _queryParams["userProject"] = [userProject]; 2892 _queryParams["userProject"] = [userProject];
2776 } 2893 }
2777 if (versions != null) { 2894 if (versions != null) {
2778 _queryParams["versions"] = ["${versions}"]; 2895 _queryParams["versions"] = ["${versions}"];
2779 } 2896 }
2780 2897
2781 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o'; 2898 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o';
2782 2899
2783 var _response = _requester.request(_url, 2900 var _response = _requester.request(_url, "GET",
2784 "GET", 2901 body: _body,
2785 body: _body, 2902 queryParams: _queryParams,
2786 queryParams: _queryParams, 2903 uploadOptions: _uploadOptions,
2787 uploadOptions: _uploadOptions, 2904 uploadMedia: _uploadMedia,
2788 uploadMedia: _uploadMedia, 2905 downloadOptions: _downloadOptions);
2789 downloadOptions: _downloadOptions);
2790 return _response.then((data) => new Objects.fromJson(data)); 2906 return _response.then((data) => new Objects.fromJson(data));
2791 } 2907 }
2792 2908
2793 /** 2909 /// Patches an object's metadata.
2794 * Updates an object's metadata. This method supports patch semantics. 2910 ///
2795 * 2911 /// [request] - The metadata request object.
2796 * [request] - The metadata request object. 2912 ///
2797 * 2913 /// Request parameters:
2798 * Request parameters: 2914 ///
2799 * 2915 /// [bucket] - Name of the bucket in which the object resides.
2800 * [bucket] - Name of the bucket in which the object resides. 2916 ///
2801 * 2917 /// [object] - Name of the object. For information about how to URL encode
2802 * [object] - Name of the object. For information about how to URL encode 2918 /// object names to be path safe, see Encoding URI Path Parts.
2803 * object names to be path safe, see Encoding URI Path Parts. 2919 ///
2804 * 2920 /// [generation] - If present, selects a specific revision of this object (as
2805 * [generation] - If present, selects a specific revision of this object (as 2921 /// opposed to the latest version, the default).
2806 * opposed to the latest version, the default). 2922 ///
2807 * 2923 /// [ifGenerationMatch] - Makes the operation conditional on whether the
2808 * [ifGenerationMatch] - Makes the operation conditional on whether the 2924 /// object's current generation matches the given value. Setting to 0 makes
2809 * object's current generation matches the given value. Setting to 0 makes the 2925 /// the operation succeed only if there are no live versions of the object.
2810 * operation succeed only if there are no live versions of the object. 2926 ///
2811 * 2927 /// [ifGenerationNotMatch] - Makes the operation conditional on whether the
2812 * [ifGenerationNotMatch] - Makes the operation conditional on whether the 2928 /// object's current generation does not match the given value. If no live
2813 * object's current generation does not match the given value. If no live 2929 /// object exists, the precondition fails. Setting to 0 makes the operation
2814 * object exists, the precondition fails. Setting to 0 makes the operation 2930 /// succeed only if there is a live version of the object.
2815 * succeed only if there is a live version of the object. 2931 ///
2816 * 2932 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
2817 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 2933 /// object's current metageneration matches the given value.
2818 * object's current metageneration matches the given value. 2934 ///
2819 * 2935 /// [ifMetagenerationNotMatch] - Makes the operation conditional on whether
2820 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the 2936 /// the object's current metageneration does not match the given value.
2821 * object's current metageneration does not match the given value. 2937 ///
2822 * 2938 /// [predefinedAcl] - Apply a predefined set of access controls to this
2823 * [predefinedAcl] - Apply a predefined set of access controls to this object. 2939 /// object.
2824 * Possible string values are: 2940 /// Possible string values are:
2825 * - "authenticatedRead" : Object owner gets OWNER access, and 2941 /// - "authenticatedRead" : Object owner gets OWNER access, and
2826 * allAuthenticatedUsers get READER access. 2942 /// allAuthenticatedUsers get READER access.
2827 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 2943 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
2828 * team owners get OWNER access. 2944 /// team owners get OWNER access.
2829 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 2945 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
2830 * owners get READER access. 2946 /// owners get READER access.
2831 * - "private" : Object owner gets OWNER access. 2947 /// - "private" : Object owner gets OWNER access.
2832 * - "projectPrivate" : Object owner gets OWNER access, and project team 2948 /// - "projectPrivate" : Object owner gets OWNER access, and project team
2833 * members get access according to their roles. 2949 /// members get access according to their roles.
2834 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 2950 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
2835 * access. 2951 /// access.
2836 * 2952 ///
2837 * [projection] - Set of properties to return. Defaults to full. 2953 /// [projection] - Set of properties to return. Defaults to full.
2838 * Possible string values are: 2954 /// Possible string values are:
2839 * - "full" : Include all properties. 2955 /// - "full" : Include all properties.
2840 * - "noAcl" : Omit the owner, acl property. 2956 /// - "noAcl" : Omit the owner, acl property.
2841 * 2957 ///
2842 * [userProject] - The project to be billed for this request, for Requester 2958 /// [userProject] - The project to be billed for this request, for Requester
2843 * Pays buckets. 2959 /// Pays buckets.
2844 * 2960 ///
2845 * Completes with a [Object]. 2961 /// [downloadOptions] - Options for downloading. A download can be either a
2846 * 2962 /// Metadata (default) or Media download. Partial Media downloads are
2847 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2963 /// possible as well.
2848 * error. 2964 ///
2849 * 2965 /// Completes with a
2850 * If the used [http.Client] completes with an error when making a REST call, 2966 ///
2851 * this method will complete with the same error. 2967 /// - [Object] for Metadata downloads (see [downloadOptions]).
2852 */ 2968 ///
2853 async.Future<Object> patch(Object request, core.String bucket, core.String obj ect, {core.String generation, core.String ifGenerationMatch, core.String ifGener ationNotMatch, core.String ifMetagenerationMatch, core.String ifMetagenerationNo tMatch, core.String predefinedAcl, core.String projection, core.String userProje ct}) { 2969 /// - [commons.Media] for Media downloads (see [downloadOptions]).
2970 ///
2971 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2972 /// an error.
2973 ///
2974 /// If the used [http.Client] completes with an error when making a REST
2975 /// call, this method will complete with the same error.
2976 async.Future patch(Object request, core.String bucket, core.String object,
2977 {core.String generation,
2978 core.String ifGenerationMatch,
2979 core.String ifGenerationNotMatch,
2980 core.String ifMetagenerationMatch,
2981 core.String ifMetagenerationNotMatch,
2982 core.String predefinedAcl,
2983 core.String projection,
2984 core.String userProject,
2985 commons.DownloadOptions downloadOptions:
2986 commons.DownloadOptions.Metadata}) {
2854 var _url = null; 2987 var _url = null;
2855 var _queryParams = new core.Map(); 2988 var _queryParams = new core.Map();
2856 var _uploadMedia = null; 2989 var _uploadMedia = null;
2857 var _uploadOptions = null; 2990 var _uploadOptions = null;
2858 var _downloadOptions = commons.DownloadOptions.Metadata; 2991 var _downloadOptions = commons.DownloadOptions.Metadata;
2859 var _body = null; 2992 var _body = null;
2860 2993
2861 if (request != null) { 2994 if (request != null) {
2862 _body = convert.JSON.encode((request).toJson()); 2995 _body = convert.JSON.encode((request).toJson());
2863 } 2996 }
(...skipping 21 matching lines...) Expand all
2885 if (predefinedAcl != null) { 3018 if (predefinedAcl != null) {
2886 _queryParams["predefinedAcl"] = [predefinedAcl]; 3019 _queryParams["predefinedAcl"] = [predefinedAcl];
2887 } 3020 }
2888 if (projection != null) { 3021 if (projection != null) {
2889 _queryParams["projection"] = [projection]; 3022 _queryParams["projection"] = [projection];
2890 } 3023 }
2891 if (userProject != null) { 3024 if (userProject != null) {
2892 _queryParams["userProject"] = [userProject]; 3025 _queryParams["userProject"] = [userProject];
2893 } 3026 }
2894 3027
2895 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object'); 3028 _downloadOptions = downloadOptions;
2896 3029
2897 var _response = _requester.request(_url, 3030 _url = 'b/' +
2898 "PATCH", 3031 commons.Escaper.ecapeVariable('$bucket') +
2899 body: _body, 3032 '/o/' +
2900 queryParams: _queryParams, 3033 commons.Escaper.ecapeVariable('$object');
2901 uploadOptions: _uploadOptions, 3034
2902 uploadMedia: _uploadMedia, 3035 var _response = _requester.request(_url, "PATCH",
2903 downloadOptions: _downloadOptions); 3036 body: _body,
2904 return _response.then((data) => new Object.fromJson(data)); 3037 queryParams: _queryParams,
3038 uploadOptions: _uploadOptions,
3039 uploadMedia: _uploadMedia,
3040 downloadOptions: _downloadOptions);
3041 if (_downloadOptions == null ||
3042 _downloadOptions == commons.DownloadOptions.Metadata) {
3043 return _response.then((data) => new Object.fromJson(data));
3044 } else {
3045 return _response;
3046 }
2905 } 3047 }
2906 3048
2907 /** 3049 /// Rewrites a source object to a destination object. Optionally overrides
2908 * Rewrites a source object to a destination object. Optionally overrides 3050 /// metadata.
2909 * metadata. 3051 ///
2910 * 3052 /// [request] - The metadata request object.
2911 * [request] - The metadata request object. 3053 ///
2912 * 3054 /// Request parameters:
2913 * Request parameters: 3055 ///
2914 * 3056 /// [sourceBucket] - Name of the bucket in which to find the source object.
2915 * [sourceBucket] - Name of the bucket in which to find the source object. 3057 ///
2916 * 3058 /// [sourceObject] - Name of the source object. For information about how to
2917 * [sourceObject] - Name of the source object. For information about how to 3059 /// URL encode object names to be path safe, see Encoding URI Path Parts.
2918 * URL encode object names to be path safe, see Encoding URI Path Parts. 3060 ///
2919 * 3061 /// [destinationBucket] - Name of the bucket in which to store the new
2920 * [destinationBucket] - Name of the bucket in which to store the new object. 3062 /// object. Overrides the provided object metadata's bucket value, if any.
2921 * Overrides the provided object metadata's bucket value, if any. 3063 ///
2922 * 3064 /// [destinationObject] - Name of the new object. Required when the object
2923 * [destinationObject] - Name of the new object. Required when the object 3065 /// metadata is not otherwise provided. Overrides the object metadata's name
2924 * metadata is not otherwise provided. Overrides the object metadata's name 3066 /// value, if any. For information about how to URL encode object names to be
2925 * value, if any. For information about how to URL encode object names to be 3067 /// path safe, see Encoding URI Path Parts.
2926 * path safe, see Encoding URI Path Parts. 3068 ///
2927 * 3069 /// [destinationKmsKeyName] - Resource name of the Cloud KMS key, of the form
2928 * [destinationKmsKeyName] - Resource name of the Cloud KMS key, of the form 3070 /// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key,
2929 * projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that 3071 /// that will be used to encrypt the object. Overrides the object metadata's
2930 * will be used to encrypt the object. Overrides the object metadata's 3072 /// kms_key_name value, if any.
2931 * kms_key_name value, if any. 3073 ///
2932 * 3074 /// [destinationPredefinedAcl] - Apply a predefined set of access controls to
2933 * [destinationPredefinedAcl] - Apply a predefined set of access controls to 3075 /// the destination object.
2934 * the destination object. 3076 /// Possible string values are:
2935 * Possible string values are: 3077 /// - "authenticatedRead" : Object owner gets OWNER access, and
2936 * - "authenticatedRead" : Object owner gets OWNER access, and 3078 /// allAuthenticatedUsers get READER access.
2937 * allAuthenticatedUsers get READER access. 3079 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
2938 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 3080 /// team owners get OWNER access.
2939 * team owners get OWNER access. 3081 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
2940 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 3082 /// owners get READER access.
2941 * owners get READER access. 3083 /// - "private" : Object owner gets OWNER access.
2942 * - "private" : Object owner gets OWNER access. 3084 /// - "projectPrivate" : Object owner gets OWNER access, and project team
2943 * - "projectPrivate" : Object owner gets OWNER access, and project team 3085 /// members get access according to their roles.
2944 * members get access according to their roles. 3086 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
2945 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 3087 /// access.
2946 * access. 3088 ///
2947 * 3089 /// [ifGenerationMatch] - Makes the operation conditional on whether the
2948 * [ifGenerationMatch] - Makes the operation conditional on whether the 3090 /// object's current generation matches the given value. Setting to 0 makes
2949 * object's current generation matches the given value. Setting to 0 makes the 3091 /// the operation succeed only if there are no live versions of the object.
2950 * operation succeed only if there are no live versions of the object. 3092 ///
2951 * 3093 /// [ifGenerationNotMatch] - Makes the operation conditional on whether the
2952 * [ifGenerationNotMatch] - Makes the operation conditional on whether the 3094 /// object's current generation does not match the given value. If no live
2953 * object's current generation does not match the given value. If no live 3095 /// object exists, the precondition fails. Setting to 0 makes the operation
2954 * object exists, the precondition fails. Setting to 0 makes the operation 3096 /// succeed only if there is a live version of the object.
2955 * succeed only if there is a live version of the object. 3097 ///
2956 * 3098 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
2957 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 3099 /// destination object's current metageneration matches the given value.
2958 * destination object's current metageneration matches the given value. 3100 ///
2959 * 3101 /// [ifMetagenerationNotMatch] - Makes the operation conditional on whether
2960 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the 3102 /// the destination object's current metageneration does not match the given
2961 * destination object's current metageneration does not match the given value. 3103 /// value.
2962 * 3104 ///
2963 * [ifSourceGenerationMatch] - Makes the operation conditional on whether the 3105 /// [ifSourceGenerationMatch] - Makes the operation conditional on whether
2964 * source object's current generation matches the given value. 3106 /// the source object's current generation matches the given value.
2965 * 3107 ///
2966 * [ifSourceGenerationNotMatch] - Makes the operation conditional on whether 3108 /// [ifSourceGenerationNotMatch] - Makes the operation conditional on whether
2967 * the source object's current generation does not match the given value. 3109 /// the source object's current generation does not match the given value.
2968 * 3110 ///
2969 * [ifSourceMetagenerationMatch] - Makes the operation conditional on whether 3111 /// [ifSourceMetagenerationMatch] - Makes the operation conditional on
2970 * the source object's current metageneration matches the given value. 3112 /// whether the source object's current metageneration matches the given
2971 * 3113 /// value.
2972 * [ifSourceMetagenerationNotMatch] - Makes the operation conditional on 3114 ///
2973 * whether the source object's current metageneration does not match the given 3115 /// [ifSourceMetagenerationNotMatch] - Makes the operation conditional on
2974 * value. 3116 /// whether the source object's current metageneration does not match the
2975 * 3117 /// given value.
2976 * [maxBytesRewrittenPerCall] - The maximum number of bytes that will be 3118 ///
2977 * rewritten per rewrite request. Most callers shouldn't need to specify this 3119 /// [maxBytesRewrittenPerCall] - The maximum number of bytes that will be
2978 * parameter - it is primarily in place to support testing. If specified the 3120 /// rewritten per rewrite request. Most callers shouldn't need to specify
2979 * value must be an integral multiple of 1 MiB (1048576). Also, this only 3121 /// this parameter - it is primarily in place to support testing. If
2980 * applies to requests where the source and destination span locations and/or 3122 /// specified the value must be an integral multiple of 1 MiB (1048576).
2981 * storage classes. Finally, this value must not change across rewrite calls 3123 /// Also, this only applies to requests where the source and destination span
2982 * else you'll get an error that the rewriteToken is invalid. 3124 /// locations and/or storage classes. Finally, this value must not change
2983 * 3125 /// across rewrite calls else you'll get an error that the rewriteToken is
2984 * [projection] - Set of properties to return. Defaults to noAcl, unless the 3126 /// invalid.
2985 * object resource specifies the acl property, when it defaults to full. 3127 ///
2986 * Possible string values are: 3128 /// [projection] - Set of properties to return. Defaults to noAcl, unless the
2987 * - "full" : Include all properties. 3129 /// object resource specifies the acl property, when it defaults to full.
2988 * - "noAcl" : Omit the owner, acl property. 3130 /// Possible string values are:
2989 * 3131 /// - "full" : Include all properties.
2990 * [rewriteToken] - Include this field (from the previous rewrite response) on 3132 /// - "noAcl" : Omit the owner, acl property.
2991 * each rewrite request after the first one, until the rewrite response 'done' 3133 ///
2992 * flag is true. Calls that provide a rewriteToken can omit all other request 3134 /// [rewriteToken] - Include this field (from the previous rewrite response)
2993 * fields, but if included those fields must match the values provided in the 3135 /// on each rewrite request after the first one, until the rewrite response
2994 * first rewrite request. 3136 /// 'done' flag is true. Calls that provide a rewriteToken can omit all other
2995 * 3137 /// request fields, but if included those fields must match the values
2996 * [sourceGeneration] - If present, selects a specific revision of the source 3138 /// provided in the first rewrite request.
2997 * object (as opposed to the latest version, the default). 3139 ///
2998 * 3140 /// [sourceGeneration] - If present, selects a specific revision of the
2999 * [userProject] - The project to be billed for this request, for Requester 3141 /// source object (as opposed to the latest version, the default).
3000 * Pays buckets. 3142 ///
3001 * 3143 /// [userProject] - The project to be billed for this request, for Requester
3002 * Completes with a [RewriteResponse]. 3144 /// Pays buckets.
3003 * 3145 ///
3004 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3146 /// Completes with a [RewriteResponse].
3005 * error. 3147 ///
3006 * 3148 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3007 * If the used [http.Client] completes with an error when making a REST call, 3149 /// an error.
3008 * this method will complete with the same error. 3150 ///
3009 */ 3151 /// If the used [http.Client] completes with an error when making a REST
3010 async.Future<RewriteResponse> rewrite(Object request, core.String sourceBucket , core.String sourceObject, core.String destinationBucket, core.String destinati onObject, {core.String destinationKmsKeyName, core.String destinationPredefinedA cl, core.String ifGenerationMatch, core.String ifGenerationNotMatch, core.String ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String ifSour ceGenerationMatch, core.String ifSourceGenerationNotMatch, core.String ifSourceM etagenerationMatch, core.String ifSourceMetagenerationNotMatch, core.String maxB ytesRewrittenPerCall, core.String projection, core.String rewriteToken, core.Str ing sourceGeneration, core.String userProject}) { 3152 /// call, this method will complete with the same error.
3153 async.Future<RewriteResponse> rewrite(
3154 Object request,
3155 core.String sourceBucket,
3156 core.String sourceObject,
3157 core.String destinationBucket,
3158 core.String destinationObject,
3159 {core.String destinationKmsKeyName,
3160 core.String destinationPredefinedAcl,
3161 core.String ifGenerationMatch,
3162 core.String ifGenerationNotMatch,
3163 core.String ifMetagenerationMatch,
3164 core.String ifMetagenerationNotMatch,
3165 core.String ifSourceGenerationMatch,
3166 core.String ifSourceGenerationNotMatch,
3167 core.String ifSourceMetagenerationMatch,
3168 core.String ifSourceMetagenerationNotMatch,
3169 core.String maxBytesRewrittenPerCall,
3170 core.String projection,
3171 core.String rewriteToken,
3172 core.String sourceGeneration,
3173 core.String userProject}) {
3011 var _url = null; 3174 var _url = null;
3012 var _queryParams = new core.Map(); 3175 var _queryParams = new core.Map();
3013 var _uploadMedia = null; 3176 var _uploadMedia = null;
3014 var _uploadOptions = null; 3177 var _uploadOptions = null;
3015 var _downloadOptions = commons.DownloadOptions.Metadata; 3178 var _downloadOptions = commons.DownloadOptions.Metadata;
3016 var _body = null; 3179 var _body = null;
3017 3180
3018 if (request != null) { 3181 if (request != null) {
3019 _body = convert.JSON.encode((request).toJson()); 3182 _body = convert.JSON.encode((request).toJson());
3020 } 3183 }
(...skipping 27 matching lines...) Expand all
3048 if (ifMetagenerationNotMatch != null) { 3211 if (ifMetagenerationNotMatch != null) {
3049 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; 3212 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch];
3050 } 3213 }
3051 if (ifSourceGenerationMatch != null) { 3214 if (ifSourceGenerationMatch != null) {
3052 _queryParams["ifSourceGenerationMatch"] = [ifSourceGenerationMatch]; 3215 _queryParams["ifSourceGenerationMatch"] = [ifSourceGenerationMatch];
3053 } 3216 }
3054 if (ifSourceGenerationNotMatch != null) { 3217 if (ifSourceGenerationNotMatch != null) {
3055 _queryParams["ifSourceGenerationNotMatch"] = [ifSourceGenerationNotMatch]; 3218 _queryParams["ifSourceGenerationNotMatch"] = [ifSourceGenerationNotMatch];
3056 } 3219 }
3057 if (ifSourceMetagenerationMatch != null) { 3220 if (ifSourceMetagenerationMatch != null) {
3058 _queryParams["ifSourceMetagenerationMatch"] = [ifSourceMetagenerationMatch ]; 3221 _queryParams["ifSourceMetagenerationMatch"] = [
3222 ifSourceMetagenerationMatch
3223 ];
3059 } 3224 }
3060 if (ifSourceMetagenerationNotMatch != null) { 3225 if (ifSourceMetagenerationNotMatch != null) {
3061 _queryParams["ifSourceMetagenerationNotMatch"] = [ifSourceMetagenerationNo tMatch]; 3226 _queryParams["ifSourceMetagenerationNotMatch"] = [
3227 ifSourceMetagenerationNotMatch
3228 ];
3062 } 3229 }
3063 if (maxBytesRewrittenPerCall != null) { 3230 if (maxBytesRewrittenPerCall != null) {
3064 _queryParams["maxBytesRewrittenPerCall"] = [maxBytesRewrittenPerCall]; 3231 _queryParams["maxBytesRewrittenPerCall"] = [maxBytesRewrittenPerCall];
3065 } 3232 }
3066 if (projection != null) { 3233 if (projection != null) {
3067 _queryParams["projection"] = [projection]; 3234 _queryParams["projection"] = [projection];
3068 } 3235 }
3069 if (rewriteToken != null) { 3236 if (rewriteToken != null) {
3070 _queryParams["rewriteToken"] = [rewriteToken]; 3237 _queryParams["rewriteToken"] = [rewriteToken];
3071 } 3238 }
3072 if (sourceGeneration != null) { 3239 if (sourceGeneration != null) {
3073 _queryParams["sourceGeneration"] = [sourceGeneration]; 3240 _queryParams["sourceGeneration"] = [sourceGeneration];
3074 } 3241 }
3075 if (userProject != null) { 3242 if (userProject != null) {
3076 _queryParams["userProject"] = [userProject]; 3243 _queryParams["userProject"] = [userProject];
3077 } 3244 }
3078 3245
3079 _url = 'b/' + commons.Escaper.ecapeVariable('$sourceBucket') + '/o/' + commo ns.Escaper.ecapeVariable('$sourceObject') + '/rewriteTo/b/' + commons.Escaper.ec apeVariable('$destinationBucket') + '/o/' + commons.Escaper.ecapeVariable('$dest inationObject'); 3246 _url = 'b/' +
3247 commons.Escaper.ecapeVariable('$sourceBucket') +
3248 '/o/' +
3249 commons.Escaper.ecapeVariable('$sourceObject') +
3250 '/rewriteTo/b/' +
3251 commons.Escaper.ecapeVariable('$destinationBucket') +
3252 '/o/' +
3253 commons.Escaper.ecapeVariable('$destinationObject');
3080 3254
3081 var _response = _requester.request(_url, 3255 var _response = _requester.request(_url, "POST",
3082 "POST", 3256 body: _body,
3083 body: _body, 3257 queryParams: _queryParams,
3084 queryParams: _queryParams, 3258 uploadOptions: _uploadOptions,
3085 uploadOptions: _uploadOptions, 3259 uploadMedia: _uploadMedia,
3086 uploadMedia: _uploadMedia, 3260 downloadOptions: _downloadOptions);
3087 downloadOptions: _downloadOptions);
3088 return _response.then((data) => new RewriteResponse.fromJson(data)); 3261 return _response.then((data) => new RewriteResponse.fromJson(data));
3089 } 3262 }
3090 3263
3091 /** 3264 /// Updates an IAM policy for the specified object.
3092 * Updates an IAM policy for the specified object. 3265 ///
3093 * 3266 /// [request] - The metadata request object.
3094 * [request] - The metadata request object. 3267 ///
3095 * 3268 /// Request parameters:
3096 * Request parameters: 3269 ///
3097 * 3270 /// [bucket] - Name of the bucket in which the object resides.
3098 * [bucket] - Name of the bucket in which the object resides. 3271 ///
3099 * 3272 /// [object] - Name of the object. For information about how to URL encode
3100 * [object] - Name of the object. For information about how to URL encode 3273 /// object names to be path safe, see Encoding URI Path Parts.
3101 * object names to be path safe, see Encoding URI Path Parts. 3274 ///
3102 * 3275 /// [generation] - If present, selects a specific revision of this object (as
3103 * [generation] - If present, selects a specific revision of this object (as 3276 /// opposed to the latest version, the default).
3104 * opposed to the latest version, the default). 3277 ///
3105 * 3278 /// [userProject] - The project to be billed for this request, for Requester
3106 * [userProject] - The project to be billed for this request, for Requester 3279 /// Pays buckets.
3107 * Pays buckets. 3280 ///
3108 * 3281 /// Completes with a [Policy].
3109 * Completes with a [Policy]. 3282 ///
3110 * 3283 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3111 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3284 /// an error.
3112 * error. 3285 ///
3113 * 3286 /// If the used [http.Client] completes with an error when making a REST
3114 * If the used [http.Client] completes with an error when making a REST call, 3287 /// call, this method will complete with the same error.
3115 * this method will complete with the same error. 3288 async.Future<Policy> setIamPolicy(
3116 */ 3289 Policy request, core.String bucket, core.String object,
3117 async.Future<Policy> setIamPolicy(Policy request, core.String bucket, core.Str ing object, {core.String generation, core.String userProject}) { 3290 {core.String generation, core.String userProject}) {
3118 var _url = null; 3291 var _url = null;
3119 var _queryParams = new core.Map(); 3292 var _queryParams = new core.Map();
3120 var _uploadMedia = null; 3293 var _uploadMedia = null;
3121 var _uploadOptions = null; 3294 var _uploadOptions = null;
3122 var _downloadOptions = commons.DownloadOptions.Metadata; 3295 var _downloadOptions = commons.DownloadOptions.Metadata;
3123 var _body = null; 3296 var _body = null;
3124 3297
3125 if (request != null) { 3298 if (request != null) {
3126 _body = convert.JSON.encode((request).toJson()); 3299 _body = convert.JSON.encode((request).toJson());
3127 } 3300 }
3128 if (bucket == null) { 3301 if (bucket == null) {
3129 throw new core.ArgumentError("Parameter bucket is required."); 3302 throw new core.ArgumentError("Parameter bucket is required.");
3130 } 3303 }
3131 if (object == null) { 3304 if (object == null) {
3132 throw new core.ArgumentError("Parameter object is required."); 3305 throw new core.ArgumentError("Parameter object is required.");
3133 } 3306 }
3134 if (generation != null) { 3307 if (generation != null) {
3135 _queryParams["generation"] = [generation]; 3308 _queryParams["generation"] = [generation];
3136 } 3309 }
3137 if (userProject != null) { 3310 if (userProject != null) {
3138 _queryParams["userProject"] = [userProject]; 3311 _queryParams["userProject"] = [userProject];
3139 } 3312 }
3140 3313
3141 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/iam'; 3314 _url = 'b/' +
3315 commons.Escaper.ecapeVariable('$bucket') +
3316 '/o/' +
3317 commons.Escaper.ecapeVariable('$object') +
3318 '/iam';
3142 3319
3143 var _response = _requester.request(_url, 3320 var _response = _requester.request(_url, "PUT",
3144 "PUT", 3321 body: _body,
3145 body: _body, 3322 queryParams: _queryParams,
3146 queryParams: _queryParams, 3323 uploadOptions: _uploadOptions,
3147 uploadOptions: _uploadOptions, 3324 uploadMedia: _uploadMedia,
3148 uploadMedia: _uploadMedia, 3325 downloadOptions: _downloadOptions);
3149 downloadOptions: _downloadOptions);
3150 return _response.then((data) => new Policy.fromJson(data)); 3326 return _response.then((data) => new Policy.fromJson(data));
3151 } 3327 }
3152 3328
3153 /** 3329 /// Tests a set of permissions on the given object to see which, if any, are
3154 * Tests a set of permissions on the given object to see which, if any, are 3330 /// held by the caller.
3155 * held by the caller. 3331 ///
3156 * 3332 /// Request parameters:
3157 * Request parameters: 3333 ///
3158 * 3334 /// [bucket] - Name of the bucket in which the object resides.
3159 * [bucket] - Name of the bucket in which the object resides. 3335 ///
3160 * 3336 /// [object] - Name of the object. For information about how to URL encode
3161 * [object] - Name of the object. For information about how to URL encode 3337 /// object names to be path safe, see Encoding URI Path Parts.
3162 * object names to be path safe, see Encoding URI Path Parts. 3338 ///
3163 * 3339 /// [permissions] - Permissions to test.
3164 * [permissions] - Permissions to test. 3340 ///
3165 * 3341 /// [generation] - If present, selects a specific revision of this object (as
3166 * [generation] - If present, selects a specific revision of this object (as 3342 /// opposed to the latest version, the default).
3167 * opposed to the latest version, the default). 3343 ///
3168 * 3344 /// [userProject] - The project to be billed for this request, for Requester
3169 * [userProject] - The project to be billed for this request, for Requester 3345 /// Pays buckets.
3170 * Pays buckets. 3346 ///
3171 * 3347 /// Completes with a [TestIamPermissionsResponse].
3172 * Completes with a [TestIamPermissionsResponse]. 3348 ///
3173 * 3349 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3350 /// an error.
3175 * error. 3351 ///
3176 * 3352 /// If the used [http.Client] completes with an error when making a REST
3177 * If the used [http.Client] completes with an error when making a REST call, 3353 /// call, this method will complete with the same error.
3178 * this method will complete with the same error. 3354 async.Future<TestIamPermissionsResponse> testIamPermissions(
3179 */ 3355 core.String bucket,
3180 async.Future<TestIamPermissionsResponse> testIamPermissions(core.String bucket , core.String object, core.List<core.String> permissions, {core.String generatio n, core.String userProject}) { 3356 core.String object,
3357 core.List<core.String> permissions,
3358 {core.String generation,
3359 core.String userProject}) {
3181 var _url = null; 3360 var _url = null;
3182 var _queryParams = new core.Map(); 3361 var _queryParams = new core.Map();
3183 var _uploadMedia = null; 3362 var _uploadMedia = null;
3184 var _uploadOptions = null; 3363 var _uploadOptions = null;
3185 var _downloadOptions = commons.DownloadOptions.Metadata; 3364 var _downloadOptions = commons.DownloadOptions.Metadata;
3186 var _body = null; 3365 var _body = null;
3187 3366
3188 if (bucket == null) { 3367 if (bucket == null) {
3189 throw new core.ArgumentError("Parameter bucket is required."); 3368 throw new core.ArgumentError("Parameter bucket is required.");
3190 } 3369 }
3191 if (object == null) { 3370 if (object == null) {
3192 throw new core.ArgumentError("Parameter object is required."); 3371 throw new core.ArgumentError("Parameter object is required.");
3193 } 3372 }
3194 if (permissions == null || permissions.isEmpty) { 3373 if (permissions == null || permissions.isEmpty) {
3195 throw new core.ArgumentError("Parameter permissions is required."); 3374 throw new core.ArgumentError("Parameter permissions is required.");
3196 } 3375 }
3197 _queryParams["permissions"] = permissions; 3376 _queryParams["permissions"] = permissions;
3198 if (generation != null) { 3377 if (generation != null) {
3199 _queryParams["generation"] = [generation]; 3378 _queryParams["generation"] = [generation];
3200 } 3379 }
3201 if (userProject != null) { 3380 if (userProject != null) {
3202 _queryParams["userProject"] = [userProject]; 3381 _queryParams["userProject"] = [userProject];
3203 } 3382 }
3204 3383
3205 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object') + '/iam/testPermissions'; 3384 _url = 'b/' +
3385 commons.Escaper.ecapeVariable('$bucket') +
3386 '/o/' +
3387 commons.Escaper.ecapeVariable('$object') +
3388 '/iam/testPermissions';
3206 3389
3207 var _response = _requester.request(_url, 3390 var _response = _requester.request(_url, "GET",
3208 "GET", 3391 body: _body,
3209 body: _body, 3392 queryParams: _queryParams,
3210 queryParams: _queryParams, 3393 uploadOptions: _uploadOptions,
3211 uploadOptions: _uploadOptions, 3394 uploadMedia: _uploadMedia,
3212 uploadMedia: _uploadMedia, 3395 downloadOptions: _downloadOptions);
3213 downloadOptions: _downloadOptions); 3396 return _response
3214 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data )); 3397 .then((data) => new TestIamPermissionsResponse.fromJson(data));
3215 } 3398 }
3216 3399
3217 /** 3400 /// Updates an object's metadata.
3218 * Updates an object's metadata. 3401 ///
3219 * 3402 /// [request] - The metadata request object.
3220 * [request] - The metadata request object. 3403 ///
3221 * 3404 /// Request parameters:
3222 * Request parameters: 3405 ///
3223 * 3406 /// [bucket] - Name of the bucket in which the object resides.
3224 * [bucket] - Name of the bucket in which the object resides. 3407 ///
3225 * 3408 /// [object] - Name of the object. For information about how to URL encode
3226 * [object] - Name of the object. For information about how to URL encode 3409 /// object names to be path safe, see Encoding URI Path Parts.
3227 * object names to be path safe, see Encoding URI Path Parts. 3410 ///
3228 * 3411 /// [generation] - If present, selects a specific revision of this object (as
3229 * [generation] - If present, selects a specific revision of this object (as 3412 /// opposed to the latest version, the default).
3230 * opposed to the latest version, the default). 3413 ///
3231 * 3414 /// [ifGenerationMatch] - Makes the operation conditional on whether the
3232 * [ifGenerationMatch] - Makes the operation conditional on whether the 3415 /// object's current generation matches the given value. Setting to 0 makes
3233 * object's current generation matches the given value. Setting to 0 makes the 3416 /// the operation succeed only if there are no live versions of the object.
3234 * operation succeed only if there are no live versions of the object. 3417 ///
3235 * 3418 /// [ifGenerationNotMatch] - Makes the operation conditional on whether the
3236 * [ifGenerationNotMatch] - Makes the operation conditional on whether the 3419 /// object's current generation does not match the given value. If no live
3237 * object's current generation does not match the given value. If no live 3420 /// object exists, the precondition fails. Setting to 0 makes the operation
3238 * object exists, the precondition fails. Setting to 0 makes the operation 3421 /// succeed only if there is a live version of the object.
3239 * succeed only if there is a live version of the object. 3422 ///
3240 * 3423 /// [ifMetagenerationMatch] - Makes the operation conditional on whether the
3241 * [ifMetagenerationMatch] - Makes the operation conditional on whether the 3424 /// object's current metageneration matches the given value.
3242 * object's current metageneration matches the given value. 3425 ///
3243 * 3426 /// [ifMetagenerationNotMatch] - Makes the operation conditional on whether
3244 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the 3427 /// the object's current metageneration does not match the given value.
3245 * object's current metageneration does not match the given value. 3428 ///
3246 * 3429 /// [predefinedAcl] - Apply a predefined set of access controls to this
3247 * [predefinedAcl] - Apply a predefined set of access controls to this object. 3430 /// object.
3248 * Possible string values are: 3431 /// Possible string values are:
3249 * - "authenticatedRead" : Object owner gets OWNER access, and 3432 /// - "authenticatedRead" : Object owner gets OWNER access, and
3250 * allAuthenticatedUsers get READER access. 3433 /// allAuthenticatedUsers get READER access.
3251 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project 3434 /// - "bucketOwnerFullControl" : Object owner gets OWNER access, and project
3252 * team owners get OWNER access. 3435 /// team owners get OWNER access.
3253 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team 3436 /// - "bucketOwnerRead" : Object owner gets OWNER access, and project team
3254 * owners get READER access. 3437 /// owners get READER access.
3255 * - "private" : Object owner gets OWNER access. 3438 /// - "private" : Object owner gets OWNER access.
3256 * - "projectPrivate" : Object owner gets OWNER access, and project team 3439 /// - "projectPrivate" : Object owner gets OWNER access, and project team
3257 * members get access according to their roles. 3440 /// members get access according to their roles.
3258 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER 3441 /// - "publicRead" : Object owner gets OWNER access, and allUsers get READER
3259 * access. 3442 /// access.
3260 * 3443 ///
3261 * [projection] - Set of properties to return. Defaults to full. 3444 /// [projection] - Set of properties to return. Defaults to full.
3262 * Possible string values are: 3445 /// Possible string values are:
3263 * - "full" : Include all properties. 3446 /// - "full" : Include all properties.
3264 * - "noAcl" : Omit the owner, acl property. 3447 /// - "noAcl" : Omit the owner, acl property.
3265 * 3448 ///
3266 * [userProject] - The project to be billed for this request, for Requester 3449 /// [userProject] - The project to be billed for this request, for Requester
3267 * Pays buckets. 3450 /// Pays buckets.
3268 * 3451 ///
3269 * [downloadOptions] - Options for downloading. A download can be either a 3452 /// [downloadOptions] - Options for downloading. A download can be either a
3270 * Metadata (default) or Media download. Partial Media downloads are possible 3453 /// Metadata (default) or Media download. Partial Media downloads are
3271 * as well. 3454 /// possible as well.
3272 * 3455 ///
3273 * Completes with a 3456 /// Completes with a
3274 * 3457 ///
3275 * - [Object] for Metadata downloads (see [downloadOptions]). 3458 /// - [Object] for Metadata downloads (see [downloadOptions]).
3276 * 3459 ///
3277 * - [commons.Media] for Media downloads (see [downloadOptions]). 3460 /// - [commons.Media] for Media downloads (see [downloadOptions]).
3278 * 3461 ///
3279 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3462 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3280 * error. 3463 /// an error.
3281 * 3464 ///
3282 * If the used [http.Client] completes with an error when making a REST call, 3465 /// If the used [http.Client] completes with an error when making a REST
3283 * this method will complete with the same error. 3466 /// call, this method will complete with the same error.
3284 */ 3467 async.Future update(Object request, core.String bucket, core.String object,
3285 async.Future update(Object request, core.String bucket, core.String object, {c ore.String generation, core.String ifGenerationMatch, core.String ifGenerationNo tMatch, core.String ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String predefinedAcl, core.String projection, core.String userProject, com mons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { 3468 {core.String generation,
3469 core.String ifGenerationMatch,
3470 core.String ifGenerationNotMatch,
3471 core.String ifMetagenerationMatch,
3472 core.String ifMetagenerationNotMatch,
3473 core.String predefinedAcl,
3474 core.String projection,
3475 core.String userProject,
3476 commons.DownloadOptions downloadOptions:
3477 commons.DownloadOptions.Metadata}) {
3286 var _url = null; 3478 var _url = null;
3287 var _queryParams = new core.Map(); 3479 var _queryParams = new core.Map();
3288 var _uploadMedia = null; 3480 var _uploadMedia = null;
3289 var _uploadOptions = null; 3481 var _uploadOptions = null;
3290 var _downloadOptions = commons.DownloadOptions.Metadata; 3482 var _downloadOptions = commons.DownloadOptions.Metadata;
3291 var _body = null; 3483 var _body = null;
3292 3484
3293 if (request != null) { 3485 if (request != null) {
3294 _body = convert.JSON.encode((request).toJson()); 3486 _body = convert.JSON.encode((request).toJson());
3295 } 3487 }
(...skipping 23 matching lines...) Expand all
3319 } 3511 }
3320 if (projection != null) { 3512 if (projection != null) {
3321 _queryParams["projection"] = [projection]; 3513 _queryParams["projection"] = [projection];
3322 } 3514 }
3323 if (userProject != null) { 3515 if (userProject != null) {
3324 _queryParams["userProject"] = [userProject]; 3516 _queryParams["userProject"] = [userProject];
3325 } 3517 }
3326 3518
3327 _downloadOptions = downloadOptions; 3519 _downloadOptions = downloadOptions;
3328 3520
3329 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc aper.ecapeVariable('$object'); 3521 _url = 'b/' +
3522 commons.Escaper.ecapeVariable('$bucket') +
3523 '/o/' +
3524 commons.Escaper.ecapeVariable('$object');
3330 3525
3331 var _response = _requester.request(_url, 3526 var _response = _requester.request(_url, "PUT",
3332 "PUT", 3527 body: _body,
3333 body: _body, 3528 queryParams: _queryParams,
3334 queryParams: _queryParams, 3529 uploadOptions: _uploadOptions,
3335 uploadOptions: _uploadOptions, 3530 uploadMedia: _uploadMedia,
3336 uploadMedia: _uploadMedia, 3531 downloadOptions: _downloadOptions);
3337 downloadOptions: _downloadOptions);
3338 if (_downloadOptions == null || 3532 if (_downloadOptions == null ||
3339 _downloadOptions == commons.DownloadOptions.Metadata) { 3533 _downloadOptions == commons.DownloadOptions.Metadata) {
3340 return _response.then((data) => new Object.fromJson(data)); 3534 return _response.then((data) => new Object.fromJson(data));
3341 } else { 3535 } else {
3342 return _response; 3536 return _response;
3343 } 3537 }
3344 } 3538 }
3345 3539
3346 /** 3540 /// Watch for changes on all objects in a bucket.
3347 * Watch for changes on all objects in a bucket. 3541 ///
3348 * 3542 /// [request] - The metadata request object.
3349 * [request] - The metadata request object. 3543 ///
3350 * 3544 /// Request parameters:
3351 * Request parameters: 3545 ///
3352 * 3546 /// [bucket] - Name of the bucket in which to look for objects.
3353 * [bucket] - Name of the bucket in which to look for objects. 3547 ///
3354 * 3548 /// [delimiter] - Returns results in a directory-like mode. items will
3355 * [delimiter] - Returns results in a directory-like mode. items will contain 3549 /// contain only objects whose names, aside from the prefix, do not contain
3356 * only objects whose names, aside from the prefix, do not contain delimiter. 3550 /// delimiter. Objects whose names, aside from the prefix, contain delimiter
3357 * Objects whose names, aside from the prefix, contain delimiter will have 3551 /// will have their name, truncated after the delimiter, returned in
3358 * their name, truncated after the delimiter, returned in prefixes. Duplicate 3552 /// prefixes. Duplicate prefixes are omitted.
3359 * prefixes are omitted. 3553 ///
3360 * 3554 /// [maxResults] - Maximum number of items plus prefixes to return in a
3361 * [maxResults] - Maximum number of items plus prefixes to return in a single 3555 /// single page of responses. As duplicate prefixes are omitted, fewer total
3362 * page of responses. As duplicate prefixes are omitted, fewer total results 3556 /// results may be returned than requested. The service will use this
3363 * may be returned than requested. The service will use this parameter or 3557 /// parameter or 1,000 items, whichever is smaller.
3364 * 1,000 items, whichever is smaller. 3558 ///
3365 * 3559 /// [pageToken] - A previously-returned page token representing part of the
3366 * [pageToken] - A previously-returned page token representing part of the 3560 /// larger set of results to view.
3367 * larger set of results to view. 3561 ///
3368 * 3562 /// [prefix] - Filter results to objects whose names begin with this prefix.
3369 * [prefix] - Filter results to objects whose names begin with this prefix. 3563 ///
3370 * 3564 /// [projection] - Set of properties to return. Defaults to noAcl.
3371 * [projection] - Set of properties to return. Defaults to noAcl. 3565 /// Possible string values are:
3372 * Possible string values are: 3566 /// - "full" : Include all properties.
3373 * - "full" : Include all properties. 3567 /// - "noAcl" : Omit the owner, acl property.
3374 * - "noAcl" : Omit the owner, acl property. 3568 ///
3375 * 3569 /// [userProject] - The project to be billed for this request, for Requester
3376 * [userProject] - The project to be billed for this request, for Requester 3570 /// Pays buckets.
3377 * Pays buckets. 3571 ///
3378 * 3572 /// [versions] - If true, lists all versions of an object as distinct
3379 * [versions] - If true, lists all versions of an object as distinct results. 3573 /// results. The default is false. For more information, see Object
3380 * The default is false. For more information, see Object Versioning. 3574 /// Versioning.
3381 * 3575 ///
3382 * Completes with a [Channel]. 3576 /// Completes with a [Channel].
3383 * 3577 ///
3384 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3578 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3385 * error. 3579 /// an error.
3386 * 3580 ///
3387 * If the used [http.Client] completes with an error when making a REST call, 3581 /// If the used [http.Client] completes with an error when making a REST
3388 * this method will complete with the same error. 3582 /// call, this method will complete with the same error.
3389 */ 3583 async.Future<Channel> watchAll(Channel request, core.String bucket,
3390 async.Future<Channel> watchAll(Channel request, core.String bucket, {core.Stri ng delimiter, core.int maxResults, core.String pageToken, core.String prefix, co re.String projection, core.String userProject, core.bool versions}) { 3584 {core.String delimiter,
3585 core.int maxResults,
3586 core.String pageToken,
3587 core.String prefix,
3588 core.String projection,
3589 core.String userProject,
3590 core.bool versions}) {
3391 var _url = null; 3591 var _url = null;
3392 var _queryParams = new core.Map(); 3592 var _queryParams = new core.Map();
3393 var _uploadMedia = null; 3593 var _uploadMedia = null;
3394 var _uploadOptions = null; 3594 var _uploadOptions = null;
3395 var _downloadOptions = commons.DownloadOptions.Metadata; 3595 var _downloadOptions = commons.DownloadOptions.Metadata;
3396 var _body = null; 3596 var _body = null;
3397 3597
3398 if (request != null) { 3598 if (request != null) {
3399 _body = convert.JSON.encode((request).toJson()); 3599 _body = convert.JSON.encode((request).toJson());
3400 } 3600 }
(...skipping 17 matching lines...) Expand all
3418 } 3618 }
3419 if (userProject != null) { 3619 if (userProject != null) {
3420 _queryParams["userProject"] = [userProject]; 3620 _queryParams["userProject"] = [userProject];
3421 } 3621 }
3422 if (versions != null) { 3622 if (versions != null) {
3423 _queryParams["versions"] = ["${versions}"]; 3623 _queryParams["versions"] = ["${versions}"];
3424 } 3624 }
3425 3625
3426 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/watch'; 3626 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/watch';
3427 3627
3428 var _response = _requester.request(_url, 3628 var _response = _requester.request(_url, "POST",
3429 "POST", 3629 body: _body,
3430 body: _body, 3630 queryParams: _queryParams,
3431 queryParams: _queryParams, 3631 uploadOptions: _uploadOptions,
3432 uploadOptions: _uploadOptions, 3632 uploadMedia: _uploadMedia,
3433 uploadMedia: _uploadMedia, 3633 downloadOptions: _downloadOptions);
3434 downloadOptions: _downloadOptions);
3435 return _response.then((data) => new Channel.fromJson(data)); 3634 return _response.then((data) => new Channel.fromJson(data));
3436 } 3635 }
3437
3438 } 3636 }
3439 3637
3440
3441 class ProjectsResourceApi { 3638 class ProjectsResourceApi {
3442 final commons.ApiRequester _requester; 3639 final commons.ApiRequester _requester;
3443 3640
3444 ProjectsServiceAccountResourceApi get serviceAccount => new ProjectsServiceAcc ountResourceApi(_requester); 3641 ProjectsServiceAccountResourceApi get serviceAccount =>
3642 new ProjectsServiceAccountResourceApi(_requester);
3445 3643
3446 ProjectsResourceApi(commons.ApiRequester client) : 3644 ProjectsResourceApi(commons.ApiRequester client) : _requester = client;
3447 _requester = client;
3448 } 3645 }
3449 3646
3450
3451 class ProjectsServiceAccountResourceApi { 3647 class ProjectsServiceAccountResourceApi {
3452 final commons.ApiRequester _requester; 3648 final commons.ApiRequester _requester;
3453 3649
3454 ProjectsServiceAccountResourceApi(commons.ApiRequester client) : 3650 ProjectsServiceAccountResourceApi(commons.ApiRequester client)
3455 _requester = client; 3651 : _requester = client;
3456 3652
3457 /** 3653 /// Get the email address of this project's Google Cloud Storage service
3458 * Get the email address of this project's Google Cloud Storage service 3654 /// account.
3459 * account. 3655 ///
3460 * 3656 /// Request parameters:
3461 * Request parameters: 3657 ///
3462 * 3658 /// [projectId] - Project ID
3463 * [projectId] - Project ID 3659 ///
3464 * 3660 /// Completes with a [ServiceAccount].
3465 * Completes with a [ServiceAccount]. 3661 ///
3466 * 3662 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
3467 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3663 /// an error.
3468 * error. 3664 ///
3469 * 3665 /// If the used [http.Client] completes with an error when making a REST
3470 * If the used [http.Client] completes with an error when making a REST call, 3666 /// call, this method will complete with the same error.
3471 * this method will complete with the same error.
3472 */
3473 async.Future<ServiceAccount> get(core.String projectId) { 3667 async.Future<ServiceAccount> get(core.String projectId) {
3474 var _url = null; 3668 var _url = null;
3475 var _queryParams = new core.Map(); 3669 var _queryParams = new core.Map();
3476 var _uploadMedia = null; 3670 var _uploadMedia = null;
3477 var _uploadOptions = null; 3671 var _uploadOptions = null;
3478 var _downloadOptions = commons.DownloadOptions.Metadata; 3672 var _downloadOptions = commons.DownloadOptions.Metadata;
3479 var _body = null; 3673 var _body = null;
3480 3674
3481 if (projectId == null) { 3675 if (projectId == null) {
3482 throw new core.ArgumentError("Parameter projectId is required."); 3676 throw new core.ArgumentError("Parameter projectId is required.");
3483 } 3677 }
3484 3678
3485 _url = 'projects/' + commons.Escaper.ecapeVariable('$projectId') + '/service Account'; 3679 _url = 'projects/' +
3680 commons.Escaper.ecapeVariable('$projectId') +
3681 '/serviceAccount';
3486 3682
3487 var _response = _requester.request(_url, 3683 var _response = _requester.request(_url, "GET",
3488 "GET", 3684 body: _body,
3489 body: _body, 3685 queryParams: _queryParams,
3490 queryParams: _queryParams, 3686 uploadOptions: _uploadOptions,
3491 uploadOptions: _uploadOptions, 3687 uploadMedia: _uploadMedia,
3492 uploadMedia: _uploadMedia, 3688 downloadOptions: _downloadOptions);
3493 downloadOptions: _downloadOptions);
3494 return _response.then((data) => new ServiceAccount.fromJson(data)); 3689 return _response.then((data) => new ServiceAccount.fromJson(data));
3495 } 3690 }
3496
3497 } 3691 }
3498 3692
3499 3693 /// The bucket's billing configuration.
3500
3501 /** The bucket's billing configuration. */
3502 class BucketBilling { 3694 class BucketBilling {
3503 /** When set to true, bucket is requester pays. */ 3695 /// When set to true, bucket is requester pays.
3504 core.bool requesterPays; 3696 core.bool requesterPays;
3505 3697
3506 BucketBilling(); 3698 BucketBilling();
3507 3699
3508 BucketBilling.fromJson(core.Map _json) { 3700 BucketBilling.fromJson(core.Map _json) {
3509 if (_json.containsKey("requesterPays")) { 3701 if (_json.containsKey("requesterPays")) {
3510 requesterPays = _json["requesterPays"]; 3702 requesterPays = _json["requesterPays"];
3511 } 3703 }
3512 } 3704 }
3513 3705
3514 core.Map<core.String, core.Object> toJson() { 3706 core.Map<core.String, core.Object> toJson() {
3515 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3707 final core.Map<core.String, core.Object> _json =
3708 new core.Map<core.String, core.Object>();
3516 if (requesterPays != null) { 3709 if (requesterPays != null) {
3517 _json["requesterPays"] = requesterPays; 3710 _json["requesterPays"] = requesterPays;
3518 } 3711 }
3519 return _json; 3712 return _json;
3520 } 3713 }
3521 } 3714 }
3522 3715
3523 class BucketCors { 3716 class BucketCors {
3524 /** 3717 /// The value, in seconds, to return in the Access-Control-Max-Age header
3525 * The value, in seconds, to return in the Access-Control-Max-Age header used 3718 /// used in preflight responses.
3526 * in preflight responses.
3527 */
3528 core.int maxAgeSeconds; 3719 core.int maxAgeSeconds;
3529 /** 3720
3530 * The list of HTTP methods on which to include CORS response headers, (GET, 3721 /// The list of HTTP methods on which to include CORS response headers, (GET,
3531 * OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and 3722 /// OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and
3532 * means "any method". 3723 /// means "any method".
3533 */
3534 core.List<core.String> method; 3724 core.List<core.String> method;
3535 /** 3725
3536 * The list of Origins eligible to receive CORS response headers. Note: "*" is 3726 /// The list of Origins eligible to receive CORS response headers. Note: "*"
3537 * permitted in the list of origins, and means "any Origin". 3727 /// is permitted in the list of origins, and means "any Origin".
3538 */
3539 core.List<core.String> origin; 3728 core.List<core.String> origin;
3540 /** 3729
3541 * The list of HTTP headers other than the simple response headers to give 3730 /// The list of HTTP headers other than the simple response headers to give
3542 * permission for the user-agent to share across domains. 3731 /// permission for the user-agent to share across domains.
3543 */
3544 core.List<core.String> responseHeader; 3732 core.List<core.String> responseHeader;
3545 3733
3546 BucketCors(); 3734 BucketCors();
3547 3735
3548 BucketCors.fromJson(core.Map _json) { 3736 BucketCors.fromJson(core.Map _json) {
3549 if (_json.containsKey("maxAgeSeconds")) { 3737 if (_json.containsKey("maxAgeSeconds")) {
3550 maxAgeSeconds = _json["maxAgeSeconds"]; 3738 maxAgeSeconds = _json["maxAgeSeconds"];
3551 } 3739 }
3552 if (_json.containsKey("method")) { 3740 if (_json.containsKey("method")) {
3553 method = _json["method"]; 3741 method = _json["method"];
3554 } 3742 }
3555 if (_json.containsKey("origin")) { 3743 if (_json.containsKey("origin")) {
3556 origin = _json["origin"]; 3744 origin = _json["origin"];
3557 } 3745 }
3558 if (_json.containsKey("responseHeader")) { 3746 if (_json.containsKey("responseHeader")) {
3559 responseHeader = _json["responseHeader"]; 3747 responseHeader = _json["responseHeader"];
3560 } 3748 }
3561 } 3749 }
3562 3750
3563 core.Map<core.String, core.Object> toJson() { 3751 core.Map<core.String, core.Object> toJson() {
3564 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3752 final core.Map<core.String, core.Object> _json =
3753 new core.Map<core.String, core.Object>();
3565 if (maxAgeSeconds != null) { 3754 if (maxAgeSeconds != null) {
3566 _json["maxAgeSeconds"] = maxAgeSeconds; 3755 _json["maxAgeSeconds"] = maxAgeSeconds;
3567 } 3756 }
3568 if (method != null) { 3757 if (method != null) {
3569 _json["method"] = method; 3758 _json["method"] = method;
3570 } 3759 }
3571 if (origin != null) { 3760 if (origin != null) {
3572 _json["origin"] = origin; 3761 _json["origin"] = origin;
3573 } 3762 }
3574 if (responseHeader != null) { 3763 if (responseHeader != null) {
3575 _json["responseHeader"] = responseHeader; 3764 _json["responseHeader"] = responseHeader;
3576 } 3765 }
3577 return _json; 3766 return _json;
3578 } 3767 }
3579 } 3768 }
3580 3769
3581 /** 3770 /// Encryption configuration used by default for newly inserted objects, when
3582 * Encryption configuration used by default for newly inserted objects, when no 3771 /// no encryption config is specified.
3583 * encryption config is specified.
3584 */
3585 class BucketEncryption { 3772 class BucketEncryption {
3586 core.String defaultKmsKeyName; 3773 core.String defaultKmsKeyName;
3587 3774
3588 BucketEncryption(); 3775 BucketEncryption();
3589 3776
3590 BucketEncryption.fromJson(core.Map _json) { 3777 BucketEncryption.fromJson(core.Map _json) {
3591 if (_json.containsKey("defaultKmsKeyName")) { 3778 if (_json.containsKey("defaultKmsKeyName")) {
3592 defaultKmsKeyName = _json["defaultKmsKeyName"]; 3779 defaultKmsKeyName = _json["defaultKmsKeyName"];
3593 } 3780 }
3594 } 3781 }
3595 3782
3596 core.Map<core.String, core.Object> toJson() { 3783 core.Map<core.String, core.Object> toJson() {
3597 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3784 final core.Map<core.String, core.Object> _json =
3785 new core.Map<core.String, core.Object>();
3598 if (defaultKmsKeyName != null) { 3786 if (defaultKmsKeyName != null) {
3599 _json["defaultKmsKeyName"] = defaultKmsKeyName; 3787 _json["defaultKmsKeyName"] = defaultKmsKeyName;
3600 } 3788 }
3601 return _json; 3789 return _json;
3602 } 3790 }
3603 } 3791 }
3604 3792
3605 /** The action to take. */ 3793 /// The action to take.
3606 class BucketLifecycleRuleAction { 3794 class BucketLifecycleRuleAction {
3607 /** 3795 /// Target storage class. Required iff the type of the action is
3608 * Target storage class. Required iff the type of the action is 3796 /// SetStorageClass.
3609 * SetStorageClass.
3610 */
3611 core.String storageClass; 3797 core.String storageClass;
3612 /** 3798
3613 * Type of the action. Currently, only Delete and SetStorageClass are 3799 /// Type of the action. Currently, only Delete and SetStorageClass are
3614 * supported. 3800 /// supported.
3615 */
3616 core.String type; 3801 core.String type;
3617 3802
3618 BucketLifecycleRuleAction(); 3803 BucketLifecycleRuleAction();
3619 3804
3620 BucketLifecycleRuleAction.fromJson(core.Map _json) { 3805 BucketLifecycleRuleAction.fromJson(core.Map _json) {
3621 if (_json.containsKey("storageClass")) { 3806 if (_json.containsKey("storageClass")) {
3622 storageClass = _json["storageClass"]; 3807 storageClass = _json["storageClass"];
3623 } 3808 }
3624 if (_json.containsKey("type")) { 3809 if (_json.containsKey("type")) {
3625 type = _json["type"]; 3810 type = _json["type"];
3626 } 3811 }
3627 } 3812 }
3628 3813
3629 core.Map<core.String, core.Object> toJson() { 3814 core.Map<core.String, core.Object> toJson() {
3630 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3815 final core.Map<core.String, core.Object> _json =
3816 new core.Map<core.String, core.Object>();
3631 if (storageClass != null) { 3817 if (storageClass != null) {
3632 _json["storageClass"] = storageClass; 3818 _json["storageClass"] = storageClass;
3633 } 3819 }
3634 if (type != null) { 3820 if (type != null) {
3635 _json["type"] = type; 3821 _json["type"] = type;
3636 } 3822 }
3637 return _json; 3823 return _json;
3638 } 3824 }
3639 } 3825 }
3640 3826
3641 /** The condition(s) under which the action will be taken. */ 3827 /// The condition(s) under which the action will be taken.
3642 class BucketLifecycleRuleCondition { 3828 class BucketLifecycleRuleCondition {
3643 /** 3829 /// Age of an object (in days). This condition is satisfied when an object
3644 * Age of an object (in days). This condition is satisfied when an object 3830 /// reaches the specified age.
3645 * reaches the specified age.
3646 */
3647 core.int age; 3831 core.int age;
3648 /** 3832
3649 * A date in RFC 3339 format with only the date part (for instance, 3833 /// A date in RFC 3339 format with only the date part (for instance,
3650 * "2013-01-15"). This condition is satisfied when an object is created before 3834 /// "2013-01-15"). This condition is satisfied when an object is created
3651 * midnight of the specified date in UTC. 3835 /// before midnight of the specified date in UTC.
3652 */
3653 core.DateTime createdBefore; 3836 core.DateTime createdBefore;
3654 /** 3837
3655 * Relevant only for versioned objects. If the value is true, this condition 3838 /// Relevant only for versioned objects. If the value is true, this condition
3656 * matches live objects; if the value is false, it matches archived objects. 3839 /// matches live objects; if the value is false, it matches archived objects.
3657 */
3658 core.bool isLive; 3840 core.bool isLive;
3659 /** 3841
3660 * Objects having any of the storage classes specified by this condition will 3842 /// Objects having any of the storage classes specified by this condition
3661 * be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, 3843 /// will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE,
3662 * STANDARD, and DURABLE_REDUCED_AVAILABILITY. 3844 /// COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.
3663 */
3664 core.List<core.String> matchesStorageClass; 3845 core.List<core.String> matchesStorageClass;
3665 /** 3846
3666 * Relevant only for versioned objects. If the value is N, this condition is 3847 /// Relevant only for versioned objects. If the value is N, this condition is
3667 * satisfied when there are at least N versions (including the live version) 3848 /// satisfied when there are at least N versions (including the live version)
3668 * newer than this version of the object. 3849 /// newer than this version of the object.
3669 */
3670 core.int numNewerVersions; 3850 core.int numNewerVersions;
3671 3851
3672 BucketLifecycleRuleCondition(); 3852 BucketLifecycleRuleCondition();
3673 3853
3674 BucketLifecycleRuleCondition.fromJson(core.Map _json) { 3854 BucketLifecycleRuleCondition.fromJson(core.Map _json) {
3675 if (_json.containsKey("age")) { 3855 if (_json.containsKey("age")) {
3676 age = _json["age"]; 3856 age = _json["age"];
3677 } 3857 }
3678 if (_json.containsKey("createdBefore")) { 3858 if (_json.containsKey("createdBefore")) {
3679 createdBefore = core.DateTime.parse(_json["createdBefore"]); 3859 createdBefore = core.DateTime.parse(_json["createdBefore"]);
3680 } 3860 }
3681 if (_json.containsKey("isLive")) { 3861 if (_json.containsKey("isLive")) {
3682 isLive = _json["isLive"]; 3862 isLive = _json["isLive"];
3683 } 3863 }
3684 if (_json.containsKey("matchesStorageClass")) { 3864 if (_json.containsKey("matchesStorageClass")) {
3685 matchesStorageClass = _json["matchesStorageClass"]; 3865 matchesStorageClass = _json["matchesStorageClass"];
3686 } 3866 }
3687 if (_json.containsKey("numNewerVersions")) { 3867 if (_json.containsKey("numNewerVersions")) {
3688 numNewerVersions = _json["numNewerVersions"]; 3868 numNewerVersions = _json["numNewerVersions"];
3689 } 3869 }
3690 } 3870 }
3691 3871
3692 core.Map<core.String, core.Object> toJson() { 3872 core.Map<core.String, core.Object> toJson() {
3693 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3873 final core.Map<core.String, core.Object> _json =
3874 new core.Map<core.String, core.Object>();
3694 if (age != null) { 3875 if (age != null) {
3695 _json["age"] = age; 3876 _json["age"] = age;
3696 } 3877 }
3697 if (createdBefore != null) { 3878 if (createdBefore != null) {
3698 _json["createdBefore"] = "${(createdBefore).year.toString().padLeft(4, '0' )}-${(createdBefore).month.toString().padLeft(2, '0')}-${(createdBefore).day.toS tring().padLeft(2, '0')}"; 3879 _json["createdBefore"] =
3880 "${(createdBefore).year.toString().padLeft(4, '0')}-${(createdBefore). month.toString().padLeft(2, '0')}-${(createdBefore).day.toString().padLeft(2, '0 ')}";
3699 } 3881 }
3700 if (isLive != null) { 3882 if (isLive != null) {
3701 _json["isLive"] = isLive; 3883 _json["isLive"] = isLive;
3702 } 3884 }
3703 if (matchesStorageClass != null) { 3885 if (matchesStorageClass != null) {
3704 _json["matchesStorageClass"] = matchesStorageClass; 3886 _json["matchesStorageClass"] = matchesStorageClass;
3705 } 3887 }
3706 if (numNewerVersions != null) { 3888 if (numNewerVersions != null) {
3707 _json["numNewerVersions"] = numNewerVersions; 3889 _json["numNewerVersions"] = numNewerVersions;
3708 } 3890 }
3709 return _json; 3891 return _json;
3710 } 3892 }
3711 } 3893 }
3712 3894
3713 class BucketLifecycleRule { 3895 class BucketLifecycleRule {
3714 /** The action to take. */ 3896 /// The action to take.
3715 BucketLifecycleRuleAction action; 3897 BucketLifecycleRuleAction action;
3716 /** The condition(s) under which the action will be taken. */ 3898
3899 /// The condition(s) under which the action will be taken.
3717 BucketLifecycleRuleCondition condition; 3900 BucketLifecycleRuleCondition condition;
3718 3901
3719 BucketLifecycleRule(); 3902 BucketLifecycleRule();
3720 3903
3721 BucketLifecycleRule.fromJson(core.Map _json) { 3904 BucketLifecycleRule.fromJson(core.Map _json) {
3722 if (_json.containsKey("action")) { 3905 if (_json.containsKey("action")) {
3723 action = new BucketLifecycleRuleAction.fromJson(_json["action"]); 3906 action = new BucketLifecycleRuleAction.fromJson(_json["action"]);
3724 } 3907 }
3725 if (_json.containsKey("condition")) { 3908 if (_json.containsKey("condition")) {
3726 condition = new BucketLifecycleRuleCondition.fromJson(_json["condition"]); 3909 condition = new BucketLifecycleRuleCondition.fromJson(_json["condition"]);
3727 } 3910 }
3728 } 3911 }
3729 3912
3730 core.Map<core.String, core.Object> toJson() { 3913 core.Map<core.String, core.Object> toJson() {
3731 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3914 final core.Map<core.String, core.Object> _json =
3915 new core.Map<core.String, core.Object>();
3732 if (action != null) { 3916 if (action != null) {
3733 _json["action"] = (action).toJson(); 3917 _json["action"] = (action).toJson();
3734 } 3918 }
3735 if (condition != null) { 3919 if (condition != null) {
3736 _json["condition"] = (condition).toJson(); 3920 _json["condition"] = (condition).toJson();
3737 } 3921 }
3738 return _json; 3922 return _json;
3739 } 3923 }
3740 } 3924 }
3741 3925
3742 /** 3926 /// The bucket's lifecycle configuration. See lifecycle management for more
3743 * The bucket's lifecycle configuration. See lifecycle management for more 3927 /// information.
3744 * information.
3745 */
3746 class BucketLifecycle { 3928 class BucketLifecycle {
3747 /** 3929 /// A lifecycle management rule, which is made of an action to take and the
3748 * A lifecycle management rule, which is made of an action to take and the 3930 /// condition(s) under which the action will be taken.
3749 * condition(s) under which the action will be taken.
3750 */
3751 core.List<BucketLifecycleRule> rule; 3931 core.List<BucketLifecycleRule> rule;
3752 3932
3753 BucketLifecycle(); 3933 BucketLifecycle();
3754 3934
3755 BucketLifecycle.fromJson(core.Map _json) { 3935 BucketLifecycle.fromJson(core.Map _json) {
3756 if (_json.containsKey("rule")) { 3936 if (_json.containsKey("rule")) {
3757 rule = _json["rule"].map((value) => new BucketLifecycleRule.fromJson(value )).toList(); 3937 rule = _json["rule"]
3938 .map((value) => new BucketLifecycleRule.fromJson(value))
3939 .toList();
3758 } 3940 }
3759 } 3941 }
3760 3942
3761 core.Map<core.String, core.Object> toJson() { 3943 core.Map<core.String, core.Object> toJson() {
3762 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3944 final core.Map<core.String, core.Object> _json =
3945 new core.Map<core.String, core.Object>();
3763 if (rule != null) { 3946 if (rule != null) {
3764 _json["rule"] = rule.map((value) => (value).toJson()).toList(); 3947 _json["rule"] = rule.map((value) => (value).toJson()).toList();
3765 } 3948 }
3766 return _json; 3949 return _json;
3767 } 3950 }
3768 } 3951 }
3769 3952
3770 /** 3953 /// The bucket's logging configuration, which defines the destination bucket
3771 * The bucket's logging configuration, which defines the destination bucket and 3954 /// and optional name prefix for the current bucket's logs.
3772 * optional name prefix for the current bucket's logs.
3773 */
3774 class BucketLogging { 3955 class BucketLogging {
3775 /** 3956 /// The destination bucket where the current bucket's logs should be placed.
3776 * The destination bucket where the current bucket's logs should be placed.
3777 */
3778 core.String logBucket; 3957 core.String logBucket;
3779 /** A prefix for log object names. */ 3958
3959 /// A prefix for log object names.
3780 core.String logObjectPrefix; 3960 core.String logObjectPrefix;
3781 3961
3782 BucketLogging(); 3962 BucketLogging();
3783 3963
3784 BucketLogging.fromJson(core.Map _json) { 3964 BucketLogging.fromJson(core.Map _json) {
3785 if (_json.containsKey("logBucket")) { 3965 if (_json.containsKey("logBucket")) {
3786 logBucket = _json["logBucket"]; 3966 logBucket = _json["logBucket"];
3787 } 3967 }
3788 if (_json.containsKey("logObjectPrefix")) { 3968 if (_json.containsKey("logObjectPrefix")) {
3789 logObjectPrefix = _json["logObjectPrefix"]; 3969 logObjectPrefix = _json["logObjectPrefix"];
3790 } 3970 }
3791 } 3971 }
3792 3972
3793 core.Map<core.String, core.Object> toJson() { 3973 core.Map<core.String, core.Object> toJson() {
3794 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3974 final core.Map<core.String, core.Object> _json =
3975 new core.Map<core.String, core.Object>();
3795 if (logBucket != null) { 3976 if (logBucket != null) {
3796 _json["logBucket"] = logBucket; 3977 _json["logBucket"] = logBucket;
3797 } 3978 }
3798 if (logObjectPrefix != null) { 3979 if (logObjectPrefix != null) {
3799 _json["logObjectPrefix"] = logObjectPrefix; 3980 _json["logObjectPrefix"] = logObjectPrefix;
3800 } 3981 }
3801 return _json; 3982 return _json;
3802 } 3983 }
3803 } 3984 }
3804 3985
3805 /** The owner of the bucket. This is always the project team's owner group. */ 3986 /// The owner of the bucket. This is always the project team's owner group.
3806 class BucketOwner { 3987 class BucketOwner {
3807 /** The entity, in the form project-owner-projectId. */ 3988 /// The entity, in the form project-owner-projectId.
3808 core.String entity; 3989 core.String entity;
3809 /** The ID for the entity. */ 3990
3991 /// The ID for the entity.
3810 core.String entityId; 3992 core.String entityId;
3811 3993
3812 BucketOwner(); 3994 BucketOwner();
3813 3995
3814 BucketOwner.fromJson(core.Map _json) { 3996 BucketOwner.fromJson(core.Map _json) {
3815 if (_json.containsKey("entity")) { 3997 if (_json.containsKey("entity")) {
3816 entity = _json["entity"]; 3998 entity = _json["entity"];
3817 } 3999 }
3818 if (_json.containsKey("entityId")) { 4000 if (_json.containsKey("entityId")) {
3819 entityId = _json["entityId"]; 4001 entityId = _json["entityId"];
3820 } 4002 }
3821 } 4003 }
3822 4004
3823 core.Map<core.String, core.Object> toJson() { 4005 core.Map<core.String, core.Object> toJson() {
3824 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4006 final core.Map<core.String, core.Object> _json =
4007 new core.Map<core.String, core.Object>();
3825 if (entity != null) { 4008 if (entity != null) {
3826 _json["entity"] = entity; 4009 _json["entity"] = entity;
3827 } 4010 }
3828 if (entityId != null) { 4011 if (entityId != null) {
3829 _json["entityId"] = entityId; 4012 _json["entityId"] = entityId;
3830 } 4013 }
3831 return _json; 4014 return _json;
3832 } 4015 }
3833 } 4016 }
3834 4017
3835 /** The bucket's versioning configuration. */ 4018 /// The bucket's versioning configuration.
3836 class BucketVersioning { 4019 class BucketVersioning {
3837 /** While set to true, versioning is fully enabled for this bucket. */ 4020 /// While set to true, versioning is fully enabled for this bucket.
3838 core.bool enabled; 4021 core.bool enabled;
3839 4022
3840 BucketVersioning(); 4023 BucketVersioning();
3841 4024
3842 BucketVersioning.fromJson(core.Map _json) { 4025 BucketVersioning.fromJson(core.Map _json) {
3843 if (_json.containsKey("enabled")) { 4026 if (_json.containsKey("enabled")) {
3844 enabled = _json["enabled"]; 4027 enabled = _json["enabled"];
3845 } 4028 }
3846 } 4029 }
3847 4030
3848 core.Map<core.String, core.Object> toJson() { 4031 core.Map<core.String, core.Object> toJson() {
3849 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4032 final core.Map<core.String, core.Object> _json =
4033 new core.Map<core.String, core.Object>();
3850 if (enabled != null) { 4034 if (enabled != null) {
3851 _json["enabled"] = enabled; 4035 _json["enabled"] = enabled;
3852 } 4036 }
3853 return _json; 4037 return _json;
3854 } 4038 }
3855 } 4039 }
3856 4040
3857 /** 4041 /// The bucket's website configuration, controlling how the service behaves
3858 * The bucket's website configuration, controlling how the service behaves when 4042 /// when accessing bucket contents as a web site. See the Static Website
3859 * accessing bucket contents as a web site. See the Static Website Examples for 4043 /// Examples for more information.
3860 * more information.
3861 */
3862 class BucketWebsite { 4044 class BucketWebsite {
3863 /** 4045 /// If the requested object path is missing, the service will ensure the path
3864 * If the requested object path is missing, the service will ensure the path 4046 /// has a trailing '/', append this suffix, and attempt to retrieve the
3865 * has a trailing '/', append this suffix, and attempt to retrieve the 4047 /// resulting object. This allows the creation of index.html objects to
3866 * resulting object. This allows the creation of index.html objects to 4048 /// represent directory pages.
3867 * represent directory pages.
3868 */
3869 core.String mainPageSuffix; 4049 core.String mainPageSuffix;
3870 /** 4050
3871 * If the requested object path is missing, and any mainPageSuffix object is 4051 /// If the requested object path is missing, and any mainPageSuffix object is
3872 * missing, if applicable, the service will return the named object from this 4052 /// missing, if applicable, the service will return the named object from
3873 * bucket as the content for a 404 Not Found result. 4053 /// this bucket as the content for a 404 Not Found result.
3874 */
3875 core.String notFoundPage; 4054 core.String notFoundPage;
3876 4055
3877 BucketWebsite(); 4056 BucketWebsite();
3878 4057
3879 BucketWebsite.fromJson(core.Map _json) { 4058 BucketWebsite.fromJson(core.Map _json) {
3880 if (_json.containsKey("mainPageSuffix")) { 4059 if (_json.containsKey("mainPageSuffix")) {
3881 mainPageSuffix = _json["mainPageSuffix"]; 4060 mainPageSuffix = _json["mainPageSuffix"];
3882 } 4061 }
3883 if (_json.containsKey("notFoundPage")) { 4062 if (_json.containsKey("notFoundPage")) {
3884 notFoundPage = _json["notFoundPage"]; 4063 notFoundPage = _json["notFoundPage"];
3885 } 4064 }
3886 } 4065 }
3887 4066
3888 core.Map<core.String, core.Object> toJson() { 4067 core.Map<core.String, core.Object> toJson() {
3889 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4068 final core.Map<core.String, core.Object> _json =
4069 new core.Map<core.String, core.Object>();
3890 if (mainPageSuffix != null) { 4070 if (mainPageSuffix != null) {
3891 _json["mainPageSuffix"] = mainPageSuffix; 4071 _json["mainPageSuffix"] = mainPageSuffix;
3892 } 4072 }
3893 if (notFoundPage != null) { 4073 if (notFoundPage != null) {
3894 _json["notFoundPage"] = notFoundPage; 4074 _json["notFoundPage"] = notFoundPage;
3895 } 4075 }
3896 return _json; 4076 return _json;
3897 } 4077 }
3898 } 4078 }
3899 4079
3900 /** A bucket. */ 4080 /// A bucket.
3901 class Bucket { 4081 class Bucket {
3902 /** Access controls on the bucket. */ 4082 /// Access controls on the bucket.
3903 core.List<BucketAccessControl> acl; 4083 core.List<BucketAccessControl> acl;
3904 /** The bucket's billing configuration. */ 4084
4085 /// The bucket's billing configuration.
3905 BucketBilling billing; 4086 BucketBilling billing;
3906 /** The bucket's Cross-Origin Resource Sharing (CORS) configuration. */ 4087
4088 /// The bucket's Cross-Origin Resource Sharing (CORS) configuration.
3907 core.List<BucketCors> cors; 4089 core.List<BucketCors> cors;
3908 /** 4090
3909 * Default access controls to apply to new objects when no ACL is provided. 4091 /// Default access controls to apply to new objects when no ACL is provided.
3910 */
3911 core.List<ObjectAccessControl> defaultObjectAcl; 4092 core.List<ObjectAccessControl> defaultObjectAcl;
3912 /** 4093
3913 * Encryption configuration used by default for newly inserted objects, when 4094 /// Encryption configuration used by default for newly inserted objects, when
3914 * no encryption config is specified. 4095 /// no encryption config is specified.
3915 */
3916 BucketEncryption encryption; 4096 BucketEncryption encryption;
3917 /** HTTP 1.1 Entity tag for the bucket. */ 4097
4098 /// HTTP 1.1 Entity tag for the bucket.
3918 core.String etag; 4099 core.String etag;
3919 /** 4100
3920 * The ID of the bucket. For buckets, the id and name properities are the 4101 /// The ID of the bucket. For buckets, the id and name properities are the
3921 * same. 4102 /// same.
3922 */
3923 core.String id; 4103 core.String id;
3924 /** The kind of item this is. For buckets, this is always storage#bucket. */ 4104
4105 /// The kind of item this is. For buckets, this is always storage#bucket.
3925 core.String kind; 4106 core.String kind;
3926 /** User-provided labels, in key/value pairs. */ 4107
4108 /// User-provided labels, in key/value pairs.
3927 core.Map<core.String, core.String> labels; 4109 core.Map<core.String, core.String> labels;
3928 /** 4110
3929 * The bucket's lifecycle configuration. See lifecycle management for more 4111 /// The bucket's lifecycle configuration. See lifecycle management for more
3930 * information. 4112 /// information.
3931 */
3932 BucketLifecycle lifecycle; 4113 BucketLifecycle lifecycle;
3933 /** 4114
3934 * The location of the bucket. Object data for objects in the bucket resides 4115 /// The location of the bucket. Object data for objects in the bucket resides
3935 * in physical storage within this region. Defaults to US. See the developer's 4116 /// in physical storage within this region. Defaults to US. See the
3936 * guide for the authoritative list. 4117 /// developer's guide for the authoritative list.
3937 */
3938 core.String location; 4118 core.String location;
3939 /** 4119
3940 * The bucket's logging configuration, which defines the destination bucket 4120 /// The bucket's logging configuration, which defines the destination bucket
3941 * and optional name prefix for the current bucket's logs. 4121 /// and optional name prefix for the current bucket's logs.
3942 */
3943 BucketLogging logging; 4122 BucketLogging logging;
3944 /** The metadata generation of this bucket. */ 4123
4124 /// The metadata generation of this bucket.
3945 core.String metageneration; 4125 core.String metageneration;
3946 /** The name of the bucket. */ 4126
4127 /// The name of the bucket.
3947 core.String name; 4128 core.String name;
3948 /** 4129
3949 * The owner of the bucket. This is always the project team's owner group. 4130 /// The owner of the bucket. This is always the project team's owner group.
3950 */
3951 BucketOwner owner; 4131 BucketOwner owner;
3952 /** The project number of the project the bucket belongs to. */ 4132
4133 /// The project number of the project the bucket belongs to.
3953 core.String projectNumber; 4134 core.String projectNumber;
3954 /** The URI of this bucket. */ 4135
4136 /// The URI of this bucket.
3955 core.String selfLink; 4137 core.String selfLink;
3956 /** 4138
3957 * The bucket's default storage class, used whenever no storageClass is 4139 /// The bucket's default storage class, used whenever no storageClass is
3958 * specified for a newly-created object. This defines how objects in the 4140 /// specified for a newly-created object. This defines how objects in the
3959 * bucket are stored and determines the SLA and the cost of storage. Values 4141 /// bucket are stored and determines the SLA and the cost of storage. Values
3960 * include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and 4142 /// include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and
3961 * DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the 4143 /// DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the
3962 * bucket is created, it will default to STANDARD. For more information, see 4144 /// bucket is created, it will default to STANDARD. For more information, see
3963 * storage classes. 4145 /// storage classes.
3964 */
3965 core.String storageClass; 4146 core.String storageClass;
3966 /** The creation time of the bucket in RFC 3339 format. */ 4147
4148 /// The creation time of the bucket in RFC 3339 format.
3967 core.DateTime timeCreated; 4149 core.DateTime timeCreated;
3968 /** The modification time of the bucket in RFC 3339 format. */ 4150
4151 /// The modification time of the bucket in RFC 3339 format.
3969 core.DateTime updated; 4152 core.DateTime updated;
3970 /** The bucket's versioning configuration. */ 4153
4154 /// The bucket's versioning configuration.
3971 BucketVersioning versioning; 4155 BucketVersioning versioning;
3972 /** 4156
3973 * The bucket's website configuration, controlling how the service behaves 4157 /// The bucket's website configuration, controlling how the service behaves
3974 * when accessing bucket contents as a web site. See the Static Website 4158 /// when accessing bucket contents as a web site. See the Static Website
3975 * Examples for more information. 4159 /// Examples for more information.
3976 */
3977 BucketWebsite website; 4160 BucketWebsite website;
3978 4161
3979 Bucket(); 4162 Bucket();
3980 4163
3981 Bucket.fromJson(core.Map _json) { 4164 Bucket.fromJson(core.Map _json) {
3982 if (_json.containsKey("acl")) { 4165 if (_json.containsKey("acl")) {
3983 acl = _json["acl"].map((value) => new BucketAccessControl.fromJson(value)) .toList(); 4166 acl = _json["acl"]
4167 .map((value) => new BucketAccessControl.fromJson(value))
4168 .toList();
3984 } 4169 }
3985 if (_json.containsKey("billing")) { 4170 if (_json.containsKey("billing")) {
3986 billing = new BucketBilling.fromJson(_json["billing"]); 4171 billing = new BucketBilling.fromJson(_json["billing"]);
3987 } 4172 }
3988 if (_json.containsKey("cors")) { 4173 if (_json.containsKey("cors")) {
3989 cors = _json["cors"].map((value) => new BucketCors.fromJson(value)).toList (); 4174 cors =
4175 _json["cors"].map((value) => new BucketCors.fromJson(value)).toList();
3990 } 4176 }
3991 if (_json.containsKey("defaultObjectAcl")) { 4177 if (_json.containsKey("defaultObjectAcl")) {
3992 defaultObjectAcl = _json["defaultObjectAcl"].map((value) => new ObjectAcce ssControl.fromJson(value)).toList(); 4178 defaultObjectAcl = _json["defaultObjectAcl"]
4179 .map((value) => new ObjectAccessControl.fromJson(value))
4180 .toList();
3993 } 4181 }
3994 if (_json.containsKey("encryption")) { 4182 if (_json.containsKey("encryption")) {
3995 encryption = new BucketEncryption.fromJson(_json["encryption"]); 4183 encryption = new BucketEncryption.fromJson(_json["encryption"]);
3996 } 4184 }
3997 if (_json.containsKey("etag")) { 4185 if (_json.containsKey("etag")) {
3998 etag = _json["etag"]; 4186 etag = _json["etag"];
3999 } 4187 }
4000 if (_json.containsKey("id")) { 4188 if (_json.containsKey("id")) {
4001 id = _json["id"]; 4189 id = _json["id"];
4002 } 4190 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
4041 } 4229 }
4042 if (_json.containsKey("versioning")) { 4230 if (_json.containsKey("versioning")) {
4043 versioning = new BucketVersioning.fromJson(_json["versioning"]); 4231 versioning = new BucketVersioning.fromJson(_json["versioning"]);
4044 } 4232 }
4045 if (_json.containsKey("website")) { 4233 if (_json.containsKey("website")) {
4046 website = new BucketWebsite.fromJson(_json["website"]); 4234 website = new BucketWebsite.fromJson(_json["website"]);
4047 } 4235 }
4048 } 4236 }
4049 4237
4050 core.Map<core.String, core.Object> toJson() { 4238 core.Map<core.String, core.Object> toJson() {
4051 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4239 final core.Map<core.String, core.Object> _json =
4240 new core.Map<core.String, core.Object>();
4052 if (acl != null) { 4241 if (acl != null) {
4053 _json["acl"] = acl.map((value) => (value).toJson()).toList(); 4242 _json["acl"] = acl.map((value) => (value).toJson()).toList();
4054 } 4243 }
4055 if (billing != null) { 4244 if (billing != null) {
4056 _json["billing"] = (billing).toJson(); 4245 _json["billing"] = (billing).toJson();
4057 } 4246 }
4058 if (cors != null) { 4247 if (cors != null) {
4059 _json["cors"] = cors.map((value) => (value).toJson()).toList(); 4248 _json["cors"] = cors.map((value) => (value).toJson()).toList();
4060 } 4249 }
4061 if (defaultObjectAcl != null) { 4250 if (defaultObjectAcl != null) {
4062 _json["defaultObjectAcl"] = defaultObjectAcl.map((value) => (value).toJson ()).toList(); 4251 _json["defaultObjectAcl"] =
4252 defaultObjectAcl.map((value) => (value).toJson()).toList();
4063 } 4253 }
4064 if (encryption != null) { 4254 if (encryption != null) {
4065 _json["encryption"] = (encryption).toJson(); 4255 _json["encryption"] = (encryption).toJson();
4066 } 4256 }
4067 if (etag != null) { 4257 if (etag != null) {
4068 _json["etag"] = etag; 4258 _json["etag"] = etag;
4069 } 4259 }
4070 if (id != null) { 4260 if (id != null) {
4071 _json["id"] = id; 4261 _json["id"] = id;
4072 } 4262 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
4112 if (versioning != null) { 4302 if (versioning != null) {
4113 _json["versioning"] = (versioning).toJson(); 4303 _json["versioning"] = (versioning).toJson();
4114 } 4304 }
4115 if (website != null) { 4305 if (website != null) {
4116 _json["website"] = (website).toJson(); 4306 _json["website"] = (website).toJson();
4117 } 4307 }
4118 return _json; 4308 return _json;
4119 } 4309 }
4120 } 4310 }
4121 4311
4122 /** The project team associated with the entity, if any. */ 4312 /// The project team associated with the entity, if any.
4123 class BucketAccessControlProjectTeam { 4313 class BucketAccessControlProjectTeam {
4124 /** The project number. */ 4314 /// The project number.
4125 core.String projectNumber; 4315 core.String projectNumber;
4126 /** The team. */ 4316
4317 /// The team.
4127 core.String team; 4318 core.String team;
4128 4319
4129 BucketAccessControlProjectTeam(); 4320 BucketAccessControlProjectTeam();
4130 4321
4131 BucketAccessControlProjectTeam.fromJson(core.Map _json) { 4322 BucketAccessControlProjectTeam.fromJson(core.Map _json) {
4132 if (_json.containsKey("projectNumber")) { 4323 if (_json.containsKey("projectNumber")) {
4133 projectNumber = _json["projectNumber"]; 4324 projectNumber = _json["projectNumber"];
4134 } 4325 }
4135 if (_json.containsKey("team")) { 4326 if (_json.containsKey("team")) {
4136 team = _json["team"]; 4327 team = _json["team"];
4137 } 4328 }
4138 } 4329 }
4139 4330
4140 core.Map<core.String, core.Object> toJson() { 4331 core.Map<core.String, core.Object> toJson() {
4141 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4332 final core.Map<core.String, core.Object> _json =
4333 new core.Map<core.String, core.Object>();
4142 if (projectNumber != null) { 4334 if (projectNumber != null) {
4143 _json["projectNumber"] = projectNumber; 4335 _json["projectNumber"] = projectNumber;
4144 } 4336 }
4145 if (team != null) { 4337 if (team != null) {
4146 _json["team"] = team; 4338 _json["team"] = team;
4147 } 4339 }
4148 return _json; 4340 return _json;
4149 } 4341 }
4150 } 4342 }
4151 4343
4152 /** An access-control entry. */ 4344 /// An access-control entry.
4153 class BucketAccessControl { 4345 class BucketAccessControl {
4154 /** The name of the bucket. */ 4346 /// The name of the bucket.
4155 core.String bucket; 4347 core.String bucket;
4156 /** The domain associated with the entity, if any. */ 4348
4349 /// The domain associated with the entity, if any.
4157 core.String domain; 4350 core.String domain;
4158 /** The email address associated with the entity, if any. */ 4351
4352 /// The email address associated with the entity, if any.
4159 core.String email; 4353 core.String email;
4160 /** 4354
4161 * The entity holding the permission, in one of the following forms: 4355 /// The entity holding the permission, in one of the following forms:
4162 * - user-userId 4356 /// - user-userId
4163 * - user-email 4357 /// - user-email
4164 * - group-groupId 4358 /// - group-groupId
4165 * - group-email 4359 /// - group-email
4166 * - domain-domain 4360 /// - domain-domain
4167 * - project-team-projectId 4361 /// - project-team-projectId
4168 * - allUsers 4362 /// - allUsers
4169 * - allAuthenticatedUsers Examples: 4363 /// - allAuthenticatedUsers Examples:
4170 * - The user liz@example.com would be user-liz@example.com. 4364 /// - The user liz@example.com would be user-liz@example.com.
4171 * - The group example@googlegroups.com would be 4365 /// - The group example@googlegroups.com would be
4172 * group-example@googlegroups.com. 4366 /// group-example@googlegroups.com.
4173 * - To refer to all members of the Google Apps for Business domain 4367 /// - To refer to all members of the Google Apps for Business domain
4174 * example.com, the entity would be domain-example.com. 4368 /// example.com, the entity would be domain-example.com.
4175 */
4176 core.String entity; 4369 core.String entity;
4177 /** The ID for the entity, if any. */ 4370
4371 /// The ID for the entity, if any.
4178 core.String entityId; 4372 core.String entityId;
4179 /** HTTP 1.1 Entity tag for the access-control entry. */ 4373
4374 /// HTTP 1.1 Entity tag for the access-control entry.
4180 core.String etag; 4375 core.String etag;
4181 /** The ID of the access-control entry. */ 4376
4377 /// The ID of the access-control entry.
4182 core.String id; 4378 core.String id;
4183 /** 4379
4184 * The kind of item this is. For bucket access control entries, this is always 4380 /// The kind of item this is. For bucket access control entries, this is
4185 * storage#bucketAccessControl. 4381 /// always storage#bucketAccessControl.
4186 */
4187 core.String kind; 4382 core.String kind;
4188 /** The project team associated with the entity, if any. */ 4383
4384 /// The project team associated with the entity, if any.
4189 BucketAccessControlProjectTeam projectTeam; 4385 BucketAccessControlProjectTeam projectTeam;
4190 /** The access permission for the entity. */ 4386
4387 /// The access permission for the entity.
4191 core.String role; 4388 core.String role;
4192 /** The link to this access-control entry. */ 4389
4390 /// The link to this access-control entry.
4193 core.String selfLink; 4391 core.String selfLink;
4194 4392
4195 BucketAccessControl(); 4393 BucketAccessControl();
4196 4394
4197 BucketAccessControl.fromJson(core.Map _json) { 4395 BucketAccessControl.fromJson(core.Map _json) {
4198 if (_json.containsKey("bucket")) { 4396 if (_json.containsKey("bucket")) {
4199 bucket = _json["bucket"]; 4397 bucket = _json["bucket"];
4200 } 4398 }
4201 if (_json.containsKey("domain")) { 4399 if (_json.containsKey("domain")) {
4202 domain = _json["domain"]; 4400 domain = _json["domain"];
(...skipping 10 matching lines...) Expand all
4213 if (_json.containsKey("etag")) { 4411 if (_json.containsKey("etag")) {
4214 etag = _json["etag"]; 4412 etag = _json["etag"];
4215 } 4413 }
4216 if (_json.containsKey("id")) { 4414 if (_json.containsKey("id")) {
4217 id = _json["id"]; 4415 id = _json["id"];
4218 } 4416 }
4219 if (_json.containsKey("kind")) { 4417 if (_json.containsKey("kind")) {
4220 kind = _json["kind"]; 4418 kind = _json["kind"];
4221 } 4419 }
4222 if (_json.containsKey("projectTeam")) { 4420 if (_json.containsKey("projectTeam")) {
4223 projectTeam = new BucketAccessControlProjectTeam.fromJson(_json["projectTe am"]); 4421 projectTeam =
4422 new BucketAccessControlProjectTeam.fromJson(_json["projectTeam"]);
4224 } 4423 }
4225 if (_json.containsKey("role")) { 4424 if (_json.containsKey("role")) {
4226 role = _json["role"]; 4425 role = _json["role"];
4227 } 4426 }
4228 if (_json.containsKey("selfLink")) { 4427 if (_json.containsKey("selfLink")) {
4229 selfLink = _json["selfLink"]; 4428 selfLink = _json["selfLink"];
4230 } 4429 }
4231 } 4430 }
4232 4431
4233 core.Map<core.String, core.Object> toJson() { 4432 core.Map<core.String, core.Object> toJson() {
4234 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4433 final core.Map<core.String, core.Object> _json =
4434 new core.Map<core.String, core.Object>();
4235 if (bucket != null) { 4435 if (bucket != null) {
4236 _json["bucket"] = bucket; 4436 _json["bucket"] = bucket;
4237 } 4437 }
4238 if (domain != null) { 4438 if (domain != null) {
4239 _json["domain"] = domain; 4439 _json["domain"] = domain;
4240 } 4440 }
4241 if (email != null) { 4441 if (email != null) {
4242 _json["email"] = email; 4442 _json["email"] = email;
4243 } 4443 }
4244 if (entity != null) { 4444 if (entity != null) {
(...skipping 17 matching lines...) Expand all
4262 if (role != null) { 4462 if (role != null) {
4263 _json["role"] = role; 4463 _json["role"] = role;
4264 } 4464 }
4265 if (selfLink != null) { 4465 if (selfLink != null) {
4266 _json["selfLink"] = selfLink; 4466 _json["selfLink"] = selfLink;
4267 } 4467 }
4268 return _json; 4468 return _json;
4269 } 4469 }
4270 } 4470 }
4271 4471
4272 /** An access-control list. */ 4472 /// An access-control list.
4273 class BucketAccessControls { 4473 class BucketAccessControls {
4274 /** The list of items. */ 4474 /// The list of items.
4275 core.List<BucketAccessControl> items; 4475 core.List<BucketAccessControl> items;
4276 /** 4476
4277 * The kind of item this is. For lists of bucket access control entries, this 4477 /// The kind of item this is. For lists of bucket access control entries,
4278 * is always storage#bucketAccessControls. 4478 /// this is always storage#bucketAccessControls.
4279 */
4280 core.String kind; 4479 core.String kind;
4281 4480
4282 BucketAccessControls(); 4481 BucketAccessControls();
4283 4482
4284 BucketAccessControls.fromJson(core.Map _json) { 4483 BucketAccessControls.fromJson(core.Map _json) {
4285 if (_json.containsKey("items")) { 4484 if (_json.containsKey("items")) {
4286 items = _json["items"].map((value) => new BucketAccessControl.fromJson(val ue)).toList(); 4485 items = _json["items"]
4486 .map((value) => new BucketAccessControl.fromJson(value))
4487 .toList();
4287 } 4488 }
4288 if (_json.containsKey("kind")) { 4489 if (_json.containsKey("kind")) {
4289 kind = _json["kind"]; 4490 kind = _json["kind"];
4290 } 4491 }
4291 } 4492 }
4292 4493
4293 core.Map<core.String, core.Object> toJson() { 4494 core.Map<core.String, core.Object> toJson() {
4294 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4495 final core.Map<core.String, core.Object> _json =
4496 new core.Map<core.String, core.Object>();
4295 if (items != null) { 4497 if (items != null) {
4296 _json["items"] = items.map((value) => (value).toJson()).toList(); 4498 _json["items"] = items.map((value) => (value).toJson()).toList();
4297 } 4499 }
4298 if (kind != null) { 4500 if (kind != null) {
4299 _json["kind"] = kind; 4501 _json["kind"] = kind;
4300 } 4502 }
4301 return _json; 4503 return _json;
4302 } 4504 }
4303 } 4505 }
4304 4506
4305 /** A list of buckets. */ 4507 /// A list of buckets.
4306 class Buckets { 4508 class Buckets {
4307 /** The list of items. */ 4509 /// The list of items.
4308 core.List<Bucket> items; 4510 core.List<Bucket> items;
4309 /** 4511
4310 * The kind of item this is. For lists of buckets, this is always 4512 /// The kind of item this is. For lists of buckets, this is always
4311 * storage#buckets. 4513 /// storage#buckets.
4312 */
4313 core.String kind; 4514 core.String kind;
4314 /** 4515
4315 * The continuation token, used to page through large result sets. Provide 4516 /// The continuation token, used to page through large result sets. Provide
4316 * this value in a subsequent request to return the next page of results. 4517 /// this value in a subsequent request to return the next page of results.
4317 */
4318 core.String nextPageToken; 4518 core.String nextPageToken;
4319 4519
4320 Buckets(); 4520 Buckets();
4321 4521
4322 Buckets.fromJson(core.Map _json) { 4522 Buckets.fromJson(core.Map _json) {
4323 if (_json.containsKey("items")) { 4523 if (_json.containsKey("items")) {
4324 items = _json["items"].map((value) => new Bucket.fromJson(value)).toList() ; 4524 items =
4525 _json["items"].map((value) => new Bucket.fromJson(value)).toList();
4325 } 4526 }
4326 if (_json.containsKey("kind")) { 4527 if (_json.containsKey("kind")) {
4327 kind = _json["kind"]; 4528 kind = _json["kind"];
4328 } 4529 }
4329 if (_json.containsKey("nextPageToken")) { 4530 if (_json.containsKey("nextPageToken")) {
4330 nextPageToken = _json["nextPageToken"]; 4531 nextPageToken = _json["nextPageToken"];
4331 } 4532 }
4332 } 4533 }
4333 4534
4334 core.Map<core.String, core.Object> toJson() { 4535 core.Map<core.String, core.Object> toJson() {
4335 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4536 final core.Map<core.String, core.Object> _json =
4537 new core.Map<core.String, core.Object>();
4336 if (items != null) { 4538 if (items != null) {
4337 _json["items"] = items.map((value) => (value).toJson()).toList(); 4539 _json["items"] = items.map((value) => (value).toJson()).toList();
4338 } 4540 }
4339 if (kind != null) { 4541 if (kind != null) {
4340 _json["kind"] = kind; 4542 _json["kind"] = kind;
4341 } 4543 }
4342 if (nextPageToken != null) { 4544 if (nextPageToken != null) {
4343 _json["nextPageToken"] = nextPageToken; 4545 _json["nextPageToken"] = nextPageToken;
4344 } 4546 }
4345 return _json; 4547 return _json;
4346 } 4548 }
4347 } 4549 }
4348 4550
4349 /** An notification channel used to watch for resource changes. */ 4551 /// An notification channel used to watch for resource changes.
4350 class Channel { 4552 class Channel {
4351 /** The address where notifications are delivered for this channel. */ 4553 /// The address where notifications are delivered for this channel.
4352 core.String address; 4554 core.String address;
4353 /** 4555
4354 * Date and time of notification channel expiration, expressed as a Unix 4556 /// Date and time of notification channel expiration, expressed as a Unix
4355 * timestamp, in milliseconds. Optional. 4557 /// timestamp, in milliseconds. Optional.
4356 */
4357 core.String expiration; 4558 core.String expiration;
4358 /** A UUID or similar unique string that identifies this channel. */ 4559
4560 /// A UUID or similar unique string that identifies this channel.
4359 core.String id; 4561 core.String id;
4360 /** 4562
4361 * Identifies this as a notification channel used to watch for changes to a 4563 /// Identifies this as a notification channel used to watch for changes to a
4362 * resource. Value: the fixed string "api#channel". 4564 /// resource. Value: the fixed string "api#channel".
4363 */
4364 core.String kind; 4565 core.String kind;
4365 /** Additional parameters controlling delivery channel behavior. Optional. */ 4566
4567 /// Additional parameters controlling delivery channel behavior. Optional.
4366 core.Map<core.String, core.String> params; 4568 core.Map<core.String, core.String> params;
4367 /** A Boolean value to indicate whether payload is wanted. Optional. */ 4569
4570 /// A Boolean value to indicate whether payload is wanted. Optional.
4368 core.bool payload; 4571 core.bool payload;
4369 /** 4572
4370 * An opaque ID that identifies the resource being watched on this channel. 4573 /// An opaque ID that identifies the resource being watched on this channel.
4371 * Stable across different API versions. 4574 /// Stable across different API versions.
4372 */
4373 core.String resourceId; 4575 core.String resourceId;
4374 /** A version-specific identifier for the watched resource. */ 4576
4577 /// A version-specific identifier for the watched resource.
4375 core.String resourceUri; 4578 core.String resourceUri;
4376 /** 4579
4377 * An arbitrary string delivered to the target address with each notification 4580 /// An arbitrary string delivered to the target address with each
4378 * delivered over this channel. Optional. 4581 /// notification delivered over this channel. Optional.
4379 */
4380 core.String token; 4582 core.String token;
4381 /** The type of delivery mechanism used for this channel. */ 4583
4584 /// The type of delivery mechanism used for this channel.
4382 core.String type; 4585 core.String type;
4383 4586
4384 Channel(); 4587 Channel();
4385 4588
4386 Channel.fromJson(core.Map _json) { 4589 Channel.fromJson(core.Map _json) {
4387 if (_json.containsKey("address")) { 4590 if (_json.containsKey("address")) {
4388 address = _json["address"]; 4591 address = _json["address"];
4389 } 4592 }
4390 if (_json.containsKey("expiration")) { 4593 if (_json.containsKey("expiration")) {
4391 expiration = _json["expiration"]; 4594 expiration = _json["expiration"];
(...skipping 18 matching lines...) Expand all
4410 } 4613 }
4411 if (_json.containsKey("token")) { 4614 if (_json.containsKey("token")) {
4412 token = _json["token"]; 4615 token = _json["token"];
4413 } 4616 }
4414 if (_json.containsKey("type")) { 4617 if (_json.containsKey("type")) {
4415 type = _json["type"]; 4618 type = _json["type"];
4416 } 4619 }
4417 } 4620 }
4418 4621
4419 core.Map<core.String, core.Object> toJson() { 4622 core.Map<core.String, core.Object> toJson() {
4420 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4623 final core.Map<core.String, core.Object> _json =
4624 new core.Map<core.String, core.Object>();
4421 if (address != null) { 4625 if (address != null) {
4422 _json["address"] = address; 4626 _json["address"] = address;
4423 } 4627 }
4424 if (expiration != null) { 4628 if (expiration != null) {
4425 _json["expiration"] = expiration; 4629 _json["expiration"] = expiration;
4426 } 4630 }
4427 if (id != null) { 4631 if (id != null) {
4428 _json["id"] = id; 4632 _json["id"] = id;
4429 } 4633 }
4430 if (kind != null) { 4634 if (kind != null) {
(...skipping 14 matching lines...) Expand all
4445 if (token != null) { 4649 if (token != null) {
4446 _json["token"] = token; 4650 _json["token"] = token;
4447 } 4651 }
4448 if (type != null) { 4652 if (type != null) {
4449 _json["type"] = type; 4653 _json["type"] = type;
4450 } 4654 }
4451 return _json; 4655 return _json;
4452 } 4656 }
4453 } 4657 }
4454 4658
4455 /** Conditions that must be met for this operation to execute. */ 4659 /// Conditions that must be met for this operation to execute.
4456 class ComposeRequestSourceObjectsObjectPreconditions { 4660 class ComposeRequestSourceObjectsObjectPreconditions {
4457 /** 4661 /// Only perform the composition if the generation of the source object that
4458 * Only perform the composition if the generation of the source object that 4662 /// would be used matches this value. If this value and a generation are both
4459 * would be used matches this value. If this value and a generation are both 4663 /// specified, they must be the same value or the call will fail.
4460 * specified, they must be the same value or the call will fail.
4461 */
4462 core.String ifGenerationMatch; 4664 core.String ifGenerationMatch;
4463 4665
4464 ComposeRequestSourceObjectsObjectPreconditions(); 4666 ComposeRequestSourceObjectsObjectPreconditions();
4465 4667
4466 ComposeRequestSourceObjectsObjectPreconditions.fromJson(core.Map _json) { 4668 ComposeRequestSourceObjectsObjectPreconditions.fromJson(core.Map _json) {
4467 if (_json.containsKey("ifGenerationMatch")) { 4669 if (_json.containsKey("ifGenerationMatch")) {
4468 ifGenerationMatch = _json["ifGenerationMatch"]; 4670 ifGenerationMatch = _json["ifGenerationMatch"];
4469 } 4671 }
4470 } 4672 }
4471 4673
4472 core.Map<core.String, core.Object> toJson() { 4674 core.Map<core.String, core.Object> toJson() {
4473 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4675 final core.Map<core.String, core.Object> _json =
4676 new core.Map<core.String, core.Object>();
4474 if (ifGenerationMatch != null) { 4677 if (ifGenerationMatch != null) {
4475 _json["ifGenerationMatch"] = ifGenerationMatch; 4678 _json["ifGenerationMatch"] = ifGenerationMatch;
4476 } 4679 }
4477 return _json; 4680 return _json;
4478 } 4681 }
4479 } 4682 }
4480 4683
4481 class ComposeRequestSourceObjects { 4684 class ComposeRequestSourceObjects {
4482 /** The generation of this object to use as the source. */ 4685 /// The generation of this object to use as the source.
4483 core.String generation; 4686 core.String generation;
4484 /** 4687
4485 * The source object's name. The source object's bucket is implicitly the 4688 /// The source object's name. The source object's bucket is implicitly the
4486 * destination bucket. 4689 /// destination bucket.
4487 */
4488 core.String name; 4690 core.String name;
4489 /** Conditions that must be met for this operation to execute. */ 4691
4692 /// Conditions that must be met for this operation to execute.
4490 ComposeRequestSourceObjectsObjectPreconditions objectPreconditions; 4693 ComposeRequestSourceObjectsObjectPreconditions objectPreconditions;
4491 4694
4492 ComposeRequestSourceObjects(); 4695 ComposeRequestSourceObjects();
4493 4696
4494 ComposeRequestSourceObjects.fromJson(core.Map _json) { 4697 ComposeRequestSourceObjects.fromJson(core.Map _json) {
4495 if (_json.containsKey("generation")) { 4698 if (_json.containsKey("generation")) {
4496 generation = _json["generation"]; 4699 generation = _json["generation"];
4497 } 4700 }
4498 if (_json.containsKey("name")) { 4701 if (_json.containsKey("name")) {
4499 name = _json["name"]; 4702 name = _json["name"];
4500 } 4703 }
4501 if (_json.containsKey("objectPreconditions")) { 4704 if (_json.containsKey("objectPreconditions")) {
4502 objectPreconditions = new ComposeRequestSourceObjectsObjectPreconditions.f romJson(_json["objectPreconditions"]); 4705 objectPreconditions =
4706 new ComposeRequestSourceObjectsObjectPreconditions.fromJson(
4707 _json["objectPreconditions"]);
4503 } 4708 }
4504 } 4709 }
4505 4710
4506 core.Map<core.String, core.Object> toJson() { 4711 core.Map<core.String, core.Object> toJson() {
4507 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4712 final core.Map<core.String, core.Object> _json =
4713 new core.Map<core.String, core.Object>();
4508 if (generation != null) { 4714 if (generation != null) {
4509 _json["generation"] = generation; 4715 _json["generation"] = generation;
4510 } 4716 }
4511 if (name != null) { 4717 if (name != null) {
4512 _json["name"] = name; 4718 _json["name"] = name;
4513 } 4719 }
4514 if (objectPreconditions != null) { 4720 if (objectPreconditions != null) {
4515 _json["objectPreconditions"] = (objectPreconditions).toJson(); 4721 _json["objectPreconditions"] = (objectPreconditions).toJson();
4516 } 4722 }
4517 return _json; 4723 return _json;
4518 } 4724 }
4519 } 4725 }
4520 4726
4521 /** A Compose request. */ 4727 /// A Compose request.
4522 class ComposeRequest { 4728 class ComposeRequest {
4523 /** Properties of the resulting object. */ 4729 /// Properties of the resulting object.
4524 Object destination; 4730 Object destination;
4525 /** The kind of item this is. */ 4731
4732 /// The kind of item this is.
4526 core.String kind; 4733 core.String kind;
4527 /** 4734
4528 * The list of source objects that will be concatenated into a single object. 4735 /// The list of source objects that will be concatenated into a single
4529 */ 4736 /// object.
4530 core.List<ComposeRequestSourceObjects> sourceObjects; 4737 core.List<ComposeRequestSourceObjects> sourceObjects;
4531 4738
4532 ComposeRequest(); 4739 ComposeRequest();
4533 4740
4534 ComposeRequest.fromJson(core.Map _json) { 4741 ComposeRequest.fromJson(core.Map _json) {
4535 if (_json.containsKey("destination")) { 4742 if (_json.containsKey("destination")) {
4536 destination = new Object.fromJson(_json["destination"]); 4743 destination = new Object.fromJson(_json["destination"]);
4537 } 4744 }
4538 if (_json.containsKey("kind")) { 4745 if (_json.containsKey("kind")) {
4539 kind = _json["kind"]; 4746 kind = _json["kind"];
4540 } 4747 }
4541 if (_json.containsKey("sourceObjects")) { 4748 if (_json.containsKey("sourceObjects")) {
4542 sourceObjects = _json["sourceObjects"].map((value) => new ComposeRequestSo urceObjects.fromJson(value)).toList(); 4749 sourceObjects = _json["sourceObjects"]
4750 .map((value) => new ComposeRequestSourceObjects.fromJson(value))
4751 .toList();
4543 } 4752 }
4544 } 4753 }
4545 4754
4546 core.Map<core.String, core.Object> toJson() { 4755 core.Map<core.String, core.Object> toJson() {
4547 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4756 final core.Map<core.String, core.Object> _json =
4757 new core.Map<core.String, core.Object>();
4548 if (destination != null) { 4758 if (destination != null) {
4549 _json["destination"] = (destination).toJson(); 4759 _json["destination"] = (destination).toJson();
4550 } 4760 }
4551 if (kind != null) { 4761 if (kind != null) {
4552 _json["kind"] = kind; 4762 _json["kind"] = kind;
4553 } 4763 }
4554 if (sourceObjects != null) { 4764 if (sourceObjects != null) {
4555 _json["sourceObjects"] = sourceObjects.map((value) => (value).toJson()).to List(); 4765 _json["sourceObjects"] =
4766 sourceObjects.map((value) => (value).toJson()).toList();
4556 } 4767 }
4557 return _json; 4768 return _json;
4558 } 4769 }
4559 } 4770 }
4560 4771
4561 /** A subscription to receive Google PubSub notifications. */ 4772 /// A subscription to receive Google PubSub notifications.
4562 class Notification { 4773 class Notification {
4563 /** 4774 /// An optional list of additional attributes to attach to each Cloud PubSub
4564 * An optional list of additional attributes to attach to each Cloud PubSub 4775 /// message published for this notification subscription.
4565 * message published for this notification subscription.
4566 */
4567 core.Map<core.String, core.String> customAttributes; 4776 core.Map<core.String, core.String> customAttributes;
4568 /** HTTP 1.1 Entity tag for this subscription notification. */ 4777
4778 /// HTTP 1.1 Entity tag for this subscription notification.
4569 core.String etag; 4779 core.String etag;
4570 /** 4780
4571 * If present, only send notifications about listed event types. If empty, 4781 /// If present, only send notifications about listed event types. If empty,
4572 * sent notifications for all event types. 4782 /// sent notifications for all event types.
4573 */
4574 core.List<core.String> eventTypes; 4783 core.List<core.String> eventTypes;
4575 /** The ID of the notification. */ 4784
4785 /// The ID of the notification.
4576 core.String id; 4786 core.String id;
4577 /** 4787
4578 * The kind of item this is. For notifications, this is always 4788 /// The kind of item this is. For notifications, this is always
4579 * storage#notification. 4789 /// storage#notification.
4580 */
4581 core.String kind; 4790 core.String kind;
4582 /** 4791
4583 * If present, only apply this notification configuration to object names that 4792 /// If present, only apply this notification configuration to object names
4584 * begin with this prefix. 4793 /// that begin with this prefix.
4585 */
4586 core.String objectNamePrefix; 4794 core.String objectNamePrefix;
4587 /** The desired content of the Payload. */ 4795
4796 /// The desired content of the Payload.
4588 core.String payloadFormat; 4797 core.String payloadFormat;
4589 /** The canonical URL of this notification. */ 4798
4799 /// The canonical URL of this notification.
4590 core.String selfLink; 4800 core.String selfLink;
4591 /** 4801
4592 * The Cloud PubSub topic to which this subscription publishes. Formatted as: 4802 /// The Cloud PubSub topic to which this subscription publishes. Formatted
4593 * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' 4803 /// as:
4594 */ 4804 /// '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
4595 core.String topic; 4805 core.String topic;
4596 4806
4597 Notification(); 4807 Notification();
4598 4808
4599 Notification.fromJson(core.Map _json) { 4809 Notification.fromJson(core.Map _json) {
4600 if (_json.containsKey("custom_attributes")) { 4810 if (_json.containsKey("custom_attributes")) {
4601 customAttributes = _json["custom_attributes"]; 4811 customAttributes = _json["custom_attributes"];
4602 } 4812 }
4603 if (_json.containsKey("etag")) { 4813 if (_json.containsKey("etag")) {
4604 etag = _json["etag"]; 4814 etag = _json["etag"];
(...skipping 15 matching lines...) Expand all
4620 } 4830 }
4621 if (_json.containsKey("selfLink")) { 4831 if (_json.containsKey("selfLink")) {
4622 selfLink = _json["selfLink"]; 4832 selfLink = _json["selfLink"];
4623 } 4833 }
4624 if (_json.containsKey("topic")) { 4834 if (_json.containsKey("topic")) {
4625 topic = _json["topic"]; 4835 topic = _json["topic"];
4626 } 4836 }
4627 } 4837 }
4628 4838
4629 core.Map<core.String, core.Object> toJson() { 4839 core.Map<core.String, core.Object> toJson() {
4630 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4840 final core.Map<core.String, core.Object> _json =
4841 new core.Map<core.String, core.Object>();
4631 if (customAttributes != null) { 4842 if (customAttributes != null) {
4632 _json["custom_attributes"] = customAttributes; 4843 _json["custom_attributes"] = customAttributes;
4633 } 4844 }
4634 if (etag != null) { 4845 if (etag != null) {
4635 _json["etag"] = etag; 4846 _json["etag"] = etag;
4636 } 4847 }
4637 if (eventTypes != null) { 4848 if (eventTypes != null) {
4638 _json["event_types"] = eventTypes; 4849 _json["event_types"] = eventTypes;
4639 } 4850 }
4640 if (id != null) { 4851 if (id != null) {
(...skipping 11 matching lines...) Expand all
4652 if (selfLink != null) { 4863 if (selfLink != null) {
4653 _json["selfLink"] = selfLink; 4864 _json["selfLink"] = selfLink;
4654 } 4865 }
4655 if (topic != null) { 4866 if (topic != null) {
4656 _json["topic"] = topic; 4867 _json["topic"] = topic;
4657 } 4868 }
4658 return _json; 4869 return _json;
4659 } 4870 }
4660 } 4871 }
4661 4872
4662 /** A list of notification subscriptions. */ 4873 /// A list of notification subscriptions.
4663 class Notifications { 4874 class Notifications {
4664 /** The list of items. */ 4875 /// The list of items.
4665 core.List<Notification> items; 4876 core.List<Notification> items;
4666 /** 4877
4667 * The kind of item this is. For lists of notifications, this is always 4878 /// The kind of item this is. For lists of notifications, this is always
4668 * storage#notifications. 4879 /// storage#notifications.
4669 */
4670 core.String kind; 4880 core.String kind;
4671 4881
4672 Notifications(); 4882 Notifications();
4673 4883
4674 Notifications.fromJson(core.Map _json) { 4884 Notifications.fromJson(core.Map _json) {
4675 if (_json.containsKey("items")) { 4885 if (_json.containsKey("items")) {
4676 items = _json["items"].map((value) => new Notification.fromJson(value)).to List(); 4886 items = _json["items"]
4887 .map((value) => new Notification.fromJson(value))
4888 .toList();
4677 } 4889 }
4678 if (_json.containsKey("kind")) { 4890 if (_json.containsKey("kind")) {
4679 kind = _json["kind"]; 4891 kind = _json["kind"];
4680 } 4892 }
4681 } 4893 }
4682 4894
4683 core.Map<core.String, core.Object> toJson() { 4895 core.Map<core.String, core.Object> toJson() {
4684 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4896 final core.Map<core.String, core.Object> _json =
4897 new core.Map<core.String, core.Object>();
4685 if (items != null) { 4898 if (items != null) {
4686 _json["items"] = items.map((value) => (value).toJson()).toList(); 4899 _json["items"] = items.map((value) => (value).toJson()).toList();
4687 } 4900 }
4688 if (kind != null) { 4901 if (kind != null) {
4689 _json["kind"] = kind; 4902 _json["kind"] = kind;
4690 } 4903 }
4691 return _json; 4904 return _json;
4692 } 4905 }
4693 } 4906 }
4694 4907
4695 /** 4908 /// Metadata of customer-supplied encryption key, if the object is encrypted by
4696 * Metadata of customer-supplied encryption key, if the object is encrypted by 4909 /// such a key.
4697 * such a key.
4698 */
4699 class ObjectCustomerEncryption { 4910 class ObjectCustomerEncryption {
4700 /** The encryption algorithm. */ 4911 /// The encryption algorithm.
4701 core.String encryptionAlgorithm; 4912 core.String encryptionAlgorithm;
4702 /** SHA256 hash value of the encryption key. */ 4913
4914 /// SHA256 hash value of the encryption key.
4703 core.String keySha256; 4915 core.String keySha256;
4704 4916
4705 ObjectCustomerEncryption(); 4917 ObjectCustomerEncryption();
4706 4918
4707 ObjectCustomerEncryption.fromJson(core.Map _json) { 4919 ObjectCustomerEncryption.fromJson(core.Map _json) {
4708 if (_json.containsKey("encryptionAlgorithm")) { 4920 if (_json.containsKey("encryptionAlgorithm")) {
4709 encryptionAlgorithm = _json["encryptionAlgorithm"]; 4921 encryptionAlgorithm = _json["encryptionAlgorithm"];
4710 } 4922 }
4711 if (_json.containsKey("keySha256")) { 4923 if (_json.containsKey("keySha256")) {
4712 keySha256 = _json["keySha256"]; 4924 keySha256 = _json["keySha256"];
4713 } 4925 }
4714 } 4926 }
4715 4927
4716 core.Map<core.String, core.Object> toJson() { 4928 core.Map<core.String, core.Object> toJson() {
4717 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4929 final core.Map<core.String, core.Object> _json =
4930 new core.Map<core.String, core.Object>();
4718 if (encryptionAlgorithm != null) { 4931 if (encryptionAlgorithm != null) {
4719 _json["encryptionAlgorithm"] = encryptionAlgorithm; 4932 _json["encryptionAlgorithm"] = encryptionAlgorithm;
4720 } 4933 }
4721 if (keySha256 != null) { 4934 if (keySha256 != null) {
4722 _json["keySha256"] = keySha256; 4935 _json["keySha256"] = keySha256;
4723 } 4936 }
4724 return _json; 4937 return _json;
4725 } 4938 }
4726 } 4939 }
4727 4940
4728 /** The owner of the object. This will always be the uploader of the object. */ 4941 /// The owner of the object. This will always be the uploader of the object.
4729 class ObjectOwner { 4942 class ObjectOwner {
4730 /** The entity, in the form user-userId. */ 4943 /// The entity, in the form user-userId.
4731 core.String entity; 4944 core.String entity;
4732 /** The ID for the entity. */ 4945
4946 /// The ID for the entity.
4733 core.String entityId; 4947 core.String entityId;
4734 4948
4735 ObjectOwner(); 4949 ObjectOwner();
4736 4950
4737 ObjectOwner.fromJson(core.Map _json) { 4951 ObjectOwner.fromJson(core.Map _json) {
4738 if (_json.containsKey("entity")) { 4952 if (_json.containsKey("entity")) {
4739 entity = _json["entity"]; 4953 entity = _json["entity"];
4740 } 4954 }
4741 if (_json.containsKey("entityId")) { 4955 if (_json.containsKey("entityId")) {
4742 entityId = _json["entityId"]; 4956 entityId = _json["entityId"];
4743 } 4957 }
4744 } 4958 }
4745 4959
4746 core.Map<core.String, core.Object> toJson() { 4960 core.Map<core.String, core.Object> toJson() {
4747 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4961 final core.Map<core.String, core.Object> _json =
4962 new core.Map<core.String, core.Object>();
4748 if (entity != null) { 4963 if (entity != null) {
4749 _json["entity"] = entity; 4964 _json["entity"] = entity;
4750 } 4965 }
4751 if (entityId != null) { 4966 if (entityId != null) {
4752 _json["entityId"] = entityId; 4967 _json["entityId"] = entityId;
4753 } 4968 }
4754 return _json; 4969 return _json;
4755 } 4970 }
4756 } 4971 }
4757 4972
4758 /** An object. */ 4973 /// An object.
4759 class Object { 4974 class Object {
4760 /** Access controls on the object. */ 4975 /// Access controls on the object.
4761 core.List<ObjectAccessControl> acl; 4976 core.List<ObjectAccessControl> acl;
4762 /** The name of the bucket containing this object. */ 4977
4978 /// The name of the bucket containing this object.
4763 core.String bucket; 4979 core.String bucket;
4764 /** 4980
4765 * Cache-Control directive for the object data. If omitted, and the object is 4981 /// Cache-Control directive for the object data. If omitted, and the object
4766 * accessible to all anonymous users, the default will be public, 4982 /// is accessible to all anonymous users, the default will be public,
4767 * max-age=3600. 4983 /// max-age=3600.
4768 */
4769 core.String cacheControl; 4984 core.String cacheControl;
4770 /** 4985
4771 * Number of underlying components that make up this object. Components are 4986 /// Number of underlying components that make up this object. Components are
4772 * accumulated by compose operations. 4987 /// accumulated by compose operations.
4773 */
4774 core.int componentCount; 4988 core.int componentCount;
4775 /** Content-Disposition of the object data. */ 4989
4990 /// Content-Disposition of the object data.
4776 core.String contentDisposition; 4991 core.String contentDisposition;
4777 /** Content-Encoding of the object data. */ 4992
4993 /// Content-Encoding of the object data.
4778 core.String contentEncoding; 4994 core.String contentEncoding;
4779 /** Content-Language of the object data. */ 4995
4996 /// Content-Language of the object data.
4780 core.String contentLanguage; 4997 core.String contentLanguage;
4781 /** 4998
4782 * Content-Type of the object data. If an object is stored without a 4999 /// Content-Type of the object data. If an object is stored without a
4783 * Content-Type, it is served as application/octet-stream. 5000 /// Content-Type, it is served as application/octet-stream.
4784 */
4785 core.String contentType; 5001 core.String contentType;
4786 /** 5002
4787 * CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 5003 /// CRC32c checksum, as described in RFC 4960, Appendix B; encoded using
4788 * in big-endian byte order. For more information about using the CRC32c 5004 /// base64 in big-endian byte order. For more information about using the
4789 * checksum, see Hashes and ETags: Best Practices. 5005 /// CRC32c checksum, see Hashes and ETags: Best Practices.
4790 */
4791 core.String crc32c; 5006 core.String crc32c;
4792 /** 5007
4793 * Metadata of customer-supplied encryption key, if the object is encrypted by 5008 /// Metadata of customer-supplied encryption key, if the object is encrypted
4794 * such a key. 5009 /// by such a key.
4795 */
4796 ObjectCustomerEncryption customerEncryption; 5010 ObjectCustomerEncryption customerEncryption;
4797 /** HTTP 1.1 Entity tag for the object. */ 5011
5012 /// HTTP 1.1 Entity tag for the object.
4798 core.String etag; 5013 core.String etag;
4799 /** The content generation of this object. Used for object versioning. */ 5014
5015 /// The content generation of this object. Used for object versioning.
4800 core.String generation; 5016 core.String generation;
4801 /** 5017
4802 * The ID of the object, including the bucket name, object name, and 5018 /// The ID of the object, including the bucket name, object name, and
4803 * generation number. 5019 /// generation number.
4804 */
4805 core.String id; 5020 core.String id;
4806 /** The kind of item this is. For objects, this is always storage#object. */ 5021
5022 /// The kind of item this is. For objects, this is always storage#object.
4807 core.String kind; 5023 core.String kind;
4808 /** 5024
4809 * Cloud KMS Key used to encrypt this object, if the object is encrypted by 5025 /// Cloud KMS Key used to encrypt this object, if the object is encrypted by
4810 * such a key. 5026 /// such a key.
4811 */
4812 core.String kmsKeyName; 5027 core.String kmsKeyName;
4813 /** 5028
4814 * MD5 hash of the data; encoded using base64. For more information about 5029 /// MD5 hash of the data; encoded using base64. For more information about
4815 * using the MD5 hash, see Hashes and ETags: Best Practices. 5030 /// using the MD5 hash, see Hashes and ETags: Best Practices.
4816 */
4817 core.String md5Hash; 5031 core.String md5Hash;
4818 /** Media download link. */ 5032
5033 /// Media download link.
4819 core.String mediaLink; 5034 core.String mediaLink;
4820 /** User-provided metadata, in key/value pairs. */ 5035
5036 /// User-provided metadata, in key/value pairs.
4821 core.Map<core.String, core.String> metadata; 5037 core.Map<core.String, core.String> metadata;
4822 /** 5038
4823 * The version of the metadata for this object at this generation. Used for 5039 /// The version of the metadata for this object at this generation. Used for
4824 * preconditions and for detecting changes in metadata. A metageneration 5040 /// preconditions and for detecting changes in metadata. A metageneration
4825 * number is only meaningful in the context of a particular generation of a 5041 /// number is only meaningful in the context of a particular generation of a
4826 * particular object. 5042 /// particular object.
4827 */
4828 core.String metageneration; 5043 core.String metageneration;
4829 /** The name of the object. Required if not specified by URL parameter. */ 5044
5045 /// The name of the object. Required if not specified by URL parameter.
4830 core.String name; 5046 core.String name;
4831 /** 5047
4832 * The owner of the object. This will always be the uploader of the object. 5048 /// The owner of the object. This will always be the uploader of the object.
4833 */
4834 ObjectOwner owner; 5049 ObjectOwner owner;
4835 /** The link to this object. */ 5050
5051 /// The link to this object.
4836 core.String selfLink; 5052 core.String selfLink;
4837 /** Content-Length of the data in bytes. */ 5053
5054 /// Content-Length of the data in bytes.
4838 core.String size; 5055 core.String size;
4839 /** Storage class of the object. */ 5056
5057 /// Storage class of the object.
4840 core.String storageClass; 5058 core.String storageClass;
4841 /** The creation time of the object in RFC 3339 format. */ 5059
5060 /// The creation time of the object in RFC 3339 format.
4842 core.DateTime timeCreated; 5061 core.DateTime timeCreated;
4843 /** 5062
4844 * The deletion time of the object in RFC 3339 format. Will be returned if and 5063 /// The deletion time of the object in RFC 3339 format. Will be returned if
4845 * only if this version of the object has been deleted. 5064 /// and only if this version of the object has been deleted.
4846 */
4847 core.DateTime timeDeleted; 5065 core.DateTime timeDeleted;
4848 /** 5066
4849 * The time at which the object's storage class was last changed. When the 5067 /// The time at which the object's storage class was last changed. When the
4850 * object is initially created, it will be set to timeCreated. 5068 /// object is initially created, it will be set to timeCreated.
4851 */
4852 core.DateTime timeStorageClassUpdated; 5069 core.DateTime timeStorageClassUpdated;
4853 /** The modification time of the object metadata in RFC 3339 format. */ 5070
5071 /// The modification time of the object metadata in RFC 3339 format.
4854 core.DateTime updated; 5072 core.DateTime updated;
4855 5073
4856 Object(); 5074 Object();
4857 5075
4858 Object.fromJson(core.Map _json) { 5076 Object.fromJson(core.Map _json) {
4859 if (_json.containsKey("acl")) { 5077 if (_json.containsKey("acl")) {
4860 acl = _json["acl"].map((value) => new ObjectAccessControl.fromJson(value)) .toList(); 5078 acl = _json["acl"]
5079 .map((value) => new ObjectAccessControl.fromJson(value))
5080 .toList();
4861 } 5081 }
4862 if (_json.containsKey("bucket")) { 5082 if (_json.containsKey("bucket")) {
4863 bucket = _json["bucket"]; 5083 bucket = _json["bucket"];
4864 } 5084 }
4865 if (_json.containsKey("cacheControl")) { 5085 if (_json.containsKey("cacheControl")) {
4866 cacheControl = _json["cacheControl"]; 5086 cacheControl = _json["cacheControl"];
4867 } 5087 }
4868 if (_json.containsKey("componentCount")) { 5088 if (_json.containsKey("componentCount")) {
4869 componentCount = _json["componentCount"]; 5089 componentCount = _json["componentCount"];
4870 } 5090 }
4871 if (_json.containsKey("contentDisposition")) { 5091 if (_json.containsKey("contentDisposition")) {
4872 contentDisposition = _json["contentDisposition"]; 5092 contentDisposition = _json["contentDisposition"];
4873 } 5093 }
4874 if (_json.containsKey("contentEncoding")) { 5094 if (_json.containsKey("contentEncoding")) {
4875 contentEncoding = _json["contentEncoding"]; 5095 contentEncoding = _json["contentEncoding"];
4876 } 5096 }
4877 if (_json.containsKey("contentLanguage")) { 5097 if (_json.containsKey("contentLanguage")) {
4878 contentLanguage = _json["contentLanguage"]; 5098 contentLanguage = _json["contentLanguage"];
4879 } 5099 }
4880 if (_json.containsKey("contentType")) { 5100 if (_json.containsKey("contentType")) {
4881 contentType = _json["contentType"]; 5101 contentType = _json["contentType"];
4882 } 5102 }
4883 if (_json.containsKey("crc32c")) { 5103 if (_json.containsKey("crc32c")) {
4884 crc32c = _json["crc32c"]; 5104 crc32c = _json["crc32c"];
4885 } 5105 }
4886 if (_json.containsKey("customerEncryption")) { 5106 if (_json.containsKey("customerEncryption")) {
4887 customerEncryption = new ObjectCustomerEncryption.fromJson(_json["customer Encryption"]); 5107 customerEncryption =
5108 new ObjectCustomerEncryption.fromJson(_json["customerEncryption"]);
4888 } 5109 }
4889 if (_json.containsKey("etag")) { 5110 if (_json.containsKey("etag")) {
4890 etag = _json["etag"]; 5111 etag = _json["etag"];
4891 } 5112 }
4892 if (_json.containsKey("generation")) { 5113 if (_json.containsKey("generation")) {
4893 generation = _json["generation"]; 5114 generation = _json["generation"];
4894 } 5115 }
4895 if (_json.containsKey("id")) { 5116 if (_json.containsKey("id")) {
4896 id = _json["id"]; 5117 id = _json["id"];
4897 } 5118 }
(...skipping 30 matching lines...) Expand all
4928 if (_json.containsKey("storageClass")) { 5149 if (_json.containsKey("storageClass")) {
4929 storageClass = _json["storageClass"]; 5150 storageClass = _json["storageClass"];
4930 } 5151 }
4931 if (_json.containsKey("timeCreated")) { 5152 if (_json.containsKey("timeCreated")) {
4932 timeCreated = core.DateTime.parse(_json["timeCreated"]); 5153 timeCreated = core.DateTime.parse(_json["timeCreated"]);
4933 } 5154 }
4934 if (_json.containsKey("timeDeleted")) { 5155 if (_json.containsKey("timeDeleted")) {
4935 timeDeleted = core.DateTime.parse(_json["timeDeleted"]); 5156 timeDeleted = core.DateTime.parse(_json["timeDeleted"]);
4936 } 5157 }
4937 if (_json.containsKey("timeStorageClassUpdated")) { 5158 if (_json.containsKey("timeStorageClassUpdated")) {
4938 timeStorageClassUpdated = core.DateTime.parse(_json["timeStorageClassUpdat ed"]); 5159 timeStorageClassUpdated =
5160 core.DateTime.parse(_json["timeStorageClassUpdated"]);
4939 } 5161 }
4940 if (_json.containsKey("updated")) { 5162 if (_json.containsKey("updated")) {
4941 updated = core.DateTime.parse(_json["updated"]); 5163 updated = core.DateTime.parse(_json["updated"]);
4942 } 5164 }
4943 } 5165 }
4944 5166
4945 core.Map<core.String, core.Object> toJson() { 5167 core.Map<core.String, core.Object> toJson() {
4946 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5168 final core.Map<core.String, core.Object> _json =
5169 new core.Map<core.String, core.Object>();
4947 if (acl != null) { 5170 if (acl != null) {
4948 _json["acl"] = acl.map((value) => (value).toJson()).toList(); 5171 _json["acl"] = acl.map((value) => (value).toJson()).toList();
4949 } 5172 }
4950 if (bucket != null) { 5173 if (bucket != null) {
4951 _json["bucket"] = bucket; 5174 _json["bucket"] = bucket;
4952 } 5175 }
4953 if (cacheControl != null) { 5176 if (cacheControl != null) {
4954 _json["cacheControl"] = cacheControl; 5177 _json["cacheControl"] = cacheControl;
4955 } 5178 }
4956 if (componentCount != null) { 5179 if (componentCount != null) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
5016 if (storageClass != null) { 5239 if (storageClass != null) {
5017 _json["storageClass"] = storageClass; 5240 _json["storageClass"] = storageClass;
5018 } 5241 }
5019 if (timeCreated != null) { 5242 if (timeCreated != null) {
5020 _json["timeCreated"] = (timeCreated).toIso8601String(); 5243 _json["timeCreated"] = (timeCreated).toIso8601String();
5021 } 5244 }
5022 if (timeDeleted != null) { 5245 if (timeDeleted != null) {
5023 _json["timeDeleted"] = (timeDeleted).toIso8601String(); 5246 _json["timeDeleted"] = (timeDeleted).toIso8601String();
5024 } 5247 }
5025 if (timeStorageClassUpdated != null) { 5248 if (timeStorageClassUpdated != null) {
5026 _json["timeStorageClassUpdated"] = (timeStorageClassUpdated).toIso8601Stri ng(); 5249 _json["timeStorageClassUpdated"] =
5250 (timeStorageClassUpdated).toIso8601String();
5027 } 5251 }
5028 if (updated != null) { 5252 if (updated != null) {
5029 _json["updated"] = (updated).toIso8601String(); 5253 _json["updated"] = (updated).toIso8601String();
5030 } 5254 }
5031 return _json; 5255 return _json;
5032 } 5256 }
5033 } 5257 }
5034 5258
5035 /** The project team associated with the entity, if any. */ 5259 /// The project team associated with the entity, if any.
5036 class ObjectAccessControlProjectTeam { 5260 class ObjectAccessControlProjectTeam {
5037 /** The project number. */ 5261 /// The project number.
5038 core.String projectNumber; 5262 core.String projectNumber;
5039 /** The team. */ 5263
5264 /// The team.
5040 core.String team; 5265 core.String team;
5041 5266
5042 ObjectAccessControlProjectTeam(); 5267 ObjectAccessControlProjectTeam();
5043 5268
5044 ObjectAccessControlProjectTeam.fromJson(core.Map _json) { 5269 ObjectAccessControlProjectTeam.fromJson(core.Map _json) {
5045 if (_json.containsKey("projectNumber")) { 5270 if (_json.containsKey("projectNumber")) {
5046 projectNumber = _json["projectNumber"]; 5271 projectNumber = _json["projectNumber"];
5047 } 5272 }
5048 if (_json.containsKey("team")) { 5273 if (_json.containsKey("team")) {
5049 team = _json["team"]; 5274 team = _json["team"];
5050 } 5275 }
5051 } 5276 }
5052 5277
5053 core.Map<core.String, core.Object> toJson() { 5278 core.Map<core.String, core.Object> toJson() {
5054 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5279 final core.Map<core.String, core.Object> _json =
5280 new core.Map<core.String, core.Object>();
5055 if (projectNumber != null) { 5281 if (projectNumber != null) {
5056 _json["projectNumber"] = projectNumber; 5282 _json["projectNumber"] = projectNumber;
5057 } 5283 }
5058 if (team != null) { 5284 if (team != null) {
5059 _json["team"] = team; 5285 _json["team"] = team;
5060 } 5286 }
5061 return _json; 5287 return _json;
5062 } 5288 }
5063 } 5289 }
5064 5290
5065 /** An access-control entry. */ 5291 /// An access-control entry.
5066 class ObjectAccessControl { 5292 class ObjectAccessControl {
5067 /** The name of the bucket. */ 5293 /// The name of the bucket.
5068 core.String bucket; 5294 core.String bucket;
5069 /** The domain associated with the entity, if any. */ 5295
5296 /// The domain associated with the entity, if any.
5070 core.String domain; 5297 core.String domain;
5071 /** The email address associated with the entity, if any. */ 5298
5299 /// The email address associated with the entity, if any.
5072 core.String email; 5300 core.String email;
5073 /** 5301
5074 * The entity holding the permission, in one of the following forms: 5302 /// The entity holding the permission, in one of the following forms:
5075 * - user-userId 5303 /// - user-userId
5076 * - user-email 5304 /// - user-email
5077 * - group-groupId 5305 /// - group-groupId
5078 * - group-email 5306 /// - group-email
5079 * - domain-domain 5307 /// - domain-domain
5080 * - project-team-projectId 5308 /// - project-team-projectId
5081 * - allUsers 5309 /// - allUsers
5082 * - allAuthenticatedUsers Examples: 5310 /// - allAuthenticatedUsers Examples:
5083 * - The user liz@example.com would be user-liz@example.com. 5311 /// - The user liz@example.com would be user-liz@example.com.
5084 * - The group example@googlegroups.com would be 5312 /// - The group example@googlegroups.com would be
5085 * group-example@googlegroups.com. 5313 /// group-example@googlegroups.com.
5086 * - To refer to all members of the Google Apps for Business domain 5314 /// - To refer to all members of the Google Apps for Business domain
5087 * example.com, the entity would be domain-example.com. 5315 /// example.com, the entity would be domain-example.com.
5088 */
5089 core.String entity; 5316 core.String entity;
5090 /** The ID for the entity, if any. */ 5317
5318 /// The ID for the entity, if any.
5091 core.String entityId; 5319 core.String entityId;
5092 /** HTTP 1.1 Entity tag for the access-control entry. */ 5320
5321 /// HTTP 1.1 Entity tag for the access-control entry.
5093 core.String etag; 5322 core.String etag;
5094 /** The content generation of the object, if applied to an object. */ 5323
5324 /// The content generation of the object, if applied to an object.
5095 core.String generation; 5325 core.String generation;
5096 /** The ID of the access-control entry. */ 5326
5327 /// The ID of the access-control entry.
5097 core.String id; 5328 core.String id;
5098 /** 5329
5099 * The kind of item this is. For object access control entries, this is always 5330 /// The kind of item this is. For object access control entries, this is
5100 * storage#objectAccessControl. 5331 /// always storage#objectAccessControl.
5101 */
5102 core.String kind; 5332 core.String kind;
5103 /** The name of the object, if applied to an object. */ 5333
5334 /// The name of the object, if applied to an object.
5104 core.String object; 5335 core.String object;
5105 /** The project team associated with the entity, if any. */ 5336
5337 /// The project team associated with the entity, if any.
5106 ObjectAccessControlProjectTeam projectTeam; 5338 ObjectAccessControlProjectTeam projectTeam;
5107 /** The access permission for the entity. */ 5339
5340 /// The access permission for the entity.
5108 core.String role; 5341 core.String role;
5109 /** The link to this access-control entry. */ 5342
5343 /// The link to this access-control entry.
5110 core.String selfLink; 5344 core.String selfLink;
5111 5345
5112 ObjectAccessControl(); 5346 ObjectAccessControl();
5113 5347
5114 ObjectAccessControl.fromJson(core.Map _json) { 5348 ObjectAccessControl.fromJson(core.Map _json) {
5115 if (_json.containsKey("bucket")) { 5349 if (_json.containsKey("bucket")) {
5116 bucket = _json["bucket"]; 5350 bucket = _json["bucket"];
5117 } 5351 }
5118 if (_json.containsKey("domain")) { 5352 if (_json.containsKey("domain")) {
5119 domain = _json["domain"]; 5353 domain = _json["domain"];
(...skipping 16 matching lines...) Expand all
5136 if (_json.containsKey("id")) { 5370 if (_json.containsKey("id")) {
5137 id = _json["id"]; 5371 id = _json["id"];
5138 } 5372 }
5139 if (_json.containsKey("kind")) { 5373 if (_json.containsKey("kind")) {
5140 kind = _json["kind"]; 5374 kind = _json["kind"];
5141 } 5375 }
5142 if (_json.containsKey("object")) { 5376 if (_json.containsKey("object")) {
5143 object = _json["object"]; 5377 object = _json["object"];
5144 } 5378 }
5145 if (_json.containsKey("projectTeam")) { 5379 if (_json.containsKey("projectTeam")) {
5146 projectTeam = new ObjectAccessControlProjectTeam.fromJson(_json["projectTe am"]); 5380 projectTeam =
5381 new ObjectAccessControlProjectTeam.fromJson(_json["projectTeam"]);
5147 } 5382 }
5148 if (_json.containsKey("role")) { 5383 if (_json.containsKey("role")) {
5149 role = _json["role"]; 5384 role = _json["role"];
5150 } 5385 }
5151 if (_json.containsKey("selfLink")) { 5386 if (_json.containsKey("selfLink")) {
5152 selfLink = _json["selfLink"]; 5387 selfLink = _json["selfLink"];
5153 } 5388 }
5154 } 5389 }
5155 5390
5156 core.Map<core.String, core.Object> toJson() { 5391 core.Map<core.String, core.Object> toJson() {
5157 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5392 final core.Map<core.String, core.Object> _json =
5393 new core.Map<core.String, core.Object>();
5158 if (bucket != null) { 5394 if (bucket != null) {
5159 _json["bucket"] = bucket; 5395 _json["bucket"] = bucket;
5160 } 5396 }
5161 if (domain != null) { 5397 if (domain != null) {
5162 _json["domain"] = domain; 5398 _json["domain"] = domain;
5163 } 5399 }
5164 if (email != null) { 5400 if (email != null) {
5165 _json["email"] = email; 5401 _json["email"] = email;
5166 } 5402 }
5167 if (entity != null) { 5403 if (entity != null) {
(...skipping 23 matching lines...) Expand all
5191 if (role != null) { 5427 if (role != null) {
5192 _json["role"] = role; 5428 _json["role"] = role;
5193 } 5429 }
5194 if (selfLink != null) { 5430 if (selfLink != null) {
5195 _json["selfLink"] = selfLink; 5431 _json["selfLink"] = selfLink;
5196 } 5432 }
5197 return _json; 5433 return _json;
5198 } 5434 }
5199 } 5435 }
5200 5436
5201 /** An access-control list. */ 5437 /// An access-control list.
5202 class ObjectAccessControls { 5438 class ObjectAccessControls {
5203 /** The list of items. */ 5439 /// The list of items.
5204 core.List<ObjectAccessControl> items; 5440 core.List<ObjectAccessControl> items;
5205 /** 5441
5206 * The kind of item this is. For lists of object access control entries, this 5442 /// The kind of item this is. For lists of object access control entries,
5207 * is always storage#objectAccessControls. 5443 /// this is always storage#objectAccessControls.
5208 */
5209 core.String kind; 5444 core.String kind;
5210 5445
5211 ObjectAccessControls(); 5446 ObjectAccessControls();
5212 5447
5213 ObjectAccessControls.fromJson(core.Map _json) { 5448 ObjectAccessControls.fromJson(core.Map _json) {
5214 if (_json.containsKey("items")) { 5449 if (_json.containsKey("items")) {
5215 items = _json["items"].map((value) => new ObjectAccessControl.fromJson(val ue)).toList(); 5450 items = _json["items"]
5451 .map((value) => new ObjectAccessControl.fromJson(value))
5452 .toList();
5216 } 5453 }
5217 if (_json.containsKey("kind")) { 5454 if (_json.containsKey("kind")) {
5218 kind = _json["kind"]; 5455 kind = _json["kind"];
5219 } 5456 }
5220 } 5457 }
5221 5458
5222 core.Map<core.String, core.Object> toJson() { 5459 core.Map<core.String, core.Object> toJson() {
5223 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5460 final core.Map<core.String, core.Object> _json =
5461 new core.Map<core.String, core.Object>();
5224 if (items != null) { 5462 if (items != null) {
5225 _json["items"] = items.map((value) => (value).toJson()).toList(); 5463 _json["items"] = items.map((value) => (value).toJson()).toList();
5226 } 5464 }
5227 if (kind != null) { 5465 if (kind != null) {
5228 _json["kind"] = kind; 5466 _json["kind"] = kind;
5229 } 5467 }
5230 return _json; 5468 return _json;
5231 } 5469 }
5232 } 5470 }
5233 5471
5234 /** A list of objects. */ 5472 /// A list of objects.
5235 class Objects { 5473 class Objects {
5236 /** The list of items. */ 5474 /// The list of items.
5237 core.List<Object> items; 5475 core.List<Object> items;
5238 /** 5476
5239 * The kind of item this is. For lists of objects, this is always 5477 /// The kind of item this is. For lists of objects, this is always
5240 * storage#objects. 5478 /// storage#objects.
5241 */
5242 core.String kind; 5479 core.String kind;
5243 /** 5480
5244 * The continuation token, used to page through large result sets. Provide 5481 /// The continuation token, used to page through large result sets. Provide
5245 * this value in a subsequent request to return the next page of results. 5482 /// this value in a subsequent request to return the next page of results.
5246 */
5247 core.String nextPageToken; 5483 core.String nextPageToken;
5248 /** 5484
5249 * The list of prefixes of objects matching-but-not-listed up to and including 5485 /// The list of prefixes of objects matching-but-not-listed up to and
5250 * the requested delimiter. 5486 /// including the requested delimiter.
5251 */
5252 core.List<core.String> prefixes; 5487 core.List<core.String> prefixes;
5253 5488
5254 Objects(); 5489 Objects();
5255 5490
5256 Objects.fromJson(core.Map _json) { 5491 Objects.fromJson(core.Map _json) {
5257 if (_json.containsKey("items")) { 5492 if (_json.containsKey("items")) {
5258 items = _json["items"].map((value) => new Object.fromJson(value)).toList() ; 5493 items =
5494 _json["items"].map((value) => new Object.fromJson(value)).toList();
5259 } 5495 }
5260 if (_json.containsKey("kind")) { 5496 if (_json.containsKey("kind")) {
5261 kind = _json["kind"]; 5497 kind = _json["kind"];
5262 } 5498 }
5263 if (_json.containsKey("nextPageToken")) { 5499 if (_json.containsKey("nextPageToken")) {
5264 nextPageToken = _json["nextPageToken"]; 5500 nextPageToken = _json["nextPageToken"];
5265 } 5501 }
5266 if (_json.containsKey("prefixes")) { 5502 if (_json.containsKey("prefixes")) {
5267 prefixes = _json["prefixes"]; 5503 prefixes = _json["prefixes"];
5268 } 5504 }
5269 } 5505 }
5270 5506
5271 core.Map<core.String, core.Object> toJson() { 5507 core.Map<core.String, core.Object> toJson() {
5272 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5508 final core.Map<core.String, core.Object> _json =
5509 new core.Map<core.String, core.Object>();
5273 if (items != null) { 5510 if (items != null) {
5274 _json["items"] = items.map((value) => (value).toJson()).toList(); 5511 _json["items"] = items.map((value) => (value).toJson()).toList();
5275 } 5512 }
5276 if (kind != null) { 5513 if (kind != null) {
5277 _json["kind"] = kind; 5514 _json["kind"] = kind;
5278 } 5515 }
5279 if (nextPageToken != null) { 5516 if (nextPageToken != null) {
5280 _json["nextPageToken"] = nextPageToken; 5517 _json["nextPageToken"] = nextPageToken;
5281 } 5518 }
5282 if (prefixes != null) { 5519 if (prefixes != null) {
5283 _json["prefixes"] = prefixes; 5520 _json["prefixes"] = prefixes;
5284 } 5521 }
5285 return _json; 5522 return _json;
5286 } 5523 }
5287 } 5524 }
5288 5525
5289 class PolicyBindings { 5526 class PolicyBindings {
5290 /** 5527 ///
5291 * A collection of identifiers for members who may assume the provided role. 5528 ///
5292 * Recognized identifiers are as follows: 5529 /// The values for Object must be JSON objects. It can consist of `num`,
5293 * - allUsers — A special identifier that represents anyone on the internet; 5530 /// `String`, `bool` and `null` as well as `Map` and `List` values.
5294 * with or without a Google account. 5531 core.Object condition;
5295 * - allAuthenticatedUsers — A special identifier that represents anyone who 5532
5296 * is authenticated with a Google account or a service account. 5533 /// A collection of identifiers for members who may assume the provided role.
5297 * - user:emailid — An email address that represents a specific account. For 5534 /// Recognized identifiers are as follows:
5298 * example, user:alice@gmail.com or user:joe@example.com. 5535 /// - allUsers — A special identifier that represents anyone on the internet;
5299 * - serviceAccount:emailid — An email address that represents a service 5536 /// with or without a Google account.
5300 * account. For example, 5537 /// - allAuthenticatedUsers — A special identifier that represents anyone who
5301 * serviceAccount:my-other-app@appspot.gserviceaccount.com . 5538 /// is authenticated with a Google account or a service account.
5302 * - group:emailid — An email address that represents a Google group. For 5539 /// - user:emailid — An email address that represents a specific account. For
5303 * example, group:admins@example.com. 5540 /// example, user:alice@gmail.com or user:joe@example.com.
5304 * - domain:domain — A Google Apps domain name that represents all the users 5541 /// - serviceAccount:emailid — An email address that represents a service
5305 * of that domain. For example, domain:google.com or domain:example.com. 5542 /// account. For example,
5306 * - projectOwner:projectid — Owners of the given project. For example, 5543 /// serviceAccount:my-other-app@appspot.gserviceaccount.com .
5307 * projectOwner:my-example-project 5544 /// - group:emailid — An email address that represents a Google group. For
5308 * - projectEditor:projectid — Editors of the given project. For example, 5545 /// example, group:admins@example.com.
5309 * projectEditor:my-example-project 5546 /// - domain:domain — A Google Apps domain name that represents all the users
5310 * - projectViewer:projectid — Viewers of the given project. For example, 5547 /// of that domain. For example, domain:google.com or domain:example.com.
5311 * projectViewer:my-example-project 5548 /// - projectOwner:projectid — Owners of the given project. For example,
5312 */ 5549 /// projectOwner:my-example-project
5550 /// - projectEditor:projectid — Editors of the given project. For example,
5551 /// projectEditor:my-example-project
5552 /// - projectViewer:projectid — Viewers of the given project. For example,
5553 /// projectViewer:my-example-project
5313 core.List<core.String> members; 5554 core.List<core.String> members;
5314 /** 5555
5315 * The role to which members belong. Two types of roles are supported: new IAM 5556 /// The role to which members belong. Two types of roles are supported: new
5316 * roles, which grant permissions that do not map directly to those provided 5557 /// IAM roles, which grant permissions that do not map directly to those
5317 * by ACLs, and legacy IAM roles, which do map directly to ACL permissions. 5558 /// provided by ACLs, and legacy IAM roles, which do map directly to ACL
5318 * All roles are of the format roles/storage.specificRole. 5559 /// permissions. All roles are of the format roles/storage.specificRole.
5319 * The new IAM roles are: 5560 /// The new IAM roles are:
5320 * - roles/storage.admin — Full control of Google Cloud Storage resources. 5561 /// - roles/storage.admin — Full control of Google Cloud Storage resources.
5321 * - roles/storage.objectViewer — Read-Only access to Google Cloud Storage 5562 /// - roles/storage.objectViewer — Read-Only access to Google Cloud Storage
5322 * objects. 5563 /// objects.
5323 * - roles/storage.objectCreator — Access to create objects in Google Cloud 5564 /// - roles/storage.objectCreator — Access to create objects in Google Cloud
5324 * Storage. 5565 /// Storage.
5325 * - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. 5566 /// - roles/storage.objectAdmin — Full control of Google Cloud Storage
5326 * The legacy IAM roles are: 5567 /// objects. The legacy IAM roles are:
5327 * - roles/storage.legacyObjectReader — Read-only access to objects without 5568 /// - roles/storage.legacyObjectReader — Read-only access to objects without
5328 * listing. Equivalent to an ACL entry on an object with the READER role. 5569 /// listing. Equivalent to an ACL entry on an object with the READER role.
5329 * - roles/storage.legacyObjectOwner — Read/write access to existing objects 5570 /// - roles/storage.legacyObjectOwner — Read/write access to existing objects
5330 * without listing. Equivalent to an ACL entry on an object with the OWNER 5571 /// without listing. Equivalent to an ACL entry on an object with the OWNER
5331 * role. 5572 /// role.
5332 * - roles/storage.legacyBucketReader — Read access to buckets with object 5573 /// - roles/storage.legacyBucketReader — Read access to buckets with object
5333 * listing. Equivalent to an ACL entry on a bucket with the READER role. 5574 /// listing. Equivalent to an ACL entry on a bucket with the READER role.
5334 * - roles/storage.legacyBucketWriter — Read access to buckets with object 5575 /// - roles/storage.legacyBucketWriter — Read access to buckets with object
5335 * listing/creation/deletion. Equivalent to an ACL entry on a bucket with the 5576 /// listing/creation/deletion. Equivalent to an ACL entry on a bucket with
5336 * WRITER role. 5577 /// the WRITER role.
5337 * - roles/storage.legacyBucketOwner — Read and write access to existing 5578 /// - roles/storage.legacyBucketOwner — Read and write access to existing
5338 * buckets with object listing/creation/deletion. Equivalent to an ACL entry 5579 /// buckets with object listing/creation/deletion. Equivalent to an ACL entry
5339 * on a bucket with the OWNER role. 5580 /// on a bucket with the OWNER role.
5340 */
5341 core.String role; 5581 core.String role;
5342 5582
5343 PolicyBindings(); 5583 PolicyBindings();
5344 5584
5345 PolicyBindings.fromJson(core.Map _json) { 5585 PolicyBindings.fromJson(core.Map _json) {
5586 if (_json.containsKey("condition")) {
5587 condition = _json["condition"];
5588 }
5346 if (_json.containsKey("members")) { 5589 if (_json.containsKey("members")) {
5347 members = _json["members"]; 5590 members = _json["members"];
5348 } 5591 }
5349 if (_json.containsKey("role")) { 5592 if (_json.containsKey("role")) {
5350 role = _json["role"]; 5593 role = _json["role"];
5351 } 5594 }
5352 } 5595 }
5353 5596
5354 core.Map<core.String, core.Object> toJson() { 5597 core.Map<core.String, core.Object> toJson() {
5355 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5598 final core.Map<core.String, core.Object> _json =
5599 new core.Map<core.String, core.Object>();
5600 if (condition != null) {
5601 _json["condition"] = condition;
5602 }
5356 if (members != null) { 5603 if (members != null) {
5357 _json["members"] = members; 5604 _json["members"] = members;
5358 } 5605 }
5359 if (role != null) { 5606 if (role != null) {
5360 _json["role"] = role; 5607 _json["role"] = role;
5361 } 5608 }
5362 return _json; 5609 return _json;
5363 } 5610 }
5364 } 5611 }
5365 5612
5366 /** A bucket/object IAM policy. */ 5613 /// A bucket/object IAM policy.
5367 class Policy { 5614 class Policy {
5368 /** 5615 /// An association between a role, which comes with a set of permissions, and
5369 * An association between a role, which comes with a set of permissions, and 5616 /// members who may assume that role.
5370 * members who may assume that role.
5371 */
5372 core.List<PolicyBindings> bindings; 5617 core.List<PolicyBindings> bindings;
5373 /** HTTP 1.1 Entity tag for the policy. */ 5618
5619 /// HTTP 1.1 Entity tag for the policy.
5374 core.String etag; 5620 core.String etag;
5375 core.List<core.int> get etagAsBytes { 5621 core.List<core.int> get etagAsBytes {
5376 return convert.BASE64.decode(etag); 5622 return convert.BASE64.decode(etag);
5377 } 5623 }
5378 5624
5379 void set etagAsBytes(core.List<core.int> _bytes) { 5625 void set etagAsBytes(core.List<core.int> _bytes) {
5380 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 5626 etag =
5627 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
5381 } 5628 }
5382 /** 5629
5383 * The kind of item this is. For policies, this is always storage#policy. This 5630 /// The kind of item this is. For policies, this is always storage#policy.
5384 * field is ignored on input. 5631 /// This field is ignored on input.
5385 */
5386 core.String kind; 5632 core.String kind;
5387 /** 5633
5388 * The ID of the resource to which this policy belongs. Will be of the form 5634 /// The ID of the resource to which this policy belongs. Will be of the form
5389 * projects/_/buckets/bucket for buckets, and 5635 /// projects/_/buckets/bucket for buckets, and
5390 * projects/_/buckets/bucket/objects/object for objects. A specific generation 5636 /// projects/_/buckets/bucket/objects/object for objects. A specific
5391 * may be specified by appending #generationNumber to the end of the object 5637 /// generation may be specified by appending #generationNumber to the end of
5392 * name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current 5638 /// the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17.
5393 * generation can be denoted with #0. This field is ignored on input. 5639 /// The current generation can be denoted with #0. This field is ignored on
5394 */ 5640 /// input.
5395 core.String resourceId; 5641 core.String resourceId;
5396 5642
5397 Policy(); 5643 Policy();
5398 5644
5399 Policy.fromJson(core.Map _json) { 5645 Policy.fromJson(core.Map _json) {
5400 if (_json.containsKey("bindings")) { 5646 if (_json.containsKey("bindings")) {
5401 bindings = _json["bindings"].map((value) => new PolicyBindings.fromJson(va lue)).toList(); 5647 bindings = _json["bindings"]
5648 .map((value) => new PolicyBindings.fromJson(value))
5649 .toList();
5402 } 5650 }
5403 if (_json.containsKey("etag")) { 5651 if (_json.containsKey("etag")) {
5404 etag = _json["etag"]; 5652 etag = _json["etag"];
5405 } 5653 }
5406 if (_json.containsKey("kind")) { 5654 if (_json.containsKey("kind")) {
5407 kind = _json["kind"]; 5655 kind = _json["kind"];
5408 } 5656 }
5409 if (_json.containsKey("resourceId")) { 5657 if (_json.containsKey("resourceId")) {
5410 resourceId = _json["resourceId"]; 5658 resourceId = _json["resourceId"];
5411 } 5659 }
5412 } 5660 }
5413 5661
5414 core.Map<core.String, core.Object> toJson() { 5662 core.Map<core.String, core.Object> toJson() {
5415 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5663 final core.Map<core.String, core.Object> _json =
5664 new core.Map<core.String, core.Object>();
5416 if (bindings != null) { 5665 if (bindings != null) {
5417 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); 5666 _json["bindings"] = bindings.map((value) => (value).toJson()).toList();
5418 } 5667 }
5419 if (etag != null) { 5668 if (etag != null) {
5420 _json["etag"] = etag; 5669 _json["etag"] = etag;
5421 } 5670 }
5422 if (kind != null) { 5671 if (kind != null) {
5423 _json["kind"] = kind; 5672 _json["kind"] = kind;
5424 } 5673 }
5425 if (resourceId != null) { 5674 if (resourceId != null) {
5426 _json["resourceId"] = resourceId; 5675 _json["resourceId"] = resourceId;
5427 } 5676 }
5428 return _json; 5677 return _json;
5429 } 5678 }
5430 } 5679 }
5431 5680
5432 /** A rewrite response. */ 5681 /// A rewrite response.
5433 class RewriteResponse { 5682 class RewriteResponse {
5434 /** 5683 /// true if the copy is finished; otherwise, false if the copy is in
5435 * true if the copy is finished; otherwise, false if the copy is in progress. 5684 /// progress. This property is always present in the response.
5436 * This property is always present in the response.
5437 */
5438 core.bool done; 5685 core.bool done;
5439 /** The kind of item this is. */ 5686
5687 /// The kind of item this is.
5440 core.String kind; 5688 core.String kind;
5441 /** 5689
5442 * The total size of the object being copied in bytes. This property is always 5690 /// The total size of the object being copied in bytes. This property is
5443 * present in the response. 5691 /// always present in the response.
5444 */
5445 core.String objectSize; 5692 core.String objectSize;
5446 /** 5693
5447 * A resource containing the metadata for the copied-to object. This property 5694 /// A resource containing the metadata for the copied-to object. This
5448 * is present in the response only when copying completes. 5695 /// property is present in the response only when copying completes.
5449 */
5450 Object resource; 5696 Object resource;
5451 /** 5697
5452 * A token to use in subsequent requests to continue copying data. This token 5698 /// A token to use in subsequent requests to continue copying data. This
5453 * is present in the response only when there is more data to copy. 5699 /// token is present in the response only when there is more data to copy.
5454 */
5455 core.String rewriteToken; 5700 core.String rewriteToken;
5456 /** 5701
5457 * The total bytes written so far, which can be used to provide a waiting user 5702 /// The total bytes written so far, which can be used to provide a waiting
5458 * with a progress indicator. This property is always present in the response. 5703 /// user with a progress indicator. This property is always present in the
5459 */ 5704 /// response.
5460 core.String totalBytesRewritten; 5705 core.String totalBytesRewritten;
5461 5706
5462 RewriteResponse(); 5707 RewriteResponse();
5463 5708
5464 RewriteResponse.fromJson(core.Map _json) { 5709 RewriteResponse.fromJson(core.Map _json) {
5465 if (_json.containsKey("done")) { 5710 if (_json.containsKey("done")) {
5466 done = _json["done"]; 5711 done = _json["done"];
5467 } 5712 }
5468 if (_json.containsKey("kind")) { 5713 if (_json.containsKey("kind")) {
5469 kind = _json["kind"]; 5714 kind = _json["kind"];
5470 } 5715 }
5471 if (_json.containsKey("objectSize")) { 5716 if (_json.containsKey("objectSize")) {
5472 objectSize = _json["objectSize"]; 5717 objectSize = _json["objectSize"];
5473 } 5718 }
5474 if (_json.containsKey("resource")) { 5719 if (_json.containsKey("resource")) {
5475 resource = new Object.fromJson(_json["resource"]); 5720 resource = new Object.fromJson(_json["resource"]);
5476 } 5721 }
5477 if (_json.containsKey("rewriteToken")) { 5722 if (_json.containsKey("rewriteToken")) {
5478 rewriteToken = _json["rewriteToken"]; 5723 rewriteToken = _json["rewriteToken"];
5479 } 5724 }
5480 if (_json.containsKey("totalBytesRewritten")) { 5725 if (_json.containsKey("totalBytesRewritten")) {
5481 totalBytesRewritten = _json["totalBytesRewritten"]; 5726 totalBytesRewritten = _json["totalBytesRewritten"];
5482 } 5727 }
5483 } 5728 }
5484 5729
5485 core.Map<core.String, core.Object> toJson() { 5730 core.Map<core.String, core.Object> toJson() {
5486 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5731 final core.Map<core.String, core.Object> _json =
5732 new core.Map<core.String, core.Object>();
5487 if (done != null) { 5733 if (done != null) {
5488 _json["done"] = done; 5734 _json["done"] = done;
5489 } 5735 }
5490 if (kind != null) { 5736 if (kind != null) {
5491 _json["kind"] = kind; 5737 _json["kind"] = kind;
5492 } 5738 }
5493 if (objectSize != null) { 5739 if (objectSize != null) {
5494 _json["objectSize"] = objectSize; 5740 _json["objectSize"] = objectSize;
5495 } 5741 }
5496 if (resource != null) { 5742 if (resource != null) {
5497 _json["resource"] = (resource).toJson(); 5743 _json["resource"] = (resource).toJson();
5498 } 5744 }
5499 if (rewriteToken != null) { 5745 if (rewriteToken != null) {
5500 _json["rewriteToken"] = rewriteToken; 5746 _json["rewriteToken"] = rewriteToken;
5501 } 5747 }
5502 if (totalBytesRewritten != null) { 5748 if (totalBytesRewritten != null) {
5503 _json["totalBytesRewritten"] = totalBytesRewritten; 5749 _json["totalBytesRewritten"] = totalBytesRewritten;
5504 } 5750 }
5505 return _json; 5751 return _json;
5506 } 5752 }
5507 } 5753 }
5508 5754
5509 /** A subscription to receive Google PubSub notifications. */ 5755 /// A subscription to receive Google PubSub notifications.
5510 class ServiceAccount { 5756 class ServiceAccount {
5511 /** The ID of the notification. */ 5757 /// The ID of the notification.
5512 core.String emailAddress; 5758 core.String emailAddress;
5513 /** 5759
5514 * The kind of item this is. For notifications, this is always 5760 /// The kind of item this is. For notifications, this is always
5515 * storage#notification. 5761 /// storage#notification.
5516 */
5517 core.String kind; 5762 core.String kind;
5518 5763
5519 ServiceAccount(); 5764 ServiceAccount();
5520 5765
5521 ServiceAccount.fromJson(core.Map _json) { 5766 ServiceAccount.fromJson(core.Map _json) {
5522 if (_json.containsKey("email_address")) { 5767 if (_json.containsKey("email_address")) {
5523 emailAddress = _json["email_address"]; 5768 emailAddress = _json["email_address"];
5524 } 5769 }
5525 if (_json.containsKey("kind")) { 5770 if (_json.containsKey("kind")) {
5526 kind = _json["kind"]; 5771 kind = _json["kind"];
5527 } 5772 }
5528 } 5773 }
5529 5774
5530 core.Map<core.String, core.Object> toJson() { 5775 core.Map<core.String, core.Object> toJson() {
5531 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5776 final core.Map<core.String, core.Object> _json =
5777 new core.Map<core.String, core.Object>();
5532 if (emailAddress != null) { 5778 if (emailAddress != null) {
5533 _json["email_address"] = emailAddress; 5779 _json["email_address"] = emailAddress;
5534 } 5780 }
5535 if (kind != null) { 5781 if (kind != null) {
5536 _json["kind"] = kind; 5782 _json["kind"] = kind;
5537 } 5783 }
5538 return _json; 5784 return _json;
5539 } 5785 }
5540 } 5786 }
5541 5787
5542 /** A storage.(buckets|objects).testIamPermissions response. */ 5788 /// A storage.(buckets|objects).testIamPermissions response.
5543 class TestIamPermissionsResponse { 5789 class TestIamPermissionsResponse {
5544 /** The kind of item this is. */ 5790 /// The kind of item this is.
5545 core.String kind; 5791 core.String kind;
5546 /** 5792
5547 * The permissions held by the caller. Permissions are always of the format 5793 /// The permissions held by the caller. Permissions are always of the format
5548 * storage.resource.capability, where resource is one of buckets or objects. 5794 /// storage.resource.capability, where resource is one of buckets or objects.
5549 * The supported permissions are as follows: 5795 /// The supported permissions are as follows:
5550 * - storage.buckets.delete — Delete bucket. 5796 /// - storage.buckets.delete — Delete bucket.
5551 * - storage.buckets.get — Read bucket metadata. 5797 /// - storage.buckets.get — Read bucket metadata.
5552 * - storage.buckets.getIamPolicy — Read bucket IAM policy. 5798 /// - storage.buckets.getIamPolicy — Read bucket IAM policy.
5553 * - storage.buckets.create — Create bucket. 5799 /// - storage.buckets.create — Create bucket.
5554 * - storage.buckets.list — List buckets. 5800 /// - storage.buckets.list — List buckets.
5555 * - storage.buckets.setIamPolicy — Update bucket IAM policy. 5801 /// - storage.buckets.setIamPolicy — Update bucket IAM policy.
5556 * - storage.buckets.update — Update bucket metadata. 5802 /// - storage.buckets.update — Update bucket metadata.
5557 * - storage.objects.delete — Delete object. 5803 /// - storage.objects.delete — Delete object.
5558 * - storage.objects.get — Read object data and metadata. 5804 /// - storage.objects.get — Read object data and metadata.
5559 * - storage.objects.getIamPolicy — Read object IAM policy. 5805 /// - storage.objects.getIamPolicy — Read object IAM policy.
5560 * - storage.objects.create — Create object. 5806 /// - storage.objects.create — Create object.
5561 * - storage.objects.list — List objects. 5807 /// - storage.objects.list — List objects.
5562 * - storage.objects.setIamPolicy — Update object IAM policy. 5808 /// - storage.objects.setIamPolicy — Update object IAM policy.
5563 * - storage.objects.update — Update object metadata. 5809 /// - storage.objects.update — Update object metadata.
5564 */
5565 core.List<core.String> permissions; 5810 core.List<core.String> permissions;
5566 5811
5567 TestIamPermissionsResponse(); 5812 TestIamPermissionsResponse();
5568 5813
5569 TestIamPermissionsResponse.fromJson(core.Map _json) { 5814 TestIamPermissionsResponse.fromJson(core.Map _json) {
5570 if (_json.containsKey("kind")) { 5815 if (_json.containsKey("kind")) {
5571 kind = _json["kind"]; 5816 kind = _json["kind"];
5572 } 5817 }
5573 if (_json.containsKey("permissions")) { 5818 if (_json.containsKey("permissions")) {
5574 permissions = _json["permissions"]; 5819 permissions = _json["permissions"];
5575 } 5820 }
5576 } 5821 }
5577 5822
5578 core.Map<core.String, core.Object> toJson() { 5823 core.Map<core.String, core.Object> toJson() {
5579 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 5824 final core.Map<core.String, core.Object> _json =
5825 new core.Map<core.String, core.Object>();
5580 if (kind != null) { 5826 if (kind != null) {
5581 _json["kind"] = kind; 5827 _json["kind"] = kind;
5582 } 5828 }
5583 if (permissions != null) { 5829 if (permissions != null) {
5584 _json["permissions"] = permissions; 5830 _json["permissions"] = permissions;
5585 } 5831 }
5586 return _json; 5832 return _json;
5587 } 5833 }
5588 } 5834 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/speech/v1.dart ('k') | generated/googleapis/lib/storagetransfer/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698