| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.storage.v1; | 3 library googleapis.storage.v1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 * members get access according to their roles. | 1549 * members get access according to their roles. |
| 1550 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER | 1550 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
| 1551 * access. | 1551 * access. |
| 1552 * | 1552 * |
| 1553 * [ifGenerationMatch] - Makes the operation conditional on whether the | 1553 * [ifGenerationMatch] - Makes the operation conditional on whether the |
| 1554 * object's current generation matches the given value. | 1554 * object's current generation matches the given value. |
| 1555 * | 1555 * |
| 1556 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 1556 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
| 1557 * object's current metageneration matches the given value. | 1557 * object's current metageneration matches the given value. |
| 1558 * | 1558 * |
| 1559 * [kmsKeyName] - Resource name of the Cloud KMS key, of the form |
| 1560 * projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that |
| 1561 * will be used to encrypt the object. Overrides the object metadata's |
| 1562 * kms_key_name value, if any. |
| 1563 * |
| 1559 * [downloadOptions] - Options for downloading. A download can be either a | 1564 * [downloadOptions] - Options for downloading. A download can be either a |
| 1560 * Metadata (default) or Media download. Partial Media downloads are possible | 1565 * Metadata (default) or Media download. Partial Media downloads are possible |
| 1561 * as well. | 1566 * as well. |
| 1562 * | 1567 * |
| 1563 * Completes with a | 1568 * Completes with a |
| 1564 * | 1569 * |
| 1565 * - [Object] for Metadata downloads (see [downloadOptions]). | 1570 * - [Object] for Metadata downloads (see [downloadOptions]). |
| 1566 * | 1571 * |
| 1567 * - [commons.Media] for Media downloads (see [downloadOptions]). | 1572 * - [commons.Media] for Media downloads (see [downloadOptions]). |
| 1568 * | 1573 * |
| 1569 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1574 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1570 * error. | 1575 * error. |
| 1571 * | 1576 * |
| 1572 * If the used [http.Client] completes with an error when making a REST call, | 1577 * If the used [http.Client] completes with an error when making a REST call, |
| 1573 * this method will complete with the same error. | 1578 * this method will complete with the same error. |
| 1574 */ | 1579 */ |
| 1575 async.Future compose(ComposeRequest request, core.String destinationBucket, co
re.String destinationObject, {core.String destinationPredefinedAcl, core.String
ifGenerationMatch, core.String ifMetagenerationMatch, commons.DownloadOptions do
wnloadOptions: commons.DownloadOptions.Metadata}) { | 1580 async.Future compose(ComposeRequest request, core.String destinationBucket, co
re.String destinationObject, {core.String destinationPredefinedAcl, core.String
ifGenerationMatch, core.String ifMetagenerationMatch, core.String kmsKeyName, co
mmons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
| 1576 var _url = null; | 1581 var _url = null; |
| 1577 var _queryParams = new core.Map(); | 1582 var _queryParams = new core.Map(); |
| 1578 var _uploadMedia = null; | 1583 var _uploadMedia = null; |
| 1579 var _uploadOptions = null; | 1584 var _uploadOptions = null; |
| 1580 var _downloadOptions = commons.DownloadOptions.Metadata; | 1585 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1581 var _body = null; | 1586 var _body = null; |
| 1582 | 1587 |
| 1583 if (request != null) { | 1588 if (request != null) { |
| 1584 _body = convert.JSON.encode((request).toJson()); | 1589 _body = convert.JSON.encode((request).toJson()); |
| 1585 } | 1590 } |
| 1586 if (destinationBucket == null) { | 1591 if (destinationBucket == null) { |
| 1587 throw new core.ArgumentError("Parameter destinationBucket is required."); | 1592 throw new core.ArgumentError("Parameter destinationBucket is required."); |
| 1588 } | 1593 } |
| 1589 if (destinationObject == null) { | 1594 if (destinationObject == null) { |
| 1590 throw new core.ArgumentError("Parameter destinationObject is required."); | 1595 throw new core.ArgumentError("Parameter destinationObject is required."); |
| 1591 } | 1596 } |
| 1592 if (destinationPredefinedAcl != null) { | 1597 if (destinationPredefinedAcl != null) { |
| 1593 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; | 1598 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; |
| 1594 } | 1599 } |
| 1595 if (ifGenerationMatch != null) { | 1600 if (ifGenerationMatch != null) { |
| 1596 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 1601 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
| 1597 } | 1602 } |
| 1598 if (ifMetagenerationMatch != null) { | 1603 if (ifMetagenerationMatch != null) { |
| 1599 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 1604 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
| 1600 } | 1605 } |
| 1606 if (kmsKeyName != null) { |
| 1607 _queryParams["kmsKeyName"] = [kmsKeyName]; |
| 1608 } |
| 1601 | 1609 |
| 1602 _downloadOptions = downloadOptions; | 1610 _downloadOptions = downloadOptions; |
| 1603 | 1611 |
| 1604 _url = 'b/' + commons.Escaper.ecapeVariable('$destinationBucket') + '/o/' +
commons.Escaper.ecapeVariable('$destinationObject') + '/compose'; | 1612 _url = 'b/' + commons.Escaper.ecapeVariable('$destinationBucket') + '/o/' +
commons.Escaper.ecapeVariable('$destinationObject') + '/compose'; |
| 1605 | 1613 |
| 1606 var _response = _requester.request(_url, | 1614 var _response = _requester.request(_url, |
| 1607 "POST", | 1615 "POST", |
| 1608 body: _body, | 1616 body: _body, |
| 1609 queryParams: _queryParams, | 1617 queryParams: _queryParams, |
| 1610 uploadOptions: _uploadOptions, | 1618 uploadOptions: _uploadOptions, |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1976 * | 1984 * |
| 1977 * [ifGenerationNotMatch] - Makes the operation conditional on whether the | 1985 * [ifGenerationNotMatch] - Makes the operation conditional on whether the |
| 1978 * object's current generation does not match the given value. | 1986 * object's current generation does not match the given value. |
| 1979 * | 1987 * |
| 1980 * [ifMetagenerationMatch] - Makes the operation conditional on whether the | 1988 * [ifMetagenerationMatch] - Makes the operation conditional on whether the |
| 1981 * object's current metageneration matches the given value. | 1989 * object's current metageneration matches the given value. |
| 1982 * | 1990 * |
| 1983 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the | 1991 * [ifMetagenerationNotMatch] - Makes the operation conditional on whether the |
| 1984 * object's current metageneration does not match the given value. | 1992 * object's current metageneration does not match the given value. |
| 1985 * | 1993 * |
| 1994 * [kmsKeyName] - Resource name of the Cloud KMS key, of the form |
| 1995 * projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that |
| 1996 * will be used to encrypt the object. Overrides the object metadata's |
| 1997 * kms_key_name value, if any. |
| 1998 * |
| 1986 * [name] - Name of the object. Required when the object metadata is not | 1999 * [name] - Name of the object. Required when the object metadata is not |
| 1987 * otherwise provided. Overrides the object metadata's name value, if any. For | 2000 * otherwise provided. Overrides the object metadata's name value, if any. For |
| 1988 * information about how to URL encode object names to be path safe, see | 2001 * information about how to URL encode object names to be path safe, see |
| 1989 * Encoding URI Path Parts. | 2002 * Encoding URI Path Parts. |
| 1990 * | 2003 * |
| 1991 * [predefinedAcl] - Apply a predefined set of access controls to this object. | 2004 * [predefinedAcl] - Apply a predefined set of access controls to this object. |
| 1992 * Possible string values are: | 2005 * Possible string values are: |
| 1993 * - "authenticatedRead" : Object owner gets OWNER access, and | 2006 * - "authenticatedRead" : Object owner gets OWNER access, and |
| 1994 * allAuthenticatedUsers get READER access. | 2007 * allAuthenticatedUsers get READER access. |
| 1995 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project | 2008 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2022 * - [Object] for Metadata downloads (see [downloadOptions]). | 2035 * - [Object] for Metadata downloads (see [downloadOptions]). |
| 2023 * | 2036 * |
| 2024 * - [commons.Media] for Media downloads (see [downloadOptions]). | 2037 * - [commons.Media] for Media downloads (see [downloadOptions]). |
| 2025 * | 2038 * |
| 2026 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2039 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2027 * error. | 2040 * error. |
| 2028 * | 2041 * |
| 2029 * If the used [http.Client] completes with an error when making a REST call, | 2042 * If the used [http.Client] completes with an error when making a REST call, |
| 2030 * this method will complete with the same error. | 2043 * this method will complete with the same error. |
| 2031 */ | 2044 */ |
| 2032 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, commons.UploadOptions upl
oadOptions : commons.UploadOptions.Default, commons.Media uploadMedia, commons.D
ownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { | 2045 async.Future insert(Object request, core.String bucket, {core.String contentEn
coding, core.String ifGenerationMatch, core.String ifGenerationNotMatch, core.St
ring ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String km
sKeyName, core.String name, core.String predefinedAcl, core.String projection, c
ommons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Medi
a uploadMedia, commons.DownloadOptions downloadOptions: commons.DownloadOptions.
Metadata}) { |
| 2033 var _url = null; | 2046 var _url = null; |
| 2034 var _queryParams = new core.Map(); | 2047 var _queryParams = new core.Map(); |
| 2035 var _uploadMedia = null; | 2048 var _uploadMedia = null; |
| 2036 var _uploadOptions = null; | 2049 var _uploadOptions = null; |
| 2037 var _downloadOptions = commons.DownloadOptions.Metadata; | 2050 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2038 var _body = null; | 2051 var _body = null; |
| 2039 | 2052 |
| 2040 if (request != null) { | 2053 if (request != null) { |
| 2041 _body = convert.JSON.encode((request).toJson()); | 2054 _body = convert.JSON.encode((request).toJson()); |
| 2042 } | 2055 } |
| 2043 if (bucket == null) { | 2056 if (bucket == null) { |
| 2044 throw new core.ArgumentError("Parameter bucket is required."); | 2057 throw new core.ArgumentError("Parameter bucket is required."); |
| 2045 } | 2058 } |
| 2046 if (contentEncoding != null) { | 2059 if (contentEncoding != null) { |
| 2047 _queryParams["contentEncoding"] = [contentEncoding]; | 2060 _queryParams["contentEncoding"] = [contentEncoding]; |
| 2048 } | 2061 } |
| 2049 if (ifGenerationMatch != null) { | 2062 if (ifGenerationMatch != null) { |
| 2050 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 2063 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
| 2051 } | 2064 } |
| 2052 if (ifGenerationNotMatch != null) { | 2065 if (ifGenerationNotMatch != null) { |
| 2053 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 2066 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
| 2054 } | 2067 } |
| 2055 if (ifMetagenerationMatch != null) { | 2068 if (ifMetagenerationMatch != null) { |
| 2056 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 2069 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
| 2057 } | 2070 } |
| 2058 if (ifMetagenerationNotMatch != null) { | 2071 if (ifMetagenerationNotMatch != null) { |
| 2059 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 2072 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
| 2060 } | 2073 } |
| 2074 if (kmsKeyName != null) { |
| 2075 _queryParams["kmsKeyName"] = [kmsKeyName]; |
| 2076 } |
| 2061 if (name != null) { | 2077 if (name != null) { |
| 2062 _queryParams["name"] = [name]; | 2078 _queryParams["name"] = [name]; |
| 2063 } | 2079 } |
| 2064 if (predefinedAcl != null) { | 2080 if (predefinedAcl != null) { |
| 2065 _queryParams["predefinedAcl"] = [predefinedAcl]; | 2081 _queryParams["predefinedAcl"] = [predefinedAcl]; |
| 2066 } | 2082 } |
| 2067 if (projection != null) { | 2083 if (projection != null) { |
| 2068 _queryParams["projection"] = [projection]; | 2084 _queryParams["projection"] = [projection]; |
| 2069 } | 2085 } |
| 2070 | 2086 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2296 * URL encode object names to be path safe, see Encoding URI Path Parts. | 2312 * URL encode object names to be path safe, see Encoding URI Path Parts. |
| 2297 * | 2313 * |
| 2298 * [destinationBucket] - Name of the bucket in which to store the new object. | 2314 * [destinationBucket] - Name of the bucket in which to store the new object. |
| 2299 * Overrides the provided object metadata's bucket value, if any. | 2315 * Overrides the provided object metadata's bucket value, if any. |
| 2300 * | 2316 * |
| 2301 * [destinationObject] - Name of the new object. Required when the object | 2317 * [destinationObject] - Name of the new object. Required when the object |
| 2302 * metadata is not otherwise provided. Overrides the object metadata's name | 2318 * metadata is not otherwise provided. Overrides the object metadata's name |
| 2303 * value, if any. For information about how to URL encode object names to be | 2319 * value, if any. For information about how to URL encode object names to be |
| 2304 * path safe, see Encoding URI Path Parts. | 2320 * path safe, see Encoding URI Path Parts. |
| 2305 * | 2321 * |
| 2322 * [destinationKmsKeyName] - Resource name of the Cloud KMS key, of the form |
| 2323 * projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that |
| 2324 * will be used to encrypt the object. Overrides the object metadata's |
| 2325 * kms_key_name value, if any. |
| 2326 * |
| 2306 * [destinationPredefinedAcl] - Apply a predefined set of access controls to | 2327 * [destinationPredefinedAcl] - Apply a predefined set of access controls to |
| 2307 * the destination object. | 2328 * the destination object. |
| 2308 * Possible string values are: | 2329 * Possible string values are: |
| 2309 * - "authenticatedRead" : Object owner gets OWNER access, and | 2330 * - "authenticatedRead" : Object owner gets OWNER access, and |
| 2310 * allAuthenticatedUsers get READER access. | 2331 * allAuthenticatedUsers get READER access. |
| 2311 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project | 2332 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project |
| 2312 * team owners get OWNER access. | 2333 * team owners get OWNER access. |
| 2313 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team | 2334 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team |
| 2314 * owners get READER access. | 2335 * owners get READER access. |
| 2315 * - "private" : Object owner gets OWNER access. | 2336 * - "private" : Object owner gets OWNER access. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 * object (as opposed to the latest version, the default). | 2388 * object (as opposed to the latest version, the default). |
| 2368 * | 2389 * |
| 2369 * Completes with a [RewriteResponse]. | 2390 * Completes with a [RewriteResponse]. |
| 2370 * | 2391 * |
| 2371 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2392 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2372 * error. | 2393 * error. |
| 2373 * | 2394 * |
| 2374 * If the used [http.Client] completes with an error when making a REST call, | 2395 * If the used [http.Client] completes with an error when making a REST call, |
| 2375 * this method will complete with the same error. | 2396 * this method will complete with the same error. |
| 2376 */ | 2397 */ |
| 2377 async.Future<RewriteResponse> rewrite(Object request, core.String sourceBucket
, core.String sourceObject, core.String destinationBucket, core.String destinati
onObject, {core.String destinationPredefinedAcl, core.String ifGenerationMatch,
core.String ifGenerationNotMatch, core.String ifMetagenerationMatch, core.String
ifMetagenerationNotMatch, core.String ifSourceGenerationMatch, core.String ifSo
urceGenerationNotMatch, core.String ifSourceMetagenerationMatch, core.String ifS
ourceMetagenerationNotMatch, core.String maxBytesRewrittenPerCall, core.String p
rojection, core.String rewriteToken, core.String sourceGeneration}) { | 2398 async.Future<RewriteResponse> rewrite(Object request, core.String sourceBucket
, core.String sourceObject, core.String destinationBucket, core.String destinati
onObject, {core.String destinationKmsKeyName, core.String destinationPredefinedA
cl, core.String ifGenerationMatch, core.String ifGenerationNotMatch, core.String
ifMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String ifSour
ceGenerationMatch, core.String ifSourceGenerationNotMatch, core.String ifSourceM
etagenerationMatch, core.String ifSourceMetagenerationNotMatch, core.String maxB
ytesRewrittenPerCall, core.String projection, core.String rewriteToken, core.Str
ing sourceGeneration}) { |
| 2378 var _url = null; | 2399 var _url = null; |
| 2379 var _queryParams = new core.Map(); | 2400 var _queryParams = new core.Map(); |
| 2380 var _uploadMedia = null; | 2401 var _uploadMedia = null; |
| 2381 var _uploadOptions = null; | 2402 var _uploadOptions = null; |
| 2382 var _downloadOptions = commons.DownloadOptions.Metadata; | 2403 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2383 var _body = null; | 2404 var _body = null; |
| 2384 | 2405 |
| 2385 if (request != null) { | 2406 if (request != null) { |
| 2386 _body = convert.JSON.encode((request).toJson()); | 2407 _body = convert.JSON.encode((request).toJson()); |
| 2387 } | 2408 } |
| 2388 if (sourceBucket == null) { | 2409 if (sourceBucket == null) { |
| 2389 throw new core.ArgumentError("Parameter sourceBucket is required."); | 2410 throw new core.ArgumentError("Parameter sourceBucket is required."); |
| 2390 } | 2411 } |
| 2391 if (sourceObject == null) { | 2412 if (sourceObject == null) { |
| 2392 throw new core.ArgumentError("Parameter sourceObject is required."); | 2413 throw new core.ArgumentError("Parameter sourceObject is required."); |
| 2393 } | 2414 } |
| 2394 if (destinationBucket == null) { | 2415 if (destinationBucket == null) { |
| 2395 throw new core.ArgumentError("Parameter destinationBucket is required."); | 2416 throw new core.ArgumentError("Parameter destinationBucket is required."); |
| 2396 } | 2417 } |
| 2397 if (destinationObject == null) { | 2418 if (destinationObject == null) { |
| 2398 throw new core.ArgumentError("Parameter destinationObject is required."); | 2419 throw new core.ArgumentError("Parameter destinationObject is required."); |
| 2399 } | 2420 } |
| 2421 if (destinationKmsKeyName != null) { |
| 2422 _queryParams["destinationKmsKeyName"] = [destinationKmsKeyName]; |
| 2423 } |
| 2400 if (destinationPredefinedAcl != null) { | 2424 if (destinationPredefinedAcl != null) { |
| 2401 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; | 2425 _queryParams["destinationPredefinedAcl"] = [destinationPredefinedAcl]; |
| 2402 } | 2426 } |
| 2403 if (ifGenerationMatch != null) { | 2427 if (ifGenerationMatch != null) { |
| 2404 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; | 2428 _queryParams["ifGenerationMatch"] = [ifGenerationMatch]; |
| 2405 } | 2429 } |
| 2406 if (ifGenerationNotMatch != null) { | 2430 if (ifGenerationNotMatch != null) { |
| 2407 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; | 2431 _queryParams["ifGenerationNotMatch"] = [ifGenerationNotMatch]; |
| 2408 } | 2432 } |
| 2409 if (ifMetagenerationMatch != null) { | 2433 if (ifMetagenerationMatch != null) { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2709 if (origin != null) { | 2733 if (origin != null) { |
| 2710 _json["origin"] = origin; | 2734 _json["origin"] = origin; |
| 2711 } | 2735 } |
| 2712 if (responseHeader != null) { | 2736 if (responseHeader != null) { |
| 2713 _json["responseHeader"] = responseHeader; | 2737 _json["responseHeader"] = responseHeader; |
| 2714 } | 2738 } |
| 2715 return _json; | 2739 return _json; |
| 2716 } | 2740 } |
| 2717 } | 2741 } |
| 2718 | 2742 |
| 2743 /** |
| 2744 * Encryption configuration used by default for newly inserted objects, when no |
| 2745 * encryption config is specified. |
| 2746 */ |
| 2747 class BucketEncryption { |
| 2748 core.String defaultKmsKeyName; |
| 2749 |
| 2750 BucketEncryption(); |
| 2751 |
| 2752 BucketEncryption.fromJson(core.Map _json) { |
| 2753 if (_json.containsKey("default_kms_key_name")) { |
| 2754 defaultKmsKeyName = _json["default_kms_key_name"]; |
| 2755 } |
| 2756 } |
| 2757 |
| 2758 core.Map toJson() { |
| 2759 var _json = new core.Map(); |
| 2760 if (defaultKmsKeyName != null) { |
| 2761 _json["default_kms_key_name"] = defaultKmsKeyName; |
| 2762 } |
| 2763 return _json; |
| 2764 } |
| 2765 } |
| 2766 |
| 2719 /** The action to take. */ | 2767 /** The action to take. */ |
| 2720 class BucketLifecycleRuleAction { | 2768 class BucketLifecycleRuleAction { |
| 2721 /** Type of the action. Currently, only Delete is supported. */ | 2769 /** Type of the action. Currently, only Delete is supported. */ |
| 2722 core.String type; | 2770 core.String type; |
| 2723 | 2771 |
| 2724 BucketLifecycleRuleAction(); | 2772 BucketLifecycleRuleAction(); |
| 2725 | 2773 |
| 2726 BucketLifecycleRuleAction.fromJson(core.Map _json) { | 2774 BucketLifecycleRuleAction.fromJson(core.Map _json) { |
| 2727 if (_json.containsKey("type")) { | 2775 if (_json.containsKey("type")) { |
| 2728 type = _json["type"]; | 2776 type = _json["type"]; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 /** A bucket. */ | 3036 /** A bucket. */ |
| 2989 class Bucket { | 3037 class Bucket { |
| 2990 /** Access controls on the bucket. */ | 3038 /** Access controls on the bucket. */ |
| 2991 core.List<BucketAccessControl> acl; | 3039 core.List<BucketAccessControl> acl; |
| 2992 /** The bucket's Cross-Origin Resource Sharing (CORS) configuration. */ | 3040 /** The bucket's Cross-Origin Resource Sharing (CORS) configuration. */ |
| 2993 core.List<BucketCors> cors; | 3041 core.List<BucketCors> cors; |
| 2994 /** | 3042 /** |
| 2995 * Default access controls to apply to new objects when no ACL is provided. | 3043 * Default access controls to apply to new objects when no ACL is provided. |
| 2996 */ | 3044 */ |
| 2997 core.List<ObjectAccessControl> defaultObjectAcl; | 3045 core.List<ObjectAccessControl> defaultObjectAcl; |
| 3046 /** |
| 3047 * Encryption configuration used by default for newly inserted objects, when |
| 3048 * no encryption config is specified. |
| 3049 */ |
| 3050 BucketEncryption encryption; |
| 2998 /** HTTP 1.1 Entity tag for the bucket. */ | 3051 /** HTTP 1.1 Entity tag for the bucket. */ |
| 2999 core.String etag; | 3052 core.String etag; |
| 3000 /** The ID of the bucket. */ | 3053 /** The ID of the bucket. */ |
| 3001 core.String id; | 3054 core.String id; |
| 3002 /** The kind of item this is. For buckets, this is always storage#bucket. */ | 3055 /** The kind of item this is. For buckets, this is always storage#bucket. */ |
| 3003 core.String kind; | 3056 core.String kind; |
| 3004 /** | 3057 /** |
| 3005 * The bucket's lifecycle configuration. See lifecycle management for more | 3058 * The bucket's lifecycle configuration. See lifecycle management for more |
| 3006 * information. | 3059 * information. |
| 3007 */ | 3060 */ |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3054 Bucket.fromJson(core.Map _json) { | 3107 Bucket.fromJson(core.Map _json) { |
| 3055 if (_json.containsKey("acl")) { | 3108 if (_json.containsKey("acl")) { |
| 3056 acl = _json["acl"].map((value) => new BucketAccessControl.fromJson(value))
.toList(); | 3109 acl = _json["acl"].map((value) => new BucketAccessControl.fromJson(value))
.toList(); |
| 3057 } | 3110 } |
| 3058 if (_json.containsKey("cors")) { | 3111 if (_json.containsKey("cors")) { |
| 3059 cors = _json["cors"].map((value) => new BucketCors.fromJson(value)).toList
(); | 3112 cors = _json["cors"].map((value) => new BucketCors.fromJson(value)).toList
(); |
| 3060 } | 3113 } |
| 3061 if (_json.containsKey("defaultObjectAcl")) { | 3114 if (_json.containsKey("defaultObjectAcl")) { |
| 3062 defaultObjectAcl = _json["defaultObjectAcl"].map((value) => new ObjectAcce
ssControl.fromJson(value)).toList(); | 3115 defaultObjectAcl = _json["defaultObjectAcl"].map((value) => new ObjectAcce
ssControl.fromJson(value)).toList(); |
| 3063 } | 3116 } |
| 3117 if (_json.containsKey("encryption")) { |
| 3118 encryption = new BucketEncryption.fromJson(_json["encryption"]); |
| 3119 } |
| 3064 if (_json.containsKey("etag")) { | 3120 if (_json.containsKey("etag")) { |
| 3065 etag = _json["etag"]; | 3121 etag = _json["etag"]; |
| 3066 } | 3122 } |
| 3067 if (_json.containsKey("id")) { | 3123 if (_json.containsKey("id")) { |
| 3068 id = _json["id"]; | 3124 id = _json["id"]; |
| 3069 } | 3125 } |
| 3070 if (_json.containsKey("kind")) { | 3126 if (_json.containsKey("kind")) { |
| 3071 kind = _json["kind"]; | 3127 kind = _json["kind"]; |
| 3072 } | 3128 } |
| 3073 if (_json.containsKey("lifecycle")) { | 3129 if (_json.containsKey("lifecycle")) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3115 var _json = new core.Map(); | 3171 var _json = new core.Map(); |
| 3116 if (acl != null) { | 3172 if (acl != null) { |
| 3117 _json["acl"] = acl.map((value) => (value).toJson()).toList(); | 3173 _json["acl"] = acl.map((value) => (value).toJson()).toList(); |
| 3118 } | 3174 } |
| 3119 if (cors != null) { | 3175 if (cors != null) { |
| 3120 _json["cors"] = cors.map((value) => (value).toJson()).toList(); | 3176 _json["cors"] = cors.map((value) => (value).toJson()).toList(); |
| 3121 } | 3177 } |
| 3122 if (defaultObjectAcl != null) { | 3178 if (defaultObjectAcl != null) { |
| 3123 _json["defaultObjectAcl"] = defaultObjectAcl.map((value) => (value).toJson
()).toList(); | 3179 _json["defaultObjectAcl"] = defaultObjectAcl.map((value) => (value).toJson
()).toList(); |
| 3124 } | 3180 } |
| 3181 if (encryption != null) { |
| 3182 _json["encryption"] = (encryption).toJson(); |
| 3183 } |
| 3125 if (etag != null) { | 3184 if (etag != null) { |
| 3126 _json["etag"] = etag; | 3185 _json["etag"] = etag; |
| 3127 } | 3186 } |
| 3128 if (id != null) { | 3187 if (id != null) { |
| 3129 _json["id"] = id; | 3188 _json["id"] = id; |
| 3130 } | 3189 } |
| 3131 if (kind != null) { | 3190 if (kind != null) { |
| 3132 _json["kind"] = kind; | 3191 _json["kind"] = kind; |
| 3133 } | 3192 } |
| 3134 if (lifecycle != null) { | 3193 if (lifecycle != null) { |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3717 ObjectCustomerEncryption customerEncryption; | 3776 ObjectCustomerEncryption customerEncryption; |
| 3718 /** HTTP 1.1 Entity tag for the object. */ | 3777 /** HTTP 1.1 Entity tag for the object. */ |
| 3719 core.String etag; | 3778 core.String etag; |
| 3720 /** The content generation of this object. Used for object versioning. */ | 3779 /** The content generation of this object. Used for object versioning. */ |
| 3721 core.String generation; | 3780 core.String generation; |
| 3722 /** The ID of the object. */ | 3781 /** The ID of the object. */ |
| 3723 core.String id; | 3782 core.String id; |
| 3724 /** The kind of item this is. For objects, this is always storage#object. */ | 3783 /** The kind of item this is. For objects, this is always storage#object. */ |
| 3725 core.String kind; | 3784 core.String kind; |
| 3726 /** | 3785 /** |
| 3786 * Cloud KMS Key used to encrypt this object, if the object is encrypted by |
| 3787 * such a key. |
| 3788 */ |
| 3789 core.String kmsKeyName; |
| 3790 /** |
| 3727 * MD5 hash of the data; encoded using base64. For more information about | 3791 * MD5 hash of the data; encoded using base64. For more information about |
| 3728 * using the MD5 hash, see Hashes and ETags: Best Practices. | 3792 * using the MD5 hash, see Hashes and ETags: Best Practices. |
| 3729 */ | 3793 */ |
| 3730 core.String md5Hash; | 3794 core.String md5Hash; |
| 3731 /** Media download link. */ | 3795 /** Media download link. */ |
| 3732 core.String mediaLink; | 3796 core.String mediaLink; |
| 3733 /** User-provided metadata, in key/value pairs. */ | 3797 /** User-provided metadata, in key/value pairs. */ |
| 3734 core.Map<core.String, core.String> metadata; | 3798 core.Map<core.String, core.String> metadata; |
| 3735 /** | 3799 /** |
| 3736 * The version of the metadata for this object at this generation. Used for | 3800 * The version of the metadata for this object at this generation. Used for |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3799 } | 3863 } |
| 3800 if (_json.containsKey("generation")) { | 3864 if (_json.containsKey("generation")) { |
| 3801 generation = _json["generation"]; | 3865 generation = _json["generation"]; |
| 3802 } | 3866 } |
| 3803 if (_json.containsKey("id")) { | 3867 if (_json.containsKey("id")) { |
| 3804 id = _json["id"]; | 3868 id = _json["id"]; |
| 3805 } | 3869 } |
| 3806 if (_json.containsKey("kind")) { | 3870 if (_json.containsKey("kind")) { |
| 3807 kind = _json["kind"]; | 3871 kind = _json["kind"]; |
| 3808 } | 3872 } |
| 3873 if (_json.containsKey("kmsKeyName")) { |
| 3874 kmsKeyName = _json["kmsKeyName"]; |
| 3875 } |
| 3809 if (_json.containsKey("md5Hash")) { | 3876 if (_json.containsKey("md5Hash")) { |
| 3810 md5Hash = _json["md5Hash"]; | 3877 md5Hash = _json["md5Hash"]; |
| 3811 } | 3878 } |
| 3812 if (_json.containsKey("mediaLink")) { | 3879 if (_json.containsKey("mediaLink")) { |
| 3813 mediaLink = _json["mediaLink"]; | 3880 mediaLink = _json["mediaLink"]; |
| 3814 } | 3881 } |
| 3815 if (_json.containsKey("metadata")) { | 3882 if (_json.containsKey("metadata")) { |
| 3816 metadata = _json["metadata"]; | 3883 metadata = _json["metadata"]; |
| 3817 } | 3884 } |
| 3818 if (_json.containsKey("metageneration")) { | 3885 if (_json.containsKey("metageneration")) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3881 } | 3948 } |
| 3882 if (generation != null) { | 3949 if (generation != null) { |
| 3883 _json["generation"] = generation; | 3950 _json["generation"] = generation; |
| 3884 } | 3951 } |
| 3885 if (id != null) { | 3952 if (id != null) { |
| 3886 _json["id"] = id; | 3953 _json["id"] = id; |
| 3887 } | 3954 } |
| 3888 if (kind != null) { | 3955 if (kind != null) { |
| 3889 _json["kind"] = kind; | 3956 _json["kind"] = kind; |
| 3890 } | 3957 } |
| 3958 if (kmsKeyName != null) { |
| 3959 _json["kmsKeyName"] = kmsKeyName; |
| 3960 } |
| 3891 if (md5Hash != null) { | 3961 if (md5Hash != null) { |
| 3892 _json["md5Hash"] = md5Hash; | 3962 _json["md5Hash"] = md5Hash; |
| 3893 } | 3963 } |
| 3894 if (mediaLink != null) { | 3964 if (mediaLink != null) { |
| 3895 _json["mediaLink"] = mediaLink; | 3965 _json["mediaLink"] = mediaLink; |
| 3896 } | 3966 } |
| 3897 if (metadata != null) { | 3967 if (metadata != null) { |
| 3898 _json["metadata"] = metadata; | 3968 _json["metadata"] = metadata; |
| 3899 } | 3969 } |
| 3900 if (metageneration != null) { | 3970 if (metageneration != null) { |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4256 } | 4326 } |
| 4257 if (rewriteToken != null) { | 4327 if (rewriteToken != null) { |
| 4258 _json["rewriteToken"] = rewriteToken; | 4328 _json["rewriteToken"] = rewriteToken; |
| 4259 } | 4329 } |
| 4260 if (totalBytesRewritten != null) { | 4330 if (totalBytesRewritten != null) { |
| 4261 _json["totalBytesRewritten"] = totalBytesRewritten; | 4331 _json["totalBytesRewritten"] = totalBytesRewritten; |
| 4262 } | 4332 } |
| 4263 return _json; | 4333 return _json; |
| 4264 } | 4334 } |
| 4265 } | 4335 } |
| OLD | NEW |