@maxim_mazurok/gapi.client.metastore-v1alpha 0.0.20221110 → 0.0.20221207

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 +207 -6
  2. package/package.json +1 -1
  3. package/tests.ts +26 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://metastore.googleapis.com/$discovery/rest?version=v1alpha
12
- // Revision: 20221110
12
+ // Revision: 20221207
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -22,6 +22,15 @@ declare namespace gapi.client {
22
22
  function load(name: "metastore", version: "v1alpha", callback: () => any): void;
23
23
 
24
24
  namespace metastore {
25
+ interface AlterMetadataResourceLocationRequest {
26
+ /** Required. The new location URI for the metadata resource. */
27
+ locationUri?: string;
28
+ /**
29
+ * Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or
30
+ * databases/{database_id}/tables/{table_id}/partitions/{partition_id}
31
+ */
32
+ resourceName?: string;
33
+ }
25
34
  interface AuditConfig {
26
35
  /** The configuration for logging of each type of permission. */
27
36
  auditLogConfigs?: AuditLogConfig[];
@@ -49,8 +58,8 @@ declare namespace gapi.client {
49
58
  /** The type of the backend metastore. */
50
59
  metastoreType?: string;
51
60
  /**
52
- * The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: Dataplex:
53
- * projects/{project_id}/locations/{location}/lakes/{lake_id} BigQuery: projects/{project_id} Dataproc Metastore: projects/{project_id}/locations/{location}/services/{service_id}
61
+ * The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: Dataplex
62
+ * projects/{project_id}/locations/{location}/lakes/{lake_id} BigQuery projects/{project_id} Dataproc Metastore projects/{project_id}/locations/{location}/services/{service_id}
54
63
  */
55
64
  name?: string;
56
65
  }
@@ -102,7 +111,7 @@ declare namespace gapi.client {
102
111
  /**
103
112
  * Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet
104
113
  * and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the
105
- * following form:`projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}
114
+ * following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}
106
115
  */
107
116
  subnetwork?: string;
108
117
  }
@@ -341,6 +350,14 @@ declare namespace gapi.client {
341
350
  /** Output only. The latest restores of the metastore service. */
342
351
  restores?: Restore[];
343
352
  }
353
+ interface MoveTableToDatabaseRequest {
354
+ /** Required. The name of the database where the table resides. */
355
+ dbName?: string;
356
+ /** Required. The name of the database where the table should be moved. */
357
+ destinationDbName?: string;
358
+ /** Required. The name of the table to be moved. */
359
+ tableName?: string;
360
+ }
344
361
  interface NetworkConfig {
345
362
  /** Immutable. The consumer-side network configuration for the Dataproc Metastore instance. */
346
363
  consumers?: Consumer[];
@@ -414,11 +431,23 @@ declare namespace gapi.client {
414
431
  */
415
432
  version?: number;
416
433
  }
417
- // tslint:disable-next-line:no-empty-interface
434
+ interface QueryMetadataRequest {
435
+ /** Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data. */
436
+ query?: string;
437
+ }
438
+ interface QueryMetadataResponse {
439
+ /**
440
+ * The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the
441
+ * long-running operation query against the metadata finishes.
442
+ */
443
+ resultManifestUri?: string;
444
+ }
418
445
  interface RemoveIamPolicyRequest {
446
+ /** Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false. */
447
+ asynchronous?: boolean;
419
448
  }
420
449
  interface RemoveIamPolicyResponse {
421
- /** whether related policies are removed */
450
+ /** True if the policy is successfully removed. */
422
451
  success?: boolean;
423
452
  }
424
453
  interface Restore {
@@ -532,6 +561,7 @@ declare namespace gapi.client {
532
561
  message?: string;
533
562
  }
534
563
  interface TelemetryConfig {
564
+ /** The output format of the Dataproc Metastore service's logs. */
535
565
  logFormat?: string;
536
566
  }
537
567
  interface TestIamPermissionsRequest {
@@ -1771,6 +1801,65 @@ declare namespace gapi.client {
1771
1801
  body: MetadataImport): Request<Operation>;
1772
1802
  }
1773
1803
  interface ServicesResource {
1804
+ /**
1805
+ * Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata
1806
+ * resource and does not transfer any existing data to the new location.
1807
+ */
1808
+ alterLocation(request: {
1809
+ /** V1 error format. */
1810
+ "$.xgafv"?: string;
1811
+ /** OAuth access token. */
1812
+ access_token?: string;
1813
+ /** Data format for response. */
1814
+ alt?: string;
1815
+ /** JSONP */
1816
+ callback?: string;
1817
+ /** Selector specifying which fields to include in a partial response. */
1818
+ fields?: string;
1819
+ /** 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. */
1820
+ key?: string;
1821
+ /** OAuth 2.0 token for the current user. */
1822
+ oauth_token?: string;
1823
+ /** Returns response with indentations and line breaks. */
1824
+ prettyPrint?: boolean;
1825
+ /** 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. */
1826
+ quotaUser?: string;
1827
+ /** Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}. */
1828
+ service: string;
1829
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1830
+ upload_protocol?: string;
1831
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1832
+ uploadType?: string;
1833
+ /** Request body */
1834
+ resource: AlterMetadataResourceLocationRequest;
1835
+ }): Request<Operation>;
1836
+ alterLocation(request: {
1837
+ /** V1 error format. */
1838
+ "$.xgafv"?: string;
1839
+ /** OAuth access token. */
1840
+ access_token?: string;
1841
+ /** Data format for response. */
1842
+ alt?: string;
1843
+ /** JSONP */
1844
+ callback?: string;
1845
+ /** Selector specifying which fields to include in a partial response. */
1846
+ fields?: string;
1847
+ /** 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. */
1848
+ key?: string;
1849
+ /** OAuth 2.0 token for the current user. */
1850
+ oauth_token?: string;
1851
+ /** Returns response with indentations and line breaks. */
1852
+ prettyPrint?: boolean;
1853
+ /** 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. */
1854
+ quotaUser?: string;
1855
+ /** Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}. */
1856
+ service: string;
1857
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1858
+ upload_protocol?: string;
1859
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1860
+ uploadType?: string;
1861
+ },
1862
+ body: AlterMetadataResourceLocationRequest): Request<Operation>;
1774
1863
  /** Creates a metastore service in a project and location. */
1775
1864
  create(request: {
1776
1865
  /** V1 error format. */
@@ -2050,6 +2139,62 @@ declare namespace gapi.client {
2050
2139
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2051
2140
  uploadType?: string;
2052
2141
  }): Request<ListServicesResponse>;
2142
+ /** Move a table to another database. */
2143
+ moveTableToDatabase(request: {
2144
+ /** V1 error format. */
2145
+ "$.xgafv"?: string;
2146
+ /** OAuth access token. */
2147
+ access_token?: string;
2148
+ /** Data format for response. */
2149
+ alt?: string;
2150
+ /** JSONP */
2151
+ callback?: string;
2152
+ /** Selector specifying which fields to include in a partial response. */
2153
+ fields?: string;
2154
+ /** 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. */
2155
+ key?: string;
2156
+ /** OAuth 2.0 token for the current user. */
2157
+ oauth_token?: string;
2158
+ /** Returns response with indentations and line breaks. */
2159
+ prettyPrint?: boolean;
2160
+ /** 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. */
2161
+ quotaUser?: string;
2162
+ /** Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}. */
2163
+ service: string;
2164
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2165
+ upload_protocol?: string;
2166
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2167
+ uploadType?: string;
2168
+ /** Request body */
2169
+ resource: MoveTableToDatabaseRequest;
2170
+ }): Request<Operation>;
2171
+ moveTableToDatabase(request: {
2172
+ /** V1 error format. */
2173
+ "$.xgafv"?: string;
2174
+ /** OAuth access token. */
2175
+ access_token?: string;
2176
+ /** Data format for response. */
2177
+ alt?: string;
2178
+ /** JSONP */
2179
+ callback?: string;
2180
+ /** Selector specifying which fields to include in a partial response. */
2181
+ fields?: string;
2182
+ /** 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. */
2183
+ key?: string;
2184
+ /** OAuth 2.0 token for the current user. */
2185
+ oauth_token?: string;
2186
+ /** Returns response with indentations and line breaks. */
2187
+ prettyPrint?: boolean;
2188
+ /** 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. */
2189
+ quotaUser?: string;
2190
+ /** Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}. */
2191
+ service: string;
2192
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2193
+ upload_protocol?: string;
2194
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2195
+ uploadType?: string;
2196
+ },
2197
+ body: MoveTableToDatabaseRequest): Request<Operation>;
2053
2198
  /** Updates the parameters of a single service. */
2054
2199
  patch(request: {
2055
2200
  /** V1 error format. */
@@ -2130,6 +2275,62 @@ declare namespace gapi.client {
2130
2275
  uploadType?: string;
2131
2276
  },
2132
2277
  body: Service): Request<Operation>;
2278
+ /** Query DPMS metadata. */
2279
+ queryMetadata(request: {
2280
+ /** V1 error format. */
2281
+ "$.xgafv"?: string;
2282
+ /** OAuth access token. */
2283
+ access_token?: string;
2284
+ /** Data format for response. */
2285
+ alt?: string;
2286
+ /** JSONP */
2287
+ callback?: string;
2288
+ /** Selector specifying which fields to include in a partial response. */
2289
+ fields?: string;
2290
+ /** 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. */
2291
+ key?: string;
2292
+ /** OAuth 2.0 token for the current user. */
2293
+ oauth_token?: string;
2294
+ /** Returns response with indentations and line breaks. */
2295
+ prettyPrint?: boolean;
2296
+ /** 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. */
2297
+ quotaUser?: string;
2298
+ /** Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}. */
2299
+ service: string;
2300
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2301
+ upload_protocol?: string;
2302
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2303
+ uploadType?: string;
2304
+ /** Request body */
2305
+ resource: QueryMetadataRequest;
2306
+ }): Request<Operation>;
2307
+ queryMetadata(request: {
2308
+ /** V1 error format. */
2309
+ "$.xgafv"?: string;
2310
+ /** OAuth access token. */
2311
+ access_token?: string;
2312
+ /** Data format for response. */
2313
+ alt?: string;
2314
+ /** JSONP */
2315
+ callback?: string;
2316
+ /** Selector specifying which fields to include in a partial response. */
2317
+ fields?: string;
2318
+ /** 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. */
2319
+ key?: string;
2320
+ /** OAuth 2.0 token for the current user. */
2321
+ oauth_token?: string;
2322
+ /** Returns response with indentations and line breaks. */
2323
+ prettyPrint?: boolean;
2324
+ /** 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. */
2325
+ quotaUser?: string;
2326
+ /** Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}. */
2327
+ service: string;
2328
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2329
+ upload_protocol?: string;
2330
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2331
+ uploadType?: string;
2332
+ },
2333
+ body: QueryMetadataRequest): Request<Operation>;
2133
2334
  /** Removes the attached IAM policies for a resource */
2134
2335
  removeIamPolicy(request: {
2135
2336
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.metastore-v1alpha",
3
- "version": "0.0.20221110",
3
+ "version": "0.0.20221207",
4
4
  "description": "TypeScript typings for Dataproc Metastore API v1alpha",
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: 20221110
6
+ // Revision: 20221207
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -181,6 +181,16 @@ gapi.load('client', async () => {
181
181
  pageSize: 42,
182
182
  pageToken: "Test string",
183
183
  });
184
+ /**
185
+ * Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource
186
+ * and does not transfer any existing data to the new location.
187
+ */
188
+ await gapi.client.metastore.projects.locations.services.alterLocation({
189
+ service: "Test string",
190
+ }, {
191
+ locationUri: "Test string",
192
+ resourceName: "Test string",
193
+ });
184
194
  /** Creates a metastore service in a project and location. */
185
195
  await gapi.client.metastore.projects.locations.services.create({
186
196
  parent: "Test string",
@@ -315,6 +325,14 @@ gapi.load('client', async () => {
315
325
  pageToken: "Test string",
316
326
  parent: "Test string",
317
327
  });
328
+ /** Move a table to another database. */
329
+ await gapi.client.metastore.projects.locations.services.moveTableToDatabase({
330
+ service: "Test string",
331
+ }, {
332
+ dbName: "Test string",
333
+ destinationDbName: "Test string",
334
+ tableName: "Test string",
335
+ });
318
336
  /** Updates the parameters of a single service. */
319
337
  await gapi.client.metastore.projects.locations.services.patch({
320
338
  name: "Test string",
@@ -419,10 +437,17 @@ gapi.load('client', async () => {
419
437
  uid: "Test string",
420
438
  updateTime: "Test string",
421
439
  });
440
+ /** Query DPMS metadata. */
441
+ await gapi.client.metastore.projects.locations.services.queryMetadata({
442
+ service: "Test string",
443
+ }, {
444
+ query: "Test string",
445
+ });
422
446
  /** Removes the attached IAM policies for a resource */
423
447
  await gapi.client.metastore.projects.locations.services.removeIamPolicy({
424
448
  resource: "Test string",
425
449
  }, {
450
+ asynchronous: true,
426
451
  });
427
452
  /** Restores a service from a backup. */
428
453
  await gapi.client.metastore.projects.locations.services.restore({