google-apis-bigquerydatapolicy_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,596 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module BigquerydatapolicyV1
24
+
25
+ # Specifies the audit configuration for a service. The configuration determines
26
+ # which permission types are logged, and what identities, if any, are exempted
27
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
28
+ # are AuditConfigs for both `allServices` and a specific service, the union of
29
+ # the two AuditConfigs is used for that service: the log_types specified in each
30
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
31
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
32
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
33
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
34
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
35
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
36
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
37
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
38
+ # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
39
+ # from DATA_WRITE logging.
40
+ class AuditConfig
41
+ include Google::Apis::Core::Hashable
42
+
43
+ # The configuration for logging of each type of permission.
44
+ # Corresponds to the JSON property `auditLogConfigs`
45
+ # @return [Array<Google::Apis::BigquerydatapolicyV1::AuditLogConfig>]
46
+ attr_accessor :audit_log_configs
47
+
48
+ # Specifies a service that will be enabled for audit logging. For example, `
49
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
50
+ # value that covers all services.
51
+ # Corresponds to the JSON property `service`
52
+ # @return [String]
53
+ attr_accessor :service
54
+
55
+ def initialize(**args)
56
+ update!(**args)
57
+ end
58
+
59
+ # Update properties of this object
60
+ def update!(**args)
61
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
62
+ @service = args[:service] if args.key?(:service)
63
+ end
64
+ end
65
+
66
+ # Provides the configuration for logging a type of permissions. Example: ` "
67
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
68
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
69
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
70
+ # DATA_READ logging.
71
+ class AuditLogConfig
72
+ include Google::Apis::Core::Hashable
73
+
74
+ # Specifies the identities that do not cause logging for this type of permission.
75
+ # Follows the same format of Binding.members.
76
+ # Corresponds to the JSON property `exemptedMembers`
77
+ # @return [Array<String>]
78
+ attr_accessor :exempted_members
79
+
80
+ # The log type that this config enables.
81
+ # Corresponds to the JSON property `logType`
82
+ # @return [String]
83
+ attr_accessor :log_type
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
92
+ @log_type = args[:log_type] if args.key?(:log_type)
93
+ end
94
+ end
95
+
96
+ # Associates `members`, or principals, with a `role`.
97
+ class Binding
98
+ include Google::Apis::Core::Hashable
99
+
100
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
101
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
102
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
103
+ # "Summary size limit" description: "Determines if a summary is less than 100
104
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
105
+ # Requestor is owner" description: "Determines if requestor is the document
106
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
107
+ # Logic): title: "Public documents" description: "Determine whether the document
108
+ # should be publicly visible" expression: "document.type != 'private' &&
109
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
110
+ # string" description: "Create a notification string with a timestamp."
111
+ # expression: "'New message received at ' + string(document.create_time)" The
112
+ # exact variables and functions that may be referenced within an expression are
113
+ # determined by the service that evaluates it. See the service documentation for
114
+ # additional information.
115
+ # Corresponds to the JSON property `condition`
116
+ # @return [Google::Apis::BigquerydatapolicyV1::Expr]
117
+ attr_accessor :condition
118
+
119
+ # Specifies the principals requesting access for a Google Cloud resource. `
120
+ # members` can have the following values: * `allUsers`: A special identifier
121
+ # that represents anyone who is on the internet; with or without a Google
122
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
123
+ # anyone who is authenticated with a Google account or a service account. Does
124
+ # not include identities that come from external identity providers (IdPs)
125
+ # through identity federation. * `user:`emailid``: An email address that
126
+ # represents a specific Google account. For example, `alice@example.com` . * `
127
+ # serviceAccount:`emailid``: An email address that represents a Google service
128
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
129
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
130
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
131
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
132
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
133
+ # email address that represents a Google group. For example, `admins@example.com`
134
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
135
+ # users of that domain. For example, `google.com` or `example.com`. * `deleted:
136
+ # user:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
137
+ # representing a user that has been recently deleted. For example, `alice@
138
+ # example.com?uid=123456789012345678901`. If the user is recovered, this value
139
+ # reverts to `user:`emailid`` and the recovered user retains the role in the
140
+ # binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address
141
+ # (plus unique identifier) representing a service account that has been recently
142
+ # deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
143
+ # 123456789012345678901`. If the service account is undeleted, this value
144
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
145
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
146
+ # An email address (plus unique identifier) representing a Google group that has
147
+ # been recently deleted. For example, `admins@example.com?uid=
148
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
149
+ # group:`emailid`` and the recovered group retains the role in the binding.
150
+ # Corresponds to the JSON property `members`
151
+ # @return [Array<String>]
152
+ attr_accessor :members
153
+
154
+ # Role that is assigned to the list of `members`, or principals. For example, `
155
+ # roles/viewer`, `roles/editor`, or `roles/owner`.
156
+ # Corresponds to the JSON property `role`
157
+ # @return [String]
158
+ attr_accessor :role
159
+
160
+ def initialize(**args)
161
+ update!(**args)
162
+ end
163
+
164
+ # Update properties of this object
165
+ def update!(**args)
166
+ @condition = args[:condition] if args.key?(:condition)
167
+ @members = args[:members] if args.key?(:members)
168
+ @role = args[:role] if args.key?(:role)
169
+ end
170
+ end
171
+
172
+ # The data masking policy that is used to specify data masking rule.
173
+ class DataMaskingPolicy
174
+ include Google::Apis::Core::Hashable
175
+
176
+ # A predefined masking expression.
177
+ # Corresponds to the JSON property `predefinedExpression`
178
+ # @return [String]
179
+ attr_accessor :predefined_expression
180
+
181
+ # The name of the BigQuery routine that contains the custom masking routine, in
182
+ # the format of `projects/`project_number`/datasets/`dataset_id`/routines/`
183
+ # routine_id``.
184
+ # Corresponds to the JSON property `routine`
185
+ # @return [String]
186
+ attr_accessor :routine
187
+
188
+ def initialize(**args)
189
+ update!(**args)
190
+ end
191
+
192
+ # Update properties of this object
193
+ def update!(**args)
194
+ @predefined_expression = args[:predefined_expression] if args.key?(:predefined_expression)
195
+ @routine = args[:routine] if args.key?(:routine)
196
+ end
197
+ end
198
+
199
+ # Represents the label-policy binding.
200
+ class DataPolicy
201
+ include Google::Apis::Core::Hashable
202
+
203
+ # The data masking policy that is used to specify data masking rule.
204
+ # Corresponds to the JSON property `dataMaskingPolicy`
205
+ # @return [Google::Apis::BigquerydatapolicyV1::DataMaskingPolicy]
206
+ attr_accessor :data_masking_policy
207
+
208
+ # User-assigned (human readable) ID of the data policy that needs to be unique
209
+ # within a project. Used as `data_policy_id` in part of the resource name.
210
+ # Corresponds to the JSON property `dataPolicyId`
211
+ # @return [String]
212
+ attr_accessor :data_policy_id
213
+
214
+ # Type of data policy.
215
+ # Corresponds to the JSON property `dataPolicyType`
216
+ # @return [String]
217
+ attr_accessor :data_policy_type
218
+
219
+ # Output only. Resource name of this data policy, in the format of `projects/`
220
+ # project_number`/locations/`location_id`/dataPolicies/`data_policy_id``.
221
+ # Corresponds to the JSON property `name`
222
+ # @return [String]
223
+ attr_accessor :name
224
+
225
+ # Policy tag resource name, in the format of `projects/`project_number`/
226
+ # locations/`location_id`/taxonomies/`taxonomy_id`/policyTags/`policyTag_id``.
227
+ # Corresponds to the JSON property `policyTag`
228
+ # @return [String]
229
+ attr_accessor :policy_tag
230
+
231
+ def initialize(**args)
232
+ update!(**args)
233
+ end
234
+
235
+ # Update properties of this object
236
+ def update!(**args)
237
+ @data_masking_policy = args[:data_masking_policy] if args.key?(:data_masking_policy)
238
+ @data_policy_id = args[:data_policy_id] if args.key?(:data_policy_id)
239
+ @data_policy_type = args[:data_policy_type] if args.key?(:data_policy_type)
240
+ @name = args[:name] if args.key?(:name)
241
+ @policy_tag = args[:policy_tag] if args.key?(:policy_tag)
242
+ end
243
+ end
244
+
245
+ # A generic empty message that you can re-use to avoid defining duplicated empty
246
+ # messages in your APIs. A typical example is to use it as the request or the
247
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
248
+ # protobuf.Empty) returns (google.protobuf.Empty); `
249
+ class Empty
250
+ include Google::Apis::Core::Hashable
251
+
252
+ def initialize(**args)
253
+ update!(**args)
254
+ end
255
+
256
+ # Update properties of this object
257
+ def update!(**args)
258
+ end
259
+ end
260
+
261
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
262
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
263
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
264
+ # "Summary size limit" description: "Determines if a summary is less than 100
265
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
266
+ # Requestor is owner" description: "Determines if requestor is the document
267
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
268
+ # Logic): title: "Public documents" description: "Determine whether the document
269
+ # should be publicly visible" expression: "document.type != 'private' &&
270
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
271
+ # string" description: "Create a notification string with a timestamp."
272
+ # expression: "'New message received at ' + string(document.create_time)" The
273
+ # exact variables and functions that may be referenced within an expression are
274
+ # determined by the service that evaluates it. See the service documentation for
275
+ # additional information.
276
+ class Expr
277
+ include Google::Apis::Core::Hashable
278
+
279
+ # Optional. Description of the expression. This is a longer text which describes
280
+ # the expression, e.g. when hovered over it in a UI.
281
+ # Corresponds to the JSON property `description`
282
+ # @return [String]
283
+ attr_accessor :description
284
+
285
+ # Textual representation of an expression in Common Expression Language syntax.
286
+ # Corresponds to the JSON property `expression`
287
+ # @return [String]
288
+ attr_accessor :expression
289
+
290
+ # Optional. String indicating the location of the expression for error reporting,
291
+ # e.g. a file name and a position in the file.
292
+ # Corresponds to the JSON property `location`
293
+ # @return [String]
294
+ attr_accessor :location
295
+
296
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
297
+ # This can be used e.g. in UIs which allow to enter the expression.
298
+ # Corresponds to the JSON property `title`
299
+ # @return [String]
300
+ attr_accessor :title
301
+
302
+ def initialize(**args)
303
+ update!(**args)
304
+ end
305
+
306
+ # Update properties of this object
307
+ def update!(**args)
308
+ @description = args[:description] if args.key?(:description)
309
+ @expression = args[:expression] if args.key?(:expression)
310
+ @location = args[:location] if args.key?(:location)
311
+ @title = args[:title] if args.key?(:title)
312
+ end
313
+ end
314
+
315
+ # Request message for `GetIamPolicy` method.
316
+ class GetIamPolicyRequest
317
+ include Google::Apis::Core::Hashable
318
+
319
+ # Encapsulates settings provided to GetIamPolicy.
320
+ # Corresponds to the JSON property `options`
321
+ # @return [Google::Apis::BigquerydatapolicyV1::GetPolicyOptions]
322
+ attr_accessor :options
323
+
324
+ def initialize(**args)
325
+ update!(**args)
326
+ end
327
+
328
+ # Update properties of this object
329
+ def update!(**args)
330
+ @options = args[:options] if args.key?(:options)
331
+ end
332
+ end
333
+
334
+ # Encapsulates settings provided to GetIamPolicy.
335
+ class GetPolicyOptions
336
+ include Google::Apis::Core::Hashable
337
+
338
+ # Optional. The maximum policy version that will be used to format the policy.
339
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
340
+ # rejected. Requests for policies with any conditional role bindings must
341
+ # specify version 3. Policies with no conditional role bindings may specify any
342
+ # valid value or leave the field unset. The policy in the response might use the
343
+ # policy version that you specified, or it might use a lower policy version. For
344
+ # example, if you specify version 3, but the policy has no conditional role
345
+ # bindings, the response uses version 1. To learn which resources support
346
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
347
+ # google.com/iam/help/conditions/resource-policies).
348
+ # Corresponds to the JSON property `requestedPolicyVersion`
349
+ # @return [Fixnum]
350
+ attr_accessor :requested_policy_version
351
+
352
+ def initialize(**args)
353
+ update!(**args)
354
+ end
355
+
356
+ # Update properties of this object
357
+ def update!(**args)
358
+ @requested_policy_version = args[:requested_policy_version] if args.key?(:requested_policy_version)
359
+ end
360
+ end
361
+
362
+ # Response message for the ListDataPolicies method.
363
+ class ListDataPoliciesResponse
364
+ include Google::Apis::Core::Hashable
365
+
366
+ # Data policies that belong to the requested project.
367
+ # Corresponds to the JSON property `dataPolicies`
368
+ # @return [Array<Google::Apis::BigquerydatapolicyV1::DataPolicy>]
369
+ attr_accessor :data_policies
370
+
371
+ # Token used to retrieve the next page of results, or empty if there are no more
372
+ # results.
373
+ # Corresponds to the JSON property `nextPageToken`
374
+ # @return [String]
375
+ attr_accessor :next_page_token
376
+
377
+ def initialize(**args)
378
+ update!(**args)
379
+ end
380
+
381
+ # Update properties of this object
382
+ def update!(**args)
383
+ @data_policies = args[:data_policies] if args.key?(:data_policies)
384
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
385
+ end
386
+ end
387
+
388
+ # An Identity and Access Management (IAM) policy, which specifies access
389
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
390
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
391
+ # Principals can be user accounts, service accounts, Google groups, and domains (
392
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
393
+ # an IAM predefined role or a user-created custom role. For some types of Google
394
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
395
+ # logical expression that allows access to a resource only if the expression
396
+ # evaluates to `true`. A condition can add constraints based on attributes of
397
+ # the request, the resource, or both. To learn which resources support
398
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
399
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
400
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
401
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
402
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
403
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
404
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
405
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
406
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
407
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
408
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
409
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
410
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
411
+ # title: expirable access description: Does not grant access after Sep 2020
412
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
413
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
414
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
415
+ class Policy
416
+ include Google::Apis::Core::Hashable
417
+
418
+ # Specifies cloud audit logging configuration for this policy.
419
+ # Corresponds to the JSON property `auditConfigs`
420
+ # @return [Array<Google::Apis::BigquerydatapolicyV1::AuditConfig>]
421
+ attr_accessor :audit_configs
422
+
423
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
424
+ # specify a `condition` that determines how and when the `bindings` are applied.
425
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
426
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
427
+ # can be Google groups. Each occurrence of a principal counts towards these
428
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
429
+ # example.com`, and not to any other principal, then you can add another 1,450
430
+ # principals to the `bindings` in the `Policy`.
431
+ # Corresponds to the JSON property `bindings`
432
+ # @return [Array<Google::Apis::BigquerydatapolicyV1::Binding>]
433
+ attr_accessor :bindings
434
+
435
+ # `etag` is used for optimistic concurrency control as a way to help prevent
436
+ # simultaneous updates of a policy from overwriting each other. It is strongly
437
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
438
+ # to perform policy updates in order to avoid race conditions: An `etag` is
439
+ # returned in the response to `getIamPolicy`, and systems are expected to put
440
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
441
+ # applied to the same version of the policy. **Important:** If you use IAM
442
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
443
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
444
+ # with a version `1` policy, and all of the conditions in the version `3` policy
445
+ # are lost.
446
+ # Corresponds to the JSON property `etag`
447
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
448
+ # @return [String]
449
+ attr_accessor :etag
450
+
451
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
452
+ # Requests that specify an invalid value are rejected. Any operation that
453
+ # affects conditional role bindings must specify version `3`. This requirement
454
+ # applies to the following operations: * Getting a policy that includes a
455
+ # conditional role binding * Adding a conditional role binding to a policy *
456
+ # Changing a conditional role binding in a policy * Removing any role binding,
457
+ # with or without a condition, from a policy that includes conditions **
458
+ # Important:** If you use IAM Conditions, you must include the `etag` field
459
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
460
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
461
+ # conditions in the version `3` policy are lost. If a policy does not include
462
+ # any conditions, operations on that policy may specify any valid version or
463
+ # leave the field unset. To learn which resources support conditions in their
464
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
465
+ # conditions/resource-policies).
466
+ # Corresponds to the JSON property `version`
467
+ # @return [Fixnum]
468
+ attr_accessor :version
469
+
470
+ def initialize(**args)
471
+ update!(**args)
472
+ end
473
+
474
+ # Update properties of this object
475
+ def update!(**args)
476
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
477
+ @bindings = args[:bindings] if args.key?(:bindings)
478
+ @etag = args[:etag] if args.key?(:etag)
479
+ @version = args[:version] if args.key?(:version)
480
+ end
481
+ end
482
+
483
+ # Request message for the RenameDataPolicy method.
484
+ class RenameDataPolicyRequest
485
+ include Google::Apis::Core::Hashable
486
+
487
+ # Required. The new data policy id.
488
+ # Corresponds to the JSON property `newDataPolicyId`
489
+ # @return [String]
490
+ attr_accessor :new_data_policy_id
491
+
492
+ def initialize(**args)
493
+ update!(**args)
494
+ end
495
+
496
+ # Update properties of this object
497
+ def update!(**args)
498
+ @new_data_policy_id = args[:new_data_policy_id] if args.key?(:new_data_policy_id)
499
+ end
500
+ end
501
+
502
+ # Request message for `SetIamPolicy` method.
503
+ class SetIamPolicyRequest
504
+ include Google::Apis::Core::Hashable
505
+
506
+ # An Identity and Access Management (IAM) policy, which specifies access
507
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
508
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
509
+ # Principals can be user accounts, service accounts, Google groups, and domains (
510
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
511
+ # an IAM predefined role or a user-created custom role. For some types of Google
512
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
513
+ # logical expression that allows access to a resource only if the expression
514
+ # evaluates to `true`. A condition can add constraints based on attributes of
515
+ # the request, the resource, or both. To learn which resources support
516
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
517
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
518
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
519
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
520
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
521
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
522
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
523
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
524
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
525
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
526
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
527
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
528
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
529
+ # title: expirable access description: Does not grant access after Sep 2020
530
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
531
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
532
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
533
+ # Corresponds to the JSON property `policy`
534
+ # @return [Google::Apis::BigquerydatapolicyV1::Policy]
535
+ attr_accessor :policy
536
+
537
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
538
+ # the fields in the mask will be modified. If no mask is provided, the following
539
+ # default mask is used: `paths: "bindings, etag"`
540
+ # Corresponds to the JSON property `updateMask`
541
+ # @return [String]
542
+ attr_accessor :update_mask
543
+
544
+ def initialize(**args)
545
+ update!(**args)
546
+ end
547
+
548
+ # Update properties of this object
549
+ def update!(**args)
550
+ @policy = args[:policy] if args.key?(:policy)
551
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
552
+ end
553
+ end
554
+
555
+ # Request message for `TestIamPermissions` method.
556
+ class TestIamPermissionsRequest
557
+ include Google::Apis::Core::Hashable
558
+
559
+ # The set of permissions to check for the `resource`. Permissions with wildcards
560
+ # (such as `*` or `storage.*`) are not allowed. For more information see [IAM
561
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
562
+ # Corresponds to the JSON property `permissions`
563
+ # @return [Array<String>]
564
+ attr_accessor :permissions
565
+
566
+ def initialize(**args)
567
+ update!(**args)
568
+ end
569
+
570
+ # Update properties of this object
571
+ def update!(**args)
572
+ @permissions = args[:permissions] if args.key?(:permissions)
573
+ end
574
+ end
575
+
576
+ # Response message for `TestIamPermissions` method.
577
+ class TestIamPermissionsResponse
578
+ include Google::Apis::Core::Hashable
579
+
580
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
581
+ # Corresponds to the JSON property `permissions`
582
+ # @return [Array<String>]
583
+ attr_accessor :permissions
584
+
585
+ def initialize(**args)
586
+ update!(**args)
587
+ end
588
+
589
+ # Update properties of this object
590
+ def update!(**args)
591
+ @permissions = args[:permissions] if args.key?(:permissions)
592
+ end
593
+ end
594
+ end
595
+ end
596
+ end
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module BigquerydatapolicyV1
18
+ # Version of the google-apis-bigquerydatapolicy_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.12.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20231016"
26
+ end
27
+ end
28
+ end