| 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_beta.cloudkms.v1beta1; | 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; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client cloudkms/v1beta1'; | 15 const core.String USER_AGENT = 'dart-api-client cloudkms/v1'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Manages encryption for your cloud services the same way you do on-premise. | 18 * Manages encryption for your cloud services the same way you do on-premise. |
| 19 * You can generate, use, rotate, and destroy AES256 encryption keys. | 19 * You can generate, use, rotate, and destroy AES256 encryption keys. |
| 20 */ | 20 */ |
| 21 class CloudkmsApi { | 21 class CloudkmsApi { |
| 22 /** View and manage your data across Google Cloud Platform services */ | 22 /** View and manage your data across Google Cloud Platform services */ |
| 23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 24 | 24 |
| 25 | 25 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 var _queryParams = new core.Map(); | 71 var _queryParams = new core.Map(); |
| 72 var _uploadMedia = null; | 72 var _uploadMedia = null; |
| 73 var _uploadOptions = null; | 73 var _uploadOptions = null; |
| 74 var _downloadOptions = commons.DownloadOptions.Metadata; | 74 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 75 var _body = null; | 75 var _body = null; |
| 76 | 76 |
| 77 if (name == null) { | 77 if (name == null) { |
| 78 throw new core.ArgumentError("Parameter name is required."); | 78 throw new core.ArgumentError("Parameter name is required."); |
| 79 } | 79 } |
| 80 | 80 |
| 81 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 81 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 82 | 82 |
| 83 var _response = _requester.request(_url, | 83 var _response = _requester.request(_url, |
| 84 "GET", | 84 "GET", |
| 85 body: _body, | 85 body: _body, |
| 86 queryParams: _queryParams, | 86 queryParams: _queryParams, |
| 87 uploadOptions: _uploadOptions, | 87 uploadOptions: _uploadOptions, |
| 88 uploadMedia: _uploadMedia, | 88 uploadMedia: _uploadMedia, |
| 89 downloadOptions: _downloadOptions); | 89 downloadOptions: _downloadOptions); |
| 90 return _response.then((data) => new Location.fromJson(data)); | 90 return _response.then((data) => new Location.fromJson(data)); |
| 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 * [filter] - The standard list filter. |
| 102 * |
| 101 * [pageToken] - The standard list page token. | 103 * [pageToken] - The standard list page token. |
| 102 * | 104 * |
| 103 * [pageSize] - The standard list page size. | 105 * [pageSize] - The standard list page size. |
| 104 * | 106 * |
| 105 * [filter] - The standard list filter. | |
| 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 pageTo
ken, core.int pageSize, core.String filter}) { | 115 async.Future<ListLocationsResponse> list(core.String name, {core.String filter
, core.String pageToken, core.int pageSize}) { |
| 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 (filter != null) { |
| 127 _queryParams["filter"] = [filter]; |
| 128 } |
| 126 if (pageToken != null) { | 129 if (pageToken != null) { |
| 127 _queryParams["pageToken"] = [pageToken]; | 130 _queryParams["pageToken"] = [pageToken]; |
| 128 } | 131 } |
| 129 if (pageSize != null) { | 132 if (pageSize != null) { |
| 130 _queryParams["pageSize"] = ["${pageSize}"]; | 133 _queryParams["pageSize"] = ["${pageSize}"]; |
| 131 } | 134 } |
| 132 if (filter != null) { | |
| 133 _queryParams["filter"] = [filter]; | |
| 134 } | |
| 135 | 135 |
| 136 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + '/locat
ions'; | 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); |
| 145 return _response.then((data) => new ListLocationsResponse.fromJson(data)); | 145 return _response.then((data) => new ListLocationsResponse.fromJson(data)); |
| 146 } | 146 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (request != null) { | 190 if (request != null) { |
| 191 _body = convert.JSON.encode((request).toJson()); | 191 _body = convert.JSON.encode((request).toJson()); |
| 192 } | 192 } |
| 193 if (parent == null) { | 193 if (parent == null) { |
| 194 throw new core.ArgumentError("Parameter parent is required."); | 194 throw new core.ArgumentError("Parameter parent is required."); |
| 195 } | 195 } |
| 196 if (keyRingId != null) { | 196 if (keyRingId != null) { |
| 197 _queryParams["keyRingId"] = [keyRingId]; | 197 _queryParams["keyRingId"] = [keyRingId]; |
| 198 } | 198 } |
| 199 | 199 |
| 200 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/key
Rings'; | 200 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings
'; |
| 201 | 201 |
| 202 var _response = _requester.request(_url, | 202 var _response = _requester.request(_url, |
| 203 "POST", | 203 "POST", |
| 204 body: _body, | 204 body: _body, |
| 205 queryParams: _queryParams, | 205 queryParams: _queryParams, |
| 206 uploadOptions: _uploadOptions, | 206 uploadOptions: _uploadOptions, |
| 207 uploadMedia: _uploadMedia, | 207 uploadMedia: _uploadMedia, |
| 208 downloadOptions: _downloadOptions); | 208 downloadOptions: _downloadOptions); |
| 209 return _response.then((data) => new KeyRing.fromJson(data)); | 209 return _response.then((data) => new KeyRing.fromJson(data)); |
| 210 } | 210 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 230 var _queryParams = new core.Map(); | 230 var _queryParams = new core.Map(); |
| 231 var _uploadMedia = null; | 231 var _uploadMedia = null; |
| 232 var _uploadOptions = null; | 232 var _uploadOptions = null; |
| 233 var _downloadOptions = commons.DownloadOptions.Metadata; | 233 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 234 var _body = null; | 234 var _body = null; |
| 235 | 235 |
| 236 if (name == null) { | 236 if (name == null) { |
| 237 throw new core.ArgumentError("Parameter name is required."); | 237 throw new core.ArgumentError("Parameter name is required."); |
| 238 } | 238 } |
| 239 | 239 |
| 240 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 240 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 241 | 241 |
| 242 var _response = _requester.request(_url, | 242 var _response = _requester.request(_url, |
| 243 "GET", | 243 "GET", |
| 244 body: _body, | 244 body: _body, |
| 245 queryParams: _queryParams, | 245 queryParams: _queryParams, |
| 246 uploadOptions: _uploadOptions, | 246 uploadOptions: _uploadOptions, |
| 247 uploadMedia: _uploadMedia, | 247 uploadMedia: _uploadMedia, |
| 248 downloadOptions: _downloadOptions); | 248 downloadOptions: _downloadOptions); |
| 249 return _response.then((data) => new KeyRing.fromJson(data)); | 249 return _response.then((data) => new KeyRing.fromJson(data)); |
| 250 } | 250 } |
| 251 | 251 |
| 252 /** | 252 /** |
| 253 * Gets the access control policy for a resource. | 253 * Gets the access control policy for a resource. |
| 254 * Returns an empty policy if the resource exists and does not have a policy | 254 * Returns an empty policy if the resource exists and does not have a policy |
| 255 * set. | 255 * set. |
| 256 * | 256 * |
| 257 * Request parameters: | 257 * Request parameters: |
| 258 * | 258 * |
| 259 * [resource] - REQUIRED: The resource for which the policy is being | 259 * [resource] - REQUIRED: The resource for which the policy is being |
| 260 * requested. | 260 * requested. |
| 261 * `resource` is usually specified as a path. For example, a Project | 261 * See the operation documentation for the appropriate value for this field. |
| 262 * resource is specified as `projects/{project}`. | |
| 263 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". | 262 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". |
| 264 * | 263 * |
| 265 * Completes with a [Policy]. | 264 * Completes with a [Policy]. |
| 266 * | 265 * |
| 267 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 266 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 268 * error. | 267 * error. |
| 269 * | 268 * |
| 270 * If the used [http.Client] completes with an error when making a REST call, | 269 * If the used [http.Client] completes with an error when making a REST call, |
| 271 * this method will complete with the same error. | 270 * this method will complete with the same error. |
| 272 */ | 271 */ |
| 273 async.Future<Policy> getIamPolicy(core.String resource) { | 272 async.Future<Policy> getIamPolicy(core.String resource) { |
| 274 var _url = null; | 273 var _url = null; |
| 275 var _queryParams = new core.Map(); | 274 var _queryParams = new core.Map(); |
| 276 var _uploadMedia = null; | 275 var _uploadMedia = null; |
| 277 var _uploadOptions = null; | 276 var _uploadOptions = null; |
| 278 var _downloadOptions = commons.DownloadOptions.Metadata; | 277 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 279 var _body = null; | 278 var _body = null; |
| 280 | 279 |
| 281 if (resource == null) { | 280 if (resource == null) { |
| 282 throw new core.ArgumentError("Parameter resource is required."); | 281 throw new core.ArgumentError("Parameter resource is required."); |
| 283 } | 282 } |
| 284 | 283 |
| 285 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g
etIamPolicy'; | 284 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; |
| 286 | 285 |
| 287 var _response = _requester.request(_url, | 286 var _response = _requester.request(_url, |
| 288 "GET", | 287 "GET", |
| 289 body: _body, | 288 body: _body, |
| 290 queryParams: _queryParams, | 289 queryParams: _queryParams, |
| 291 uploadOptions: _uploadOptions, | 290 uploadOptions: _uploadOptions, |
| 292 uploadMedia: _uploadMedia, | 291 uploadMedia: _uploadMedia, |
| 293 downloadOptions: _downloadOptions); | 292 downloadOptions: _downloadOptions); |
| 294 return _response.then((data) => new Policy.fromJson(data)); | 293 return _response.then((data) => new Policy.fromJson(data)); |
| 295 } | 294 } |
| 296 | 295 |
| 297 /** | 296 /** |
| 298 * Lists KeyRings. | 297 * Lists KeyRings. |
| 299 * | 298 * |
| 300 * Request parameters: | 299 * Request parameters: |
| 301 * | 300 * |
| 302 * [parent] - Required. The resource name of the location associated with the | 301 * [parent] - Required. The resource name of the location associated with the |
| 303 * KeyRings, in the format `projects / * /locations / * `. | 302 * KeyRings, in the format `projects / * /locations / * `. |
| 304 * Value must have pattern "^projects/[^/]+/locations/[^/]+$". | 303 * Value must have pattern "^projects/[^/]+/locations/[^/]+$". |
| 305 * | 304 * |
| 306 * [pageToken] - Optional pagination token, returned earlier via | |
| 307 * ListKeyRingsResponse.next_page_token. | |
| 308 * | |
| 309 * [pageSize] - Optional limit on the number of KeyRings to include in the | 305 * [pageSize] - Optional limit on the number of KeyRings to include in the |
| 310 * response. Further KeyRings can subsequently be obtained by | 306 * response. Further KeyRings can subsequently be obtained by |
| 311 * including the ListKeyRingsResponse.next_page_token in a subsequent | 307 * including the ListKeyRingsResponse.next_page_token in a subsequent |
| 312 * request. If unspecified, the server will pick an appropriate default. | 308 * request. If unspecified, the server will pick an appropriate default. |
| 313 * | 309 * |
| 310 * [pageToken] - Optional pagination token, returned earlier via |
| 311 * ListKeyRingsResponse.next_page_token. |
| 312 * |
| 314 * Completes with a [ListKeyRingsResponse]. | 313 * Completes with a [ListKeyRingsResponse]. |
| 315 * | 314 * |
| 316 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 317 * error. | 316 * error. |
| 318 * | 317 * |
| 319 * 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, |
| 320 * this method will complete with the same error. | 319 * this method will complete with the same error. |
| 321 */ | 320 */ |
| 322 async.Future<ListKeyRingsResponse> list(core.String parent, {core.String pageT
oken, core.int pageSize}) { | 321 async.Future<ListKeyRingsResponse> list(core.String parent, {core.int pageSize
, core.String pageToken}) { |
| 323 var _url = null; | 322 var _url = null; |
| 324 var _queryParams = new core.Map(); | 323 var _queryParams = new core.Map(); |
| 325 var _uploadMedia = null; | 324 var _uploadMedia = null; |
| 326 var _uploadOptions = null; | 325 var _uploadOptions = null; |
| 327 var _downloadOptions = commons.DownloadOptions.Metadata; | 326 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 328 var _body = null; | 327 var _body = null; |
| 329 | 328 |
| 330 if (parent == null) { | 329 if (parent == null) { |
| 331 throw new core.ArgumentError("Parameter parent is required."); | 330 throw new core.ArgumentError("Parameter parent is required."); |
| 332 } | 331 } |
| 332 if (pageSize != null) { |
| 333 _queryParams["pageSize"] = ["${pageSize}"]; |
| 334 } |
| 333 if (pageToken != null) { | 335 if (pageToken != null) { |
| 334 _queryParams["pageToken"] = [pageToken]; | 336 _queryParams["pageToken"] = [pageToken]; |
| 335 } | 337 } |
| 336 if (pageSize != null) { | |
| 337 _queryParams["pageSize"] = ["${pageSize}"]; | |
| 338 } | |
| 339 | 338 |
| 340 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/key
Rings'; | 339 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings
'; |
| 341 | 340 |
| 342 var _response = _requester.request(_url, | 341 var _response = _requester.request(_url, |
| 343 "GET", | 342 "GET", |
| 344 body: _body, | 343 body: _body, |
| 345 queryParams: _queryParams, | 344 queryParams: _queryParams, |
| 346 uploadOptions: _uploadOptions, | 345 uploadOptions: _uploadOptions, |
| 347 uploadMedia: _uploadMedia, | 346 uploadMedia: _uploadMedia, |
| 348 downloadOptions: _downloadOptions); | 347 downloadOptions: _downloadOptions); |
| 349 return _response.then((data) => new ListKeyRingsResponse.fromJson(data)); | 348 return _response.then((data) => new ListKeyRingsResponse.fromJson(data)); |
| 350 } | 349 } |
| 351 | 350 |
| 352 /** | 351 /** |
| 353 * Sets the access control policy on the specified resource. Replaces any | 352 * Sets the access control policy on the specified resource. Replaces any |
| 354 * existing policy. | 353 * existing policy. |
| 355 * | 354 * |
| 356 * [request] - The metadata request object. | 355 * [request] - The metadata request object. |
| 357 * | 356 * |
| 358 * Request parameters: | 357 * Request parameters: |
| 359 * | 358 * |
| 360 * [resource] - REQUIRED: The resource for which the policy is being | 359 * [resource] - REQUIRED: The resource for which the policy is being |
| 361 * specified. | 360 * specified. |
| 362 * `resource` is usually specified as a path. For example, a Project | 361 * See the operation documentation for the appropriate value for this field. |
| 363 * resource is specified as `projects/{project}`. | |
| 364 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". | 362 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". |
| 365 * | 363 * |
| 366 * Completes with a [Policy]. | 364 * Completes with a [Policy]. |
| 367 * | 365 * |
| 368 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 369 * error. | 367 * error. |
| 370 * | 368 * |
| 371 * If the used [http.Client] completes with an error when making a REST call, | 369 * If the used [http.Client] completes with an error when making a REST call, |
| 372 * this method will complete with the same error. | 370 * this method will complete with the same error. |
| 373 */ | 371 */ |
| 374 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { | 372 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { |
| 375 var _url = null; | 373 var _url = null; |
| 376 var _queryParams = new core.Map(); | 374 var _queryParams = new core.Map(); |
| 377 var _uploadMedia = null; | 375 var _uploadMedia = null; |
| 378 var _uploadOptions = null; | 376 var _uploadOptions = null; |
| 379 var _downloadOptions = commons.DownloadOptions.Metadata; | 377 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 380 var _body = null; | 378 var _body = null; |
| 381 | 379 |
| 382 if (request != null) { | 380 if (request != null) { |
| 383 _body = convert.JSON.encode((request).toJson()); | 381 _body = convert.JSON.encode((request).toJson()); |
| 384 } | 382 } |
| 385 if (resource == null) { | 383 if (resource == null) { |
| 386 throw new core.ArgumentError("Parameter resource is required."); | 384 throw new core.ArgumentError("Parameter resource is required."); |
| 387 } | 385 } |
| 388 | 386 |
| 389 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s
etIamPolicy'; | 387 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam
Policy'; |
| 390 | 388 |
| 391 var _response = _requester.request(_url, | 389 var _response = _requester.request(_url, |
| 392 "POST", | 390 "POST", |
| 393 body: _body, | 391 body: _body, |
| 394 queryParams: _queryParams, | 392 queryParams: _queryParams, |
| 395 uploadOptions: _uploadOptions, | 393 uploadOptions: _uploadOptions, |
| 396 uploadMedia: _uploadMedia, | 394 uploadMedia: _uploadMedia, |
| 397 downloadOptions: _downloadOptions); | 395 downloadOptions: _downloadOptions); |
| 398 return _response.then((data) => new Policy.fromJson(data)); | 396 return _response.then((data) => new Policy.fromJson(data)); |
| 399 } | 397 } |
| 400 | 398 |
| 401 /** | 399 /** |
| 402 * Returns permissions that a caller has on the specified resource. | 400 * Returns permissions that a caller has on the specified resource. |
| 403 * If the resource does not exist, this will return an empty set of | 401 * If the resource does not exist, this will return an empty set of |
| 404 * permissions, not a NOT_FOUND error. | 402 * permissions, not a NOT_FOUND error. |
| 405 * | 403 * |
| 406 * Note: This operation is designed to be used for building permission-aware | 404 * Note: This operation is designed to be used for building permission-aware |
| 407 * UIs and command-line tools, not for authorization checking. This operation | 405 * UIs and command-line tools, not for authorization checking. This operation |
| 408 * may "fail open" without warning. | 406 * may "fail open" without warning. |
| 409 * | 407 * |
| 410 * [request] - The metadata request object. | 408 * [request] - The metadata request object. |
| 411 * | 409 * |
| 412 * Request parameters: | 410 * Request parameters: |
| 413 * | 411 * |
| 414 * [resource] - REQUIRED: The resource for which the policy detail is being | 412 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 415 * requested. | 413 * requested. |
| 416 * `resource` is usually specified as a path. For example, a Project | 414 * See the operation documentation for the appropriate value for this field. |
| 417 * resource is specified as `projects/{project}`. | |
| 418 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". | 415 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". |
| 419 * | 416 * |
| 420 * Completes with a [TestIamPermissionsResponse]. | 417 * Completes with a [TestIamPermissionsResponse]. |
| 421 * | 418 * |
| 422 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 419 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 423 * error. | 420 * error. |
| 424 * | 421 * |
| 425 * If the used [http.Client] completes with an error when making a REST call, | 422 * If the used [http.Client] completes with an error when making a REST call, |
| 426 * this method will complete with the same error. | 423 * this method will complete with the same error. |
| 427 */ | 424 */ |
| 428 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { | 425 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { |
| 429 var _url = null; | 426 var _url = null; |
| 430 var _queryParams = new core.Map(); | 427 var _queryParams = new core.Map(); |
| 431 var _uploadMedia = null; | 428 var _uploadMedia = null; |
| 432 var _uploadOptions = null; | 429 var _uploadOptions = null; |
| 433 var _downloadOptions = commons.DownloadOptions.Metadata; | 430 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 434 var _body = null; | 431 var _body = null; |
| 435 | 432 |
| 436 if (request != null) { | 433 if (request != null) { |
| 437 _body = convert.JSON.encode((request).toJson()); | 434 _body = convert.JSON.encode((request).toJson()); |
| 438 } | 435 } |
| 439 if (resource == null) { | 436 if (resource == null) { |
| 440 throw new core.ArgumentError("Parameter resource is required."); | 437 throw new core.ArgumentError("Parameter resource is required."); |
| 441 } | 438 } |
| 442 | 439 |
| 443 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':t
estIamPermissions'; | 440 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa
mPermissions'; |
| 444 | 441 |
| 445 var _response = _requester.request(_url, | 442 var _response = _requester.request(_url, |
| 446 "POST", | 443 "POST", |
| 447 body: _body, | 444 body: _body, |
| 448 queryParams: _queryParams, | 445 queryParams: _queryParams, |
| 449 uploadOptions: _uploadOptions, | 446 uploadOptions: _uploadOptions, |
| 450 uploadMedia: _uploadMedia, | 447 uploadMedia: _uploadMedia, |
| 451 downloadOptions: _downloadOptions); | 448 downloadOptions: _downloadOptions); |
| 452 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 449 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
| 453 } | 450 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 if (request != null) { | 496 if (request != null) { |
| 500 _body = convert.JSON.encode((request).toJson()); | 497 _body = convert.JSON.encode((request).toJson()); |
| 501 } | 498 } |
| 502 if (parent == null) { | 499 if (parent == null) { |
| 503 throw new core.ArgumentError("Parameter parent is required."); | 500 throw new core.ArgumentError("Parameter parent is required."); |
| 504 } | 501 } |
| 505 if (cryptoKeyId != null) { | 502 if (cryptoKeyId != null) { |
| 506 _queryParams["cryptoKeyId"] = [cryptoKeyId]; | 503 _queryParams["cryptoKeyId"] = [cryptoKeyId]; |
| 507 } | 504 } |
| 508 | 505 |
| 509 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cry
ptoKeys'; | 506 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
ys'; |
| 510 | 507 |
| 511 var _response = _requester.request(_url, | 508 var _response = _requester.request(_url, |
| 512 "POST", | 509 "POST", |
| 513 body: _body, | 510 body: _body, |
| 514 queryParams: _queryParams, | 511 queryParams: _queryParams, |
| 515 uploadOptions: _uploadOptions, | 512 uploadOptions: _uploadOptions, |
| 516 uploadMedia: _uploadMedia, | 513 uploadMedia: _uploadMedia, |
| 517 downloadOptions: _downloadOptions); | 514 downloadOptions: _downloadOptions); |
| 518 return _response.then((data) => new CryptoKey.fromJson(data)); | 515 return _response.then((data) => new CryptoKey.fromJson(data)); |
| 519 } | 516 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 547 var _downloadOptions = commons.DownloadOptions.Metadata; | 544 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 548 var _body = null; | 545 var _body = null; |
| 549 | 546 |
| 550 if (request != null) { | 547 if (request != null) { |
| 551 _body = convert.JSON.encode((request).toJson()); | 548 _body = convert.JSON.encode((request).toJson()); |
| 552 } | 549 } |
| 553 if (name == null) { | 550 if (name == null) { |
| 554 throw new core.ArgumentError("Parameter name is required."); | 551 throw new core.ArgumentError("Parameter name is required."); |
| 555 } | 552 } |
| 556 | 553 |
| 557 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':decry
pt'; | 554 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':decrypt'; |
| 558 | 555 |
| 559 var _response = _requester.request(_url, | 556 var _response = _requester.request(_url, |
| 560 "POST", | 557 "POST", |
| 561 body: _body, | 558 body: _body, |
| 562 queryParams: _queryParams, | 559 queryParams: _queryParams, |
| 563 uploadOptions: _uploadOptions, | 560 uploadOptions: _uploadOptions, |
| 564 uploadMedia: _uploadMedia, | 561 uploadMedia: _uploadMedia, |
| 565 downloadOptions: _downloadOptions); | 562 downloadOptions: _downloadOptions); |
| 566 return _response.then((data) => new DecryptResponse.fromJson(data)); | 563 return _response.then((data) => new DecryptResponse.fromJson(data)); |
| 567 } | 564 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 597 var _downloadOptions = commons.DownloadOptions.Metadata; | 594 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 598 var _body = null; | 595 var _body = null; |
| 599 | 596 |
| 600 if (request != null) { | 597 if (request != null) { |
| 601 _body = convert.JSON.encode((request).toJson()); | 598 _body = convert.JSON.encode((request).toJson()); |
| 602 } | 599 } |
| 603 if (name == null) { | 600 if (name == null) { |
| 604 throw new core.ArgumentError("Parameter name is required."); | 601 throw new core.ArgumentError("Parameter name is required."); |
| 605 } | 602 } |
| 606 | 603 |
| 607 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':encry
pt'; | 604 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':encrypt'; |
| 608 | 605 |
| 609 var _response = _requester.request(_url, | 606 var _response = _requester.request(_url, |
| 610 "POST", | 607 "POST", |
| 611 body: _body, | 608 body: _body, |
| 612 queryParams: _queryParams, | 609 queryParams: _queryParams, |
| 613 uploadOptions: _uploadOptions, | 610 uploadOptions: _uploadOptions, |
| 614 uploadMedia: _uploadMedia, | 611 uploadMedia: _uploadMedia, |
| 615 downloadOptions: _downloadOptions); | 612 downloadOptions: _downloadOptions); |
| 616 return _response.then((data) => new EncryptResponse.fromJson(data)); | 613 return _response.then((data) => new EncryptResponse.fromJson(data)); |
| 617 } | 614 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 639 var _queryParams = new core.Map(); | 636 var _queryParams = new core.Map(); |
| 640 var _uploadMedia = null; | 637 var _uploadMedia = null; |
| 641 var _uploadOptions = null; | 638 var _uploadOptions = null; |
| 642 var _downloadOptions = commons.DownloadOptions.Metadata; | 639 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 643 var _body = null; | 640 var _body = null; |
| 644 | 641 |
| 645 if (name == null) { | 642 if (name == null) { |
| 646 throw new core.ArgumentError("Parameter name is required."); | 643 throw new core.ArgumentError("Parameter name is required."); |
| 647 } | 644 } |
| 648 | 645 |
| 649 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 646 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 650 | 647 |
| 651 var _response = _requester.request(_url, | 648 var _response = _requester.request(_url, |
| 652 "GET", | 649 "GET", |
| 653 body: _body, | 650 body: _body, |
| 654 queryParams: _queryParams, | 651 queryParams: _queryParams, |
| 655 uploadOptions: _uploadOptions, | 652 uploadOptions: _uploadOptions, |
| 656 uploadMedia: _uploadMedia, | 653 uploadMedia: _uploadMedia, |
| 657 downloadOptions: _downloadOptions); | 654 downloadOptions: _downloadOptions); |
| 658 return _response.then((data) => new CryptoKey.fromJson(data)); | 655 return _response.then((data) => new CryptoKey.fromJson(data)); |
| 659 } | 656 } |
| 660 | 657 |
| 661 /** | 658 /** |
| 662 * Gets the access control policy for a resource. | 659 * Gets the access control policy for a resource. |
| 663 * Returns an empty policy if the resource exists and does not have a policy | 660 * Returns an empty policy if the resource exists and does not have a policy |
| 664 * set. | 661 * set. |
| 665 * | 662 * |
| 666 * Request parameters: | 663 * Request parameters: |
| 667 * | 664 * |
| 668 * [resource] - REQUIRED: The resource for which the policy is being | 665 * [resource] - REQUIRED: The resource for which the policy is being |
| 669 * requested. | 666 * requested. |
| 670 * `resource` is usually specified as a path. For example, a Project | 667 * See the operation documentation for the appropriate value for this field. |
| 671 * resource is specified as `projects/{project}`. | |
| 672 * Value must have pattern | 668 * Value must have pattern |
| 673 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". | 669 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". |
| 674 * | 670 * |
| 675 * Completes with a [Policy]. | 671 * Completes with a [Policy]. |
| 676 * | 672 * |
| 677 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 673 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 678 * error. | 674 * error. |
| 679 * | 675 * |
| 680 * If the used [http.Client] completes with an error when making a REST call, | 676 * If the used [http.Client] completes with an error when making a REST call, |
| 681 * this method will complete with the same error. | 677 * this method will complete with the same error. |
| 682 */ | 678 */ |
| 683 async.Future<Policy> getIamPolicy(core.String resource) { | 679 async.Future<Policy> getIamPolicy(core.String resource) { |
| 684 var _url = null; | 680 var _url = null; |
| 685 var _queryParams = new core.Map(); | 681 var _queryParams = new core.Map(); |
| 686 var _uploadMedia = null; | 682 var _uploadMedia = null; |
| 687 var _uploadOptions = null; | 683 var _uploadOptions = null; |
| 688 var _downloadOptions = commons.DownloadOptions.Metadata; | 684 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 689 var _body = null; | 685 var _body = null; |
| 690 | 686 |
| 691 if (resource == null) { | 687 if (resource == null) { |
| 692 throw new core.ArgumentError("Parameter resource is required."); | 688 throw new core.ArgumentError("Parameter resource is required."); |
| 693 } | 689 } |
| 694 | 690 |
| 695 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g
etIamPolicy'; | 691 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; |
| 696 | 692 |
| 697 var _response = _requester.request(_url, | 693 var _response = _requester.request(_url, |
| 698 "GET", | 694 "GET", |
| 699 body: _body, | 695 body: _body, |
| 700 queryParams: _queryParams, | 696 queryParams: _queryParams, |
| 701 uploadOptions: _uploadOptions, | 697 uploadOptions: _uploadOptions, |
| 702 uploadMedia: _uploadMedia, | 698 uploadMedia: _uploadMedia, |
| 703 downloadOptions: _downloadOptions); | 699 downloadOptions: _downloadOptions); |
| 704 return _response.then((data) => new Policy.fromJson(data)); | 700 return _response.then((data) => new Policy.fromJson(data)); |
| 705 } | 701 } |
| 706 | 702 |
| 707 /** | 703 /** |
| 708 * Lists CryptoKeys. | 704 * Lists CryptoKeys. |
| 709 * | 705 * |
| 710 * Request parameters: | 706 * Request parameters: |
| 711 * | 707 * |
| 712 * [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 |
| 713 * format | 709 * format |
| 714 * `projects / * /locations / * /keyRings / * `. | 710 * `projects / * /locations / * /keyRings / * `. |
| 715 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". | 711 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". |
| 716 * | 712 * |
| 717 * [pageToken] - Optional pagination token, returned earlier via | |
| 718 * ListCryptoKeysResponse.next_page_token. | |
| 719 * | |
| 720 * [pageSize] - Optional limit on the number of CryptoKeys to include in the | 713 * [pageSize] - Optional limit on the number of CryptoKeys to include in the |
| 721 * response. Further CryptoKeys can subsequently be obtained by | 714 * response. Further CryptoKeys can subsequently be obtained by |
| 722 * including the ListCryptoKeysResponse.next_page_token in a subsequent | 715 * including the ListCryptoKeysResponse.next_page_token in a subsequent |
| 723 * request. If unspecified, the server will pick an appropriate default. | 716 * request. If unspecified, the server will pick an appropriate default. |
| 724 * | 717 * |
| 718 * [pageToken] - Optional pagination token, returned earlier via |
| 719 * ListCryptoKeysResponse.next_page_token. |
| 720 * |
| 725 * Completes with a [ListCryptoKeysResponse]. | 721 * Completes with a [ListCryptoKeysResponse]. |
| 726 * | 722 * |
| 727 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 723 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 728 * error. | 724 * error. |
| 729 * | 725 * |
| 730 * 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, |
| 731 * this method will complete with the same error. | 727 * this method will complete with the same error. |
| 732 */ | 728 */ |
| 733 async.Future<ListCryptoKeysResponse> list(core.String parent, {core.String pag
eToken, core.int pageSize}) { | 729 async.Future<ListCryptoKeysResponse> list(core.String parent, {core.int pageSi
ze, core.String pageToken}) { |
| 734 var _url = null; | 730 var _url = null; |
| 735 var _queryParams = new core.Map(); | 731 var _queryParams = new core.Map(); |
| 736 var _uploadMedia = null; | 732 var _uploadMedia = null; |
| 737 var _uploadOptions = null; | 733 var _uploadOptions = null; |
| 738 var _downloadOptions = commons.DownloadOptions.Metadata; | 734 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 739 var _body = null; | 735 var _body = null; |
| 740 | 736 |
| 741 if (parent == null) { | 737 if (parent == null) { |
| 742 throw new core.ArgumentError("Parameter parent is required."); | 738 throw new core.ArgumentError("Parameter parent is required."); |
| 743 } | 739 } |
| 740 if (pageSize != null) { |
| 741 _queryParams["pageSize"] = ["${pageSize}"]; |
| 742 } |
| 744 if (pageToken != null) { | 743 if (pageToken != null) { |
| 745 _queryParams["pageToken"] = [pageToken]; | 744 _queryParams["pageToken"] = [pageToken]; |
| 746 } | 745 } |
| 747 if (pageSize != null) { | |
| 748 _queryParams["pageSize"] = ["${pageSize}"]; | |
| 749 } | |
| 750 | 746 |
| 751 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cry
ptoKeys'; | 747 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
ys'; |
| 752 | 748 |
| 753 var _response = _requester.request(_url, | 749 var _response = _requester.request(_url, |
| 754 "GET", | 750 "GET", |
| 755 body: _body, | 751 body: _body, |
| 756 queryParams: _queryParams, | 752 queryParams: _queryParams, |
| 757 uploadOptions: _uploadOptions, | 753 uploadOptions: _uploadOptions, |
| 758 uploadMedia: _uploadMedia, | 754 uploadMedia: _uploadMedia, |
| 759 downloadOptions: _downloadOptions); | 755 downloadOptions: _downloadOptions); |
| 760 return _response.then((data) => new ListCryptoKeysResponse.fromJson(data)); | 756 return _response.then((data) => new ListCryptoKeysResponse.fromJson(data)); |
| 761 } | 757 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 if (request != null) { | 789 if (request != null) { |
| 794 _body = convert.JSON.encode((request).toJson()); | 790 _body = convert.JSON.encode((request).toJson()); |
| 795 } | 791 } |
| 796 if (name == null) { | 792 if (name == null) { |
| 797 throw new core.ArgumentError("Parameter name is required."); | 793 throw new core.ArgumentError("Parameter name is required."); |
| 798 } | 794 } |
| 799 if (updateMask != null) { | 795 if (updateMask != null) { |
| 800 _queryParams["updateMask"] = [updateMask]; | 796 _queryParams["updateMask"] = [updateMask]; |
| 801 } | 797 } |
| 802 | 798 |
| 803 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 799 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 804 | 800 |
| 805 var _response = _requester.request(_url, | 801 var _response = _requester.request(_url, |
| 806 "PATCH", | 802 "PATCH", |
| 807 body: _body, | 803 body: _body, |
| 808 queryParams: _queryParams, | 804 queryParams: _queryParams, |
| 809 uploadOptions: _uploadOptions, | 805 uploadOptions: _uploadOptions, |
| 810 uploadMedia: _uploadMedia, | 806 uploadMedia: _uploadMedia, |
| 811 downloadOptions: _downloadOptions); | 807 downloadOptions: _downloadOptions); |
| 812 return _response.then((data) => new CryptoKey.fromJson(data)); | 808 return _response.then((data) => new CryptoKey.fromJson(data)); |
| 813 } | 809 } |
| 814 | 810 |
| 815 /** | 811 /** |
| 816 * Sets the access control policy on the specified resource. Replaces any | 812 * Sets the access control policy on the specified resource. Replaces any |
| 817 * existing policy. | 813 * existing policy. |
| 818 * | 814 * |
| 819 * [request] - The metadata request object. | 815 * [request] - The metadata request object. |
| 820 * | 816 * |
| 821 * Request parameters: | 817 * Request parameters: |
| 822 * | 818 * |
| 823 * [resource] - REQUIRED: The resource for which the policy is being | 819 * [resource] - REQUIRED: The resource for which the policy is being |
| 824 * specified. | 820 * specified. |
| 825 * `resource` is usually specified as a path. For example, a Project | 821 * See the operation documentation for the appropriate value for this field. |
| 826 * resource is specified as `projects/{project}`. | |
| 827 * Value must have pattern | 822 * Value must have pattern |
| 828 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". | 823 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". |
| 829 * | 824 * |
| 830 * Completes with a [Policy]. | 825 * Completes with a [Policy]. |
| 831 * | 826 * |
| 832 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 827 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 833 * error. | 828 * error. |
| 834 * | 829 * |
| 835 * If the used [http.Client] completes with an error when making a REST call, | 830 * If the used [http.Client] completes with an error when making a REST call, |
| 836 * this method will complete with the same error. | 831 * this method will complete with the same error. |
| 837 */ | 832 */ |
| 838 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { | 833 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { |
| 839 var _url = null; | 834 var _url = null; |
| 840 var _queryParams = new core.Map(); | 835 var _queryParams = new core.Map(); |
| 841 var _uploadMedia = null; | 836 var _uploadMedia = null; |
| 842 var _uploadOptions = null; | 837 var _uploadOptions = null; |
| 843 var _downloadOptions = commons.DownloadOptions.Metadata; | 838 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 844 var _body = null; | 839 var _body = null; |
| 845 | 840 |
| 846 if (request != null) { | 841 if (request != null) { |
| 847 _body = convert.JSON.encode((request).toJson()); | 842 _body = convert.JSON.encode((request).toJson()); |
| 848 } | 843 } |
| 849 if (resource == null) { | 844 if (resource == null) { |
| 850 throw new core.ArgumentError("Parameter resource is required."); | 845 throw new core.ArgumentError("Parameter resource is required."); |
| 851 } | 846 } |
| 852 | 847 |
| 853 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s
etIamPolicy'; | 848 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam
Policy'; |
| 854 | 849 |
| 855 var _response = _requester.request(_url, | 850 var _response = _requester.request(_url, |
| 856 "POST", | 851 "POST", |
| 857 body: _body, | 852 body: _body, |
| 858 queryParams: _queryParams, | 853 queryParams: _queryParams, |
| 859 uploadOptions: _uploadOptions, | 854 uploadOptions: _uploadOptions, |
| 860 uploadMedia: _uploadMedia, | 855 uploadMedia: _uploadMedia, |
| 861 downloadOptions: _downloadOptions); | 856 downloadOptions: _downloadOptions); |
| 862 return _response.then((data) => new Policy.fromJson(data)); | 857 return _response.then((data) => new Policy.fromJson(data)); |
| 863 } | 858 } |
| 864 | 859 |
| 865 /** | 860 /** |
| 866 * Returns permissions that a caller has on the specified resource. | 861 * Returns permissions that a caller has on the specified resource. |
| 867 * If the resource does not exist, this will return an empty set of | 862 * If the resource does not exist, this will return an empty set of |
| 868 * permissions, not a NOT_FOUND error. | 863 * permissions, not a NOT_FOUND error. |
| 869 * | 864 * |
| 870 * Note: This operation is designed to be used for building permission-aware | 865 * Note: This operation is designed to be used for building permission-aware |
| 871 * UIs and command-line tools, not for authorization checking. This operation | 866 * UIs and command-line tools, not for authorization checking. This operation |
| 872 * may "fail open" without warning. | 867 * may "fail open" without warning. |
| 873 * | 868 * |
| 874 * [request] - The metadata request object. | 869 * [request] - The metadata request object. |
| 875 * | 870 * |
| 876 * Request parameters: | 871 * Request parameters: |
| 877 * | 872 * |
| 878 * [resource] - REQUIRED: The resource for which the policy detail is being | 873 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 879 * requested. | 874 * requested. |
| 880 * `resource` is usually specified as a path. For example, a Project | 875 * See the operation documentation for the appropriate value for this field. |
| 881 * resource is specified as `projects/{project}`. | |
| 882 * Value must have pattern | 876 * Value must have pattern |
| 883 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". | 877 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". |
| 884 * | 878 * |
| 885 * Completes with a [TestIamPermissionsResponse]. | 879 * Completes with a [TestIamPermissionsResponse]. |
| 886 * | 880 * |
| 887 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 881 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 888 * error. | 882 * error. |
| 889 * | 883 * |
| 890 * If the used [http.Client] completes with an error when making a REST call, | 884 * If the used [http.Client] completes with an error when making a REST call, |
| 891 * this method will complete with the same error. | 885 * this method will complete with the same error. |
| 892 */ | 886 */ |
| 893 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { | 887 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { |
| 894 var _url = null; | 888 var _url = null; |
| 895 var _queryParams = new core.Map(); | 889 var _queryParams = new core.Map(); |
| 896 var _uploadMedia = null; | 890 var _uploadMedia = null; |
| 897 var _uploadOptions = null; | 891 var _uploadOptions = null; |
| 898 var _downloadOptions = commons.DownloadOptions.Metadata; | 892 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 899 var _body = null; | 893 var _body = null; |
| 900 | 894 |
| 901 if (request != null) { | 895 if (request != null) { |
| 902 _body = convert.JSON.encode((request).toJson()); | 896 _body = convert.JSON.encode((request).toJson()); |
| 903 } | 897 } |
| 904 if (resource == null) { | 898 if (resource == null) { |
| 905 throw new core.ArgumentError("Parameter resource is required."); | 899 throw new core.ArgumentError("Parameter resource is required."); |
| 906 } | 900 } |
| 907 | 901 |
| 908 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':t
estIamPermissions'; | 902 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa
mPermissions'; |
| 909 | 903 |
| 910 var _response = _requester.request(_url, | 904 var _response = _requester.request(_url, |
| 911 "POST", | 905 "POST", |
| 912 body: _body, | 906 body: _body, |
| 913 queryParams: _queryParams, | 907 queryParams: _queryParams, |
| 914 uploadOptions: _uploadOptions, | 908 uploadOptions: _uploadOptions, |
| 915 uploadMedia: _uploadMedia, | 909 uploadMedia: _uploadMedia, |
| 916 downloadOptions: _downloadOptions); | 910 downloadOptions: _downloadOptions); |
| 917 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 911 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
| 918 } | 912 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 944 var _downloadOptions = commons.DownloadOptions.Metadata; | 938 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 945 var _body = null; | 939 var _body = null; |
| 946 | 940 |
| 947 if (request != null) { | 941 if (request != null) { |
| 948 _body = convert.JSON.encode((request).toJson()); | 942 _body = convert.JSON.encode((request).toJson()); |
| 949 } | 943 } |
| 950 if (name == null) { | 944 if (name == null) { |
| 951 throw new core.ArgumentError("Parameter name is required."); | 945 throw new core.ArgumentError("Parameter name is required."); |
| 952 } | 946 } |
| 953 | 947 |
| 954 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':updat
ePrimaryVersion'; | 948 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':updatePrim
aryVersion'; |
| 955 | 949 |
| 956 var _response = _requester.request(_url, | 950 var _response = _requester.request(_url, |
| 957 "POST", | 951 "POST", |
| 958 body: _body, | 952 body: _body, |
| 959 queryParams: _queryParams, | 953 queryParams: _queryParams, |
| 960 uploadOptions: _uploadOptions, | 954 uploadOptions: _uploadOptions, |
| 961 uploadMedia: _uploadMedia, | 955 uploadMedia: _uploadMedia, |
| 962 downloadOptions: _downloadOptions); | 956 downloadOptions: _downloadOptions); |
| 963 return _response.then((data) => new CryptoKey.fromJson(data)); | 957 return _response.then((data) => new CryptoKey.fromJson(data)); |
| 964 } | 958 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 var _downloadOptions = commons.DownloadOptions.Metadata; | 998 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1005 var _body = null; | 999 var _body = null; |
| 1006 | 1000 |
| 1007 if (request != null) { | 1001 if (request != null) { |
| 1008 _body = convert.JSON.encode((request).toJson()); | 1002 _body = convert.JSON.encode((request).toJson()); |
| 1009 } | 1003 } |
| 1010 if (parent == null) { | 1004 if (parent == null) { |
| 1011 throw new core.ArgumentError("Parameter parent is required."); | 1005 throw new core.ArgumentError("Parameter parent is required."); |
| 1012 } | 1006 } |
| 1013 | 1007 |
| 1014 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cry
ptoKeyVersions'; | 1008 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
yVersions'; |
| 1015 | 1009 |
| 1016 var _response = _requester.request(_url, | 1010 var _response = _requester.request(_url, |
| 1017 "POST", | 1011 "POST", |
| 1018 body: _body, | 1012 body: _body, |
| 1019 queryParams: _queryParams, | 1013 queryParams: _queryParams, |
| 1020 uploadOptions: _uploadOptions, | 1014 uploadOptions: _uploadOptions, |
| 1021 uploadMedia: _uploadMedia, | 1015 uploadMedia: _uploadMedia, |
| 1022 downloadOptions: _downloadOptions); | 1016 downloadOptions: _downloadOptions); |
| 1023 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); | 1017 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); |
| 1024 } | 1018 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 var _downloadOptions = commons.DownloadOptions.Metadata; | 1055 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1062 var _body = null; | 1056 var _body = null; |
| 1063 | 1057 |
| 1064 if (request != null) { | 1058 if (request != null) { |
| 1065 _body = convert.JSON.encode((request).toJson()); | 1059 _body = convert.JSON.encode((request).toJson()); |
| 1066 } | 1060 } |
| 1067 if (name == null) { | 1061 if (name == null) { |
| 1068 throw new core.ArgumentError("Parameter name is required."); | 1062 throw new core.ArgumentError("Parameter name is required."); |
| 1069 } | 1063 } |
| 1070 | 1064 |
| 1071 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':destr
oy'; | 1065 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':destroy'; |
| 1072 | 1066 |
| 1073 var _response = _requester.request(_url, | 1067 var _response = _requester.request(_url, |
| 1074 "POST", | 1068 "POST", |
| 1075 body: _body, | 1069 body: _body, |
| 1076 queryParams: _queryParams, | 1070 queryParams: _queryParams, |
| 1077 uploadOptions: _uploadOptions, | 1071 uploadOptions: _uploadOptions, |
| 1078 uploadMedia: _uploadMedia, | 1072 uploadMedia: _uploadMedia, |
| 1079 downloadOptions: _downloadOptions); | 1073 downloadOptions: _downloadOptions); |
| 1080 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); | 1074 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); |
| 1081 } | 1075 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1102 var _queryParams = new core.Map(); | 1096 var _queryParams = new core.Map(); |
| 1103 var _uploadMedia = null; | 1097 var _uploadMedia = null; |
| 1104 var _uploadOptions = null; | 1098 var _uploadOptions = null; |
| 1105 var _downloadOptions = commons.DownloadOptions.Metadata; | 1099 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1106 var _body = null; | 1100 var _body = null; |
| 1107 | 1101 |
| 1108 if (name == null) { | 1102 if (name == null) { |
| 1109 throw new core.ArgumentError("Parameter name is required."); | 1103 throw new core.ArgumentError("Parameter name is required."); |
| 1110 } | 1104 } |
| 1111 | 1105 |
| 1112 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 1106 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1113 | 1107 |
| 1114 var _response = _requester.request(_url, | 1108 var _response = _requester.request(_url, |
| 1115 "GET", | 1109 "GET", |
| 1116 body: _body, | 1110 body: _body, |
| 1117 queryParams: _queryParams, | 1111 queryParams: _queryParams, |
| 1118 uploadOptions: _uploadOptions, | 1112 uploadOptions: _uploadOptions, |
| 1119 uploadMedia: _uploadMedia, | 1113 uploadMedia: _uploadMedia, |
| 1120 downloadOptions: _downloadOptions); | 1114 downloadOptions: _downloadOptions); |
| 1121 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); | 1115 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); |
| 1122 } | 1116 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 if (parent == null) { | 1154 if (parent == null) { |
| 1161 throw new core.ArgumentError("Parameter parent is required."); | 1155 throw new core.ArgumentError("Parameter parent is required."); |
| 1162 } | 1156 } |
| 1163 if (pageToken != null) { | 1157 if (pageToken != null) { |
| 1164 _queryParams["pageToken"] = [pageToken]; | 1158 _queryParams["pageToken"] = [pageToken]; |
| 1165 } | 1159 } |
| 1166 if (pageSize != null) { | 1160 if (pageSize != null) { |
| 1167 _queryParams["pageSize"] = ["${pageSize}"]; | 1161 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1168 } | 1162 } |
| 1169 | 1163 |
| 1170 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cry
ptoKeyVersions'; | 1164 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe
yVersions'; |
| 1171 | 1165 |
| 1172 var _response = _requester.request(_url, | 1166 var _response = _requester.request(_url, |
| 1173 "GET", | 1167 "GET", |
| 1174 body: _body, | 1168 body: _body, |
| 1175 queryParams: _queryParams, | 1169 queryParams: _queryParams, |
| 1176 uploadOptions: _uploadOptions, | 1170 uploadOptions: _uploadOptions, |
| 1177 uploadMedia: _uploadMedia, | 1171 uploadMedia: _uploadMedia, |
| 1178 downloadOptions: _downloadOptions); | 1172 downloadOptions: _downloadOptions); |
| 1179 return _response.then((data) => new ListCryptoKeyVersionsResponse.fromJson(d
ata)); | 1173 return _response.then((data) => new ListCryptoKeyVersionsResponse.fromJson(d
ata)); |
| 1180 } | 1174 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 if (request != null) { | 1214 if (request != null) { |
| 1221 _body = convert.JSON.encode((request).toJson()); | 1215 _body = convert.JSON.encode((request).toJson()); |
| 1222 } | 1216 } |
| 1223 if (name == null) { | 1217 if (name == null) { |
| 1224 throw new core.ArgumentError("Parameter name is required."); | 1218 throw new core.ArgumentError("Parameter name is required."); |
| 1225 } | 1219 } |
| 1226 if (updateMask != null) { | 1220 if (updateMask != null) { |
| 1227 _queryParams["updateMask"] = [updateMask]; | 1221 _queryParams["updateMask"] = [updateMask]; |
| 1228 } | 1222 } |
| 1229 | 1223 |
| 1230 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 1224 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1231 | 1225 |
| 1232 var _response = _requester.request(_url, | 1226 var _response = _requester.request(_url, |
| 1233 "PATCH", | 1227 "PATCH", |
| 1234 body: _body, | 1228 body: _body, |
| 1235 queryParams: _queryParams, | 1229 queryParams: _queryParams, |
| 1236 uploadOptions: _uploadOptions, | 1230 uploadOptions: _uploadOptions, |
| 1237 uploadMedia: _uploadMedia, | 1231 uploadMedia: _uploadMedia, |
| 1238 downloadOptions: _downloadOptions); | 1232 downloadOptions: _downloadOptions); |
| 1239 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); | 1233 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); |
| 1240 } | 1234 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 var _downloadOptions = commons.DownloadOptions.Metadata; | 1266 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1273 var _body = null; | 1267 var _body = null; |
| 1274 | 1268 |
| 1275 if (request != null) { | 1269 if (request != null) { |
| 1276 _body = convert.JSON.encode((request).toJson()); | 1270 _body = convert.JSON.encode((request).toJson()); |
| 1277 } | 1271 } |
| 1278 if (name == null) { | 1272 if (name == null) { |
| 1279 throw new core.ArgumentError("Parameter name is required."); | 1273 throw new core.ArgumentError("Parameter name is required."); |
| 1280 } | 1274 } |
| 1281 | 1275 |
| 1282 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':resto
re'; | 1276 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':restore'; |
| 1283 | 1277 |
| 1284 var _response = _requester.request(_url, | 1278 var _response = _requester.request(_url, |
| 1285 "POST", | 1279 "POST", |
| 1286 body: _body, | 1280 body: _body, |
| 1287 queryParams: _queryParams, | 1281 queryParams: _queryParams, |
| 1288 uploadOptions: _uploadOptions, | 1282 uploadOptions: _uploadOptions, |
| 1289 uploadMedia: _uploadMedia, | 1283 uploadMedia: _uploadMedia, |
| 1290 downloadOptions: _downloadOptions); | 1284 downloadOptions: _downloadOptions); |
| 1291 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); | 1285 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); |
| 1292 } | 1286 } |
| 1293 | 1287 |
| 1294 } | 1288 } |
| 1295 | 1289 |
| 1296 | 1290 |
| 1297 | 1291 |
| 1298 /** | 1292 /** |
| 1299 * Specifies the audit configuration for a service. | 1293 * Specifies the audit configuration for a service. |
| 1300 * It consists of which permission types are logged, and what identities, if | 1294 * The configuration determines which permission types are logged, and what |
| 1301 * any, are exempted from logging. | 1295 * identities, if any, are exempted from logging. |
| 1302 * An AuditConifg must have one or more AuditLogConfigs. | 1296 * An AuditConifg must have one or more AuditLogConfigs. |
| 1303 * | 1297 * |
| 1304 * If there are AuditConfigs for both `allServices` and a specific service, | 1298 * If there are AuditConfigs for both `allServices` and a specific service, |
| 1305 * 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 |
| 1306 * 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 |
| 1307 * AuditConfig are exempted. | 1301 * AuditConfig are exempted. |
| 1308 * Example Policy with multiple AuditConfigs: | 1302 * Example Policy with multiple AuditConfigs: |
| 1309 * { | 1303 * { |
| 1310 * "audit_configs": [ | 1304 * "audit_configs": [ |
| 1311 * { | 1305 * { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 */ | 1341 */ |
| 1348 class AuditConfig { | 1342 class AuditConfig { |
| 1349 /** | 1343 /** |
| 1350 * The configuration for logging of each type of permission. | 1344 * The configuration for logging of each type of permission. |
| 1351 * Next ID: 4 | 1345 * Next ID: 4 |
| 1352 */ | 1346 */ |
| 1353 core.List<AuditLogConfig> auditLogConfigs; | 1347 core.List<AuditLogConfig> auditLogConfigs; |
| 1354 core.List<core.String> exemptedMembers; | 1348 core.List<core.String> exemptedMembers; |
| 1355 /** | 1349 /** |
| 1356 * Specifies a service that will be enabled for audit logging. | 1350 * Specifies a service that will be enabled for audit logging. |
| 1357 * For example, `resourcemanager`, `storage`, `compute`. | 1351 * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 1358 * `allServices` is a special value that covers all services. | 1352 * `allServices` is a special value that covers all services. |
| 1359 */ | 1353 */ |
| 1360 core.String service; | 1354 core.String service; |
| 1361 | 1355 |
| 1362 AuditConfig(); | 1356 AuditConfig(); |
| 1363 | 1357 |
| 1364 AuditConfig.fromJson(core.Map _json) { | 1358 AuditConfig.fromJson(core.Map _json) { |
| 1365 if (_json.containsKey("auditLogConfigs")) { | 1359 if (_json.containsKey("auditLogConfigs")) { |
| 1366 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf
ig.fromJson(value)).toList(); | 1360 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf
ig.fromJson(value)).toList(); |
| 1367 } | 1361 } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 * must only be used for attribution, not authorization. | 1525 * must only be used for attribution, not authorization. |
| 1532 * - "APPROVER" : An approver (distinct from the requester) that has | 1526 * - "APPROVER" : An approver (distinct from the requester) that has |
| 1533 * authorized this | 1527 * authorized this |
| 1534 * request. | 1528 * request. |
| 1535 * When used with IN, the condition indicates that one of the approvers | 1529 * When used with IN, the condition indicates that one of the approvers |
| 1536 * associated with the request matches the specified principal, or is a | 1530 * associated with the request matches the specified principal, or is a |
| 1537 * member of the specified group. Approvers can only grant additional | 1531 * member of the specified group. Approvers can only grant additional |
| 1538 * access, and are thus only used in a strictly positive context | 1532 * access, and are thus only used in a strictly positive context |
| 1539 * (e.g. ALLOW/IN or DENY/NOT_IN). | 1533 * (e.g. ALLOW/IN or DENY/NOT_IN). |
| 1540 * See: go/rpc-security-policy-dynamicauth. | 1534 * See: go/rpc-security-policy-dynamicauth. |
| 1535 * - "JUSTIFICATION_TYPE" : What types of justifications have been supplied |
| 1536 * with this request. |
| 1537 * String values should match enum names from tech.iam.JustificationType, |
| 1538 * e.g. "MANUAL_STRING". It is not permitted to grant access based on |
| 1539 * the *absence* of a justification, so justification conditions can only |
| 1540 * be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). |
| 1541 * |
| 1542 * Multiple justifications, e.g., a Buganizer ID and a manually-entered |
| 1543 * reason, are normal and supported. |
| 1541 */ | 1544 */ |
| 1542 core.String iam; | 1545 core.String iam; |
| 1543 /** | 1546 /** |
| 1544 * An operator to apply the subject with. | 1547 * An operator to apply the subject with. |
| 1545 * Possible string values are: | 1548 * Possible string values are: |
| 1546 * - "NO_OP" : Default no-op. | 1549 * - "NO_OP" : Default no-op. |
| 1547 * - "EQUALS" : DEPRECATED. Use IN instead. | 1550 * - "EQUALS" : DEPRECATED. Use IN instead. |
| 1548 * - "NOT_EQUALS" : DEPRECATED. Use NOT_IN instead. | 1551 * - "NOT_EQUALS" : DEPRECATED. Use NOT_IN instead. |
| 1549 * - "IN" : Set-inclusion check. | 1552 * - "IN" : The condition is true if the subject (or any element of it if it |
| 1550 * - "NOT_IN" : Set-exclusion check. | 1553 * is |
| 1554 * a set) matches any of the supplied values. |
| 1555 * - "NOT_IN" : The condition is true if the subject (or every element of it |
| 1556 * if it is |
| 1557 * a set) matches none of the supplied values. |
| 1551 * - "DISCHARGED" : Subject is discharged | 1558 * - "DISCHARGED" : Subject is discharged |
| 1552 */ | 1559 */ |
| 1553 core.String op; | 1560 core.String op; |
| 1554 /** Trusted attributes discharged by the service. */ | 1561 /** Trusted attributes discharged by the service. */ |
| 1555 core.String svc; | 1562 core.String svc; |
| 1556 /** | 1563 /** |
| 1557 * Trusted attributes supplied by any service that owns resources and uses | 1564 * Trusted attributes supplied by any service that owns resources and uses |
| 1558 * the IAM system for access control. | 1565 * the IAM system for access control. |
| 1559 * Possible string values are: | 1566 * Possible string values are: |
| 1560 * - "NO_ATTR" : Default non-attribute type | 1567 * - "NO_ATTR" : Default non-attribute type |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 if (metadata != null) { | 2278 if (metadata != null) { |
| 2272 _json["metadata"] = metadata; | 2279 _json["metadata"] = metadata; |
| 2273 } | 2280 } |
| 2274 if (name != null) { | 2281 if (name != null) { |
| 2275 _json["name"] = name; | 2282 _json["name"] = name; |
| 2276 } | 2283 } |
| 2277 return _json; | 2284 return _json; |
| 2278 } | 2285 } |
| 2279 } | 2286 } |
| 2280 | 2287 |
| 2281 /** | 2288 /** Specifies what kind of log the caller must write */ |
| 2282 * Specifies what kind of log the caller must write | |
| 2283 * Increment a streamz counter with the specified metric and field names. | |
| 2284 * | |
| 2285 * Metric names should start with a '/', generally be lowercase-only, | |
| 2286 * and end in "_count". Field names should not contain an initial slash. | |
| 2287 * The actual exported metric names will have "/iam/policy" prepended. | |
| 2288 * | |
| 2289 * Field names correspond to IAM request parameters and field values are | |
| 2290 * their respective values. | |
| 2291 * | |
| 2292 * At present the only supported field names are | |
| 2293 * - "iam_principal", corresponding to IAMContext.principal; | |
| 2294 * - "" (empty string), resulting in one aggretated counter with no field. | |
| 2295 * | |
| 2296 * Examples: | |
| 2297 * counter { metric: "/debug_access_count" field: "iam_principal" } | |
| 2298 * ==> increment counter /iam/policy/backend_debug_access_count | |
| 2299 * {iam_principal=[value of IAMContext.principal]} | |
| 2300 * | |
| 2301 * At this time we do not support: | |
| 2302 * * multiple field names (though this may be supported in the future) | |
| 2303 * * decrementing the counter | |
| 2304 * * incrementing it by anything other than 1 | |
| 2305 */ | |
| 2306 class LogConfig { | 2289 class LogConfig { |
| 2307 /** Cloud audit options. */ | 2290 /** Cloud audit options. */ |
| 2308 CloudAuditOptions cloudAudit; | 2291 CloudAuditOptions cloudAudit; |
| 2309 /** Counter options. */ | 2292 /** Counter options. */ |
| 2310 CounterOptions counter; | 2293 CounterOptions counter; |
| 2311 /** Data access options. */ | 2294 /** Data access options. */ |
| 2312 DataAccessOptions dataAccess; | 2295 DataAccessOptions dataAccess; |
| 2313 | 2296 |
| 2314 LogConfig(); | 2297 LogConfig(); |
| 2315 | 2298 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 class SetIamPolicyRequest { | 2564 class SetIamPolicyRequest { |
| 2582 /** | 2565 /** |
| 2583 * REQUIRED: The complete policy to be applied to the `resource`. The size of | 2566 * REQUIRED: The complete policy to be applied to the `resource`. The size of |
| 2584 * the policy is limited to a few 10s of KB. An empty policy is a | 2567 * the policy is limited to a few 10s of KB. An empty policy is a |
| 2585 * valid policy but certain Cloud Platform services (such as Projects) | 2568 * valid policy but certain Cloud Platform services (such as Projects) |
| 2586 * might reject them. | 2569 * might reject them. |
| 2587 */ | 2570 */ |
| 2588 Policy policy; | 2571 Policy policy; |
| 2589 /** | 2572 /** |
| 2590 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only | 2573 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
| 2591 * the fields in the mask will be modified. If no mask is provided, a default | 2574 * the fields in the mask will be modified. If no mask is provided, the |
| 2592 * mask is used: | 2575 * following default mask is used: |
| 2593 * paths: "bindings, etag" | 2576 * paths: "bindings, etag" |
| 2594 * This field is only used by Cloud IAM. | 2577 * This field is only used by Cloud IAM. |
| 2595 */ | 2578 */ |
| 2596 core.String updateMask; | 2579 core.String updateMask; |
| 2597 | 2580 |
| 2598 SetIamPolicyRequest(); | 2581 SetIamPolicyRequest(); |
| 2599 | 2582 |
| 2600 SetIamPolicyRequest.fromJson(core.Map _json) { | 2583 SetIamPolicyRequest.fromJson(core.Map _json) { |
| 2601 if (_json.containsKey("policy")) { | 2584 if (_json.containsKey("policy")) { |
| 2602 policy = new Policy.fromJson(_json["policy"]); | 2585 policy = new Policy.fromJson(_json["policy"]); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2684 } | 2667 } |
| 2685 | 2668 |
| 2686 core.Map toJson() { | 2669 core.Map toJson() { |
| 2687 var _json = new core.Map(); | 2670 var _json = new core.Map(); |
| 2688 if (cryptoKeyVersionId != null) { | 2671 if (cryptoKeyVersionId != null) { |
| 2689 _json["cryptoKeyVersionId"] = cryptoKeyVersionId; | 2672 _json["cryptoKeyVersionId"] = cryptoKeyVersionId; |
| 2690 } | 2673 } |
| 2691 return _json; | 2674 return _json; |
| 2692 } | 2675 } |
| 2693 } | 2676 } |
| OLD | NEW |