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

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 +204 -4
  2. package/package.json +1 -1
  3. package/tests.ts +25 -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: 20221130
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
  }
@@ -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,22 @@ declare namespace gapi.client {
414
431
  */
415
432
  version?: number;
416
433
  }
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
+ }
417
445
  // tslint:disable-next-line:no-empty-interface
418
446
  interface RemoveIamPolicyRequest {
419
447
  }
420
448
  interface RemoveIamPolicyResponse {
421
- /** whether related policies are removed */
449
+ /** True if the policy is successfully removed. */
422
450
  success?: boolean;
423
451
  }
424
452
  interface Restore {
@@ -532,6 +560,7 @@ declare namespace gapi.client {
532
560
  message?: string;
533
561
  }
534
562
  interface TelemetryConfig {
563
+ /** The output format of the Dataproc Metastore service's logs. */
535
564
  logFormat?: string;
536
565
  }
537
566
  interface TestIamPermissionsRequest {
@@ -1771,6 +1800,65 @@ declare namespace gapi.client {
1771
1800
  body: MetadataImport): Request<Operation>;
1772
1801
  }
1773
1802
  interface ServicesResource {
1803
+ /**
1804
+ * 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
1805
+ * resource and does not transfer any existing data to the new location.
1806
+ */
1807
+ alterLocation(request: {
1808
+ /** V1 error format. */
1809
+ "$.xgafv"?: string;
1810
+ /** OAuth access token. */
1811
+ access_token?: string;
1812
+ /** Data format for response. */
1813
+ alt?: string;
1814
+ /** JSONP */
1815
+ callback?: string;
1816
+ /** Selector specifying which fields to include in a partial response. */
1817
+ fields?: string;
1818
+ /** 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. */
1819
+ key?: string;
1820
+ /** OAuth 2.0 token for the current user. */
1821
+ oauth_token?: string;
1822
+ /** Returns response with indentations and line breaks. */
1823
+ prettyPrint?: boolean;
1824
+ /** 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. */
1825
+ quotaUser?: string;
1826
+ /** 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}. */
1827
+ service: string;
1828
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1829
+ upload_protocol?: string;
1830
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1831
+ uploadType?: string;
1832
+ /** Request body */
1833
+ resource: AlterMetadataResourceLocationRequest;
1834
+ }): Request<Operation>;
1835
+ alterLocation(request: {
1836
+ /** V1 error format. */
1837
+ "$.xgafv"?: string;
1838
+ /** OAuth access token. */
1839
+ access_token?: string;
1840
+ /** Data format for response. */
1841
+ alt?: string;
1842
+ /** JSONP */
1843
+ callback?: string;
1844
+ /** Selector specifying which fields to include in a partial response. */
1845
+ fields?: string;
1846
+ /** 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. */
1847
+ key?: string;
1848
+ /** OAuth 2.0 token for the current user. */
1849
+ oauth_token?: string;
1850
+ /** Returns response with indentations and line breaks. */
1851
+ prettyPrint?: boolean;
1852
+ /** 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. */
1853
+ quotaUser?: string;
1854
+ /** 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}. */
1855
+ service: string;
1856
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1857
+ upload_protocol?: string;
1858
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1859
+ uploadType?: string;
1860
+ },
1861
+ body: AlterMetadataResourceLocationRequest): Request<Operation>;
1774
1862
  /** Creates a metastore service in a project and location. */
1775
1863
  create(request: {
1776
1864
  /** V1 error format. */
@@ -2050,6 +2138,62 @@ declare namespace gapi.client {
2050
2138
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2051
2139
  uploadType?: string;
2052
2140
  }): Request<ListServicesResponse>;
2141
+ /** Move a table to another database. */
2142
+ moveTableToDatabase(request: {
2143
+ /** V1 error format. */
2144
+ "$.xgafv"?: string;
2145
+ /** OAuth access token. */
2146
+ access_token?: string;
2147
+ /** Data format for response. */
2148
+ alt?: string;
2149
+ /** JSONP */
2150
+ callback?: string;
2151
+ /** Selector specifying which fields to include in a partial response. */
2152
+ fields?: string;
2153
+ /** 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. */
2154
+ key?: string;
2155
+ /** OAuth 2.0 token for the current user. */
2156
+ oauth_token?: string;
2157
+ /** Returns response with indentations and line breaks. */
2158
+ prettyPrint?: boolean;
2159
+ /** 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. */
2160
+ quotaUser?: string;
2161
+ /** 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}. */
2162
+ service: string;
2163
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2164
+ upload_protocol?: string;
2165
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2166
+ uploadType?: string;
2167
+ /** Request body */
2168
+ resource: MoveTableToDatabaseRequest;
2169
+ }): Request<Operation>;
2170
+ moveTableToDatabase(request: {
2171
+ /** V1 error format. */
2172
+ "$.xgafv"?: string;
2173
+ /** OAuth access token. */
2174
+ access_token?: string;
2175
+ /** Data format for response. */
2176
+ alt?: string;
2177
+ /** JSONP */
2178
+ callback?: string;
2179
+ /** Selector specifying which fields to include in a partial response. */
2180
+ fields?: string;
2181
+ /** 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. */
2182
+ key?: string;
2183
+ /** OAuth 2.0 token for the current user. */
2184
+ oauth_token?: string;
2185
+ /** Returns response with indentations and line breaks. */
2186
+ prettyPrint?: boolean;
2187
+ /** 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. */
2188
+ quotaUser?: string;
2189
+ /** 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}. */
2190
+ service: string;
2191
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2192
+ upload_protocol?: string;
2193
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2194
+ uploadType?: string;
2195
+ },
2196
+ body: MoveTableToDatabaseRequest): Request<Operation>;
2053
2197
  /** Updates the parameters of a single service. */
2054
2198
  patch(request: {
2055
2199
  /** V1 error format. */
@@ -2130,6 +2274,62 @@ declare namespace gapi.client {
2130
2274
  uploadType?: string;
2131
2275
  },
2132
2276
  body: Service): Request<Operation>;
2277
+ /** Query DPMS metadata. */
2278
+ queryMetadata(request: {
2279
+ /** V1 error format. */
2280
+ "$.xgafv"?: string;
2281
+ /** OAuth access token. */
2282
+ access_token?: string;
2283
+ /** Data format for response. */
2284
+ alt?: string;
2285
+ /** JSONP */
2286
+ callback?: string;
2287
+ /** Selector specifying which fields to include in a partial response. */
2288
+ fields?: string;
2289
+ /** 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. */
2290
+ key?: string;
2291
+ /** OAuth 2.0 token for the current user. */
2292
+ oauth_token?: string;
2293
+ /** Returns response with indentations and line breaks. */
2294
+ prettyPrint?: boolean;
2295
+ /** 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. */
2296
+ quotaUser?: string;
2297
+ /** 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}. */
2298
+ service: string;
2299
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2300
+ upload_protocol?: string;
2301
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2302
+ uploadType?: string;
2303
+ /** Request body */
2304
+ resource: QueryMetadataRequest;
2305
+ }): Request<Operation>;
2306
+ queryMetadata(request: {
2307
+ /** V1 error format. */
2308
+ "$.xgafv"?: string;
2309
+ /** OAuth access token. */
2310
+ access_token?: string;
2311
+ /** Data format for response. */
2312
+ alt?: string;
2313
+ /** JSONP */
2314
+ callback?: string;
2315
+ /** Selector specifying which fields to include in a partial response. */
2316
+ fields?: string;
2317
+ /** 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. */
2318
+ key?: string;
2319
+ /** OAuth 2.0 token for the current user. */
2320
+ oauth_token?: string;
2321
+ /** Returns response with indentations and line breaks. */
2322
+ prettyPrint?: boolean;
2323
+ /** 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. */
2324
+ quotaUser?: string;
2325
+ /** 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}. */
2326
+ service: string;
2327
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2328
+ upload_protocol?: string;
2329
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2330
+ uploadType?: string;
2331
+ },
2332
+ body: QueryMetadataRequest): Request<Operation>;
2133
2333
  /** Removes the attached IAM policies for a resource */
2134
2334
  removeIamPolicy(request: {
2135
2335
  /** 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.20221130",
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: 20221130
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,6 +437,12 @@ 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",