OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis.storage.v1; | 3 library googleapis.storage.v1; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, |
| 16 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, |
| 17 ByteRange; |
| 18 |
| 19 const core.String USER_AGENT = 'dart-api-client storage/v1'; |
15 | 20 |
16 /** Lets you store and retrieve potentially-large, immutable data objects. */ | 21 /** Lets you store and retrieve potentially-large, immutable data objects. */ |
17 class StorageApi { | 22 class StorageApi { |
18 /** View and manage your data across Google Cloud Platform services */ | 23 /** View and manage your data across Google Cloud Platform services */ |
19 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
20 | 25 |
21 /** Manage your data and permissions in Google Cloud Storage */ | 26 /** Manage your data and permissions in Google Cloud Storage */ |
22 static const DevstorageFullControlScope = "https://www.googleapis.com/auth/dev
storage.full_control"; | 27 static const DevstorageFullControlScope = "https://www.googleapis.com/auth/dev
storage.full_control"; |
23 | 28 |
24 /** View your data in Google Cloud Storage */ | 29 /** View your data in Google Cloud Storage */ |
25 static const DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devsto
rage.read_only"; | 30 static const DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devsto
rage.read_only"; |
26 | 31 |
27 /** Manage your data in Google Cloud Storage */ | 32 /** Manage your data in Google Cloud Storage */ |
28 static const DevstorageReadWriteScope = "https://www.googleapis.com/auth/devst
orage.read_write"; | 33 static const DevstorageReadWriteScope = "https://www.googleapis.com/auth/devst
orage.read_write"; |
29 | 34 |
30 | 35 |
31 final common_internal.ApiRequester _requester; | 36 final commons.ApiRequester _requester; |
32 | 37 |
33 BucketAccessControlsResourceApi get bucketAccessControls => new BucketAccessCo
ntrolsResourceApi(_requester); | 38 BucketAccessControlsResourceApi get bucketAccessControls => new BucketAccessCo
ntrolsResourceApi(_requester); |
34 BucketsResourceApi get buckets => new BucketsResourceApi(_requester); | 39 BucketsResourceApi get buckets => new BucketsResourceApi(_requester); |
35 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); | 40 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
36 DefaultObjectAccessControlsResourceApi get defaultObjectAccessControls => new
DefaultObjectAccessControlsResourceApi(_requester); | 41 DefaultObjectAccessControlsResourceApi get defaultObjectAccessControls => new
DefaultObjectAccessControlsResourceApi(_requester); |
37 ObjectAccessControlsResourceApi get objectAccessControls => new ObjectAccessCo
ntrolsResourceApi(_requester); | 42 ObjectAccessControlsResourceApi get objectAccessControls => new ObjectAccessCo
ntrolsResourceApi(_requester); |
38 ObjectsResourceApi get objects => new ObjectsResourceApi(_requester); | 43 ObjectsResourceApi get objects => new ObjectsResourceApi(_requester); |
39 | 44 |
40 StorageApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "storage/v1/"}) : | 45 StorageApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "storage/v1/"}) : |
41 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 46 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
42 } | 47 } |
43 | 48 |
44 | 49 |
45 /** Not documented yet. */ | |
46 class BucketAccessControlsResourceApi { | 50 class BucketAccessControlsResourceApi { |
47 final common_internal.ApiRequester _requester; | 51 final commons.ApiRequester _requester; |
48 | 52 |
49 BucketAccessControlsResourceApi(common_internal.ApiRequester client) : | 53 BucketAccessControlsResourceApi(commons.ApiRequester client) : |
50 _requester = client; | 54 _requester = client; |
51 | 55 |
52 /** | 56 /** |
53 * Permanently deletes the ACL entry for the specified entity on the specified | 57 * Permanently deletes the ACL entry for the specified entity on the specified |
54 * bucket. | 58 * bucket. |
55 * | 59 * |
56 * Request parameters: | 60 * Request parameters: |
57 * | 61 * |
58 * [bucket] - Name of a bucket. | 62 * [bucket] - Name of a bucket. |
59 * | 63 * |
60 * [entity] - The entity holding the permission. Can be user-userId, | 64 * [entity] - The entity holding the permission. Can be user-userId, |
61 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 65 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
62 * allAuthenticatedUsers. | 66 * allAuthenticatedUsers. |
63 * | 67 * |
64 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 68 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
65 * error. | 69 * error. |
66 * | 70 * |
67 * If the used [http.Client] completes with an error when making a REST call, | 71 * If the used [http.Client] completes with an error when making a REST call, |
68 * this method will complete with the same error. | 72 * this method will complete with the same error. |
69 */ | 73 */ |
70 async.Future delete(core.String bucket, core.String entity) { | 74 async.Future delete(core.String bucket, core.String entity) { |
71 var _url = null; | 75 var _url = null; |
72 var _queryParams = new core.Map(); | 76 var _queryParams = new core.Map(); |
73 var _uploadMedia = null; | 77 var _uploadMedia = null; |
74 var _uploadOptions = null; | 78 var _uploadOptions = null; |
75 var _downloadOptions = common.DownloadOptions.Metadata; | 79 var _downloadOptions = commons.DownloadOptions.Metadata; |
76 var _body = null; | 80 var _body = null; |
77 | 81 |
78 if (bucket == null) { | 82 if (bucket == null) { |
79 throw new core.ArgumentError("Parameter bucket is required."); | 83 throw new core.ArgumentError("Parameter bucket is required."); |
80 } | 84 } |
81 if (entity == null) { | 85 if (entity == null) { |
82 throw new core.ArgumentError("Parameter entity is required."); | 86 throw new core.ArgumentError("Parameter entity is required."); |
83 } | 87 } |
84 | 88 |
85 _downloadOptions = null; | 89 _downloadOptions = null; |
86 | 90 |
87 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/acl/' + c
ommon_internal.Escaper.ecapeVariable('$entity'); | 91 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E
scaper.ecapeVariable('$entity'); |
88 | 92 |
89 var _response = _requester.request(_url, | 93 var _response = _requester.request(_url, |
90 "DELETE", | 94 "DELETE", |
91 body: _body, | 95 body: _body, |
92 queryParams: _queryParams, | 96 queryParams: _queryParams, |
93 uploadOptions: _uploadOptions, | 97 uploadOptions: _uploadOptions, |
94 uploadMedia: _uploadMedia, | 98 uploadMedia: _uploadMedia, |
95 downloadOptions: _downloadOptions); | 99 downloadOptions: _downloadOptions); |
96 return _response.then((data) => null); | 100 return _response.then((data) => null); |
97 } | 101 } |
98 | 102 |
99 /** | 103 /** |
100 * Returns the ACL entry for the specified entity on the specified bucket. | 104 * Returns the ACL entry for the specified entity on the specified bucket. |
101 * | 105 * |
102 * Request parameters: | 106 * Request parameters: |
103 * | 107 * |
104 * [bucket] - Name of a bucket. | 108 * [bucket] - Name of a bucket. |
105 * | 109 * |
106 * [entity] - The entity holding the permission. Can be user-userId, | 110 * [entity] - The entity holding the permission. Can be user-userId, |
107 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 111 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
108 * allAuthenticatedUsers. | 112 * allAuthenticatedUsers. |
109 * | 113 * |
110 * Completes with a [BucketAccessControl]. | 114 * Completes with a [BucketAccessControl]. |
111 * | 115 * |
112 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
113 * error. | 117 * error. |
114 * | 118 * |
115 * If the used [http.Client] completes with an error when making a REST call, | 119 * If the used [http.Client] completes with an error when making a REST call, |
116 * this method will complete with the same error. | 120 * this method will complete with the same error. |
117 */ | 121 */ |
118 async.Future<BucketAccessControl> get(core.String bucket, core.String entity)
{ | 122 async.Future<BucketAccessControl> get(core.String bucket, core.String entity)
{ |
119 var _url = null; | 123 var _url = null; |
120 var _queryParams = new core.Map(); | 124 var _queryParams = new core.Map(); |
121 var _uploadMedia = null; | 125 var _uploadMedia = null; |
122 var _uploadOptions = null; | 126 var _uploadOptions = null; |
123 var _downloadOptions = common.DownloadOptions.Metadata; | 127 var _downloadOptions = commons.DownloadOptions.Metadata; |
124 var _body = null; | 128 var _body = null; |
125 | 129 |
126 if (bucket == null) { | 130 if (bucket == null) { |
127 throw new core.ArgumentError("Parameter bucket is required."); | 131 throw new core.ArgumentError("Parameter bucket is required."); |
128 } | 132 } |
129 if (entity == null) { | 133 if (entity == null) { |
130 throw new core.ArgumentError("Parameter entity is required."); | 134 throw new core.ArgumentError("Parameter entity is required."); |
131 } | 135 } |
132 | 136 |
133 | 137 |
134 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/acl/' + c
ommon_internal.Escaper.ecapeVariable('$entity'); | 138 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E
scaper.ecapeVariable('$entity'); |
135 | 139 |
136 var _response = _requester.request(_url, | 140 var _response = _requester.request(_url, |
137 "GET", | 141 "GET", |
138 body: _body, | 142 body: _body, |
139 queryParams: _queryParams, | 143 queryParams: _queryParams, |
140 uploadOptions: _uploadOptions, | 144 uploadOptions: _uploadOptions, |
141 uploadMedia: _uploadMedia, | 145 uploadMedia: _uploadMedia, |
142 downloadOptions: _downloadOptions); | 146 downloadOptions: _downloadOptions); |
143 return _response.then((data) => new BucketAccessControl.fromJson(data)); | 147 return _response.then((data) => new BucketAccessControl.fromJson(data)); |
144 } | 148 } |
145 | 149 |
146 /** | 150 /** |
147 * Creates a new ACL entry on the specified bucket. | 151 * Creates a new ACL entry on the specified bucket. |
148 * | 152 * |
149 * [request] - The metadata request object. | 153 * [request] - The metadata request object. |
150 * | 154 * |
151 * Request parameters: | 155 * Request parameters: |
152 * | 156 * |
153 * [bucket] - Name of a bucket. | 157 * [bucket] - Name of a bucket. |
154 * | 158 * |
155 * Completes with a [BucketAccessControl]. | 159 * Completes with a [BucketAccessControl]. |
156 * | 160 * |
157 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 161 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
158 * error. | 162 * error. |
159 * | 163 * |
160 * If the used [http.Client] completes with an error when making a REST call, | 164 * If the used [http.Client] completes with an error when making a REST call, |
161 * this method will complete with the same error. | 165 * this method will complete with the same error. |
162 */ | 166 */ |
163 async.Future<BucketAccessControl> insert(BucketAccessControl request, core.Str
ing bucket) { | 167 async.Future<BucketAccessControl> insert(BucketAccessControl request, core.Str
ing bucket) { |
164 var _url = null; | 168 var _url = null; |
165 var _queryParams = new core.Map(); | 169 var _queryParams = new core.Map(); |
166 var _uploadMedia = null; | 170 var _uploadMedia = null; |
167 var _uploadOptions = null; | 171 var _uploadOptions = null; |
168 var _downloadOptions = common.DownloadOptions.Metadata; | 172 var _downloadOptions = commons.DownloadOptions.Metadata; |
169 var _body = null; | 173 var _body = null; |
170 | 174 |
171 if (request != null) { | 175 if (request != null) { |
172 _body = convert.JSON.encode((request).toJson()); | 176 _body = convert.JSON.encode((request).toJson()); |
173 } | 177 } |
174 if (bucket == null) { | 178 if (bucket == null) { |
175 throw new core.ArgumentError("Parameter bucket is required."); | 179 throw new core.ArgumentError("Parameter bucket is required."); |
176 } | 180 } |
177 | 181 |
178 | 182 |
179 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/acl'; | 183 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl'; |
180 | 184 |
181 var _response = _requester.request(_url, | 185 var _response = _requester.request(_url, |
182 "POST", | 186 "POST", |
183 body: _body, | 187 body: _body, |
184 queryParams: _queryParams, | 188 queryParams: _queryParams, |
185 uploadOptions: _uploadOptions, | 189 uploadOptions: _uploadOptions, |
186 uploadMedia: _uploadMedia, | 190 uploadMedia: _uploadMedia, |
187 downloadOptions: _downloadOptions); | 191 downloadOptions: _downloadOptions); |
188 return _response.then((data) => new BucketAccessControl.fromJson(data)); | 192 return _response.then((data) => new BucketAccessControl.fromJson(data)); |
189 } | 193 } |
190 | 194 |
191 /** | 195 /** |
192 * Retrieves ACL entries on the specified bucket. | 196 * Retrieves ACL entries on the specified bucket. |
193 * | 197 * |
194 * Request parameters: | 198 * Request parameters: |
195 * | 199 * |
196 * [bucket] - Name of a bucket. | 200 * [bucket] - Name of a bucket. |
197 * | 201 * |
198 * Completes with a [BucketAccessControls]. | 202 * Completes with a [BucketAccessControls]. |
199 * | 203 * |
200 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 204 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
201 * error. | 205 * error. |
202 * | 206 * |
203 * If the used [http.Client] completes with an error when making a REST call, | 207 * If the used [http.Client] completes with an error when making a REST call, |
204 * this method will complete with the same error. | 208 * this method will complete with the same error. |
205 */ | 209 */ |
206 async.Future<BucketAccessControls> list(core.String bucket) { | 210 async.Future<BucketAccessControls> list(core.String bucket) { |
207 var _url = null; | 211 var _url = null; |
208 var _queryParams = new core.Map(); | 212 var _queryParams = new core.Map(); |
209 var _uploadMedia = null; | 213 var _uploadMedia = null; |
210 var _uploadOptions = null; | 214 var _uploadOptions = null; |
211 var _downloadOptions = common.DownloadOptions.Metadata; | 215 var _downloadOptions = commons.DownloadOptions.Metadata; |
212 var _body = null; | 216 var _body = null; |
213 | 217 |
214 if (bucket == null) { | 218 if (bucket == null) { |
215 throw new core.ArgumentError("Parameter bucket is required."); | 219 throw new core.ArgumentError("Parameter bucket is required."); |
216 } | 220 } |
217 | 221 |
218 | 222 |
219 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/acl'; | 223 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl'; |
220 | 224 |
221 var _response = _requester.request(_url, | 225 var _response = _requester.request(_url, |
222 "GET", | 226 "GET", |
223 body: _body, | 227 body: _body, |
224 queryParams: _queryParams, | 228 queryParams: _queryParams, |
225 uploadOptions: _uploadOptions, | 229 uploadOptions: _uploadOptions, |
226 uploadMedia: _uploadMedia, | 230 uploadMedia: _uploadMedia, |
227 downloadOptions: _downloadOptions); | 231 downloadOptions: _downloadOptions); |
228 return _response.then((data) => new BucketAccessControls.fromJson(data)); | 232 return _response.then((data) => new BucketAccessControls.fromJson(data)); |
229 } | 233 } |
230 | 234 |
231 /** | 235 /** |
232 * Updates an ACL entry on the specified bucket. This method supports patch | 236 * Updates an ACL entry on the specified bucket. This method supports patch |
233 * semantics. | 237 * semantics. |
234 * | 238 * |
235 * [request] - The metadata request object. | 239 * [request] - The metadata request object. |
236 * | 240 * |
237 * Request parameters: | 241 * Request parameters: |
238 * | 242 * |
239 * [bucket] - Name of a bucket. | 243 * [bucket] - Name of a bucket. |
240 * | 244 * |
241 * [entity] - The entity holding the permission. Can be user-userId, | 245 * [entity] - The entity holding the permission. Can be user-userId, |
242 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 246 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
243 * allAuthenticatedUsers. | 247 * allAuthenticatedUsers. |
244 * | 248 * |
245 * Completes with a [BucketAccessControl]. | 249 * Completes with a [BucketAccessControl]. |
246 * | 250 * |
247 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 251 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
248 * error. | 252 * error. |
249 * | 253 * |
250 * If the used [http.Client] completes with an error when making a REST call, | 254 * If the used [http.Client] completes with an error when making a REST call, |
251 * this method will complete with the same error. | 255 * this method will complete with the same error. |
252 */ | 256 */ |
253 async.Future<BucketAccessControl> patch(BucketAccessControl request, core.Stri
ng bucket, core.String entity) { | 257 async.Future<BucketAccessControl> patch(BucketAccessControl request, core.Stri
ng bucket, core.String entity) { |
254 var _url = null; | 258 var _url = null; |
255 var _queryParams = new core.Map(); | 259 var _queryParams = new core.Map(); |
256 var _uploadMedia = null; | 260 var _uploadMedia = null; |
257 var _uploadOptions = null; | 261 var _uploadOptions = null; |
258 var _downloadOptions = common.DownloadOptions.Metadata; | 262 var _downloadOptions = commons.DownloadOptions.Metadata; |
259 var _body = null; | 263 var _body = null; |
260 | 264 |
261 if (request != null) { | 265 if (request != null) { |
262 _body = convert.JSON.encode((request).toJson()); | 266 _body = convert.JSON.encode((request).toJson()); |
263 } | 267 } |
264 if (bucket == null) { | 268 if (bucket == null) { |
265 throw new core.ArgumentError("Parameter bucket is required."); | 269 throw new core.ArgumentError("Parameter bucket is required."); |
266 } | 270 } |
267 if (entity == null) { | 271 if (entity == null) { |
268 throw new core.ArgumentError("Parameter entity is required."); | 272 throw new core.ArgumentError("Parameter entity is required."); |
269 } | 273 } |
270 | 274 |
271 | 275 |
272 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/acl/' + c
ommon_internal.Escaper.ecapeVariable('$entity'); | 276 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E
scaper.ecapeVariable('$entity'); |
273 | 277 |
274 var _response = _requester.request(_url, | 278 var _response = _requester.request(_url, |
275 "PATCH", | 279 "PATCH", |
276 body: _body, | 280 body: _body, |
277 queryParams: _queryParams, | 281 queryParams: _queryParams, |
278 uploadOptions: _uploadOptions, | 282 uploadOptions: _uploadOptions, |
279 uploadMedia: _uploadMedia, | 283 uploadMedia: _uploadMedia, |
280 downloadOptions: _downloadOptions); | 284 downloadOptions: _downloadOptions); |
281 return _response.then((data) => new BucketAccessControl.fromJson(data)); | 285 return _response.then((data) => new BucketAccessControl.fromJson(data)); |
282 } | 286 } |
283 | 287 |
284 /** | 288 /** |
285 * Updates an ACL entry on the specified bucket. | 289 * Updates an ACL entry on the specified bucket. |
286 * | 290 * |
287 * [request] - The metadata request object. | 291 * [request] - The metadata request object. |
288 * | 292 * |
289 * Request parameters: | 293 * Request parameters: |
290 * | 294 * |
291 * [bucket] - Name of a bucket. | 295 * [bucket] - Name of a bucket. |
292 * | 296 * |
293 * [entity] - The entity holding the permission. Can be user-userId, | 297 * [entity] - The entity holding the permission. Can be user-userId, |
294 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 298 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
295 * allAuthenticatedUsers. | 299 * allAuthenticatedUsers. |
296 * | 300 * |
297 * Completes with a [BucketAccessControl]. | 301 * Completes with a [BucketAccessControl]. |
298 * | 302 * |
299 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 303 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
300 * error. | 304 * error. |
301 * | 305 * |
302 * If the used [http.Client] completes with an error when making a REST call, | 306 * If the used [http.Client] completes with an error when making a REST call, |
303 * this method will complete with the same error. | 307 * this method will complete with the same error. |
304 */ | 308 */ |
305 async.Future<BucketAccessControl> update(BucketAccessControl request, core.Str
ing bucket, core.String entity) { | 309 async.Future<BucketAccessControl> update(BucketAccessControl request, core.Str
ing bucket, core.String entity) { |
306 var _url = null; | 310 var _url = null; |
307 var _queryParams = new core.Map(); | 311 var _queryParams = new core.Map(); |
308 var _uploadMedia = null; | 312 var _uploadMedia = null; |
309 var _uploadOptions = null; | 313 var _uploadOptions = null; |
310 var _downloadOptions = common.DownloadOptions.Metadata; | 314 var _downloadOptions = commons.DownloadOptions.Metadata; |
311 var _body = null; | 315 var _body = null; |
312 | 316 |
313 if (request != null) { | 317 if (request != null) { |
314 _body = convert.JSON.encode((request).toJson()); | 318 _body = convert.JSON.encode((request).toJson()); |
315 } | 319 } |
316 if (bucket == null) { | 320 if (bucket == null) { |
317 throw new core.ArgumentError("Parameter bucket is required."); | 321 throw new core.ArgumentError("Parameter bucket is required."); |
318 } | 322 } |
319 if (entity == null) { | 323 if (entity == null) { |
320 throw new core.ArgumentError("Parameter entity is required."); | 324 throw new core.ArgumentError("Parameter entity is required."); |
321 } | 325 } |
322 | 326 |
323 | 327 |
324 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/acl/' + c
ommon_internal.Escaper.ecapeVariable('$entity'); | 328 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/acl/' + commons.E
scaper.ecapeVariable('$entity'); |
325 | 329 |
326 var _response = _requester.request(_url, | 330 var _response = _requester.request(_url, |
327 "PUT", | 331 "PUT", |
328 body: _body, | 332 body: _body, |
329 queryParams: _queryParams, | 333 queryParams: _queryParams, |
330 uploadOptions: _uploadOptions, | 334 uploadOptions: _uploadOptions, |
331 uploadMedia: _uploadMedia, | 335 uploadMedia: _uploadMedia, |
332 downloadOptions: _downloadOptions); | 336 downloadOptions: _downloadOptions); |
333 return _response.then((data) => new BucketAccessControl.fromJson(data)); | 337 return _response.then((data) => new BucketAccessControl.fromJson(data)); |
334 } | 338 } |
335 | 339 |
336 } | 340 } |
337 | 341 |
338 | 342 |
339 /** Not documented yet. */ | |
340 class BucketsResourceApi { | 343 class BucketsResourceApi { |
341 final common_internal.ApiRequester _requester; | 344 final commons.ApiRequester _requester; |
342 | 345 |
343 BucketsResourceApi(common_internal.ApiRequester client) : | 346 BucketsResourceApi(commons.ApiRequester client) : |
344 _requester = client; | 347 _requester = client; |
345 | 348 |
346 /** | 349 /** |
347 * Permanently deletes an empty bucket. | 350 * Permanently deletes an empty bucket. |
348 * | 351 * |
349 * Request parameters: | 352 * Request parameters: |
350 * | 353 * |
351 * [bucket] - Name of a bucket. | 354 * [bucket] - Name of a bucket. |
352 * | 355 * |
353 * [ifMetagenerationMatch] - If set, only deletes the bucket if its | 356 * [ifMetagenerationMatch] - If set, only deletes the bucket if its |
354 * metageneration matches this value. | 357 * metageneration matches this value. |
355 * | 358 * |
356 * [ifMetagenerationNotMatch] - If set, only deletes the bucket if its | 359 * [ifMetagenerationNotMatch] - If set, only deletes the bucket if its |
357 * metageneration does not match this value. | 360 * metageneration does not match this value. |
358 * | 361 * |
359 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 362 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
360 * error. | 363 * error. |
361 * | 364 * |
362 * If the used [http.Client] completes with an error when making a REST call, | 365 * If the used [http.Client] completes with an error when making a REST call, |
363 * this method will complete with the same error. | 366 * this method will complete with the same error. |
364 */ | 367 */ |
365 async.Future delete(core.String bucket, {core.String ifMetagenerationMatch, co
re.String ifMetagenerationNotMatch}) { | 368 async.Future delete(core.String bucket, {core.String ifMetagenerationMatch, co
re.String ifMetagenerationNotMatch}) { |
366 var _url = null; | 369 var _url = null; |
367 var _queryParams = new core.Map(); | 370 var _queryParams = new core.Map(); |
368 var _uploadMedia = null; | 371 var _uploadMedia = null; |
369 var _uploadOptions = null; | 372 var _uploadOptions = null; |
370 var _downloadOptions = common.DownloadOptions.Metadata; | 373 var _downloadOptions = commons.DownloadOptions.Metadata; |
371 var _body = null; | 374 var _body = null; |
372 | 375 |
373 if (bucket == null) { | 376 if (bucket == null) { |
374 throw new core.ArgumentError("Parameter bucket is required."); | 377 throw new core.ArgumentError("Parameter bucket is required."); |
375 } | 378 } |
376 if (ifMetagenerationMatch != null) { | 379 if (ifMetagenerationMatch != null) { |
377 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 380 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
378 } | 381 } |
379 if (ifMetagenerationNotMatch != null) { | 382 if (ifMetagenerationNotMatch != null) { |
380 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 383 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
381 } | 384 } |
382 | 385 |
383 _downloadOptions = null; | 386 _downloadOptions = null; |
384 | 387 |
385 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); | 388 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); |
386 | 389 |
387 var _response = _requester.request(_url, | 390 var _response = _requester.request(_url, |
388 "DELETE", | 391 "DELETE", |
389 body: _body, | 392 body: _body, |
390 queryParams: _queryParams, | 393 queryParams: _queryParams, |
391 uploadOptions: _uploadOptions, | 394 uploadOptions: _uploadOptions, |
392 uploadMedia: _uploadMedia, | 395 uploadMedia: _uploadMedia, |
393 downloadOptions: _downloadOptions); | 396 downloadOptions: _downloadOptions); |
394 return _response.then((data) => null); | 397 return _response.then((data) => null); |
395 } | 398 } |
(...skipping 13 matching lines...) Loading... |
409 * conditional on whether the bucket's current metageneration does not match | 412 * conditional on whether the bucket's current metageneration does not match |
410 * the given value. | 413 * the given value. |
411 * | 414 * |
412 * [projection] - Set of properties to return. Defaults to noAcl. | 415 * [projection] - Set of properties to return. Defaults to noAcl. |
413 * Possible string values are: | 416 * Possible string values are: |
414 * - "full" : Include all properties. | 417 * - "full" : Include all properties. |
415 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 418 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
416 * | 419 * |
417 * Completes with a [Bucket]. | 420 * Completes with a [Bucket]. |
418 * | 421 * |
419 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 422 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
420 * error. | 423 * error. |
421 * | 424 * |
422 * If the used [http.Client] completes with an error when making a REST call, | 425 * If the used [http.Client] completes with an error when making a REST call, |
423 * this method will complete with the same error. | 426 * this method will complete with the same error. |
424 */ | 427 */ |
425 async.Future<Bucket> get(core.String bucket, {core.String ifMetagenerationMatc
h, core.String ifMetagenerationNotMatch, core.String projection}) { | 428 async.Future<Bucket> get(core.String bucket, {core.String ifMetagenerationMatc
h, core.String ifMetagenerationNotMatch, core.String projection}) { |
426 var _url = null; | 429 var _url = null; |
427 var _queryParams = new core.Map(); | 430 var _queryParams = new core.Map(); |
428 var _uploadMedia = null; | 431 var _uploadMedia = null; |
429 var _uploadOptions = null; | 432 var _uploadOptions = null; |
430 var _downloadOptions = common.DownloadOptions.Metadata; | 433 var _downloadOptions = commons.DownloadOptions.Metadata; |
431 var _body = null; | 434 var _body = null; |
432 | 435 |
433 if (bucket == null) { | 436 if (bucket == null) { |
434 throw new core.ArgumentError("Parameter bucket is required."); | 437 throw new core.ArgumentError("Parameter bucket is required."); |
435 } | 438 } |
436 if (ifMetagenerationMatch != null) { | 439 if (ifMetagenerationMatch != null) { |
437 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 440 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
438 } | 441 } |
439 if (ifMetagenerationNotMatch != null) { | 442 if (ifMetagenerationNotMatch != null) { |
440 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 443 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
441 } | 444 } |
442 if (projection != null) { | 445 if (projection != null) { |
443 _queryParams["projection"] = [projection]; | 446 _queryParams["projection"] = [projection]; |
444 } | 447 } |
445 | 448 |
446 | 449 |
447 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); | 450 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); |
448 | 451 |
449 var _response = _requester.request(_url, | 452 var _response = _requester.request(_url, |
450 "GET", | 453 "GET", |
451 body: _body, | 454 body: _body, |
452 queryParams: _queryParams, | 455 queryParams: _queryParams, |
453 uploadOptions: _uploadOptions, | 456 uploadOptions: _uploadOptions, |
454 uploadMedia: _uploadMedia, | 457 uploadMedia: _uploadMedia, |
455 downloadOptions: _downloadOptions); | 458 downloadOptions: _downloadOptions); |
456 return _response.then((data) => new Bucket.fromJson(data)); | 459 return _response.then((data) => new Bucket.fromJson(data)); |
457 } | 460 } |
(...skipping 36 matching lines...) Loading... |
494 * | 497 * |
495 * [projection] - Set of properties to return. Defaults to noAcl, unless the | 498 * [projection] - Set of properties to return. Defaults to noAcl, unless the |
496 * bucket resource specifies acl or defaultObjectAcl properties, when it | 499 * bucket resource specifies acl or defaultObjectAcl properties, when it |
497 * defaults to full. | 500 * defaults to full. |
498 * Possible string values are: | 501 * Possible string values are: |
499 * - "full" : Include all properties. | 502 * - "full" : Include all properties. |
500 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 503 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
501 * | 504 * |
502 * Completes with a [Bucket]. | 505 * Completes with a [Bucket]. |
503 * | 506 * |
504 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 507 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
505 * error. | 508 * error. |
506 * | 509 * |
507 * If the used [http.Client] completes with an error when making a REST call, | 510 * If the used [http.Client] completes with an error when making a REST call, |
508 * this method will complete with the same error. | 511 * this method will complete with the same error. |
509 */ | 512 */ |
510 async.Future<Bucket> insert(Bucket request, core.String project, {core.String
predefinedAcl, core.String predefinedDefaultObjectAcl, core.String projection})
{ | 513 async.Future<Bucket> insert(Bucket request, core.String project, {core.String
predefinedAcl, core.String predefinedDefaultObjectAcl, core.String projection})
{ |
511 var _url = null; | 514 var _url = null; |
512 var _queryParams = new core.Map(); | 515 var _queryParams = new core.Map(); |
513 var _uploadMedia = null; | 516 var _uploadMedia = null; |
514 var _uploadOptions = null; | 517 var _uploadOptions = null; |
515 var _downloadOptions = common.DownloadOptions.Metadata; | 518 var _downloadOptions = commons.DownloadOptions.Metadata; |
516 var _body = null; | 519 var _body = null; |
517 | 520 |
518 if (request != null) { | 521 if (request != null) { |
519 _body = convert.JSON.encode((request).toJson()); | 522 _body = convert.JSON.encode((request).toJson()); |
520 } | 523 } |
521 if (project == null) { | 524 if (project == null) { |
522 throw new core.ArgumentError("Parameter project is required."); | 525 throw new core.ArgumentError("Parameter project is required."); |
523 } | 526 } |
524 _queryParams["project"] = [project]; | 527 _queryParams["project"] = [project]; |
525 if (predefinedAcl != null) { | 528 if (predefinedAcl != null) { |
(...skipping 33 matching lines...) Loading... |
559 * | 562 * |
560 * [prefix] - Filter results to buckets whose names begin with this prefix. | 563 * [prefix] - Filter results to buckets whose names begin with this prefix. |
561 * | 564 * |
562 * [projection] - Set of properties to return. Defaults to noAcl. | 565 * [projection] - Set of properties to return. Defaults to noAcl. |
563 * Possible string values are: | 566 * Possible string values are: |
564 * - "full" : Include all properties. | 567 * - "full" : Include all properties. |
565 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 568 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
566 * | 569 * |
567 * Completes with a [Buckets]. | 570 * Completes with a [Buckets]. |
568 * | 571 * |
569 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 572 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
570 * error. | 573 * error. |
571 * | 574 * |
572 * If the used [http.Client] completes with an error when making a REST call, | 575 * If the used [http.Client] completes with an error when making a REST call, |
573 * this method will complete with the same error. | 576 * this method will complete with the same error. |
574 */ | 577 */ |
575 async.Future<Buckets> list(core.String project, {core.int maxResults, core.Str
ing pageToken, core.String prefix, core.String projection}) { | 578 async.Future<Buckets> list(core.String project, {core.int maxResults, core.Str
ing pageToken, core.String prefix, core.String projection}) { |
576 var _url = null; | 579 var _url = null; |
577 var _queryParams = new core.Map(); | 580 var _queryParams = new core.Map(); |
578 var _uploadMedia = null; | 581 var _uploadMedia = null; |
579 var _uploadOptions = null; | 582 var _uploadOptions = null; |
580 var _downloadOptions = common.DownloadOptions.Metadata; | 583 var _downloadOptions = commons.DownloadOptions.Metadata; |
581 var _body = null; | 584 var _body = null; |
582 | 585 |
583 if (project == null) { | 586 if (project == null) { |
584 throw new core.ArgumentError("Parameter project is required."); | 587 throw new core.ArgumentError("Parameter project is required."); |
585 } | 588 } |
586 _queryParams["project"] = [project]; | 589 _queryParams["project"] = [project]; |
587 if (maxResults != null) { | 590 if (maxResults != null) { |
588 _queryParams["maxResults"] = ["${maxResults}"]; | 591 _queryParams["maxResults"] = ["${maxResults}"]; |
589 } | 592 } |
590 if (pageToken != null) { | 593 if (pageToken != null) { |
(...skipping 63 matching lines...) Loading... |
654 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER | 657 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
655 * access. | 658 * access. |
656 * | 659 * |
657 * [projection] - Set of properties to return. Defaults to full. | 660 * [projection] - Set of properties to return. Defaults to full. |
658 * Possible string values are: | 661 * Possible string values are: |
659 * - "full" : Include all properties. | 662 * - "full" : Include all properties. |
660 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 663 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
661 * | 664 * |
662 * Completes with a [Bucket]. | 665 * Completes with a [Bucket]. |
663 * | 666 * |
664 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 667 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
665 * error. | 668 * error. |
666 * | 669 * |
667 * If the used [http.Client] completes with an error when making a REST call, | 670 * If the used [http.Client] completes with an error when making a REST call, |
668 * this method will complete with the same error. | 671 * this method will complete with the same error. |
669 */ | 672 */ |
670 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}) { | 673 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}) { |
671 var _url = null; | 674 var _url = null; |
672 var _queryParams = new core.Map(); | 675 var _queryParams = new core.Map(); |
673 var _uploadMedia = null; | 676 var _uploadMedia = null; |
674 var _uploadOptions = null; | 677 var _uploadOptions = null; |
675 var _downloadOptions = common.DownloadOptions.Metadata; | 678 var _downloadOptions = commons.DownloadOptions.Metadata; |
676 var _body = null; | 679 var _body = null; |
677 | 680 |
678 if (request != null) { | 681 if (request != null) { |
679 _body = convert.JSON.encode((request).toJson()); | 682 _body = convert.JSON.encode((request).toJson()); |
680 } | 683 } |
681 if (bucket == null) { | 684 if (bucket == null) { |
682 throw new core.ArgumentError("Parameter bucket is required."); | 685 throw new core.ArgumentError("Parameter bucket is required."); |
683 } | 686 } |
684 if (ifMetagenerationMatch != null) { | 687 if (ifMetagenerationMatch != null) { |
685 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 688 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
686 } | 689 } |
687 if (ifMetagenerationNotMatch != null) { | 690 if (ifMetagenerationNotMatch != null) { |
688 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 691 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
689 } | 692 } |
690 if (predefinedAcl != null) { | 693 if (predefinedAcl != null) { |
691 _queryParams["predefinedAcl"] = [predefinedAcl]; | 694 _queryParams["predefinedAcl"] = [predefinedAcl]; |
692 } | 695 } |
693 if (predefinedDefaultObjectAcl != null) { | 696 if (predefinedDefaultObjectAcl != null) { |
694 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; | 697 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; |
695 } | 698 } |
696 if (projection != null) { | 699 if (projection != null) { |
697 _queryParams["projection"] = [projection]; | 700 _queryParams["projection"] = [projection]; |
698 } | 701 } |
699 | 702 |
700 | 703 |
701 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); | 704 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); |
702 | 705 |
703 var _response = _requester.request(_url, | 706 var _response = _requester.request(_url, |
704 "PATCH", | 707 "PATCH", |
705 body: _body, | 708 body: _body, |
706 queryParams: _queryParams, | 709 queryParams: _queryParams, |
707 uploadOptions: _uploadOptions, | 710 uploadOptions: _uploadOptions, |
708 uploadMedia: _uploadMedia, | 711 uploadMedia: _uploadMedia, |
709 downloadOptions: _downloadOptions); | 712 downloadOptions: _downloadOptions); |
710 return _response.then((data) => new Bucket.fromJson(data)); | 713 return _response.then((data) => new Bucket.fromJson(data)); |
711 } | 714 } |
(...skipping 42 matching lines...) Loading... |
754 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER | 757 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
755 * access. | 758 * access. |
756 * | 759 * |
757 * [projection] - Set of properties to return. Defaults to full. | 760 * [projection] - Set of properties to return. Defaults to full. |
758 * Possible string values are: | 761 * Possible string values are: |
759 * - "full" : Include all properties. | 762 * - "full" : Include all properties. |
760 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 763 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
761 * | 764 * |
762 * Completes with a [Bucket]. | 765 * Completes with a [Bucket]. |
763 * | 766 * |
764 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 767 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
765 * error. | 768 * error. |
766 * | 769 * |
767 * If the used [http.Client] completes with an error when making a REST call, | 770 * If the used [http.Client] completes with an error when making a REST call, |
768 * this method will complete with the same error. | 771 * this method will complete with the same error. |
769 */ | 772 */ |
770 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}) { | 773 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}) { |
771 var _url = null; | 774 var _url = null; |
772 var _queryParams = new core.Map(); | 775 var _queryParams = new core.Map(); |
773 var _uploadMedia = null; | 776 var _uploadMedia = null; |
774 var _uploadOptions = null; | 777 var _uploadOptions = null; |
775 var _downloadOptions = common.DownloadOptions.Metadata; | 778 var _downloadOptions = commons.DownloadOptions.Metadata; |
776 var _body = null; | 779 var _body = null; |
777 | 780 |
778 if (request != null) { | 781 if (request != null) { |
779 _body = convert.JSON.encode((request).toJson()); | 782 _body = convert.JSON.encode((request).toJson()); |
780 } | 783 } |
781 if (bucket == null) { | 784 if (bucket == null) { |
782 throw new core.ArgumentError("Parameter bucket is required."); | 785 throw new core.ArgumentError("Parameter bucket is required."); |
783 } | 786 } |
784 if (ifMetagenerationMatch != null) { | 787 if (ifMetagenerationMatch != null) { |
785 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 788 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
786 } | 789 } |
787 if (ifMetagenerationNotMatch != null) { | 790 if (ifMetagenerationNotMatch != null) { |
788 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 791 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
789 } | 792 } |
790 if (predefinedAcl != null) { | 793 if (predefinedAcl != null) { |
791 _queryParams["predefinedAcl"] = [predefinedAcl]; | 794 _queryParams["predefinedAcl"] = [predefinedAcl]; |
792 } | 795 } |
793 if (predefinedDefaultObjectAcl != null) { | 796 if (predefinedDefaultObjectAcl != null) { |
794 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; | 797 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; |
795 } | 798 } |
796 if (projection != null) { | 799 if (projection != null) { |
797 _queryParams["projection"] = [projection]; | 800 _queryParams["projection"] = [projection]; |
798 } | 801 } |
799 | 802 |
800 | 803 |
801 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); | 804 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket'); |
802 | 805 |
803 var _response = _requester.request(_url, | 806 var _response = _requester.request(_url, |
804 "PUT", | 807 "PUT", |
805 body: _body, | 808 body: _body, |
806 queryParams: _queryParams, | 809 queryParams: _queryParams, |
807 uploadOptions: _uploadOptions, | 810 uploadOptions: _uploadOptions, |
808 uploadMedia: _uploadMedia, | 811 uploadMedia: _uploadMedia, |
809 downloadOptions: _downloadOptions); | 812 downloadOptions: _downloadOptions); |
810 return _response.then((data) => new Bucket.fromJson(data)); | 813 return _response.then((data) => new Bucket.fromJson(data)); |
811 } | 814 } |
812 | 815 |
813 } | 816 } |
814 | 817 |
815 | 818 |
816 /** Not documented yet. */ | |
817 class ChannelsResourceApi { | 819 class ChannelsResourceApi { |
818 final common_internal.ApiRequester _requester; | 820 final commons.ApiRequester _requester; |
819 | 821 |
820 ChannelsResourceApi(common_internal.ApiRequester client) : | 822 ChannelsResourceApi(commons.ApiRequester client) : |
821 _requester = client; | 823 _requester = client; |
822 | 824 |
823 /** | 825 /** |
824 * Stop watching resources through this channel | 826 * Stop watching resources through this channel |
825 * | 827 * |
826 * [request] - The metadata request object. | 828 * [request] - The metadata request object. |
827 * | 829 * |
828 * Request parameters: | 830 * Request parameters: |
829 * | 831 * |
830 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 832 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
831 * error. | 833 * error. |
832 * | 834 * |
833 * If the used [http.Client] completes with an error when making a REST call, | 835 * If the used [http.Client] completes with an error when making a REST call, |
834 * this method will complete with the same error. | 836 * this method will complete with the same error. |
835 */ | 837 */ |
836 async.Future stop(Channel request) { | 838 async.Future stop(Channel request) { |
837 var _url = null; | 839 var _url = null; |
838 var _queryParams = new core.Map(); | 840 var _queryParams = new core.Map(); |
839 var _uploadMedia = null; | 841 var _uploadMedia = null; |
840 var _uploadOptions = null; | 842 var _uploadOptions = null; |
841 var _downloadOptions = common.DownloadOptions.Metadata; | 843 var _downloadOptions = commons.DownloadOptions.Metadata; |
842 var _body = null; | 844 var _body = null; |
843 | 845 |
844 if (request != null) { | 846 if (request != null) { |
845 _body = convert.JSON.encode((request).toJson()); | 847 _body = convert.JSON.encode((request).toJson()); |
846 } | 848 } |
847 | 849 |
848 _downloadOptions = null; | 850 _downloadOptions = null; |
849 | 851 |
850 _url = 'channels/stop'; | 852 _url = 'channels/stop'; |
851 | 853 |
852 var _response = _requester.request(_url, | 854 var _response = _requester.request(_url, |
853 "POST", | 855 "POST", |
854 body: _body, | 856 body: _body, |
855 queryParams: _queryParams, | 857 queryParams: _queryParams, |
856 uploadOptions: _uploadOptions, | 858 uploadOptions: _uploadOptions, |
857 uploadMedia: _uploadMedia, | 859 uploadMedia: _uploadMedia, |
858 downloadOptions: _downloadOptions); | 860 downloadOptions: _downloadOptions); |
859 return _response.then((data) => null); | 861 return _response.then((data) => null); |
860 } | 862 } |
861 | 863 |
862 } | 864 } |
863 | 865 |
864 | 866 |
865 /** Not documented yet. */ | |
866 class DefaultObjectAccessControlsResourceApi { | 867 class DefaultObjectAccessControlsResourceApi { |
867 final common_internal.ApiRequester _requester; | 868 final commons.ApiRequester _requester; |
868 | 869 |
869 DefaultObjectAccessControlsResourceApi(common_internal.ApiRequester client) : | 870 DefaultObjectAccessControlsResourceApi(commons.ApiRequester client) : |
870 _requester = client; | 871 _requester = client; |
871 | 872 |
872 /** | 873 /** |
873 * Permanently deletes the default object ACL entry for the specified entity | 874 * Permanently deletes the default object ACL entry for the specified entity |
874 * on the specified bucket. | 875 * on the specified bucket. |
875 * | 876 * |
876 * Request parameters: | 877 * Request parameters: |
877 * | 878 * |
878 * [bucket] - Name of a bucket. | 879 * [bucket] - Name of a bucket. |
879 * | 880 * |
880 * [entity] - The entity holding the permission. Can be user-userId, | 881 * [entity] - The entity holding the permission. Can be user-userId, |
881 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 882 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
882 * allAuthenticatedUsers. | 883 * allAuthenticatedUsers. |
883 * | 884 * |
884 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 885 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
885 * error. | 886 * error. |
886 * | 887 * |
887 * If the used [http.Client] completes with an error when making a REST call, | 888 * If the used [http.Client] completes with an error when making a REST call, |
888 * this method will complete with the same error. | 889 * this method will complete with the same error. |
889 */ | 890 */ |
890 async.Future delete(core.String bucket, core.String entity) { | 891 async.Future delete(core.String bucket, core.String entity) { |
891 var _url = null; | 892 var _url = null; |
892 var _queryParams = new core.Map(); | 893 var _queryParams = new core.Map(); |
893 var _uploadMedia = null; | 894 var _uploadMedia = null; |
894 var _uploadOptions = null; | 895 var _uploadOptions = null; |
895 var _downloadOptions = common.DownloadOptions.Metadata; | 896 var _downloadOptions = commons.DownloadOptions.Metadata; |
896 var _body = null; | 897 var _body = null; |
897 | 898 |
898 if (bucket == null) { | 899 if (bucket == null) { |
899 throw new core.ArgumentError("Parameter bucket is required."); | 900 throw new core.ArgumentError("Parameter bucket is required."); |
900 } | 901 } |
901 if (entity == null) { | 902 if (entity == null) { |
902 throw new core.ArgumentError("Parameter entity is required."); | 903 throw new core.ArgumentError("Parameter entity is required."); |
903 } | 904 } |
904 | 905 |
905 _downloadOptions = null; | 906 _downloadOptions = null; |
906 | 907 |
907 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/defaultOb
jectAcl/' + common_internal.Escaper.ecapeVariable('$entity'); | 908 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/
' + commons.Escaper.ecapeVariable('$entity'); |
908 | 909 |
909 var _response = _requester.request(_url, | 910 var _response = _requester.request(_url, |
910 "DELETE", | 911 "DELETE", |
911 body: _body, | 912 body: _body, |
912 queryParams: _queryParams, | 913 queryParams: _queryParams, |
913 uploadOptions: _uploadOptions, | 914 uploadOptions: _uploadOptions, |
914 uploadMedia: _uploadMedia, | 915 uploadMedia: _uploadMedia, |
915 downloadOptions: _downloadOptions); | 916 downloadOptions: _downloadOptions); |
916 return _response.then((data) => null); | 917 return _response.then((data) => null); |
917 } | 918 } |
918 | 919 |
919 /** | 920 /** |
920 * Returns the default object ACL entry for the specified entity on the | 921 * Returns the default object ACL entry for the specified entity on the |
921 * specified bucket. | 922 * specified bucket. |
922 * | 923 * |
923 * Request parameters: | 924 * Request parameters: |
924 * | 925 * |
925 * [bucket] - Name of a bucket. | 926 * [bucket] - Name of a bucket. |
926 * | 927 * |
927 * [entity] - The entity holding the permission. Can be user-userId, | 928 * [entity] - The entity holding the permission. Can be user-userId, |
928 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 929 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
929 * allAuthenticatedUsers. | 930 * allAuthenticatedUsers. |
930 * | 931 * |
931 * Completes with a [ObjectAccessControl]. | 932 * Completes with a [ObjectAccessControl]. |
932 * | 933 * |
933 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 934 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
934 * error. | 935 * error. |
935 * | 936 * |
936 * If the used [http.Client] completes with an error when making a REST call, | 937 * If the used [http.Client] completes with an error when making a REST call, |
937 * this method will complete with the same error. | 938 * this method will complete with the same error. |
938 */ | 939 */ |
939 async.Future<ObjectAccessControl> get(core.String bucket, core.String entity)
{ | 940 async.Future<ObjectAccessControl> get(core.String bucket, core.String entity)
{ |
940 var _url = null; | 941 var _url = null; |
941 var _queryParams = new core.Map(); | 942 var _queryParams = new core.Map(); |
942 var _uploadMedia = null; | 943 var _uploadMedia = null; |
943 var _uploadOptions = null; | 944 var _uploadOptions = null; |
944 var _downloadOptions = common.DownloadOptions.Metadata; | 945 var _downloadOptions = commons.DownloadOptions.Metadata; |
945 var _body = null; | 946 var _body = null; |
946 | 947 |
947 if (bucket == null) { | 948 if (bucket == null) { |
948 throw new core.ArgumentError("Parameter bucket is required."); | 949 throw new core.ArgumentError("Parameter bucket is required."); |
949 } | 950 } |
950 if (entity == null) { | 951 if (entity == null) { |
951 throw new core.ArgumentError("Parameter entity is required."); | 952 throw new core.ArgumentError("Parameter entity is required."); |
952 } | 953 } |
953 | 954 |
954 | 955 |
955 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/defaultOb
jectAcl/' + common_internal.Escaper.ecapeVariable('$entity'); | 956 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/
' + commons.Escaper.ecapeVariable('$entity'); |
956 | 957 |
957 var _response = _requester.request(_url, | 958 var _response = _requester.request(_url, |
958 "GET", | 959 "GET", |
959 body: _body, | 960 body: _body, |
960 queryParams: _queryParams, | 961 queryParams: _queryParams, |
961 uploadOptions: _uploadOptions, | 962 uploadOptions: _uploadOptions, |
962 uploadMedia: _uploadMedia, | 963 uploadMedia: _uploadMedia, |
963 downloadOptions: _downloadOptions); | 964 downloadOptions: _downloadOptions); |
964 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 965 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
965 } | 966 } |
966 | 967 |
967 /** | 968 /** |
968 * Creates a new default object ACL entry on the specified bucket. | 969 * Creates a new default object ACL entry on the specified bucket. |
969 * | 970 * |
970 * [request] - The metadata request object. | 971 * [request] - The metadata request object. |
971 * | 972 * |
972 * Request parameters: | 973 * Request parameters: |
973 * | 974 * |
974 * [bucket] - Name of a bucket. | 975 * [bucket] - Name of a bucket. |
975 * | 976 * |
976 * Completes with a [ObjectAccessControl]. | 977 * Completes with a [ObjectAccessControl]. |
977 * | 978 * |
978 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 979 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
979 * error. | 980 * error. |
980 * | 981 * |
981 * If the used [http.Client] completes with an error when making a REST call, | 982 * If the used [http.Client] completes with an error when making a REST call, |
982 * this method will complete with the same error. | 983 * this method will complete with the same error. |
983 */ | 984 */ |
984 async.Future<ObjectAccessControl> insert(ObjectAccessControl request, core.Str
ing bucket) { | 985 async.Future<ObjectAccessControl> insert(ObjectAccessControl request, core.Str
ing bucket) { |
985 var _url = null; | 986 var _url = null; |
986 var _queryParams = new core.Map(); | 987 var _queryParams = new core.Map(); |
987 var _uploadMedia = null; | 988 var _uploadMedia = null; |
988 var _uploadOptions = null; | 989 var _uploadOptions = null; |
989 var _downloadOptions = common.DownloadOptions.Metadata; | 990 var _downloadOptions = commons.DownloadOptions.Metadata; |
990 var _body = null; | 991 var _body = null; |
991 | 992 |
992 if (request != null) { | 993 if (request != null) { |
993 _body = convert.JSON.encode((request).toJson()); | 994 _body = convert.JSON.encode((request).toJson()); |
994 } | 995 } |
995 if (bucket == null) { | 996 if (bucket == null) { |
996 throw new core.ArgumentError("Parameter bucket is required."); | 997 throw new core.ArgumentError("Parameter bucket is required."); |
997 } | 998 } |
998 | 999 |
999 | 1000 |
1000 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/defaultOb
jectAcl'; | 1001 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl'
; |
1001 | 1002 |
1002 var _response = _requester.request(_url, | 1003 var _response = _requester.request(_url, |
1003 "POST", | 1004 "POST", |
1004 body: _body, | 1005 body: _body, |
1005 queryParams: _queryParams, | 1006 queryParams: _queryParams, |
1006 uploadOptions: _uploadOptions, | 1007 uploadOptions: _uploadOptions, |
1007 uploadMedia: _uploadMedia, | 1008 uploadMedia: _uploadMedia, |
1008 downloadOptions: _downloadOptions); | 1009 downloadOptions: _downloadOptions); |
1009 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 1010 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
1010 } | 1011 } |
1011 | 1012 |
1012 /** | 1013 /** |
1013 * Retrieves default object ACL entries on the specified bucket. | 1014 * Retrieves default object ACL entries on the specified bucket. |
1014 * | 1015 * |
1015 * Request parameters: | 1016 * Request parameters: |
1016 * | 1017 * |
1017 * [bucket] - Name of a bucket. | 1018 * [bucket] - Name of a bucket. |
1018 * | 1019 * |
1019 * [ifMetagenerationMatch] - If present, only return default ACL listing if | 1020 * [ifMetagenerationMatch] - If present, only return default ACL listing if |
1020 * the bucket's current metageneration matches this value. | 1021 * the bucket's current metageneration matches this value. |
1021 * | 1022 * |
1022 * [ifMetagenerationNotMatch] - If present, only return default ACL listing if | 1023 * [ifMetagenerationNotMatch] - If present, only return default ACL listing if |
1023 * the bucket's current metageneration does not match the given value. | 1024 * the bucket's current metageneration does not match the given value. |
1024 * | 1025 * |
1025 * Completes with a [ObjectAccessControls]. | 1026 * Completes with a [ObjectAccessControls]. |
1026 * | 1027 * |
1027 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1028 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1028 * error. | 1029 * error. |
1029 * | 1030 * |
1030 * If the used [http.Client] completes with an error when making a REST call, | 1031 * If the used [http.Client] completes with an error when making a REST call, |
1031 * this method will complete with the same error. | 1032 * this method will complete with the same error. |
1032 */ | 1033 */ |
1033 async.Future<ObjectAccessControls> list(core.String bucket, {core.String ifMet
agenerationMatch, core.String ifMetagenerationNotMatch}) { | 1034 async.Future<ObjectAccessControls> list(core.String bucket, {core.String ifMet
agenerationMatch, core.String ifMetagenerationNotMatch}) { |
1034 var _url = null; | 1035 var _url = null; |
1035 var _queryParams = new core.Map(); | 1036 var _queryParams = new core.Map(); |
1036 var _uploadMedia = null; | 1037 var _uploadMedia = null; |
1037 var _uploadOptions = null; | 1038 var _uploadOptions = null; |
1038 var _downloadOptions = common.DownloadOptions.Metadata; | 1039 var _downloadOptions = commons.DownloadOptions.Metadata; |
1039 var _body = null; | 1040 var _body = null; |
1040 | 1041 |
1041 if (bucket == null) { | 1042 if (bucket == null) { |
1042 throw new core.ArgumentError("Parameter bucket is required."); | 1043 throw new core.ArgumentError("Parameter bucket is required."); |
1043 } | 1044 } |
1044 if (ifMetagenerationMatch != null) { | 1045 if (ifMetagenerationMatch != null) { |
1045 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 1046 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
1046 } | 1047 } |
1047 if (ifMetagenerationNotMatch != null) { | 1048 if (ifMetagenerationNotMatch != null) { |
1048 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 1049 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
1049 } | 1050 } |
1050 | 1051 |
1051 | 1052 |
1052 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/defaultOb
jectAcl'; | 1053 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl'
; |
1053 | 1054 |
1054 var _response = _requester.request(_url, | 1055 var _response = _requester.request(_url, |
1055 "GET", | 1056 "GET", |
1056 body: _body, | 1057 body: _body, |
1057 queryParams: _queryParams, | 1058 queryParams: _queryParams, |
1058 uploadOptions: _uploadOptions, | 1059 uploadOptions: _uploadOptions, |
1059 uploadMedia: _uploadMedia, | 1060 uploadMedia: _uploadMedia, |
1060 downloadOptions: _downloadOptions); | 1061 downloadOptions: _downloadOptions); |
1061 return _response.then((data) => new ObjectAccessControls.fromJson(data)); | 1062 return _response.then((data) => new ObjectAccessControls.fromJson(data)); |
1062 } | 1063 } |
1063 | 1064 |
1064 /** | 1065 /** |
1065 * Updates a default object ACL entry on the specified bucket. This method | 1066 * Updates a default object ACL entry on the specified bucket. This method |
1066 * supports patch semantics. | 1067 * supports patch semantics. |
1067 * | 1068 * |
1068 * [request] - The metadata request object. | 1069 * [request] - The metadata request object. |
1069 * | 1070 * |
1070 * Request parameters: | 1071 * Request parameters: |
1071 * | 1072 * |
1072 * [bucket] - Name of a bucket. | 1073 * [bucket] - Name of a bucket. |
1073 * | 1074 * |
1074 * [entity] - The entity holding the permission. Can be user-userId, | 1075 * [entity] - The entity holding the permission. Can be user-userId, |
1075 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 1076 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
1076 * allAuthenticatedUsers. | 1077 * allAuthenticatedUsers. |
1077 * | 1078 * |
1078 * Completes with a [ObjectAccessControl]. | 1079 * Completes with a [ObjectAccessControl]. |
1079 * | 1080 * |
1080 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1081 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1081 * error. | 1082 * error. |
1082 * | 1083 * |
1083 * If the used [http.Client] completes with an error when making a REST call, | 1084 * If the used [http.Client] completes with an error when making a REST call, |
1084 * this method will complete with the same error. | 1085 * this method will complete with the same error. |
1085 */ | 1086 */ |
1086 async.Future<ObjectAccessControl> patch(ObjectAccessControl request, core.Stri
ng bucket, core.String entity) { | 1087 async.Future<ObjectAccessControl> patch(ObjectAccessControl request, core.Stri
ng bucket, core.String entity) { |
1087 var _url = null; | 1088 var _url = null; |
1088 var _queryParams = new core.Map(); | 1089 var _queryParams = new core.Map(); |
1089 var _uploadMedia = null; | 1090 var _uploadMedia = null; |
1090 var _uploadOptions = null; | 1091 var _uploadOptions = null; |
1091 var _downloadOptions = common.DownloadOptions.Metadata; | 1092 var _downloadOptions = commons.DownloadOptions.Metadata; |
1092 var _body = null; | 1093 var _body = null; |
1093 | 1094 |
1094 if (request != null) { | 1095 if (request != null) { |
1095 _body = convert.JSON.encode((request).toJson()); | 1096 _body = convert.JSON.encode((request).toJson()); |
1096 } | 1097 } |
1097 if (bucket == null) { | 1098 if (bucket == null) { |
1098 throw new core.ArgumentError("Parameter bucket is required."); | 1099 throw new core.ArgumentError("Parameter bucket is required."); |
1099 } | 1100 } |
1100 if (entity == null) { | 1101 if (entity == null) { |
1101 throw new core.ArgumentError("Parameter entity is required."); | 1102 throw new core.ArgumentError("Parameter entity is required."); |
1102 } | 1103 } |
1103 | 1104 |
1104 | 1105 |
1105 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/defaultOb
jectAcl/' + common_internal.Escaper.ecapeVariable('$entity'); | 1106 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/
' + commons.Escaper.ecapeVariable('$entity'); |
1106 | 1107 |
1107 var _response = _requester.request(_url, | 1108 var _response = _requester.request(_url, |
1108 "PATCH", | 1109 "PATCH", |
1109 body: _body, | 1110 body: _body, |
1110 queryParams: _queryParams, | 1111 queryParams: _queryParams, |
1111 uploadOptions: _uploadOptions, | 1112 uploadOptions: _uploadOptions, |
1112 uploadMedia: _uploadMedia, | 1113 uploadMedia: _uploadMedia, |
1113 downloadOptions: _downloadOptions); | 1114 downloadOptions: _downloadOptions); |
1114 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 1115 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
1115 } | 1116 } |
1116 | 1117 |
1117 /** | 1118 /** |
1118 * Updates a default object ACL entry on the specified bucket. | 1119 * Updates a default object ACL entry on the specified bucket. |
1119 * | 1120 * |
1120 * [request] - The metadata request object. | 1121 * [request] - The metadata request object. |
1121 * | 1122 * |
1122 * Request parameters: | 1123 * Request parameters: |
1123 * | 1124 * |
1124 * [bucket] - Name of a bucket. | 1125 * [bucket] - Name of a bucket. |
1125 * | 1126 * |
1126 * [entity] - The entity holding the permission. Can be user-userId, | 1127 * [entity] - The entity holding the permission. Can be user-userId, |
1127 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 1128 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
1128 * allAuthenticatedUsers. | 1129 * allAuthenticatedUsers. |
1129 * | 1130 * |
1130 * Completes with a [ObjectAccessControl]. | 1131 * Completes with a [ObjectAccessControl]. |
1131 * | 1132 * |
1132 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1133 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1133 * error. | 1134 * error. |
1134 * | 1135 * |
1135 * If the used [http.Client] completes with an error when making a REST call, | 1136 * If the used [http.Client] completes with an error when making a REST call, |
1136 * this method will complete with the same error. | 1137 * this method will complete with the same error. |
1137 */ | 1138 */ |
1138 async.Future<ObjectAccessControl> update(ObjectAccessControl request, core.Str
ing bucket, core.String entity) { | 1139 async.Future<ObjectAccessControl> update(ObjectAccessControl request, core.Str
ing bucket, core.String entity) { |
1139 var _url = null; | 1140 var _url = null; |
1140 var _queryParams = new core.Map(); | 1141 var _queryParams = new core.Map(); |
1141 var _uploadMedia = null; | 1142 var _uploadMedia = null; |
1142 var _uploadOptions = null; | 1143 var _uploadOptions = null; |
1143 var _downloadOptions = common.DownloadOptions.Metadata; | 1144 var _downloadOptions = commons.DownloadOptions.Metadata; |
1144 var _body = null; | 1145 var _body = null; |
1145 | 1146 |
1146 if (request != null) { | 1147 if (request != null) { |
1147 _body = convert.JSON.encode((request).toJson()); | 1148 _body = convert.JSON.encode((request).toJson()); |
1148 } | 1149 } |
1149 if (bucket == null) { | 1150 if (bucket == null) { |
1150 throw new core.ArgumentError("Parameter bucket is required."); | 1151 throw new core.ArgumentError("Parameter bucket is required."); |
1151 } | 1152 } |
1152 if (entity == null) { | 1153 if (entity == null) { |
1153 throw new core.ArgumentError("Parameter entity is required."); | 1154 throw new core.ArgumentError("Parameter entity is required."); |
1154 } | 1155 } |
1155 | 1156 |
1156 | 1157 |
1157 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/defaultOb
jectAcl/' + common_internal.Escaper.ecapeVariable('$entity'); | 1158 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/defaultObjectAcl/
' + commons.Escaper.ecapeVariable('$entity'); |
1158 | 1159 |
1159 var _response = _requester.request(_url, | 1160 var _response = _requester.request(_url, |
1160 "PUT", | 1161 "PUT", |
1161 body: _body, | 1162 body: _body, |
1162 queryParams: _queryParams, | 1163 queryParams: _queryParams, |
1163 uploadOptions: _uploadOptions, | 1164 uploadOptions: _uploadOptions, |
1164 uploadMedia: _uploadMedia, | 1165 uploadMedia: _uploadMedia, |
1165 downloadOptions: _downloadOptions); | 1166 downloadOptions: _downloadOptions); |
1166 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 1167 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
1167 } | 1168 } |
1168 | 1169 |
1169 } | 1170 } |
1170 | 1171 |
1171 | 1172 |
1172 /** Not documented yet. */ | |
1173 class ObjectAccessControlsResourceApi { | 1173 class ObjectAccessControlsResourceApi { |
1174 final common_internal.ApiRequester _requester; | 1174 final commons.ApiRequester _requester; |
1175 | 1175 |
1176 ObjectAccessControlsResourceApi(common_internal.ApiRequester client) : | 1176 ObjectAccessControlsResourceApi(commons.ApiRequester client) : |
1177 _requester = client; | 1177 _requester = client; |
1178 | 1178 |
1179 /** | 1179 /** |
1180 * Permanently deletes the ACL entry for the specified entity on the specified | 1180 * Permanently deletes the ACL entry for the specified entity on the specified |
1181 * object. | 1181 * object. |
1182 * | 1182 * |
1183 * Request parameters: | 1183 * Request parameters: |
1184 * | 1184 * |
1185 * [bucket] - Name of a bucket. | 1185 * [bucket] - Name of a bucket. |
1186 * | 1186 * |
1187 * [object] - Name of the object. | 1187 * [object] - Name of the object. |
1188 * | 1188 * |
1189 * [entity] - The entity holding the permission. Can be user-userId, | 1189 * [entity] - The entity holding the permission. Can be user-userId, |
1190 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 1190 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
1191 * allAuthenticatedUsers. | 1191 * allAuthenticatedUsers. |
1192 * | 1192 * |
1193 * [generation] - If present, selects a specific revision of this object (as | 1193 * [generation] - If present, selects a specific revision of this object (as |
1194 * opposed to the latest version, the default). | 1194 * opposed to the latest version, the default). |
1195 * | 1195 * |
1196 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1196 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1197 * error. | 1197 * error. |
1198 * | 1198 * |
1199 * If the used [http.Client] completes with an error when making a REST call, | 1199 * If the used [http.Client] completes with an error when making a REST call, |
1200 * this method will complete with the same error. | 1200 * this method will complete with the same error. |
1201 */ | 1201 */ |
1202 async.Future delete(core.String bucket, core.String object, core.String entity
, {core.String generation}) { | 1202 async.Future delete(core.String bucket, core.String object, core.String entity
, {core.String generation}) { |
1203 var _url = null; | 1203 var _url = null; |
1204 var _queryParams = new core.Map(); | 1204 var _queryParams = new core.Map(); |
1205 var _uploadMedia = null; | 1205 var _uploadMedia = null; |
1206 var _uploadOptions = null; | 1206 var _uploadOptions = null; |
1207 var _downloadOptions = common.DownloadOptions.Metadata; | 1207 var _downloadOptions = commons.DownloadOptions.Metadata; |
1208 var _body = null; | 1208 var _body = null; |
1209 | 1209 |
1210 if (bucket == null) { | 1210 if (bucket == null) { |
1211 throw new core.ArgumentError("Parameter bucket is required."); | 1211 throw new core.ArgumentError("Parameter bucket is required."); |
1212 } | 1212 } |
1213 if (object == null) { | 1213 if (object == null) { |
1214 throw new core.ArgumentError("Parameter object is required."); | 1214 throw new core.ArgumentError("Parameter object is required."); |
1215 } | 1215 } |
1216 if (entity == null) { | 1216 if (entity == null) { |
1217 throw new core.ArgumentError("Parameter entity is required."); | 1217 throw new core.ArgumentError("Parameter entity is required."); |
1218 } | 1218 } |
1219 if (generation != null) { | 1219 if (generation != null) { |
1220 _queryParams["generation"] = [generation]; | 1220 _queryParams["generation"] = [generation]; |
1221 } | 1221 } |
1222 | 1222 |
1223 _downloadOptions = null; | 1223 _downloadOptions = null; |
1224 | 1224 |
1225 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object') + '/acl/' + common_internal.Escape
r.ecapeVariable('$entity'); | 1225 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity
'); |
1226 | 1226 |
1227 var _response = _requester.request(_url, | 1227 var _response = _requester.request(_url, |
1228 "DELETE", | 1228 "DELETE", |
1229 body: _body, | 1229 body: _body, |
1230 queryParams: _queryParams, | 1230 queryParams: _queryParams, |
1231 uploadOptions: _uploadOptions, | 1231 uploadOptions: _uploadOptions, |
1232 uploadMedia: _uploadMedia, | 1232 uploadMedia: _uploadMedia, |
1233 downloadOptions: _downloadOptions); | 1233 downloadOptions: _downloadOptions); |
1234 return _response.then((data) => null); | 1234 return _response.then((data) => null); |
1235 } | 1235 } |
1236 | 1236 |
1237 /** | 1237 /** |
1238 * Returns the ACL entry for the specified entity on the specified object. | 1238 * Returns the ACL entry for the specified entity on the specified object. |
1239 * | 1239 * |
1240 * Request parameters: | 1240 * Request parameters: |
1241 * | 1241 * |
1242 * [bucket] - Name of a bucket. | 1242 * [bucket] - Name of a bucket. |
1243 * | 1243 * |
1244 * [object] - Name of the object. | 1244 * [object] - Name of the object. |
1245 * | 1245 * |
1246 * [entity] - The entity holding the permission. Can be user-userId, | 1246 * [entity] - The entity holding the permission. Can be user-userId, |
1247 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 1247 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
1248 * allAuthenticatedUsers. | 1248 * allAuthenticatedUsers. |
1249 * | 1249 * |
1250 * [generation] - If present, selects a specific revision of this object (as | 1250 * [generation] - If present, selects a specific revision of this object (as |
1251 * opposed to the latest version, the default). | 1251 * opposed to the latest version, the default). |
1252 * | 1252 * |
1253 * Completes with a [ObjectAccessControl]. | 1253 * Completes with a [ObjectAccessControl]. |
1254 * | 1254 * |
1255 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1255 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1256 * error. | 1256 * error. |
1257 * | 1257 * |
1258 * If the used [http.Client] completes with an error when making a REST call, | 1258 * If the used [http.Client] completes with an error when making a REST call, |
1259 * this method will complete with the same error. | 1259 * this method will complete with the same error. |
1260 */ | 1260 */ |
1261 async.Future<ObjectAccessControl> get(core.String bucket, core.String object,
core.String entity, {core.String generation}) { | 1261 async.Future<ObjectAccessControl> get(core.String bucket, core.String object,
core.String entity, {core.String generation}) { |
1262 var _url = null; | 1262 var _url = null; |
1263 var _queryParams = new core.Map(); | 1263 var _queryParams = new core.Map(); |
1264 var _uploadMedia = null; | 1264 var _uploadMedia = null; |
1265 var _uploadOptions = null; | 1265 var _uploadOptions = null; |
1266 var _downloadOptions = common.DownloadOptions.Metadata; | 1266 var _downloadOptions = commons.DownloadOptions.Metadata; |
1267 var _body = null; | 1267 var _body = null; |
1268 | 1268 |
1269 if (bucket == null) { | 1269 if (bucket == null) { |
1270 throw new core.ArgumentError("Parameter bucket is required."); | 1270 throw new core.ArgumentError("Parameter bucket is required."); |
1271 } | 1271 } |
1272 if (object == null) { | 1272 if (object == null) { |
1273 throw new core.ArgumentError("Parameter object is required."); | 1273 throw new core.ArgumentError("Parameter object is required."); |
1274 } | 1274 } |
1275 if (entity == null) { | 1275 if (entity == null) { |
1276 throw new core.ArgumentError("Parameter entity is required."); | 1276 throw new core.ArgumentError("Parameter entity is required."); |
1277 } | 1277 } |
1278 if (generation != null) { | 1278 if (generation != null) { |
1279 _queryParams["generation"] = [generation]; | 1279 _queryParams["generation"] = [generation]; |
1280 } | 1280 } |
1281 | 1281 |
1282 | 1282 |
1283 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object') + '/acl/' + common_internal.Escape
r.ecapeVariable('$entity'); | 1283 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity
'); |
1284 | 1284 |
1285 var _response = _requester.request(_url, | 1285 var _response = _requester.request(_url, |
1286 "GET", | 1286 "GET", |
1287 body: _body, | 1287 body: _body, |
1288 queryParams: _queryParams, | 1288 queryParams: _queryParams, |
1289 uploadOptions: _uploadOptions, | 1289 uploadOptions: _uploadOptions, |
1290 uploadMedia: _uploadMedia, | 1290 uploadMedia: _uploadMedia, |
1291 downloadOptions: _downloadOptions); | 1291 downloadOptions: _downloadOptions); |
1292 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 1292 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
1293 } | 1293 } |
1294 | 1294 |
1295 /** | 1295 /** |
1296 * Creates a new ACL entry on the specified object. | 1296 * Creates a new ACL entry on the specified object. |
1297 * | 1297 * |
1298 * [request] - The metadata request object. | 1298 * [request] - The metadata request object. |
1299 * | 1299 * |
1300 * Request parameters: | 1300 * Request parameters: |
1301 * | 1301 * |
1302 * [bucket] - Name of a bucket. | 1302 * [bucket] - Name of a bucket. |
1303 * | 1303 * |
1304 * [object] - Name of the object. | 1304 * [object] - Name of the object. |
1305 * | 1305 * |
1306 * [generation] - If present, selects a specific revision of this object (as | 1306 * [generation] - If present, selects a specific revision of this object (as |
1307 * opposed to the latest version, the default). | 1307 * opposed to the latest version, the default). |
1308 * | 1308 * |
1309 * Completes with a [ObjectAccessControl]. | 1309 * Completes with a [ObjectAccessControl]. |
1310 * | 1310 * |
1311 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1311 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1312 * error. | 1312 * error. |
1313 * | 1313 * |
1314 * If the used [http.Client] completes with an error when making a REST call, | 1314 * If the used [http.Client] completes with an error when making a REST call, |
1315 * this method will complete with the same error. | 1315 * this method will complete with the same error. |
1316 */ | 1316 */ |
1317 async.Future<ObjectAccessControl> insert(ObjectAccessControl request, core.Str
ing bucket, core.String object, {core.String generation}) { | 1317 async.Future<ObjectAccessControl> insert(ObjectAccessControl request, core.Str
ing bucket, core.String object, {core.String generation}) { |
1318 var _url = null; | 1318 var _url = null; |
1319 var _queryParams = new core.Map(); | 1319 var _queryParams = new core.Map(); |
1320 var _uploadMedia = null; | 1320 var _uploadMedia = null; |
1321 var _uploadOptions = null; | 1321 var _uploadOptions = null; |
1322 var _downloadOptions = common.DownloadOptions.Metadata; | 1322 var _downloadOptions = commons.DownloadOptions.Metadata; |
1323 var _body = null; | 1323 var _body = null; |
1324 | 1324 |
1325 if (request != null) { | 1325 if (request != null) { |
1326 _body = convert.JSON.encode((request).toJson()); | 1326 _body = convert.JSON.encode((request).toJson()); |
1327 } | 1327 } |
1328 if (bucket == null) { | 1328 if (bucket == null) { |
1329 throw new core.ArgumentError("Parameter bucket is required."); | 1329 throw new core.ArgumentError("Parameter bucket is required."); |
1330 } | 1330 } |
1331 if (object == null) { | 1331 if (object == null) { |
1332 throw new core.ArgumentError("Parameter object is required."); | 1332 throw new core.ArgumentError("Parameter object is required."); |
1333 } | 1333 } |
1334 if (generation != null) { | 1334 if (generation != null) { |
1335 _queryParams["generation"] = [generation]; | 1335 _queryParams["generation"] = [generation]; |
1336 } | 1336 } |
1337 | 1337 |
1338 | 1338 |
1339 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object') + '/acl'; | 1339 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/acl'; |
1340 | 1340 |
1341 var _response = _requester.request(_url, | 1341 var _response = _requester.request(_url, |
1342 "POST", | 1342 "POST", |
1343 body: _body, | 1343 body: _body, |
1344 queryParams: _queryParams, | 1344 queryParams: _queryParams, |
1345 uploadOptions: _uploadOptions, | 1345 uploadOptions: _uploadOptions, |
1346 uploadMedia: _uploadMedia, | 1346 uploadMedia: _uploadMedia, |
1347 downloadOptions: _downloadOptions); | 1347 downloadOptions: _downloadOptions); |
1348 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 1348 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
1349 } | 1349 } |
1350 | 1350 |
1351 /** | 1351 /** |
1352 * Retrieves ACL entries on the specified object. | 1352 * Retrieves ACL entries on the specified object. |
1353 * | 1353 * |
1354 * Request parameters: | 1354 * Request parameters: |
1355 * | 1355 * |
1356 * [bucket] - Name of a bucket. | 1356 * [bucket] - Name of a bucket. |
1357 * | 1357 * |
1358 * [object] - Name of the object. | 1358 * [object] - Name of the object. |
1359 * | 1359 * |
1360 * [generation] - If present, selects a specific revision of this object (as | 1360 * [generation] - If present, selects a specific revision of this object (as |
1361 * opposed to the latest version, the default). | 1361 * opposed to the latest version, the default). |
1362 * | 1362 * |
1363 * Completes with a [ObjectAccessControls]. | 1363 * Completes with a [ObjectAccessControls]. |
1364 * | 1364 * |
1365 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1365 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1366 * error. | 1366 * error. |
1367 * | 1367 * |
1368 * If the used [http.Client] completes with an error when making a REST call, | 1368 * If the used [http.Client] completes with an error when making a REST call, |
1369 * this method will complete with the same error. | 1369 * this method will complete with the same error. |
1370 */ | 1370 */ |
1371 async.Future<ObjectAccessControls> list(core.String bucket, core.String object
, {core.String generation}) { | 1371 async.Future<ObjectAccessControls> list(core.String bucket, core.String object
, {core.String generation}) { |
1372 var _url = null; | 1372 var _url = null; |
1373 var _queryParams = new core.Map(); | 1373 var _queryParams = new core.Map(); |
1374 var _uploadMedia = null; | 1374 var _uploadMedia = null; |
1375 var _uploadOptions = null; | 1375 var _uploadOptions = null; |
1376 var _downloadOptions = common.DownloadOptions.Metadata; | 1376 var _downloadOptions = commons.DownloadOptions.Metadata; |
1377 var _body = null; | 1377 var _body = null; |
1378 | 1378 |
1379 if (bucket == null) { | 1379 if (bucket == null) { |
1380 throw new core.ArgumentError("Parameter bucket is required."); | 1380 throw new core.ArgumentError("Parameter bucket is required."); |
1381 } | 1381 } |
1382 if (object == null) { | 1382 if (object == null) { |
1383 throw new core.ArgumentError("Parameter object is required."); | 1383 throw new core.ArgumentError("Parameter object is required."); |
1384 } | 1384 } |
1385 if (generation != null) { | 1385 if (generation != null) { |
1386 _queryParams["generation"] = [generation]; | 1386 _queryParams["generation"] = [generation]; |
1387 } | 1387 } |
1388 | 1388 |
1389 | 1389 |
1390 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object') + '/acl'; | 1390 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/acl'; |
1391 | 1391 |
1392 var _response = _requester.request(_url, | 1392 var _response = _requester.request(_url, |
1393 "GET", | 1393 "GET", |
1394 body: _body, | 1394 body: _body, |
1395 queryParams: _queryParams, | 1395 queryParams: _queryParams, |
1396 uploadOptions: _uploadOptions, | 1396 uploadOptions: _uploadOptions, |
1397 uploadMedia: _uploadMedia, | 1397 uploadMedia: _uploadMedia, |
1398 downloadOptions: _downloadOptions); | 1398 downloadOptions: _downloadOptions); |
1399 return _response.then((data) => new ObjectAccessControls.fromJson(data)); | 1399 return _response.then((data) => new ObjectAccessControls.fromJson(data)); |
1400 } | 1400 } |
(...skipping 12 matching lines...) Loading... |
1413 * | 1413 * |
1414 * [entity] - The entity holding the permission. Can be user-userId, | 1414 * [entity] - The entity holding the permission. Can be user-userId, |
1415 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 1415 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
1416 * allAuthenticatedUsers. | 1416 * allAuthenticatedUsers. |
1417 * | 1417 * |
1418 * [generation] - If present, selects a specific revision of this object (as | 1418 * [generation] - If present, selects a specific revision of this object (as |
1419 * opposed to the latest version, the default). | 1419 * opposed to the latest version, the default). |
1420 * | 1420 * |
1421 * Completes with a [ObjectAccessControl]. | 1421 * Completes with a [ObjectAccessControl]. |
1422 * | 1422 * |
1423 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1423 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1424 * error. | 1424 * error. |
1425 * | 1425 * |
1426 * If the used [http.Client] completes with an error when making a REST call, | 1426 * If the used [http.Client] completes with an error when making a REST call, |
1427 * this method will complete with the same error. | 1427 * this method will complete with the same error. |
1428 */ | 1428 */ |
1429 async.Future<ObjectAccessControl> patch(ObjectAccessControl request, core.Stri
ng bucket, core.String object, core.String entity, {core.String generation}) { | 1429 async.Future<ObjectAccessControl> patch(ObjectAccessControl request, core.Stri
ng bucket, core.String object, core.String entity, {core.String generation}) { |
1430 var _url = null; | 1430 var _url = null; |
1431 var _queryParams = new core.Map(); | 1431 var _queryParams = new core.Map(); |
1432 var _uploadMedia = null; | 1432 var _uploadMedia = null; |
1433 var _uploadOptions = null; | 1433 var _uploadOptions = null; |
1434 var _downloadOptions = common.DownloadOptions.Metadata; | 1434 var _downloadOptions = commons.DownloadOptions.Metadata; |
1435 var _body = null; | 1435 var _body = null; |
1436 | 1436 |
1437 if (request != null) { | 1437 if (request != null) { |
1438 _body = convert.JSON.encode((request).toJson()); | 1438 _body = convert.JSON.encode((request).toJson()); |
1439 } | 1439 } |
1440 if (bucket == null) { | 1440 if (bucket == null) { |
1441 throw new core.ArgumentError("Parameter bucket is required."); | 1441 throw new core.ArgumentError("Parameter bucket is required."); |
1442 } | 1442 } |
1443 if (object == null) { | 1443 if (object == null) { |
1444 throw new core.ArgumentError("Parameter object is required."); | 1444 throw new core.ArgumentError("Parameter object is required."); |
1445 } | 1445 } |
1446 if (entity == null) { | 1446 if (entity == null) { |
1447 throw new core.ArgumentError("Parameter entity is required."); | 1447 throw new core.ArgumentError("Parameter entity is required."); |
1448 } | 1448 } |
1449 if (generation != null) { | 1449 if (generation != null) { |
1450 _queryParams["generation"] = [generation]; | 1450 _queryParams["generation"] = [generation]; |
1451 } | 1451 } |
1452 | 1452 |
1453 | 1453 |
1454 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object') + '/acl/' + common_internal.Escape
r.ecapeVariable('$entity'); | 1454 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity
'); |
1455 | 1455 |
1456 var _response = _requester.request(_url, | 1456 var _response = _requester.request(_url, |
1457 "PATCH", | 1457 "PATCH", |
1458 body: _body, | 1458 body: _body, |
1459 queryParams: _queryParams, | 1459 queryParams: _queryParams, |
1460 uploadOptions: _uploadOptions, | 1460 uploadOptions: _uploadOptions, |
1461 uploadMedia: _uploadMedia, | 1461 uploadMedia: _uploadMedia, |
1462 downloadOptions: _downloadOptions); | 1462 downloadOptions: _downloadOptions); |
1463 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 1463 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
1464 } | 1464 } |
(...skipping 11 matching lines...) Loading... |
1476 * | 1476 * |
1477 * [entity] - The entity holding the permission. Can be user-userId, | 1477 * [entity] - The entity holding the permission. Can be user-userId, |
1478 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or | 1478 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
1479 * allAuthenticatedUsers. | 1479 * allAuthenticatedUsers. |
1480 * | 1480 * |
1481 * [generation] - If present, selects a specific revision of this object (as | 1481 * [generation] - If present, selects a specific revision of this object (as |
1482 * opposed to the latest version, the default). | 1482 * opposed to the latest version, the default). |
1483 * | 1483 * |
1484 * Completes with a [ObjectAccessControl]. | 1484 * Completes with a [ObjectAccessControl]. |
1485 * | 1485 * |
1486 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1486 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1487 * error. | 1487 * error. |
1488 * | 1488 * |
1489 * If the used [http.Client] completes with an error when making a REST call, | 1489 * If the used [http.Client] completes with an error when making a REST call, |
1490 * this method will complete with the same error. | 1490 * this method will complete with the same error. |
1491 */ | 1491 */ |
1492 async.Future<ObjectAccessControl> update(ObjectAccessControl request, core.Str
ing bucket, core.String object, core.String entity, {core.String generation}) { | 1492 async.Future<ObjectAccessControl> update(ObjectAccessControl request, core.Str
ing bucket, core.String object, core.String entity, {core.String generation}) { |
1493 var _url = null; | 1493 var _url = null; |
1494 var _queryParams = new core.Map(); | 1494 var _queryParams = new core.Map(); |
1495 var _uploadMedia = null; | 1495 var _uploadMedia = null; |
1496 var _uploadOptions = null; | 1496 var _uploadOptions = null; |
1497 var _downloadOptions = common.DownloadOptions.Metadata; | 1497 var _downloadOptions = commons.DownloadOptions.Metadata; |
1498 var _body = null; | 1498 var _body = null; |
1499 | 1499 |
1500 if (request != null) { | 1500 if (request != null) { |
1501 _body = convert.JSON.encode((request).toJson()); | 1501 _body = convert.JSON.encode((request).toJson()); |
1502 } | 1502 } |
1503 if (bucket == null) { | 1503 if (bucket == null) { |
1504 throw new core.ArgumentError("Parameter bucket is required."); | 1504 throw new core.ArgumentError("Parameter bucket is required."); |
1505 } | 1505 } |
1506 if (object == null) { | 1506 if (object == null) { |
1507 throw new core.ArgumentError("Parameter object is required."); | 1507 throw new core.ArgumentError("Parameter object is required."); |
1508 } | 1508 } |
1509 if (entity == null) { | 1509 if (entity == null) { |
1510 throw new core.ArgumentError("Parameter entity is required."); | 1510 throw new core.ArgumentError("Parameter entity is required."); |
1511 } | 1511 } |
1512 if (generation != null) { | 1512 if (generation != null) { |
1513 _queryParams["generation"] = [generation]; | 1513 _queryParams["generation"] = [generation]; |
1514 } | 1514 } |
1515 | 1515 |
1516 | 1516 |
1517 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object') + '/acl/' + common_internal.Escape
r.ecapeVariable('$entity'); | 1517 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/acl/' + commons.Escaper.ecapeVariable('$entity
'); |
1518 | 1518 |
1519 var _response = _requester.request(_url, | 1519 var _response = _requester.request(_url, |
1520 "PUT", | 1520 "PUT", |
1521 body: _body, | 1521 body: _body, |
1522 queryParams: _queryParams, | 1522 queryParams: _queryParams, |
1523 uploadOptions: _uploadOptions, | 1523 uploadOptions: _uploadOptions, |
1524 uploadMedia: _uploadMedia, | 1524 uploadMedia: _uploadMedia, |
1525 downloadOptions: _downloadOptions); | 1525 downloadOptions: _downloadOptions); |
1526 return _response.then((data) => new ObjectAccessControl.fromJson(data)); | 1526 return _response.then((data) => new ObjectAccessControl.fromJson(data)); |
1527 } | 1527 } |
1528 | 1528 |
1529 } | 1529 } |
1530 | 1530 |
1531 | 1531 |
1532 /** Not documented yet. */ | |
1533 class ObjectsResourceApi { | 1532 class ObjectsResourceApi { |
1534 final common_internal.ApiRequester _requester; | 1533 final commons.ApiRequester _requester; |
1535 | 1534 |
1536 ObjectsResourceApi(common_internal.ApiRequester client) : | 1535 ObjectsResourceApi(commons.ApiRequester client) : |
1537 _requester = client; | 1536 _requester = client; |
1538 | 1537 |
1539 /** | 1538 /** |
1540 * Concatenates a list of existing objects into a new object in the same | 1539 * Concatenates a list of existing objects into a new object in the same |
1541 * bucket. | 1540 * bucket. |
1542 * | 1541 * |
1543 * [request] - The metadata request object. | 1542 * [request] - The metadata request object. |
1544 * | 1543 * |
1545 * Request parameters: | 1544 * Request parameters: |
1546 * | 1545 * |
1547 * [destinationBucket] - Name of the bucket in which to store the new object. | 1546 * [destinationBucket] - Name of the bucket in which to store the new object. |
1548 * | 1547 * |
1549 * [destinationObject] - Name of the new object. | 1548 * [destinationObject] - Name of the new object. |
1550 * | 1549 * |
1551 * [destinationPredefinedAcl] - Apply a predefined set of access controls to | 1550 * [destinationPredefinedAcl] - Apply a predefined set of access controls to |
1552 * the destination object. | 1551 * the destination object. |
1553 * Possible string values are: | 1552 * Possible string values are: |
1554 * - "authenticatedRead" : Object owner gets OWNER access, and | 1553 * - "authenticatedRead" : Object owner gets OWNER access, and |
1555 * allAuthenticatedUsers get READER access. | 1554 * allAuthenticatedUsers get READER access. |
1556 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project | 1555 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project |
1557 * team owners get OWNER access. | 1556 * team owners get OWNER access. |
1558 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team | 1557 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team |
1559 * owners get READER access. | 1558 * owners get READER access. |
1560 * - "private" : Object owner gets OWNER access. | 1559 * - "private" : Object owner gets OWNER access. |
1561 * - "projectPrivate" : Object owner gets OWNER access, and project team | 1560 * - "projectPrivate" : Object owner gets OWNER access, and project team |
1562 * members get access according to their roles. | 1561 * members get access according to their roles. |
1563 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER | 1562 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
1564 * access. | 1563 * access. |
1565 * | 1564 * |
| 1565 * [encryptionAlgorithm] - Specifies the encryption algorithm that was used to |
| 1566 * encrypt the object, if any. Only 'AES256' is supported currently. |
| 1567 * Algorithm, key, and key hash must be supplied together. |
| 1568 * |
| 1569 * [encryptionKey] - Provides a base64-encoded 256-bit key that was used to |
| 1570 * encrypt the object, if any. Algorithm, key, and key hash must be supplied |
| 1571 * together. |
| 1572 * |
| 1573 * [encryptionKeyHash] - Provides the digest of the key for error-checking |
| 1574 * transmission. A digest is in the format of '='. Algorithm, key, and key |
| 1575 * hash must be supplied together. |
| 1576 * |
1566 * [ifGenerationMatch] - Makes the operation conditional on whether the | 1577 * [ifGenerationMatch] - Makes the operation conditional on whether the |
1567 * object's current generation matches the given value. | 1578 * object's current generation matches the given value. |
1568 * | 1579 * |
1569 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 1580 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
1570 * object's current metageneration matches the given value. | 1581 * object's current metageneration matches the given value. |
1571 * | 1582 * |
1572 * [downloadOptions] - Options for downloading. A download can be either a | 1583 * [downloadOptions] - Options for downloading. A download can be either a |
1573 * Metadata (default) or Media download. Partial Media downloads are possible | 1584 * Metadata (default) or Media download. Partial Media downloads are possible |
1574 * as well. | 1585 * as well. |
1575 * | 1586 * |
1576 * Completes with a | 1587 * Completes with a |
1577 * | 1588 * |
1578 * - [Object] for Metadata downloads (see [downloadOptions]). | 1589 * - [Object] for Metadata downloads (see [downloadOptions]). |
1579 * | 1590 * |
1580 * - [common.Media] for Media downloads (see [downloadOptions]). | 1591 * - [commons.Media] for Media downloads (see [downloadOptions]). |
1581 * | 1592 * |
1582 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1593 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1583 * error. | 1594 * error. |
1584 * | 1595 * |
1585 * If the used [http.Client] completes with an error when making a REST call, | 1596 * If the used [http.Client] completes with an error when making a REST call, |
1586 * this method will complete with the same error. | 1597 * this method will complete with the same error. |
1587 */ | 1598 */ |
1588 async.Future compose(ComposeRequest request, core.String destinationBucket, co
re.String destinationObject, {core.String destinationPredefinedAcl, core.String
ifGenerationMatch, core.String ifMetagenerationMatch, common.DownloadOptions dow
nloadOptions: common.DownloadOptions.Metadata}) { | 1599 async.Future compose(ComposeRequest request, core.String destinationBucket, co
re.String destinationObject, {core.String destinationPredefinedAcl, core.String
encryptionAlgorithm, core.String encryptionKey, core.String encryptionKeyHash, c
ore.String ifGenerationMatch, core.String ifMetagenerationMatch, commons.Downloa
dOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
1589 var _url = null; | 1600 var _url = null; |
1590 var _queryParams = new core.Map(); | 1601 var _queryParams = new core.Map(); |
1591 var _uploadMedia = null; | 1602 var _uploadMedia = null; |
1592 var _uploadOptions = null; | 1603 var _uploadOptions = null; |
1593 var _downloadOptions = common.DownloadOptions.Metadata; | 1604 var _downloadOptions = commons.DownloadOptions.Metadata; |
1594 var _body = null; | 1605 var _body = null; |
1595 | 1606 |
1596 if (request != null) { | 1607 if (request != null) { |
1597 _body = convert.JSON.encode((request).toJson()); | 1608 _body = convert.JSON.encode((request).toJson()); |
1598 } | 1609 } |
1599 if (destinationBucket == null) { | 1610 if (destinationBucket == null) { |
1600 throw new core.ArgumentError("Parameter destinationBucket is required."); | 1611 throw new core.ArgumentError("Parameter destinationBucket is required."); |
1601 } | 1612 } |
1602 if (destinationObject == null) { | 1613 if (destinationObject == null) { |
1603 throw new core.ArgumentError("Parameter destinationObject is required."); | 1614 throw new core.ArgumentError("Parameter destinationObject is required."); |
1604 } | 1615 } |
1605 if (destinationPredefinedAcl != null) { | 1616 if (destinationPredefinedAcl != null) { |
1606 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; | 1617 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; |
1607 } | 1618 } |
| 1619 if (encryptionAlgorithm != null) { |
| 1620 _queryParams["encryptionAlgorithm"] = [encryptionAlgorithm]; |
| 1621 } |
| 1622 if (encryptionKey != null) { |
| 1623 _queryParams["encryptionKey"] = [encryptionKey]; |
| 1624 } |
| 1625 if (encryptionKeyHash != null) { |
| 1626 _queryParams["encryptionKeyHash"] = [encryptionKeyHash]; |
| 1627 } |
1608 if (ifGenerationMatch != null) { | 1628 if (ifGenerationMatch != null) { |
1609 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 1629 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
1610 } | 1630 } |
1611 if (ifMetagenerationMatch != null) { | 1631 if (ifMetagenerationMatch != null) { |
1612 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 1632 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
1613 } | 1633 } |
1614 | 1634 |
1615 _downloadOptions = downloadOptions; | 1635 _downloadOptions = downloadOptions; |
1616 | 1636 |
1617 _url = 'b/' + common_internal.Escaper.ecapeVariable('$destinationBucket') +
'/o/' + common_internal.Escaper.ecapeVariable('$destinationObject') + '/compose'
; | 1637 _url = 'b/' + commons.Escaper.ecapeVariable('$destinationBucket') + '/o/' +
commons.Escaper.ecapeVariable('$destinationObject') + '/compose'; |
1618 | 1638 |
1619 var _response = _requester.request(_url, | 1639 var _response = _requester.request(_url, |
1620 "POST", | 1640 "POST", |
1621 body: _body, | 1641 body: _body, |
1622 queryParams: _queryParams, | 1642 queryParams: _queryParams, |
1623 uploadOptions: _uploadOptions, | 1643 uploadOptions: _uploadOptions, |
1624 uploadMedia: _uploadMedia, | 1644 uploadMedia: _uploadMedia, |
1625 downloadOptions: _downloadOptions); | 1645 downloadOptions: _downloadOptions); |
1626 if (_downloadOptions == null || | 1646 if (_downloadOptions == null || |
1627 _downloadOptions == common.DownloadOptions.Metadata) { | 1647 _downloadOptions == commons.DownloadOptions.Metadata) { |
1628 return _response.then((data) => new Object.fromJson(data)); | 1648 return _response.then((data) => new Object.fromJson(data)); |
1629 } else { | 1649 } else { |
1630 return _response; | 1650 return _response; |
1631 } | 1651 } |
1632 } | 1652 } |
1633 | 1653 |
1634 /** | 1654 /** |
1635 * Copies an object to a specified location. Optionally overrides metadata. | 1655 * Copies an object to a specified location. Optionally overrides metadata. |
1636 * | 1656 * |
1637 * [request] - The metadata request object. | 1657 * [request] - The metadata request object. |
(...skipping 19 matching lines...) Loading... |
1657 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project | 1677 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project |
1658 * team owners get OWNER access. | 1678 * team owners get OWNER access. |
1659 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team | 1679 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team |
1660 * owners get READER access. | 1680 * owners get READER access. |
1661 * - "private" : Object owner gets OWNER access. | 1681 * - "private" : Object owner gets OWNER access. |
1662 * - "projectPrivate" : Object owner gets OWNER access, and project team | 1682 * - "projectPrivate" : Object owner gets OWNER access, and project team |
1663 * members get access according to their roles. | 1683 * members get access according to their roles. |
1664 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER | 1684 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
1665 * access. | 1685 * access. |
1666 * | 1686 * |
| 1687 * [encryptionAlgorithm] - Specifies the encryption algorithm that was used to |
| 1688 * encrypt the object, if any. Only 'AES256' is supported currently. |
| 1689 * Algorithm, key, and key hash must be supplied together. |
| 1690 * |
| 1691 * [encryptionKey] - Provides a base64-encoded 256-bit key that was used to |
| 1692 * encrypt the object, if any. Algorithm, key, and key hash must be supplied |
| 1693 * together. |
| 1694 * |
| 1695 * [encryptionKeyHash] - Provides the digest of the key for error-checking |
| 1696 * transmission. A digest is in the format of '='. Algorithm, key, and key |
| 1697 * hash must be supplied together. |
| 1698 * |
1667 * [ifGenerationMatch] - Makes the operation conditional on whether the | 1699 * [ifGenerationMatch] - Makes the operation conditional on whether the |
1668 * destination object's current generation matches the given value. | 1700 * destination object's current generation matches the given value. |
1669 * | 1701 * |
1670 * [ifGenerationNotMatch] - Makes the operation conditional on whether the | 1702 * [ifGenerationNotMatch] - Makes the operation conditional on whether the |
1671 * destination object's current generation does not match the given value. | 1703 * destination object's current generation does not match the given value. |
1672 * | 1704 * |
1673 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 1705 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
1674 * destination object's current metageneration matches the given value. | 1706 * destination object's current metageneration matches the given value. |
1675 * | 1707 * |
1676 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the | 1708 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the |
(...skipping 22 matching lines...) Loading... |
1699 * object (as opposed to the latest version, the default). | 1731 * object (as opposed to the latest version, the default). |
1700 * | 1732 * |
1701 * [downloadOptions] - Options for downloading. A download can be either a | 1733 * [downloadOptions] - Options for downloading. A download can be either a |
1702 * Metadata (default) or Media download. Partial Media downloads are possible | 1734 * Metadata (default) or Media download. Partial Media downloads are possible |
1703 * as well. | 1735 * as well. |
1704 * | 1736 * |
1705 * Completes with a | 1737 * Completes with a |
1706 * | 1738 * |
1707 * - [Object] for Metadata downloads (see [downloadOptions]). | 1739 * - [Object] for Metadata downloads (see [downloadOptions]). |
1708 * | 1740 * |
1709 * - [common.Media] for Media downloads (see [downloadOptions]). | 1741 * - [commons.Media] for Media downloads (see [downloadOptions]). |
1710 * | 1742 * |
1711 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1743 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1712 * error. | 1744 * error. |
1713 * | 1745 * |
1714 * If the used [http.Client] completes with an error when making a REST call, | 1746 * If the used [http.Client] completes with an error when making a REST call, |
1715 * this method will complete with the same error. | 1747 * this method will complete with the same error. |
1716 */ | 1748 */ |
1717 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, common.DownloadOp
tions downloadOptions: common.DownloadOptions.Metadata}) { | 1749 async.Future copy(Object request, core.String sourceBucket, core.String source
Object, core.String destinationBucket, core.String destinationObject, {core.Stri
ng destinationPredefinedAcl, core.String encryptionAlgorithm, core.String encryp
tionKey, core.String encryptionKeyHash, core.String ifGenerationMatch, core.Stri
ng ifGenerationNotMatch, core.String ifMetagenerationMatch, core.String ifMetage
nerationNotMatch, core.String ifSourceGenerationMatch, core.String ifSourceGener
ationNotMatch, core.String ifSourceMetagenerationMatch, core.String ifSourceMeta
generationNotMatch, core.String projection, core.String sourceGeneration, common
s.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
1718 var _url = null; | 1750 var _url = null; |
1719 var _queryParams = new core.Map(); | 1751 var _queryParams = new core.Map(); |
1720 var _uploadMedia = null; | 1752 var _uploadMedia = null; |
1721 var _uploadOptions = null; | 1753 var _uploadOptions = null; |
1722 var _downloadOptions = common.DownloadOptions.Metadata; | 1754 var _downloadOptions = commons.DownloadOptions.Metadata; |
1723 var _body = null; | 1755 var _body = null; |
1724 | 1756 |
1725 if (request != null) { | 1757 if (request != null) { |
1726 _body = convert.JSON.encode((request).toJson()); | 1758 _body = convert.JSON.encode((request).toJson()); |
1727 } | 1759 } |
1728 if (sourceBucket == null) { | 1760 if (sourceBucket == null) { |
1729 throw new core.ArgumentError("Parameter sourceBucket is required."); | 1761 throw new core.ArgumentError("Parameter sourceBucket is required."); |
1730 } | 1762 } |
1731 if (sourceObject == null) { | 1763 if (sourceObject == null) { |
1732 throw new core.ArgumentError("Parameter sourceObject is required."); | 1764 throw new core.ArgumentError("Parameter sourceObject is required."); |
1733 } | 1765 } |
1734 if (destinationBucket == null) { | 1766 if (destinationBucket == null) { |
1735 throw new core.ArgumentError("Parameter destinationBucket is required."); | 1767 throw new core.ArgumentError("Parameter destinationBucket is required."); |
1736 } | 1768 } |
1737 if (destinationObject == null) { | 1769 if (destinationObject == null) { |
1738 throw new core.ArgumentError("Parameter destinationObject is required."); | 1770 throw new core.ArgumentError("Parameter destinationObject is required."); |
1739 } | 1771 } |
1740 if (destinationPredefinedAcl != null) { | 1772 if (destinationPredefinedAcl != null) { |
1741 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; | 1773 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; |
1742 } | 1774 } |
| 1775 if (encryptionAlgorithm != null) { |
| 1776 _queryParams["encryptionAlgorithm"] = [encryptionAlgorithm]; |
| 1777 } |
| 1778 if (encryptionKey != null) { |
| 1779 _queryParams["encryptionKey"] = [encryptionKey]; |
| 1780 } |
| 1781 if (encryptionKeyHash != null) { |
| 1782 _queryParams["encryptionKeyHash"] = [encryptionKeyHash]; |
| 1783 } |
1743 if (ifGenerationMatch != null) { | 1784 if (ifGenerationMatch != null) { |
1744 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 1785 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
1745 } | 1786 } |
1746 if (ifGenerationNotMatch != null) { | 1787 if (ifGenerationNotMatch != null) { |
1747 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 1788 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
1748 } | 1789 } |
1749 if (ifMetagenerationMatch != null) { | 1790 if (ifMetagenerationMatch != null) { |
1750 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 1791 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
1751 } | 1792 } |
1752 if (ifMetagenerationNotMatch != null) { | 1793 if (ifMetagenerationNotMatch != null) { |
(...skipping 13 matching lines...) Loading... |
1766 } | 1807 } |
1767 if (projection != null) { | 1808 if (projection != null) { |
1768 _queryParams["projection"] = [projection]; | 1809 _queryParams["projection"] = [projection]; |
1769 } | 1810 } |
1770 if (sourceGeneration != null) { | 1811 if (sourceGeneration != null) { |
1771 _queryParams["sourceGeneration"] = [sourceGeneration]; | 1812 _queryParams["sourceGeneration"] = [sourceGeneration]; |
1772 } | 1813 } |
1773 | 1814 |
1774 _downloadOptions = downloadOptions; | 1815 _downloadOptions = downloadOptions; |
1775 | 1816 |
1776 _url = 'b/' + common_internal.Escaper.ecapeVariable('$sourceBucket') + '/o/'
+ common_internal.Escaper.ecapeVariable('$sourceObject') + '/copyTo/b/' + commo
n_internal.Escaper.ecapeVariable('$destinationBucket') + '/o/' + common_internal
.Escaper.ecapeVariable('$destinationObject'); | 1817 _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'); |
1777 | 1818 |
1778 var _response = _requester.request(_url, | 1819 var _response = _requester.request(_url, |
1779 "POST", | 1820 "POST", |
1780 body: _body, | 1821 body: _body, |
1781 queryParams: _queryParams, | 1822 queryParams: _queryParams, |
1782 uploadOptions: _uploadOptions, | 1823 uploadOptions: _uploadOptions, |
1783 uploadMedia: _uploadMedia, | 1824 uploadMedia: _uploadMedia, |
1784 downloadOptions: _downloadOptions); | 1825 downloadOptions: _downloadOptions); |
1785 if (_downloadOptions == null || | 1826 if (_downloadOptions == null || |
1786 _downloadOptions == common.DownloadOptions.Metadata) { | 1827 _downloadOptions == commons.DownloadOptions.Metadata) { |
1787 return _response.then((data) => new Object.fromJson(data)); | 1828 return _response.then((data) => new Object.fromJson(data)); |
1788 } else { | 1829 } else { |
1789 return _response; | 1830 return _response; |
1790 } | 1831 } |
1791 } | 1832 } |
1792 | 1833 |
1793 /** | 1834 /** |
1794 * Deletes an object and its metadata. Deletions are permanent if versioning | 1835 * Deletes an object and its metadata. Deletions are permanent if versioning |
1795 * is not enabled for the bucket, or if the generation parameter is used. | 1836 * is not enabled for the bucket, or if the generation parameter is used. |
1796 * | 1837 * |
(...skipping 11 matching lines...) Loading... |
1808 * | 1849 * |
1809 * [ifGenerationNotMatch] - Makes the operation conditional on whether the | 1850 * [ifGenerationNotMatch] - Makes the operation conditional on whether the |
1810 * object's current generation does not match the given value. | 1851 * object's current generation does not match the given value. |
1811 * | 1852 * |
1812 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 1853 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
1813 * object's current metageneration matches the given value. | 1854 * object's current metageneration matches the given value. |
1814 * | 1855 * |
1815 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the | 1856 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the |
1816 * object's current metageneration does not match the given value. | 1857 * object's current metageneration does not match the given value. |
1817 * | 1858 * |
1818 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1859 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1819 * error. | 1860 * error. |
1820 * | 1861 * |
1821 * If the used [http.Client] completes with an error when making a REST call, | 1862 * If the used [http.Client] completes with an error when making a REST call, |
1822 * this method will complete with the same error. | 1863 * this method will complete with the same error. |
1823 */ | 1864 */ |
1824 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}) { | 1865 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}) { |
1825 var _url = null; | 1866 var _url = null; |
1826 var _queryParams = new core.Map(); | 1867 var _queryParams = new core.Map(); |
1827 var _uploadMedia = null; | 1868 var _uploadMedia = null; |
1828 var _uploadOptions = null; | 1869 var _uploadOptions = null; |
1829 var _downloadOptions = common.DownloadOptions.Metadata; | 1870 var _downloadOptions = commons.DownloadOptions.Metadata; |
1830 var _body = null; | 1871 var _body = null; |
1831 | 1872 |
1832 if (bucket == null) { | 1873 if (bucket == null) { |
1833 throw new core.ArgumentError("Parameter bucket is required."); | 1874 throw new core.ArgumentError("Parameter bucket is required."); |
1834 } | 1875 } |
1835 if (object == null) { | 1876 if (object == null) { |
1836 throw new core.ArgumentError("Parameter object is required."); | 1877 throw new core.ArgumentError("Parameter object is required."); |
1837 } | 1878 } |
1838 if (generation != null) { | 1879 if (generation != null) { |
1839 _queryParams["generation"] = [generation]; | 1880 _queryParams["generation"] = [generation]; |
1840 } | 1881 } |
1841 if (ifGenerationMatch != null) { | 1882 if (ifGenerationMatch != null) { |
1842 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 1883 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
1843 } | 1884 } |
1844 if (ifGenerationNotMatch != null) { | 1885 if (ifGenerationNotMatch != null) { |
1845 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 1886 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
1846 } | 1887 } |
1847 if (ifMetagenerationMatch != null) { | 1888 if (ifMetagenerationMatch != null) { |
1848 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 1889 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
1849 } | 1890 } |
1850 if (ifMetagenerationNotMatch != null) { | 1891 if (ifMetagenerationNotMatch != null) { |
1851 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 1892 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
1852 } | 1893 } |
1853 | 1894 |
1854 _downloadOptions = null; | 1895 _downloadOptions = null; |
1855 | 1896 |
1856 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object'); | 1897 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object'); |
1857 | 1898 |
1858 var _response = _requester.request(_url, | 1899 var _response = _requester.request(_url, |
1859 "DELETE", | 1900 "DELETE", |
1860 body: _body, | 1901 body: _body, |
1861 queryParams: _queryParams, | 1902 queryParams: _queryParams, |
1862 uploadOptions: _uploadOptions, | 1903 uploadOptions: _uploadOptions, |
1863 uploadMedia: _uploadMedia, | 1904 uploadMedia: _uploadMedia, |
1864 downloadOptions: _downloadOptions); | 1905 downloadOptions: _downloadOptions); |
1865 return _response.then((data) => null); | 1906 return _response.then((data) => null); |
1866 } | 1907 } |
1867 | 1908 |
1868 /** | 1909 /** |
1869 * Retrieves an object or its metadata. | 1910 * Retrieves an object or its metadata. |
1870 * | 1911 * |
1871 * Request parameters: | 1912 * Request parameters: |
1872 * | 1913 * |
1873 * [bucket] - Name of the bucket in which the object resides. | 1914 * [bucket] - Name of the bucket in which the object resides. |
1874 * | 1915 * |
1875 * [object] - Name of the object. | 1916 * [object] - Name of the object. |
1876 * | 1917 * |
| 1918 * [encryptionAlgorithm] - Specifies the encryption algorithm that would be |
| 1919 * used to decrypt the object. Only 'AES256' is supported currently. |
| 1920 * Algorithm, key, and key hash must be supplied together. |
| 1921 * |
| 1922 * [encryptionKey] - Provides a base64-encoded 256-bit key to decrypt the |
| 1923 * object. Algorithm, key, and key hash must be supplied together. |
| 1924 * |
| 1925 * [encryptionKeyHash] - Provides the digest of the key for error-checking |
| 1926 * transmission. A digest is in the format of '='. Algorithm, key, and key |
| 1927 * hash must be supplied together. |
| 1928 * |
1877 * [generation] - If present, selects a specific revision of this object (as | 1929 * [generation] - If present, selects a specific revision of this object (as |
1878 * opposed to the latest version, the default). | 1930 * opposed to the latest version, the default). |
1879 * | 1931 * |
1880 * [ifGenerationMatch] - Makes the operation conditional on whether the | 1932 * [ifGenerationMatch] - Makes the operation conditional on whether the |
1881 * object's generation matches the given value. | 1933 * object's generation matches the given value. |
1882 * | 1934 * |
1883 * [ifGenerationNotMatch] - Makes the operation conditional on whether the | 1935 * [ifGenerationNotMatch] - Makes the operation conditional on whether the |
1884 * object's generation does not match the given value. | 1936 * object's generation does not match the given value. |
1885 * | 1937 * |
1886 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 1938 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
1887 * object's current metageneration matches the given value. | 1939 * object's current metageneration matches the given value. |
1888 * | 1940 * |
1889 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the | 1941 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the |
1890 * object's current metageneration does not match the given value. | 1942 * object's current metageneration does not match the given value. |
1891 * | 1943 * |
1892 * [projection] - Set of properties to return. Defaults to noAcl. | 1944 * [projection] - Set of properties to return. Defaults to noAcl. |
1893 * Possible string values are: | 1945 * Possible string values are: |
1894 * - "full" : Include all properties. | 1946 * - "full" : Include all properties. |
1895 * - "noAcl" : Omit the acl property. | 1947 * - "noAcl" : Omit the acl property. |
1896 * | 1948 * |
1897 * [downloadOptions] - Options for downloading. A download can be either a | 1949 * [downloadOptions] - Options for downloading. A download can be either a |
1898 * Metadata (default) or Media download. Partial Media downloads are possible | 1950 * Metadata (default) or Media download. Partial Media downloads are possible |
1899 * as well. | 1951 * as well. |
1900 * | 1952 * |
1901 * Completes with a | 1953 * Completes with a |
1902 * | 1954 * |
1903 * - [Object] for Metadata downloads (see [downloadOptions]). | 1955 * - [Object] for Metadata downloads (see [downloadOptions]). |
1904 * | 1956 * |
1905 * - [common.Media] for Media downloads (see [downloadOptions]). | 1957 * - [commons.Media] for Media downloads (see [downloadOptions]). |
1906 * | 1958 * |
1907 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1959 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1908 * error. | 1960 * error. |
1909 * | 1961 * |
1910 * If the used [http.Client] completes with an error when making a REST call, | 1962 * If the used [http.Client] completes with an error when making a REST call, |
1911 * this method will complete with the same error. | 1963 * this method will complete with the same error. |
1912 */ | 1964 */ |
1913 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, common.DownloadOptions downloadOptions: common.DownloadOptions.Metadata})
{ | 1965 async.Future get(core.String bucket, core.String object, {core.String encrypti
onAlgorithm, core.String encryptionKey, core.String encryptionKeyHash, core.Stri
ng generation, core.String ifGenerationMatch, core.String ifGenerationNotMatch,
core.String ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.St
ring projection, commons.DownloadOptions downloadOptions: commons.DownloadOption
s.Metadata}) { |
1914 var _url = null; | 1966 var _url = null; |
1915 var _queryParams = new core.Map(); | 1967 var _queryParams = new core.Map(); |
1916 var _uploadMedia = null; | 1968 var _uploadMedia = null; |
1917 var _uploadOptions = null; | 1969 var _uploadOptions = null; |
1918 var _downloadOptions = common.DownloadOptions.Metadata; | 1970 var _downloadOptions = commons.DownloadOptions.Metadata; |
1919 var _body = null; | 1971 var _body = null; |
1920 | 1972 |
1921 if (bucket == null) { | 1973 if (bucket == null) { |
1922 throw new core.ArgumentError("Parameter bucket is required."); | 1974 throw new core.ArgumentError("Parameter bucket is required."); |
1923 } | 1975 } |
1924 if (object == null) { | 1976 if (object == null) { |
1925 throw new core.ArgumentError("Parameter object is required."); | 1977 throw new core.ArgumentError("Parameter object is required."); |
1926 } | 1978 } |
| 1979 if (encryptionAlgorithm != null) { |
| 1980 _queryParams["encryptionAlgorithm"] = [encryptionAlgorithm]; |
| 1981 } |
| 1982 if (encryptionKey != null) { |
| 1983 _queryParams["encryptionKey"] = [encryptionKey]; |
| 1984 } |
| 1985 if (encryptionKeyHash != null) { |
| 1986 _queryParams["encryptionKeyHash"] = [encryptionKeyHash]; |
| 1987 } |
1927 if (generation != null) { | 1988 if (generation != null) { |
1928 _queryParams["generation"] = [generation]; | 1989 _queryParams["generation"] = [generation]; |
1929 } | 1990 } |
1930 if (ifGenerationMatch != null) { | 1991 if (ifGenerationMatch != null) { |
1931 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 1992 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
1932 } | 1993 } |
1933 if (ifGenerationNotMatch != null) { | 1994 if (ifGenerationNotMatch != null) { |
1934 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 1995 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
1935 } | 1996 } |
1936 if (ifMetagenerationMatch != null) { | 1997 if (ifMetagenerationMatch != null) { |
1937 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 1998 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
1938 } | 1999 } |
1939 if (ifMetagenerationNotMatch != null) { | 2000 if (ifMetagenerationNotMatch != null) { |
1940 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 2001 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
1941 } | 2002 } |
1942 if (projection != null) { | 2003 if (projection != null) { |
1943 _queryParams["projection"] = [projection]; | 2004 _queryParams["projection"] = [projection]; |
1944 } | 2005 } |
1945 | 2006 |
1946 _downloadOptions = downloadOptions; | 2007 _downloadOptions = downloadOptions; |
1947 | 2008 |
1948 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object'); | 2009 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object'); |
1949 | 2010 |
1950 var _response = _requester.request(_url, | 2011 var _response = _requester.request(_url, |
1951 "GET", | 2012 "GET", |
1952 body: _body, | 2013 body: _body, |
1953 queryParams: _queryParams, | 2014 queryParams: _queryParams, |
1954 uploadOptions: _uploadOptions, | 2015 uploadOptions: _uploadOptions, |
1955 uploadMedia: _uploadMedia, | 2016 uploadMedia: _uploadMedia, |
1956 downloadOptions: _downloadOptions); | 2017 downloadOptions: _downloadOptions); |
1957 if (_downloadOptions == null || | 2018 if (_downloadOptions == null || |
1958 _downloadOptions == common.DownloadOptions.Metadata) { | 2019 _downloadOptions == commons.DownloadOptions.Metadata) { |
1959 return _response.then((data) => new Object.fromJson(data)); | 2020 return _response.then((data) => new Object.fromJson(data)); |
1960 } else { | 2021 } else { |
1961 return _response; | 2022 return _response; |
1962 } | 2023 } |
1963 } | 2024 } |
1964 | 2025 |
1965 /** | 2026 /** |
1966 * Stores a new object and metadata. | 2027 * Stores a new object and metadata. |
1967 * | 2028 * |
1968 * [request] - The metadata request object. | 2029 * [request] - The metadata request object. |
1969 * | 2030 * |
1970 * Request parameters: | 2031 * Request parameters: |
1971 * | 2032 * |
1972 * [bucket] - Name of the bucket in which to store the new object. Overrides | 2033 * [bucket] - Name of the bucket in which to store the new object. Overrides |
1973 * the provided object metadata's bucket value, if any. | 2034 * the provided object metadata's bucket value, if any. |
1974 * | 2035 * |
1975 * [contentEncoding] - If set, sets the contentEncoding property of the final | 2036 * [contentEncoding] - If set, sets the contentEncoding property of the final |
1976 * object to this value. Setting this parameter is equivalent to setting the | 2037 * object to this value. Setting this parameter is equivalent to setting the |
1977 * contentEncoding metadata property. This can be useful when uploading an | 2038 * contentEncoding metadata property. This can be useful when uploading an |
1978 * object with uploadType=media to indicate the encoding of the content being | 2039 * object with uploadType=media to indicate the encoding of the content being |
1979 * uploaded. | 2040 * uploaded. |
1980 * | 2041 * |
| 2042 * [encryptionAlgorithm] - Specifies the encryption algorithm that would be |
| 2043 * used to encrypt the object. Only 'AES256' is supported currently. |
| 2044 * Algorithm, key, and key hash must be supplied together. |
| 2045 * |
| 2046 * [encryptionKey] - Provides a base64-encoded 256-bit key to encrypt the |
| 2047 * object. Algorithm, key, and key hash must be supplied together. |
| 2048 * |
| 2049 * [encryptionKeyHash] - Provides the digest of the key for error-checking |
| 2050 * transmission. A digest is in the format of '='. Algorithm, key, and key |
| 2051 * hash must be supplied together. |
| 2052 * |
1981 * [ifGenerationMatch] - Makes the operation conditional on whether the | 2053 * [ifGenerationMatch] - Makes the operation conditional on whether the |
1982 * object's current generation matches the given value. | 2054 * object's current generation matches the given value. |
1983 * | 2055 * |
1984 * [ifGenerationNotMatch] - Makes the operation conditional on whether the | 2056 * [ifGenerationNotMatch] - Makes the operation conditional on whether the |
1985 * object's current generation does not match the given value. | 2057 * object's current generation does not match the given value. |
1986 * | 2058 * |
1987 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 2059 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
1988 * object's current metageneration matches the given value. | 2060 * object's current metageneration matches the given value. |
1989 * | 2061 * |
1990 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the | 2062 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the |
(...skipping 28 matching lines...) Loading... |
2019 * length being known ahead of time is only supported via resumable uploads. | 2091 * length being known ahead of time is only supported via resumable uploads. |
2020 * | 2092 * |
2021 * [downloadOptions] - Options for downloading. A download can be either a | 2093 * [downloadOptions] - Options for downloading. A download can be either a |
2022 * Metadata (default) or Media download. Partial Media downloads are possible | 2094 * Metadata (default) or Media download. Partial Media downloads are possible |
2023 * as well. | 2095 * as well. |
2024 * | 2096 * |
2025 * Completes with a | 2097 * Completes with a |
2026 * | 2098 * |
2027 * - [Object] for Metadata downloads (see [downloadOptions]). | 2099 * - [Object] for Metadata downloads (see [downloadOptions]). |
2028 * | 2100 * |
2029 * - [common.Media] for Media downloads (see [downloadOptions]). | 2101 * - [commons.Media] for Media downloads (see [downloadOptions]). |
2030 * | 2102 * |
2031 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2103 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2032 * error. | 2104 * error. |
2033 * | 2105 * |
2034 * If the used [http.Client] completes with an error when making a REST call, | 2106 * If the used [http.Client] completes with an error when making a REST call, |
2035 * this method will complete with the same error. | 2107 * this method will complete with the same error. |
2036 */ | 2108 */ |
2037 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 na
me, core.String predefinedAcl, core.String projection, common.UploadOptions uplo
adOptions : common.UploadOptions.Default, common.Media uploadMedia, common.Downl
oadOptions downloadOptions: common.DownloadOptions.Metadata}) { | 2109 async.Future insert(Object request, core.String bucket, {core.String contentEn
coding, core.String encryptionAlgorithm, core.String encryptionKey, core.String
encryptionKeyHash, core.String ifGenerationMatch, core.String ifGenerationNotMat
ch, core.String ifMetagenerationMatch, core.String ifMetagenerationNotMatch, cor
e.String name, core.String predefinedAcl, core.String projection, commons.Upload
Options uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia
, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
2038 var _url = null; | 2110 var _url = null; |
2039 var _queryParams = new core.Map(); | 2111 var _queryParams = new core.Map(); |
2040 var _uploadMedia = null; | 2112 var _uploadMedia = null; |
2041 var _uploadOptions = null; | 2113 var _uploadOptions = null; |
2042 var _downloadOptions = common.DownloadOptions.Metadata; | 2114 var _downloadOptions = commons.DownloadOptions.Metadata; |
2043 var _body = null; | 2115 var _body = null; |
2044 | 2116 |
2045 if (request != null) { | 2117 if (request != null) { |
2046 _body = convert.JSON.encode((request).toJson()); | 2118 _body = convert.JSON.encode((request).toJson()); |
2047 } | 2119 } |
2048 if (bucket == null) { | 2120 if (bucket == null) { |
2049 throw new core.ArgumentError("Parameter bucket is required."); | 2121 throw new core.ArgumentError("Parameter bucket is required."); |
2050 } | 2122 } |
2051 if (contentEncoding != null) { | 2123 if (contentEncoding != null) { |
2052 _queryParams["contentEncoding"] = [contentEncoding]; | 2124 _queryParams["contentEncoding"] = [contentEncoding]; |
2053 } | 2125 } |
| 2126 if (encryptionAlgorithm != null) { |
| 2127 _queryParams["encryptionAlgorithm"] = [encryptionAlgorithm]; |
| 2128 } |
| 2129 if (encryptionKey != null) { |
| 2130 _queryParams["encryptionKey"] = [encryptionKey]; |
| 2131 } |
| 2132 if (encryptionKeyHash != null) { |
| 2133 _queryParams["encryptionKeyHash"] = [encryptionKeyHash]; |
| 2134 } |
2054 if (ifGenerationMatch != null) { | 2135 if (ifGenerationMatch != null) { |
2055 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 2136 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
2056 } | 2137 } |
2057 if (ifGenerationNotMatch != null) { | 2138 if (ifGenerationNotMatch != null) { |
2058 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 2139 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
2059 } | 2140 } |
2060 if (ifMetagenerationMatch != null) { | 2141 if (ifMetagenerationMatch != null) { |
2061 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 2142 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
2062 } | 2143 } |
2063 if (ifMetagenerationNotMatch != null) { | 2144 if (ifMetagenerationNotMatch != null) { |
2064 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 2145 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
2065 } | 2146 } |
2066 if (name != null) { | 2147 if (name != null) { |
2067 _queryParams["name"] = [name]; | 2148 _queryParams["name"] = [name]; |
2068 } | 2149 } |
2069 if (predefinedAcl != null) { | 2150 if (predefinedAcl != null) { |
2070 _queryParams["predefinedAcl"] = [predefinedAcl]; | 2151 _queryParams["predefinedAcl"] = [predefinedAcl]; |
2071 } | 2152 } |
2072 if (projection != null) { | 2153 if (projection != null) { |
2073 _queryParams["projection"] = [projection]; | 2154 _queryParams["projection"] = [projection]; |
2074 } | 2155 } |
2075 | 2156 |
2076 _uploadMedia = uploadMedia; | 2157 _uploadMedia = uploadMedia; |
2077 _uploadOptions = uploadOptions; | 2158 _uploadOptions = uploadOptions; |
2078 _downloadOptions = downloadOptions; | 2159 _downloadOptions = downloadOptions; |
2079 | 2160 |
2080 if (_uploadMedia == null) { | 2161 if (_uploadMedia == null) { |
2081 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o'; | 2162 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o'; |
2082 } else if (_uploadOptions is common.ResumableUploadOptions) { | 2163 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
2083 _url = '/resumable/upload/storage/v1/b/' + common_internal.Escaper.ecapeVa
riable('$bucket') + '/o'; | 2164 _url = '/resumable/upload/storage/v1/b/' + commons.Escaper.ecapeVariable('
$bucket') + '/o'; |
2084 } else { | 2165 } else { |
2085 _url = '/upload/storage/v1/b/' + common_internal.Escaper.ecapeVariable('$b
ucket') + '/o'; | 2166 _url = '/upload/storage/v1/b/' + commons.Escaper.ecapeVariable('$bucket')
+ '/o'; |
2086 } | 2167 } |
2087 | 2168 |
2088 | 2169 |
2089 var _response = _requester.request(_url, | 2170 var _response = _requester.request(_url, |
2090 "POST", | 2171 "POST", |
2091 body: _body, | 2172 body: _body, |
2092 queryParams: _queryParams, | 2173 queryParams: _queryParams, |
2093 uploadOptions: _uploadOptions, | 2174 uploadOptions: _uploadOptions, |
2094 uploadMedia: _uploadMedia, | 2175 uploadMedia: _uploadMedia, |
2095 downloadOptions: _downloadOptions); | 2176 downloadOptions: _downloadOptions); |
2096 if (_downloadOptions == null || | 2177 if (_downloadOptions == null || |
2097 _downloadOptions == common.DownloadOptions.Metadata) { | 2178 _downloadOptions == commons.DownloadOptions.Metadata) { |
2098 return _response.then((data) => new Object.fromJson(data)); | 2179 return _response.then((data) => new Object.fromJson(data)); |
2099 } else { | 2180 } else { |
2100 return _response; | 2181 return _response; |
2101 } | 2182 } |
2102 } | 2183 } |
2103 | 2184 |
2104 /** | 2185 /** |
2105 * Retrieves a list of objects matching the criteria. | 2186 * Retrieves a list of objects matching the criteria. |
2106 * | 2187 * |
2107 * Request parameters: | 2188 * Request parameters: |
(...skipping 17 matching lines...) Loading... |
2125 * | 2206 * |
2126 * [projection] - Set of properties to return. Defaults to noAcl. | 2207 * [projection] - Set of properties to return. Defaults to noAcl. |
2127 * Possible string values are: | 2208 * Possible string values are: |
2128 * - "full" : Include all properties. | 2209 * - "full" : Include all properties. |
2129 * - "noAcl" : Omit the acl property. | 2210 * - "noAcl" : Omit the acl property. |
2130 * | 2211 * |
2131 * [versions] - If true, lists all versions of a file as distinct results. | 2212 * [versions] - If true, lists all versions of a file as distinct results. |
2132 * | 2213 * |
2133 * Completes with a [Objects]. | 2214 * Completes with a [Objects]. |
2134 * | 2215 * |
2135 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2216 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2136 * error. | 2217 * error. |
2137 * | 2218 * |
2138 * If the used [http.Client] completes with an error when making a REST call, | 2219 * If the used [http.Client] completes with an error when making a REST call, |
2139 * this method will complete with the same error. | 2220 * this method will complete with the same error. |
2140 */ | 2221 */ |
2141 async.Future<Objects> list(core.String bucket, {core.String delimiter, core.in
t maxResults, core.String pageToken, core.String prefix, core.String projection,
core.bool versions}) { | 2222 async.Future<Objects> list(core.String bucket, {core.String delimiter, core.in
t maxResults, core.String pageToken, core.String prefix, core.String projection,
core.bool versions}) { |
2142 var _url = null; | 2223 var _url = null; |
2143 var _queryParams = new core.Map(); | 2224 var _queryParams = new core.Map(); |
2144 var _uploadMedia = null; | 2225 var _uploadMedia = null; |
2145 var _uploadOptions = null; | 2226 var _uploadOptions = null; |
2146 var _downloadOptions = common.DownloadOptions.Metadata; | 2227 var _downloadOptions = commons.DownloadOptions.Metadata; |
2147 var _body = null; | 2228 var _body = null; |
2148 | 2229 |
2149 if (bucket == null) { | 2230 if (bucket == null) { |
2150 throw new core.ArgumentError("Parameter bucket is required."); | 2231 throw new core.ArgumentError("Parameter bucket is required."); |
2151 } | 2232 } |
2152 if (delimiter != null) { | 2233 if (delimiter != null) { |
2153 _queryParams["delimiter"] = [delimiter]; | 2234 _queryParams["delimiter"] = [delimiter]; |
2154 } | 2235 } |
2155 if (maxResults != null) { | 2236 if (maxResults != null) { |
2156 _queryParams["maxResults"] = ["${maxResults}"]; | 2237 _queryParams["maxResults"] = ["${maxResults}"]; |
2157 } | 2238 } |
2158 if (pageToken != null) { | 2239 if (pageToken != null) { |
2159 _queryParams["pageToken"] = [pageToken]; | 2240 _queryParams["pageToken"] = [pageToken]; |
2160 } | 2241 } |
2161 if (prefix != null) { | 2242 if (prefix != null) { |
2162 _queryParams["prefix"] = [prefix]; | 2243 _queryParams["prefix"] = [prefix]; |
2163 } | 2244 } |
2164 if (projection != null) { | 2245 if (projection != null) { |
2165 _queryParams["projection"] = [projection]; | 2246 _queryParams["projection"] = [projection]; |
2166 } | 2247 } |
2167 if (versions != null) { | 2248 if (versions != null) { |
2168 _queryParams["versions"] = ["${versions}"]; | 2249 _queryParams["versions"] = ["${versions}"]; |
2169 } | 2250 } |
2170 | 2251 |
2171 | 2252 |
2172 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o'; | 2253 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o'; |
2173 | 2254 |
2174 var _response = _requester.request(_url, | 2255 var _response = _requester.request(_url, |
2175 "GET", | 2256 "GET", |
2176 body: _body, | 2257 body: _body, |
2177 queryParams: _queryParams, | 2258 queryParams: _queryParams, |
2178 uploadOptions: _uploadOptions, | 2259 uploadOptions: _uploadOptions, |
2179 uploadMedia: _uploadMedia, | 2260 uploadMedia: _uploadMedia, |
2180 downloadOptions: _downloadOptions); | 2261 downloadOptions: _downloadOptions); |
2181 return _response.then((data) => new Objects.fromJson(data)); | 2262 return _response.then((data) => new Objects.fromJson(data)); |
2182 } | 2263 } |
2183 | 2264 |
2184 /** | 2265 /** |
2185 * Updates an object's metadata. This method supports patch semantics. | 2266 * Updates an object's metadata. This method supports patch semantics. |
2186 * | 2267 * |
2187 * [request] - The metadata request object. | 2268 * [request] - The metadata request object. |
2188 * | 2269 * |
2189 * Request parameters: | 2270 * Request parameters: |
2190 * | 2271 * |
2191 * [bucket] - Name of the bucket in which the object resides. | 2272 * [bucket] - Name of the bucket in which the object resides. |
2192 * | 2273 * |
2193 * [object] - Name of the object. | 2274 * [object] - Name of the object. |
2194 * | 2275 * |
| 2276 * [encryptionAlgorithm] - For downloading encrypted objects, specifies the |
| 2277 * encryption algorithm that would be used to decrypt the object. Only |
| 2278 * 'AES256' is supported currently. Algorithm, key, and key hash must be |
| 2279 * supplied together. |
| 2280 * |
| 2281 * [encryptionKey] - For downloading encrypted objects, provides a |
| 2282 * base64-encoded 256-bit key to decrypt the object. Algorithm, key, and key |
| 2283 * hash must be supplied together. |
| 2284 * |
| 2285 * [encryptionKeyHash] - For downloading encrypted objects, provides the |
| 2286 * digest of the key for error-checking transmission. A digest is in the |
| 2287 * format of '='. Algorithm, key, and key hash must be supplied together. |
| 2288 * |
2195 * [generation] - If present, selects a specific revision of this object (as | 2289 * [generation] - If present, selects a specific revision of this object (as |
2196 * opposed to the latest version, the default). | 2290 * opposed to the latest version, the default). |
2197 * | 2291 * |
2198 * [ifGenerationMatch] - Makes the operation conditional on whether the | 2292 * [ifGenerationMatch] - Makes the operation conditional on whether the |
2199 * object's current generation matches the given value. | 2293 * object's current generation matches the given value. |
2200 * | 2294 * |
2201 * [ifGenerationNotMatch] - Makes the operation conditional on whether the | 2295 * [ifGenerationNotMatch] - Makes the operation conditional on whether the |
2202 * object's current generation does not match the given value. | 2296 * object's current generation does not match the given value. |
2203 * | 2297 * |
2204 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 2298 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
(...skipping 16 matching lines...) Loading... |
2221 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER | 2315 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
2222 * access. | 2316 * access. |
2223 * | 2317 * |
2224 * [projection] - Set of properties to return. Defaults to full. | 2318 * [projection] - Set of properties to return. Defaults to full. |
2225 * Possible string values are: | 2319 * Possible string values are: |
2226 * - "full" : Include all properties. | 2320 * - "full" : Include all properties. |
2227 * - "noAcl" : Omit the acl property. | 2321 * - "noAcl" : Omit the acl property. |
2228 * | 2322 * |
2229 * Completes with a [Object]. | 2323 * Completes with a [Object]. |
2230 * | 2324 * |
2231 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2325 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2232 * error. | 2326 * error. |
2233 * | 2327 * |
2234 * If the used [http.Client] completes with an error when making a REST call, | 2328 * If the used [http.Client] completes with an error when making a REST call, |
2235 * this method will complete with the same error. | 2329 * this method will complete with the same error. |
2236 */ | 2330 */ |
2237 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}) { | 2331 async.Future<Object> patch(Object request, core.String bucket, core.String obj
ect, {core.String encryptionAlgorithm, core.String encryptionKey, core.String en
cryptionKeyHash, core.String generation, core.String ifGenerationMatch, core.Str
ing ifGenerationNotMatch, core.String ifMetagenerationMatch, core.String ifMetag
enerationNotMatch, core.String predefinedAcl, core.String projection}) { |
2238 var _url = null; | 2332 var _url = null; |
2239 var _queryParams = new core.Map(); | 2333 var _queryParams = new core.Map(); |
2240 var _uploadMedia = null; | 2334 var _uploadMedia = null; |
2241 var _uploadOptions = null; | 2335 var _uploadOptions = null; |
2242 var _downloadOptions = common.DownloadOptions.Metadata; | 2336 var _downloadOptions = commons.DownloadOptions.Metadata; |
2243 var _body = null; | 2337 var _body = null; |
2244 | 2338 |
2245 if (request != null) { | 2339 if (request != null) { |
2246 _body = convert.JSON.encode((request).toJson()); | 2340 _body = convert.JSON.encode((request).toJson()); |
2247 } | 2341 } |
2248 if (bucket == null) { | 2342 if (bucket == null) { |
2249 throw new core.ArgumentError("Parameter bucket is required."); | 2343 throw new core.ArgumentError("Parameter bucket is required."); |
2250 } | 2344 } |
2251 if (object == null) { | 2345 if (object == null) { |
2252 throw new core.ArgumentError("Parameter object is required."); | 2346 throw new core.ArgumentError("Parameter object is required."); |
2253 } | 2347 } |
| 2348 if (encryptionAlgorithm != null) { |
| 2349 _queryParams["encryptionAlgorithm"] = [encryptionAlgorithm]; |
| 2350 } |
| 2351 if (encryptionKey != null) { |
| 2352 _queryParams["encryptionKey"] = [encryptionKey]; |
| 2353 } |
| 2354 if (encryptionKeyHash != null) { |
| 2355 _queryParams["encryptionKeyHash"] = [encryptionKeyHash]; |
| 2356 } |
2254 if (generation != null) { | 2357 if (generation != null) { |
2255 _queryParams["generation"] = [generation]; | 2358 _queryParams["generation"] = [generation]; |
2256 } | 2359 } |
2257 if (ifGenerationMatch != null) { | 2360 if (ifGenerationMatch != null) { |
2258 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 2361 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
2259 } | 2362 } |
2260 if (ifGenerationNotMatch != null) { | 2363 if (ifGenerationNotMatch != null) { |
2261 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 2364 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
2262 } | 2365 } |
2263 if (ifMetagenerationMatch != null) { | 2366 if (ifMetagenerationMatch != null) { |
2264 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 2367 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
2265 } | 2368 } |
2266 if (ifMetagenerationNotMatch != null) { | 2369 if (ifMetagenerationNotMatch != null) { |
2267 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 2370 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
2268 } | 2371 } |
2269 if (predefinedAcl != null) { | 2372 if (predefinedAcl != null) { |
2270 _queryParams["predefinedAcl"] = [predefinedAcl]; | 2373 _queryParams["predefinedAcl"] = [predefinedAcl]; |
2271 } | 2374 } |
2272 if (projection != null) { | 2375 if (projection != null) { |
2273 _queryParams["projection"] = [projection]; | 2376 _queryParams["projection"] = [projection]; |
2274 } | 2377 } |
2275 | 2378 |
2276 | 2379 |
2277 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object'); | 2380 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object'); |
2278 | 2381 |
2279 var _response = _requester.request(_url, | 2382 var _response = _requester.request(_url, |
2280 "PATCH", | 2383 "PATCH", |
2281 body: _body, | 2384 body: _body, |
2282 queryParams: _queryParams, | 2385 queryParams: _queryParams, |
2283 uploadOptions: _uploadOptions, | 2386 uploadOptions: _uploadOptions, |
2284 uploadMedia: _uploadMedia, | 2387 uploadMedia: _uploadMedia, |
2285 downloadOptions: _downloadOptions); | 2388 downloadOptions: _downloadOptions); |
2286 return _response.then((data) => new Object.fromJson(data)); | 2389 return _response.then((data) => new Object.fromJson(data)); |
2287 } | 2390 } |
2288 | 2391 |
2289 /** | 2392 /** |
2290 * Updates an object's metadata. | 2393 * Updates an object's metadata. |
2291 * | 2394 * |
2292 * [request] - The metadata request object. | 2395 * [request] - The metadata request object. |
2293 * | 2396 * |
2294 * Request parameters: | 2397 * Request parameters: |
2295 * | 2398 * |
2296 * [bucket] - Name of the bucket in which the object resides. | 2399 * [bucket] - Name of the bucket in which the object resides. |
2297 * | 2400 * |
2298 * [object] - Name of the object. | 2401 * [object] - Name of the object. |
2299 * | 2402 * |
| 2403 * [encryptionAlgorithm] - For downloading encrypted objects, specifies the |
| 2404 * encryption algorithm that would be used to decrypt the object. Only |
| 2405 * 'AES256' is supported currently. Algorithm, key, and key hash must be |
| 2406 * supplied together. |
| 2407 * |
| 2408 * [encryptionKey] - For downloading encrypted objects, provides a |
| 2409 * base64-encoded 256-bit key to decrypt the object. Algorithm, key, and key |
| 2410 * hash must be supplied together. |
| 2411 * |
| 2412 * [encryptionKeyHash] - For downloading encrypted objects, provides the |
| 2413 * digest of the key for error-checking transmission. A digest is in the |
| 2414 * format of '='. Algorithm, key, and key hash must be supplied together. |
| 2415 * |
2300 * [generation] - If present, selects a specific revision of this object (as | 2416 * [generation] - If present, selects a specific revision of this object (as |
2301 * opposed to the latest version, the default). | 2417 * opposed to the latest version, the default). |
2302 * | 2418 * |
2303 * [ifGenerationMatch] - Makes the operation conditional on whether the | 2419 * [ifGenerationMatch] - Makes the operation conditional on whether the |
2304 * object's current generation matches the given value. | 2420 * object's current generation matches the given value. |
2305 * | 2421 * |
2306 * [ifGenerationNotMatch] - Makes the operation conditional on whether the | 2422 * [ifGenerationNotMatch] - Makes the operation conditional on whether the |
2307 * object's current generation does not match the given value. | 2423 * object's current generation does not match the given value. |
2308 * | 2424 * |
2309 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 2425 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
(...skipping 22 matching lines...) Loading... |
2332 * - "noAcl" : Omit the acl property. | 2448 * - "noAcl" : Omit the acl property. |
2333 * | 2449 * |
2334 * [downloadOptions] - Options for downloading. A download can be either a | 2450 * [downloadOptions] - Options for downloading. A download can be either a |
2335 * Metadata (default) or Media download. Partial Media downloads are possible | 2451 * Metadata (default) or Media download. Partial Media downloads are possible |
2336 * as well. | 2452 * as well. |
2337 * | 2453 * |
2338 * Completes with a | 2454 * Completes with a |
2339 * | 2455 * |
2340 * - [Object] for Metadata downloads (see [downloadOptions]). | 2456 * - [Object] for Metadata downloads (see [downloadOptions]). |
2341 * | 2457 * |
2342 * - [common.Media] for Media downloads (see [downloadOptions]). | 2458 * - [commons.Media] for Media downloads (see [downloadOptions]). |
2343 * | 2459 * |
2344 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2460 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2345 * error. | 2461 * error. |
2346 * | 2462 * |
2347 * If the used [http.Client] completes with an error when making a REST call, | 2463 * If the used [http.Client] completes with an error when making a REST call, |
2348 * this method will complete with the same error. | 2464 * this method will complete with the same error. |
2349 */ | 2465 */ |
2350 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, common.DownloadOptions downl
oadOptions: common.DownloadOptions.Metadata}) { | 2466 async.Future update(Object request, core.String bucket, core.String object, {c
ore.String encryptionAlgorithm, core.String encryptionKey, core.String encryptio
nKeyHash, core.String generation, core.String ifGenerationMatch, core.String ifG
enerationNotMatch, core.String ifMetagenerationMatch, core.String ifMetagenerati
onNotMatch, core.String predefinedAcl, core.String projection, commons.DownloadO
ptions downloadOptions: commons.DownloadOptions.Metadata}) { |
2351 var _url = null; | 2467 var _url = null; |
2352 var _queryParams = new core.Map(); | 2468 var _queryParams = new core.Map(); |
2353 var _uploadMedia = null; | 2469 var _uploadMedia = null; |
2354 var _uploadOptions = null; | 2470 var _uploadOptions = null; |
2355 var _downloadOptions = common.DownloadOptions.Metadata; | 2471 var _downloadOptions = commons.DownloadOptions.Metadata; |
2356 var _body = null; | 2472 var _body = null; |
2357 | 2473 |
2358 if (request != null) { | 2474 if (request != null) { |
2359 _body = convert.JSON.encode((request).toJson()); | 2475 _body = convert.JSON.encode((request).toJson()); |
2360 } | 2476 } |
2361 if (bucket == null) { | 2477 if (bucket == null) { |
2362 throw new core.ArgumentError("Parameter bucket is required."); | 2478 throw new core.ArgumentError("Parameter bucket is required."); |
2363 } | 2479 } |
2364 if (object == null) { | 2480 if (object == null) { |
2365 throw new core.ArgumentError("Parameter object is required."); | 2481 throw new core.ArgumentError("Parameter object is required."); |
2366 } | 2482 } |
| 2483 if (encryptionAlgorithm != null) { |
| 2484 _queryParams["encryptionAlgorithm"] = [encryptionAlgorithm]; |
| 2485 } |
| 2486 if (encryptionKey != null) { |
| 2487 _queryParams["encryptionKey"] = [encryptionKey]; |
| 2488 } |
| 2489 if (encryptionKeyHash != null) { |
| 2490 _queryParams["encryptionKeyHash"] = [encryptionKeyHash]; |
| 2491 } |
2367 if (generation != null) { | 2492 if (generation != null) { |
2368 _queryParams["generation"] = [generation]; | 2493 _queryParams["generation"] = [generation]; |
2369 } | 2494 } |
2370 if (ifGenerationMatch != null) { | 2495 if (ifGenerationMatch != null) { |
2371 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 2496 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
2372 } | 2497 } |
2373 if (ifGenerationNotMatch != null) { | 2498 if (ifGenerationNotMatch != null) { |
2374 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 2499 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
2375 } | 2500 } |
2376 if (ifMetagenerationMatch != null) { | 2501 if (ifMetagenerationMatch != null) { |
2377 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 2502 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
2378 } | 2503 } |
2379 if (ifMetagenerationNotMatch != null) { | 2504 if (ifMetagenerationNotMatch != null) { |
2380 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 2505 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
2381 } | 2506 } |
2382 if (predefinedAcl != null) { | 2507 if (predefinedAcl != null) { |
2383 _queryParams["predefinedAcl"] = [predefinedAcl]; | 2508 _queryParams["predefinedAcl"] = [predefinedAcl]; |
2384 } | 2509 } |
2385 if (projection != null) { | 2510 if (projection != null) { |
2386 _queryParams["projection"] = [projection]; | 2511 _queryParams["projection"] = [projection]; |
2387 } | 2512 } |
2388 | 2513 |
2389 _downloadOptions = downloadOptions; | 2514 _downloadOptions = downloadOptions; |
2390 | 2515 |
2391 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/' + com
mon_internal.Escaper.ecapeVariable('$object'); | 2516 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object'); |
2392 | 2517 |
2393 var _response = _requester.request(_url, | 2518 var _response = _requester.request(_url, |
2394 "PUT", | 2519 "PUT", |
2395 body: _body, | 2520 body: _body, |
2396 queryParams: _queryParams, | 2521 queryParams: _queryParams, |
2397 uploadOptions: _uploadOptions, | 2522 uploadOptions: _uploadOptions, |
2398 uploadMedia: _uploadMedia, | 2523 uploadMedia: _uploadMedia, |
2399 downloadOptions: _downloadOptions); | 2524 downloadOptions: _downloadOptions); |
2400 if (_downloadOptions == null || | 2525 if (_downloadOptions == null || |
2401 _downloadOptions == common.DownloadOptions.Metadata) { | 2526 _downloadOptions == commons.DownloadOptions.Metadata) { |
2402 return _response.then((data) => new Object.fromJson(data)); | 2527 return _response.then((data) => new Object.fromJson(data)); |
2403 } else { | 2528 } else { |
2404 return _response; | 2529 return _response; |
2405 } | 2530 } |
2406 } | 2531 } |
2407 | 2532 |
2408 /** | 2533 /** |
2409 * Watch for changes on all objects in a bucket. | 2534 * Watch for changes on all objects in a bucket. |
2410 * | 2535 * |
2411 * [request] - The metadata request object. | 2536 * [request] - The metadata request object. |
(...skipping 19 matching lines...) Loading... |
2431 * | 2556 * |
2432 * [projection] - Set of properties to return. Defaults to noAcl. | 2557 * [projection] - Set of properties to return. Defaults to noAcl. |
2433 * Possible string values are: | 2558 * Possible string values are: |
2434 * - "full" : Include all properties. | 2559 * - "full" : Include all properties. |
2435 * - "noAcl" : Omit the acl property. | 2560 * - "noAcl" : Omit the acl property. |
2436 * | 2561 * |
2437 * [versions] - If true, lists all versions of a file as distinct results. | 2562 * [versions] - If true, lists all versions of a file as distinct results. |
2438 * | 2563 * |
2439 * Completes with a [Channel]. | 2564 * Completes with a [Channel]. |
2440 * | 2565 * |
2441 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2566 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2442 * error. | 2567 * error. |
2443 * | 2568 * |
2444 * If the used [http.Client] completes with an error when making a REST call, | 2569 * If the used [http.Client] completes with an error when making a REST call, |
2445 * this method will complete with the same error. | 2570 * this method will complete with the same error. |
2446 */ | 2571 */ |
2447 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.bool versions}) { | 2572 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.bool versions}) { |
2448 var _url = null; | 2573 var _url = null; |
2449 var _queryParams = new core.Map(); | 2574 var _queryParams = new core.Map(); |
2450 var _uploadMedia = null; | 2575 var _uploadMedia = null; |
2451 var _uploadOptions = null; | 2576 var _uploadOptions = null; |
2452 var _downloadOptions = common.DownloadOptions.Metadata; | 2577 var _downloadOptions = commons.DownloadOptions.Metadata; |
2453 var _body = null; | 2578 var _body = null; |
2454 | 2579 |
2455 if (request != null) { | 2580 if (request != null) { |
2456 _body = convert.JSON.encode((request).toJson()); | 2581 _body = convert.JSON.encode((request).toJson()); |
2457 } | 2582 } |
2458 if (bucket == null) { | 2583 if (bucket == null) { |
2459 throw new core.ArgumentError("Parameter bucket is required."); | 2584 throw new core.ArgumentError("Parameter bucket is required."); |
2460 } | 2585 } |
2461 if (delimiter != null) { | 2586 if (delimiter != null) { |
2462 _queryParams["delimiter"] = [delimiter]; | 2587 _queryParams["delimiter"] = [delimiter]; |
2463 } | 2588 } |
2464 if (maxResults != null) { | 2589 if (maxResults != null) { |
2465 _queryParams["maxResults"] = ["${maxResults}"]; | 2590 _queryParams["maxResults"] = ["${maxResults}"]; |
2466 } | 2591 } |
2467 if (pageToken != null) { | 2592 if (pageToken != null) { |
2468 _queryParams["pageToken"] = [pageToken]; | 2593 _queryParams["pageToken"] = [pageToken]; |
2469 } | 2594 } |
2470 if (prefix != null) { | 2595 if (prefix != null) { |
2471 _queryParams["prefix"] = [prefix]; | 2596 _queryParams["prefix"] = [prefix]; |
2472 } | 2597 } |
2473 if (projection != null) { | 2598 if (projection != null) { |
2474 _queryParams["projection"] = [projection]; | 2599 _queryParams["projection"] = [projection]; |
2475 } | 2600 } |
2476 if (versions != null) { | 2601 if (versions != null) { |
2477 _queryParams["versions"] = ["${versions}"]; | 2602 _queryParams["versions"] = ["${versions}"]; |
2478 } | 2603 } |
2479 | 2604 |
2480 | 2605 |
2481 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket') + '/o/watch'; | 2606 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/watch'; |
2482 | 2607 |
2483 var _response = _requester.request(_url, | 2608 var _response = _requester.request(_url, |
2484 "POST", | 2609 "POST", |
2485 body: _body, | 2610 body: _body, |
2486 queryParams: _queryParams, | 2611 queryParams: _queryParams, |
2487 uploadOptions: _uploadOptions, | 2612 uploadOptions: _uploadOptions, |
2488 uploadMedia: _uploadMedia, | 2613 uploadMedia: _uploadMedia, |
2489 downloadOptions: _downloadOptions); | 2614 downloadOptions: _downloadOptions); |
2490 return _response.then((data) => new Channel.fromJson(data)); | 2615 return _response.then((data) => new Channel.fromJson(data)); |
2491 } | 2616 } |
2492 | 2617 |
2493 } | 2618 } |
2494 | 2619 |
2495 | 2620 |
2496 | 2621 |
2497 /** Not documented yet. */ | |
2498 class BucketCors { | 2622 class BucketCors { |
2499 /** | 2623 /** |
2500 * The value, in seconds, to return in the Access-Control-Max-Age header used | 2624 * The value, in seconds, to return in the Access-Control-Max-Age header used |
2501 * in preflight responses. | 2625 * in preflight responses. |
2502 */ | 2626 */ |
2503 core.int maxAgeSeconds; | 2627 core.int maxAgeSeconds; |
2504 | 2628 |
2505 /** | 2629 /** |
2506 * The list of HTTP methods on which to include CORS response headers, (GET, | 2630 * The list of HTTP methods on which to include CORS response headers, (GET, |
2507 * OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and | 2631 * OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and |
(...skipping 132 matching lines...) Loading... |
2640 _json["isLive"] = isLive; | 2764 _json["isLive"] = isLive; |
2641 } | 2765 } |
2642 if (numNewerVersions != null) { | 2766 if (numNewerVersions != null) { |
2643 _json["numNewerVersions"] = numNewerVersions; | 2767 _json["numNewerVersions"] = numNewerVersions; |
2644 } | 2768 } |
2645 return _json; | 2769 return _json; |
2646 } | 2770 } |
2647 } | 2771 } |
2648 | 2772 |
2649 | 2773 |
2650 /** Not documented yet. */ | |
2651 class BucketLifecycleRule { | 2774 class BucketLifecycleRule { |
2652 /** The action to take. */ | 2775 /** The action to take. */ |
2653 BucketLifecycleRuleAction action; | 2776 BucketLifecycleRuleAction action; |
2654 | 2777 |
2655 /** The condition(s) under which the action will be taken. */ | 2778 /** The condition(s) under which the action will be taken. */ |
2656 BucketLifecycleRuleCondition condition; | 2779 BucketLifecycleRuleCondition condition; |
2657 | 2780 |
2658 | 2781 |
2659 BucketLifecycleRule(); | 2782 BucketLifecycleRule(); |
2660 | 2783 |
(...skipping 233 matching lines...) Loading... |
2894 BucketOwner owner; | 3017 BucketOwner owner; |
2895 | 3018 |
2896 /** The project number of the project the bucket belongs to. */ | 3019 /** The project number of the project the bucket belongs to. */ |
2897 core.String projectNumber; | 3020 core.String projectNumber; |
2898 | 3021 |
2899 /** The URI of this bucket. */ | 3022 /** The URI of this bucket. */ |
2900 core.String selfLink; | 3023 core.String selfLink; |
2901 | 3024 |
2902 /** | 3025 /** |
2903 * The bucket's storage class. This defines how objects in the bucket are | 3026 * The bucket's storage class. This defines how objects in the bucket are |
2904 * stored and determines the SLA and the cost of storage. Typical values are | 3027 * stored and determines the SLA and the cost of storage. Values include |
2905 * STANDARD and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. See the | 3028 * STANDARD, NEARLINE and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. |
2906 * developer's guide for the authoritative list. | 3029 * For more information, see storage classes. |
2907 */ | 3030 */ |
2908 core.String storageClass; | 3031 core.String storageClass; |
2909 | 3032 |
2910 /** Creation time of the bucket in RFC 3339 format. */ | 3033 /** Creation time of the bucket in RFC 3339 format. */ |
2911 core.DateTime timeCreated; | 3034 core.DateTime timeCreated; |
2912 | 3035 |
2913 /** The bucket's versioning configuration. */ | 3036 /** The bucket's versioning configuration. */ |
2914 BucketVersioning versioning; | 3037 BucketVersioning versioning; |
2915 | 3038 |
2916 /** The bucket's website configuration. */ | 3039 /** The bucket's website configuration. */ |
(...skipping 507 matching lines...) Loading... |
3424 core.Map toJson() { | 3547 core.Map toJson() { |
3425 var _json = new core.Map(); | 3548 var _json = new core.Map(); |
3426 if (ifGenerationMatch != null) { | 3549 if (ifGenerationMatch != null) { |
3427 _json["ifGenerationMatch"] = ifGenerationMatch; | 3550 _json["ifGenerationMatch"] = ifGenerationMatch; |
3428 } | 3551 } |
3429 return _json; | 3552 return _json; |
3430 } | 3553 } |
3431 } | 3554 } |
3432 | 3555 |
3433 | 3556 |
3434 /** Not documented yet. */ | |
3435 class ComposeRequestSourceObjects { | 3557 class ComposeRequestSourceObjects { |
3436 /** The generation of this object to use as the source. */ | 3558 /** The generation of this object to use as the source. */ |
3437 core.String generation; | 3559 core.String generation; |
3438 | 3560 |
3439 /** | 3561 /** |
3440 * The source object's name. The source object's bucket is implicitly the | 3562 * The source object's name. The source object's bucket is implicitly the |
3441 * destination bucket. | 3563 * destination bucket. |
3442 */ | 3564 */ |
3443 core.String name; | 3565 core.String name; |
3444 | 3566 |
(...skipping 634 matching lines...) Loading... |
4079 } | 4201 } |
4080 if (nextPageToken != null) { | 4202 if (nextPageToken != null) { |
4081 _json["nextPageToken"] = nextPageToken; | 4203 _json["nextPageToken"] = nextPageToken; |
4082 } | 4204 } |
4083 if (prefixes != null) { | 4205 if (prefixes != null) { |
4084 _json["prefixes"] = prefixes; | 4206 _json["prefixes"] = prefixes; |
4085 } | 4207 } |
4086 return _json; | 4208 return _json; |
4087 } | 4209 } |
4088 } | 4210 } |
4089 | |
4090 | |
OLD | NEW |