google-apis-policysimulator_v1beta 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,647 @@
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 PolicysimulatorV1beta
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::PolicysimulatorV1beta::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::PolicysimulatorV1beta::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::PolicysimulatorV1beta::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::PolicysimulatorV1beta::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::PolicysimulatorV1beta::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
+ # Specifies the audit configuration for a service. The configuration determines
184
+ # which permission types are logged, and what identities, if any, are exempted
185
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
186
+ # are AuditConfigs for both `allServices` and a specific service, the union of
187
+ # the two AuditConfigs is used for that service: the log_types specified in each
188
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
189
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
190
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
191
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
192
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
193
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
194
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
195
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
196
+ # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
197
+ # from DATA_WRITE logging.
198
+ class GoogleIamV1AuditConfig
199
+ include Google::Apis::Core::Hashable
200
+
201
+ # The configuration for logging of each type of permission.
202
+ # Corresponds to the JSON property `auditLogConfigs`
203
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleIamV1AuditLogConfig>]
204
+ attr_accessor :audit_log_configs
205
+
206
+ # Specifies a service that will be enabled for audit logging. For example, `
207
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
208
+ # value that covers all services.
209
+ # Corresponds to the JSON property `service`
210
+ # @return [String]
211
+ attr_accessor :service
212
+
213
+ def initialize(**args)
214
+ update!(**args)
215
+ end
216
+
217
+ # Update properties of this object
218
+ def update!(**args)
219
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
220
+ @service = args[:service] if args.key?(:service)
221
+ end
222
+ end
223
+
224
+ # Provides the configuration for logging a type of permissions. Example: ` "
225
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
226
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
227
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
228
+ # DATA_READ logging.
229
+ class GoogleIamV1AuditLogConfig
230
+ include Google::Apis::Core::Hashable
231
+
232
+ # Specifies the identities that do not cause logging for this type of permission.
233
+ # Follows the same format of Binding.members.
234
+ # Corresponds to the JSON property `exemptedMembers`
235
+ # @return [Array<String>]
236
+ attr_accessor :exempted_members
237
+
238
+ # The log type that this config enables.
239
+ # Corresponds to the JSON property `logType`
240
+ # @return [String]
241
+ attr_accessor :log_type
242
+
243
+ def initialize(**args)
244
+ update!(**args)
245
+ end
246
+
247
+ # Update properties of this object
248
+ def update!(**args)
249
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
250
+ @log_type = args[:log_type] if args.key?(:log_type)
251
+ end
252
+ end
253
+
254
+ # Associates `members`, or principals, with a `role`.
255
+ class GoogleIamV1Binding
256
+ include Google::Apis::Core::Hashable
257
+
258
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
259
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
260
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
261
+ # "Summary size limit" description: "Determines if a summary is less than 100
262
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
263
+ # Requestor is owner" description: "Determines if requestor is the document
264
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
265
+ # Logic): title: "Public documents" description: "Determine whether the document
266
+ # should be publicly visible" expression: "document.type != 'private' &&
267
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
268
+ # string" description: "Create a notification string with a timestamp."
269
+ # expression: "'New message received at ' + string(document.create_time)" The
270
+ # exact variables and functions that may be referenced within an expression are
271
+ # determined by the service that evaluates it. See the service documentation for
272
+ # additional information.
273
+ # Corresponds to the JSON property `condition`
274
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeExpr]
275
+ attr_accessor :condition
276
+
277
+ # Specifies the principals requesting access for a Google Cloud resource. `
278
+ # members` can have the following values: * `allUsers`: A special identifier
279
+ # that represents anyone who is on the internet; with or without a Google
280
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
281
+ # anyone who is authenticated with a Google account or a service account. Does
282
+ # not include identities that come from external identity providers (IdPs)
283
+ # through identity federation. * `user:`emailid``: An email address that
284
+ # represents a specific Google account. For example, `alice@example.com` . * `
285
+ # serviceAccount:`emailid``: An email address that represents a Google service
286
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
287
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
288
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
289
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
290
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
291
+ # email address that represents a Google group. For example, `admins@example.com`
292
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
293
+ # users of that domain. For example, `google.com` or `example.com`. * `deleted:
294
+ # user:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
295
+ # representing a user that has been recently deleted. For example, `alice@
296
+ # example.com?uid=123456789012345678901`. If the user is recovered, this value
297
+ # reverts to `user:`emailid`` and the recovered user retains the role in the
298
+ # binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address
299
+ # (plus unique identifier) representing a service account that has been recently
300
+ # deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
301
+ # 123456789012345678901`. If the service account is undeleted, this value
302
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
303
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
304
+ # An email address (plus unique identifier) representing a Google group that has
305
+ # been recently deleted. For example, `admins@example.com?uid=
306
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
307
+ # group:`emailid`` and the recovered group retains the role in the binding.
308
+ # Corresponds to the JSON property `members`
309
+ # @return [Array<String>]
310
+ attr_accessor :members
311
+
312
+ # Role that is assigned to the list of `members`, or principals. For example, `
313
+ # roles/viewer`, `roles/editor`, or `roles/owner`.
314
+ # Corresponds to the JSON property `role`
315
+ # @return [String]
316
+ attr_accessor :role
317
+
318
+ def initialize(**args)
319
+ update!(**args)
320
+ end
321
+
322
+ # Update properties of this object
323
+ def update!(**args)
324
+ @condition = args[:condition] if args.key?(:condition)
325
+ @members = args[:members] if args.key?(:members)
326
+ @role = args[:role] if args.key?(:role)
327
+ end
328
+ end
329
+
330
+ # An Identity and Access Management (IAM) policy, which specifies access
331
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
332
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
333
+ # Principals can be user accounts, service accounts, Google groups, and domains (
334
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
335
+ # an IAM predefined role or a user-created custom role. For some types of Google
336
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
337
+ # logical expression that allows access to a resource only if the expression
338
+ # evaluates to `true`. A condition can add constraints based on attributes of
339
+ # the request, the resource, or both. To learn which resources support
340
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
341
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
342
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
343
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
344
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
345
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
346
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
347
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
348
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
349
+ # bindings: - members: - user:mike@example.com - group:admins@example.com -
350
+ # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
351
+ # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
352
+ # com role: roles/resourcemanager.organizationViewer condition: title: expirable
353
+ # access description: Does not grant access after Sep 2020 expression: request.
354
+ # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
355
+ # a description of IAM and its features, see the [IAM documentation](https://
356
+ # cloud.google.com/iam/docs/).
357
+ class GoogleIamV1Policy
358
+ include Google::Apis::Core::Hashable
359
+
360
+ # Specifies cloud audit logging configuration for this policy.
361
+ # Corresponds to the JSON property `auditConfigs`
362
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleIamV1AuditConfig>]
363
+ attr_accessor :audit_configs
364
+
365
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
366
+ # specify a `condition` that determines how and when the `bindings` are applied.
367
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
368
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
369
+ # can be Google groups. Each occurrence of a principal counts towards these
370
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
371
+ # example.com`, and not to any other principal, then you can add another 1,450
372
+ # principals to the `bindings` in the `Policy`.
373
+ # Corresponds to the JSON property `bindings`
374
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleIamV1Binding>]
375
+ attr_accessor :bindings
376
+
377
+ # `etag` is used for optimistic concurrency control as a way to help prevent
378
+ # simultaneous updates of a policy from overwriting each other. It is strongly
379
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
380
+ # to perform policy updates in order to avoid race conditions: An `etag` is
381
+ # returned in the response to `getIamPolicy`, and systems are expected to put
382
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
383
+ # applied to the same version of the policy. **Important:** If you use IAM
384
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
385
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
386
+ # with a version `1` policy, and all of the conditions in the version `3` policy
387
+ # are lost.
388
+ # Corresponds to the JSON property `etag`
389
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
390
+ # @return [String]
391
+ attr_accessor :etag
392
+
393
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
394
+ # Requests that specify an invalid value are rejected. Any operation that
395
+ # affects conditional role bindings must specify version `3`. This requirement
396
+ # applies to the following operations: * Getting a policy that includes a
397
+ # conditional role binding * Adding a conditional role binding to a policy *
398
+ # Changing a conditional role binding in a policy * Removing any role binding,
399
+ # with or without a condition, from a policy that includes conditions **
400
+ # Important:** If you use IAM Conditions, you must include the `etag` field
401
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
402
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
403
+ # conditions in the version `3` policy are lost. If a policy does not include
404
+ # any conditions, operations on that policy may specify any valid version or
405
+ # leave the field unset. To learn which resources support conditions in their
406
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
407
+ # conditions/resource-policies).
408
+ # Corresponds to the JSON property `version`
409
+ # @return [Fixnum]
410
+ attr_accessor :version
411
+
412
+ def initialize(**args)
413
+ update!(**args)
414
+ end
415
+
416
+ # Update properties of this object
417
+ def update!(**args)
418
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
419
+ @bindings = args[:bindings] if args.key?(:bindings)
420
+ @etag = args[:etag] if args.key?(:etag)
421
+ @version = args[:version] if args.key?(:version)
422
+ end
423
+ end
424
+
425
+ # The response message for Operations.ListOperations.
426
+ class GoogleLongrunningListOperationsResponse
427
+ include Google::Apis::Core::Hashable
428
+
429
+ # The standard List next-page token.
430
+ # Corresponds to the JSON property `nextPageToken`
431
+ # @return [String]
432
+ attr_accessor :next_page_token
433
+
434
+ # A list of operations that matches the specified filter in the request.
435
+ # Corresponds to the JSON property `operations`
436
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation>]
437
+ attr_accessor :operations
438
+
439
+ def initialize(**args)
440
+ update!(**args)
441
+ end
442
+
443
+ # Update properties of this object
444
+ def update!(**args)
445
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
446
+ @operations = args[:operations] if args.key?(:operations)
447
+ end
448
+ end
449
+
450
+ # This resource represents a long-running operation that is the result of a
451
+ # network API call.
452
+ class GoogleLongrunningOperation
453
+ include Google::Apis::Core::Hashable
454
+
455
+ # If the value is `false`, it means the operation is still in progress. If `true`
456
+ # , the operation is completed, and either `error` or `response` is available.
457
+ # Corresponds to the JSON property `done`
458
+ # @return [Boolean]
459
+ attr_accessor :done
460
+ alias_method :done?, :done
461
+
462
+ # The `Status` type defines a logical error model that is suitable for different
463
+ # programming environments, including REST APIs and RPC APIs. It is used by [
464
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
465
+ # data: error code, error message, and error details. You can find out more
466
+ # about this error model and how to work with it in the [API Design Guide](https:
467
+ # //cloud.google.com/apis/design/errors).
468
+ # Corresponds to the JSON property `error`
469
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus]
470
+ attr_accessor :error
471
+
472
+ # Service-specific metadata associated with the operation. It typically contains
473
+ # progress information and common metadata such as create time. Some services
474
+ # might not provide such metadata. Any method that returns a long-running
475
+ # operation should document the metadata type, if any.
476
+ # Corresponds to the JSON property `metadata`
477
+ # @return [Hash<String,Object>]
478
+ attr_accessor :metadata
479
+
480
+ # The server-assigned name, which is only unique within the same service that
481
+ # originally returns it. If you use the default HTTP mapping, the `name` should
482
+ # be a resource name ending with `operations/`unique_id``.
483
+ # Corresponds to the JSON property `name`
484
+ # @return [String]
485
+ attr_accessor :name
486
+
487
+ # The normal response of the operation in case of success. If the original
488
+ # method returns no data on success, such as `Delete`, the response is `google.
489
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
490
+ # the response should be the resource. For other methods, the response should
491
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
492
+ # example, if the original method name is `TakeSnapshot()`, the inferred
493
+ # response type is `TakeSnapshotResponse`.
494
+ # Corresponds to the JSON property `response`
495
+ # @return [Hash<String,Object>]
496
+ attr_accessor :response
497
+
498
+ def initialize(**args)
499
+ update!(**args)
500
+ end
501
+
502
+ # Update properties of this object
503
+ def update!(**args)
504
+ @done = args[:done] if args.key?(:done)
505
+ @error = args[:error] if args.key?(:error)
506
+ @metadata = args[:metadata] if args.key?(:metadata)
507
+ @name = args[:name] if args.key?(:name)
508
+ @response = args[:response] if args.key?(:response)
509
+ end
510
+ end
511
+
512
+ # The `Status` type defines a logical error model that is suitable for different
513
+ # programming environments, including REST APIs and RPC APIs. It is used by [
514
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
515
+ # data: error code, error message, and error details. You can find out more
516
+ # about this error model and how to work with it in the [API Design Guide](https:
517
+ # //cloud.google.com/apis/design/errors).
518
+ class GoogleRpcStatus
519
+ include Google::Apis::Core::Hashable
520
+
521
+ # The status code, which should be an enum value of google.rpc.Code.
522
+ # Corresponds to the JSON property `code`
523
+ # @return [Fixnum]
524
+ attr_accessor :code
525
+
526
+ # A list of messages that carry the error details. There is a common set of
527
+ # message types for APIs to use.
528
+ # Corresponds to the JSON property `details`
529
+ # @return [Array<Hash<String,Object>>]
530
+ attr_accessor :details
531
+
532
+ # A developer-facing error message, which should be in English. Any user-facing
533
+ # error message should be localized and sent in the google.rpc.Status.details
534
+ # field, or localized by the client.
535
+ # Corresponds to the JSON property `message`
536
+ # @return [String]
537
+ attr_accessor :message
538
+
539
+ def initialize(**args)
540
+ update!(**args)
541
+ end
542
+
543
+ # Update properties of this object
544
+ def update!(**args)
545
+ @code = args[:code] if args.key?(:code)
546
+ @details = args[:details] if args.key?(:details)
547
+ @message = args[:message] if args.key?(:message)
548
+ end
549
+ end
550
+
551
+ # Represents a whole or partial calendar date, such as a birthday. The time of
552
+ # day and time zone are either specified elsewhere or are insignificant. The
553
+ # date is relative to the Gregorian Calendar. This can represent one of the
554
+ # following: * A full date, with non-zero year, month, and day values. * A month
555
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
556
+ # with a zero month and a zero day. * A year and month, with a zero day (for
557
+ # example, a credit card expiration date). Related types: * google.type.
558
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
559
+ class GoogleTypeDate
560
+ include Google::Apis::Core::Hashable
561
+
562
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
563
+ # specify a year by itself or a year and month where the day isn't significant.
564
+ # Corresponds to the JSON property `day`
565
+ # @return [Fixnum]
566
+ attr_accessor :day
567
+
568
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
569
+ # and day.
570
+ # Corresponds to the JSON property `month`
571
+ # @return [Fixnum]
572
+ attr_accessor :month
573
+
574
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
575
+ # year.
576
+ # Corresponds to the JSON property `year`
577
+ # @return [Fixnum]
578
+ attr_accessor :year
579
+
580
+ def initialize(**args)
581
+ update!(**args)
582
+ end
583
+
584
+ # Update properties of this object
585
+ def update!(**args)
586
+ @day = args[:day] if args.key?(:day)
587
+ @month = args[:month] if args.key?(:month)
588
+ @year = args[:year] if args.key?(:year)
589
+ end
590
+ end
591
+
592
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
593
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
594
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
595
+ # "Summary size limit" description: "Determines if a summary is less than 100
596
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
597
+ # Requestor is owner" description: "Determines if requestor is the document
598
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
599
+ # Logic): title: "Public documents" description: "Determine whether the document
600
+ # should be publicly visible" expression: "document.type != 'private' &&
601
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
602
+ # string" description: "Create a notification string with a timestamp."
603
+ # expression: "'New message received at ' + string(document.create_time)" The
604
+ # exact variables and functions that may be referenced within an expression are
605
+ # determined by the service that evaluates it. See the service documentation for
606
+ # additional information.
607
+ class GoogleTypeExpr
608
+ include Google::Apis::Core::Hashable
609
+
610
+ # Optional. Description of the expression. This is a longer text which describes
611
+ # the expression, e.g. when hovered over it in a UI.
612
+ # Corresponds to the JSON property `description`
613
+ # @return [String]
614
+ attr_accessor :description
615
+
616
+ # Textual representation of an expression in Common Expression Language syntax.
617
+ # Corresponds to the JSON property `expression`
618
+ # @return [String]
619
+ attr_accessor :expression
620
+
621
+ # Optional. String indicating the location of the expression for error reporting,
622
+ # e.g. a file name and a position in the file.
623
+ # Corresponds to the JSON property `location`
624
+ # @return [String]
625
+ attr_accessor :location
626
+
627
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
628
+ # This can be used e.g. in UIs which allow to enter the expression.
629
+ # Corresponds to the JSON property `title`
630
+ # @return [String]
631
+ attr_accessor :title
632
+
633
+ def initialize(**args)
634
+ update!(**args)
635
+ end
636
+
637
+ # Update properties of this object
638
+ def update!(**args)
639
+ @description = args[:description] if args.key?(:description)
640
+ @expression = args[:expression] if args.key?(:expression)
641
+ @location = args[:location] if args.key?(:location)
642
+ @title = args[:title] if args.key?(:title)
643
+ end
644
+ end
645
+ end
646
+ end
647
+ end
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module PolicysimulatorV1beta
18
+ # Version of the google-apis-policysimulator_v1beta gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.12.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20230312"
26
+ end
27
+ end
28
+ end