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.spanner.v1; | 3 library googleapis.spanner.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 /** | 395 /** |
396 * Lists all instances in the given project. | 396 * Lists all instances in the given project. |
397 * | 397 * |
398 * Request parameters: | 398 * Request parameters: |
399 * | 399 * |
400 * [parent] - Required. The name of the project for which a list of instances | 400 * [parent] - Required. The name of the project for which a list of instances |
401 * is | 401 * is |
402 * requested. Values are of the form `projects/<project>`. | 402 * requested. Values are of the form `projects/<project>`. |
403 * Value must have pattern "^projects/[^/]+$". | 403 * Value must have pattern "^projects/[^/]+$". |
404 * | 404 * |
| 405 * [pageToken] - If non-empty, `page_token` should contain a |
| 406 * next_page_token from a |
| 407 * previous ListInstancesResponse. |
| 408 * |
| 409 * [pageSize] - Number of instances to be returned in the response. If 0 or |
| 410 * less, defaults |
| 411 * to the server's maximum allowed page size. |
| 412 * |
405 * [filter] - An expression for filtering the results of the request. Filter | 413 * [filter] - An expression for filtering the results of the request. Filter |
406 * rules are | 414 * rules are |
407 * case insensitive. The fields eligible for filtering are: | 415 * case insensitive. The fields eligible for filtering are: |
408 * | 416 * |
409 * * name | 417 * * name |
410 * * display_name | 418 * * display_name |
411 * * labels.key where key is the name of a label | 419 * * labels.key where key is the name of a label |
412 * | 420 * |
413 * Some examples of using filters are: | 421 * Some examples of using filters are: |
414 * | 422 * |
415 * * name:* --> The instance has a name. | 423 * * name:* --> The instance has a name. |
416 * * name:Howl --> The instance's name contains the string "howl". | 424 * * name:Howl --> The instance's name contains the string "howl". |
417 * * name:HOWL --> Equivalent to above. | 425 * * name:HOWL --> Equivalent to above. |
418 * * NAME:howl --> Equivalent to above. | 426 * * NAME:howl --> Equivalent to above. |
419 * * labels.env:* --> The instance has the label "env". | 427 * * labels.env:* --> The instance has the label "env". |
420 * * labels.env:dev --> The instance has the label "env" and the value of | 428 * * labels.env:dev --> The instance has the label "env" and the value of |
421 * the label contains the string "dev". | 429 * the label contains the string "dev". |
422 * * name:howl labels.env:dev --> The instance's name contains "howl" and | 430 * * name:howl labels.env:dev --> The instance's name contains "howl" and |
423 * it has the label "env" with its value | 431 * it has the label "env" with its value |
424 * containing "dev". | 432 * containing "dev". |
425 * | 433 * |
426 * [pageToken] - If non-empty, `page_token` should contain a | |
427 * next_page_token from a | |
428 * previous ListInstancesResponse. | |
429 * | |
430 * [pageSize] - Number of instances to be returned in the response. If 0 or | |
431 * less, defaults | |
432 * to the server's maximum allowed page size. | |
433 * | |
434 * Completes with a [ListInstancesResponse]. | 434 * Completes with a [ListInstancesResponse]. |
435 * | 435 * |
436 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 436 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
437 * error. | 437 * error. |
438 * | 438 * |
439 * If the used [http.Client] completes with an error when making a REST call, | 439 * If the used [http.Client] completes with an error when making a REST call, |
440 * this method will complete with the same error. | 440 * this method will complete with the same error. |
441 */ | 441 */ |
442 async.Future<ListInstancesResponse> list(core.String parent, {core.String filt
er, core.String pageToken, core.int pageSize}) { | 442 async.Future<ListInstancesResponse> list(core.String parent, {core.String page
Token, core.int pageSize, core.String filter}) { |
443 var _url = null; | 443 var _url = null; |
444 var _queryParams = new core.Map(); | 444 var _queryParams = new core.Map(); |
445 var _uploadMedia = null; | 445 var _uploadMedia = null; |
446 var _uploadOptions = null; | 446 var _uploadOptions = null; |
447 var _downloadOptions = commons.DownloadOptions.Metadata; | 447 var _downloadOptions = commons.DownloadOptions.Metadata; |
448 var _body = null; | 448 var _body = null; |
449 | 449 |
450 if (parent == null) { | 450 if (parent == null) { |
451 throw new core.ArgumentError("Parameter parent is required."); | 451 throw new core.ArgumentError("Parameter parent is required."); |
452 } | 452 } |
453 if (filter != null) { | |
454 _queryParams["filter"] = [filter]; | |
455 } | |
456 if (pageToken != null) { | 453 if (pageToken != null) { |
457 _queryParams["pageToken"] = [pageToken]; | 454 _queryParams["pageToken"] = [pageToken]; |
458 } | 455 } |
459 if (pageSize != null) { | 456 if (pageSize != null) { |
460 _queryParams["pageSize"] = ["${pageSize}"]; | 457 _queryParams["pageSize"] = ["${pageSize}"]; |
461 } | 458 } |
| 459 if (filter != null) { |
| 460 _queryParams["filter"] = [filter]; |
| 461 } |
462 | 462 |
463 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/instance
s'; | 463 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/instance
s'; |
464 | 464 |
465 var _response = _requester.request(_url, | 465 var _response = _requester.request(_url, |
466 "GET", | 466 "GET", |
467 body: _body, | 467 body: _body, |
468 queryParams: _queryParams, | 468 queryParams: _queryParams, |
469 uploadOptions: _uploadOptions, | 469 uploadOptions: _uploadOptions, |
470 uploadMedia: _uploadMedia, | 470 uploadMedia: _uploadMedia, |
471 downloadOptions: _downloadOptions); | 471 downloadOptions: _downloadOptions); |
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 if (exemptedMembers != null) { | 2217 if (exemptedMembers != null) { |
2218 _json["exemptedMembers"] = exemptedMembers; | 2218 _json["exemptedMembers"] = exemptedMembers; |
2219 } | 2219 } |
2220 if (logType != null) { | 2220 if (logType != null) { |
2221 _json["logType"] = logType; | 2221 _json["logType"] = logType; |
2222 } | 2222 } |
2223 return _json; | 2223 return _json; |
2224 } | 2224 } |
2225 } | 2225 } |
2226 | 2226 |
| 2227 /** Authorization-related information used by Cloud Audit Logging. */ |
| 2228 class AuthorizationLoggingOptions { |
| 2229 /** |
| 2230 * The type of the permission that was checked. |
| 2231 * Possible string values are: |
| 2232 * - "PERMISSION_TYPE_UNSPECIFIED" : Default. Should not be used. |
| 2233 * - "ADMIN_READ" : A read of admin (meta) data. |
| 2234 * - "ADMIN_WRITE" : A write of admin (meta) data. |
| 2235 * - "DATA_READ" : A read of standard data. |
| 2236 * - "DATA_WRITE" : A write of standard data. |
| 2237 */ |
| 2238 core.String permissionType; |
| 2239 |
| 2240 AuthorizationLoggingOptions(); |
| 2241 |
| 2242 AuthorizationLoggingOptions.fromJson(core.Map _json) { |
| 2243 if (_json.containsKey("permissionType")) { |
| 2244 permissionType = _json["permissionType"]; |
| 2245 } |
| 2246 } |
| 2247 |
| 2248 core.Map<core.String, core.Object> toJson() { |
| 2249 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 2250 if (permissionType != null) { |
| 2251 _json["permissionType"] = permissionType; |
| 2252 } |
| 2253 return _json; |
| 2254 } |
| 2255 } |
| 2256 |
2227 /** The request for BeginTransaction. */ | 2257 /** The request for BeginTransaction. */ |
2228 class BeginTransactionRequest { | 2258 class BeginTransactionRequest { |
2229 /** Required. Options for the new transaction. */ | 2259 /** Required. Options for the new transaction. */ |
2230 TransactionOptions options; | 2260 TransactionOptions options; |
2231 | 2261 |
2232 BeginTransactionRequest(); | 2262 BeginTransactionRequest(); |
2233 | 2263 |
2234 BeginTransactionRequest.fromJson(core.Map _json) { | 2264 BeginTransactionRequest.fromJson(core.Map _json) { |
2235 if (_json.containsKey("options")) { | 2265 if (_json.containsKey("options")) { |
2236 options = new TransactionOptions.fromJson(_json["options"]); | 2266 options = new TransactionOptions.fromJson(_json["options"]); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 } | 2397 } |
2368 if (variable != null) { | 2398 if (variable != null) { |
2369 _json["variable"] = variable; | 2399 _json["variable"] = variable; |
2370 } | 2400 } |
2371 return _json; | 2401 return _json; |
2372 } | 2402 } |
2373 } | 2403 } |
2374 | 2404 |
2375 /** Write a Cloud Audit log */ | 2405 /** Write a Cloud Audit log */ |
2376 class CloudAuditOptions { | 2406 class CloudAuditOptions { |
| 2407 /** Information used by the Cloud Audit Logging pipeline. */ |
| 2408 AuthorizationLoggingOptions authorizationLoggingOptions; |
2377 /** | 2409 /** |
2378 * The log_name to populate in the Cloud Audit Record. | 2410 * The log_name to populate in the Cloud Audit Record. |
2379 * Possible string values are: | 2411 * Possible string values are: |
2380 * - "UNSPECIFIED_LOG_NAME" : Default. Should not be used. | 2412 * - "UNSPECIFIED_LOG_NAME" : Default. Should not be used. |
2381 * - "ADMIN_ACTIVITY" : Corresponds to "cloudaudit.googleapis.com/activity" | 2413 * - "ADMIN_ACTIVITY" : Corresponds to "cloudaudit.googleapis.com/activity" |
2382 * - "DATA_ACCESS" : Corresponds to "cloudaudit.googleapis.com/data_access" | 2414 * - "DATA_ACCESS" : Corresponds to "cloudaudit.googleapis.com/data_access" |
2383 */ | 2415 */ |
2384 core.String logName; | 2416 core.String logName; |
2385 | 2417 |
2386 CloudAuditOptions(); | 2418 CloudAuditOptions(); |
2387 | 2419 |
2388 CloudAuditOptions.fromJson(core.Map _json) { | 2420 CloudAuditOptions.fromJson(core.Map _json) { |
| 2421 if (_json.containsKey("authorizationLoggingOptions")) { |
| 2422 authorizationLoggingOptions = new AuthorizationLoggingOptions.fromJson(_js
on["authorizationLoggingOptions"]); |
| 2423 } |
2389 if (_json.containsKey("logName")) { | 2424 if (_json.containsKey("logName")) { |
2390 logName = _json["logName"]; | 2425 logName = _json["logName"]; |
2391 } | 2426 } |
2392 } | 2427 } |
2393 | 2428 |
2394 core.Map<core.String, core.Object> toJson() { | 2429 core.Map<core.String, core.Object> toJson() { |
2395 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2430 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 2431 if (authorizationLoggingOptions != null) { |
| 2432 _json["authorizationLoggingOptions"] = (authorizationLoggingOptions).toJso
n(); |
| 2433 } |
2396 if (logName != null) { | 2434 if (logName != null) { |
2397 _json["logName"] = logName; | 2435 _json["logName"] = logName; |
2398 } | 2436 } |
2399 return _json; | 2437 return _json; |
2400 } | 2438 } |
2401 } | 2439 } |
2402 | 2440 |
2403 /** The request for Commit. */ | 2441 /** The request for Commit. */ |
2404 class CommitRequest { | 2442 class CommitRequest { |
2405 /** | 2443 /** |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3029 * expression: "size(request.user) > 0" | 3067 * expression: "size(request.user) > 0" |
3030 */ | 3068 */ |
3031 class Expr { | 3069 class Expr { |
3032 /** | 3070 /** |
3033 * An optional description of the expression. This is a longer text which | 3071 * An optional description of the expression. This is a longer text which |
3034 * describes the expression, e.g. when hovered over it in a UI. | 3072 * describes the expression, e.g. when hovered over it in a UI. |
3035 */ | 3073 */ |
3036 core.String description; | 3074 core.String description; |
3037 /** | 3075 /** |
3038 * Textual representation of an expression in | 3076 * Textual representation of an expression in |
3039 * [Common Expression Language](http://go/api-expr) syntax. | 3077 * Common Expression Language syntax. |
3040 * | 3078 * |
3041 * The application context of the containing message determines which | 3079 * The application context of the containing message determines which |
3042 * well-known feature set of CEL is supported. | 3080 * well-known feature set of CEL is supported. |
3043 */ | 3081 */ |
3044 core.String expression; | 3082 core.String expression; |
3045 /** | 3083 /** |
3046 * An optional string indicating the location of the expression for error | 3084 * An optional string indicating the location of the expression for error |
3047 * reporting, e.g. a file name and a position in the file. | 3085 * reporting, e.g. a file name and a position in the file. |
3048 */ | 3086 */ |
3049 core.String location; | 3087 core.String location; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3209 /** | 3247 /** |
3210 * Required. A unique identifier for the instance, which cannot be changed | 3248 * Required. A unique identifier for the instance, which cannot be changed |
3211 * after the instance is created. Values are of the form | 3249 * after the instance is created. Values are of the form |
3212 * `projects/<project>/instances/a-z*[a-z0-9]`. The final | 3250 * `projects/<project>/instances/a-z*[a-z0-9]`. The final |
3213 * segment of the name must be between 6 and 30 characters in length. | 3251 * segment of the name must be between 6 and 30 characters in length. |
3214 */ | 3252 */ |
3215 core.String name; | 3253 core.String name; |
3216 /** | 3254 /** |
3217 * Required. The number of nodes allocated to this instance. This may be zero | 3255 * Required. The number of nodes allocated to this instance. This may be zero |
3218 * in API responses for instances that are not yet in state `READY`. | 3256 * in API responses for instances that are not yet in state `READY`. |
| 3257 * |
| 3258 * Each Spanner node can provide up to 10,000 QPS of reads or 2000 QPS of |
| 3259 * writes (writing single rows at 1KB data per row), and 2 TiB storage. |
| 3260 * |
| 3261 * For optimal performance, we recommend provisioning enough nodes to keep |
| 3262 * overall CPU utilization under 75%. |
| 3263 * |
| 3264 * A minimum of 3 nodes is recommended for production environments. This |
| 3265 * minimum is required for SLAs to apply to your instance. |
| 3266 * |
| 3267 * Note that Cloud Spanner performance is highly dependent on workload, schema |
| 3268 * design, and dataset characteristics. The performance numbers above are |
| 3269 * estimates, and assume [best |
| 3270 * practices](https://cloud.google.com/spanner/docs/bulk-loading) |
| 3271 * are followed. |
3219 */ | 3272 */ |
3220 core.int nodeCount; | 3273 core.int nodeCount; |
3221 /** | 3274 /** |
3222 * Output only. The current instance state. For | 3275 * Output only. The current instance state. For |
3223 * CreateInstance, the state must be | 3276 * CreateInstance, the state must be |
3224 * either omitted or set to `CREATING`. For | 3277 * either omitted or set to `CREATING`. For |
3225 * UpdateInstance, the state must be | 3278 * UpdateInstance, the state must be |
3226 * either omitted or set to `READY`. | 3279 * either omitted or set to `READY`. |
3227 * Possible string values are: | 3280 * Possible string values are: |
3228 * - "STATE_UNSPECIFIED" : Not specified. | 3281 * - "STATE_UNSPECIFIED" : Not specified. |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3661 if (nextPageToken != null) { | 3714 if (nextPageToken != null) { |
3662 _json["nextPageToken"] = nextPageToken; | 3715 _json["nextPageToken"] = nextPageToken; |
3663 } | 3716 } |
3664 if (operations != null) { | 3717 if (operations != null) { |
3665 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; | 3718 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; |
3666 } | 3719 } |
3667 return _json; | 3720 return _json; |
3668 } | 3721 } |
3669 } | 3722 } |
3670 | 3723 |
3671 /** Specifies what kind of log the caller must write */ | 3724 /** |
| 3725 * Specifies what kind of log the caller must write |
| 3726 * Increment a streamz counter with the specified metric and field names. |
| 3727 * |
| 3728 * Metric names should start with a '/', generally be lowercase-only, |
| 3729 * and end in "_count". Field names should not contain an initial slash. |
| 3730 * The actual exported metric names will have "/iam/policy" prepended. |
| 3731 * |
| 3732 * Field names correspond to IAM request parameters and field values are |
| 3733 * their respective values. |
| 3734 * |
| 3735 * At present the only supported field names are |
| 3736 * - "iam_principal", corresponding to IAMContext.principal; |
| 3737 * - "" (empty string), resulting in one aggretated counter with no field. |
| 3738 * |
| 3739 * Examples: |
| 3740 * counter { metric: "/debug_access_count" field: "iam_principal" } |
| 3741 * ==> increment counter /iam/policy/backend_debug_access_count |
| 3742 * {iam_principal=[value of IAMContext.principal]} |
| 3743 * |
| 3744 * At this time we do not support: |
| 3745 * * multiple field names (though this may be supported in the future) |
| 3746 * * decrementing the counter |
| 3747 * * incrementing it by anything other than 1 |
| 3748 */ |
3672 class LogConfig { | 3749 class LogConfig { |
3673 /** Cloud audit options. */ | 3750 /** Cloud audit options. */ |
3674 CloudAuditOptions cloudAudit; | 3751 CloudAuditOptions cloudAudit; |
3675 /** Counter options. */ | 3752 /** Counter options. */ |
3676 CounterOptions counter; | 3753 CounterOptions counter; |
3677 /** Data access options. */ | 3754 /** Data access options. */ |
3678 DataAccessOptions dataAccess; | 3755 DataAccessOptions dataAccess; |
3679 | 3756 |
3680 LogConfig(); | 3757 LogConfig(); |
3681 | 3758 |
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4946 * results in its response, the status of those operations should be | 5023 * results in its response, the status of those operations should be |
4947 * represented directly using the `Status` message. | 5024 * represented directly using the `Status` message. |
4948 * | 5025 * |
4949 * - Logging. If some API errors are stored in logs, the message `Status` could | 5026 * - Logging. If some API errors are stored in logs, the message `Status` could |
4950 * be used directly after any stripping needed for security/privacy reasons. | 5027 * be used directly after any stripping needed for security/privacy reasons. |
4951 */ | 5028 */ |
4952 class Status { | 5029 class Status { |
4953 /** The status code, which should be an enum value of google.rpc.Code. */ | 5030 /** The status code, which should be an enum value of google.rpc.Code. */ |
4954 core.int code; | 5031 core.int code; |
4955 /** | 5032 /** |
4956 * A list of messages that carry the error details. There will be a | 5033 * A list of messages that carry the error details. There is a common set of |
4957 * common set of message types for APIs to use. | 5034 * message types for APIs to use. |
4958 * | 5035 * |
4959 * The values for Object must be JSON objects. It can consist of `num`, | 5036 * The values for Object must be JSON objects. It can consist of `num`, |
4960 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5037 * `String`, `bool` and `null` as well as `Map` and `List` values. |
4961 */ | 5038 */ |
4962 core.List<core.Map<core.String, core.Object>> details; | 5039 core.List<core.Map<core.String, core.Object>> details; |
4963 /** | 5040 /** |
4964 * A developer-facing error message, which should be in English. Any | 5041 * A developer-facing error message, which should be in English. Any |
4965 * user-facing error message should be localized and sent in the | 5042 * user-facing error message should be localized and sent in the |
4966 * google.rpc.Status.details field, or localized by the client. | 5043 * google.rpc.Status.details field, or localized by the client. |
4967 */ | 5044 */ |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5777 } | 5854 } |
5778 if (table != null) { | 5855 if (table != null) { |
5779 _json["table"] = table; | 5856 _json["table"] = table; |
5780 } | 5857 } |
5781 if (values != null) { | 5858 if (values != null) { |
5782 _json["values"] = values; | 5859 _json["values"] = values; |
5783 } | 5860 } |
5784 return _json; | 5861 return _json; |
5785 } | 5862 } |
5786 } | 5863 } |
OLD | NEW |