| 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.iam.v1; | 3 library googleapis.iam.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 iam/v1'; | 15 const core.String USER_AGENT = 'dart-api-client iam/v1'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Manages identity and access control for Google Cloud Platform resources, | 18 * Manages identity and access control for Google Cloud Platform resources, |
| 19 * including the creation of service accounts, which you can use to authenticate | 19 * including the creation of service accounts, which you can use to authenticate |
| 20 * to Google and make API calls. | 20 * to Google and make API calls. |
| 21 */ | 21 */ |
| 22 class IamApi { | 22 class IamApi { |
| 23 /** View and manage your data across Google Cloud Platform services */ | 23 /** View and manage your data across Google Cloud Platform services */ |
| 24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 25 | 25 |
| 26 | 26 |
| 27 final commons.ApiRequester _requester; | 27 final commons.ApiRequester _requester; |
| 28 | 28 |
| 29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
| 30 RolesResourceApi get roles => new RolesResourceApi(_requester); |
| 30 | 31 |
| 31 IamApi(http.Client client, {core.String rootUrl: "https://iam.googleapis.com/"
, core.String servicePath: ""}) : | 32 IamApi(http.Client client, {core.String rootUrl: "https://iam.googleapis.com/"
, core.String servicePath: ""}) : |
| 32 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 33 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 33 } | 34 } |
| 34 | 35 |
| 35 | 36 |
| 36 class ProjectsResourceApi { | 37 class ProjectsResourceApi { |
| 37 final commons.ApiRequester _requester; | 38 final commons.ApiRequester _requester; |
| 38 | 39 |
| 39 ProjectsServiceAccountsResourceApi get serviceAccounts => new ProjectsServiceA
ccountsResourceApi(_requester); | 40 ProjectsServiceAccountsResourceApi get serviceAccounts => new ProjectsServiceA
ccountsResourceApi(_requester); |
| 40 | 41 |
| 41 ProjectsResourceApi(commons.ApiRequester client) : | 42 ProjectsResourceApi(commons.ApiRequester client) : |
| 42 _requester = client; | 43 _requester = client; |
| 43 } | 44 } |
| 44 | 45 |
| 45 | 46 |
| 46 class ProjectsServiceAccountsResourceApi { | 47 class ProjectsServiceAccountsResourceApi { |
| 47 final commons.ApiRequester _requester; | 48 final commons.ApiRequester _requester; |
| 48 | 49 |
| 49 ProjectsServiceAccountsKeysResourceApi get keys => new ProjectsServiceAccounts
KeysResourceApi(_requester); | 50 ProjectsServiceAccountsKeysResourceApi get keys => new ProjectsServiceAccounts
KeysResourceApi(_requester); |
| 50 | 51 |
| 51 ProjectsServiceAccountsResourceApi(commons.ApiRequester client) : | 52 ProjectsServiceAccountsResourceApi(commons.ApiRequester client) : |
| 52 _requester = client; | 53 _requester = client; |
| 53 | 54 |
| 54 /** | 55 /** |
| 55 * Creates a service account and returns it. | 56 * Creates a ServiceAccount and returns it. |
| 56 * | 57 * |
| 57 * [request] - The metadata request object. | 58 * [request] - The metadata request object. |
| 58 * | 59 * |
| 59 * Request parameters: | 60 * Request parameters: |
| 60 * | 61 * |
| 61 * [name] - Required. The resource name of the project associated with the | 62 * [name] - Required. The resource name of the project associated with the |
| 62 * service accounts, such as "projects/123" | 63 * service accounts, such as `projects/my-project-123`. |
| 63 * Value must have pattern "^projects/[^/]*$". | 64 * Value must have pattern "^projects/[^/]*$". |
| 64 * | 65 * |
| 65 * Completes with a [ServiceAccount]. | 66 * Completes with a [ServiceAccount]. |
| 66 * | 67 * |
| 67 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 68 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 68 * error. | 69 * error. |
| 69 * | 70 * |
| 70 * If the used [http.Client] completes with an error when making a REST call, | 71 * If the used [http.Client] completes with an error when making a REST call, |
| 71 * this method will complete with the same error. | 72 * this method will complete with the same error. |
| 72 */ | 73 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 91 "POST", | 92 "POST", |
| 92 body: _body, | 93 body: _body, |
| 93 queryParams: _queryParams, | 94 queryParams: _queryParams, |
| 94 uploadOptions: _uploadOptions, | 95 uploadOptions: _uploadOptions, |
| 95 uploadMedia: _uploadMedia, | 96 uploadMedia: _uploadMedia, |
| 96 downloadOptions: _downloadOptions); | 97 downloadOptions: _downloadOptions); |
| 97 return _response.then((data) => new ServiceAccount.fromJson(data)); | 98 return _response.then((data) => new ServiceAccount.fromJson(data)); |
| 98 } | 99 } |
| 99 | 100 |
| 100 /** | 101 /** |
| 101 * Deletes a service acount. | 102 * Deletes a ServiceAccount. |
| 102 * | 103 * |
| 103 * Request parameters: | 104 * Request parameters: |
| 104 * | 105 * |
| 105 * [name] - The resource name of the service account in the format | 106 * [name] - The resource name of the service account in the following format: |
| 106 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for | 107 * `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for |
| 107 * the project, will infer the project from the account. The account value can | 108 * the project will infer the project from the account. The `account` value |
| 108 * be the email address or the unique_id of the service account. | 109 * can be the `email` address or the `unique_id` of the service account. |
| 109 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 110 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 110 * | 111 * |
| 111 * Completes with a [Empty]. | 112 * Completes with a [Empty]. |
| 112 * | 113 * |
| 113 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 114 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 114 * error. | 115 * error. |
| 115 * | 116 * |
| 116 * If the used [http.Client] completes with an error when making a REST call, | 117 * If the used [http.Client] completes with an error when making a REST call, |
| 117 * this method will complete with the same error. | 118 * this method will complete with the same error. |
| 118 */ | 119 */ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 134 "DELETE", | 135 "DELETE", |
| 135 body: _body, | 136 body: _body, |
| 136 queryParams: _queryParams, | 137 queryParams: _queryParams, |
| 137 uploadOptions: _uploadOptions, | 138 uploadOptions: _uploadOptions, |
| 138 uploadMedia: _uploadMedia, | 139 uploadMedia: _uploadMedia, |
| 139 downloadOptions: _downloadOptions); | 140 downloadOptions: _downloadOptions); |
| 140 return _response.then((data) => new Empty.fromJson(data)); | 141 return _response.then((data) => new Empty.fromJson(data)); |
| 141 } | 142 } |
| 142 | 143 |
| 143 /** | 144 /** |
| 144 * Gets a ServiceAccount | 145 * Gets a ServiceAccount. |
| 145 * | 146 * |
| 146 * Request parameters: | 147 * Request parameters: |
| 147 * | 148 * |
| 148 * [name] - The resource name of the service account in the format | 149 * [name] - The resource name of the service account in the following format: |
| 149 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for | 150 * `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for |
| 150 * the project, will infer the project from the account. The account value can | 151 * the project will infer the project from the account. The `account` value |
| 151 * be the email address or the unique_id of the service account. | 152 * can be the `email` address or the `unique_id` of the service account. |
| 152 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 153 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 153 * | 154 * |
| 154 * Completes with a [ServiceAccount]. | 155 * Completes with a [ServiceAccount]. |
| 155 * | 156 * |
| 156 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 157 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 157 * error. | 158 * error. |
| 158 * | 159 * |
| 159 * If the used [http.Client] completes with an error when making a REST call, | 160 * If the used [http.Client] completes with an error when making a REST call, |
| 160 * this method will complete with the same error. | 161 * this method will complete with the same error. |
| 161 */ | 162 */ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 177 "GET", | 178 "GET", |
| 178 body: _body, | 179 body: _body, |
| 179 queryParams: _queryParams, | 180 queryParams: _queryParams, |
| 180 uploadOptions: _uploadOptions, | 181 uploadOptions: _uploadOptions, |
| 181 uploadMedia: _uploadMedia, | 182 uploadMedia: _uploadMedia, |
| 182 downloadOptions: _downloadOptions); | 183 downloadOptions: _downloadOptions); |
| 183 return _response.then((data) => new ServiceAccount.fromJson(data)); | 184 return _response.then((data) => new ServiceAccount.fromJson(data)); |
| 184 } | 185 } |
| 185 | 186 |
| 186 /** | 187 /** |
| 187 * Returns the IAM access control policy for specified IAM resource. | 188 * Returns the IAM access control policy for a ServiceAccount. |
| 188 * | 189 * |
| 189 * Request parameters: | 190 * Request parameters: |
| 190 * | 191 * |
| 191 * [resource] - REQUIRED: The resource for which the policy is being | 192 * [resource] - REQUIRED: The resource for which the policy is being |
| 192 * requested. `resource` is usually specified as a path, such as `projects / * | 193 * requested. `resource` is usually specified as a path. For example, a |
| 193 * project * / zones / * zone * / disks / * disk*`. The format for the path | 194 * Project resource is specified as `projects/{project}`. |
| 194 * specified in this value is resource specific and is specified in the | |
| 195 * `getIamPolicy` documentation. | |
| 196 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 195 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 197 * | 196 * |
| 198 * Completes with a [Policy]. | 197 * Completes with a [Policy]. |
| 199 * | 198 * |
| 200 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 199 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 201 * error. | 200 * error. |
| 202 * | 201 * |
| 203 * If the used [http.Client] completes with an error when making a REST call, | 202 * If the used [http.Client] completes with an error when making a REST call, |
| 204 * this method will complete with the same error. | 203 * this method will complete with the same error. |
| 205 */ | 204 */ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 221 "POST", | 220 "POST", |
| 222 body: _body, | 221 body: _body, |
| 223 queryParams: _queryParams, | 222 queryParams: _queryParams, |
| 224 uploadOptions: _uploadOptions, | 223 uploadOptions: _uploadOptions, |
| 225 uploadMedia: _uploadMedia, | 224 uploadMedia: _uploadMedia, |
| 226 downloadOptions: _downloadOptions); | 225 downloadOptions: _downloadOptions); |
| 227 return _response.then((data) => new Policy.fromJson(data)); | 226 return _response.then((data) => new Policy.fromJson(data)); |
| 228 } | 227 } |
| 229 | 228 |
| 230 /** | 229 /** |
| 231 * Lists service accounts for a project. | 230 * Lists ServiceAccounts for a project. |
| 232 * | 231 * |
| 233 * Request parameters: | 232 * Request parameters: |
| 234 * | 233 * |
| 235 * [name] - Required. The resource name of the project associated with the | 234 * [name] - Required. The resource name of the project associated with the |
| 236 * service accounts, such as "projects/123" | 235 * service accounts, such as `projects/my-project-123`. |
| 237 * Value must have pattern "^projects/[^/]*$". | 236 * Value must have pattern "^projects/[^/]*$". |
| 238 * | 237 * |
| 239 * [pageSize] - Optional limit on the number of service accounts to include in | 238 * [pageSize] - Optional limit on the number of service accounts to include in |
| 240 * the response. Further accounts can subsequently be obtained by including | 239 * the response. Further accounts can subsequently be obtained by including |
| 241 * the [ListServiceAccountsResponse.next_page_token] in a subsequent request. | 240 * the ListServiceAccountsResponse.next_page_token in a subsequent request. |
| 242 * | 241 * |
| 243 * [pageToken] - Optional pagination token returned in an earlier | 242 * [pageToken] - Optional pagination token returned in an earlier |
| 244 * [ListServiceAccountsResponse.next_page_token]. | 243 * ListServiceAccountsResponse.next_page_token. |
| 245 * | 244 * |
| 246 * Completes with a [ListServiceAccountsResponse]. | 245 * Completes with a [ListServiceAccountsResponse]. |
| 247 * | 246 * |
| 248 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 249 * error. | 248 * error. |
| 250 * | 249 * |
| 251 * If the used [http.Client] completes with an error when making a REST call, | 250 * If the used [http.Client] completes with an error when making a REST call, |
| 252 * this method will complete with the same error. | 251 * this method will complete with the same error. |
| 253 */ | 252 */ |
| 254 async.Future<ListServiceAccountsResponse> list(core.String name, {core.int pag
eSize, core.String pageToken}) { | 253 async.Future<ListServiceAccountsResponse> list(core.String name, {core.int pag
eSize, core.String pageToken}) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 275 "GET", | 274 "GET", |
| 276 body: _body, | 275 body: _body, |
| 277 queryParams: _queryParams, | 276 queryParams: _queryParams, |
| 278 uploadOptions: _uploadOptions, | 277 uploadOptions: _uploadOptions, |
| 279 uploadMedia: _uploadMedia, | 278 uploadMedia: _uploadMedia, |
| 280 downloadOptions: _downloadOptions); | 279 downloadOptions: _downloadOptions); |
| 281 return _response.then((data) => new ListServiceAccountsResponse.fromJson(dat
a)); | 280 return _response.then((data) => new ListServiceAccountsResponse.fromJson(dat
a)); |
| 282 } | 281 } |
| 283 | 282 |
| 284 /** | 283 /** |
| 285 * Sets the IAM access control policy for the specified IAM resource. | 284 * Sets the IAM access control policy for a ServiceAccount. |
| 286 * | 285 * |
| 287 * [request] - The metadata request object. | 286 * [request] - The metadata request object. |
| 288 * | 287 * |
| 289 * Request parameters: | 288 * Request parameters: |
| 290 * | 289 * |
| 291 * [resource] - REQUIRED: The resource for which the policy is being | 290 * [resource] - REQUIRED: The resource for which the policy is being |
| 292 * specified. `resource` is usually specified as a path, such as `projects / * | 291 * specified. `resource` is usually specified as a path. For example, a |
| 293 * project * / zones / * zone * / disks / * disk*`. The format for the path | 292 * Project resource is specified as `projects/{project}`. |
| 294 * specified in this value is resource specific and is specified in the | |
| 295 * `setIamPolicy` documentation. | |
| 296 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 293 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 297 * | 294 * |
| 298 * Completes with a [Policy]. | 295 * Completes with a [Policy]. |
| 299 * | 296 * |
| 300 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 297 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 301 * error. | 298 * error. |
| 302 * | 299 * |
| 303 * If the used [http.Client] completes with an error when making a REST call, | 300 * If the used [http.Client] completes with an error when making a REST call, |
| 304 * this method will complete with the same error. | 301 * this method will complete with the same error. |
| 305 */ | 302 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 324 "POST", | 321 "POST", |
| 325 body: _body, | 322 body: _body, |
| 326 queryParams: _queryParams, | 323 queryParams: _queryParams, |
| 327 uploadOptions: _uploadOptions, | 324 uploadOptions: _uploadOptions, |
| 328 uploadMedia: _uploadMedia, | 325 uploadMedia: _uploadMedia, |
| 329 downloadOptions: _downloadOptions); | 326 downloadOptions: _downloadOptions); |
| 330 return _response.then((data) => new Policy.fromJson(data)); | 327 return _response.then((data) => new Policy.fromJson(data)); |
| 331 } | 328 } |
| 332 | 329 |
| 333 /** | 330 /** |
| 334 * Signs a blob using a service account. | 331 * Signs a blob using a service account's system-managed private key. |
| 335 * | 332 * |
| 336 * [request] - The metadata request object. | 333 * [request] - The metadata request object. |
| 337 * | 334 * |
| 338 * Request parameters: | 335 * Request parameters: |
| 339 * | 336 * |
| 340 * [name] - The resource name of the service account in the format | 337 * [name] - The resource name of the service account in the following format: |
| 341 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for | 338 * `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for |
| 342 * the project, will infer the project from the account. The account value can | 339 * the project will infer the project from the account. The `account` value |
| 343 * be the email address or the unique_id of the service account. | 340 * can be the `email` address or the `unique_id` of the service account. |
| 344 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 341 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 345 * | 342 * |
| 346 * Completes with a [SignBlobResponse]. | 343 * Completes with a [SignBlobResponse]. |
| 347 * | 344 * |
| 348 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 345 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 349 * error. | 346 * error. |
| 350 * | 347 * |
| 351 * If the used [http.Client] completes with an error when making a REST call, | 348 * If the used [http.Client] completes with an error when making a REST call, |
| 352 * this method will complete with the same error. | 349 * this method will complete with the same error. |
| 353 */ | 350 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 372 "POST", | 369 "POST", |
| 373 body: _body, | 370 body: _body, |
| 374 queryParams: _queryParams, | 371 queryParams: _queryParams, |
| 375 uploadOptions: _uploadOptions, | 372 uploadOptions: _uploadOptions, |
| 376 uploadMedia: _uploadMedia, | 373 uploadMedia: _uploadMedia, |
| 377 downloadOptions: _downloadOptions); | 374 downloadOptions: _downloadOptions); |
| 378 return _response.then((data) => new SignBlobResponse.fromJson(data)); | 375 return _response.then((data) => new SignBlobResponse.fromJson(data)); |
| 379 } | 376 } |
| 380 | 377 |
| 381 /** | 378 /** |
| 382 * Tests the specified permissions against the IAM access control policy for | 379 * Tests the specified permissions against the IAM access control policy for a |
| 383 * the specified IAM resource. | 380 * ServiceAccount. |
| 384 * | 381 * |
| 385 * [request] - The metadata request object. | 382 * [request] - The metadata request object. |
| 386 * | 383 * |
| 387 * Request parameters: | 384 * Request parameters: |
| 388 * | 385 * |
| 389 * [resource] - REQUIRED: The resource for which the policy detail is being | 386 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 390 * requested. `resource` is usually specified as a path, such as `projects / * | 387 * requested. `resource` is usually specified as a path. For example, a |
| 391 * project * / zones / * zone * / disks / * disk*`. The format for the path | 388 * Project resource is specified as `projects/{project}`. |
| 392 * specified in this value is resource specific and is specified in the | |
| 393 * `testIamPermissions` documentation. | |
| 394 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 389 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 395 * | 390 * |
| 396 * Completes with a [TestIamPermissionsResponse]. | 391 * Completes with a [TestIamPermissionsResponse]. |
| 397 * | 392 * |
| 398 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 393 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 399 * error. | 394 * error. |
| 400 * | 395 * |
| 401 * If the used [http.Client] completes with an error when making a REST call, | 396 * If the used [http.Client] completes with an error when making a REST call, |
| 402 * this method will complete with the same error. | 397 * this method will complete with the same error. |
| 403 */ | 398 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 422 "POST", | 417 "POST", |
| 423 body: _body, | 418 body: _body, |
| 424 queryParams: _queryParams, | 419 queryParams: _queryParams, |
| 425 uploadOptions: _uploadOptions, | 420 uploadOptions: _uploadOptions, |
| 426 uploadMedia: _uploadMedia, | 421 uploadMedia: _uploadMedia, |
| 427 downloadOptions: _downloadOptions); | 422 downloadOptions: _downloadOptions); |
| 428 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 423 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
| 429 } | 424 } |
| 430 | 425 |
| 431 /** | 426 /** |
| 432 * Updates a service account. Currently, only the following fields are | 427 * Updates a ServiceAccount. Currently, only the following fields are |
| 433 * updatable: 'display_name' . The 'etag' is mandatory. | 428 * updatable: `display_name` . The `etag` is mandatory. |
| 434 * | 429 * |
| 435 * [request] - The metadata request object. | 430 * [request] - The metadata request object. |
| 436 * | 431 * |
| 437 * Request parameters: | 432 * Request parameters: |
| 438 * | 433 * |
| 439 * [name] - The resource name of the service account in the format | 434 * [name] - The resource name of the service account in the following format: |
| 440 * "projects/{project}/serviceAccounts/{account}". In requests using '-' as a | 435 * `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a |
| 441 * wildcard for the project, will infer the project from the account and the | 436 * wildcard for the project will infer the project from the `account` and the |
| 442 * account value can be the email address or the unique_id of the service | 437 * `account` value can be the `email` address or the `unique_id` of the |
| 443 * account. In responses the resource name will always be in the format | 438 * service account. In responses the resource name will always be in the |
| 444 * "projects/{project}/serviceAccounts/{email}". | 439 * format `projects/{project}/serviceAccounts/{email}`. |
| 445 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 440 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 446 * | 441 * |
| 447 * Completes with a [ServiceAccount]. | 442 * Completes with a [ServiceAccount]. |
| 448 * | 443 * |
| 449 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 444 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 450 * error. | 445 * error. |
| 451 * | 446 * |
| 452 * If the used [http.Client] completes with an error when making a REST call, | 447 * If the used [http.Client] completes with an error when making a REST call, |
| 453 * this method will complete with the same error. | 448 * this method will complete with the same error. |
| 454 */ | 449 */ |
| (...skipping 27 matching lines...) Expand all Loading... |
| 482 } | 477 } |
| 483 | 478 |
| 484 | 479 |
| 485 class ProjectsServiceAccountsKeysResourceApi { | 480 class ProjectsServiceAccountsKeysResourceApi { |
| 486 final commons.ApiRequester _requester; | 481 final commons.ApiRequester _requester; |
| 487 | 482 |
| 488 ProjectsServiceAccountsKeysResourceApi(commons.ApiRequester client) : | 483 ProjectsServiceAccountsKeysResourceApi(commons.ApiRequester client) : |
| 489 _requester = client; | 484 _requester = client; |
| 490 | 485 |
| 491 /** | 486 /** |
| 492 * Creates a service account key and returns it. | 487 * Creates a ServiceAccountKey and returns it. |
| 493 * | 488 * |
| 494 * [request] - The metadata request object. | 489 * [request] - The metadata request object. |
| 495 * | 490 * |
| 496 * Request parameters: | 491 * Request parameters: |
| 497 * | 492 * |
| 498 * [name] - The resource name of the service account in the format | 493 * [name] - The resource name of the service account in the following format: |
| 499 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for | 494 * `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for |
| 500 * the project, will infer the project from the account. The account value can | 495 * the project will infer the project from the account. The `account` value |
| 501 * be the email address or the unique_id of the service account. | 496 * can be the `email` address or the `unique_id` of the service account. |
| 502 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 497 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 503 * | 498 * |
| 504 * Completes with a [ServiceAccountKey]. | 499 * Completes with a [ServiceAccountKey]. |
| 505 * | 500 * |
| 506 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 501 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 507 * error. | 502 * error. |
| 508 * | 503 * |
| 509 * If the used [http.Client] completes with an error when making a REST call, | 504 * If the used [http.Client] completes with an error when making a REST call, |
| 510 * this method will complete with the same error. | 505 * this method will complete with the same error. |
| 511 */ | 506 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 530 "POST", | 525 "POST", |
| 531 body: _body, | 526 body: _body, |
| 532 queryParams: _queryParams, | 527 queryParams: _queryParams, |
| 533 uploadOptions: _uploadOptions, | 528 uploadOptions: _uploadOptions, |
| 534 uploadMedia: _uploadMedia, | 529 uploadMedia: _uploadMedia, |
| 535 downloadOptions: _downloadOptions); | 530 downloadOptions: _downloadOptions); |
| 536 return _response.then((data) => new ServiceAccountKey.fromJson(data)); | 531 return _response.then((data) => new ServiceAccountKey.fromJson(data)); |
| 537 } | 532 } |
| 538 | 533 |
| 539 /** | 534 /** |
| 540 * Deletes a service account key. | 535 * Deletes a ServiceAccountKey. |
| 541 * | 536 * |
| 542 * Request parameters: | 537 * Request parameters: |
| 543 * | 538 * |
| 544 * [name] - The resource name of the service account key in the format | 539 * [name] - The resource name of the service account key in the following |
| 545 * "projects/{project}/serviceAccounts/{account}/keys/{key}". Using '-' as a | 540 * format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using |
| 546 * wildcard for the project will infer the project from the account. The | 541 * `-` as a wildcard for the project will infer the project from the account. |
| 547 * account value can be the email address or the unique_id of the service | 542 * The `account` value can be the `email` address or the `unique_id` of the |
| 548 * account. | 543 * service account. |
| 549 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/] * / | 544 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/] * / |
| 550 * keys/[^/]*$". | 545 * keys/[^/]*$". |
| 551 * | 546 * |
| 552 * Completes with a [Empty]. | 547 * Completes with a [Empty]. |
| 553 * | 548 * |
| 554 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 549 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 555 * error. | 550 * error. |
| 556 * | 551 * |
| 557 * If the used [http.Client] completes with an error when making a REST call, | 552 * If the used [http.Client] completes with an error when making a REST call, |
| 558 * this method will complete with the same error. | 553 * this method will complete with the same error. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 579 uploadMedia: _uploadMedia, | 574 uploadMedia: _uploadMedia, |
| 580 downloadOptions: _downloadOptions); | 575 downloadOptions: _downloadOptions); |
| 581 return _response.then((data) => new Empty.fromJson(data)); | 576 return _response.then((data) => new Empty.fromJson(data)); |
| 582 } | 577 } |
| 583 | 578 |
| 584 /** | 579 /** |
| 585 * Gets the ServiceAccountKey by key id. | 580 * Gets the ServiceAccountKey by key id. |
| 586 * | 581 * |
| 587 * Request parameters: | 582 * Request parameters: |
| 588 * | 583 * |
| 589 * [name] - The resource name of the service account key in the format | 584 * [name] - The resource name of the service account key in the following |
| 590 * "projects/{project}/serviceAccounts/{account}/keys/{key}". Using '-' as a | 585 * format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using |
| 591 * wildcard for the project will infer the project from the account. The | 586 * `-` as a wildcard for the project will infer the project from the account. |
| 592 * account value can be the email address or the unique_id of the service | 587 * The `account` value can be the `email` address or the `unique_id` of the |
| 593 * account. | 588 * service account. |
| 594 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/] * / | 589 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/] * / |
| 595 * keys/[^/]*$". | 590 * keys/[^/]*$". |
| 596 * | 591 * |
| 592 * [publicKeyType] - The output format of the public key requested. X509_PEM |
| 593 * is the default output format. |
| 594 * Possible string values are: |
| 595 * - "TYPE_NONE" : A TYPE_NONE. |
| 596 * - "TYPE_X509_PEM_FILE" : A TYPE_X509_PEM_FILE. |
| 597 * - "TYPE_RAW_PUBLIC_KEY" : A TYPE_RAW_PUBLIC_KEY. |
| 598 * |
| 597 * Completes with a [ServiceAccountKey]. | 599 * Completes with a [ServiceAccountKey]. |
| 598 * | 600 * |
| 599 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 601 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 600 * error. | 602 * error. |
| 601 * | 603 * |
| 602 * If the used [http.Client] completes with an error when making a REST call, | 604 * If the used [http.Client] completes with an error when making a REST call, |
| 603 * this method will complete with the same error. | 605 * this method will complete with the same error. |
| 604 */ | 606 */ |
| 605 async.Future<ServiceAccountKey> get(core.String name) { | 607 async.Future<ServiceAccountKey> get(core.String name, {core.String publicKeyTy
pe}) { |
| 606 var _url = null; | 608 var _url = null; |
| 607 var _queryParams = new core.Map(); | 609 var _queryParams = new core.Map(); |
| 608 var _uploadMedia = null; | 610 var _uploadMedia = null; |
| 609 var _uploadOptions = null; | 611 var _uploadOptions = null; |
| 610 var _downloadOptions = commons.DownloadOptions.Metadata; | 612 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 611 var _body = null; | 613 var _body = null; |
| 612 | 614 |
| 613 if (name == null) { | 615 if (name == null) { |
| 614 throw new core.ArgumentError("Parameter name is required."); | 616 throw new core.ArgumentError("Parameter name is required."); |
| 615 } | 617 } |
| 618 if (publicKeyType != null) { |
| 619 _queryParams["publicKeyType"] = [publicKeyType]; |
| 620 } |
| 616 | 621 |
| 617 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 622 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 618 | 623 |
| 619 var _response = _requester.request(_url, | 624 var _response = _requester.request(_url, |
| 620 "GET", | 625 "GET", |
| 621 body: _body, | 626 body: _body, |
| 622 queryParams: _queryParams, | 627 queryParams: _queryParams, |
| 623 uploadOptions: _uploadOptions, | 628 uploadOptions: _uploadOptions, |
| 624 uploadMedia: _uploadMedia, | 629 uploadMedia: _uploadMedia, |
| 625 downloadOptions: _downloadOptions); | 630 downloadOptions: _downloadOptions); |
| 626 return _response.then((data) => new ServiceAccountKey.fromJson(data)); | 631 return _response.then((data) => new ServiceAccountKey.fromJson(data)); |
| 627 } | 632 } |
| 628 | 633 |
| 629 /** | 634 /** |
| 630 * Lists service account keys | 635 * Lists ServiceAccountKeys. |
| 631 * | 636 * |
| 632 * Request parameters: | 637 * Request parameters: |
| 633 * | 638 * |
| 634 * [name] - The resource name of the service account in the format | 639 * [name] - The resource name of the service account in the following format: |
| 635 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for | 640 * `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for |
| 636 * the project, will infer the project from the account. The account value can | 641 * the project, will infer the project from the account. The `account` value |
| 637 * be the email address or the unique_id of the service account. | 642 * can be the `email` address or the `unique_id` of the service account. |
| 638 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". | 643 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$". |
| 639 * | 644 * |
| 640 * [keyTypes] - The type of keys the user wants to list. If empty, all key | 645 * [keyTypes] - Filters the types of keys the user wants to include in the |
| 641 * types are included in the response. Duplicate key types are not allowed. | 646 * list response. Duplicate key types are not allowed. If no key type is |
| 647 * provided, all keys are returned. |
| 642 * | 648 * |
| 643 * Completes with a [ListServiceAccountKeysResponse]. | 649 * Completes with a [ListServiceAccountKeysResponse]. |
| 644 * | 650 * |
| 645 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 651 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 646 * error. | 652 * error. |
| 647 * | 653 * |
| 648 * If the used [http.Client] completes with an error when making a REST call, | 654 * If the used [http.Client] completes with an error when making a REST call, |
| 649 * this method will complete with the same error. | 655 * this method will complete with the same error. |
| 650 */ | 656 */ |
| 651 async.Future<ListServiceAccountKeysResponse> list(core.String name, {core.List
<core.String> keyTypes}) { | 657 async.Future<ListServiceAccountKeysResponse> list(core.String name, {core.List
<core.String> keyTypes}) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 671 queryParams: _queryParams, | 677 queryParams: _queryParams, |
| 672 uploadOptions: _uploadOptions, | 678 uploadOptions: _uploadOptions, |
| 673 uploadMedia: _uploadMedia, | 679 uploadMedia: _uploadMedia, |
| 674 downloadOptions: _downloadOptions); | 680 downloadOptions: _downloadOptions); |
| 675 return _response.then((data) => new ListServiceAccountKeysResponse.fromJson(
data)); | 681 return _response.then((data) => new ListServiceAccountKeysResponse.fromJson(
data)); |
| 676 } | 682 } |
| 677 | 683 |
| 678 } | 684 } |
| 679 | 685 |
| 680 | 686 |
| 687 class RolesResourceApi { |
| 688 final commons.ApiRequester _requester; |
| 689 |
| 690 RolesResourceApi(commons.ApiRequester client) : |
| 691 _requester = client; |
| 692 |
| 693 /** |
| 694 * Queries roles that can be granted on a particular resource. A role is |
| 695 * grantable if it can be used as the role in a binding for a policy for that |
| 696 * resource. |
| 697 * |
| 698 * [request] - The metadata request object. |
| 699 * |
| 700 * Request parameters: |
| 701 * |
| 702 * Completes with a [QueryGrantableRolesResponse]. |
| 703 * |
| 704 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 705 * error. |
| 706 * |
| 707 * If the used [http.Client] completes with an error when making a REST call, |
| 708 * this method will complete with the same error. |
| 709 */ |
| 710 async.Future<QueryGrantableRolesResponse> queryGrantableRoles(QueryGrantableRo
lesRequest request) { |
| 711 var _url = null; |
| 712 var _queryParams = new core.Map(); |
| 713 var _uploadMedia = null; |
| 714 var _uploadOptions = null; |
| 715 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 716 var _body = null; |
| 717 |
| 718 if (request != null) { |
| 719 _body = convert.JSON.encode((request).toJson()); |
| 720 } |
| 721 |
| 722 _url = 'v1/roles:queryGrantableRoles'; |
| 723 |
| 724 var _response = _requester.request(_url, |
| 725 "POST", |
| 726 body: _body, |
| 727 queryParams: _queryParams, |
| 728 uploadOptions: _uploadOptions, |
| 729 uploadMedia: _uploadMedia, |
| 730 downloadOptions: _downloadOptions); |
| 731 return _response.then((data) => new QueryGrantableRolesResponse.fromJson(dat
a)); |
| 732 } |
| 733 |
| 734 } |
| 735 |
| 736 |
| 681 | 737 |
| 738 /** |
| 739 * Audit log information specific to Cloud IAM. This message is serialized as an |
| 740 * `Any` type in the `ServiceData` message of an `AuditLog` message. |
| 741 */ |
| 742 class AuditData { |
| 743 /** Policy delta between the original policy and the newly set policy. */ |
| 744 PolicyDelta policyDelta; |
| 745 |
| 746 AuditData(); |
| 747 |
| 748 AuditData.fromJson(core.Map _json) { |
| 749 if (_json.containsKey("policyDelta")) { |
| 750 policyDelta = new PolicyDelta.fromJson(_json["policyDelta"]); |
| 751 } |
| 752 } |
| 753 |
| 754 core.Map toJson() { |
| 755 var _json = new core.Map(); |
| 756 if (policyDelta != null) { |
| 757 _json["policyDelta"] = (policyDelta).toJson(); |
| 758 } |
| 759 return _json; |
| 760 } |
| 761 } |
| 762 |
| 682 /** Associates `members` with a `role`. */ | 763 /** Associates `members` with a `role`. */ |
| 683 class Binding { | 764 class Binding { |
| 684 /** | 765 /** |
| 685 * Specifies the identities requesting access for a Cloud Platform resource. | 766 * Specifies the identities requesting access for a Cloud Platform resource. |
| 686 * `members` can have the following values: * `allUsers`: A special identifier | 767 * `members` can have the following values: * `allUsers`: A special identifier |
| 687 * that represents anyone who is on the internet; with or without a Google | 768 * that represents anyone who is on the internet; with or without a Google |
| 688 * account. * `allAuthenticatedUsers`: A special identifier that represents | 769 * account. * `allAuthenticatedUsers`: A special identifier that represents |
| 689 * anyone who is authenticated with a Google account or a service account. * | 770 * anyone who is authenticated with a Google account or a service account. * |
| 690 * `user:{emailid}`: An email address that represents a specific Google | 771 * `user:{emailid}`: An email address that represents a specific Google |
| 691 * account. For example, `alice@gmail.com` or `joe@example.com`. * | 772 * account. For example, `alice@gmail.com` or `joe@example.com`. * |
| (...skipping 27 matching lines...) Expand all Loading... |
| 719 if (members != null) { | 800 if (members != null) { |
| 720 _json["members"] = members; | 801 _json["members"] = members; |
| 721 } | 802 } |
| 722 if (role != null) { | 803 if (role != null) { |
| 723 _json["role"] = role; | 804 _json["role"] = role; |
| 724 } | 805 } |
| 725 return _json; | 806 return _json; |
| 726 } | 807 } |
| 727 } | 808 } |
| 728 | 809 |
| 729 /** Write a Cloud Audit log */ | 810 /** |
| 730 class CloudAuditOptions { | 811 * One delta entry for Binding. Each individual change (only one member in each |
| 812 * entry) to a binding will be a separate entry. |
| 813 */ |
| 814 class BindingDelta { |
| 815 /** |
| 816 * The action that was performed on a Binding. Required |
| 817 * Possible string values are: |
| 818 * - "ACTION_UNSPECIFIED" : A ACTION_UNSPECIFIED. |
| 819 * - "ADD" : A ADD. |
| 820 * - "REMOVE" : A REMOVE. |
| 821 */ |
| 822 core.String action; |
| 823 /** |
| 824 * A single identity requesting access for a Cloud Platform resource. Follows |
| 825 * the same format of Binding.members. Required |
| 826 */ |
| 827 core.String member; |
| 828 /** |
| 829 * Role that is assigned to `members`. For example, `roles/viewer`, |
| 830 * `roles/editor`, or `roles/owner`. Required |
| 831 */ |
| 832 core.String role; |
| 731 | 833 |
| 732 CloudAuditOptions(); | 834 BindingDelta(); |
| 733 | 835 |
| 734 CloudAuditOptions.fromJson(core.Map _json) { | 836 BindingDelta.fromJson(core.Map _json) { |
| 735 } | 837 if (_json.containsKey("action")) { |
| 736 | 838 action = _json["action"]; |
| 737 core.Map toJson() { | |
| 738 var _json = new core.Map(); | |
| 739 return _json; | |
| 740 } | |
| 741 } | |
| 742 | |
| 743 /** A condition to be met. */ | |
| 744 class Condition { | |
| 745 /** | |
| 746 * Trusted attributes supplied by the IAM system. | |
| 747 * Possible string values are: | |
| 748 * - "NO_ATTR" : A NO_ATTR. | |
| 749 * - "AUTHORITY" : A AUTHORITY. | |
| 750 * - "ATTRIBUTION" : A ATTRIBUTION. | |
| 751 */ | |
| 752 core.String iam; | |
| 753 /** | |
| 754 * An operator to apply the subject with. | |
| 755 * Possible string values are: | |
| 756 * - "NO_OP" : A NO_OP. | |
| 757 * - "EQUALS" : A EQUALS. | |
| 758 * - "NOT_EQUALS" : A NOT_EQUALS. | |
| 759 * - "IN" : A IN. | |
| 760 * - "NOT_IN" : A NOT_IN. | |
| 761 * - "DISCHARGED" : A DISCHARGED. | |
| 762 */ | |
| 763 core.String op; | |
| 764 /** Trusted attributes discharged by the service. */ | |
| 765 core.String svc; | |
| 766 /** | |
| 767 * Trusted attributes supplied by any service that owns resources and uses the | |
| 768 * IAM system for access control. | |
| 769 * Possible string values are: | |
| 770 * - "NO_ATTR" : A NO_ATTR. | |
| 771 * - "REGION" : A REGION. | |
| 772 * - "SERVICE" : A SERVICE. | |
| 773 * - "NAME" : A NAME. | |
| 774 * - "IP" : A IP. | |
| 775 */ | |
| 776 core.String sys; | |
| 777 /** The object of the condition. Exactly one of these must be set. */ | |
| 778 core.String value; | |
| 779 /** The objects of the condition. This is mutually exclusive with 'value'. */ | |
| 780 core.List<core.String> values; | |
| 781 | |
| 782 Condition(); | |
| 783 | |
| 784 Condition.fromJson(core.Map _json) { | |
| 785 if (_json.containsKey("iam")) { | |
| 786 iam = _json["iam"]; | |
| 787 } | 839 } |
| 788 if (_json.containsKey("op")) { | 840 if (_json.containsKey("member")) { |
| 789 op = _json["op"]; | 841 member = _json["member"]; |
| 790 } | 842 } |
| 791 if (_json.containsKey("svc")) { | 843 if (_json.containsKey("role")) { |
| 792 svc = _json["svc"]; | 844 role = _json["role"]; |
| 793 } | |
| 794 if (_json.containsKey("sys")) { | |
| 795 sys = _json["sys"]; | |
| 796 } | |
| 797 if (_json.containsKey("value")) { | |
| 798 value = _json["value"]; | |
| 799 } | |
| 800 if (_json.containsKey("values")) { | |
| 801 values = _json["values"]; | |
| 802 } | 845 } |
| 803 } | 846 } |
| 804 | 847 |
| 805 core.Map toJson() { | 848 core.Map toJson() { |
| 806 var _json = new core.Map(); | 849 var _json = new core.Map(); |
| 807 if (iam != null) { | 850 if (action != null) { |
| 808 _json["iam"] = iam; | 851 _json["action"] = action; |
| 809 } | 852 } |
| 810 if (op != null) { | 853 if (member != null) { |
| 811 _json["op"] = op; | 854 _json["member"] = member; |
| 812 } | 855 } |
| 813 if (svc != null) { | 856 if (role != null) { |
| 814 _json["svc"] = svc; | 857 _json["role"] = role; |
| 815 } | |
| 816 if (sys != null) { | |
| 817 _json["sys"] = sys; | |
| 818 } | |
| 819 if (value != null) { | |
| 820 _json["value"] = value; | |
| 821 } | |
| 822 if (values != null) { | |
| 823 _json["values"] = values; | |
| 824 } | 858 } |
| 825 return _json; | 859 return _json; |
| 826 } | 860 } |
| 827 } | |
| 828 | |
| 829 /** Options for counters */ | |
| 830 class CounterOptions { | |
| 831 /** The field value to attribute. */ | |
| 832 core.String field; | |
| 833 /** The metric to update. */ | |
| 834 core.String metric; | |
| 835 | |
| 836 CounterOptions(); | |
| 837 | |
| 838 CounterOptions.fromJson(core.Map _json) { | |
| 839 if (_json.containsKey("field")) { | |
| 840 field = _json["field"]; | |
| 841 } | |
| 842 if (_json.containsKey("metric")) { | |
| 843 metric = _json["metric"]; | |
| 844 } | |
| 845 } | |
| 846 | |
| 847 core.Map toJson() { | |
| 848 var _json = new core.Map(); | |
| 849 if (field != null) { | |
| 850 _json["field"] = field; | |
| 851 } | |
| 852 if (metric != null) { | |
| 853 _json["metric"] = metric; | |
| 854 } | |
| 855 return _json; | |
| 856 } | |
| 857 } | 861 } |
| 858 | 862 |
| 859 /** The service account key create request. */ | 863 /** The service account key create request. */ |
| 860 class CreateServiceAccountKeyRequest { | 864 class CreateServiceAccountKeyRequest { |
| 861 /** | 865 /** |
| 862 * The type of the key requested. GOOGLE_CREDENTIALS is the default key type. | 866 * Which type of key and algorithm to use for the key. The default is |
| 867 * currently a 4K RSA key. However this may change in the future. |
| 868 * Possible string values are: |
| 869 * - "KEY_ALG_UNSPECIFIED" : A KEY_ALG_UNSPECIFIED. |
| 870 * - "KEY_ALG_RSA_1024" : A KEY_ALG_RSA_1024. |
| 871 * - "KEY_ALG_RSA_2048" : A KEY_ALG_RSA_2048. |
| 872 */ |
| 873 core.String keyAlgorithm; |
| 874 /** |
| 875 * The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the |
| 876 * default output format. |
| 863 * Possible string values are: | 877 * Possible string values are: |
| 864 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED. | 878 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED. |
| 865 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE. | 879 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE. |
| 866 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE. | 880 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE. |
| 867 */ | 881 */ |
| 868 core.String privateKeyType; | 882 core.String privateKeyType; |
| 869 | 883 |
| 870 CreateServiceAccountKeyRequest(); | 884 CreateServiceAccountKeyRequest(); |
| 871 | 885 |
| 872 CreateServiceAccountKeyRequest.fromJson(core.Map _json) { | 886 CreateServiceAccountKeyRequest.fromJson(core.Map _json) { |
| 887 if (_json.containsKey("keyAlgorithm")) { |
| 888 keyAlgorithm = _json["keyAlgorithm"]; |
| 889 } |
| 873 if (_json.containsKey("privateKeyType")) { | 890 if (_json.containsKey("privateKeyType")) { |
| 874 privateKeyType = _json["privateKeyType"]; | 891 privateKeyType = _json["privateKeyType"]; |
| 875 } | 892 } |
| 876 } | 893 } |
| 877 | 894 |
| 878 core.Map toJson() { | 895 core.Map toJson() { |
| 879 var _json = new core.Map(); | 896 var _json = new core.Map(); |
| 897 if (keyAlgorithm != null) { |
| 898 _json["keyAlgorithm"] = keyAlgorithm; |
| 899 } |
| 880 if (privateKeyType != null) { | 900 if (privateKeyType != null) { |
| 881 _json["privateKeyType"] = privateKeyType; | 901 _json["privateKeyType"] = privateKeyType; |
| 882 } | 902 } |
| 883 return _json; | 903 return _json; |
| 884 } | 904 } |
| 885 } | 905 } |
| 886 | 906 |
| 887 /** The service account create request. */ | 907 /** The service account create request. */ |
| 888 class CreateServiceAccountRequest { | 908 class CreateServiceAccountRequest { |
| 889 /** | 909 /** |
| 890 * Required. The account id that is used to generate the service account email | 910 * Required. The account id that is used to generate the service account email |
| 891 * address and a stable unique id. It is unique within a project, must be 1-63 | 911 * address and a stable unique id. It is unique within a project, must be 6-30 |
| 892 * characters long, and match the regular expression [a-z]([-a-z0-9]*[a-z0-9]) | 912 * characters long, and match the regular expression |
| 893 * to comply with RFC1035. | 913 * `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. |
| 894 */ | 914 */ |
| 895 core.String accountId; | 915 core.String accountId; |
| 896 /** | 916 /** |
| 897 * The ServiceAccount resource to create. Currently, only the following values | 917 * The ServiceAccount resource to create. Currently, only the following values |
| 898 * are user assignable: display_name . | 918 * are user assignable: `display_name` . |
| 899 */ | 919 */ |
| 900 ServiceAccount serviceAccount; | 920 ServiceAccount serviceAccount; |
| 901 | 921 |
| 902 CreateServiceAccountRequest(); | 922 CreateServiceAccountRequest(); |
| 903 | 923 |
| 904 CreateServiceAccountRequest.fromJson(core.Map _json) { | 924 CreateServiceAccountRequest.fromJson(core.Map _json) { |
| 905 if (_json.containsKey("accountId")) { | 925 if (_json.containsKey("accountId")) { |
| 906 accountId = _json["accountId"]; | 926 accountId = _json["accountId"]; |
| 907 } | 927 } |
| 908 if (_json.containsKey("serviceAccount")) { | 928 if (_json.containsKey("serviceAccount")) { |
| 909 serviceAccount = new ServiceAccount.fromJson(_json["serviceAccount"]); | 929 serviceAccount = new ServiceAccount.fromJson(_json["serviceAccount"]); |
| 910 } | 930 } |
| 911 } | 931 } |
| 912 | 932 |
| 913 core.Map toJson() { | 933 core.Map toJson() { |
| 914 var _json = new core.Map(); | 934 var _json = new core.Map(); |
| 915 if (accountId != null) { | 935 if (accountId != null) { |
| 916 _json["accountId"] = accountId; | 936 _json["accountId"] = accountId; |
| 917 } | 937 } |
| 918 if (serviceAccount != null) { | 938 if (serviceAccount != null) { |
| 919 _json["serviceAccount"] = (serviceAccount).toJson(); | 939 _json["serviceAccount"] = (serviceAccount).toJson(); |
| 920 } | 940 } |
| 921 return _json; | 941 return _json; |
| 922 } | 942 } |
| 923 } | 943 } |
| 924 | 944 |
| 925 /** Write a Data Access (Gin) log */ | |
| 926 class DataAccessOptions { | |
| 927 | |
| 928 DataAccessOptions(); | |
| 929 | |
| 930 DataAccessOptions.fromJson(core.Map _json) { | |
| 931 } | |
| 932 | |
| 933 core.Map toJson() { | |
| 934 var _json = new core.Map(); | |
| 935 return _json; | |
| 936 } | |
| 937 } | |
| 938 | |
| 939 /** | 945 /** |
| 940 * A generic empty message that you can re-use to avoid defining duplicated | 946 * A generic empty message that you can re-use to avoid defining duplicated |
| 941 * empty messages in your APIs. A typical example is to use it as the request or | 947 * empty messages in your APIs. A typical example is to use it as the request or |
| 942 * the response type of an API method. For instance: service Foo { rpc | 948 * the response type of an API method. For instance: service Foo { rpc |
| 943 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON | 949 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON |
| 944 * representation for `Empty` is empty JSON object `{}`. | 950 * representation for `Empty` is empty JSON object `{}`. |
| 945 */ | 951 */ |
| 946 class Empty { | 952 class Empty { |
| 947 | 953 |
| 948 Empty(); | 954 Empty(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 977 return _json; | 983 return _json; |
| 978 } | 984 } |
| 979 } | 985 } |
| 980 | 986 |
| 981 /** The service account list response. */ | 987 /** The service account list response. */ |
| 982 class ListServiceAccountsResponse { | 988 class ListServiceAccountsResponse { |
| 983 /** The list of matching service accounts. */ | 989 /** The list of matching service accounts. */ |
| 984 core.List<ServiceAccount> accounts; | 990 core.List<ServiceAccount> accounts; |
| 985 /** | 991 /** |
| 986 * To retrieve the next page of results, set | 992 * To retrieve the next page of results, set |
| 987 * [ListServiceAccountsRequest.page_token] to this value. | 993 * ListServiceAccountsRequest.page_token to this value. |
| 988 */ | 994 */ |
| 989 core.String nextPageToken; | 995 core.String nextPageToken; |
| 990 | 996 |
| 991 ListServiceAccountsResponse(); | 997 ListServiceAccountsResponse(); |
| 992 | 998 |
| 993 ListServiceAccountsResponse.fromJson(core.Map _json) { | 999 ListServiceAccountsResponse.fromJson(core.Map _json) { |
| 994 if (_json.containsKey("accounts")) { | 1000 if (_json.containsKey("accounts")) { |
| 995 accounts = _json["accounts"].map((value) => new ServiceAccount.fromJson(va
lue)).toList(); | 1001 accounts = _json["accounts"].map((value) => new ServiceAccount.fromJson(va
lue)).toList(); |
| 996 } | 1002 } |
| 997 if (_json.containsKey("nextPageToken")) { | 1003 if (_json.containsKey("nextPageToken")) { |
| 998 nextPageToken = _json["nextPageToken"]; | 1004 nextPageToken = _json["nextPageToken"]; |
| 999 } | 1005 } |
| 1000 } | 1006 } |
| 1001 | 1007 |
| 1002 core.Map toJson() { | 1008 core.Map toJson() { |
| 1003 var _json = new core.Map(); | 1009 var _json = new core.Map(); |
| 1004 if (accounts != null) { | 1010 if (accounts != null) { |
| 1005 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); | 1011 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); |
| 1006 } | 1012 } |
| 1007 if (nextPageToken != null) { | 1013 if (nextPageToken != null) { |
| 1008 _json["nextPageToken"] = nextPageToken; | 1014 _json["nextPageToken"] = nextPageToken; |
| 1009 } | 1015 } |
| 1010 return _json; | 1016 return _json; |
| 1011 } | 1017 } |
| 1012 } | 1018 } |
| 1013 | 1019 |
| 1014 /** | 1020 /** |
| 1015 * Specifies what kind of log the caller must write Increment a streamz counter | |
| 1016 * with the specified metric and field names. Metric names should start with a | |
| 1017 * '/', generally be lowercase-only, and end in "_count". Field names should not | |
| 1018 * contain an initial slash. The actual exported metric names will have | |
| 1019 * "/iam/policy" prepended. Field names correspond to IAM request parameters and | |
| 1020 * field values are their respective values. At present only "iam_principal", | |
| 1021 * corresponding to IAMContext.principal, is supported. Examples: counter { | |
| 1022 * metric: "/debug_access_count" field: "iam_principal" } ==> increment counter | |
| 1023 * /iam/policy/backend_debug_access_count {iam_principal=[value of | |
| 1024 * IAMContext.principal]} At this time we do not support: * multiple field names | |
| 1025 * (though this may be supported in the future) * decrementing the counter * | |
| 1026 * incrementing it by anything other than 1 | |
| 1027 */ | |
| 1028 class LogConfig { | |
| 1029 /** Cloud audit options. */ | |
| 1030 CloudAuditOptions cloudAudit; | |
| 1031 /** Counter options. */ | |
| 1032 CounterOptions counter; | |
| 1033 /** Data access options. */ | |
| 1034 DataAccessOptions dataAccess; | |
| 1035 | |
| 1036 LogConfig(); | |
| 1037 | |
| 1038 LogConfig.fromJson(core.Map _json) { | |
| 1039 if (_json.containsKey("cloudAudit")) { | |
| 1040 cloudAudit = new CloudAuditOptions.fromJson(_json["cloudAudit"]); | |
| 1041 } | |
| 1042 if (_json.containsKey("counter")) { | |
| 1043 counter = new CounterOptions.fromJson(_json["counter"]); | |
| 1044 } | |
| 1045 if (_json.containsKey("dataAccess")) { | |
| 1046 dataAccess = new DataAccessOptions.fromJson(_json["dataAccess"]); | |
| 1047 } | |
| 1048 } | |
| 1049 | |
| 1050 core.Map toJson() { | |
| 1051 var _json = new core.Map(); | |
| 1052 if (cloudAudit != null) { | |
| 1053 _json["cloudAudit"] = (cloudAudit).toJson(); | |
| 1054 } | |
| 1055 if (counter != null) { | |
| 1056 _json["counter"] = (counter).toJson(); | |
| 1057 } | |
| 1058 if (dataAccess != null) { | |
| 1059 _json["dataAccess"] = (dataAccess).toJson(); | |
| 1060 } | |
| 1061 return _json; | |
| 1062 } | |
| 1063 } | |
| 1064 | |
| 1065 /** | |
| 1066 * Defines an Identity and Access Management (IAM) policy. It is used to specify | 1021 * Defines an Identity and Access Management (IAM) policy. It is used to specify |
| 1067 * access control policies for Cloud Platform resources. A `Policy` consists of | 1022 * access control policies for Cloud Platform resources. A `Policy` consists of |
| 1068 * a list of `bindings`. A `Binding` binds a list of `members` to a `role`, | 1023 * a list of `bindings`. A `Binding` binds a list of `members` to a `role`, |
| 1069 * where the members can be user accounts, Google groups, Google domains, and | 1024 * where the members can be user accounts, Google groups, Google domains, and |
| 1070 * service accounts. A `role` is a named list of permissions defined by IAM. | 1025 * service accounts. A `role` is a named list of permissions defined by IAM. |
| 1071 * **Example** { "bindings": [ { "role": "roles/owner", "members": [ | 1026 * **Example** { "bindings": [ { "role": "roles/owner", "members": [ |
| 1072 * "user:mike@example.com", "group:admins@example.com", "domain:google.com", | 1027 * "user:mike@example.com", "group:admins@example.com", "domain:google.com", |
| 1073 * "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": | 1028 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": |
| 1074 * "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description | 1029 * "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description |
| 1075 * of IAM and its features, see the [IAM developer's | 1030 * of IAM and its features, see the [IAM developer's |
| 1076 * guide](https://cloud.google.com/iam). | 1031 * guide](https://cloud.google.com/iam). |
| 1077 */ | 1032 */ |
| 1078 class Policy { | 1033 class Policy { |
| 1079 /** | 1034 /** |
| 1080 * Associates a list of `members` to a `role`. Multiple `bindings` must not be | 1035 * Associates a list of `members` to a `role`. Multiple `bindings` must not be |
| 1081 * specified for the same `role`. `bindings` with no members will result in an | 1036 * specified for the same `role`. `bindings` with no members will result in an |
| 1082 * error. | 1037 * error. |
| 1083 */ | 1038 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1094 * policy is overwritten blindly. | 1049 * policy is overwritten blindly. |
| 1095 */ | 1050 */ |
| 1096 core.String etag; | 1051 core.String etag; |
| 1097 core.List<core.int> get etagAsBytes { | 1052 core.List<core.int> get etagAsBytes { |
| 1098 return convert.BASE64.decode(etag); | 1053 return convert.BASE64.decode(etag); |
| 1099 } | 1054 } |
| 1100 | 1055 |
| 1101 void set etagAsBytes(core.List<core.int> _bytes) { | 1056 void set etagAsBytes(core.List<core.int> _bytes) { |
| 1102 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 1057 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 1103 } | 1058 } |
| 1104 core.List<Rule> rules; | |
| 1105 /** Version of the `Policy`. The default version is 0. */ | 1059 /** Version of the `Policy`. The default version is 0. */ |
| 1106 core.int version; | 1060 core.int version; |
| 1107 | 1061 |
| 1108 Policy(); | 1062 Policy(); |
| 1109 | 1063 |
| 1110 Policy.fromJson(core.Map _json) { | 1064 Policy.fromJson(core.Map _json) { |
| 1111 if (_json.containsKey("bindings")) { | 1065 if (_json.containsKey("bindings")) { |
| 1112 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); | 1066 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); |
| 1113 } | 1067 } |
| 1114 if (_json.containsKey("etag")) { | 1068 if (_json.containsKey("etag")) { |
| 1115 etag = _json["etag"]; | 1069 etag = _json["etag"]; |
| 1116 } | 1070 } |
| 1117 if (_json.containsKey("rules")) { | |
| 1118 rules = _json["rules"].map((value) => new Rule.fromJson(value)).toList(); | |
| 1119 } | |
| 1120 if (_json.containsKey("version")) { | 1071 if (_json.containsKey("version")) { |
| 1121 version = _json["version"]; | 1072 version = _json["version"]; |
| 1122 } | 1073 } |
| 1123 } | 1074 } |
| 1124 | 1075 |
| 1125 core.Map toJson() { | 1076 core.Map toJson() { |
| 1126 var _json = new core.Map(); | 1077 var _json = new core.Map(); |
| 1127 if (bindings != null) { | 1078 if (bindings != null) { |
| 1128 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); | 1079 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); |
| 1129 } | 1080 } |
| 1130 if (etag != null) { | 1081 if (etag != null) { |
| 1131 _json["etag"] = etag; | 1082 _json["etag"] = etag; |
| 1132 } | 1083 } |
| 1133 if (rules != null) { | |
| 1134 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | |
| 1135 } | |
| 1136 if (version != null) { | 1084 if (version != null) { |
| 1137 _json["version"] = version; | 1085 _json["version"] = version; |
| 1138 } | 1086 } |
| 1139 return _json; | 1087 return _json; |
| 1140 } | 1088 } |
| 1141 } | 1089 } |
| 1142 | 1090 |
| 1143 /** A rule to be applied in a Policy. */ | 1091 /** The difference delta between two policies. */ |
| 1144 class Rule { | 1092 class PolicyDelta { |
| 1145 /** | 1093 /** The delta for Bindings between two policies. */ |
| 1146 * Required | 1094 core.List<BindingDelta> bindingDeltas; |
| 1147 * Possible string values are: | |
| 1148 * - "NO_ACTION" : A NO_ACTION. | |
| 1149 * - "ALLOW" : A ALLOW. | |
| 1150 * - "ALLOW_WITH_LOG" : A ALLOW_WITH_LOG. | |
| 1151 * - "DENY" : A DENY. | |
| 1152 * - "DENY_WITH_LOG" : A DENY_WITH_LOG. | |
| 1153 * - "LOG" : A LOG. | |
| 1154 */ | |
| 1155 core.String action; | |
| 1156 /** Additional restrictions that must be met */ | |
| 1157 core.List<Condition> conditions; | |
| 1158 /** Human-readable description of the rule. */ | |
| 1159 core.String description; | |
| 1160 /** | |
| 1161 * The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of | |
| 1162 * entries. | |
| 1163 */ | |
| 1164 core.List<core.String> in_; | |
| 1165 /** | |
| 1166 * The config returned to callers of tech.iam.IAM.CheckPolicy for any entries | |
| 1167 * that match the LOG action. | |
| 1168 */ | |
| 1169 core.List<LogConfig> logConfig; | |
| 1170 /** | |
| 1171 * The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of | |
| 1172 * entries. The format for in and not_in entries is the same as for members in | |
| 1173 * a Binding (see google/iam/v1/policy.proto). | |
| 1174 */ | |
| 1175 core.List<core.String> notIn; | |
| 1176 /** | |
| 1177 * A permission is a string of form '..' (e.g., 'storage.buckets.list'). A | |
| 1178 * value of '*' matches all permissions, and a verb part of '*' (e.g., | |
| 1179 * 'storage.buckets.*') matches all verbs. | |
| 1180 */ | |
| 1181 core.List<core.String> permissions; | |
| 1182 | 1095 |
| 1183 Rule(); | 1096 PolicyDelta(); |
| 1184 | 1097 |
| 1185 Rule.fromJson(core.Map _json) { | 1098 PolicyDelta.fromJson(core.Map _json) { |
| 1186 if (_json.containsKey("action")) { | 1099 if (_json.containsKey("bindingDeltas")) { |
| 1187 action = _json["action"]; | 1100 bindingDeltas = _json["bindingDeltas"].map((value) => new BindingDelta.fro
mJson(value)).toList(); |
| 1188 } | |
| 1189 if (_json.containsKey("conditions")) { | |
| 1190 conditions = _json["conditions"].map((value) => new Condition.fromJson(val
ue)).toList(); | |
| 1191 } | |
| 1192 if (_json.containsKey("description")) { | |
| 1193 description = _json["description"]; | |
| 1194 } | |
| 1195 if (_json.containsKey("in")) { | |
| 1196 in_ = _json["in"]; | |
| 1197 } | |
| 1198 if (_json.containsKey("logConfig")) { | |
| 1199 logConfig = _json["logConfig"].map((value) => new LogConfig.fromJson(value
)).toList(); | |
| 1200 } | |
| 1201 if (_json.containsKey("notIn")) { | |
| 1202 notIn = _json["notIn"]; | |
| 1203 } | |
| 1204 if (_json.containsKey("permissions")) { | |
| 1205 permissions = _json["permissions"]; | |
| 1206 } | 1101 } |
| 1207 } | 1102 } |
| 1208 | 1103 |
| 1209 core.Map toJson() { | 1104 core.Map toJson() { |
| 1210 var _json = new core.Map(); | 1105 var _json = new core.Map(); |
| 1211 if (action != null) { | 1106 if (bindingDeltas != null) { |
| 1212 _json["action"] = action; | 1107 _json["bindingDeltas"] = bindingDeltas.map((value) => (value).toJson()).to
List(); |
| 1213 } | 1108 } |
| 1214 if (conditions != null) { | 1109 return _json; |
| 1215 _json["conditions"] = conditions.map((value) => (value).toJson()).toList()
; | 1110 } |
| 1111 } |
| 1112 |
| 1113 /** The grantable role query request. */ |
| 1114 class QueryGrantableRolesRequest { |
| 1115 /** |
| 1116 * Required. The full resource name to query from the list of grantable roles. |
| 1117 * The name follows the Google Cloud Platform resource format. For example, a |
| 1118 * Cloud Platform project with id `my-project` will be named |
| 1119 * `//cloudresourcemanager.googleapis.com/projects/my-project`. |
| 1120 */ |
| 1121 core.String fullResourceName; |
| 1122 |
| 1123 QueryGrantableRolesRequest(); |
| 1124 |
| 1125 QueryGrantableRolesRequest.fromJson(core.Map _json) { |
| 1126 if (_json.containsKey("fullResourceName")) { |
| 1127 fullResourceName = _json["fullResourceName"]; |
| 1216 } | 1128 } |
| 1129 } |
| 1130 |
| 1131 core.Map toJson() { |
| 1132 var _json = new core.Map(); |
| 1133 if (fullResourceName != null) { |
| 1134 _json["fullResourceName"] = fullResourceName; |
| 1135 } |
| 1136 return _json; |
| 1137 } |
| 1138 } |
| 1139 |
| 1140 /** The grantable role query response. */ |
| 1141 class QueryGrantableRolesResponse { |
| 1142 /** The list of matching roles. */ |
| 1143 core.List<Role> roles; |
| 1144 |
| 1145 QueryGrantableRolesResponse(); |
| 1146 |
| 1147 QueryGrantableRolesResponse.fromJson(core.Map _json) { |
| 1148 if (_json.containsKey("roles")) { |
| 1149 roles = _json["roles"].map((value) => new Role.fromJson(value)).toList(); |
| 1150 } |
| 1151 } |
| 1152 |
| 1153 core.Map toJson() { |
| 1154 var _json = new core.Map(); |
| 1155 if (roles != null) { |
| 1156 _json["roles"] = roles.map((value) => (value).toJson()).toList(); |
| 1157 } |
| 1158 return _json; |
| 1159 } |
| 1160 } |
| 1161 |
| 1162 /** A role in the Identity and Access Management API. */ |
| 1163 class Role { |
| 1164 /** Optional. A human-readable description for the role. */ |
| 1165 core.String description; |
| 1166 /** |
| 1167 * The name of the role. When Role is used in CreateRole, the role name must |
| 1168 * not be set. When Role is used in output and other input such as UpdateRole, |
| 1169 * the role name is the complete path, e.g., roles/logging.viewer for curated |
| 1170 * roles and organizations/{organization-id}/roles/logging.viewer for custom |
| 1171 * roles. |
| 1172 */ |
| 1173 core.String name; |
| 1174 /** |
| 1175 * Optional. A human-readable title for the role. Typically this is limited to |
| 1176 * 100 UTF-8 bytes. |
| 1177 */ |
| 1178 core.String title; |
| 1179 |
| 1180 Role(); |
| 1181 |
| 1182 Role.fromJson(core.Map _json) { |
| 1183 if (_json.containsKey("description")) { |
| 1184 description = _json["description"]; |
| 1185 } |
| 1186 if (_json.containsKey("name")) { |
| 1187 name = _json["name"]; |
| 1188 } |
| 1189 if (_json.containsKey("title")) { |
| 1190 title = _json["title"]; |
| 1191 } |
| 1192 } |
| 1193 |
| 1194 core.Map toJson() { |
| 1195 var _json = new core.Map(); |
| 1217 if (description != null) { | 1196 if (description != null) { |
| 1218 _json["description"] = description; | 1197 _json["description"] = description; |
| 1219 } | 1198 } |
| 1220 if (in_ != null) { | 1199 if (name != null) { |
| 1221 _json["in"] = in_; | 1200 _json["name"] = name; |
| 1222 } | 1201 } |
| 1223 if (logConfig != null) { | 1202 if (title != null) { |
| 1224 _json["logConfig"] = logConfig.map((value) => (value).toJson()).toList(); | 1203 _json["title"] = title; |
| 1225 } | |
| 1226 if (notIn != null) { | |
| 1227 _json["notIn"] = notIn; | |
| 1228 } | |
| 1229 if (permissions != null) { | |
| 1230 _json["permissions"] = permissions; | |
| 1231 } | 1204 } |
| 1232 return _json; | 1205 return _json; |
| 1233 } | 1206 } |
| 1234 } | 1207 } |
| 1235 | 1208 |
| 1236 /** | 1209 /** |
| 1237 * A service account in the Identity and Access Management API. To create a | 1210 * A service account in the Identity and Access Management API. To create a |
| 1238 * service account, you specify the project_id and account_id for the account. | 1211 * service account, specify the `project_id` and the `account_id` for the |
| 1239 * The account_id is unique within the project, and used to generate the service | 1212 * account. The `account_id` is unique within the project, and is used to |
| 1240 * account email address and a stable unique id. All other methods can identify | 1213 * generate the service account email address and a stable `unique_id`. If the |
| 1241 * accounts using the format "projects/{project}/serviceAccounts/{account}". | 1214 * account already exists, the account's resource name is returned in |
| 1242 * Using '-' as a wildcard for the project, will infer the project from the | 1215 * util::Status's ResourceInfo.resource_name in the format of |
| 1243 * account. The account value can be the email address or the unique_id of the | 1216 * projects/{project}/serviceAccounts/{email}. The caller can use the name in |
| 1244 * service account. | 1217 * other methods to access the account. All other methods can identify the |
| 1218 * service account using the format |
| 1219 * `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for |
| 1220 * the project will infer the project from the account. The `account` value can |
| 1221 * be the `email` address or the `unique_id` of the service account. |
| 1245 */ | 1222 */ |
| 1246 class ServiceAccount { | 1223 class ServiceAccount { |
| 1247 /** | 1224 /** |
| 1248 * Optional. A user-specified description of the service account. Must be | 1225 * Optional. A user-specified description of the service account. Must be |
| 1249 * fewer than 100 UTF-8 bytes. | 1226 * fewer than 100 UTF-8 bytes. |
| 1250 */ | 1227 */ |
| 1251 core.String displayName; | 1228 core.String displayName; |
| 1252 /** @OutputOnly Email address of the service account. */ | 1229 /** @OutputOnly The email address of the service account. */ |
| 1253 core.String email; | 1230 core.String email; |
| 1254 /** Used to perform a consistent read-modify-write. */ | 1231 /** Used to perform a consistent read-modify-write. */ |
| 1255 core.String etag; | 1232 core.String etag; |
| 1256 core.List<core.int> get etagAsBytes { | 1233 core.List<core.int> get etagAsBytes { |
| 1257 return convert.BASE64.decode(etag); | 1234 return convert.BASE64.decode(etag); |
| 1258 } | 1235 } |
| 1259 | 1236 |
| 1260 void set etagAsBytes(core.List<core.int> _bytes) { | 1237 void set etagAsBytes(core.List<core.int> _bytes) { |
| 1261 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 1238 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 1262 } | 1239 } |
| 1263 /** | 1240 /** |
| 1264 * The resource name of the service account in the format | 1241 * The resource name of the service account in the following format: |
| 1265 * "projects/{project}/serviceAccounts/{account}". In requests using '-' as a | 1242 * `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a |
| 1266 * wildcard for the project, will infer the project from the account and the | 1243 * wildcard for the project will infer the project from the `account` and the |
| 1267 * account value can be the email address or the unique_id of the service | 1244 * `account` value can be the `email` address or the `unique_id` of the |
| 1268 * account. In responses the resource name will always be in the format | 1245 * service account. In responses the resource name will always be in the |
| 1269 * "projects/{project}/serviceAccounts/{email}". | 1246 * format `projects/{project}/serviceAccounts/{email}`. |
| 1270 */ | 1247 */ |
| 1271 core.String name; | 1248 core.String name; |
| 1272 /** | 1249 /** |
| 1273 * @OutputOnly. The OAuth2 client id for the service account. This is used in | 1250 * @OutputOnly. The OAuth2 client id for the service account. This is used in |
| 1274 * conjunction with the OAuth2 clientconfig API to make three legged OAuth2 | 1251 * conjunction with the OAuth2 clientconfig API to make three legged OAuth2 |
| 1275 * (3LO) flows to access the data of Google users. | 1252 * (3LO) flows to access the data of Google users. |
| 1276 */ | 1253 */ |
| 1277 core.String oauth2ClientId; | 1254 core.String oauth2ClientId; |
| 1278 /** @OutputOnly The id of the project that owns the service account. */ | 1255 /** @OutputOnly The id of the project that owns the service account. */ |
| 1279 core.String projectId; | 1256 core.String projectId; |
| 1280 /** @OutputOnly unique and stable id of the service account. */ | 1257 /** @OutputOnly The unique and stable id of the service account. */ |
| 1281 core.String uniqueId; | 1258 core.String uniqueId; |
| 1282 | 1259 |
| 1283 ServiceAccount(); | 1260 ServiceAccount(); |
| 1284 | 1261 |
| 1285 ServiceAccount.fromJson(core.Map _json) { | 1262 ServiceAccount.fromJson(core.Map _json) { |
| 1286 if (_json.containsKey("displayName")) { | 1263 if (_json.containsKey("displayName")) { |
| 1287 displayName = _json["displayName"]; | 1264 displayName = _json["displayName"]; |
| 1288 } | 1265 } |
| 1289 if (_json.containsKey("email")) { | 1266 if (_json.containsKey("email")) { |
| 1290 email = _json["email"]; | 1267 email = _json["email"]; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 _json["projectId"] = projectId; | 1304 _json["projectId"] = projectId; |
| 1328 } | 1305 } |
| 1329 if (uniqueId != null) { | 1306 if (uniqueId != null) { |
| 1330 _json["uniqueId"] = uniqueId; | 1307 _json["uniqueId"] = uniqueId; |
| 1331 } | 1308 } |
| 1332 return _json; | 1309 return _json; |
| 1333 } | 1310 } |
| 1334 } | 1311 } |
| 1335 | 1312 |
| 1336 /** | 1313 /** |
| 1337 * Represents a service account key. A service account can have 0 or more key | 1314 * Represents a service account key. A service account has two sets of |
| 1338 * pairs. The private keys for these are not stored by Google. | 1315 * key-pairs: user-managed, and system-managed. User-managed key-pairs can be |
| 1339 * ServiceAccountKeys are immutable. | 1316 * created and deleted by users. Users are responsible for rotating these keys |
| 1317 * periodically to ensure security of their service accounts. Users retain the |
| 1318 * private key of these key-pairs, and Google retains ONLY the public key. |
| 1319 * System-managed key-pairs are managed automatically by Google, and rotated |
| 1320 * daily without user intervention. The private key never leaves Google's |
| 1321 * servers to maximize security. Public keys for all service accounts are also |
| 1322 * published at the OAuth2 Service Account API. |
| 1340 */ | 1323 */ |
| 1341 class ServiceAccountKey { | 1324 class ServiceAccountKey { |
| 1342 /** | 1325 /** |
| 1343 * The resource name of the service account key in the format | 1326 * Specifies the algorithm (and possibly key size) for the key. |
| 1344 * "projects/{project}/serviceAccounts/{email}/keys/{key}". | 1327 * Possible string values are: |
| 1328 * - "KEY_ALG_UNSPECIFIED" : A KEY_ALG_UNSPECIFIED. |
| 1329 * - "KEY_ALG_RSA_1024" : A KEY_ALG_RSA_1024. |
| 1330 * - "KEY_ALG_RSA_2048" : A KEY_ALG_RSA_2048. |
| 1331 */ |
| 1332 core.String keyAlgorithm; |
| 1333 /** |
| 1334 * The resource name of the service account key in the following format |
| 1335 * `projects/{project}/serviceAccounts/{account}/keys/{key}`. |
| 1345 */ | 1336 */ |
| 1346 core.String name; | 1337 core.String name; |
| 1347 /** The key data. */ | 1338 /** |
| 1339 * The private key data. Only provided in `CreateServiceAccountKey` responses. |
| 1340 */ |
| 1348 core.String privateKeyData; | 1341 core.String privateKeyData; |
| 1349 core.List<core.int> get privateKeyDataAsBytes { | 1342 core.List<core.int> get privateKeyDataAsBytes { |
| 1350 return convert.BASE64.decode(privateKeyData); | 1343 return convert.BASE64.decode(privateKeyData); |
| 1351 } | 1344 } |
| 1352 | 1345 |
| 1353 void set privateKeyDataAsBytes(core.List<core.int> _bytes) { | 1346 void set privateKeyDataAsBytes(core.List<core.int> _bytes) { |
| 1354 privateKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA
ll("+", "-"); | 1347 privateKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA
ll("+", "-"); |
| 1355 } | 1348 } |
| 1356 /** | 1349 /** |
| 1357 * The type of the private key. | 1350 * The output format for the private key. Only provided in |
| 1351 * `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or |
| 1352 * `ListServiceAccountKey` responses. Google never exposes system-managed |
| 1353 * private keys, and never retains user-managed private keys. |
| 1358 * Possible string values are: | 1354 * Possible string values are: |
| 1359 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED. | 1355 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED. |
| 1360 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE. | 1356 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE. |
| 1361 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE. | 1357 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE. |
| 1362 */ | 1358 */ |
| 1363 core.String privateKeyType; | 1359 core.String privateKeyType; |
| 1360 /** |
| 1361 * The public key data. Only provided in `GetServiceAccountKey` responses. |
| 1362 */ |
| 1363 core.String publicKeyData; |
| 1364 core.List<core.int> get publicKeyDataAsBytes { |
| 1365 return convert.BASE64.decode(publicKeyData); |
| 1366 } |
| 1367 |
| 1368 void set publicKeyDataAsBytes(core.List<core.int> _bytes) { |
| 1369 publicKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAl
l("+", "-"); |
| 1370 } |
| 1364 /** The key can be used after this timestamp. */ | 1371 /** The key can be used after this timestamp. */ |
| 1365 core.String validAfterTime; | 1372 core.String validAfterTime; |
| 1366 /** The key can be used before this timestamp. */ | 1373 /** The key can be used before this timestamp. */ |
| 1367 core.String validBeforeTime; | 1374 core.String validBeforeTime; |
| 1368 | 1375 |
| 1369 ServiceAccountKey(); | 1376 ServiceAccountKey(); |
| 1370 | 1377 |
| 1371 ServiceAccountKey.fromJson(core.Map _json) { | 1378 ServiceAccountKey.fromJson(core.Map _json) { |
| 1379 if (_json.containsKey("keyAlgorithm")) { |
| 1380 keyAlgorithm = _json["keyAlgorithm"]; |
| 1381 } |
| 1372 if (_json.containsKey("name")) { | 1382 if (_json.containsKey("name")) { |
| 1373 name = _json["name"]; | 1383 name = _json["name"]; |
| 1374 } | 1384 } |
| 1375 if (_json.containsKey("privateKeyData")) { | 1385 if (_json.containsKey("privateKeyData")) { |
| 1376 privateKeyData = _json["privateKeyData"]; | 1386 privateKeyData = _json["privateKeyData"]; |
| 1377 } | 1387 } |
| 1378 if (_json.containsKey("privateKeyType")) { | 1388 if (_json.containsKey("privateKeyType")) { |
| 1379 privateKeyType = _json["privateKeyType"]; | 1389 privateKeyType = _json["privateKeyType"]; |
| 1380 } | 1390 } |
| 1391 if (_json.containsKey("publicKeyData")) { |
| 1392 publicKeyData = _json["publicKeyData"]; |
| 1393 } |
| 1381 if (_json.containsKey("validAfterTime")) { | 1394 if (_json.containsKey("validAfterTime")) { |
| 1382 validAfterTime = _json["validAfterTime"]; | 1395 validAfterTime = _json["validAfterTime"]; |
| 1383 } | 1396 } |
| 1384 if (_json.containsKey("validBeforeTime")) { | 1397 if (_json.containsKey("validBeforeTime")) { |
| 1385 validBeforeTime = _json["validBeforeTime"]; | 1398 validBeforeTime = _json["validBeforeTime"]; |
| 1386 } | 1399 } |
| 1387 } | 1400 } |
| 1388 | 1401 |
| 1389 core.Map toJson() { | 1402 core.Map toJson() { |
| 1390 var _json = new core.Map(); | 1403 var _json = new core.Map(); |
| 1404 if (keyAlgorithm != null) { |
| 1405 _json["keyAlgorithm"] = keyAlgorithm; |
| 1406 } |
| 1391 if (name != null) { | 1407 if (name != null) { |
| 1392 _json["name"] = name; | 1408 _json["name"] = name; |
| 1393 } | 1409 } |
| 1394 if (privateKeyData != null) { | 1410 if (privateKeyData != null) { |
| 1395 _json["privateKeyData"] = privateKeyData; | 1411 _json["privateKeyData"] = privateKeyData; |
| 1396 } | 1412 } |
| 1397 if (privateKeyType != null) { | 1413 if (privateKeyType != null) { |
| 1398 _json["privateKeyType"] = privateKeyType; | 1414 _json["privateKeyType"] = privateKeyType; |
| 1399 } | 1415 } |
| 1416 if (publicKeyData != null) { |
| 1417 _json["publicKeyData"] = publicKeyData; |
| 1418 } |
| 1400 if (validAfterTime != null) { | 1419 if (validAfterTime != null) { |
| 1401 _json["validAfterTime"] = validAfterTime; | 1420 _json["validAfterTime"] = validAfterTime; |
| 1402 } | 1421 } |
| 1403 if (validBeforeTime != null) { | 1422 if (validBeforeTime != null) { |
| 1404 _json["validBeforeTime"] = validBeforeTime; | 1423 _json["validBeforeTime"] = validBeforeTime; |
| 1405 } | 1424 } |
| 1406 return _json; | 1425 return _json; |
| 1407 } | 1426 } |
| 1408 } | 1427 } |
| 1409 | 1428 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1428 var _json = new core.Map(); | 1447 var _json = new core.Map(); |
| 1429 if (policy != null) { | 1448 if (policy != null) { |
| 1430 _json["policy"] = (policy).toJson(); | 1449 _json["policy"] = (policy).toJson(); |
| 1431 } | 1450 } |
| 1432 return _json; | 1451 return _json; |
| 1433 } | 1452 } |
| 1434 } | 1453 } |
| 1435 | 1454 |
| 1436 /** The service account sign blob request. */ | 1455 /** The service account sign blob request. */ |
| 1437 class SignBlobRequest { | 1456 class SignBlobRequest { |
| 1438 /** The bytes to sign */ | 1457 /** The bytes to sign. */ |
| 1439 core.String bytesToSign; | 1458 core.String bytesToSign; |
| 1440 core.List<core.int> get bytesToSignAsBytes { | 1459 core.List<core.int> get bytesToSignAsBytes { |
| 1441 return convert.BASE64.decode(bytesToSign); | 1460 return convert.BASE64.decode(bytesToSign); |
| 1442 } | 1461 } |
| 1443 | 1462 |
| 1444 void set bytesToSignAsBytes(core.List<core.int> _bytes) { | 1463 void set bytesToSignAsBytes(core.List<core.int> _bytes) { |
| 1445 bytesToSign = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); | 1464 bytesToSign = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); |
| 1446 } | 1465 } |
| 1447 | 1466 |
| 1448 SignBlobRequest(); | 1467 SignBlobRequest(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 } | 1516 } |
| 1498 return _json; | 1517 return _json; |
| 1499 } | 1518 } |
| 1500 } | 1519 } |
| 1501 | 1520 |
| 1502 /** Request message for `TestIamPermissions` method. */ | 1521 /** Request message for `TestIamPermissions` method. */ |
| 1503 class TestIamPermissionsRequest { | 1522 class TestIamPermissionsRequest { |
| 1504 /** | 1523 /** |
| 1505 * The set of permissions to check for the `resource`. Permissions with | 1524 * The set of permissions to check for the `resource`. Permissions with |
| 1506 * wildcards (such as '*' or 'storage.*') are not allowed. For more | 1525 * wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 1507 * information see IAM Overview. | 1526 * information see [IAM |
| 1527 * Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| 1508 */ | 1528 */ |
| 1509 core.List<core.String> permissions; | 1529 core.List<core.String> permissions; |
| 1510 | 1530 |
| 1511 TestIamPermissionsRequest(); | 1531 TestIamPermissionsRequest(); |
| 1512 | 1532 |
| 1513 TestIamPermissionsRequest.fromJson(core.Map _json) { | 1533 TestIamPermissionsRequest.fromJson(core.Map _json) { |
| 1514 if (_json.containsKey("permissions")) { | 1534 if (_json.containsKey("permissions")) { |
| 1515 permissions = _json["permissions"]; | 1535 permissions = _json["permissions"]; |
| 1516 } | 1536 } |
| 1517 } | 1537 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1542 } | 1562 } |
| 1543 | 1563 |
| 1544 core.Map toJson() { | 1564 core.Map toJson() { |
| 1545 var _json = new core.Map(); | 1565 var _json = new core.Map(); |
| 1546 if (permissions != null) { | 1566 if (permissions != null) { |
| 1547 _json["permissions"] = permissions; | 1567 _json["permissions"] = permissions; |
| 1548 } | 1568 } |
| 1549 return _json; | 1569 return _json; |
| 1550 } | 1570 } |
| 1551 } | 1571 } |
| OLD | NEW |