google-apis-policysimulator_v1alpha 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,803 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module PolicysimulatorV1alpha
24
+
25
+ # A resource describing a `Replay`, or simulation.
26
+ class GoogleCloudPolicysimulatorV1Replay
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The configuration used for a Replay.
30
+ # Corresponds to the JSON property `config`
31
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1ReplayConfig]
32
+ attr_accessor :config
33
+
34
+ # Output only. The resource name of the `Replay`, which has the following format:
35
+ # ``projects|folders|organizations`/`resource-id`/locations/global/replays/`
36
+ # replay-id``, where ``resource-id`` is the ID of the project, folder, or
37
+ # organization that owns the Replay. Example: `projects/my-example-project/
38
+ # locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
39
+ # Corresponds to the JSON property `name`
40
+ # @return [String]
41
+ attr_accessor :name
42
+
43
+ # Summary statistics about the replayed log entries.
44
+ # Corresponds to the JSON property `resultsSummary`
45
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1ReplayResultsSummary]
46
+ attr_accessor :results_summary
47
+
48
+ # Output only. The current state of the `Replay`.
49
+ # Corresponds to the JSON property `state`
50
+ # @return [String]
51
+ attr_accessor :state
52
+
53
+ def initialize(**args)
54
+ update!(**args)
55
+ end
56
+
57
+ # Update properties of this object
58
+ def update!(**args)
59
+ @config = args[:config] if args.key?(:config)
60
+ @name = args[:name] if args.key?(:name)
61
+ @results_summary = args[:results_summary] if args.key?(:results_summary)
62
+ @state = args[:state] if args.key?(:state)
63
+ end
64
+ end
65
+
66
+ # The configuration used for a Replay.
67
+ class GoogleCloudPolicysimulatorV1ReplayConfig
68
+ include Google::Apis::Core::Hashable
69
+
70
+ # The logs to use as input for the Replay.
71
+ # Corresponds to the JSON property `logSource`
72
+ # @return [String]
73
+ attr_accessor :log_source
74
+
75
+ # A mapping of the resources that you want to simulate policies for and the
76
+ # policies that you want to simulate. Keys are the full resource names for the
77
+ # resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-
78
+ # project`. For examples of full resource names for Google Cloud services, see
79
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
80
+ # are Policy objects representing the policies that you want to simulate.
81
+ # Replays automatically take into account any IAM policies inherited through the
82
+ # resource hierarchy, and any policies set on descendant resources. You do not
83
+ # need to include these policies in the policy overlay.
84
+ # Corresponds to the JSON property `policyOverlay`
85
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1alpha::GoogleIamV1Policy>]
86
+ attr_accessor :policy_overlay
87
+
88
+ def initialize(**args)
89
+ update!(**args)
90
+ end
91
+
92
+ # Update properties of this object
93
+ def update!(**args)
94
+ @log_source = args[:log_source] if args.key?(:log_source)
95
+ @policy_overlay = args[:policy_overlay] if args.key?(:policy_overlay)
96
+ end
97
+ end
98
+
99
+ # Metadata about a Replay operation.
100
+ class GoogleCloudPolicysimulatorV1ReplayOperationMetadata
101
+ include Google::Apis::Core::Hashable
102
+
103
+ # Time when the request was received.
104
+ # Corresponds to the JSON property `startTime`
105
+ # @return [String]
106
+ attr_accessor :start_time
107
+
108
+ def initialize(**args)
109
+ update!(**args)
110
+ end
111
+
112
+ # Update properties of this object
113
+ def update!(**args)
114
+ @start_time = args[:start_time] if args.key?(:start_time)
115
+ end
116
+ end
117
+
118
+ # Summary statistics about the replayed log entries.
119
+ class GoogleCloudPolicysimulatorV1ReplayResultsSummary
120
+ include Google::Apis::Core::Hashable
121
+
122
+ # The number of replayed log entries with a difference between baseline and
123
+ # simulated policies.
124
+ # Corresponds to the JSON property `differenceCount`
125
+ # @return [Fixnum]
126
+ attr_accessor :difference_count
127
+
128
+ # The number of log entries that could not be replayed.
129
+ # Corresponds to the JSON property `errorCount`
130
+ # @return [Fixnum]
131
+ attr_accessor :error_count
132
+
133
+ # The total number of log entries replayed.
134
+ # Corresponds to the JSON property `logCount`
135
+ # @return [Fixnum]
136
+ attr_accessor :log_count
137
+
138
+ # Represents a whole or partial calendar date, such as a birthday. The time of
139
+ # day and time zone are either specified elsewhere or are insignificant. The
140
+ # date is relative to the Gregorian Calendar. This can represent one of the
141
+ # following: * A full date, with non-zero year, month, and day values. * A month
142
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
143
+ # with a zero month and a zero day. * A year and month, with a zero day (for
144
+ # example, a credit card expiration date). Related types: * google.type.
145
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
146
+ # Corresponds to the JSON property `newestDate`
147
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeDate]
148
+ attr_accessor :newest_date
149
+
150
+ # Represents a whole or partial calendar date, such as a birthday. The time of
151
+ # day and time zone are either specified elsewhere or are insignificant. The
152
+ # date is relative to the Gregorian Calendar. This can represent one of the
153
+ # following: * A full date, with non-zero year, month, and day values. * A month
154
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
155
+ # with a zero month and a zero day. * A year and month, with a zero day (for
156
+ # example, a credit card expiration date). Related types: * google.type.
157
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
158
+ # Corresponds to the JSON property `oldestDate`
159
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeDate]
160
+ attr_accessor :oldest_date
161
+
162
+ # The number of replayed log entries with no difference between baseline and
163
+ # simulated policies.
164
+ # Corresponds to the JSON property `unchangedCount`
165
+ # @return [Fixnum]
166
+ attr_accessor :unchanged_count
167
+
168
+ def initialize(**args)
169
+ update!(**args)
170
+ end
171
+
172
+ # Update properties of this object
173
+ def update!(**args)
174
+ @difference_count = args[:difference_count] if args.key?(:difference_count)
175
+ @error_count = args[:error_count] if args.key?(:error_count)
176
+ @log_count = args[:log_count] if args.key?(:log_count)
177
+ @newest_date = args[:newest_date] if args.key?(:newest_date)
178
+ @oldest_date = args[:oldest_date] if args.key?(:oldest_date)
179
+ @unchanged_count = args[:unchanged_count] if args.key?(:unchanged_count)
180
+ end
181
+ end
182
+
183
+ # A resource describing a `Replay`, or simulation.
184
+ class GoogleCloudPolicysimulatorV1beta1Replay
185
+ include Google::Apis::Core::Hashable
186
+
187
+ # The configuration used for a Replay.
188
+ # Corresponds to the JSON property `config`
189
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1beta1ReplayConfig]
190
+ attr_accessor :config
191
+
192
+ # Output only. The resource name of the `Replay`, which has the following format:
193
+ # ``projects|folders|organizations`/`resource-id`/locations/global/replays/`
194
+ # replay-id``, where ``resource-id`` is the ID of the project, folder, or
195
+ # organization that owns the Replay. Example: `projects/my-example-project/
196
+ # locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
197
+ # Corresponds to the JSON property `name`
198
+ # @return [String]
199
+ attr_accessor :name
200
+
201
+ # Summary statistics about the replayed log entries.
202
+ # Corresponds to the JSON property `resultsSummary`
203
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary]
204
+ attr_accessor :results_summary
205
+
206
+ # Output only. The current state of the `Replay`.
207
+ # Corresponds to the JSON property `state`
208
+ # @return [String]
209
+ attr_accessor :state
210
+
211
+ def initialize(**args)
212
+ update!(**args)
213
+ end
214
+
215
+ # Update properties of this object
216
+ def update!(**args)
217
+ @config = args[:config] if args.key?(:config)
218
+ @name = args[:name] if args.key?(:name)
219
+ @results_summary = args[:results_summary] if args.key?(:results_summary)
220
+ @state = args[:state] if args.key?(:state)
221
+ end
222
+ end
223
+
224
+ # The configuration used for a Replay.
225
+ class GoogleCloudPolicysimulatorV1beta1ReplayConfig
226
+ include Google::Apis::Core::Hashable
227
+
228
+ # The logs to use as input for the Replay.
229
+ # Corresponds to the JSON property `logSource`
230
+ # @return [String]
231
+ attr_accessor :log_source
232
+
233
+ # A mapping of the resources that you want to simulate policies for and the
234
+ # policies that you want to simulate. Keys are the full resource names for the
235
+ # resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-
236
+ # project`. For examples of full resource names for Google Cloud services, see
237
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
238
+ # are Policy objects representing the policies that you want to simulate.
239
+ # Replays automatically take into account any IAM policies inherited through the
240
+ # resource hierarchy, and any policies set on descendant resources. You do not
241
+ # need to include these policies in the policy overlay.
242
+ # Corresponds to the JSON property `policyOverlay`
243
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1alpha::GoogleIamV1Policy>]
244
+ attr_accessor :policy_overlay
245
+
246
+ def initialize(**args)
247
+ update!(**args)
248
+ end
249
+
250
+ # Update properties of this object
251
+ def update!(**args)
252
+ @log_source = args[:log_source] if args.key?(:log_source)
253
+ @policy_overlay = args[:policy_overlay] if args.key?(:policy_overlay)
254
+ end
255
+ end
256
+
257
+ # Metadata about a Replay operation.
258
+ class GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata
259
+ include Google::Apis::Core::Hashable
260
+
261
+ # Time when the request was received.
262
+ # Corresponds to the JSON property `startTime`
263
+ # @return [String]
264
+ attr_accessor :start_time
265
+
266
+ def initialize(**args)
267
+ update!(**args)
268
+ end
269
+
270
+ # Update properties of this object
271
+ def update!(**args)
272
+ @start_time = args[:start_time] if args.key?(:start_time)
273
+ end
274
+ end
275
+
276
+ # Summary statistics about the replayed log entries.
277
+ class GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary
278
+ include Google::Apis::Core::Hashable
279
+
280
+ # The number of replayed log entries with a difference between baseline and
281
+ # simulated policies.
282
+ # Corresponds to the JSON property `differenceCount`
283
+ # @return [Fixnum]
284
+ attr_accessor :difference_count
285
+
286
+ # The number of log entries that could not be replayed.
287
+ # Corresponds to the JSON property `errorCount`
288
+ # @return [Fixnum]
289
+ attr_accessor :error_count
290
+
291
+ # The total number of log entries replayed.
292
+ # Corresponds to the JSON property `logCount`
293
+ # @return [Fixnum]
294
+ attr_accessor :log_count
295
+
296
+ # Represents a whole or partial calendar date, such as a birthday. The time of
297
+ # day and time zone are either specified elsewhere or are insignificant. The
298
+ # date is relative to the Gregorian Calendar. This can represent one of the
299
+ # following: * A full date, with non-zero year, month, and day values. * A month
300
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
301
+ # with a zero month and a zero day. * A year and month, with a zero day (for
302
+ # example, a credit card expiration date). Related types: * google.type.
303
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
304
+ # Corresponds to the JSON property `newestDate`
305
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeDate]
306
+ attr_accessor :newest_date
307
+
308
+ # Represents a whole or partial calendar date, such as a birthday. The time of
309
+ # day and time zone are either specified elsewhere or are insignificant. The
310
+ # date is relative to the Gregorian Calendar. This can represent one of the
311
+ # following: * A full date, with non-zero year, month, and day values. * A month
312
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
313
+ # with a zero month and a zero day. * A year and month, with a zero day (for
314
+ # example, a credit card expiration date). Related types: * google.type.
315
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
316
+ # Corresponds to the JSON property `oldestDate`
317
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeDate]
318
+ attr_accessor :oldest_date
319
+
320
+ # The number of replayed log entries with no difference between baseline and
321
+ # simulated policies.
322
+ # Corresponds to the JSON property `unchangedCount`
323
+ # @return [Fixnum]
324
+ attr_accessor :unchanged_count
325
+
326
+ def initialize(**args)
327
+ update!(**args)
328
+ end
329
+
330
+ # Update properties of this object
331
+ def update!(**args)
332
+ @difference_count = args[:difference_count] if args.key?(:difference_count)
333
+ @error_count = args[:error_count] if args.key?(:error_count)
334
+ @log_count = args[:log_count] if args.key?(:log_count)
335
+ @newest_date = args[:newest_date] if args.key?(:newest_date)
336
+ @oldest_date = args[:oldest_date] if args.key?(:oldest_date)
337
+ @unchanged_count = args[:unchanged_count] if args.key?(:unchanged_count)
338
+ end
339
+ end
340
+
341
+ # Specifies the audit configuration for a service. The configuration determines
342
+ # which permission types are logged, and what identities, if any, are exempted
343
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
344
+ # are AuditConfigs for both `allServices` and a specific service, the union of
345
+ # the two AuditConfigs is used for that service: the log_types specified in each
346
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
347
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
348
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
349
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
350
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
351
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
352
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
353
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
354
+ # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
355
+ # from DATA_WRITE logging.
356
+ class GoogleIamV1AuditConfig
357
+ include Google::Apis::Core::Hashable
358
+
359
+ # The configuration for logging of each type of permission.
360
+ # Corresponds to the JSON property `auditLogConfigs`
361
+ # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleIamV1AuditLogConfig>]
362
+ attr_accessor :audit_log_configs
363
+
364
+ # Specifies a service that will be enabled for audit logging. For example, `
365
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
366
+ # value that covers all services.
367
+ # Corresponds to the JSON property `service`
368
+ # @return [String]
369
+ attr_accessor :service
370
+
371
+ def initialize(**args)
372
+ update!(**args)
373
+ end
374
+
375
+ # Update properties of this object
376
+ def update!(**args)
377
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
378
+ @service = args[:service] if args.key?(:service)
379
+ end
380
+ end
381
+
382
+ # Provides the configuration for logging a type of permissions. Example: ` "
383
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
384
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
385
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
386
+ # DATA_READ logging.
387
+ class GoogleIamV1AuditLogConfig
388
+ include Google::Apis::Core::Hashable
389
+
390
+ # Specifies the identities that do not cause logging for this type of permission.
391
+ # Follows the same format of Binding.members.
392
+ # Corresponds to the JSON property `exemptedMembers`
393
+ # @return [Array<String>]
394
+ attr_accessor :exempted_members
395
+
396
+ # The log type that this config enables.
397
+ # Corresponds to the JSON property `logType`
398
+ # @return [String]
399
+ attr_accessor :log_type
400
+
401
+ def initialize(**args)
402
+ update!(**args)
403
+ end
404
+
405
+ # Update properties of this object
406
+ def update!(**args)
407
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
408
+ @log_type = args[:log_type] if args.key?(:log_type)
409
+ end
410
+ end
411
+
412
+ # Associates `members`, or principals, with a `role`.
413
+ class GoogleIamV1Binding
414
+ include Google::Apis::Core::Hashable
415
+
416
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
417
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
418
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
419
+ # "Summary size limit" description: "Determines if a summary is less than 100
420
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
421
+ # Requestor is owner" description: "Determines if requestor is the document
422
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
423
+ # Logic): title: "Public documents" description: "Determine whether the document
424
+ # should be publicly visible" expression: "document.type != 'private' &&
425
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
426
+ # string" description: "Create a notification string with a timestamp."
427
+ # expression: "'New message received at ' + string(document.create_time)" The
428
+ # exact variables and functions that may be referenced within an expression are
429
+ # determined by the service that evaluates it. See the service documentation for
430
+ # additional information.
431
+ # Corresponds to the JSON property `condition`
432
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeExpr]
433
+ attr_accessor :condition
434
+
435
+ # Specifies the principals requesting access for a Google Cloud resource. `
436
+ # members` can have the following values: * `allUsers`: A special identifier
437
+ # that represents anyone who is on the internet; with or without a Google
438
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
439
+ # anyone who is authenticated with a Google account or a service account. * `
440
+ # user:`emailid``: An email address that represents a specific Google account.
441
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
442
+ # address that represents a Google service account. For example, `my-other-app@
443
+ # appspot.gserviceaccount.com`. * `serviceAccount:`projectid`.svc.id.goog[`
444
+ # namespace`/`kubernetes-sa`]`: An identifier for a [Kubernetes service account](
445
+ # https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-
446
+ # accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`
447
+ # . * `group:`emailid``: An email address that represents a Google group. For
448
+ # example, `admins@example.com`. * `deleted:user:`emailid`?uid=`uniqueid``: An
449
+ # email address (plus unique identifier) representing a user that has been
450
+ # recently deleted. For example, `alice@example.com?uid=123456789012345678901`.
451
+ # If the user is recovered, this value reverts to `user:`emailid`` and the
452
+ # recovered user retains the role in the binding. * `deleted:serviceAccount:`
453
+ # emailid`?uid=`uniqueid``: An email address (plus unique identifier)
454
+ # representing a service account that has been recently deleted. For example, `
455
+ # my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
456
+ # service account is undeleted, this value reverts to `serviceAccount:`emailid``
457
+ # and the undeleted service account retains the role in the binding. * `deleted:
458
+ # group:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
459
+ # representing a Google group that has been recently deleted. For example, `
460
+ # admins@example.com?uid=123456789012345678901`. If the group is recovered, this
461
+ # value reverts to `group:`emailid`` and the recovered group retains the role in
462
+ # the binding. * `domain:`domain``: The G Suite domain (primary) that represents
463
+ # all the users of that domain. For example, `google.com` or `example.com`.
464
+ # Corresponds to the JSON property `members`
465
+ # @return [Array<String>]
466
+ attr_accessor :members
467
+
468
+ # Role that is assigned to the list of `members`, or principals. For example, `
469
+ # roles/viewer`, `roles/editor`, or `roles/owner`.
470
+ # Corresponds to the JSON property `role`
471
+ # @return [String]
472
+ attr_accessor :role
473
+
474
+ def initialize(**args)
475
+ update!(**args)
476
+ end
477
+
478
+ # Update properties of this object
479
+ def update!(**args)
480
+ @condition = args[:condition] if args.key?(:condition)
481
+ @members = args[:members] if args.key?(:members)
482
+ @role = args[:role] if args.key?(:role)
483
+ end
484
+ end
485
+
486
+ # An Identity and Access Management (IAM) policy, which specifies access
487
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
488
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
489
+ # Principals can be user accounts, service accounts, Google groups, and domains (
490
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
491
+ # an IAM predefined role or a user-created custom role. For some types of Google
492
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
493
+ # logical expression that allows access to a resource only if the expression
494
+ # evaluates to `true`. A condition can add constraints based on attributes of
495
+ # the request, the resource, or both. To learn which resources support
496
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
497
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
498
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
499
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
500
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
501
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
502
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
503
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
504
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
505
+ # bindings: - members: - user:mike@example.com - group:admins@example.com -
506
+ # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
507
+ # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
508
+ # com role: roles/resourcemanager.organizationViewer condition: title: expirable
509
+ # access description: Does not grant access after Sep 2020 expression: request.
510
+ # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
511
+ # a description of IAM and its features, see the [IAM documentation](https://
512
+ # cloud.google.com/iam/docs/).
513
+ class GoogleIamV1Policy
514
+ include Google::Apis::Core::Hashable
515
+
516
+ # Specifies cloud audit logging configuration for this policy.
517
+ # Corresponds to the JSON property `auditConfigs`
518
+ # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleIamV1AuditConfig>]
519
+ attr_accessor :audit_configs
520
+
521
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
522
+ # specify a `condition` that determines how and when the `bindings` are applied.
523
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
524
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
525
+ # can be Google groups. Each occurrence of a principal counts towards these
526
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
527
+ # example.com`, and not to any other principal, then you can add another 1,450
528
+ # principals to the `bindings` in the `Policy`.
529
+ # Corresponds to the JSON property `bindings`
530
+ # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleIamV1Binding>]
531
+ attr_accessor :bindings
532
+
533
+ # `etag` is used for optimistic concurrency control as a way to help prevent
534
+ # simultaneous updates of a policy from overwriting each other. It is strongly
535
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
536
+ # to perform policy updates in order to avoid race conditions: An `etag` is
537
+ # returned in the response to `getIamPolicy`, and systems are expected to put
538
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
539
+ # applied to the same version of the policy. **Important:** If you use IAM
540
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
541
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
542
+ # with a version `1` policy, and all of the conditions in the version `3` policy
543
+ # are lost.
544
+ # Corresponds to the JSON property `etag`
545
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
546
+ # @return [String]
547
+ attr_accessor :etag
548
+
549
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
550
+ # Requests that specify an invalid value are rejected. Any operation that
551
+ # affects conditional role bindings must specify version `3`. This requirement
552
+ # applies to the following operations: * Getting a policy that includes a
553
+ # conditional role binding * Adding a conditional role binding to a policy *
554
+ # Changing a conditional role binding in a policy * Removing any role binding,
555
+ # with or without a condition, from a policy that includes conditions **
556
+ # Important:** If you use IAM Conditions, you must include the `etag` field
557
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
558
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
559
+ # conditions in the version `3` policy are lost. If a policy does not include
560
+ # any conditions, operations on that policy may specify any valid version or
561
+ # leave the field unset. To learn which resources support conditions in their
562
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
563
+ # conditions/resource-policies).
564
+ # Corresponds to the JSON property `version`
565
+ # @return [Fixnum]
566
+ attr_accessor :version
567
+
568
+ def initialize(**args)
569
+ update!(**args)
570
+ end
571
+
572
+ # Update properties of this object
573
+ def update!(**args)
574
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
575
+ @bindings = args[:bindings] if args.key?(:bindings)
576
+ @etag = args[:etag] if args.key?(:etag)
577
+ @version = args[:version] if args.key?(:version)
578
+ end
579
+ end
580
+
581
+ # The response message for Operations.ListOperations.
582
+ class GoogleLongrunningListOperationsResponse
583
+ include Google::Apis::Core::Hashable
584
+
585
+ # The standard List next-page token.
586
+ # Corresponds to the JSON property `nextPageToken`
587
+ # @return [String]
588
+ attr_accessor :next_page_token
589
+
590
+ # A list of operations that matches the specified filter in the request.
591
+ # Corresponds to the JSON property `operations`
592
+ # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleLongrunningOperation>]
593
+ attr_accessor :operations
594
+
595
+ def initialize(**args)
596
+ update!(**args)
597
+ end
598
+
599
+ # Update properties of this object
600
+ def update!(**args)
601
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
602
+ @operations = args[:operations] if args.key?(:operations)
603
+ end
604
+ end
605
+
606
+ # This resource represents a long-running operation that is the result of a
607
+ # network API call.
608
+ class GoogleLongrunningOperation
609
+ include Google::Apis::Core::Hashable
610
+
611
+ # If the value is `false`, it means the operation is still in progress. If `true`
612
+ # , the operation is completed, and either `error` or `response` is available.
613
+ # Corresponds to the JSON property `done`
614
+ # @return [Boolean]
615
+ attr_accessor :done
616
+ alias_method :done?, :done
617
+
618
+ # The `Status` type defines a logical error model that is suitable for different
619
+ # programming environments, including REST APIs and RPC APIs. It is used by [
620
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
621
+ # data: error code, error message, and error details. You can find out more
622
+ # about this error model and how to work with it in the [API Design Guide](https:
623
+ # //cloud.google.com/apis/design/errors).
624
+ # Corresponds to the JSON property `error`
625
+ # @return [Google::Apis::PolicysimulatorV1alpha::GoogleRpcStatus]
626
+ attr_accessor :error
627
+
628
+ # Service-specific metadata associated with the operation. It typically contains
629
+ # progress information and common metadata such as create time. Some services
630
+ # might not provide such metadata. Any method that returns a long-running
631
+ # operation should document the metadata type, if any.
632
+ # Corresponds to the JSON property `metadata`
633
+ # @return [Hash<String,Object>]
634
+ attr_accessor :metadata
635
+
636
+ # The server-assigned name, which is only unique within the same service that
637
+ # originally returns it. If you use the default HTTP mapping, the `name` should
638
+ # be a resource name ending with `operations/`unique_id``.
639
+ # Corresponds to the JSON property `name`
640
+ # @return [String]
641
+ attr_accessor :name
642
+
643
+ # The normal response of the operation in case of success. If the original
644
+ # method returns no data on success, such as `Delete`, the response is `google.
645
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
646
+ # the response should be the resource. For other methods, the response should
647
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
648
+ # example, if the original method name is `TakeSnapshot()`, the inferred
649
+ # response type is `TakeSnapshotResponse`.
650
+ # Corresponds to the JSON property `response`
651
+ # @return [Hash<String,Object>]
652
+ attr_accessor :response
653
+
654
+ def initialize(**args)
655
+ update!(**args)
656
+ end
657
+
658
+ # Update properties of this object
659
+ def update!(**args)
660
+ @done = args[:done] if args.key?(:done)
661
+ @error = args[:error] if args.key?(:error)
662
+ @metadata = args[:metadata] if args.key?(:metadata)
663
+ @name = args[:name] if args.key?(:name)
664
+ @response = args[:response] if args.key?(:response)
665
+ end
666
+ end
667
+
668
+ # The `Status` type defines a logical error model that is suitable for different
669
+ # programming environments, including REST APIs and RPC APIs. It is used by [
670
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
671
+ # data: error code, error message, and error details. You can find out more
672
+ # about this error model and how to work with it in the [API Design Guide](https:
673
+ # //cloud.google.com/apis/design/errors).
674
+ class GoogleRpcStatus
675
+ include Google::Apis::Core::Hashable
676
+
677
+ # The status code, which should be an enum value of google.rpc.Code.
678
+ # Corresponds to the JSON property `code`
679
+ # @return [Fixnum]
680
+ attr_accessor :code
681
+
682
+ # A list of messages that carry the error details. There is a common set of
683
+ # message types for APIs to use.
684
+ # Corresponds to the JSON property `details`
685
+ # @return [Array<Hash<String,Object>>]
686
+ attr_accessor :details
687
+
688
+ # A developer-facing error message, which should be in English. Any user-facing
689
+ # error message should be localized and sent in the google.rpc.Status.details
690
+ # field, or localized by the client.
691
+ # Corresponds to the JSON property `message`
692
+ # @return [String]
693
+ attr_accessor :message
694
+
695
+ def initialize(**args)
696
+ update!(**args)
697
+ end
698
+
699
+ # Update properties of this object
700
+ def update!(**args)
701
+ @code = args[:code] if args.key?(:code)
702
+ @details = args[:details] if args.key?(:details)
703
+ @message = args[:message] if args.key?(:message)
704
+ end
705
+ end
706
+
707
+ # Represents a whole or partial calendar date, such as a birthday. The time of
708
+ # day and time zone are either specified elsewhere or are insignificant. The
709
+ # date is relative to the Gregorian Calendar. This can represent one of the
710
+ # following: * A full date, with non-zero year, month, and day values. * A month
711
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
712
+ # with a zero month and a zero day. * A year and month, with a zero day (for
713
+ # example, a credit card expiration date). Related types: * google.type.
714
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
715
+ class GoogleTypeDate
716
+ include Google::Apis::Core::Hashable
717
+
718
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
719
+ # specify a year by itself or a year and month where the day isn't significant.
720
+ # Corresponds to the JSON property `day`
721
+ # @return [Fixnum]
722
+ attr_accessor :day
723
+
724
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
725
+ # and day.
726
+ # Corresponds to the JSON property `month`
727
+ # @return [Fixnum]
728
+ attr_accessor :month
729
+
730
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
731
+ # year.
732
+ # Corresponds to the JSON property `year`
733
+ # @return [Fixnum]
734
+ attr_accessor :year
735
+
736
+ def initialize(**args)
737
+ update!(**args)
738
+ end
739
+
740
+ # Update properties of this object
741
+ def update!(**args)
742
+ @day = args[:day] if args.key?(:day)
743
+ @month = args[:month] if args.key?(:month)
744
+ @year = args[:year] if args.key?(:year)
745
+ end
746
+ end
747
+
748
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
749
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
750
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
751
+ # "Summary size limit" description: "Determines if a summary is less than 100
752
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
753
+ # Requestor is owner" description: "Determines if requestor is the document
754
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
755
+ # Logic): title: "Public documents" description: "Determine whether the document
756
+ # should be publicly visible" expression: "document.type != 'private' &&
757
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
758
+ # string" description: "Create a notification string with a timestamp."
759
+ # expression: "'New message received at ' + string(document.create_time)" The
760
+ # exact variables and functions that may be referenced within an expression are
761
+ # determined by the service that evaluates it. See the service documentation for
762
+ # additional information.
763
+ class GoogleTypeExpr
764
+ include Google::Apis::Core::Hashable
765
+
766
+ # Optional. Description of the expression. This is a longer text which describes
767
+ # the expression, e.g. when hovered over it in a UI.
768
+ # Corresponds to the JSON property `description`
769
+ # @return [String]
770
+ attr_accessor :description
771
+
772
+ # Textual representation of an expression in Common Expression Language syntax.
773
+ # Corresponds to the JSON property `expression`
774
+ # @return [String]
775
+ attr_accessor :expression
776
+
777
+ # Optional. String indicating the location of the expression for error reporting,
778
+ # e.g. a file name and a position in the file.
779
+ # Corresponds to the JSON property `location`
780
+ # @return [String]
781
+ attr_accessor :location
782
+
783
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
784
+ # This can be used e.g. in UIs which allow to enter the expression.
785
+ # Corresponds to the JSON property `title`
786
+ # @return [String]
787
+ attr_accessor :title
788
+
789
+ def initialize(**args)
790
+ update!(**args)
791
+ end
792
+
793
+ # Update properties of this object
794
+ def update!(**args)
795
+ @description = args[:description] if args.key?(:description)
796
+ @expression = args[:expression] if args.key?(:expression)
797
+ @location = args[:location] if args.key?(:location)
798
+ @title = args[:title] if args.key?(:title)
799
+ end
800
+ end
801
+ end
802
+ end
803
+ end