@maxim_mazurok/gapi.client.spanner-v1 0.0.20220902 → 0.0.20220906

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +321 -22
  2. package/package.json +1 -1
  3. package/tests.ts +128 -1
package/index.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
11
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
12
  // Generated from: https://spanner.googleapis.com/$discovery/rest?version=v1
13
- // Revision: 20220902
13
+ // Revision: 20220906
14
14
 
15
15
  /// <reference types="gapi.client" />
16
16
 
@@ -118,17 +118,18 @@ declare namespace gapi.client {
118
118
  /**
119
119
  * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on
120
120
  * the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service
121
- * account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
122
- * represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier
123
- * for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example,
124
- * `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. *
125
- * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example,
126
- * `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. *
127
- * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example,
128
- * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service
129
- * account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently
130
- * deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in
131
- * the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
121
+ * account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific
122
+ * Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example,
123
+ * `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service
124
+ * account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
125
+ * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
126
+ * identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to
127
+ * `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing
128
+ * a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value
129
+ * reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
130
+ * identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to
131
+ * `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For
132
+ * example, `google.com` or `example.com`.
132
133
  */
133
134
  members?: string[];
134
135
  /** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */
@@ -268,6 +269,28 @@ declare namespace gapi.client {
268
269
  */
269
270
  extraStatements?: string[];
270
271
  }
272
+ interface CreateInstanceConfigMetadata {
273
+ /** The time at which this operation was cancelled. */
274
+ cancelTime?: string;
275
+ /** The target instance config end state. */
276
+ instanceConfig?: InstanceConfig;
277
+ /** The progress of the CreateInstanceConfig operation. */
278
+ progress?: OperationProgress;
279
+ }
280
+ interface CreateInstanceConfigRequest {
281
+ /**
282
+ * Required. The InstanceConfig proto of the configuration to create. instance_config.name must be `/instanceConfigs/`. instance_config.base_config must be a Google managed
283
+ * configuration name, e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
284
+ */
285
+ instanceConfig?: InstanceConfig;
286
+ /**
287
+ * Required. The ID of the instance config to create. Valid identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-`
288
+ * prefix is required to avoid name conflicts with Google managed configurations.
289
+ */
290
+ instanceConfigId?: string;
291
+ /** An option to validate, but not actually execute, a request, and provide the same response. */
292
+ validateOnly?: boolean;
293
+ }
271
294
  interface CreateInstanceMetadata {
272
295
  /** The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again. */
273
296
  cancelTime?: string;
@@ -563,16 +586,46 @@ declare namespace gapi.client {
563
586
  updateTime?: string;
564
587
  }
565
588
  interface InstanceConfig {
589
+ /**
590
+ * Base configuration name, e.g. projects//instanceConfigs/nam3, based on which this configuration is created. Only set for user managed configurations. `base_config` must refer to a
591
+ * configuration of type GOOGLE_MANAGED in the same project as this configuration.
592
+ */
593
+ baseConfig?: string;
594
+ /** Output only. Whether this instance config is a Google or User Managed Configuration. */
595
+ configType?: string;
566
596
  /** The name of this instance configuration as it appears in UIs. */
567
597
  displayName?: string;
598
+ /**
599
+ * etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance config from overwriting each other. It is strongly suggested that systems
600
+ * make use of the etag in the read-modify-write cycle to perform instance config updates in order to avoid race conditions: An etag is returned in the response which contains instance
601
+ * configs, and systems are expected to put that etag in the request to update instance config to ensure that their change will be applied to the same version of the instance config.
602
+ * If no etag is provided in the call to update instance config, then the existing instance config is overwritten blindly.
603
+ */
604
+ etag?: string;
568
605
  /** Output only. Describes whether free instances are available to be created in this instance config. */
569
606
  freeInstanceAvailability?: string;
607
+ /**
608
+ * Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud
609
+ * Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules
610
+ * (e.g. route, firewall, load balancing, etc.). * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `a-z{0,62}`. * Label values
611
+ * must be between 0 and 63 characters long and must conform to the regular expression `[a-z0-9_-]{0,63}`. * No more than 64 labels can be associated with a given resource. See
612
+ * https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the
613
+ * future. Therefore, you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing
614
+ * labels as the string: name + "_" + value would prove problematic if we were to allow "_" in a future release.
615
+ */
616
+ labels?: { [P in string]: string };
570
617
  /** Allowed values of the "default_leader" schema option for databases in instances that use this instance configuration. */
571
618
  leaderOptions?: string[];
572
619
  /** A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`. */
573
620
  name?: string;
621
+ /** Output only. The available optional replicas to choose from for user managed configurations. Populated for Google managed configurations. */
622
+ optionalReplicas?: ReplicaInfo[];
623
+ /** Output only. If true, the instance config is being created or updated. If false, there are no ongoing operations for the instance config. */
624
+ reconciling?: boolean;
574
625
  /** The geographic placement of nodes in this instance configuration and their replication properties. */
575
626
  replicas?: ReplicaInfo[];
627
+ /** Output only. The current instance config state. */
628
+ state?: string;
576
629
  }
577
630
  interface KeyRange {
578
631
  /** If the end is closed, then the range includes all rows whose first `len(end_closed)` key columns exactly match `end_closed`. */
@@ -664,6 +717,15 @@ declare namespace gapi.client {
664
717
  /** `next_page_token` can be sent in a subsequent ListDatabases call to fetch more of the matching databases. */
665
718
  nextPageToken?: string;
666
719
  }
720
+ interface ListInstanceConfigOperationsResponse {
721
+ /** `next_page_token` can be sent in a subsequent ListInstanceConfigOperations call to fetch more of the matching metadata. */
722
+ nextPageToken?: string;
723
+ /**
724
+ * The list of matching instance config long-running operations. Each operation's name will be prefixed by the instance config's name. The operation's metadata field type
725
+ * `metadata.type_url` describes the type of the metadata.
726
+ */
727
+ operations?: Operation[];
728
+ }
667
729
  interface ListInstanceConfigsResponse {
668
730
  /** The list of requested instance configurations. */
669
731
  instanceConfigs?: InstanceConfig[];
@@ -1053,8 +1115,9 @@ declare namespace gapi.client {
1053
1115
  /** The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency. */
1054
1116
  transaction?: TransactionSelector;
1055
1117
  }
1056
- // tslint:disable-next-line:no-empty-interface
1057
1118
  interface ReadWrite {
1119
+ /** Read lock mode for the transaction. */
1120
+ readLockMode?: string;
1058
1121
  }
1059
1122
  interface ReplicaInfo {
1060
1123
  /**
@@ -1290,7 +1353,7 @@ declare namespace gapi.client {
1290
1353
  /** Transaction will not write. Authorization to begin a read-only transaction requires `spanner.databases.beginReadOnlyTransaction` permission on the `session` resource. */
1291
1354
  readOnly?: ReadOnly;
1292
1355
  /** Transaction may write. Authorization to begin a read-write transaction requires `spanner.databases.beginOrRollbackReadWriteTransaction` permission on the `session` resource. */
1293
- readWrite?: any;
1356
+ readWrite?: ReadWrite;
1294
1357
  }
1295
1358
  interface TransactionSelector {
1296
1359
  /** Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in ResultSetMetadata.transaction, which is a Transaction. */
@@ -1345,6 +1408,28 @@ declare namespace gapi.client {
1345
1408
  /** Required. DDL statements to be applied to the database. */
1346
1409
  statements?: string[];
1347
1410
  }
1411
+ interface UpdateInstanceConfigMetadata {
1412
+ /** The time at which this operation was cancelled. */
1413
+ cancelTime?: string;
1414
+ /** The desired instance config after updating. */
1415
+ instanceConfig?: InstanceConfig;
1416
+ /** The progress of the UpdateInstanceConfig operation. */
1417
+ progress?: OperationProgress;
1418
+ }
1419
+ interface UpdateInstanceConfigRequest {
1420
+ /**
1421
+ * Required. The user instance config to update, which must always include the instance config name. Otherwise, only fields mentioned in update_mask need be included. To prevent
1422
+ * conflicts of concurrent updates, etag can be used.
1423
+ */
1424
+ instanceConfig?: InstanceConfig;
1425
+ /**
1426
+ * Required. A mask specifying which fields in InstanceConfig should be updated. The field mask must always be specified; this prevents any future fields in InstanceConfig from being
1427
+ * erased accidentally by clients that do not know about them. Only display_name and labels can be updated.
1428
+ */
1429
+ updateMask?: string;
1430
+ /** An option to validate, but not actually execute, a request, and provide the same response. */
1431
+ validateOnly?: boolean;
1432
+ }
1348
1433
  interface UpdateInstanceMetadata {
1349
1434
  /** The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again. */
1350
1435
  cancelTime?: string;
@@ -1404,6 +1489,58 @@ declare namespace gapi.client {
1404
1489
  */
1405
1490
  values?: any[][];
1406
1491
  }
1492
+ interface InstanceConfigOperationsResource {
1493
+ /**
1494
+ * Lists the user-managed instance config long-running operations in the given project. An instance config operation has a name of the form `projects//instanceConfigs//operations/`.
1495
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within
1496
+ * the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started
1497
+ * operation.
1498
+ */
1499
+ list(request?: {
1500
+ /** V1 error format. */
1501
+ "$.xgafv"?: string;
1502
+ /** OAuth access token. */
1503
+ access_token?: string;
1504
+ /** Data format for response. */
1505
+ alt?: string;
1506
+ /** JSONP */
1507
+ callback?: string;
1508
+ /** Selector specifying which fields to include in a partial response. */
1509
+ fields?: string;
1510
+ /**
1511
+ * An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a
1512
+ * string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case
1513
+ * sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress,
1514
+ * else true. * `metadata.@‍type` - the type of metadata. For example, the type string for CreateInstanceConfigMetadata is
1515
+ * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. * `metadata.` - any field in metadata.value. `metadata.@‍type` must be specified first, if
1516
+ * filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@‍type` - the type of response. * `response.` - any field in
1517
+ * response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify
1518
+ * AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@‍type=` \
1519
+ * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) AND` \ `(metadata.instance_config.name:custom-config) AND` \ `(metadata.progress.start_time <
1520
+ * \"2021-03-28T14:50:00Z\") AND` \ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstanceConfigMetadata. * The instance config name contains
1521
+ * "custom-config". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.
1522
+ */
1523
+ filter?: string;
1524
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1525
+ key?: string;
1526
+ /** OAuth 2.0 token for the current user. */
1527
+ oauth_token?: string;
1528
+ /** Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. */
1529
+ pageSize?: number;
1530
+ /** If non-empty, `page_token` should contain a next_page_token from a previous ListInstanceConfigOperationsResponse to the same `parent` and with the same `filter`. */
1531
+ pageToken?: string;
1532
+ /** Required. The project of the instance config operations. Values are of the form `projects/`. */
1533
+ parent: string;
1534
+ /** Returns response with indentations and line breaks. */
1535
+ prettyPrint?: boolean;
1536
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1537
+ quotaUser?: string;
1538
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1539
+ upload_protocol?: string;
1540
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1541
+ uploadType?: string;
1542
+ }): Request<ListInstanceConfigOperationsResponse>;
1543
+ }
1407
1544
  interface OperationsResource {
1408
1545
  /**
1409
1546
  * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support
@@ -1534,6 +1671,109 @@ declare namespace gapi.client {
1534
1671
  }): Request<ListOperationsResponse>;
1535
1672
  }
1536
1673
  interface InstanceConfigsResource {
1674
+ /**
1675
+ * Creates an instance config and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The
1676
+ * instance config name is assigned by the caller. If the named instance config already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request returns:
1677
+ * * The instance config is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is `CREATING`. While the operation is
1678
+ * pending: * Cancelling the operation renders the instance config immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the
1679
+ * instance config are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance config's reconciling field
1680
+ * becomes false. Its state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance config.
1681
+ * The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.create` permission
1682
+ * on the resource parent.
1683
+ */
1684
+ create(request: {
1685
+ /** V1 error format. */
1686
+ "$.xgafv"?: string;
1687
+ /** OAuth access token. */
1688
+ access_token?: string;
1689
+ /** Data format for response. */
1690
+ alt?: string;
1691
+ /** JSONP */
1692
+ callback?: string;
1693
+ /** Selector specifying which fields to include in a partial response. */
1694
+ fields?: string;
1695
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1696
+ key?: string;
1697
+ /** OAuth 2.0 token for the current user. */
1698
+ oauth_token?: string;
1699
+ /** Required. The name of the project in which to create the instance config. Values are of the form `projects/`. */
1700
+ parent: string;
1701
+ /** Returns response with indentations and line breaks. */
1702
+ prettyPrint?: boolean;
1703
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1704
+ quotaUser?: string;
1705
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1706
+ upload_protocol?: string;
1707
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1708
+ uploadType?: string;
1709
+ /** Request body */
1710
+ resource: CreateInstanceConfigRequest;
1711
+ }): Request<Operation>;
1712
+ create(request: {
1713
+ /** V1 error format. */
1714
+ "$.xgafv"?: string;
1715
+ /** OAuth access token. */
1716
+ access_token?: string;
1717
+ /** Data format for response. */
1718
+ alt?: string;
1719
+ /** JSONP */
1720
+ callback?: string;
1721
+ /** Selector specifying which fields to include in a partial response. */
1722
+ fields?: string;
1723
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1724
+ key?: string;
1725
+ /** OAuth 2.0 token for the current user. */
1726
+ oauth_token?: string;
1727
+ /** Required. The name of the project in which to create the instance config. Values are of the form `projects/`. */
1728
+ parent: string;
1729
+ /** Returns response with indentations and line breaks. */
1730
+ prettyPrint?: boolean;
1731
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1732
+ quotaUser?: string;
1733
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1734
+ upload_protocol?: string;
1735
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1736
+ uploadType?: string;
1737
+ },
1738
+ body: CreateInstanceConfigRequest): Request<Operation>;
1739
+ /**
1740
+ * Deletes the instance config. Deletion is only allowed when no instances are using the configuration. If any instances are using the config, returns `FAILED_PRECONDITION`. Only user
1741
+ * managed configurations can be deleted. Authorization requires `spanner.instanceConfigs.delete` permission on the resource name.
1742
+ */
1743
+ delete(request?: {
1744
+ /** V1 error format. */
1745
+ "$.xgafv"?: string;
1746
+ /** OAuth access token. */
1747
+ access_token?: string;
1748
+ /** Data format for response. */
1749
+ alt?: string;
1750
+ /** JSONP */
1751
+ callback?: string;
1752
+ /**
1753
+ * Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance config from overwriting each other. If not empty, the API only deletes the
1754
+ * instance config when the etag provided matches the current status of the requested instance config. Otherwise, deletes the instance config without checking the current status of
1755
+ * the requested instance config.
1756
+ */
1757
+ etag?: string;
1758
+ /** Selector specifying which fields to include in a partial response. */
1759
+ fields?: string;
1760
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1761
+ key?: string;
1762
+ /** Required. The name of the instance configuration to be deleted. Values are of the form `projects//instanceConfigs/` */
1763
+ name: string;
1764
+ /** OAuth 2.0 token for the current user. */
1765
+ oauth_token?: string;
1766
+ /** Returns response with indentations and line breaks. */
1767
+ prettyPrint?: boolean;
1768
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1769
+ quotaUser?: string;
1770
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1771
+ upload_protocol?: string;
1772
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1773
+ uploadType?: string;
1774
+ /** An option to validate, but not actually execute, a request, and provide the same response. */
1775
+ validateOnly?: boolean;
1776
+ }): Request<{}>;
1537
1777
  /** Gets information about a particular instance configuration. */
1538
1778
  get(request?: {
1539
1779
  /** V1 error format. */
@@ -1592,6 +1832,71 @@ declare namespace gapi.client {
1592
1832
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1593
1833
  uploadType?: string;
1594
1834
  }): Request<ListInstanceConfigsResponse>;
1835
+ /**
1836
+ * Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance config does not exist, returns
1837
+ * `NOT_FOUND`. Only user managed configurations can be updated. Immediately after the request returns: * The instance config's reconciling field is set to true. While the operation is
1838
+ * pending: * Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a
1839
+ * `CANCELLED` status. * All other attempts to modify the instance config are rejected. * Reading the instance config via the API continues to give the pre-request values. Upon
1840
+ * completion of the returned operation: * Creating instances using the instance configuration uses the new values. * The instance config's new values are readable via the API. * The
1841
+ * instance config's reconciling field becomes false. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance config
1842
+ * modification. The metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires
1843
+ * `spanner.instanceConfigs.update` permission on the resource name.
1844
+ */
1845
+ patch(request: {
1846
+ /** V1 error format. */
1847
+ "$.xgafv"?: string;
1848
+ /** OAuth access token. */
1849
+ access_token?: string;
1850
+ /** Data format for response. */
1851
+ alt?: string;
1852
+ /** JSONP */
1853
+ callback?: string;
1854
+ /** Selector specifying which fields to include in a partial response. */
1855
+ fields?: string;
1856
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1857
+ key?: string;
1858
+ /** A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`. */
1859
+ name: string;
1860
+ /** OAuth 2.0 token for the current user. */
1861
+ oauth_token?: string;
1862
+ /** Returns response with indentations and line breaks. */
1863
+ prettyPrint?: boolean;
1864
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1865
+ quotaUser?: string;
1866
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1867
+ upload_protocol?: string;
1868
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1869
+ uploadType?: string;
1870
+ /** Request body */
1871
+ resource: UpdateInstanceConfigRequest;
1872
+ }): Request<Operation>;
1873
+ patch(request: {
1874
+ /** V1 error format. */
1875
+ "$.xgafv"?: string;
1876
+ /** OAuth access token. */
1877
+ access_token?: string;
1878
+ /** Data format for response. */
1879
+ alt?: string;
1880
+ /** JSONP */
1881
+ callback?: string;
1882
+ /** Selector specifying which fields to include in a partial response. */
1883
+ fields?: string;
1884
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1885
+ key?: string;
1886
+ /** A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`. */
1887
+ name: string;
1888
+ /** OAuth 2.0 token for the current user. */
1889
+ oauth_token?: string;
1890
+ /** Returns response with indentations and line breaks. */
1891
+ prettyPrint?: boolean;
1892
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1893
+ quotaUser?: string;
1894
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1895
+ upload_protocol?: string;
1896
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1897
+ uploadType?: string;
1898
+ },
1899
+ body: UpdateInstanceConfigRequest): Request<Operation>;
1595
1900
  operations: OperationsResource;
1596
1901
  }
1597
1902
  interface BackupOperationsResource {
@@ -1623,14 +1928,7 @@ declare namespace gapi.client {
1623
1928
  * AND` \ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The source database name of backup contains the string
1624
1929
  * "prod". * `(metadata.@‍type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ `(metadata.name:howl) AND` \ `(metadata.progress.start_time <
1625
1930
  * \"2018-03-28T14:50:00Z\") AND` \ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string "howl". *
1626
- * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. *
1627
- * `(metadata.@‍type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ `(metadata.source_backup:test) AND` \ `(metadata.progress.start_time <
1628
- * \"2022-01-18T14:50:00Z\") AND` \ `(error:*)` - Returns operations where: * The operation's metadata type is CopyBackupMetadata. * The source backup name contains the string
1629
- * "test". * The operation started before 2022-01-18T14:50:00Z. * The operation resulted in an error. *
1630
- * `((metadata.@‍type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ `(metadata.database:test_db)) OR` \
1631
- * `((metadata.@‍type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ `(metadata.source_backup:test_bkp)) AND` \ `(error:*)` - Returns operations
1632
- * where: * The operation's metadata matches either of criteria: * The operation's metadata type is CreateBackupMetadata AND the source database name of the backup contains the
1633
- * string "test_db" * The operation's metadata type is CopyBackupMetadata AND the source backup name contains the string "test_bkp" * The operation resulted in an error.
1931
+ * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.
1634
1932
  */
1635
1933
  filter?: string;
1636
1934
  /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
@@ -4182,6 +4480,7 @@ declare namespace gapi.client {
4182
4480
  operations: OperationsResource;
4183
4481
  }
4184
4482
  interface ProjectsResource {
4483
+ instanceConfigOperations: InstanceConfigOperationsResource;
4185
4484
  instanceConfigs: InstanceConfigsResource;
4186
4485
  instances: InstancesResource;
4187
4486
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.spanner-v1",
3
- "version": "0.0.20220902",
3
+ "version": "0.0.20220906",
4
4
  "description": "TypeScript typings for Cloud Spanner API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20220902
6
+ // Revision: 20220906
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -33,6 +33,71 @@ gapi.load('client', async () => {
33
33
  });
34
34
 
35
35
  async function run() {
36
+ /**
37
+ * Lists the user-managed instance config long-running operations in the given project. An instance config operation has a name of the form `projects//instanceConfigs//operations/`. The
38
+ * long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last
39
+ * 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started operation.
40
+ */
41
+ await gapi.client.spanner.projects.instanceConfigOperations.list({
42
+ filter: "Test string",
43
+ pageSize: 42,
44
+ pageToken: "Test string",
45
+ parent: "Test string",
46
+ });
47
+ /**
48
+ * Creates an instance config and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The instance
49
+ * config name is assigned by the caller. If the named instance config already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request returns: * The
50
+ * instance config is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is `CREATING`. While the operation is pending:
51
+ * * Cancelling the operation renders the instance config immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance config
52
+ * are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its state
53
+ * becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance config. The metadata field type is
54
+ * CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.create` permission on the resource parent.
55
+ */
56
+ await gapi.client.spanner.projects.instanceConfigs.create({
57
+ parent: "Test string",
58
+ }, {
59
+ instanceConfig: {
60
+ baseConfig: "Test string",
61
+ configType: "Test string",
62
+ displayName: "Test string",
63
+ etag: "Test string",
64
+ freeInstanceAvailability: "Test string",
65
+ labels: {
66
+ A: "Test string"
67
+ },
68
+ leaderOptions: [
69
+ "Test string"
70
+ ],
71
+ name: "Test string",
72
+ optionalReplicas: [
73
+ {
74
+ defaultLeaderLocation: true,
75
+ location: "Test string",
76
+ type: "Test string",
77
+ }
78
+ ],
79
+ reconciling: true,
80
+ replicas: [
81
+ {
82
+ defaultLeaderLocation: true,
83
+ location: "Test string",
84
+ type: "Test string",
85
+ }
86
+ ],
87
+ state: "Test string",
88
+ },
89
+ instanceConfigId: "Test string",
90
+ validateOnly: true,
91
+ });
92
+ /**
93
+ * Deletes the instance config. Deletion is only allowed when no instances are using the configuration. If any instances are using the config, returns `FAILED_PRECONDITION`. Only user
94
+ * managed configurations can be deleted. Authorization requires `spanner.instanceConfigs.delete` permission on the resource name.
95
+ */
96
+ await gapi.client.spanner.projects.instanceConfigs.delete({
97
+ etag: "Test string",
98
+ name: "Test string",
99
+ validateOnly: true,
100
+ });
36
101
  /** Gets information about a particular instance configuration. */
37
102
  await gapi.client.spanner.projects.instanceConfigs.get({
38
103
  name: "Test string",
@@ -43,6 +108,52 @@ gapi.load('client', async () => {
43
108
  pageToken: "Test string",
44
109
  parent: "Test string",
45
110
  });
111
+ /**
112
+ * Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance config does not exist, returns
113
+ * `NOT_FOUND`. Only user managed configurations can be updated. Immediately after the request returns: * The instance config's reconciling field is set to true. While the operation is
114
+ * pending: * Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a `CANCELLED`
115
+ * status. * All other attempts to modify the instance config are rejected. * Reading the instance config via the API continues to give the pre-request values. Upon completion of the
116
+ * returned operation: * Creating instances using the instance configuration uses the new values. * The instance config's new values are readable via the API. * The instance config's
117
+ * reconciling field becomes false. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance config modification. The
118
+ * metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.update` permission on the
119
+ * resource name.
120
+ */
121
+ await gapi.client.spanner.projects.instanceConfigs.patch({
122
+ name: "Test string",
123
+ }, {
124
+ instanceConfig: {
125
+ baseConfig: "Test string",
126
+ configType: "Test string",
127
+ displayName: "Test string",
128
+ etag: "Test string",
129
+ freeInstanceAvailability: "Test string",
130
+ labels: {
131
+ A: "Test string"
132
+ },
133
+ leaderOptions: [
134
+ "Test string"
135
+ ],
136
+ name: "Test string",
137
+ optionalReplicas: [
138
+ {
139
+ defaultLeaderLocation: true,
140
+ location: "Test string",
141
+ type: "Test string",
142
+ }
143
+ ],
144
+ reconciling: true,
145
+ replicas: [
146
+ {
147
+ defaultLeaderLocation: true,
148
+ location: "Test string",
149
+ type: "Test string",
150
+ }
151
+ ],
152
+ state: "Test string",
153
+ },
154
+ updateMask: "Test string",
155
+ validateOnly: true,
156
+ });
46
157
  /**
47
158
  * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
48
159
  * method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
@@ -624,6 +735,7 @@ gapi.load('client', async () => {
624
735
  strong: true,
625
736
  },
626
737
  readWrite: {
738
+ readLockMode: "Test string",
627
739
  },
628
740
  },
629
741
  requestOptions: {
@@ -735,6 +847,7 @@ gapi.load('client', async () => {
735
847
  strong: true,
736
848
  },
737
849
  readWrite: {
850
+ readLockMode: "Test string",
738
851
  },
739
852
  },
740
853
  transactionId: "Test string",
@@ -813,6 +926,7 @@ gapi.load('client', async () => {
813
926
  strong: true,
814
927
  },
815
928
  readWrite: {
929
+ readLockMode: "Test string",
816
930
  },
817
931
  },
818
932
  id: "Test string",
@@ -828,6 +942,7 @@ gapi.load('client', async () => {
828
942
  strong: true,
829
943
  },
830
944
  readWrite: {
945
+ readLockMode: "Test string",
831
946
  },
832
947
  },
833
948
  },
@@ -885,6 +1000,7 @@ gapi.load('client', async () => {
885
1000
  strong: true,
886
1001
  },
887
1002
  readWrite: {
1003
+ readLockMode: "Test string",
888
1004
  },
889
1005
  },
890
1006
  id: "Test string",
@@ -900,6 +1016,7 @@ gapi.load('client', async () => {
900
1016
  strong: true,
901
1017
  },
902
1018
  readWrite: {
1019
+ readLockMode: "Test string",
903
1020
  },
904
1021
  },
905
1022
  },
@@ -956,6 +1073,7 @@ gapi.load('client', async () => {
956
1073
  strong: true,
957
1074
  },
958
1075
  readWrite: {
1076
+ readLockMode: "Test string",
959
1077
  },
960
1078
  },
961
1079
  id: "Test string",
@@ -971,6 +1089,7 @@ gapi.load('client', async () => {
971
1089
  strong: true,
972
1090
  },
973
1091
  readWrite: {
1092
+ readLockMode: "Test string",
974
1093
  },
975
1094
  },
976
1095
  },
@@ -1031,6 +1150,7 @@ gapi.load('client', async () => {
1031
1150
  strong: true,
1032
1151
  },
1033
1152
  readWrite: {
1153
+ readLockMode: "Test string",
1034
1154
  },
1035
1155
  },
1036
1156
  id: "Test string",
@@ -1046,6 +1166,7 @@ gapi.load('client', async () => {
1046
1166
  strong: true,
1047
1167
  },
1048
1168
  readWrite: {
1169
+ readLockMode: "Test string",
1049
1170
  },
1050
1171
  },
1051
1172
  },
@@ -1106,6 +1227,7 @@ gapi.load('client', async () => {
1106
1227
  strong: true,
1107
1228
  },
1108
1229
  readWrite: {
1230
+ readLockMode: "Test string",
1109
1231
  },
1110
1232
  },
1111
1233
  id: "Test string",
@@ -1121,6 +1243,7 @@ gapi.load('client', async () => {
1121
1243
  strong: true,
1122
1244
  },
1123
1245
  readWrite: {
1246
+ readLockMode: "Test string",
1124
1247
  },
1125
1248
  },
1126
1249
  },
@@ -1183,6 +1306,7 @@ gapi.load('client', async () => {
1183
1306
  strong: true,
1184
1307
  },
1185
1308
  readWrite: {
1309
+ readLockMode: "Test string",
1186
1310
  },
1187
1311
  },
1188
1312
  id: "Test string",
@@ -1198,6 +1322,7 @@ gapi.load('client', async () => {
1198
1322
  strong: true,
1199
1323
  },
1200
1324
  readWrite: {
1325
+ readLockMode: "Test string",
1201
1326
  },
1202
1327
  },
1203
1328
  },
@@ -1269,6 +1394,7 @@ gapi.load('client', async () => {
1269
1394
  strong: true,
1270
1395
  },
1271
1396
  readWrite: {
1397
+ readLockMode: "Test string",
1272
1398
  },
1273
1399
  },
1274
1400
  id: "Test string",
@@ -1284,6 +1410,7 @@ gapi.load('client', async () => {
1284
1410
  strong: true,
1285
1411
  },
1286
1412
  readWrite: {
1413
+ readLockMode: "Test string",
1287
1414
  },
1288
1415
  },
1289
1416
  },