google-apis-cloudasset_v1p7beta1 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db95e223da7dd719426721acb9417c28dd3da265182e788b9aa1d0940d243480
4
- data.tar.gz: d0fd4ed57c1fec311cbafc906767706fb7456de56a31bb2848c3107c7677a5dc
3
+ metadata.gz: 192d196ef1991b8f5d1809aea9d5ffe904e7a8a4e7c82bb57cbe220cd2a7090d
4
+ data.tar.gz: 5d7a89d5f145b6447abcf0b00814a529561bca00250a520f551e9c4f7f6c6695
5
5
  SHA512:
6
- metadata.gz: ed3f918f2ad8478efed1b882560dc09bce5d703911490da74a858ea66c8a7fcd98380d88d9830249af729b95a5304df5f7fe2c191d31cff992c3de8f4fcfd337
7
- data.tar.gz: 4c07d6bf2fd85b0b1279ce64b476ec8c97355dcff1a91208d41d50ab94072dbeae580f10c11c9edbcf26b5580f4d683ff4c87c125b537157050f031444698e5a
6
+ metadata.gz: e32a5fb0171cfa24aa0902523a69ddccac75c77aecfa285c2b6ce4e62769749c9a59b03c336d5bebb8190afabfac39411de81bf4024cae7978b5ca0816db04a1
7
+ data.tar.gz: c02987ff112edf841571757339e2eb31bd99811c0a8a2044576ffdf5150974431491aae4a1fcbd93d009caf8b244d22c36d9b86d8f6b6b3c9ea20b6783dce9cd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-cloudasset_v1p7beta1
2
2
 
3
+ ### v0.3.0 (2021-03-04)
4
+
5
+ * Regenerated from discovery document revision 20210226
6
+
3
7
  ### v0.2.0 (2021-02-11)
4
8
 
5
9
  * Regenerated from discovery document revision 20210209
@@ -22,8 +22,342 @@ module Google
22
22
  module Apis
23
23
  module CloudassetV1p7beta1
24
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 from
39
+ # 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::CloudassetV1p7beta1::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` 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::CloudassetV1p7beta1::Expr]
117
+ attr_accessor :condition
118
+
119
+ # Specifies the identities requesting access for a Cloud Platform 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. * `
124
+ # user:`emailid``: An email address that represents a specific Google account.
125
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
126
+ # address that represents a service account. For example, `my-other-app@appspot.
127
+ # gserviceaccount.com`. * `group:`emailid``: An email address that represents a
128
+ # Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
129
+ # `uniqueid``: An email address (plus unique identifier) representing a user
130
+ # that has been recently deleted. For example, `alice@example.com?uid=
131
+ # 123456789012345678901`. If the user is recovered, this value reverts to `user:`
132
+ # emailid`` and the recovered user retains the role in the binding. * `deleted:
133
+ # serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
134
+ # identifier) representing a service account that has been recently deleted. For
135
+ # example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
136
+ # If the service account is undeleted, this value reverts to `serviceAccount:`
137
+ # emailid`` and the undeleted service account retains the role in the binding. *
138
+ # `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
139
+ # identifier) representing a Google group that has been recently deleted. For
140
+ # example, `admins@example.com?uid=123456789012345678901`. If the group is
141
+ # recovered, this value reverts to `group:`emailid`` and the recovered group
142
+ # retains the role in the binding. * `domain:`domain``: The G Suite domain (
143
+ # primary) that represents all the users of that domain. For example, `google.
144
+ # com` or `example.com`.
145
+ # Corresponds to the JSON property `members`
146
+ # @return [Array<String>]
147
+ attr_accessor :members
148
+
149
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
150
+ # , or `roles/owner`.
151
+ # Corresponds to the JSON property `role`
152
+ # @return [String]
153
+ attr_accessor :role
154
+
155
+ def initialize(**args)
156
+ update!(**args)
157
+ end
158
+
159
+ # Update properties of this object
160
+ def update!(**args)
161
+ @condition = args[:condition] if args.key?(:condition)
162
+ @members = args[:members] if args.key?(:members)
163
+ @role = args[:role] if args.key?(:role)
164
+ end
165
+ end
166
+
167
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
168
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
169
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
170
+ # "Summary size limit" description: "Determines if a summary is less than 100
171
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
172
+ # Requestor is owner" description: "Determines if requestor is the document
173
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
174
+ # Logic): title: "Public documents" description: "Determine whether the document
175
+ # should be publicly visible" expression: "document.type != 'private' &&
176
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
177
+ # string" description: "Create a notification string with a timestamp."
178
+ # expression: "'New message received at ' + string(document.create_time)" The
179
+ # exact variables and functions that may be referenced within an expression are
180
+ # determined by the service that evaluates it. See the service documentation for
181
+ # additional information.
182
+ class Expr
183
+ include Google::Apis::Core::Hashable
184
+
185
+ # Optional. Description of the expression. This is a longer text which describes
186
+ # the expression, e.g. when hovered over it in a UI.
187
+ # Corresponds to the JSON property `description`
188
+ # @return [String]
189
+ attr_accessor :description
190
+
191
+ # Textual representation of an expression in Common Expression Language syntax.
192
+ # Corresponds to the JSON property `expression`
193
+ # @return [String]
194
+ attr_accessor :expression
195
+
196
+ # Optional. String indicating the location of the expression for error reporting,
197
+ # e.g. a file name and a position in the file.
198
+ # Corresponds to the JSON property `location`
199
+ # @return [String]
200
+ attr_accessor :location
201
+
202
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
203
+ # This can be used e.g. in UIs which allow to enter the expression.
204
+ # Corresponds to the JSON property `title`
205
+ # @return [String]
206
+ attr_accessor :title
207
+
208
+ def initialize(**args)
209
+ update!(**args)
210
+ end
211
+
212
+ # Update properties of this object
213
+ def update!(**args)
214
+ @description = args[:description] if args.key?(:description)
215
+ @expression = args[:expression] if args.key?(:expression)
216
+ @location = args[:location] if args.key?(:location)
217
+ @title = args[:title] if args.key?(:title)
218
+ end
219
+ end
220
+
221
+ # An asset in Google Cloud. An asset can be any resource in the Google Cloud [
222
+ # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
223
+ # platform-resource-hierarchy), a resource outside the Google Cloud resource
224
+ # hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
225
+ # (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
226
+ # asset-inventory/docs/supported-asset-types) for more information.
227
+ class GoogleCloudAssetV1p7beta1Asset
228
+ include Google::Apis::Core::Hashable
229
+
230
+ # An `AccessLevel` is a label that can be applied to requests to Google Cloud
231
+ # services, along with a list of requirements necessary for the label to be
232
+ # applied.
233
+ # Corresponds to the JSON property `accessLevel`
234
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1AccessLevel]
235
+ attr_accessor :access_level
236
+
237
+ # `AccessPolicy` is a container for `AccessLevels` (which define the necessary
238
+ # attributes to use Google Cloud services) and `ServicePerimeters` (which define
239
+ # regions of services able to freely pass data within a perimeter). An access
240
+ # policy is globally visible within an organization, and the restrictions it
241
+ # specifies apply to all projects within an organization.
242
+ # Corresponds to the JSON property `accessPolicy`
243
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1AccessPolicy]
244
+ attr_accessor :access_policy
245
+
246
+ # The ancestry path of an asset in Google Cloud [resource hierarchy](https://
247
+ # cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
248
+ # represented as a list of relative resource names. An ancestry path starts with
249
+ # the closest ancestor in the hierarchy and ends at root. If the asset is a
250
+ # project, folder, or organization, the ancestry path starts from the asset
251
+ # itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
252
+ # Corresponds to the JSON property `ancestors`
253
+ # @return [Array<String>]
254
+ attr_accessor :ancestors
255
+
256
+ # The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported
257
+ # asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-
258
+ # types) for more information.
259
+ # Corresponds to the JSON property `assetType`
260
+ # @return [String]
261
+ attr_accessor :asset_type
262
+
263
+ # An Identity and Access Management (IAM) policy, which specifies access
264
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
265
+ # A `binding` binds one or more `members` to a single `role`. Members can be
266
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
267
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
268
+ # role or a user-created custom role. For some types of Google Cloud resources,
269
+ # a `binding` can also specify a `condition`, which is a logical expression that
270
+ # allows access to a resource only if the expression evaluates to `true`. A
271
+ # condition can add constraints based on attributes of the request, the resource,
272
+ # or both. To learn which resources support conditions in their IAM policies,
273
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
274
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
275
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
276
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
277
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
278
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
279
+ # title": "expirable access", "description": "Does not grant access after Sep
280
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
281
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
282
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
283
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
284
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
285
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
286
+ # description: Does not grant access after Sep 2020 expression: request.time <
287
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
288
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
289
+ # google.com/iam/docs/).
290
+ # Corresponds to the JSON property `iamPolicy`
291
+ # @return [Google::Apis::CloudassetV1p7beta1::Policy]
292
+ attr_accessor :iam_policy
293
+
294
+ # The full name of the asset. Example: `//compute.googleapis.com/projects/
295
+ # my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
296
+ # cloud.google.com/apis/design/resource_names#full_resource_name) for more
297
+ # information.
298
+ # Corresponds to the JSON property `name`
299
+ # @return [String]
300
+ attr_accessor :name
301
+
302
+ # A representation of an [organization policy](https://cloud.google.com/resource-
303
+ # manager/docs/organization-policy/overview#organization_policy). There can be
304
+ # more than one organization policy with different constraints set on a given
305
+ # resource.
306
+ # Corresponds to the JSON property `orgPolicy`
307
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleCloudOrgpolicyV1Policy>]
308
+ attr_accessor :org_policy
309
+
310
+ # The detailed related assets with the `relationship_type`.
311
+ # Corresponds to the JSON property `relatedAssets`
312
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1RelatedAssets]
313
+ attr_accessor :related_assets
314
+
315
+ # A representation of a Google Cloud resource.
316
+ # Corresponds to the JSON property `resource`
317
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1Resource]
318
+ attr_accessor :resource
319
+
320
+ # `ServicePerimeter` describes a set of Google Cloud resources which can freely
321
+ # import and export data amongst themselves, but not export outside of the `
322
+ # ServicePerimeter`. If a request with a source within this `ServicePerimeter`
323
+ # has a target outside of the `ServicePerimeter`, the request will be blocked.
324
+ # Otherwise the request is allowed. There are two types of Service Perimeter -
325
+ # Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google
326
+ # Cloud project can only belong to a single regular Service Perimeter. Service
327
+ # Perimeter Bridges can contain only Google Cloud projects as members, a single
328
+ # Google Cloud project may belong to multiple Service Perimeter Bridges.
329
+ # Corresponds to the JSON property `servicePerimeter`
330
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeter]
331
+ attr_accessor :service_perimeter
332
+
333
+ # The last update timestamp of an asset. update_time is updated when create/
334
+ # update/delete operation is performed.
335
+ # Corresponds to the JSON property `updateTime`
336
+ # @return [String]
337
+ attr_accessor :update_time
338
+
339
+ def initialize(**args)
340
+ update!(**args)
341
+ end
342
+
343
+ # Update properties of this object
344
+ def update!(**args)
345
+ @access_level = args[:access_level] if args.key?(:access_level)
346
+ @access_policy = args[:access_policy] if args.key?(:access_policy)
347
+ @ancestors = args[:ancestors] if args.key?(:ancestors)
348
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
349
+ @iam_policy = args[:iam_policy] if args.key?(:iam_policy)
350
+ @name = args[:name] if args.key?(:name)
351
+ @org_policy = args[:org_policy] if args.key?(:org_policy)
352
+ @related_assets = args[:related_assets] if args.key?(:related_assets)
353
+ @resource = args[:resource] if args.key?(:resource)
354
+ @service_perimeter = args[:service_perimeter] if args.key?(:service_perimeter)
355
+ @update_time = args[:update_time] if args.key?(:update_time)
356
+ end
357
+ end
358
+
25
359
  # A BigQuery destination for exporting assets to.
26
- class BigQueryDestination
360
+ class GoogleCloudAssetV1p7beta1BigQueryDestination
27
361
  include Google::Apis::Core::Hashable
28
362
 
29
363
  # Required. The BigQuery dataset in format "projects/projectId/datasets/
@@ -44,7 +378,7 @@ module Google
44
378
 
45
379
  # Specifications of BigQuery partitioned table as export destination.
46
380
  # Corresponds to the JSON property `partitionSpec`
47
- # @return [Google::Apis::CloudassetV1p7beta1::PartitionSpec]
381
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1PartitionSpec]
48
382
  attr_accessor :partition_spec
49
383
 
50
384
  # If this flag is `TRUE`, the snapshot results will be written to one or
@@ -94,7 +428,7 @@ module Google
94
428
  end
95
429
 
96
430
  # Export asset request.
97
- class ExportAssetsRequest
431
+ class GoogleCloudAssetV1p7beta1ExportAssetsRequest
98
432
  include Google::Apis::Core::Hashable
99
433
 
100
434
  # A list of asset types to take a snapshot for. For example: "compute.googleapis.
@@ -120,7 +454,7 @@ module Google
120
454
 
121
455
  # Output configuration for export assets destination.
122
456
  # Corresponds to the JSON property `outputConfig`
123
- # @return [Google::Apis::CloudassetV1p7beta1::OutputConfig]
457
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1OutputConfig]
124
458
  attr_accessor :output_config
125
459
 
126
460
  # Timestamp to take an asset snapshot. This can only be set to a timestamp
@@ -160,7 +494,7 @@ module Google
160
494
  end
161
495
 
162
496
  # A Cloud Storage location.
163
- class GcsDestination
497
+ class GoogleCloudAssetV1p7beta1GcsDestination
164
498
  include Google::Apis::Core::Hashable
165
499
 
166
500
  # The uri of the Cloud Storage object. It's the same uri that is used by gsutil.
@@ -194,53 +528,83 @@ module Google
194
528
  end
195
529
  end
196
530
 
197
- # This resource represents a long-running operation that is the result of a
198
- # network API call.
199
- class Operation
531
+ # Output configuration for export assets destination.
532
+ class GoogleCloudAssetV1p7beta1OutputConfig
200
533
  include Google::Apis::Core::Hashable
201
534
 
202
- # If the value is `false`, it means the operation is still in progress. If `true`
203
- # , the operation is completed, and either `error` or `response` is available.
204
- # Corresponds to the JSON property `done`
205
- # @return [Boolean]
206
- attr_accessor :done
207
- alias_method :done?, :done
535
+ # A BigQuery destination for exporting assets to.
536
+ # Corresponds to the JSON property `bigqueryDestination`
537
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1BigQueryDestination]
538
+ attr_accessor :bigquery_destination
208
539
 
209
- # The `Status` type defines a logical error model that is suitable for different
210
- # programming environments, including REST APIs and RPC APIs. It is used by [
211
- # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
212
- # data: error code, error message, and error details. You can find out more
213
- # about this error model and how to work with it in the [API Design Guide](https:
214
- # //cloud.google.com/apis/design/errors).
215
- # Corresponds to the JSON property `error`
216
- # @return [Google::Apis::CloudassetV1p7beta1::Status]
217
- attr_accessor :error
540
+ # A Cloud Storage location.
541
+ # Corresponds to the JSON property `gcsDestination`
542
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1GcsDestination]
543
+ attr_accessor :gcs_destination
218
544
 
219
- # Service-specific metadata associated with the operation. It typically contains
220
- # progress information and common metadata such as create time. Some services
221
- # might not provide such metadata. Any method that returns a long-running
222
- # operation should document the metadata type, if any.
223
- # Corresponds to the JSON property `metadata`
224
- # @return [Hash<String,Object>]
225
- attr_accessor :metadata
545
+ def initialize(**args)
546
+ update!(**args)
547
+ end
226
548
 
227
- # The server-assigned name, which is only unique within the same service that
228
- # originally returns it. If you use the default HTTP mapping, the `name` should
229
- # be a resource name ending with `operations/`unique_id``.
230
- # Corresponds to the JSON property `name`
549
+ # Update properties of this object
550
+ def update!(**args)
551
+ @bigquery_destination = args[:bigquery_destination] if args.key?(:bigquery_destination)
552
+ @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
553
+ end
554
+ end
555
+
556
+ # Specifications of BigQuery partitioned table as export destination.
557
+ class GoogleCloudAssetV1p7beta1PartitionSpec
558
+ include Google::Apis::Core::Hashable
559
+
560
+ # The partition key for BigQuery partitioned table.
561
+ # Corresponds to the JSON property `partitionKey`
231
562
  # @return [String]
232
- attr_accessor :name
563
+ attr_accessor :partition_key
233
564
 
234
- # The normal response of the operation in case of success. If the original
235
- # method returns no data on success, such as `Delete`, the response is `google.
236
- # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
237
- # the response should be the resource. For other methods, the response should
238
- # have the type `XxxResponse`, where `Xxx` is the original method name. For
239
- # example, if the original method name is `TakeSnapshot()`, the inferred
240
- # response type is `TakeSnapshotResponse`.
241
- # Corresponds to the JSON property `response`
242
- # @return [Hash<String,Object>]
243
- attr_accessor :response
565
+ def initialize(**args)
566
+ update!(**args)
567
+ end
568
+
569
+ # Update properties of this object
570
+ def update!(**args)
571
+ @partition_key = args[:partition_key] if args.key?(:partition_key)
572
+ end
573
+ end
574
+
575
+ # An asset identify in Google Cloud which contains its name, type and ancestors.
576
+ # An asset can be any resource in the Google Cloud [resource hierarchy](https://
577
+ # cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a
578
+ # resource outside the Google Cloud resource hierarchy (such as Google
579
+ # Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
580
+ # See [Supported asset types](https://cloud.google.com/asset-inventory/docs/
581
+ # supported-asset-types) for more information.
582
+ class GoogleCloudAssetV1p7beta1RelatedAsset
583
+ include Google::Apis::Core::Hashable
584
+
585
+ # The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.
586
+ # google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
587
+ # represented as a list of relative resource names. An ancestry path starts with
588
+ # the closest ancestor in the hierarchy and ends at root. Example: `["projects/
589
+ # 123456789", "folders/5432", "organizations/1234"]`
590
+ # Corresponds to the JSON property `ancestors`
591
+ # @return [Array<String>]
592
+ attr_accessor :ancestors
593
+
594
+ # The full name of the asset. Example: `//compute.googleapis.com/projects/
595
+ # my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
596
+ # cloud.google.com/apis/design/resource_names#full_resource_name) for more
597
+ # information.
598
+ # Corresponds to the JSON property `asset`
599
+ # @return [String]
600
+ attr_accessor :asset
601
+
602
+ # The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported
603
+ # asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-
604
+ # types) for more information.
605
+ # Corresponds to the JSON property `assetType`
606
+ # @return [String]
607
+ attr_accessor :asset_type
244
608
 
245
609
  def initialize(**args)
246
610
  update!(**args)
@@ -248,27 +612,26 @@ module Google
248
612
 
249
613
  # Update properties of this object
250
614
  def update!(**args)
251
- @done = args[:done] if args.key?(:done)
252
- @error = args[:error] if args.key?(:error)
253
- @metadata = args[:metadata] if args.key?(:metadata)
254
- @name = args[:name] if args.key?(:name)
255
- @response = args[:response] if args.key?(:response)
615
+ @ancestors = args[:ancestors] if args.key?(:ancestors)
616
+ @asset = args[:asset] if args.key?(:asset)
617
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
256
618
  end
257
619
  end
258
620
 
259
- # Output configuration for export assets destination.
260
- class OutputConfig
621
+ # The detailed related assets with the `relationship_type`.
622
+ class GoogleCloudAssetV1p7beta1RelatedAssets
261
623
  include Google::Apis::Core::Hashable
262
624
 
263
- # A BigQuery destination for exporting assets to.
264
- # Corresponds to the JSON property `bigqueryDestination`
265
- # @return [Google::Apis::CloudassetV1p7beta1::BigQueryDestination]
266
- attr_accessor :bigquery_destination
625
+ # The peer resources of the relationship.
626
+ # Corresponds to the JSON property `assets`
627
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1RelatedAsset>]
628
+ attr_accessor :assets
267
629
 
268
- # A Cloud Storage location.
269
- # Corresponds to the JSON property `gcsDestination`
270
- # @return [Google::Apis::CloudassetV1p7beta1::GcsDestination]
271
- attr_accessor :gcs_destination
630
+ # The relationship attributes which include `type`, `source_resource_type`, `
631
+ # target_resource_type` and `action`.
632
+ # Corresponds to the JSON property `relationshipAttributes`
633
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1RelationshipAttributes]
634
+ attr_accessor :relationship_attributes
272
635
 
273
636
  def initialize(**args)
274
637
  update!(**args)
@@ -276,19 +639,36 @@ module Google
276
639
 
277
640
  # Update properties of this object
278
641
  def update!(**args)
279
- @bigquery_destination = args[:bigquery_destination] if args.key?(:bigquery_destination)
280
- @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
642
+ @assets = args[:assets] if args.key?(:assets)
643
+ @relationship_attributes = args[:relationship_attributes] if args.key?(:relationship_attributes)
281
644
  end
282
645
  end
283
646
 
284
- # Specifications of BigQuery partitioned table as export destination.
285
- class PartitionSpec
647
+ # The relationship attributes which include `type`, `source_resource_type`, `
648
+ # target_resource_type` and `action`.
649
+ class GoogleCloudAssetV1p7beta1RelationshipAttributes
286
650
  include Google::Apis::Core::Hashable
287
651
 
288
- # The partition key for BigQuery partitioned table.
289
- # Corresponds to the JSON property `partitionKey`
652
+ # The detail of the relationship, e.g. `contains`, `attaches`
653
+ # Corresponds to the JSON property `action`
290
654
  # @return [String]
291
- attr_accessor :partition_key
655
+ attr_accessor :action
656
+
657
+ # The source asset type. Example: `compute.googleapis.com/Instance`
658
+ # Corresponds to the JSON property `sourceResourceType`
659
+ # @return [String]
660
+ attr_accessor :source_resource_type
661
+
662
+ # The target asset type. Example: `compute.googleapis.com/Disk`
663
+ # Corresponds to the JSON property `targetResourceType`
664
+ # @return [String]
665
+ attr_accessor :target_resource_type
666
+
667
+ # The unique identifier of the relationship type. Example: `
668
+ # INSTANCE_TO_INSTANCEGROUP`
669
+ # Corresponds to the JSON property `type`
670
+ # @return [String]
671
+ attr_accessor :type
292
672
 
293
673
  def initialize(**args)
294
674
  update!(**args)
@@ -296,7 +676,1326 @@ module Google
296
676
 
297
677
  # Update properties of this object
298
678
  def update!(**args)
299
- @partition_key = args[:partition_key] if args.key?(:partition_key)
679
+ @action = args[:action] if args.key?(:action)
680
+ @source_resource_type = args[:source_resource_type] if args.key?(:source_resource_type)
681
+ @target_resource_type = args[:target_resource_type] if args.key?(:target_resource_type)
682
+ @type = args[:type] if args.key?(:type)
683
+ end
684
+ end
685
+
686
+ # A representation of a Google Cloud resource.
687
+ class GoogleCloudAssetV1p7beta1Resource
688
+ include Google::Apis::Core::Hashable
689
+
690
+ # The content of the resource, in which some sensitive fields are removed and
691
+ # may not be present.
692
+ # Corresponds to the JSON property `data`
693
+ # @return [Hash<String,Object>]
694
+ attr_accessor :data
695
+
696
+ # The URL of the discovery document containing the resource's JSON schema.
697
+ # Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` This
698
+ # value is unspecified for resources that do not have an API based on a
699
+ # discovery document, such as Cloud Bigtable.
700
+ # Corresponds to the JSON property `discoveryDocumentUri`
701
+ # @return [String]
702
+ attr_accessor :discovery_document_uri
703
+
704
+ # The JSON schema name listed in the discovery document. Example: `Project` This
705
+ # value is unspecified for resources that do not have an API based on a
706
+ # discovery document, such as Cloud Bigtable.
707
+ # Corresponds to the JSON property `discoveryName`
708
+ # @return [String]
709
+ attr_accessor :discovery_name
710
+
711
+ # The location of the resource in Google Cloud, such as its zone and region. For
712
+ # more information, see https://cloud.google.com/about/locations/.
713
+ # Corresponds to the JSON property `location`
714
+ # @return [String]
715
+ attr_accessor :location
716
+
717
+ # The full name of the immediate parent of this resource. See [Resource Names](
718
+ # https://cloud.google.com/apis/design/resource_names#full_resource_name) for
719
+ # more information. For Google Cloud assets, this value is the parent resource
720
+ # defined in the [Cloud IAM policy hierarchy](https://cloud.google.com/iam/docs/
721
+ # overview#policy_hierarchy). Example: `//cloudresourcemanager.googleapis.com/
722
+ # projects/my_project_123` For third-party assets, this field may be set
723
+ # differently.
724
+ # Corresponds to the JSON property `parent`
725
+ # @return [String]
726
+ attr_accessor :parent
727
+
728
+ # The REST URL for accessing the resource. An HTTP `GET` request using this URL
729
+ # returns the resource itself. Example: `https://cloudresourcemanager.googleapis.
730
+ # com/v1/projects/my-project-123` This value is unspecified for resources
731
+ # without a REST API.
732
+ # Corresponds to the JSON property `resourceUrl`
733
+ # @return [String]
734
+ attr_accessor :resource_url
735
+
736
+ # The API version. Example: `v1`
737
+ # Corresponds to the JSON property `version`
738
+ # @return [String]
739
+ attr_accessor :version
740
+
741
+ def initialize(**args)
742
+ update!(**args)
743
+ end
744
+
745
+ # Update properties of this object
746
+ def update!(**args)
747
+ @data = args[:data] if args.key?(:data)
748
+ @discovery_document_uri = args[:discovery_document_uri] if args.key?(:discovery_document_uri)
749
+ @discovery_name = args[:discovery_name] if args.key?(:discovery_name)
750
+ @location = args[:location] if args.key?(:location)
751
+ @parent = args[:parent] if args.key?(:parent)
752
+ @resource_url = args[:resource_url] if args.key?(:resource_url)
753
+ @version = args[:version] if args.key?(:version)
754
+ end
755
+ end
756
+
757
+ # Used in `policy_type` to specify how `boolean_policy` will behave at this
758
+ # resource.
759
+ class GoogleCloudOrgpolicyV1BooleanPolicy
760
+ include Google::Apis::Core::Hashable
761
+
762
+ # If `true`, then the `Policy` is enforced. If `false`, then any configuration
763
+ # is acceptable. Suppose you have a `Constraint` `constraints/compute.
764
+ # disableSerialPortAccess` with `constraint_default` set to `ALLOW`. A `Policy`
765
+ # for that `Constraint` exhibits the following behavior: - If the `Policy` at
766
+ # this resource has enforced set to `false`, serial port connection attempts
767
+ # will be allowed. - If the `Policy` at this resource has enforced set to `true`,
768
+ # serial port connection attempts will be refused. - If the `Policy` at this
769
+ # resource is `RestoreDefault`, serial port connection attempts will be allowed.
770
+ # - If no `Policy` is set at this resource or anywhere higher in the resource
771
+ # hierarchy, serial port connection attempts will be allowed. - If no `Policy`
772
+ # is set at this resource, but one exists higher in the resource hierarchy, the
773
+ # behavior is as if the`Policy` were set at this resource. The following
774
+ # examples demonstrate the different possible layerings: Example 1 (nearest `
775
+ # Constraint` wins): `organizations/foo` has a `Policy` with: `enforced: false` `
776
+ # projects/bar` has no `Policy` set. The constraint at `projects/bar` and `
777
+ # organizations/foo` will not be enforced. Example 2 (enforcement gets replaced):
778
+ # `organizations/foo` has a `Policy` with: `enforced: false` `projects/bar` has
779
+ # a `Policy` with: `enforced: true` The constraint at `organizations/foo` is not
780
+ # enforced. The constraint at `projects/bar` is enforced. Example 3 (
781
+ # RestoreDefault): `organizations/foo` has a `Policy` with: `enforced: true` `
782
+ # projects/bar` has a `Policy` with: `RestoreDefault: ``` The constraint at `
783
+ # organizations/foo` is enforced. The constraint at `projects/bar` is not
784
+ # enforced, because `constraint_default` for the `Constraint` is `ALLOW`.
785
+ # Corresponds to the JSON property `enforced`
786
+ # @return [Boolean]
787
+ attr_accessor :enforced
788
+ alias_method :enforced?, :enforced
789
+
790
+ def initialize(**args)
791
+ update!(**args)
792
+ end
793
+
794
+ # Update properties of this object
795
+ def update!(**args)
796
+ @enforced = args[:enforced] if args.key?(:enforced)
797
+ end
798
+ end
799
+
800
+ # Used in `policy_type` to specify how `list_policy` behaves at this resource. `
801
+ # ListPolicy` can define specific values and subtrees of Cloud Resource Manager
802
+ # resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed
803
+ # or denied by setting the `allowed_values` and `denied_values` fields. This is
804
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
805
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
806
+ # denote specific values, and is required only if the value contains a ":".
807
+ # Values prefixed with "is:" are treated the same as values with no prefix.
808
+ # Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
809
+ # "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
810
+ # e.g. "organizations/1234" The `supports_under` field of the associated `
811
+ # Constraint` defines whether ancestry prefixes can be used. You can set `
812
+ # allowed_values` and `denied_values` in the same `Policy` if `all_values` is `
813
+ # ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
814
+ # values. If `all_values` is set to either `ALLOW` or `DENY`, `allowed_values`
815
+ # and `denied_values` must be unset.
816
+ class GoogleCloudOrgpolicyV1ListPolicy
817
+ include Google::Apis::Core::Hashable
818
+
819
+ # The policy all_values state.
820
+ # Corresponds to the JSON property `allValues`
821
+ # @return [String]
822
+ attr_accessor :all_values
823
+
824
+ # List of values allowed at this resource. Can only be set if `all_values` is
825
+ # set to `ALL_VALUES_UNSPECIFIED`.
826
+ # Corresponds to the JSON property `allowedValues`
827
+ # @return [Array<String>]
828
+ attr_accessor :allowed_values
829
+
830
+ # List of values denied at this resource. Can only be set if `all_values` is set
831
+ # to `ALL_VALUES_UNSPECIFIED`.
832
+ # Corresponds to the JSON property `deniedValues`
833
+ # @return [Array<String>]
834
+ attr_accessor :denied_values
835
+
836
+ # Determines the inheritance behavior for this `Policy`. By default, a `
837
+ # ListPolicy` set at a resource supersedes any `Policy` set anywhere up the
838
+ # resource hierarchy. However, if `inherit_from_parent` is set to `true`, then
839
+ # the values from the effective `Policy` of the parent resource are inherited,
840
+ # meaning the values set in this `Policy` are added to the values inherited up
841
+ # the hierarchy. Setting `Policy` hierarchies that inherit both allowed values
842
+ # and denied values isn't recommended in most circumstances to keep the
843
+ # configuration simple and understandable. However, it is possible to set a `
844
+ # Policy` with `allowed_values` set that inherits a `Policy` with `denied_values`
845
+ # set. In this case, the values that are allowed must be in `allowed_values`
846
+ # and not present in `denied_values`. For example, suppose you have a `
847
+ # Constraint` `constraints/serviceuser.services`, which has a `constraint_type`
848
+ # of `list_constraint`, and with `constraint_default` set to `ALLOW`. Suppose
849
+ # that at the Organization level, a `Policy` is applied that restricts the
850
+ # allowed API activations to ``E1`, `E2``. Then, if a `Policy` is applied to a
851
+ # project below the Organization that has `inherit_from_parent` set to `false`
852
+ # and field all_values set to DENY, then an attempt to activate any API will be
853
+ # denied. The following examples demonstrate different possible layerings for `
854
+ # projects/bar` parented by `organizations/foo`: Example 1 (no inherited values):
855
+ # `organizations/foo` has a `Policy` with values: `allowed_values: "E1"
856
+ # allowed_values:"E2"` `projects/bar` has `inherit_from_parent` `false` and
857
+ # values: `allowed_values: "E3" allowed_values: "E4"` The accepted values at `
858
+ # organizations/foo` are `E1`, `E2`. The accepted values at `projects/bar` are `
859
+ # E3`, and `E4`. Example 2 (inherited values): `organizations/foo` has a `Policy`
860
+ # with values: `allowed_values: "E1" allowed_values:"E2"` `projects/bar` has a `
861
+ # Policy` with values: `value: "E3" value: "E4" inherit_from_parent: true` The
862
+ # accepted values at `organizations/foo` are `E1`, `E2`. The accepted values at `
863
+ # projects/bar` are `E1`, `E2`, `E3`, and `E4`. Example 3 (inheriting both
864
+ # allowed and denied values): `organizations/foo` has a `Policy` with values: `
865
+ # allowed_values: "E1" allowed_values: "E2"` `projects/bar` has a `Policy` with:
866
+ # `denied_values: "E1"` The accepted values at `organizations/foo` are `E1`, `E2`
867
+ # . The value accepted at `projects/bar` is `E2`. Example 4 (RestoreDefault): `
868
+ # organizations/foo` has a `Policy` with values: `allowed_values: "E1"
869
+ # allowed_values:"E2"` `projects/bar` has a `Policy` with values: `
870
+ # RestoreDefault: ``` The accepted values at `organizations/foo` are `E1`, `E2`.
871
+ # The accepted values at `projects/bar` are either all or none depending on the
872
+ # value of `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 5 (
873
+ # no policy inherits parent policy): `organizations/foo` has no `Policy` set. `
874
+ # projects/bar` has no `Policy` set. The accepted values at both levels are
875
+ # either all or none depending on the value of `constraint_default` (if `ALLOW`,
876
+ # all; if `DENY`, none). Example 6 (ListConstraint allowing all): `organizations/
877
+ # foo` has a `Policy` with values: `allowed_values: "E1" allowed_values: "E2"` `
878
+ # projects/bar` has a `Policy` with: `all: ALLOW` The accepted values at `
879
+ # organizations/foo` are `E1`, E2`. Any value is accepted at `projects/bar`.
880
+ # Example 7 (ListConstraint allowing none): `organizations/foo` has a `Policy`
881
+ # with values: `allowed_values: "E1" allowed_values: "E2"` `projects/bar` has a `
882
+ # Policy` with: `all: DENY` The accepted values at `organizations/foo` are `E1`,
883
+ # E2`. No value is accepted at `projects/bar`. Example 10 (allowed and denied
884
+ # subtrees of Resource Manager hierarchy): Given the following resource
885
+ # hierarchy O1->`F1, F2`; F1->`P1`; F2->`P2, P3`, `organizations/foo` has a `
886
+ # Policy` with values: `allowed_values: "under:organizations/O1"` `projects/bar`
887
+ # has a `Policy` with: `allowed_values: "under:projects/P3"` `denied_values: "
888
+ # under:folders/F2"` The accepted values at `organizations/foo` are `
889
+ # organizations/O1`, `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, `
890
+ # projects/P3`. The accepted values at `projects/bar` are `organizations/O1`, `
891
+ # folders/F1`, `projects/P1`.
892
+ # Corresponds to the JSON property `inheritFromParent`
893
+ # @return [Boolean]
894
+ attr_accessor :inherit_from_parent
895
+ alias_method :inherit_from_parent?, :inherit_from_parent
896
+
897
+ # Optional. The Google Cloud Console will try to default to a configuration that
898
+ # matches the value specified in this `Policy`. If `suggested_value` is not set,
899
+ # it will inherit the value specified higher in the hierarchy, unless `
900
+ # inherit_from_parent` is `false`.
901
+ # Corresponds to the JSON property `suggestedValue`
902
+ # @return [String]
903
+ attr_accessor :suggested_value
904
+
905
+ def initialize(**args)
906
+ update!(**args)
907
+ end
908
+
909
+ # Update properties of this object
910
+ def update!(**args)
911
+ @all_values = args[:all_values] if args.key?(:all_values)
912
+ @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
913
+ @denied_values = args[:denied_values] if args.key?(:denied_values)
914
+ @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
915
+ @suggested_value = args[:suggested_value] if args.key?(:suggested_value)
916
+ end
917
+ end
918
+
919
+ # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
920
+ # for configurations of Cloud Platform resources.
921
+ class GoogleCloudOrgpolicyV1Policy
922
+ include Google::Apis::Core::Hashable
923
+
924
+ # Used in `policy_type` to specify how `boolean_policy` will behave at this
925
+ # resource.
926
+ # Corresponds to the JSON property `booleanPolicy`
927
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudOrgpolicyV1BooleanPolicy]
928
+ attr_accessor :boolean_policy
929
+
930
+ # The name of the `Constraint` the `Policy` is configuring, for example, `
931
+ # constraints/serviceuser.services`. A [list of available constraints](/resource-
932
+ # manager/docs/organization-policy/org-policy-constraints) is available.
933
+ # Immutable after creation.
934
+ # Corresponds to the JSON property `constraint`
935
+ # @return [String]
936
+ attr_accessor :constraint
937
+
938
+ # An opaque tag indicating the current version of the `Policy`, used for
939
+ # concurrency control. When the `Policy` is returned from either a `GetPolicy`
940
+ # or a `ListOrgPolicy` request, this `etag` indicates the version of the current
941
+ # `Policy` to use when executing a read-modify-write loop. When the `Policy` is
942
+ # returned from a `GetEffectivePolicy` request, the `etag` will be unset. When
943
+ # the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value that was
944
+ # returned from a `GetOrgPolicy` request as part of a read-modify-write loop for
945
+ # concurrency control. Not setting the `etag`in a `SetOrgPolicy` request will
946
+ # result in an unconditional write of the `Policy`.
947
+ # Corresponds to the JSON property `etag`
948
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
949
+ # @return [String]
950
+ attr_accessor :etag
951
+
952
+ # Used in `policy_type` to specify how `list_policy` behaves at this resource. `
953
+ # ListPolicy` can define specific values and subtrees of Cloud Resource Manager
954
+ # resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed
955
+ # or denied by setting the `allowed_values` and `denied_values` fields. This is
956
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
957
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
958
+ # denote specific values, and is required only if the value contains a ":".
959
+ # Values prefixed with "is:" are treated the same as values with no prefix.
960
+ # Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
961
+ # "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
962
+ # e.g. "organizations/1234" The `supports_under` field of the associated `
963
+ # Constraint` defines whether ancestry prefixes can be used. You can set `
964
+ # allowed_values` and `denied_values` in the same `Policy` if `all_values` is `
965
+ # ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
966
+ # values. If `all_values` is set to either `ALLOW` or `DENY`, `allowed_values`
967
+ # and `denied_values` must be unset.
968
+ # Corresponds to the JSON property `listPolicy`
969
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudOrgpolicyV1ListPolicy]
970
+ attr_accessor :list_policy
971
+
972
+ # Ignores policies set above this resource and restores the `constraint_default`
973
+ # enforcement behavior of the specific `Constraint` at this resource. Suppose
974
+ # that `constraint_default` is set to `ALLOW` for the `Constraint` `constraints/
975
+ # serviceuser.services`. Suppose that organization foo.com sets a `Policy` at
976
+ # their Organization resource node that restricts the allowed service
977
+ # activations to deny all service activations. They could then set a `Policy`
978
+ # with the `policy_type` `restore_default` on several experimental projects,
979
+ # restoring the `constraint_default` enforcement of the `Constraint` for only
980
+ # those projects, allowing those projects to have all services activated.
981
+ # Corresponds to the JSON property `restoreDefault`
982
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleCloudOrgpolicyV1RestoreDefault]
983
+ attr_accessor :restore_default
984
+
985
+ # The time stamp the `Policy` was previously updated. This is set by the server,
986
+ # not specified by the caller, and represents the last time a call to `
987
+ # SetOrgPolicy` was made for that `Policy`. Any value set by the client will be
988
+ # ignored.
989
+ # Corresponds to the JSON property `updateTime`
990
+ # @return [String]
991
+ attr_accessor :update_time
992
+
993
+ # Version of the `Policy`. Default version is 0;
994
+ # Corresponds to the JSON property `version`
995
+ # @return [Fixnum]
996
+ attr_accessor :version
997
+
998
+ def initialize(**args)
999
+ update!(**args)
1000
+ end
1001
+
1002
+ # Update properties of this object
1003
+ def update!(**args)
1004
+ @boolean_policy = args[:boolean_policy] if args.key?(:boolean_policy)
1005
+ @constraint = args[:constraint] if args.key?(:constraint)
1006
+ @etag = args[:etag] if args.key?(:etag)
1007
+ @list_policy = args[:list_policy] if args.key?(:list_policy)
1008
+ @restore_default = args[:restore_default] if args.key?(:restore_default)
1009
+ @update_time = args[:update_time] if args.key?(:update_time)
1010
+ @version = args[:version] if args.key?(:version)
1011
+ end
1012
+ end
1013
+
1014
+ # Ignores policies set above this resource and restores the `constraint_default`
1015
+ # enforcement behavior of the specific `Constraint` at this resource. Suppose
1016
+ # that `constraint_default` is set to `ALLOW` for the `Constraint` `constraints/
1017
+ # serviceuser.services`. Suppose that organization foo.com sets a `Policy` at
1018
+ # their Organization resource node that restricts the allowed service
1019
+ # activations to deny all service activations. They could then set a `Policy`
1020
+ # with the `policy_type` `restore_default` on several experimental projects,
1021
+ # restoring the `constraint_default` enforcement of the `Constraint` for only
1022
+ # those projects, allowing those projects to have all services activated.
1023
+ class GoogleCloudOrgpolicyV1RestoreDefault
1024
+ include Google::Apis::Core::Hashable
1025
+
1026
+ def initialize(**args)
1027
+ update!(**args)
1028
+ end
1029
+
1030
+ # Update properties of this object
1031
+ def update!(**args)
1032
+ end
1033
+ end
1034
+
1035
+ # An `AccessLevel` is a label that can be applied to requests to Google Cloud
1036
+ # services, along with a list of requirements necessary for the label to be
1037
+ # applied.
1038
+ class GoogleIdentityAccesscontextmanagerV1AccessLevel
1039
+ include Google::Apis::Core::Hashable
1040
+
1041
+ # `BasicLevel` is an `AccessLevel` using a set of recommended features.
1042
+ # Corresponds to the JSON property `basic`
1043
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1BasicLevel]
1044
+ attr_accessor :basic
1045
+
1046
+ # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
1047
+ # to represent the necessary conditions for the level to apply to a request. See
1048
+ # CEL spec at: https://github.com/google/cel-spec
1049
+ # Corresponds to the JSON property `custom`
1050
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1CustomLevel]
1051
+ attr_accessor :custom
1052
+
1053
+ # Description of the `AccessLevel` and its use. Does not affect behavior.
1054
+ # Corresponds to the JSON property `description`
1055
+ # @return [String]
1056
+ attr_accessor :description
1057
+
1058
+ # Required. Resource name for the Access Level. The `short_name` component must
1059
+ # begin with a letter and only include alphanumeric and '_'. Format: `
1060
+ # accessPolicies/`policy_id`/accessLevels/`short_name``. The maximum length of
1061
+ # the `short_name` component is 50 characters.
1062
+ # Corresponds to the JSON property `name`
1063
+ # @return [String]
1064
+ attr_accessor :name
1065
+
1066
+ # Human readable title. Must be unique within the Policy.
1067
+ # Corresponds to the JSON property `title`
1068
+ # @return [String]
1069
+ attr_accessor :title
1070
+
1071
+ def initialize(**args)
1072
+ update!(**args)
1073
+ end
1074
+
1075
+ # Update properties of this object
1076
+ def update!(**args)
1077
+ @basic = args[:basic] if args.key?(:basic)
1078
+ @custom = args[:custom] if args.key?(:custom)
1079
+ @description = args[:description] if args.key?(:description)
1080
+ @name = args[:name] if args.key?(:name)
1081
+ @title = args[:title] if args.key?(:title)
1082
+ end
1083
+ end
1084
+
1085
+ # `AccessPolicy` is a container for `AccessLevels` (which define the necessary
1086
+ # attributes to use Google Cloud services) and `ServicePerimeters` (which define
1087
+ # regions of services able to freely pass data within a perimeter). An access
1088
+ # policy is globally visible within an organization, and the restrictions it
1089
+ # specifies apply to all projects within an organization.
1090
+ class GoogleIdentityAccesscontextmanagerV1AccessPolicy
1091
+ include Google::Apis::Core::Hashable
1092
+
1093
+ # Output only. An opaque identifier for the current version of the `AccessPolicy`
1094
+ # . This will always be a strongly validated etag, meaning that two Access
1095
+ # Polices will be identical if and only if their etags are identical. Clients
1096
+ # should not expect this to be in any specific format.
1097
+ # Corresponds to the JSON property `etag`
1098
+ # @return [String]
1099
+ attr_accessor :etag
1100
+
1101
+ # Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/`
1102
+ # policy_id``
1103
+ # Corresponds to the JSON property `name`
1104
+ # @return [String]
1105
+ attr_accessor :name
1106
+
1107
+ # Required. The parent of this `AccessPolicy` in the Cloud Resource Hierarchy.
1108
+ # Currently immutable once created. Format: `organizations/`organization_id``
1109
+ # Corresponds to the JSON property `parent`
1110
+ # @return [String]
1111
+ attr_accessor :parent
1112
+
1113
+ # Required. Human readable title. Does not affect behavior.
1114
+ # Corresponds to the JSON property `title`
1115
+ # @return [String]
1116
+ attr_accessor :title
1117
+
1118
+ def initialize(**args)
1119
+ update!(**args)
1120
+ end
1121
+
1122
+ # Update properties of this object
1123
+ def update!(**args)
1124
+ @etag = args[:etag] if args.key?(:etag)
1125
+ @name = args[:name] if args.key?(:name)
1126
+ @parent = args[:parent] if args.key?(:parent)
1127
+ @title = args[:title] if args.key?(:title)
1128
+ end
1129
+ end
1130
+
1131
+ # Identification for an API Operation.
1132
+ class GoogleIdentityAccesscontextmanagerV1ApiOperation
1133
+ include Google::Apis::Core::Hashable
1134
+
1135
+ # API methods or permissions to allow. Method or permission must belong to the
1136
+ # service specified by `service_name` field. A single MethodSelector entry with `
1137
+ # *` specified for the `method` field will allow all methods AND permissions for
1138
+ # the service specified in `service_name`.
1139
+ # Corresponds to the JSON property `methodSelectors`
1140
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1MethodSelector>]
1141
+ attr_accessor :method_selectors
1142
+
1143
+ # The name of the API whose methods or permissions the IngressPolicy or
1144
+ # EgressPolicy want to allow. A single ApiOperation with `service_name` field
1145
+ # set to `*` will allow all methods AND permissions for all services.
1146
+ # Corresponds to the JSON property `serviceName`
1147
+ # @return [String]
1148
+ attr_accessor :service_name
1149
+
1150
+ def initialize(**args)
1151
+ update!(**args)
1152
+ end
1153
+
1154
+ # Update properties of this object
1155
+ def update!(**args)
1156
+ @method_selectors = args[:method_selectors] if args.key?(:method_selectors)
1157
+ @service_name = args[:service_name] if args.key?(:service_name)
1158
+ end
1159
+ end
1160
+
1161
+ # `BasicLevel` is an `AccessLevel` using a set of recommended features.
1162
+ class GoogleIdentityAccesscontextmanagerV1BasicLevel
1163
+ include Google::Apis::Core::Hashable
1164
+
1165
+ # How the `conditions` list should be combined to determine if a request is
1166
+ # granted this `AccessLevel`. If AND is used, each `Condition` in `conditions`
1167
+ # must be satisfied for the `AccessLevel` to be applied. If OR is used, at least
1168
+ # one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be
1169
+ # applied. Default behavior is AND.
1170
+ # Corresponds to the JSON property `combiningFunction`
1171
+ # @return [String]
1172
+ attr_accessor :combining_function
1173
+
1174
+ # Required. A list of requirements for the `AccessLevel` to be granted.
1175
+ # Corresponds to the JSON property `conditions`
1176
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1Condition>]
1177
+ attr_accessor :conditions
1178
+
1179
+ def initialize(**args)
1180
+ update!(**args)
1181
+ end
1182
+
1183
+ # Update properties of this object
1184
+ def update!(**args)
1185
+ @combining_function = args[:combining_function] if args.key?(:combining_function)
1186
+ @conditions = args[:conditions] if args.key?(:conditions)
1187
+ end
1188
+ end
1189
+
1190
+ # A condition necessary for an `AccessLevel` to be granted. The Condition is an
1191
+ # AND over its fields. So a Condition is true if: 1) the request IP is from one
1192
+ # of the listed subnetworks AND 2) the originating device complies with the
1193
+ # listed device policy AND 3) all listed access levels are granted AND 4) the
1194
+ # request was sent at a time allowed by the DateTimeRestriction.
1195
+ class GoogleIdentityAccesscontextmanagerV1Condition
1196
+ include Google::Apis::Core::Hashable
1197
+
1198
+ # `DevicePolicy` specifies device specific restrictions necessary to acquire a
1199
+ # given access level. A `DevicePolicy` specifies requirements for requests from
1200
+ # devices to be granted access levels, it does not do any enforcement on the
1201
+ # device. `DevicePolicy` acts as an AND over all specified fields, and each
1202
+ # repeated field is an OR over its elements. Any unset fields are ignored. For
1203
+ # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
1204
+ # encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
1205
+ # originating from encrypted Linux desktops and encrypted Windows desktops.
1206
+ # Corresponds to the JSON property `devicePolicy`
1207
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1DevicePolicy]
1208
+ attr_accessor :device_policy
1209
+
1210
+ # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a
1211
+ # CIDR IP address block, the specified IP address portion must be properly
1212
+ # truncated (i.e. all the host bits must be zero) or the input is considered
1213
+ # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not.
1214
+ # Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is
1215
+ # not. The originating IP of a request must be in one of the listed subnets in
1216
+ # order for this Condition to be true. If empty, all IP addresses are allowed.
1217
+ # Corresponds to the JSON property `ipSubnetworks`
1218
+ # @return [Array<String>]
1219
+ attr_accessor :ip_subnetworks
1220
+
1221
+ # The request must be made by one of the provided user or service accounts.
1222
+ # Groups are not supported. Syntax: `user:`emailid`` `serviceAccount:`emailid``
1223
+ # If not specified, a request may come from any user.
1224
+ # Corresponds to the JSON property `members`
1225
+ # @return [Array<String>]
1226
+ attr_accessor :members
1227
+
1228
+ # Whether to negate the Condition. If true, the Condition becomes a NAND over
1229
+ # its non-empty fields, each field must be false for the Condition overall to be
1230
+ # satisfied. Defaults to false.
1231
+ # Corresponds to the JSON property `negate`
1232
+ # @return [Boolean]
1233
+ attr_accessor :negate
1234
+ alias_method :negate?, :negate
1235
+
1236
+ # The request must originate from one of the provided countries/regions. Must be
1237
+ # valid ISO 3166-1 alpha-2 codes.
1238
+ # Corresponds to the JSON property `regions`
1239
+ # @return [Array<String>]
1240
+ attr_accessor :regions
1241
+
1242
+ # A list of other access levels defined in the same `Policy`, referenced by
1243
+ # resource name. Referencing an `AccessLevel` which does not exist is an error.
1244
+ # All access levels listed must be granted for the Condition to be true. Example:
1245
+ # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"`
1246
+ # Corresponds to the JSON property `requiredAccessLevels`
1247
+ # @return [Array<String>]
1248
+ attr_accessor :required_access_levels
1249
+
1250
+ def initialize(**args)
1251
+ update!(**args)
1252
+ end
1253
+
1254
+ # Update properties of this object
1255
+ def update!(**args)
1256
+ @device_policy = args[:device_policy] if args.key?(:device_policy)
1257
+ @ip_subnetworks = args[:ip_subnetworks] if args.key?(:ip_subnetworks)
1258
+ @members = args[:members] if args.key?(:members)
1259
+ @negate = args[:negate] if args.key?(:negate)
1260
+ @regions = args[:regions] if args.key?(:regions)
1261
+ @required_access_levels = args[:required_access_levels] if args.key?(:required_access_levels)
1262
+ end
1263
+ end
1264
+
1265
+ # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
1266
+ # to represent the necessary conditions for the level to apply to a request. See
1267
+ # CEL spec at: https://github.com/google/cel-spec
1268
+ class GoogleIdentityAccesscontextmanagerV1CustomLevel
1269
+ include Google::Apis::Core::Hashable
1270
+
1271
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
1272
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
1273
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
1274
+ # "Summary size limit" description: "Determines if a summary is less than 100
1275
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
1276
+ # Requestor is owner" description: "Determines if requestor is the document
1277
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
1278
+ # Logic): title: "Public documents" description: "Determine whether the document
1279
+ # should be publicly visible" expression: "document.type != 'private' &&
1280
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
1281
+ # string" description: "Create a notification string with a timestamp."
1282
+ # expression: "'New message received at ' + string(document.create_time)" The
1283
+ # exact variables and functions that may be referenced within an expression are
1284
+ # determined by the service that evaluates it. See the service documentation for
1285
+ # additional information.
1286
+ # Corresponds to the JSON property `expr`
1287
+ # @return [Google::Apis::CloudassetV1p7beta1::Expr]
1288
+ attr_accessor :expr
1289
+
1290
+ def initialize(**args)
1291
+ update!(**args)
1292
+ end
1293
+
1294
+ # Update properties of this object
1295
+ def update!(**args)
1296
+ @expr = args[:expr] if args.key?(:expr)
1297
+ end
1298
+ end
1299
+
1300
+ # `DevicePolicy` specifies device specific restrictions necessary to acquire a
1301
+ # given access level. A `DevicePolicy` specifies requirements for requests from
1302
+ # devices to be granted access levels, it does not do any enforcement on the
1303
+ # device. `DevicePolicy` acts as an AND over all specified fields, and each
1304
+ # repeated field is an OR over its elements. Any unset fields are ignored. For
1305
+ # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
1306
+ # encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
1307
+ # originating from encrypted Linux desktops and encrypted Windows desktops.
1308
+ class GoogleIdentityAccesscontextmanagerV1DevicePolicy
1309
+ include Google::Apis::Core::Hashable
1310
+
1311
+ # Allowed device management levels, an empty list allows all management levels.
1312
+ # Corresponds to the JSON property `allowedDeviceManagementLevels`
1313
+ # @return [Array<String>]
1314
+ attr_accessor :allowed_device_management_levels
1315
+
1316
+ # Allowed encryptions statuses, an empty list allows all statuses.
1317
+ # Corresponds to the JSON property `allowedEncryptionStatuses`
1318
+ # @return [Array<String>]
1319
+ attr_accessor :allowed_encryption_statuses
1320
+
1321
+ # Allowed OS versions, an empty list allows all types and all versions.
1322
+ # Corresponds to the JSON property `osConstraints`
1323
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1OsConstraint>]
1324
+ attr_accessor :os_constraints
1325
+
1326
+ # Whether the device needs to be approved by the customer admin.
1327
+ # Corresponds to the JSON property `requireAdminApproval`
1328
+ # @return [Boolean]
1329
+ attr_accessor :require_admin_approval
1330
+ alias_method :require_admin_approval?, :require_admin_approval
1331
+
1332
+ # Whether the device needs to be corp owned.
1333
+ # Corresponds to the JSON property `requireCorpOwned`
1334
+ # @return [Boolean]
1335
+ attr_accessor :require_corp_owned
1336
+ alias_method :require_corp_owned?, :require_corp_owned
1337
+
1338
+ # Whether or not screenlock is required for the DevicePolicy to be true.
1339
+ # Defaults to `false`.
1340
+ # Corresponds to the JSON property `requireScreenlock`
1341
+ # @return [Boolean]
1342
+ attr_accessor :require_screenlock
1343
+ alias_method :require_screenlock?, :require_screenlock
1344
+
1345
+ def initialize(**args)
1346
+ update!(**args)
1347
+ end
1348
+
1349
+ # Update properties of this object
1350
+ def update!(**args)
1351
+ @allowed_device_management_levels = args[:allowed_device_management_levels] if args.key?(:allowed_device_management_levels)
1352
+ @allowed_encryption_statuses = args[:allowed_encryption_statuses] if args.key?(:allowed_encryption_statuses)
1353
+ @os_constraints = args[:os_constraints] if args.key?(:os_constraints)
1354
+ @require_admin_approval = args[:require_admin_approval] if args.key?(:require_admin_approval)
1355
+ @require_corp_owned = args[:require_corp_owned] if args.key?(:require_corp_owned)
1356
+ @require_screenlock = args[:require_screenlock] if args.key?(:require_screenlock)
1357
+ end
1358
+ end
1359
+
1360
+ # Defines the conditions under which an EgressPolicy matches a request.
1361
+ # Conditions based on information about the source of the request. Note that if
1362
+ # the destination of the request is protected by a ServicePerimeter, then that
1363
+ # ServicePerimeter must have an IngressPolicy which allows access in order for
1364
+ # this request to succeed.
1365
+ class GoogleIdentityAccesscontextmanagerV1EgressFrom
1366
+ include Google::Apis::Core::Hashable
1367
+
1368
+ # A list of identities that are allowed access through this [EgressPolicy].
1369
+ # Should be in the format of email address. The email address should represent
1370
+ # individual user or service account only.
1371
+ # Corresponds to the JSON property `identities`
1372
+ # @return [Array<String>]
1373
+ attr_accessor :identities
1374
+
1375
+ # Specifies the type of identities that are allowed access to outside the
1376
+ # perimeter. If left unspecified, then members of `identities` field will be
1377
+ # allowed access.
1378
+ # Corresponds to the JSON property `identityType`
1379
+ # @return [String]
1380
+ attr_accessor :identity_type
1381
+
1382
+ def initialize(**args)
1383
+ update!(**args)
1384
+ end
1385
+
1386
+ # Update properties of this object
1387
+ def update!(**args)
1388
+ @identities = args[:identities] if args.key?(:identities)
1389
+ @identity_type = args[:identity_type] if args.key?(:identity_type)
1390
+ end
1391
+ end
1392
+
1393
+ # Policy for egress from perimeter. EgressPolicies match requests based on `
1394
+ # egress_from` and `egress_to` stanzas. For an EgressPolicy to match, both `
1395
+ # egress_from` and `egress_to` stanzas must be matched. If an EgressPolicy
1396
+ # matches a request, the request is allowed to span the ServicePerimeter
1397
+ # boundary. For example, an EgressPolicy can be used to allow VMs on networks
1398
+ # within the ServicePerimeter to access a defined set of projects outside the
1399
+ # perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket
1400
+ # or query against a BigQuery dataset). EgressPolicies are concerned with the *
1401
+ # resources* that a request relates as well as the API services and API actions
1402
+ # being used. They do not related to the direction of data movement. More
1403
+ # detailed documentation for this concept can be found in the descriptions of
1404
+ # EgressFrom and EgressTo.
1405
+ class GoogleIdentityAccesscontextmanagerV1EgressPolicy
1406
+ include Google::Apis::Core::Hashable
1407
+
1408
+ # Defines the conditions under which an EgressPolicy matches a request.
1409
+ # Conditions based on information about the source of the request. Note that if
1410
+ # the destination of the request is protected by a ServicePerimeter, then that
1411
+ # ServicePerimeter must have an IngressPolicy which allows access in order for
1412
+ # this request to succeed.
1413
+ # Corresponds to the JSON property `egressFrom`
1414
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1EgressFrom]
1415
+ attr_accessor :egress_from
1416
+
1417
+ # Defines the conditions under which an EgressPolicy matches a request.
1418
+ # Conditions are based on information about the ApiOperation intended to be
1419
+ # performed on the `resources` specified. Note that if the destination of the
1420
+ # request is protected by a ServicePerimeter, then that ServicePerimeter must
1421
+ # have an IngressPolicy which allows access in order for this request to succeed.
1422
+ # Corresponds to the JSON property `egressTo`
1423
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1EgressTo]
1424
+ attr_accessor :egress_to
1425
+
1426
+ def initialize(**args)
1427
+ update!(**args)
1428
+ end
1429
+
1430
+ # Update properties of this object
1431
+ def update!(**args)
1432
+ @egress_from = args[:egress_from] if args.key?(:egress_from)
1433
+ @egress_to = args[:egress_to] if args.key?(:egress_to)
1434
+ end
1435
+ end
1436
+
1437
+ # Defines the conditions under which an EgressPolicy matches a request.
1438
+ # Conditions are based on information about the ApiOperation intended to be
1439
+ # performed on the `resources` specified. Note that if the destination of the
1440
+ # request is protected by a ServicePerimeter, then that ServicePerimeter must
1441
+ # have an IngressPolicy which allows access in order for this request to succeed.
1442
+ class GoogleIdentityAccesscontextmanagerV1EgressTo
1443
+ include Google::Apis::Core::Hashable
1444
+
1445
+ # A list of ApiOperations that this egress rule applies to. A request matches if
1446
+ # it contains an operation/service in this list.
1447
+ # Corresponds to the JSON property `operations`
1448
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
1449
+ attr_accessor :operations
1450
+
1451
+ # A list of resources, currently only projects in the form `projects/`, that
1452
+ # match this to stanza. A request matches if it contains a resource in this list.
1453
+ # If `*` is specified for resources, then this EgressTo rule will authorize
1454
+ # access to all resources outside the perimeter.
1455
+ # Corresponds to the JSON property `resources`
1456
+ # @return [Array<String>]
1457
+ attr_accessor :resources
1458
+
1459
+ def initialize(**args)
1460
+ update!(**args)
1461
+ end
1462
+
1463
+ # Update properties of this object
1464
+ def update!(**args)
1465
+ @operations = args[:operations] if args.key?(:operations)
1466
+ @resources = args[:resources] if args.key?(:resources)
1467
+ end
1468
+ end
1469
+
1470
+ # Defines the conditions under which an IngressPolicy matches a request.
1471
+ # Conditions are based on information about the source of the request.
1472
+ class GoogleIdentityAccesscontextmanagerV1IngressFrom
1473
+ include Google::Apis::Core::Hashable
1474
+
1475
+ # A list of identities that are allowed access through this ingress policy.
1476
+ # Should be in the format of email address. The email address should represent
1477
+ # individual user or service account only.
1478
+ # Corresponds to the JSON property `identities`
1479
+ # @return [Array<String>]
1480
+ attr_accessor :identities
1481
+
1482
+ # Specifies the type of identities that are allowed access from outside the
1483
+ # perimeter. If left unspecified, then members of `identities` field will be
1484
+ # allowed access.
1485
+ # Corresponds to the JSON property `identityType`
1486
+ # @return [String]
1487
+ attr_accessor :identity_type
1488
+
1489
+ # Sources that this IngressPolicy authorizes access from.
1490
+ # Corresponds to the JSON property `sources`
1491
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1IngressSource>]
1492
+ attr_accessor :sources
1493
+
1494
+ def initialize(**args)
1495
+ update!(**args)
1496
+ end
1497
+
1498
+ # Update properties of this object
1499
+ def update!(**args)
1500
+ @identities = args[:identities] if args.key?(:identities)
1501
+ @identity_type = args[:identity_type] if args.key?(:identity_type)
1502
+ @sources = args[:sources] if args.key?(:sources)
1503
+ end
1504
+ end
1505
+
1506
+ # Policy for ingress into ServicePerimeter. IngressPolicies match requests based
1507
+ # on `ingress_from` and `ingress_to` stanzas. For an ingress policy to match,
1508
+ # both the `ingress_from` and `ingress_to` stanzas must be matched. If an
1509
+ # IngressPolicy matches a request, the request is allowed through the perimeter
1510
+ # boundary from outside the perimeter. For example, access from the internet can
1511
+ # be allowed either based on an AccessLevel or, for traffic hosted on Google
1512
+ # Cloud, the project of the source network. For access from private networks,
1513
+ # using the project of the hosting network is required. Individual ingress
1514
+ # policies can be limited by restricting which services and/or actions they
1515
+ # match using the `ingress_to` field.
1516
+ class GoogleIdentityAccesscontextmanagerV1IngressPolicy
1517
+ include Google::Apis::Core::Hashable
1518
+
1519
+ # Defines the conditions under which an IngressPolicy matches a request.
1520
+ # Conditions are based on information about the source of the request.
1521
+ # Corresponds to the JSON property `ingressFrom`
1522
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1IngressFrom]
1523
+ attr_accessor :ingress_from
1524
+
1525
+ # Defines the conditions under which an IngressPolicy matches a request.
1526
+ # Conditions are based on information about the ApiOperation intended to be
1527
+ # performed on the destination of the request.
1528
+ # Corresponds to the JSON property `ingressTo`
1529
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1IngressTo]
1530
+ attr_accessor :ingress_to
1531
+
1532
+ def initialize(**args)
1533
+ update!(**args)
1534
+ end
1535
+
1536
+ # Update properties of this object
1537
+ def update!(**args)
1538
+ @ingress_from = args[:ingress_from] if args.key?(:ingress_from)
1539
+ @ingress_to = args[:ingress_to] if args.key?(:ingress_to)
1540
+ end
1541
+ end
1542
+
1543
+ # The source that IngressPolicy authorizes access from.
1544
+ class GoogleIdentityAccesscontextmanagerV1IngressSource
1545
+ include Google::Apis::Core::Hashable
1546
+
1547
+ # An AccessLevel resource name that allow resources within the ServicePerimeters
1548
+ # to be accessed from the internet. AccessLevels listed must be in the same
1549
+ # policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will
1550
+ # cause an error. If no AccessLevel names are listed, resources within the
1551
+ # perimeter can only be accessed via Google Cloud calls with request origins
1552
+ # within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`
1553
+ # . If `*` is specified, then all IngressSources will be allowed.
1554
+ # Corresponds to the JSON property `accessLevel`
1555
+ # @return [String]
1556
+ attr_accessor :access_level
1557
+
1558
+ # A Google Cloud resource that is allowed to ingress the perimeter. Requests
1559
+ # from these resources will be allowed to access perimeter data. Currently only
1560
+ # projects are allowed. Format: `projects/`project_number`` The project may be
1561
+ # in any Google Cloud organization, not just the organization that the perimeter
1562
+ # is defined in. `*` is not allowed, the case of allowing all Google Cloud
1563
+ # resources only is not supported.
1564
+ # Corresponds to the JSON property `resource`
1565
+ # @return [String]
1566
+ attr_accessor :resource
1567
+
1568
+ def initialize(**args)
1569
+ update!(**args)
1570
+ end
1571
+
1572
+ # Update properties of this object
1573
+ def update!(**args)
1574
+ @access_level = args[:access_level] if args.key?(:access_level)
1575
+ @resource = args[:resource] if args.key?(:resource)
1576
+ end
1577
+ end
1578
+
1579
+ # Defines the conditions under which an IngressPolicy matches a request.
1580
+ # Conditions are based on information about the ApiOperation intended to be
1581
+ # performed on the destination of the request.
1582
+ class GoogleIdentityAccesscontextmanagerV1IngressTo
1583
+ include Google::Apis::Core::Hashable
1584
+
1585
+ # A list of ApiOperations the sources specified in corresponding IngressFrom are
1586
+ # allowed to perform in this ServicePerimeter.
1587
+ # Corresponds to the JSON property `operations`
1588
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
1589
+ attr_accessor :operations
1590
+
1591
+ # A list of resources, currently only projects in the form `projects/`,
1592
+ # protected by this ServicePerimeter that are allowed to be accessed by sources
1593
+ # defined in the corresponding IngressFrom. A request matches if it contains a
1594
+ # resource in this list. If `*` is specified for resources, then this IngressTo
1595
+ # rule will authorize access to all resources inside the perimeter, provided
1596
+ # that the request also matches the `operations` field.
1597
+ # Corresponds to the JSON property `resources`
1598
+ # @return [Array<String>]
1599
+ attr_accessor :resources
1600
+
1601
+ def initialize(**args)
1602
+ update!(**args)
1603
+ end
1604
+
1605
+ # Update properties of this object
1606
+ def update!(**args)
1607
+ @operations = args[:operations] if args.key?(:operations)
1608
+ @resources = args[:resources] if args.key?(:resources)
1609
+ end
1610
+ end
1611
+
1612
+ # An allowed method or permission of a service specified in ApiOperation.
1613
+ class GoogleIdentityAccesscontextmanagerV1MethodSelector
1614
+ include Google::Apis::Core::Hashable
1615
+
1616
+ # Value for `method` should be a valid method name for the corresponding `
1617
+ # service_name` in ApiOperation. If `*` used as value for `method`, then ALL
1618
+ # methods and permissions are allowed.
1619
+ # Corresponds to the JSON property `method`
1620
+ # @return [String]
1621
+ attr_accessor :method_prop
1622
+
1623
+ # Value for `permission` should be a valid Cloud IAM permission for the
1624
+ # corresponding `service_name` in ApiOperation.
1625
+ # Corresponds to the JSON property `permission`
1626
+ # @return [String]
1627
+ attr_accessor :permission
1628
+
1629
+ def initialize(**args)
1630
+ update!(**args)
1631
+ end
1632
+
1633
+ # Update properties of this object
1634
+ def update!(**args)
1635
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
1636
+ @permission = args[:permission] if args.key?(:permission)
1637
+ end
1638
+ end
1639
+
1640
+ # A restriction on the OS type and version of devices making requests.
1641
+ class GoogleIdentityAccesscontextmanagerV1OsConstraint
1642
+ include Google::Apis::Core::Hashable
1643
+
1644
+ # The minimum allowed OS version. If not set, any version of this OS satisfies
1645
+ # the constraint. Format: `"major.minor.patch"`. Examples: `"10.5.301"`, `"9.2.1"
1646
+ # `.
1647
+ # Corresponds to the JSON property `minimumVersion`
1648
+ # @return [String]
1649
+ attr_accessor :minimum_version
1650
+
1651
+ # Required. The allowed OS type.
1652
+ # Corresponds to the JSON property `osType`
1653
+ # @return [String]
1654
+ attr_accessor :os_type
1655
+
1656
+ # Only allows requests from devices with a verified Chrome OS. Verifications
1657
+ # includes requirements that the device is enterprise-managed, conformant to
1658
+ # domain policies, and the caller has permission to call the API targeted by the
1659
+ # request.
1660
+ # Corresponds to the JSON property `requireVerifiedChromeOs`
1661
+ # @return [Boolean]
1662
+ attr_accessor :require_verified_chrome_os
1663
+ alias_method :require_verified_chrome_os?, :require_verified_chrome_os
1664
+
1665
+ def initialize(**args)
1666
+ update!(**args)
1667
+ end
1668
+
1669
+ # Update properties of this object
1670
+ def update!(**args)
1671
+ @minimum_version = args[:minimum_version] if args.key?(:minimum_version)
1672
+ @os_type = args[:os_type] if args.key?(:os_type)
1673
+ @require_verified_chrome_os = args[:require_verified_chrome_os] if args.key?(:require_verified_chrome_os)
1674
+ end
1675
+ end
1676
+
1677
+ # `ServicePerimeter` describes a set of Google Cloud resources which can freely
1678
+ # import and export data amongst themselves, but not export outside of the `
1679
+ # ServicePerimeter`. If a request with a source within this `ServicePerimeter`
1680
+ # has a target outside of the `ServicePerimeter`, the request will be blocked.
1681
+ # Otherwise the request is allowed. There are two types of Service Perimeter -
1682
+ # Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google
1683
+ # Cloud project can only belong to a single regular Service Perimeter. Service
1684
+ # Perimeter Bridges can contain only Google Cloud projects as members, a single
1685
+ # Google Cloud project may belong to multiple Service Perimeter Bridges.
1686
+ class GoogleIdentityAccesscontextmanagerV1ServicePerimeter
1687
+ include Google::Apis::Core::Hashable
1688
+
1689
+ # Description of the `ServicePerimeter` and its use. Does not affect behavior.
1690
+ # Corresponds to the JSON property `description`
1691
+ # @return [String]
1692
+ attr_accessor :description
1693
+
1694
+ # Required. Resource name for the ServicePerimeter. The `short_name` component
1695
+ # must begin with a letter and only include alphanumeric and '_'. Format: `
1696
+ # accessPolicies/`policy_id`/servicePerimeters/`short_name``
1697
+ # Corresponds to the JSON property `name`
1698
+ # @return [String]
1699
+ attr_accessor :name
1700
+
1701
+ # Perimeter type indicator. A single project is allowed to be a member of single
1702
+ # regular perimeter, but multiple service perimeter bridges. A project cannot be
1703
+ # a included in a perimeter bridge without being included in regular perimeter.
1704
+ # For perimeter bridges, the restricted service list as well as access level
1705
+ # lists must be empty.
1706
+ # Corresponds to the JSON property `perimeterType`
1707
+ # @return [String]
1708
+ attr_accessor :perimeter_type
1709
+
1710
+ # `ServicePerimeterConfig` specifies a set of Google Cloud resources that
1711
+ # describe specific Service Perimeter configuration.
1712
+ # Corresponds to the JSON property `spec`
1713
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig]
1714
+ attr_accessor :spec
1715
+
1716
+ # `ServicePerimeterConfig` specifies a set of Google Cloud resources that
1717
+ # describe specific Service Perimeter configuration.
1718
+ # Corresponds to the JSON property `status`
1719
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig]
1720
+ attr_accessor :status
1721
+
1722
+ # Human readable title. Must be unique within the Policy.
1723
+ # Corresponds to the JSON property `title`
1724
+ # @return [String]
1725
+ attr_accessor :title
1726
+
1727
+ # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists
1728
+ # for all Service Perimeters, and that spec is identical to the status for those
1729
+ # Service Perimeters. When this flag is set, it inhibits the generation of the
1730
+ # implicit spec, thereby allowing the user to explicitly provide a configuration
1731
+ # ("spec") to use in a dry-run version of the Service Perimeter. This allows the
1732
+ # user to test changes to the enforced config ("status") without actually
1733
+ # enforcing them. This testing is done through analyzing the differences between
1734
+ # currently enforced and suggested restrictions. use_explicit_dry_run_spec must
1735
+ # bet set to True if any of the fields in the spec are set to non-default values.
1736
+ # Corresponds to the JSON property `useExplicitDryRunSpec`
1737
+ # @return [Boolean]
1738
+ attr_accessor :use_explicit_dry_run_spec
1739
+ alias_method :use_explicit_dry_run_spec?, :use_explicit_dry_run_spec
1740
+
1741
+ def initialize(**args)
1742
+ update!(**args)
1743
+ end
1744
+
1745
+ # Update properties of this object
1746
+ def update!(**args)
1747
+ @description = args[:description] if args.key?(:description)
1748
+ @name = args[:name] if args.key?(:name)
1749
+ @perimeter_type = args[:perimeter_type] if args.key?(:perimeter_type)
1750
+ @spec = args[:spec] if args.key?(:spec)
1751
+ @status = args[:status] if args.key?(:status)
1752
+ @title = args[:title] if args.key?(:title)
1753
+ @use_explicit_dry_run_spec = args[:use_explicit_dry_run_spec] if args.key?(:use_explicit_dry_run_spec)
1754
+ end
1755
+ end
1756
+
1757
+ # `ServicePerimeterConfig` specifies a set of Google Cloud resources that
1758
+ # describe specific Service Perimeter configuration.
1759
+ class GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig
1760
+ include Google::Apis::Core::Hashable
1761
+
1762
+ # A list of `AccessLevel` resource names that allow resources within the `
1763
+ # ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must
1764
+ # be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `
1765
+ # AccessLevel` is a syntax error. If no `AccessLevel` names are listed,
1766
+ # resources within the perimeter can only be accessed via Google Cloud calls
1767
+ # with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/
1768
+ # accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty.
1769
+ # Corresponds to the JSON property `accessLevels`
1770
+ # @return [Array<String>]
1771
+ attr_accessor :access_levels
1772
+
1773
+ # List of EgressPolicies to apply to the perimeter. A perimeter may have
1774
+ # multiple EgressPolicies, each of which is evaluated separately. Access is
1775
+ # granted if any EgressPolicy grants it. Must be empty for a perimeter bridge.
1776
+ # Corresponds to the JSON property `egressPolicies`
1777
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1EgressPolicy>]
1778
+ attr_accessor :egress_policies
1779
+
1780
+ # List of IngressPolicies to apply to the perimeter. A perimeter may have
1781
+ # multiple IngressPolicies, each of which is evaluated separately. Access is
1782
+ # granted if any Ingress Policy grants it. Must be empty for a perimeter bridge.
1783
+ # Corresponds to the JSON property `ingressPolicies`
1784
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1IngressPolicy>]
1785
+ attr_accessor :ingress_policies
1786
+
1787
+ # A list of Google Cloud resources that are inside of the service perimeter.
1788
+ # Currently only projects are allowed. Format: `projects/`project_number``
1789
+ # Corresponds to the JSON property `resources`
1790
+ # @return [Array<String>]
1791
+ attr_accessor :resources
1792
+
1793
+ # Google Cloud services that are subject to the Service Perimeter restrictions.
1794
+ # For example, if `storage.googleapis.com` is specified, access to the storage
1795
+ # buckets inside the perimeter must meet the perimeter's access restrictions.
1796
+ # Corresponds to the JSON property `restrictedServices`
1797
+ # @return [Array<String>]
1798
+ attr_accessor :restricted_services
1799
+
1800
+ # Specifies how APIs are allowed to communicate within the Service Perimeter.
1801
+ # Corresponds to the JSON property `vpcAccessibleServices`
1802
+ # @return [Google::Apis::CloudassetV1p7beta1::GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices]
1803
+ attr_accessor :vpc_accessible_services
1804
+
1805
+ def initialize(**args)
1806
+ update!(**args)
1807
+ end
1808
+
1809
+ # Update properties of this object
1810
+ def update!(**args)
1811
+ @access_levels = args[:access_levels] if args.key?(:access_levels)
1812
+ @egress_policies = args[:egress_policies] if args.key?(:egress_policies)
1813
+ @ingress_policies = args[:ingress_policies] if args.key?(:ingress_policies)
1814
+ @resources = args[:resources] if args.key?(:resources)
1815
+ @restricted_services = args[:restricted_services] if args.key?(:restricted_services)
1816
+ @vpc_accessible_services = args[:vpc_accessible_services] if args.key?(:vpc_accessible_services)
1817
+ end
1818
+ end
1819
+
1820
+ # Specifies how APIs are allowed to communicate within the Service Perimeter.
1821
+ class GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices
1822
+ include Google::Apis::Core::Hashable
1823
+
1824
+ # The list of APIs usable within the Service Perimeter. Must be empty unless '
1825
+ # enable_restriction' is True. You can specify a list of individual services, as
1826
+ # well as include the 'RESTRICTED-SERVICES' value, which automatically includes
1827
+ # all of the services protected by the perimeter.
1828
+ # Corresponds to the JSON property `allowedServices`
1829
+ # @return [Array<String>]
1830
+ attr_accessor :allowed_services
1831
+
1832
+ # Whether to restrict API calls within the Service Perimeter to the list of APIs
1833
+ # specified in 'allowed_services'.
1834
+ # Corresponds to the JSON property `enableRestriction`
1835
+ # @return [Boolean]
1836
+ attr_accessor :enable_restriction
1837
+ alias_method :enable_restriction?, :enable_restriction
1838
+
1839
+ def initialize(**args)
1840
+ update!(**args)
1841
+ end
1842
+
1843
+ # Update properties of this object
1844
+ def update!(**args)
1845
+ @allowed_services = args[:allowed_services] if args.key?(:allowed_services)
1846
+ @enable_restriction = args[:enable_restriction] if args.key?(:enable_restriction)
1847
+ end
1848
+ end
1849
+
1850
+ # This resource represents a long-running operation that is the result of a
1851
+ # network API call.
1852
+ class Operation
1853
+ include Google::Apis::Core::Hashable
1854
+
1855
+ # If the value is `false`, it means the operation is still in progress. If `true`
1856
+ # , the operation is completed, and either `error` or `response` is available.
1857
+ # Corresponds to the JSON property `done`
1858
+ # @return [Boolean]
1859
+ attr_accessor :done
1860
+ alias_method :done?, :done
1861
+
1862
+ # The `Status` type defines a logical error model that is suitable for different
1863
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1864
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1865
+ # data: error code, error message, and error details. You can find out more
1866
+ # about this error model and how to work with it in the [API Design Guide](https:
1867
+ # //cloud.google.com/apis/design/errors).
1868
+ # Corresponds to the JSON property `error`
1869
+ # @return [Google::Apis::CloudassetV1p7beta1::Status]
1870
+ attr_accessor :error
1871
+
1872
+ # Service-specific metadata associated with the operation. It typically contains
1873
+ # progress information and common metadata such as create time. Some services
1874
+ # might not provide such metadata. Any method that returns a long-running
1875
+ # operation should document the metadata type, if any.
1876
+ # Corresponds to the JSON property `metadata`
1877
+ # @return [Hash<String,Object>]
1878
+ attr_accessor :metadata
1879
+
1880
+ # The server-assigned name, which is only unique within the same service that
1881
+ # originally returns it. If you use the default HTTP mapping, the `name` should
1882
+ # be a resource name ending with `operations/`unique_id``.
1883
+ # Corresponds to the JSON property `name`
1884
+ # @return [String]
1885
+ attr_accessor :name
1886
+
1887
+ # The normal response of the operation in case of success. If the original
1888
+ # method returns no data on success, such as `Delete`, the response is `google.
1889
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
1890
+ # the response should be the resource. For other methods, the response should
1891
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
1892
+ # example, if the original method name is `TakeSnapshot()`, the inferred
1893
+ # response type is `TakeSnapshotResponse`.
1894
+ # Corresponds to the JSON property `response`
1895
+ # @return [Hash<String,Object>]
1896
+ attr_accessor :response
1897
+
1898
+ def initialize(**args)
1899
+ update!(**args)
1900
+ end
1901
+
1902
+ # Update properties of this object
1903
+ def update!(**args)
1904
+ @done = args[:done] if args.key?(:done)
1905
+ @error = args[:error] if args.key?(:error)
1906
+ @metadata = args[:metadata] if args.key?(:metadata)
1907
+ @name = args[:name] if args.key?(:name)
1908
+ @response = args[:response] if args.key?(:response)
1909
+ end
1910
+ end
1911
+
1912
+ # An Identity and Access Management (IAM) policy, which specifies access
1913
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1914
+ # A `binding` binds one or more `members` to a single `role`. Members can be
1915
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
1916
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
1917
+ # role or a user-created custom role. For some types of Google Cloud resources,
1918
+ # a `binding` can also specify a `condition`, which is a logical expression that
1919
+ # allows access to a resource only if the expression evaluates to `true`. A
1920
+ # condition can add constraints based on attributes of the request, the resource,
1921
+ # or both. To learn which resources support conditions in their IAM policies,
1922
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1923
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
1924
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
1925
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
1926
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
1927
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
1928
+ # title": "expirable access", "description": "Does not grant access after Sep
1929
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
1930
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
1931
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
1932
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
1933
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
1934
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
1935
+ # description: Does not grant access after Sep 2020 expression: request.time <
1936
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
1937
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
1938
+ # google.com/iam/docs/).
1939
+ class Policy
1940
+ include Google::Apis::Core::Hashable
1941
+
1942
+ # Specifies cloud audit logging configuration for this policy.
1943
+ # Corresponds to the JSON property `auditConfigs`
1944
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::AuditConfig>]
1945
+ attr_accessor :audit_configs
1946
+
1947
+ # Associates a list of `members` to a `role`. Optionally, may specify a `
1948
+ # condition` that determines how and when the `bindings` are applied. Each of
1949
+ # the `bindings` must contain at least one member.
1950
+ # Corresponds to the JSON property `bindings`
1951
+ # @return [Array<Google::Apis::CloudassetV1p7beta1::Binding>]
1952
+ attr_accessor :bindings
1953
+
1954
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1955
+ # simultaneous updates of a policy from overwriting each other. It is strongly
1956
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1957
+ # to perform policy updates in order to avoid race conditions: An `etag` is
1958
+ # returned in the response to `getIamPolicy`, and systems are expected to put
1959
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
1960
+ # applied to the same version of the policy. **Important:** If you use IAM
1961
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
1962
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
1963
+ # with a version `1` policy, and all of the conditions in the version `3` policy
1964
+ # are lost.
1965
+ # Corresponds to the JSON property `etag`
1966
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1967
+ # @return [String]
1968
+ attr_accessor :etag
1969
+
1970
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
1971
+ # Requests that specify an invalid value are rejected. Any operation that
1972
+ # affects conditional role bindings must specify version `3`. This requirement
1973
+ # applies to the following operations: * Getting a policy that includes a
1974
+ # conditional role binding * Adding a conditional role binding to a policy *
1975
+ # Changing a conditional role binding in a policy * Removing any role binding,
1976
+ # with or without a condition, from a policy that includes conditions **
1977
+ # Important:** If you use IAM Conditions, you must include the `etag` field
1978
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
1979
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
1980
+ # conditions in the version `3` policy are lost. If a policy does not include
1981
+ # any conditions, operations on that policy may specify any valid version or
1982
+ # leave the field unset. To learn which resources support conditions in their
1983
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
1984
+ # conditions/resource-policies).
1985
+ # Corresponds to the JSON property `version`
1986
+ # @return [Fixnum]
1987
+ attr_accessor :version
1988
+
1989
+ def initialize(**args)
1990
+ update!(**args)
1991
+ end
1992
+
1993
+ # Update properties of this object
1994
+ def update!(**args)
1995
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
1996
+ @bindings = args[:bindings] if args.key?(:bindings)
1997
+ @etag = args[:etag] if args.key?(:etag)
1998
+ @version = args[:version] if args.key?(:version)
300
1999
  end
301
2000
  end
302
2001