@googleapis/biglake 4.1.1 → 4.2.0

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.
package/v1.ts CHANGED
@@ -425,6 +425,24 @@ export namespace biglake_v1 {
425
425
  */
426
426
  updateTime?: string | null;
427
427
  }
428
+ /**
429
+ * Request message for `TestIamPermissions` method.
430
+ */
431
+ export interface Schema$TestIamPermissionsRequest {
432
+ /**
433
+ * The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
434
+ */
435
+ permissions?: string[] | null;
436
+ }
437
+ /**
438
+ * Response message for `TestIamPermissions` method.
439
+ */
440
+ export interface Schema$TestIamPermissionsResponse {
441
+ /**
442
+ * A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
443
+ */
444
+ permissions?: string[] | null;
445
+ }
428
446
 
429
447
  export class Resource$Projects {
430
448
  context: APIRequestContext;
@@ -741,6 +759,158 @@ export namespace biglake_v1 {
741
759
  return createAPIRequest<Schema$Policy>(parameters);
742
760
  }
743
761
  }
762
+
763
+ /**
764
+ * Tests the IAM permissions for the specified catalog.
765
+ * @example
766
+ * ```js
767
+ * // Before running the sample:
768
+ * // - Enable the API at:
769
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
770
+ * // - Login into gcloud by running:
771
+ * // ```sh
772
+ * // $ gcloud auth application-default login
773
+ * // ```
774
+ * // - Install the npm module by running:
775
+ * // ```sh
776
+ * // $ npm install googleapis
777
+ * // ```
778
+ *
779
+ * const {google} = require('googleapis');
780
+ * const biglake = google.biglake('v1');
781
+ *
782
+ * async function main() {
783
+ * const auth = new google.auth.GoogleAuth({
784
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
785
+ * scopes: [
786
+ * 'https://www.googleapis.com/auth/bigquery',
787
+ * 'https://www.googleapis.com/auth/cloud-platform',
788
+ * ],
789
+ * });
790
+ *
791
+ * // Acquire an auth client, and bind it to all future calls
792
+ * const authClient = await auth.getClient();
793
+ * google.options({auth: authClient});
794
+ *
795
+ * // Do the magic
796
+ * const res = await biglake.projects.catalogs.testIamPermissions({
797
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
798
+ * resource: 'projects/my-project/catalogs/my-catalog',
799
+ *
800
+ * // Request body metadata
801
+ * requestBody: {
802
+ * // request body parameters
803
+ * // {
804
+ * // "permissions": []
805
+ * // }
806
+ * },
807
+ * });
808
+ * console.log(res.data);
809
+ *
810
+ * // Example response
811
+ * // {
812
+ * // "permissions": []
813
+ * // }
814
+ * }
815
+ *
816
+ * main().catch(e => {
817
+ * console.error(e);
818
+ * throw e;
819
+ * });
820
+ *
821
+ * ```
822
+ *
823
+ * @param params - Parameters for request
824
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
825
+ * @param callback - Optional callback that handles the response.
826
+ * @returns A promise if used with async/await, or void if used with a callback.
827
+ */
828
+ testIamPermissions(
829
+ params: Params$Resource$Projects$Catalogs$Testiampermissions,
830
+ options: StreamMethodOptions
831
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
832
+ testIamPermissions(
833
+ params?: Params$Resource$Projects$Catalogs$Testiampermissions,
834
+ options?: MethodOptions
835
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
836
+ testIamPermissions(
837
+ params: Params$Resource$Projects$Catalogs$Testiampermissions,
838
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
839
+ callback: BodyResponseCallback<Readable>
840
+ ): void;
841
+ testIamPermissions(
842
+ params: Params$Resource$Projects$Catalogs$Testiampermissions,
843
+ options:
844
+ | MethodOptions
845
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>,
846
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
847
+ ): void;
848
+ testIamPermissions(
849
+ params: Params$Resource$Projects$Catalogs$Testiampermissions,
850
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
851
+ ): void;
852
+ testIamPermissions(
853
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
854
+ ): void;
855
+ testIamPermissions(
856
+ paramsOrCallback?:
857
+ | Params$Resource$Projects$Catalogs$Testiampermissions
858
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
859
+ | BodyResponseCallback<Readable>,
860
+ optionsOrCallback?:
861
+ | MethodOptions
862
+ | StreamMethodOptions
863
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
864
+ | BodyResponseCallback<Readable>,
865
+ callback?:
866
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
867
+ | BodyResponseCallback<Readable>
868
+ ):
869
+ | void
870
+ | Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>
871
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
872
+ let params = (paramsOrCallback ||
873
+ {}) as Params$Resource$Projects$Catalogs$Testiampermissions;
874
+ let options = (optionsOrCallback || {}) as MethodOptions;
875
+
876
+ if (typeof paramsOrCallback === 'function') {
877
+ callback = paramsOrCallback;
878
+ params = {} as Params$Resource$Projects$Catalogs$Testiampermissions;
879
+ options = {};
880
+ }
881
+
882
+ if (typeof optionsOrCallback === 'function') {
883
+ callback = optionsOrCallback;
884
+ options = {};
885
+ }
886
+
887
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
888
+ const parameters = {
889
+ options: Object.assign(
890
+ {
891
+ url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace(
892
+ /([^:]\/)\/+/g,
893
+ '$1'
894
+ ),
895
+ method: 'POST',
896
+ apiVersion: '',
897
+ },
898
+ options
899
+ ),
900
+ params,
901
+ requiredParams: ['resource'],
902
+ pathParams: ['resource'],
903
+ context: this.context,
904
+ };
905
+ if (callback) {
906
+ createAPIRequest<Schema$TestIamPermissionsResponse>(
907
+ parameters,
908
+ callback as BodyResponseCallback<unknown>
909
+ );
910
+ } else {
911
+ return createAPIRequest<Schema$TestIamPermissionsResponse>(parameters);
912
+ }
913
+ }
744
914
  }
745
915
 
746
916
  export interface Params$Resource$Projects$Catalogs$Getiampolicy extends StandardParameters {
@@ -764,11 +934,26 @@ export namespace biglake_v1 {
764
934
  */
765
935
  requestBody?: Schema$SetIamPolicyRequest;
766
936
  }
937
+ export interface Params$Resource$Projects$Catalogs$Testiampermissions extends StandardParameters {
938
+ /**
939
+ * REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
940
+ */
941
+ resource?: string;
942
+
943
+ /**
944
+ * Request body metadata
945
+ */
946
+ requestBody?: Schema$TestIamPermissionsRequest;
947
+ }
767
948
 
768
949
  export class Resource$Projects$Catalogs$Namespaces {
769
950
  context: APIRequestContext;
951
+ tables: Resource$Projects$Catalogs$Namespaces$Tables;
770
952
  constructor(context: APIRequestContext) {
771
953
  this.context = context;
954
+ this.tables = new Resource$Projects$Catalogs$Namespaces$Tables(
955
+ this.context
956
+ );
772
957
  }
773
958
 
774
959
  /**
@@ -1069,28 +1254,688 @@ export namespace biglake_v1 {
1069
1254
  return createAPIRequest<Schema$Policy>(parameters);
1070
1255
  }
1071
1256
  }
1072
- }
1073
1257
 
1074
- export interface Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy extends StandardParameters {
1075
- /**
1076
- * Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1077
- */
1078
- 'options.requestedPolicyVersion'?: number;
1079
- /**
1080
- * REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1081
- */
1082
- resource?: string;
1083
- }
1084
- export interface Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy extends StandardParameters {
1085
1258
  /**
1086
- * REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1259
+ * Tests the IAM permissions for the specified namespace.
1260
+ * @example
1261
+ * ```js
1262
+ * // Before running the sample:
1263
+ * // - Enable the API at:
1264
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
1265
+ * // - Login into gcloud by running:
1266
+ * // ```sh
1267
+ * // $ gcloud auth application-default login
1268
+ * // ```
1269
+ * // - Install the npm module by running:
1270
+ * // ```sh
1271
+ * // $ npm install googleapis
1272
+ * // ```
1273
+ *
1274
+ * const {google} = require('googleapis');
1275
+ * const biglake = google.biglake('v1');
1276
+ *
1277
+ * async function main() {
1278
+ * const auth = new google.auth.GoogleAuth({
1279
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1280
+ * scopes: [
1281
+ * 'https://www.googleapis.com/auth/bigquery',
1282
+ * 'https://www.googleapis.com/auth/cloud-platform',
1283
+ * ],
1284
+ * });
1285
+ *
1286
+ * // Acquire an auth client, and bind it to all future calls
1287
+ * const authClient = await auth.getClient();
1288
+ * google.options({auth: authClient});
1289
+ *
1290
+ * // Do the magic
1291
+ * const res = await biglake.projects.catalogs.namespaces.testIamPermissions({
1292
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1293
+ * resource: 'projects/my-project/catalogs/my-catalog/namespaces/my-namespace',
1294
+ *
1295
+ * // Request body metadata
1296
+ * requestBody: {
1297
+ * // request body parameters
1298
+ * // {
1299
+ * // "permissions": []
1300
+ * // }
1301
+ * },
1302
+ * });
1303
+ * console.log(res.data);
1304
+ *
1305
+ * // Example response
1306
+ * // {
1307
+ * // "permissions": []
1308
+ * // }
1309
+ * }
1310
+ *
1311
+ * main().catch(e => {
1312
+ * console.error(e);
1313
+ * throw e;
1314
+ * });
1315
+ *
1316
+ * ```
1317
+ *
1318
+ * @param params - Parameters for request
1319
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1320
+ * @param callback - Optional callback that handles the response.
1321
+ * @returns A promise if used with async/await, or void if used with a callback.
1087
1322
  */
1088
- resource?: string;
1323
+ testIamPermissions(
1324
+ params: Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions,
1325
+ options: StreamMethodOptions
1326
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1327
+ testIamPermissions(
1328
+ params?: Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions,
1329
+ options?: MethodOptions
1330
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
1331
+ testIamPermissions(
1332
+ params: Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions,
1333
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1334
+ callback: BodyResponseCallback<Readable>
1335
+ ): void;
1336
+ testIamPermissions(
1337
+ params: Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions,
1338
+ options:
1339
+ | MethodOptions
1340
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>,
1341
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
1342
+ ): void;
1343
+ testIamPermissions(
1344
+ params: Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions,
1345
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
1346
+ ): void;
1347
+ testIamPermissions(
1348
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
1349
+ ): void;
1350
+ testIamPermissions(
1351
+ paramsOrCallback?:
1352
+ | Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions
1353
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
1354
+ | BodyResponseCallback<Readable>,
1355
+ optionsOrCallback?:
1356
+ | MethodOptions
1357
+ | StreamMethodOptions
1358
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
1359
+ | BodyResponseCallback<Readable>,
1360
+ callback?:
1361
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
1362
+ | BodyResponseCallback<Readable>
1363
+ ):
1364
+ | void
1365
+ | Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>
1366
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1367
+ let params = (paramsOrCallback ||
1368
+ {}) as Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions;
1369
+ let options = (optionsOrCallback || {}) as MethodOptions;
1089
1370
 
1090
- /**
1091
- * Request body metadata
1092
- */
1093
- requestBody?: Schema$SetIamPolicyRequest;
1371
+ if (typeof paramsOrCallback === 'function') {
1372
+ callback = paramsOrCallback;
1373
+ params =
1374
+ {} as Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions;
1375
+ options = {};
1376
+ }
1377
+
1378
+ if (typeof optionsOrCallback === 'function') {
1379
+ callback = optionsOrCallback;
1380
+ options = {};
1381
+ }
1382
+
1383
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
1384
+ const parameters = {
1385
+ options: Object.assign(
1386
+ {
1387
+ url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace(
1388
+ /([^:]\/)\/+/g,
1389
+ '$1'
1390
+ ),
1391
+ method: 'POST',
1392
+ apiVersion: '',
1393
+ },
1394
+ options
1395
+ ),
1396
+ params,
1397
+ requiredParams: ['resource'],
1398
+ pathParams: ['resource'],
1399
+ context: this.context,
1400
+ };
1401
+ if (callback) {
1402
+ createAPIRequest<Schema$TestIamPermissionsResponse>(
1403
+ parameters,
1404
+ callback as BodyResponseCallback<unknown>
1405
+ );
1406
+ } else {
1407
+ return createAPIRequest<Schema$TestIamPermissionsResponse>(parameters);
1408
+ }
1409
+ }
1410
+ }
1411
+
1412
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy extends StandardParameters {
1413
+ /**
1414
+ * Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1415
+ */
1416
+ 'options.requestedPolicyVersion'?: number;
1417
+ /**
1418
+ * REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1419
+ */
1420
+ resource?: string;
1421
+ }
1422
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy extends StandardParameters {
1423
+ /**
1424
+ * REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1425
+ */
1426
+ resource?: string;
1427
+
1428
+ /**
1429
+ * Request body metadata
1430
+ */
1431
+ requestBody?: Schema$SetIamPolicyRequest;
1432
+ }
1433
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Testiampermissions extends StandardParameters {
1434
+ /**
1435
+ * REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1436
+ */
1437
+ resource?: string;
1438
+
1439
+ /**
1440
+ * Request body metadata
1441
+ */
1442
+ requestBody?: Schema$TestIamPermissionsRequest;
1443
+ }
1444
+
1445
+ export class Resource$Projects$Catalogs$Namespaces$Tables {
1446
+ context: APIRequestContext;
1447
+ constructor(context: APIRequestContext) {
1448
+ this.context = context;
1449
+ }
1450
+
1451
+ /**
1452
+ * Gets the IAM policy for the specified Catalog.
1453
+ * @example
1454
+ * ```js
1455
+ * // Before running the sample:
1456
+ * // - Enable the API at:
1457
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
1458
+ * // - Login into gcloud by running:
1459
+ * // ```sh
1460
+ * // $ gcloud auth application-default login
1461
+ * // ```
1462
+ * // - Install the npm module by running:
1463
+ * // ```sh
1464
+ * // $ npm install googleapis
1465
+ * // ```
1466
+ *
1467
+ * const {google} = require('googleapis');
1468
+ * const biglake = google.biglake('v1');
1469
+ *
1470
+ * async function main() {
1471
+ * const auth = new google.auth.GoogleAuth({
1472
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1473
+ * scopes: [
1474
+ * 'https://www.googleapis.com/auth/bigquery',
1475
+ * 'https://www.googleapis.com/auth/cloud-platform',
1476
+ * ],
1477
+ * });
1478
+ *
1479
+ * // Acquire an auth client, and bind it to all future calls
1480
+ * const authClient = await auth.getClient();
1481
+ * google.options({auth: authClient});
1482
+ *
1483
+ * // Do the magic
1484
+ * const res = await biglake.projects.catalogs.namespaces.tables.getIamPolicy({
1485
+ * // Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1486
+ * 'options.requestedPolicyVersion': 'placeholder-value',
1487
+ * // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1488
+ * resource:
1489
+ * 'projects/my-project/catalogs/my-catalog/namespaces/my-namespace/tables/my-table',
1490
+ * });
1491
+ * console.log(res.data);
1492
+ *
1493
+ * // Example response
1494
+ * // {
1495
+ * // "auditConfigs": [],
1496
+ * // "bindings": [],
1497
+ * // "etag": "my_etag",
1498
+ * // "version": 0
1499
+ * // }
1500
+ * }
1501
+ *
1502
+ * main().catch(e => {
1503
+ * console.error(e);
1504
+ * throw e;
1505
+ * });
1506
+ *
1507
+ * ```
1508
+ *
1509
+ * @param params - Parameters for request
1510
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1511
+ * @param callback - Optional callback that handles the response.
1512
+ * @returns A promise if used with async/await, or void if used with a callback.
1513
+ */
1514
+ getIamPolicy(
1515
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy,
1516
+ options: StreamMethodOptions
1517
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1518
+ getIamPolicy(
1519
+ params?: Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy,
1520
+ options?: MethodOptions
1521
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
1522
+ getIamPolicy(
1523
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy,
1524
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1525
+ callback: BodyResponseCallback<Readable>
1526
+ ): void;
1527
+ getIamPolicy(
1528
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy,
1529
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
1530
+ callback: BodyResponseCallback<Schema$Policy>
1531
+ ): void;
1532
+ getIamPolicy(
1533
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy,
1534
+ callback: BodyResponseCallback<Schema$Policy>
1535
+ ): void;
1536
+ getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
1537
+ getIamPolicy(
1538
+ paramsOrCallback?:
1539
+ | Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy
1540
+ | BodyResponseCallback<Schema$Policy>
1541
+ | BodyResponseCallback<Readable>,
1542
+ optionsOrCallback?:
1543
+ | MethodOptions
1544
+ | StreamMethodOptions
1545
+ | BodyResponseCallback<Schema$Policy>
1546
+ | BodyResponseCallback<Readable>,
1547
+ callback?:
1548
+ | BodyResponseCallback<Schema$Policy>
1549
+ | BodyResponseCallback<Readable>
1550
+ ):
1551
+ | void
1552
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
1553
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1554
+ let params = (paramsOrCallback ||
1555
+ {}) as Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy;
1556
+ let options = (optionsOrCallback || {}) as MethodOptions;
1557
+
1558
+ if (typeof paramsOrCallback === 'function') {
1559
+ callback = paramsOrCallback;
1560
+ params =
1561
+ {} as Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy;
1562
+ options = {};
1563
+ }
1564
+
1565
+ if (typeof optionsOrCallback === 'function') {
1566
+ callback = optionsOrCallback;
1567
+ options = {};
1568
+ }
1569
+
1570
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
1571
+ const parameters = {
1572
+ options: Object.assign(
1573
+ {
1574
+ url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace(
1575
+ /([^:]\/)\/+/g,
1576
+ '$1'
1577
+ ),
1578
+ method: 'GET',
1579
+ apiVersion: '',
1580
+ },
1581
+ options
1582
+ ),
1583
+ params,
1584
+ requiredParams: ['resource'],
1585
+ pathParams: ['resource'],
1586
+ context: this.context,
1587
+ };
1588
+ if (callback) {
1589
+ createAPIRequest<Schema$Policy>(
1590
+ parameters,
1591
+ callback as BodyResponseCallback<unknown>
1592
+ );
1593
+ } else {
1594
+ return createAPIRequest<Schema$Policy>(parameters);
1595
+ }
1596
+ }
1597
+
1598
+ /**
1599
+ * Sets the IAM policy for the specified catalog.
1600
+ * @example
1601
+ * ```js
1602
+ * // Before running the sample:
1603
+ * // - Enable the API at:
1604
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
1605
+ * // - Login into gcloud by running:
1606
+ * // ```sh
1607
+ * // $ gcloud auth application-default login
1608
+ * // ```
1609
+ * // - Install the npm module by running:
1610
+ * // ```sh
1611
+ * // $ npm install googleapis
1612
+ * // ```
1613
+ *
1614
+ * const {google} = require('googleapis');
1615
+ * const biglake = google.biglake('v1');
1616
+ *
1617
+ * async function main() {
1618
+ * const auth = new google.auth.GoogleAuth({
1619
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1620
+ * scopes: [
1621
+ * 'https://www.googleapis.com/auth/bigquery',
1622
+ * 'https://www.googleapis.com/auth/cloud-platform',
1623
+ * ],
1624
+ * });
1625
+ *
1626
+ * // Acquire an auth client, and bind it to all future calls
1627
+ * const authClient = await auth.getClient();
1628
+ * google.options({auth: authClient});
1629
+ *
1630
+ * // Do the magic
1631
+ * const res = await biglake.projects.catalogs.namespaces.tables.setIamPolicy({
1632
+ * // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1633
+ * resource:
1634
+ * 'projects/my-project/catalogs/my-catalog/namespaces/my-namespace/tables/my-table',
1635
+ *
1636
+ * // Request body metadata
1637
+ * requestBody: {
1638
+ * // request body parameters
1639
+ * // {
1640
+ * // "policy": {},
1641
+ * // "updateMask": "my_updateMask"
1642
+ * // }
1643
+ * },
1644
+ * });
1645
+ * console.log(res.data);
1646
+ *
1647
+ * // Example response
1648
+ * // {
1649
+ * // "auditConfigs": [],
1650
+ * // "bindings": [],
1651
+ * // "etag": "my_etag",
1652
+ * // "version": 0
1653
+ * // }
1654
+ * }
1655
+ *
1656
+ * main().catch(e => {
1657
+ * console.error(e);
1658
+ * throw e;
1659
+ * });
1660
+ *
1661
+ * ```
1662
+ *
1663
+ * @param params - Parameters for request
1664
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1665
+ * @param callback - Optional callback that handles the response.
1666
+ * @returns A promise if used with async/await, or void if used with a callback.
1667
+ */
1668
+ setIamPolicy(
1669
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy,
1670
+ options: StreamMethodOptions
1671
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1672
+ setIamPolicy(
1673
+ params?: Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy,
1674
+ options?: MethodOptions
1675
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
1676
+ setIamPolicy(
1677
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy,
1678
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1679
+ callback: BodyResponseCallback<Readable>
1680
+ ): void;
1681
+ setIamPolicy(
1682
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy,
1683
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
1684
+ callback: BodyResponseCallback<Schema$Policy>
1685
+ ): void;
1686
+ setIamPolicy(
1687
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy,
1688
+ callback: BodyResponseCallback<Schema$Policy>
1689
+ ): void;
1690
+ setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
1691
+ setIamPolicy(
1692
+ paramsOrCallback?:
1693
+ | Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy
1694
+ | BodyResponseCallback<Schema$Policy>
1695
+ | BodyResponseCallback<Readable>,
1696
+ optionsOrCallback?:
1697
+ | MethodOptions
1698
+ | StreamMethodOptions
1699
+ | BodyResponseCallback<Schema$Policy>
1700
+ | BodyResponseCallback<Readable>,
1701
+ callback?:
1702
+ | BodyResponseCallback<Schema$Policy>
1703
+ | BodyResponseCallback<Readable>
1704
+ ):
1705
+ | void
1706
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
1707
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1708
+ let params = (paramsOrCallback ||
1709
+ {}) as Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy;
1710
+ let options = (optionsOrCallback || {}) as MethodOptions;
1711
+
1712
+ if (typeof paramsOrCallback === 'function') {
1713
+ callback = paramsOrCallback;
1714
+ params =
1715
+ {} as Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy;
1716
+ options = {};
1717
+ }
1718
+
1719
+ if (typeof optionsOrCallback === 'function') {
1720
+ callback = optionsOrCallback;
1721
+ options = {};
1722
+ }
1723
+
1724
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
1725
+ const parameters = {
1726
+ options: Object.assign(
1727
+ {
1728
+ url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace(
1729
+ /([^:]\/)\/+/g,
1730
+ '$1'
1731
+ ),
1732
+ method: 'POST',
1733
+ apiVersion: '',
1734
+ },
1735
+ options
1736
+ ),
1737
+ params,
1738
+ requiredParams: ['resource'],
1739
+ pathParams: ['resource'],
1740
+ context: this.context,
1741
+ };
1742
+ if (callback) {
1743
+ createAPIRequest<Schema$Policy>(
1744
+ parameters,
1745
+ callback as BodyResponseCallback<unknown>
1746
+ );
1747
+ } else {
1748
+ return createAPIRequest<Schema$Policy>(parameters);
1749
+ }
1750
+ }
1751
+
1752
+ /**
1753
+ * Tests the IAM permissions for the specified table.
1754
+ * @example
1755
+ * ```js
1756
+ * // Before running the sample:
1757
+ * // - Enable the API at:
1758
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
1759
+ * // - Login into gcloud by running:
1760
+ * // ```sh
1761
+ * // $ gcloud auth application-default login
1762
+ * // ```
1763
+ * // - Install the npm module by running:
1764
+ * // ```sh
1765
+ * // $ npm install googleapis
1766
+ * // ```
1767
+ *
1768
+ * const {google} = require('googleapis');
1769
+ * const biglake = google.biglake('v1');
1770
+ *
1771
+ * async function main() {
1772
+ * const auth = new google.auth.GoogleAuth({
1773
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1774
+ * scopes: [
1775
+ * 'https://www.googleapis.com/auth/bigquery',
1776
+ * 'https://www.googleapis.com/auth/cloud-platform',
1777
+ * ],
1778
+ * });
1779
+ *
1780
+ * // Acquire an auth client, and bind it to all future calls
1781
+ * const authClient = await auth.getClient();
1782
+ * google.options({auth: authClient});
1783
+ *
1784
+ * // Do the magic
1785
+ * const res =
1786
+ * await biglake.projects.catalogs.namespaces.tables.testIamPermissions({
1787
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1788
+ * resource:
1789
+ * 'projects/my-project/catalogs/my-catalog/namespaces/my-namespace/tables/my-table',
1790
+ *
1791
+ * // Request body metadata
1792
+ * requestBody: {
1793
+ * // request body parameters
1794
+ * // {
1795
+ * // "permissions": []
1796
+ * // }
1797
+ * },
1798
+ * });
1799
+ * console.log(res.data);
1800
+ *
1801
+ * // Example response
1802
+ * // {
1803
+ * // "permissions": []
1804
+ * // }
1805
+ * }
1806
+ *
1807
+ * main().catch(e => {
1808
+ * console.error(e);
1809
+ * throw e;
1810
+ * });
1811
+ *
1812
+ * ```
1813
+ *
1814
+ * @param params - Parameters for request
1815
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1816
+ * @param callback - Optional callback that handles the response.
1817
+ * @returns A promise if used with async/await, or void if used with a callback.
1818
+ */
1819
+ testIamPermissions(
1820
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions,
1821
+ options: StreamMethodOptions
1822
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1823
+ testIamPermissions(
1824
+ params?: Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions,
1825
+ options?: MethodOptions
1826
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
1827
+ testIamPermissions(
1828
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions,
1829
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1830
+ callback: BodyResponseCallback<Readable>
1831
+ ): void;
1832
+ testIamPermissions(
1833
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions,
1834
+ options:
1835
+ | MethodOptions
1836
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>,
1837
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
1838
+ ): void;
1839
+ testIamPermissions(
1840
+ params: Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions,
1841
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
1842
+ ): void;
1843
+ testIamPermissions(
1844
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
1845
+ ): void;
1846
+ testIamPermissions(
1847
+ paramsOrCallback?:
1848
+ | Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions
1849
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
1850
+ | BodyResponseCallback<Readable>,
1851
+ optionsOrCallback?:
1852
+ | MethodOptions
1853
+ | StreamMethodOptions
1854
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
1855
+ | BodyResponseCallback<Readable>,
1856
+ callback?:
1857
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
1858
+ | BodyResponseCallback<Readable>
1859
+ ):
1860
+ | void
1861
+ | Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>
1862
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1863
+ let params = (paramsOrCallback ||
1864
+ {}) as Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions;
1865
+ let options = (optionsOrCallback || {}) as MethodOptions;
1866
+
1867
+ if (typeof paramsOrCallback === 'function') {
1868
+ callback = paramsOrCallback;
1869
+ params =
1870
+ {} as Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions;
1871
+ options = {};
1872
+ }
1873
+
1874
+ if (typeof optionsOrCallback === 'function') {
1875
+ callback = optionsOrCallback;
1876
+ options = {};
1877
+ }
1878
+
1879
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
1880
+ const parameters = {
1881
+ options: Object.assign(
1882
+ {
1883
+ url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace(
1884
+ /([^:]\/)\/+/g,
1885
+ '$1'
1886
+ ),
1887
+ method: 'POST',
1888
+ apiVersion: '',
1889
+ },
1890
+ options
1891
+ ),
1892
+ params,
1893
+ requiredParams: ['resource'],
1894
+ pathParams: ['resource'],
1895
+ context: this.context,
1896
+ };
1897
+ if (callback) {
1898
+ createAPIRequest<Schema$TestIamPermissionsResponse>(
1899
+ parameters,
1900
+ callback as BodyResponseCallback<unknown>
1901
+ );
1902
+ } else {
1903
+ return createAPIRequest<Schema$TestIamPermissionsResponse>(parameters);
1904
+ }
1905
+ }
1906
+ }
1907
+
1908
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Tables$Getiampolicy extends StandardParameters {
1909
+ /**
1910
+ * Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1911
+ */
1912
+ 'options.requestedPolicyVersion'?: number;
1913
+ /**
1914
+ * REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1915
+ */
1916
+ resource?: string;
1917
+ }
1918
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Tables$Setiampolicy extends StandardParameters {
1919
+ /**
1920
+ * REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1921
+ */
1922
+ resource?: string;
1923
+
1924
+ /**
1925
+ * Request body metadata
1926
+ */
1927
+ requestBody?: Schema$SetIamPolicyRequest;
1928
+ }
1929
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Tables$Testiampermissions extends StandardParameters {
1930
+ /**
1931
+ * REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1932
+ */
1933
+ resource?: string;
1934
+
1935
+ /**
1936
+ * Request body metadata
1937
+ */
1938
+ requestBody?: Schema$TestIamPermissionsRequest;
1094
1939
  }
1095
1940
 
1096
1941
  export class Resource$Projects$Locations {