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.cloudkms.v1; | 3 library googleapis.cloudkms.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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 /** | 93 /** |
94 * Lists information about the supported locations for this service. | 94 * Lists information about the supported locations for this service. |
95 * | 95 * |
96 * Request parameters: | 96 * Request parameters: |
97 * | 97 * |
98 * [name] - The resource that owns the locations collection, if applicable. | 98 * [name] - The resource that owns the locations collection, if applicable. |
99 * Value must have pattern "^projects/[^/]+$". | 99 * Value must have pattern "^projects/[^/]+$". |
100 * | 100 * |
| 101 * [pageSize] - The standard list page size. |
| 102 * |
101 * [filter] - The standard list filter. | 103 * [filter] - The standard list filter. |
102 * | 104 * |
103 * [pageToken] - The standard list page token. | 105 * [pageToken] - The standard list page token. |
104 * | 106 * |
105 * [pageSize] - The standard list page size. | |
106 * | |
107 * Completes with a [ListLocationsResponse]. | 107 * Completes with a [ListLocationsResponse]. |
108 * | 108 * |
109 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 109 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
110 * error. | 110 * error. |
111 * | 111 * |
112 * If the used [http.Client] completes with an error when making a REST call, | 112 * If the used [http.Client] completes with an error when making a REST call, |
113 * this method will complete with the same error. | 113 * this method will complete with the same error. |
114 */ | 114 */ |
115 async.Future<ListLocationsResponse> list(core.String name, {core.String filter
, core.String pageToken, core.int pageSize}) { | 115 async.Future<ListLocationsResponse> list(core.String name, {core.int pageSize,
core.String filter, core.String pageToken}) { |
116 var _url = null; | 116 var _url = null; |
117 var _queryParams = new core.Map(); | 117 var _queryParams = new core.Map(); |
118 var _uploadMedia = null; | 118 var _uploadMedia = null; |
119 var _uploadOptions = null; | 119 var _uploadOptions = null; |
120 var _downloadOptions = commons.DownloadOptions.Metadata; | 120 var _downloadOptions = commons.DownloadOptions.Metadata; |
121 var _body = null; | 121 var _body = null; |
122 | 122 |
123 if (name == null) { | 123 if (name == null) { |
124 throw new core.ArgumentError("Parameter name is required."); | 124 throw new core.ArgumentError("Parameter name is required."); |
125 } | 125 } |
| 126 if (pageSize != null) { |
| 127 _queryParams["pageSize"] = ["${pageSize}"]; |
| 128 } |
126 if (filter != null) { | 129 if (filter != null) { |
127 _queryParams["filter"] = [filter]; | 130 _queryParams["filter"] = [filter]; |
128 } | 131 } |
129 if (pageToken != null) { | 132 if (pageToken != null) { |
130 _queryParams["pageToken"] = [pageToken]; | 133 _queryParams["pageToken"] = [pageToken]; |
131 } | 134 } |
132 if (pageSize != null) { | |
133 _queryParams["pageSize"] = ["${pageSize}"]; | |
134 } | |
135 | 135 |
136 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/locations'
; | 136 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/locations'
; |
137 | 137 |
138 var _response = _requester.request(_url, | 138 var _response = _requester.request(_url, |
139 "GET", | 139 "GET", |
140 body: _body, | 140 body: _body, |
141 queryParams: _queryParams, | 141 queryParams: _queryParams, |
142 uploadOptions: _uploadOptions, | 142 uploadOptions: _uploadOptions, |
143 uploadMedia: _uploadMedia, | 143 uploadMedia: _uploadMedia, |
144 downloadOptions: _downloadOptions); | 144 downloadOptions: _downloadOptions); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 295 |
296 /** | 296 /** |
297 * Lists KeyRings. | 297 * Lists KeyRings. |
298 * | 298 * |
299 * Request parameters: | 299 * Request parameters: |
300 * | 300 * |
301 * [parent] - Required. The resource name of the location associated with the | 301 * [parent] - Required. The resource name of the location associated with the |
302 * KeyRings, in the format `projects / * /locations / * `. | 302 * KeyRings, in the format `projects / * /locations / * `. |
303 * Value must have pattern "^projects/[^/]+/locations/[^/]+$". | 303 * Value must have pattern "^projects/[^/]+/locations/[^/]+$". |
304 * | 304 * |
| 305 * [pageToken] - Optional pagination token, returned earlier via |
| 306 * ListKeyRingsResponse.next_page_token. |
| 307 * |
305 * [pageSize] - Optional limit on the number of KeyRings to include in the | 308 * [pageSize] - Optional limit on the number of KeyRings to include in the |
306 * response. Further KeyRings can subsequently be obtained by | 309 * response. Further KeyRings can subsequently be obtained by |
307 * including the ListKeyRingsResponse.next_page_token in a subsequent | 310 * including the ListKeyRingsResponse.next_page_token in a subsequent |
308 * request. If unspecified, the server will pick an appropriate default. | 311 * request. If unspecified, the server will pick an appropriate default. |
309 * | 312 * |
310 * [pageToken] - Optional pagination token, returned earlier via | |
311 * ListKeyRingsResponse.next_page_token. | |
312 * | |
313 * Completes with a [ListKeyRingsResponse]. | 313 * Completes with a [ListKeyRingsResponse]. |
314 * | 314 * |
315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
316 * error. | 316 * error. |
317 * | 317 * |
318 * If the used [http.Client] completes with an error when making a REST call, | 318 * If the used [http.Client] completes with an error when making a REST call, |
319 * this method will complete with the same error. | 319 * this method will complete with the same error. |
320 */ | 320 */ |
321 async.Future<ListKeyRingsResponse> list(core.String parent, {core.int pageSize
, core.String pageToken}) { | 321 async.Future<ListKeyRingsResponse> list(core.String parent, {core.String pageT
oken, core.int pageSize}) { |
322 var _url = null; | 322 var _url = null; |
323 var _queryParams = new core.Map(); | 323 var _queryParams = new core.Map(); |
324 var _uploadMedia = null; | 324 var _uploadMedia = null; |
325 var _uploadOptions = null; | 325 var _uploadOptions = null; |
326 var _downloadOptions = commons.DownloadOptions.Metadata; | 326 var _downloadOptions = commons.DownloadOptions.Metadata; |
327 var _body = null; | 327 var _body = null; |
328 | 328 |
329 if (parent == null) { | 329 if (parent == null) { |
330 throw new core.ArgumentError("Parameter parent is required."); | 330 throw new core.ArgumentError("Parameter parent is required."); |
331 } | 331 } |
| 332 if (pageToken != null) { |
| 333 _queryParams["pageToken"] = [pageToken]; |
| 334 } |
332 if (pageSize != null) { | 335 if (pageSize != null) { |
333 _queryParams["pageSize"] = ["${pageSize}"]; | 336 _queryParams["pageSize"] = ["${pageSize}"]; |
334 } | 337 } |
335 if (pageToken != null) { | |
336 _queryParams["pageToken"] = [pageToken]; | |
337 } | |
338 | 338 |
339 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings
'; | 339 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings
'; |
340 | 340 |
341 var _response = _requester.request(_url, | 341 var _response = _requester.request(_url, |
342 "GET", | 342 "GET", |
343 body: _body, | 343 body: _body, |
344 queryParams: _queryParams, | 344 queryParams: _queryParams, |
345 uploadOptions: _uploadOptions, | 345 uploadOptions: _uploadOptions, |
346 uploadMedia: _uploadMedia, | 346 uploadMedia: _uploadMedia, |
347 downloadOptions: _downloadOptions); | 347 downloadOptions: _downloadOptions); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 /** | 703 /** |
704 * Lists CryptoKeys. | 704 * Lists CryptoKeys. |
705 * | 705 * |
706 * Request parameters: | 706 * Request parameters: |
707 * | 707 * |
708 * [parent] - Required. The resource name of the KeyRing to list, in the | 708 * [parent] - Required. The resource name of the KeyRing to list, in the |
709 * format | 709 * format |
710 * `projects / * /locations / * /keyRings / * `. | 710 * `projects / * /locations / * /keyRings / * `. |
711 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". | 711 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". |
712 * | 712 * |
| 713 * [pageToken] - Optional pagination token, returned earlier via |
| 714 * ListCryptoKeysResponse.next_page_token. |
| 715 * |
713 * [pageSize] - Optional limit on the number of CryptoKeys to include in the | 716 * [pageSize] - Optional limit on the number of CryptoKeys to include in the |
714 * response. Further CryptoKeys can subsequently be obtained by | 717 * response. Further CryptoKeys can subsequently be obtained by |
715 * including the ListCryptoKeysResponse.next_page_token in a subsequent | 718 * including the ListCryptoKeysResponse.next_page_token in a subsequent |
716 * request. If unspecified, the server will pick an appropriate default. | 719 * request. If unspecified, the server will pick an appropriate default. |
717 * | 720 * |
718 * [pageToken] - Optional pagination token, returned earlier via | |
719 * ListCryptoKeysResponse.next_page_token. | |
720 * | |
721 * Completes with a [ListCryptoKeysResponse]. | 721 * Completes with a [ListCryptoKeysResponse]. |
722 * | 722 * |
723 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 723 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
724 * error. | 724 * error. |
725 * | 725 * |
726 * If the used [http.Client] completes with an error when making a REST call, | 726 * If the used [http.Client] completes with an error when making a REST call, |
727 * this method will complete with the same error. | 727 * this method will complete with the same error. |
728 */ | 728 */ |
729 async.Future<ListCryptoKeysResponse> list(core.String parent, {core.int pageSi
ze, core.String pageToken}) { | 729 async.Future<ListCryptoKeysResponse> list(core.String parent, {core.String pag
eToken, core.int pageSize}) { |
730 var _url = null; | 730 var _url = null; |
731 var _queryParams = new core.Map(); | 731 var _queryParams = new core.Map(); |
732 var _uploadMedia = null; | 732 var _uploadMedia = null; |
733 var _uploadOptions = null; | 733 var _uploadOptions = null; |
734 var _downloadOptions = commons.DownloadOptions.Metadata; | 734 var _downloadOptions = commons.DownloadOptions.Metadata; |
735 var _body = null; | 735 var _body = null; |
736 | 736 |
737 if (parent == null) { | 737 if (parent == null) { |
738 throw new core.ArgumentError("Parameter parent is required."); | 738 throw new core.ArgumentError("Parameter parent is required."); |
739 } | 739 } |
| 740 if (pageToken != null) { |
| 741 _queryParams["pageToken"] = [pageToken]; |
| 742 } |
740 if (pageSize != null) { | 743 if (pageSize != null) { |
741 _queryParams["pageSize"] = ["${pageSize}"]; | 744 _queryParams["pageSize"] = ["${pageSize}"]; |
742 } | 745 } |
743 if (pageToken != null) { | |
744 _queryParams["pageToken"] = [pageToken]; | |
745 } | |
746 | 746 |
747 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
ys'; | 747 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
ys'; |
748 | 748 |
749 var _response = _requester.request(_url, | 749 var _response = _requester.request(_url, |
750 "GET", | 750 "GET", |
751 body: _body, | 751 body: _body, |
752 queryParams: _queryParams, | 752 queryParams: _queryParams, |
753 uploadOptions: _uploadOptions, | 753 uploadOptions: _uploadOptions, |
754 uploadMedia: _uploadMedia, | 754 uploadMedia: _uploadMedia, |
755 downloadOptions: _downloadOptions); | 755 downloadOptions: _downloadOptions); |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 * Lists CryptoKeyVersions. | 1119 * Lists CryptoKeyVersions. |
1120 * | 1120 * |
1121 * Request parameters: | 1121 * Request parameters: |
1122 * | 1122 * |
1123 * [parent] - Required. The resource name of the CryptoKey to list, in the | 1123 * [parent] - Required. The resource name of the CryptoKey to list, in the |
1124 * format | 1124 * format |
1125 * `projects / * /locations / * /keyRings / * /cryptoKeys / * `. | 1125 * `projects / * /locations / * /keyRings / * /cryptoKeys / * `. |
1126 * Value must have pattern | 1126 * Value must have pattern |
1127 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". | 1127 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". |
1128 * | 1128 * |
1129 * [pageToken] - Optional pagination token, returned earlier via | |
1130 * ListCryptoKeyVersionsResponse.next_page_token. | |
1131 * | |
1132 * [pageSize] - Optional limit on the number of CryptoKeyVersions to | 1129 * [pageSize] - Optional limit on the number of CryptoKeyVersions to |
1133 * include in the response. Further CryptoKeyVersions can | 1130 * include in the response. Further CryptoKeyVersions can |
1134 * subsequently be obtained by including the | 1131 * subsequently be obtained by including the |
1135 * ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. | 1132 * ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. |
1136 * If unspecified, the server will pick an appropriate default. | 1133 * If unspecified, the server will pick an appropriate default. |
1137 * | 1134 * |
| 1135 * [pageToken] - Optional pagination token, returned earlier via |
| 1136 * ListCryptoKeyVersionsResponse.next_page_token. |
| 1137 * |
1138 * Completes with a [ListCryptoKeyVersionsResponse]. | 1138 * Completes with a [ListCryptoKeyVersionsResponse]. |
1139 * | 1139 * |
1140 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1140 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1141 * error. | 1141 * error. |
1142 * | 1142 * |
1143 * If the used [http.Client] completes with an error when making a REST call, | 1143 * If the used [http.Client] completes with an error when making a REST call, |
1144 * this method will complete with the same error. | 1144 * this method will complete with the same error. |
1145 */ | 1145 */ |
1146 async.Future<ListCryptoKeyVersionsResponse> list(core.String parent, {core.Str
ing pageToken, core.int pageSize}) { | 1146 async.Future<ListCryptoKeyVersionsResponse> list(core.String parent, {core.int
pageSize, core.String pageToken}) { |
1147 var _url = null; | 1147 var _url = null; |
1148 var _queryParams = new core.Map(); | 1148 var _queryParams = new core.Map(); |
1149 var _uploadMedia = null; | 1149 var _uploadMedia = null; |
1150 var _uploadOptions = null; | 1150 var _uploadOptions = null; |
1151 var _downloadOptions = commons.DownloadOptions.Metadata; | 1151 var _downloadOptions = commons.DownloadOptions.Metadata; |
1152 var _body = null; | 1152 var _body = null; |
1153 | 1153 |
1154 if (parent == null) { | 1154 if (parent == null) { |
1155 throw new core.ArgumentError("Parameter parent is required."); | 1155 throw new core.ArgumentError("Parameter parent is required."); |
1156 } | 1156 } |
| 1157 if (pageSize != null) { |
| 1158 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1159 } |
1157 if (pageToken != null) { | 1160 if (pageToken != null) { |
1158 _queryParams["pageToken"] = [pageToken]; | 1161 _queryParams["pageToken"] = [pageToken]; |
1159 } | 1162 } |
1160 if (pageSize != null) { | |
1161 _queryParams["pageSize"] = ["${pageSize}"]; | |
1162 } | |
1163 | 1163 |
1164 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
yVersions'; | 1164 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
yVersions'; |
1165 | 1165 |
1166 var _response = _requester.request(_url, | 1166 var _response = _requester.request(_url, |
1167 "GET", | 1167 "GET", |
1168 body: _body, | 1168 body: _body, |
1169 queryParams: _queryParams, | 1169 queryParams: _queryParams, |
1170 uploadOptions: _uploadOptions, | 1170 uploadOptions: _uploadOptions, |
1171 uploadMedia: _uploadMedia, | 1171 uploadMedia: _uploadMedia, |
1172 downloadOptions: _downloadOptions); | 1172 downloadOptions: _downloadOptions); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 /** | 1292 /** |
1293 * Specifies the audit configuration for a service. | 1293 * Specifies the audit configuration for a service. |
1294 * The configuration determines which permission types are logged, and what | 1294 * The configuration determines which permission types are logged, and what |
1295 * identities, if any, are exempted from logging. | 1295 * identities, if any, are exempted from logging. |
1296 * An AuditConifg must have one or more AuditLogConfigs. | 1296 * An AuditConifg must have one or more AuditLogConfigs. |
1297 * | 1297 * |
1298 * If there are AuditConfigs for both `allServices` and a specific service, | 1298 * If there are AuditConfigs for both `allServices` and a specific service, |
1299 * the union of the two AuditConfigs is used for that service: the log_types | 1299 * the union of the two AuditConfigs is used for that service: the log_types |
1300 * specified in each AuditConfig are enabled, and the exempted_members in each | 1300 * specified in each AuditConfig are enabled, and the exempted_members in each |
1301 * AuditConfig are exempted. | 1301 * AuditConfig are exempted. |
| 1302 * |
1302 * Example Policy with multiple AuditConfigs: | 1303 * Example Policy with multiple AuditConfigs: |
1303 * { | 1304 * |
1304 * "audit_configs": [ | |
1305 * { | 1305 * { |
1306 * "service": "allServices" | 1306 * "audit_configs": [ |
1307 * "audit_log_configs": [ | |
1308 * { | 1307 * { |
1309 * "log_type": "DATA_READ", | 1308 * "service": "allServices" |
1310 * "exempted_members": [ | 1309 * "audit_log_configs": [ |
1311 * "user:foo@gmail.com" | 1310 * { |
| 1311 * "log_type": "DATA_READ", |
| 1312 * "exempted_members": [ |
| 1313 * "user:foo@gmail.com" |
| 1314 * ] |
| 1315 * }, |
| 1316 * { |
| 1317 * "log_type": "DATA_WRITE", |
| 1318 * }, |
| 1319 * { |
| 1320 * "log_type": "ADMIN_READ", |
| 1321 * } |
1312 * ] | 1322 * ] |
1313 * }, | 1323 * }, |
1314 * { | 1324 * { |
1315 * "log_type": "DATA_WRITE", | 1325 * "service": "fooservice.googleapis.com" |
1316 * }, | 1326 * "audit_log_configs": [ |
1317 * { | 1327 * { |
1318 * "log_type": "ADMIN_READ", | 1328 * "log_type": "DATA_READ", |
1319 * } | 1329 * }, |
1320 * ] | 1330 * { |
1321 * }, | 1331 * "log_type": "DATA_WRITE", |
1322 * { | 1332 * "exempted_members": [ |
1323 * "service": "fooservice@googleapis.com" | 1333 * "user:bar@gmail.com" |
1324 * "audit_log_configs": [ | 1334 * ] |
1325 * { | 1335 * } |
1326 * "log_type": "DATA_READ", | |
1327 * }, | |
1328 * { | |
1329 * "log_type": "DATA_WRITE", | |
1330 * "exempted_members": [ | |
1331 * "user:bar@gmail.com" | |
1332 * ] | 1336 * ] |
1333 * } | 1337 * } |
1334 * ] | 1338 * ] |
1335 * } | 1339 * } |
1336 * ] | 1340 * |
1337 * } | |
1338 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ | 1341 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
1339 * logging. It also exempts foo@gmail.com from DATA_READ logging, and | 1342 * logging. It also exempts foo@gmail.com from DATA_READ logging, and |
1340 * bar@gmail.com from DATA_WRITE logging. | 1343 * bar@gmail.com from DATA_WRITE logging. |
1341 */ | 1344 */ |
1342 class AuditConfig { | 1345 class AuditConfig { |
1343 /** | 1346 /** |
1344 * The configuration for logging of each type of permission. | 1347 * The configuration for logging of each type of permission. |
1345 * Next ID: 4 | 1348 * Next ID: 4 |
1346 */ | 1349 */ |
1347 core.List<AuditLogConfig> auditLogConfigs; | 1350 core.List<AuditLogConfig> auditLogConfigs; |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2667 } | 2670 } |
2668 | 2671 |
2669 core.Map toJson() { | 2672 core.Map toJson() { |
2670 var _json = new core.Map(); | 2673 var _json = new core.Map(); |
2671 if (cryptoKeyVersionId != null) { | 2674 if (cryptoKeyVersionId != null) { |
2672 _json["cryptoKeyVersionId"] = cryptoKeyVersionId; | 2675 _json["cryptoKeyVersionId"] = cryptoKeyVersionId; |
2673 } | 2676 } |
2674 return _json; | 2677 return _json; |
2675 } | 2678 } |
2676 } | 2679 } |
OLD | NEW |