@googleapis/biglake 2.0.1 → 4.1.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
@@ -124,6 +124,49 @@ export namespace biglake_v1 {
124
124
  }
125
125
  }
126
126
 
127
+ /**
128
+ * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.
129
+ */
130
+ export interface Schema$AuditConfig {
131
+ /**
132
+ * The configuration for logging of each type of permission.
133
+ */
134
+ auditLogConfigs?: Schema$AuditLogConfig[];
135
+ /**
136
+ * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
137
+ */
138
+ service?: string | null;
139
+ }
140
+ /**
141
+ * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
142
+ */
143
+ export interface Schema$AuditLogConfig {
144
+ /**
145
+ * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
146
+ */
147
+ exemptedMembers?: string[] | null;
148
+ /**
149
+ * The log type that this config enables.
150
+ */
151
+ logType?: string | null;
152
+ }
153
+ /**
154
+ * Associates `members`, or principals, with a `role`.
155
+ */
156
+ export interface Schema$Binding {
157
+ /**
158
+ * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
159
+ */
160
+ condition?: Schema$Expr;
161
+ /**
162
+ * 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 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 account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid\}.svc.id.goog[{namespace\}/{kubernetes-sa\}]`: An identifier for a [Kubernetes service 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]`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/subject/{subject_attribute_value\}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/group/{group_id\}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/attribute.{attribute_name\}/{attribute_value\}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/x`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/subject/{subject_attribute_value\}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/group/{group_id\}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/attribute.{attribute_name\}/{attribute_value\}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/x`: All identities in a workload identity pool. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique 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 `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing 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 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 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 `group:{emailid\}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/subject/{subject_attribute_value\}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
163
+ */
164
+ members?: string[] | null;
165
+ /**
166
+ * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
167
+ */
168
+ role?: string | null;
169
+ }
127
170
  /**
128
171
  * Catalog is the container of databases.
129
172
  */
@@ -182,6 +225,27 @@ export namespace biglake_v1 {
182
225
  */
183
226
  updateTime?: string | null;
184
227
  }
228
+ /**
229
+ * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
230
+ */
231
+ export interface Schema$Expr {
232
+ /**
233
+ * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
234
+ */
235
+ description?: string | null;
236
+ /**
237
+ * Textual representation of an expression in Common Expression Language syntax.
238
+ */
239
+ expression?: string | null;
240
+ /**
241
+ * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
242
+ */
243
+ location?: string | null;
244
+ /**
245
+ * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
246
+ */
247
+ title?: string | null;
248
+ }
185
249
  /**
186
250
  * Options of a Hive database.
187
251
  */
@@ -251,6 +315,27 @@ export namespace biglake_v1 {
251
315
  */
252
316
  tables?: Schema$Table[];
253
317
  }
318
+ /**
319
+ * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
320
+ */
321
+ export interface Schema$Policy {
322
+ /**
323
+ * Specifies cloud audit logging configuration for this policy.
324
+ */
325
+ auditConfigs?: Schema$AuditConfig[];
326
+ /**
327
+ * Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
328
+ */
329
+ bindings?: Schema$Binding[];
330
+ /**
331
+ * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
332
+ */
333
+ etag?: string | null;
334
+ /**
335
+ * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
336
+ */
337
+ version?: number | null;
338
+ }
254
339
  /**
255
340
  * Request message for the RenameTable method in MetastoreService
256
341
  */
@@ -269,6 +354,19 @@ export namespace biglake_v1 {
269
354
  */
270
355
  serializationLib?: string | null;
271
356
  }
357
+ /**
358
+ * Request message for `SetIamPolicy` method.
359
+ */
360
+ export interface Schema$SetIamPolicyRequest {
361
+ /**
362
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.
363
+ */
364
+ policy?: Schema$Policy;
365
+ /**
366
+ * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"`
367
+ */
368
+ updateMask?: string | null;
369
+ }
272
370
  /**
273
371
  * Stores physical storage information of the data.
274
372
  */
@@ -330,13 +428,675 @@ export namespace biglake_v1 {
330
428
 
331
429
  export class Resource$Projects {
332
430
  context: APIRequestContext;
431
+ catalogs: Resource$Projects$Catalogs;
333
432
  locations: Resource$Projects$Locations;
334
433
  constructor(context: APIRequestContext) {
335
434
  this.context = context;
435
+ this.catalogs = new Resource$Projects$Catalogs(this.context);
336
436
  this.locations = new Resource$Projects$Locations(this.context);
337
437
  }
338
438
  }
339
439
 
440
+ export class Resource$Projects$Catalogs {
441
+ context: APIRequestContext;
442
+ namespaces: Resource$Projects$Catalogs$Namespaces;
443
+ constructor(context: APIRequestContext) {
444
+ this.context = context;
445
+ this.namespaces = new Resource$Projects$Catalogs$Namespaces(this.context);
446
+ }
447
+
448
+ /**
449
+ * Gets the IAM policy for the specified Catalog.
450
+ * @example
451
+ * ```js
452
+ * // Before running the sample:
453
+ * // - Enable the API at:
454
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
455
+ * // - Login into gcloud by running:
456
+ * // ```sh
457
+ * // $ gcloud auth application-default login
458
+ * // ```
459
+ * // - Install the npm module by running:
460
+ * // ```sh
461
+ * // $ npm install googleapis
462
+ * // ```
463
+ *
464
+ * const {google} = require('googleapis');
465
+ * const biglake = google.biglake('v1');
466
+ *
467
+ * async function main() {
468
+ * const auth = new google.auth.GoogleAuth({
469
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
470
+ * scopes: [
471
+ * 'https://www.googleapis.com/auth/bigquery',
472
+ * 'https://www.googleapis.com/auth/cloud-platform',
473
+ * ],
474
+ * });
475
+ *
476
+ * // Acquire an auth client, and bind it to all future calls
477
+ * const authClient = await auth.getClient();
478
+ * google.options({auth: authClient});
479
+ *
480
+ * // Do the magic
481
+ * const res = await biglake.projects.catalogs.getIamPolicy({
482
+ * // 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).
483
+ * 'options.requestedPolicyVersion': 'placeholder-value',
484
+ * // 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.
485
+ * resource: 'projects/my-project/catalogs/my-catalog',
486
+ * });
487
+ * console.log(res.data);
488
+ *
489
+ * // Example response
490
+ * // {
491
+ * // "auditConfigs": [],
492
+ * // "bindings": [],
493
+ * // "etag": "my_etag",
494
+ * // "version": 0
495
+ * // }
496
+ * }
497
+ *
498
+ * main().catch(e => {
499
+ * console.error(e);
500
+ * throw e;
501
+ * });
502
+ *
503
+ * ```
504
+ *
505
+ * @param params - Parameters for request
506
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
507
+ * @param callback - Optional callback that handles the response.
508
+ * @returns A promise if used with async/await, or void if used with a callback.
509
+ */
510
+ getIamPolicy(
511
+ params: Params$Resource$Projects$Catalogs$Getiampolicy,
512
+ options: StreamMethodOptions
513
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
514
+ getIamPolicy(
515
+ params?: Params$Resource$Projects$Catalogs$Getiampolicy,
516
+ options?: MethodOptions
517
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
518
+ getIamPolicy(
519
+ params: Params$Resource$Projects$Catalogs$Getiampolicy,
520
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
521
+ callback: BodyResponseCallback<Readable>
522
+ ): void;
523
+ getIamPolicy(
524
+ params: Params$Resource$Projects$Catalogs$Getiampolicy,
525
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
526
+ callback: BodyResponseCallback<Schema$Policy>
527
+ ): void;
528
+ getIamPolicy(
529
+ params: Params$Resource$Projects$Catalogs$Getiampolicy,
530
+ callback: BodyResponseCallback<Schema$Policy>
531
+ ): void;
532
+ getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
533
+ getIamPolicy(
534
+ paramsOrCallback?:
535
+ | Params$Resource$Projects$Catalogs$Getiampolicy
536
+ | BodyResponseCallback<Schema$Policy>
537
+ | BodyResponseCallback<Readable>,
538
+ optionsOrCallback?:
539
+ | MethodOptions
540
+ | StreamMethodOptions
541
+ | BodyResponseCallback<Schema$Policy>
542
+ | BodyResponseCallback<Readable>,
543
+ callback?:
544
+ | BodyResponseCallback<Schema$Policy>
545
+ | BodyResponseCallback<Readable>
546
+ ):
547
+ | void
548
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
549
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
550
+ let params = (paramsOrCallback ||
551
+ {}) as Params$Resource$Projects$Catalogs$Getiampolicy;
552
+ let options = (optionsOrCallback || {}) as MethodOptions;
553
+
554
+ if (typeof paramsOrCallback === 'function') {
555
+ callback = paramsOrCallback;
556
+ params = {} as Params$Resource$Projects$Catalogs$Getiampolicy;
557
+ options = {};
558
+ }
559
+
560
+ if (typeof optionsOrCallback === 'function') {
561
+ callback = optionsOrCallback;
562
+ options = {};
563
+ }
564
+
565
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
566
+ const parameters = {
567
+ options: Object.assign(
568
+ {
569
+ url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace(
570
+ /([^:]\/)\/+/g,
571
+ '$1'
572
+ ),
573
+ method: 'GET',
574
+ apiVersion: '',
575
+ },
576
+ options
577
+ ),
578
+ params,
579
+ requiredParams: ['resource'],
580
+ pathParams: ['resource'],
581
+ context: this.context,
582
+ };
583
+ if (callback) {
584
+ createAPIRequest<Schema$Policy>(
585
+ parameters,
586
+ callback as BodyResponseCallback<unknown>
587
+ );
588
+ } else {
589
+ return createAPIRequest<Schema$Policy>(parameters);
590
+ }
591
+ }
592
+
593
+ /**
594
+ * Sets the IAM policy for the specified catalog.
595
+ * @example
596
+ * ```js
597
+ * // Before running the sample:
598
+ * // - Enable the API at:
599
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
600
+ * // - Login into gcloud by running:
601
+ * // ```sh
602
+ * // $ gcloud auth application-default login
603
+ * // ```
604
+ * // - Install the npm module by running:
605
+ * // ```sh
606
+ * // $ npm install googleapis
607
+ * // ```
608
+ *
609
+ * const {google} = require('googleapis');
610
+ * const biglake = google.biglake('v1');
611
+ *
612
+ * async function main() {
613
+ * const auth = new google.auth.GoogleAuth({
614
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
615
+ * scopes: [
616
+ * 'https://www.googleapis.com/auth/bigquery',
617
+ * 'https://www.googleapis.com/auth/cloud-platform',
618
+ * ],
619
+ * });
620
+ *
621
+ * // Acquire an auth client, and bind it to all future calls
622
+ * const authClient = await auth.getClient();
623
+ * google.options({auth: authClient});
624
+ *
625
+ * // Do the magic
626
+ * const res = await biglake.projects.catalogs.setIamPolicy({
627
+ * // 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.
628
+ * resource: 'projects/my-project/catalogs/my-catalog',
629
+ *
630
+ * // Request body metadata
631
+ * requestBody: {
632
+ * // request body parameters
633
+ * // {
634
+ * // "policy": {},
635
+ * // "updateMask": "my_updateMask"
636
+ * // }
637
+ * },
638
+ * });
639
+ * console.log(res.data);
640
+ *
641
+ * // Example response
642
+ * // {
643
+ * // "auditConfigs": [],
644
+ * // "bindings": [],
645
+ * // "etag": "my_etag",
646
+ * // "version": 0
647
+ * // }
648
+ * }
649
+ *
650
+ * main().catch(e => {
651
+ * console.error(e);
652
+ * throw e;
653
+ * });
654
+ *
655
+ * ```
656
+ *
657
+ * @param params - Parameters for request
658
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
659
+ * @param callback - Optional callback that handles the response.
660
+ * @returns A promise if used with async/await, or void if used with a callback.
661
+ */
662
+ setIamPolicy(
663
+ params: Params$Resource$Projects$Catalogs$Setiampolicy,
664
+ options: StreamMethodOptions
665
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
666
+ setIamPolicy(
667
+ params?: Params$Resource$Projects$Catalogs$Setiampolicy,
668
+ options?: MethodOptions
669
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
670
+ setIamPolicy(
671
+ params: Params$Resource$Projects$Catalogs$Setiampolicy,
672
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
673
+ callback: BodyResponseCallback<Readable>
674
+ ): void;
675
+ setIamPolicy(
676
+ params: Params$Resource$Projects$Catalogs$Setiampolicy,
677
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
678
+ callback: BodyResponseCallback<Schema$Policy>
679
+ ): void;
680
+ setIamPolicy(
681
+ params: Params$Resource$Projects$Catalogs$Setiampolicy,
682
+ callback: BodyResponseCallback<Schema$Policy>
683
+ ): void;
684
+ setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
685
+ setIamPolicy(
686
+ paramsOrCallback?:
687
+ | Params$Resource$Projects$Catalogs$Setiampolicy
688
+ | BodyResponseCallback<Schema$Policy>
689
+ | BodyResponseCallback<Readable>,
690
+ optionsOrCallback?:
691
+ | MethodOptions
692
+ | StreamMethodOptions
693
+ | BodyResponseCallback<Schema$Policy>
694
+ | BodyResponseCallback<Readable>,
695
+ callback?:
696
+ | BodyResponseCallback<Schema$Policy>
697
+ | BodyResponseCallback<Readable>
698
+ ):
699
+ | void
700
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
701
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
702
+ let params = (paramsOrCallback ||
703
+ {}) as Params$Resource$Projects$Catalogs$Setiampolicy;
704
+ let options = (optionsOrCallback || {}) as MethodOptions;
705
+
706
+ if (typeof paramsOrCallback === 'function') {
707
+ callback = paramsOrCallback;
708
+ params = {} as Params$Resource$Projects$Catalogs$Setiampolicy;
709
+ options = {};
710
+ }
711
+
712
+ if (typeof optionsOrCallback === 'function') {
713
+ callback = optionsOrCallback;
714
+ options = {};
715
+ }
716
+
717
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
718
+ const parameters = {
719
+ options: Object.assign(
720
+ {
721
+ url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace(
722
+ /([^:]\/)\/+/g,
723
+ '$1'
724
+ ),
725
+ method: 'POST',
726
+ apiVersion: '',
727
+ },
728
+ options
729
+ ),
730
+ params,
731
+ requiredParams: ['resource'],
732
+ pathParams: ['resource'],
733
+ context: this.context,
734
+ };
735
+ if (callback) {
736
+ createAPIRequest<Schema$Policy>(
737
+ parameters,
738
+ callback as BodyResponseCallback<unknown>
739
+ );
740
+ } else {
741
+ return createAPIRequest<Schema$Policy>(parameters);
742
+ }
743
+ }
744
+ }
745
+
746
+ export interface Params$Resource$Projects$Catalogs$Getiampolicy
747
+ extends StandardParameters {
748
+ /**
749
+ * 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).
750
+ */
751
+ 'options.requestedPolicyVersion'?: number;
752
+ /**
753
+ * 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.
754
+ */
755
+ resource?: string;
756
+ }
757
+ export interface Params$Resource$Projects$Catalogs$Setiampolicy
758
+ extends StandardParameters {
759
+ /**
760
+ * 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.
761
+ */
762
+ resource?: string;
763
+
764
+ /**
765
+ * Request body metadata
766
+ */
767
+ requestBody?: Schema$SetIamPolicyRequest;
768
+ }
769
+
770
+ export class Resource$Projects$Catalogs$Namespaces {
771
+ context: APIRequestContext;
772
+ constructor(context: APIRequestContext) {
773
+ this.context = context;
774
+ }
775
+
776
+ /**
777
+ * Gets the IAM policy for the specified Catalog.
778
+ * @example
779
+ * ```js
780
+ * // Before running the sample:
781
+ * // - Enable the API at:
782
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
783
+ * // - Login into gcloud by running:
784
+ * // ```sh
785
+ * // $ gcloud auth application-default login
786
+ * // ```
787
+ * // - Install the npm module by running:
788
+ * // ```sh
789
+ * // $ npm install googleapis
790
+ * // ```
791
+ *
792
+ * const {google} = require('googleapis');
793
+ * const biglake = google.biglake('v1');
794
+ *
795
+ * async function main() {
796
+ * const auth = new google.auth.GoogleAuth({
797
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
798
+ * scopes: [
799
+ * 'https://www.googleapis.com/auth/bigquery',
800
+ * 'https://www.googleapis.com/auth/cloud-platform',
801
+ * ],
802
+ * });
803
+ *
804
+ * // Acquire an auth client, and bind it to all future calls
805
+ * const authClient = await auth.getClient();
806
+ * google.options({auth: authClient});
807
+ *
808
+ * // Do the magic
809
+ * const res = await biglake.projects.catalogs.namespaces.getIamPolicy({
810
+ * // 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).
811
+ * 'options.requestedPolicyVersion': 'placeholder-value',
812
+ * // 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.
813
+ * resource: 'projects/my-project/catalogs/my-catalog/namespaces/my-namespace',
814
+ * });
815
+ * console.log(res.data);
816
+ *
817
+ * // Example response
818
+ * // {
819
+ * // "auditConfigs": [],
820
+ * // "bindings": [],
821
+ * // "etag": "my_etag",
822
+ * // "version": 0
823
+ * // }
824
+ * }
825
+ *
826
+ * main().catch(e => {
827
+ * console.error(e);
828
+ * throw e;
829
+ * });
830
+ *
831
+ * ```
832
+ *
833
+ * @param params - Parameters for request
834
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
835
+ * @param callback - Optional callback that handles the response.
836
+ * @returns A promise if used with async/await, or void if used with a callback.
837
+ */
838
+ getIamPolicy(
839
+ params: Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy,
840
+ options: StreamMethodOptions
841
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
842
+ getIamPolicy(
843
+ params?: Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy,
844
+ options?: MethodOptions
845
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
846
+ getIamPolicy(
847
+ params: Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy,
848
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
849
+ callback: BodyResponseCallback<Readable>
850
+ ): void;
851
+ getIamPolicy(
852
+ params: Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy,
853
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
854
+ callback: BodyResponseCallback<Schema$Policy>
855
+ ): void;
856
+ getIamPolicy(
857
+ params: Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy,
858
+ callback: BodyResponseCallback<Schema$Policy>
859
+ ): void;
860
+ getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
861
+ getIamPolicy(
862
+ paramsOrCallback?:
863
+ | Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy
864
+ | BodyResponseCallback<Schema$Policy>
865
+ | BodyResponseCallback<Readable>,
866
+ optionsOrCallback?:
867
+ | MethodOptions
868
+ | StreamMethodOptions
869
+ | BodyResponseCallback<Schema$Policy>
870
+ | BodyResponseCallback<Readable>,
871
+ callback?:
872
+ | BodyResponseCallback<Schema$Policy>
873
+ | BodyResponseCallback<Readable>
874
+ ):
875
+ | void
876
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
877
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
878
+ let params = (paramsOrCallback ||
879
+ {}) as Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy;
880
+ let options = (optionsOrCallback || {}) as MethodOptions;
881
+
882
+ if (typeof paramsOrCallback === 'function') {
883
+ callback = paramsOrCallback;
884
+ params =
885
+ {} as Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy;
886
+ options = {};
887
+ }
888
+
889
+ if (typeof optionsOrCallback === 'function') {
890
+ callback = optionsOrCallback;
891
+ options = {};
892
+ }
893
+
894
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
895
+ const parameters = {
896
+ options: Object.assign(
897
+ {
898
+ url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace(
899
+ /([^:]\/)\/+/g,
900
+ '$1'
901
+ ),
902
+ method: 'GET',
903
+ apiVersion: '',
904
+ },
905
+ options
906
+ ),
907
+ params,
908
+ requiredParams: ['resource'],
909
+ pathParams: ['resource'],
910
+ context: this.context,
911
+ };
912
+ if (callback) {
913
+ createAPIRequest<Schema$Policy>(
914
+ parameters,
915
+ callback as BodyResponseCallback<unknown>
916
+ );
917
+ } else {
918
+ return createAPIRequest<Schema$Policy>(parameters);
919
+ }
920
+ }
921
+
922
+ /**
923
+ * Sets the IAM policy for the specified catalog.
924
+ * @example
925
+ * ```js
926
+ * // Before running the sample:
927
+ * // - Enable the API at:
928
+ * // https://console.developers.google.com/apis/api/biglake.googleapis.com
929
+ * // - Login into gcloud by running:
930
+ * // ```sh
931
+ * // $ gcloud auth application-default login
932
+ * // ```
933
+ * // - Install the npm module by running:
934
+ * // ```sh
935
+ * // $ npm install googleapis
936
+ * // ```
937
+ *
938
+ * const {google} = require('googleapis');
939
+ * const biglake = google.biglake('v1');
940
+ *
941
+ * async function main() {
942
+ * const auth = new google.auth.GoogleAuth({
943
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
944
+ * scopes: [
945
+ * 'https://www.googleapis.com/auth/bigquery',
946
+ * 'https://www.googleapis.com/auth/cloud-platform',
947
+ * ],
948
+ * });
949
+ *
950
+ * // Acquire an auth client, and bind it to all future calls
951
+ * const authClient = await auth.getClient();
952
+ * google.options({auth: authClient});
953
+ *
954
+ * // Do the magic
955
+ * const res = await biglake.projects.catalogs.namespaces.setIamPolicy({
956
+ * // 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.
957
+ * resource: 'projects/my-project/catalogs/my-catalog/namespaces/my-namespace',
958
+ *
959
+ * // Request body metadata
960
+ * requestBody: {
961
+ * // request body parameters
962
+ * // {
963
+ * // "policy": {},
964
+ * // "updateMask": "my_updateMask"
965
+ * // }
966
+ * },
967
+ * });
968
+ * console.log(res.data);
969
+ *
970
+ * // Example response
971
+ * // {
972
+ * // "auditConfigs": [],
973
+ * // "bindings": [],
974
+ * // "etag": "my_etag",
975
+ * // "version": 0
976
+ * // }
977
+ * }
978
+ *
979
+ * main().catch(e => {
980
+ * console.error(e);
981
+ * throw e;
982
+ * });
983
+ *
984
+ * ```
985
+ *
986
+ * @param params - Parameters for request
987
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
988
+ * @param callback - Optional callback that handles the response.
989
+ * @returns A promise if used with async/await, or void if used with a callback.
990
+ */
991
+ setIamPolicy(
992
+ params: Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy,
993
+ options: StreamMethodOptions
994
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
995
+ setIamPolicy(
996
+ params?: Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy,
997
+ options?: MethodOptions
998
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
999
+ setIamPolicy(
1000
+ params: Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy,
1001
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1002
+ callback: BodyResponseCallback<Readable>
1003
+ ): void;
1004
+ setIamPolicy(
1005
+ params: Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy,
1006
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
1007
+ callback: BodyResponseCallback<Schema$Policy>
1008
+ ): void;
1009
+ setIamPolicy(
1010
+ params: Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy,
1011
+ callback: BodyResponseCallback<Schema$Policy>
1012
+ ): void;
1013
+ setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
1014
+ setIamPolicy(
1015
+ paramsOrCallback?:
1016
+ | Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy
1017
+ | BodyResponseCallback<Schema$Policy>
1018
+ | BodyResponseCallback<Readable>,
1019
+ optionsOrCallback?:
1020
+ | MethodOptions
1021
+ | StreamMethodOptions
1022
+ | BodyResponseCallback<Schema$Policy>
1023
+ | BodyResponseCallback<Readable>,
1024
+ callback?:
1025
+ | BodyResponseCallback<Schema$Policy>
1026
+ | BodyResponseCallback<Readable>
1027
+ ):
1028
+ | void
1029
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
1030
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1031
+ let params = (paramsOrCallback ||
1032
+ {}) as Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy;
1033
+ let options = (optionsOrCallback || {}) as MethodOptions;
1034
+
1035
+ if (typeof paramsOrCallback === 'function') {
1036
+ callback = paramsOrCallback;
1037
+ params =
1038
+ {} as Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy;
1039
+ options = {};
1040
+ }
1041
+
1042
+ if (typeof optionsOrCallback === 'function') {
1043
+ callback = optionsOrCallback;
1044
+ options = {};
1045
+ }
1046
+
1047
+ const rootUrl = options.rootUrl || 'https://biglake.googleapis.com/';
1048
+ const parameters = {
1049
+ options: Object.assign(
1050
+ {
1051
+ url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace(
1052
+ /([^:]\/)\/+/g,
1053
+ '$1'
1054
+ ),
1055
+ method: 'POST',
1056
+ apiVersion: '',
1057
+ },
1058
+ options
1059
+ ),
1060
+ params,
1061
+ requiredParams: ['resource'],
1062
+ pathParams: ['resource'],
1063
+ context: this.context,
1064
+ };
1065
+ if (callback) {
1066
+ createAPIRequest<Schema$Policy>(
1067
+ parameters,
1068
+ callback as BodyResponseCallback<unknown>
1069
+ );
1070
+ } else {
1071
+ return createAPIRequest<Schema$Policy>(parameters);
1072
+ }
1073
+ }
1074
+ }
1075
+
1076
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Getiampolicy
1077
+ extends StandardParameters {
1078
+ /**
1079
+ * 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).
1080
+ */
1081
+ 'options.requestedPolicyVersion'?: number;
1082
+ /**
1083
+ * 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.
1084
+ */
1085
+ resource?: string;
1086
+ }
1087
+ export interface Params$Resource$Projects$Catalogs$Namespaces$Setiampolicy
1088
+ extends StandardParameters {
1089
+ /**
1090
+ * 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.
1091
+ */
1092
+ resource?: string;
1093
+
1094
+ /**
1095
+ * Request body metadata
1096
+ */
1097
+ requestBody?: Schema$SetIamPolicyRequest;
1098
+ }
1099
+
340
1100
  export class Resource$Projects$Locations {
341
1101
  context: APIRequestContext;
342
1102
  catalogs: Resource$Projects$Locations$Catalogs;