google-apis-ids_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,811 @@
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 IdsV1
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::IdsV1::AuditLogConfig>]
46
+ attr_accessor :audit_log_configs
47
+
48
+ # Specifies a service that will be enabled for audit logging. For example, `
49
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
50
+ # value that covers all services.
51
+ # Corresponds to the JSON property `service`
52
+ # @return [String]
53
+ attr_accessor :service
54
+
55
+ def initialize(**args)
56
+ update!(**args)
57
+ end
58
+
59
+ # Update properties of this object
60
+ def update!(**args)
61
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
62
+ @service = args[:service] if args.key?(:service)
63
+ end
64
+ end
65
+
66
+ # Provides the configuration for logging a type of permissions. Example: ` "
67
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
68
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
69
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
70
+ # DATA_READ logging.
71
+ class AuditLogConfig
72
+ include Google::Apis::Core::Hashable
73
+
74
+ # Specifies the identities that do not cause logging for this type of permission.
75
+ # Follows the same format of Binding.members.
76
+ # Corresponds to the JSON property `exemptedMembers`
77
+ # @return [Array<String>]
78
+ attr_accessor :exempted_members
79
+
80
+ # The log type that this config enables.
81
+ # Corresponds to the JSON property `logType`
82
+ # @return [String]
83
+ attr_accessor :log_type
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
92
+ @log_type = args[:log_type] if args.key?(:log_type)
93
+ end
94
+ end
95
+
96
+ # Associates `members`, or principals, with a `role`.
97
+ class Binding
98
+ include Google::Apis::Core::Hashable
99
+
100
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
101
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
102
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
103
+ # "Summary size limit" description: "Determines if a summary is less than 100
104
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
105
+ # Requestor is owner" description: "Determines if requestor is the document
106
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
107
+ # Logic): title: "Public documents" description: "Determine whether the document
108
+ # should be publicly visible" expression: "document.type != 'private' &&
109
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
110
+ # string" description: "Create a notification string with a timestamp."
111
+ # expression: "'New message received at ' + string(document.create_time)" The
112
+ # exact variables and functions that may be referenced within an expression are
113
+ # determined by the service that evaluates it. See the service documentation for
114
+ # additional information.
115
+ # Corresponds to the JSON property `condition`
116
+ # @return [Google::Apis::IdsV1::Expr]
117
+ attr_accessor :condition
118
+
119
+ # Specifies the principals 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 the list of `members`, or principals. For example, `
150
+ # roles/viewer`, `roles/editor`, 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
+ # The request message for Operations.CancelOperation.
168
+ class CancelOperationRequest
169
+ include Google::Apis::Core::Hashable
170
+
171
+ def initialize(**args)
172
+ update!(**args)
173
+ end
174
+
175
+ # Update properties of this object
176
+ def update!(**args)
177
+ end
178
+ end
179
+
180
+ # A generic empty message that you can re-use to avoid defining duplicated empty
181
+ # messages in your APIs. A typical example is to use it as the request or the
182
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
183
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
184
+ # `Empty` is empty JSON object ````.
185
+ class Empty
186
+ include Google::Apis::Core::Hashable
187
+
188
+ def initialize(**args)
189
+ update!(**args)
190
+ end
191
+
192
+ # Update properties of this object
193
+ def update!(**args)
194
+ end
195
+ end
196
+
197
+ # Endpoint describes a single IDS endpoint. It defines a forwarding rule to
198
+ # which packets can be sent for IDS inspection.
199
+ class Endpoint
200
+ include Google::Apis::Core::Hashable
201
+
202
+ # Output only. The create time timestamp.
203
+ # Corresponds to the JSON property `createTime`
204
+ # @return [String]
205
+ attr_accessor :create_time
206
+
207
+ # User-provided description of the endpoint
208
+ # Corresponds to the JSON property `description`
209
+ # @return [String]
210
+ attr_accessor :description
211
+
212
+ # Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule.
213
+ # Corresponds to the JSON property `endpointForwardingRule`
214
+ # @return [String]
215
+ attr_accessor :endpoint_forwarding_rule
216
+
217
+ # Output only. The IP address of the IDS Endpoint's ILB.
218
+ # Corresponds to the JSON property `endpointIp`
219
+ # @return [String]
220
+ attr_accessor :endpoint_ip
221
+
222
+ # The labels of the endpoint.
223
+ # Corresponds to the JSON property `labels`
224
+ # @return [Hash<String,String>]
225
+ attr_accessor :labels
226
+
227
+ # Output only. The name of the endpoint.
228
+ # Corresponds to the JSON property `name`
229
+ # @return [String]
230
+ attr_accessor :name
231
+
232
+ # Required. The fully qualified URL of the network to which the IDS Endpoint is
233
+ # attached.
234
+ # Corresponds to the JSON property `network`
235
+ # @return [String]
236
+ attr_accessor :network
237
+
238
+ # Required. Lowest threat severity that this endpoint will alert on.
239
+ # Corresponds to the JSON property `severity`
240
+ # @return [String]
241
+ attr_accessor :severity
242
+
243
+ # Output only. Current state of the endpoint.
244
+ # Corresponds to the JSON property `state`
245
+ # @return [String]
246
+ attr_accessor :state
247
+
248
+ # Whether the endpoint should report traffic logs in addition to threat logs.
249
+ # Corresponds to the JSON property `trafficLogs`
250
+ # @return [Boolean]
251
+ attr_accessor :traffic_logs
252
+ alias_method :traffic_logs?, :traffic_logs
253
+
254
+ # Output only. The update time timestamp.
255
+ # Corresponds to the JSON property `updateTime`
256
+ # @return [String]
257
+ attr_accessor :update_time
258
+
259
+ def initialize(**args)
260
+ update!(**args)
261
+ end
262
+
263
+ # Update properties of this object
264
+ def update!(**args)
265
+ @create_time = args[:create_time] if args.key?(:create_time)
266
+ @description = args[:description] if args.key?(:description)
267
+ @endpoint_forwarding_rule = args[:endpoint_forwarding_rule] if args.key?(:endpoint_forwarding_rule)
268
+ @endpoint_ip = args[:endpoint_ip] if args.key?(:endpoint_ip)
269
+ @labels = args[:labels] if args.key?(:labels)
270
+ @name = args[:name] if args.key?(:name)
271
+ @network = args[:network] if args.key?(:network)
272
+ @severity = args[:severity] if args.key?(:severity)
273
+ @state = args[:state] if args.key?(:state)
274
+ @traffic_logs = args[:traffic_logs] if args.key?(:traffic_logs)
275
+ @update_time = args[:update_time] if args.key?(:update_time)
276
+ end
277
+ end
278
+
279
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
280
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
281
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
282
+ # "Summary size limit" description: "Determines if a summary is less than 100
283
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
284
+ # Requestor is owner" description: "Determines if requestor is the document
285
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
286
+ # Logic): title: "Public documents" description: "Determine whether the document
287
+ # should be publicly visible" expression: "document.type != 'private' &&
288
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
289
+ # string" description: "Create a notification string with a timestamp."
290
+ # expression: "'New message received at ' + string(document.create_time)" The
291
+ # exact variables and functions that may be referenced within an expression are
292
+ # determined by the service that evaluates it. See the service documentation for
293
+ # additional information.
294
+ class Expr
295
+ include Google::Apis::Core::Hashable
296
+
297
+ # Optional. Description of the expression. This is a longer text which describes
298
+ # the expression, e.g. when hovered over it in a UI.
299
+ # Corresponds to the JSON property `description`
300
+ # @return [String]
301
+ attr_accessor :description
302
+
303
+ # Textual representation of an expression in Common Expression Language syntax.
304
+ # Corresponds to the JSON property `expression`
305
+ # @return [String]
306
+ attr_accessor :expression
307
+
308
+ # Optional. String indicating the location of the expression for error reporting,
309
+ # e.g. a file name and a position in the file.
310
+ # Corresponds to the JSON property `location`
311
+ # @return [String]
312
+ attr_accessor :location
313
+
314
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
315
+ # This can be used e.g. in UIs which allow to enter the expression.
316
+ # Corresponds to the JSON property `title`
317
+ # @return [String]
318
+ attr_accessor :title
319
+
320
+ def initialize(**args)
321
+ update!(**args)
322
+ end
323
+
324
+ # Update properties of this object
325
+ def update!(**args)
326
+ @description = args[:description] if args.key?(:description)
327
+ @expression = args[:expression] if args.key?(:expression)
328
+ @location = args[:location] if args.key?(:location)
329
+ @title = args[:title] if args.key?(:title)
330
+ end
331
+ end
332
+
333
+ #
334
+ class ListEndpointsResponse
335
+ include Google::Apis::Core::Hashable
336
+
337
+ # The list of endpoints response.
338
+ # Corresponds to the JSON property `endpoints`
339
+ # @return [Array<Google::Apis::IdsV1::Endpoint>]
340
+ attr_accessor :endpoints
341
+
342
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
343
+ # field is omitted, there are no subsequent pages.
344
+ # Corresponds to the JSON property `nextPageToken`
345
+ # @return [String]
346
+ attr_accessor :next_page_token
347
+
348
+ # Locations that could not be reached.
349
+ # Corresponds to the JSON property `unreachable`
350
+ # @return [Array<String>]
351
+ attr_accessor :unreachable
352
+
353
+ def initialize(**args)
354
+ update!(**args)
355
+ end
356
+
357
+ # Update properties of this object
358
+ def update!(**args)
359
+ @endpoints = args[:endpoints] if args.key?(:endpoints)
360
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
361
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
362
+ end
363
+ end
364
+
365
+ # The response message for Locations.ListLocations.
366
+ class ListLocationsResponse
367
+ include Google::Apis::Core::Hashable
368
+
369
+ # A list of locations that matches the specified filter in the request.
370
+ # Corresponds to the JSON property `locations`
371
+ # @return [Array<Google::Apis::IdsV1::Location>]
372
+ attr_accessor :locations
373
+
374
+ # The standard List next-page token.
375
+ # Corresponds to the JSON property `nextPageToken`
376
+ # @return [String]
377
+ attr_accessor :next_page_token
378
+
379
+ def initialize(**args)
380
+ update!(**args)
381
+ end
382
+
383
+ # Update properties of this object
384
+ def update!(**args)
385
+ @locations = args[:locations] if args.key?(:locations)
386
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
387
+ end
388
+ end
389
+
390
+ # The response message for Operations.ListOperations.
391
+ class ListOperationsResponse
392
+ include Google::Apis::Core::Hashable
393
+
394
+ # The standard List next-page token.
395
+ # Corresponds to the JSON property `nextPageToken`
396
+ # @return [String]
397
+ attr_accessor :next_page_token
398
+
399
+ # A list of operations that matches the specified filter in the request.
400
+ # Corresponds to the JSON property `operations`
401
+ # @return [Array<Google::Apis::IdsV1::Operation>]
402
+ attr_accessor :operations
403
+
404
+ def initialize(**args)
405
+ update!(**args)
406
+ end
407
+
408
+ # Update properties of this object
409
+ def update!(**args)
410
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
411
+ @operations = args[:operations] if args.key?(:operations)
412
+ end
413
+ end
414
+
415
+ # A resource that represents Google Cloud Platform location.
416
+ class Location
417
+ include Google::Apis::Core::Hashable
418
+
419
+ # The friendly name for this location, typically a nearby city name. For example,
420
+ # "Tokyo".
421
+ # Corresponds to the JSON property `displayName`
422
+ # @return [String]
423
+ attr_accessor :display_name
424
+
425
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
426
+ # region": "us-east1"`
427
+ # Corresponds to the JSON property `labels`
428
+ # @return [Hash<String,String>]
429
+ attr_accessor :labels
430
+
431
+ # The canonical id for this location. For example: `"us-east1"`.
432
+ # Corresponds to the JSON property `locationId`
433
+ # @return [String]
434
+ attr_accessor :location_id
435
+
436
+ # Service-specific metadata. For example the available capacity at the given
437
+ # location.
438
+ # Corresponds to the JSON property `metadata`
439
+ # @return [Hash<String,Object>]
440
+ attr_accessor :metadata
441
+
442
+ # Resource name for the location, which may vary between implementations. For
443
+ # example: `"projects/example-project/locations/us-east1"`
444
+ # Corresponds to the JSON property `name`
445
+ # @return [String]
446
+ attr_accessor :name
447
+
448
+ def initialize(**args)
449
+ update!(**args)
450
+ end
451
+
452
+ # Update properties of this object
453
+ def update!(**args)
454
+ @display_name = args[:display_name] if args.key?(:display_name)
455
+ @labels = args[:labels] if args.key?(:labels)
456
+ @location_id = args[:location_id] if args.key?(:location_id)
457
+ @metadata = args[:metadata] if args.key?(:metadata)
458
+ @name = args[:name] if args.key?(:name)
459
+ end
460
+ end
461
+
462
+ # This resource represents a long-running operation that is the result of a
463
+ # network API call.
464
+ class Operation
465
+ include Google::Apis::Core::Hashable
466
+
467
+ # If the value is `false`, it means the operation is still in progress. If `true`
468
+ # , the operation is completed, and either `error` or `response` is available.
469
+ # Corresponds to the JSON property `done`
470
+ # @return [Boolean]
471
+ attr_accessor :done
472
+ alias_method :done?, :done
473
+
474
+ # The `Status` type defines a logical error model that is suitable for different
475
+ # programming environments, including REST APIs and RPC APIs. It is used by [
476
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
477
+ # data: error code, error message, and error details. You can find out more
478
+ # about this error model and how to work with it in the [API Design Guide](https:
479
+ # //cloud.google.com/apis/design/errors).
480
+ # Corresponds to the JSON property `error`
481
+ # @return [Google::Apis::IdsV1::Status]
482
+ attr_accessor :error
483
+
484
+ # Service-specific metadata associated with the operation. It typically contains
485
+ # progress information and common metadata such as create time. Some services
486
+ # might not provide such metadata. Any method that returns a long-running
487
+ # operation should document the metadata type, if any.
488
+ # Corresponds to the JSON property `metadata`
489
+ # @return [Hash<String,Object>]
490
+ attr_accessor :metadata
491
+
492
+ # The server-assigned name, which is only unique within the same service that
493
+ # originally returns it. If you use the default HTTP mapping, the `name` should
494
+ # be a resource name ending with `operations/`unique_id``.
495
+ # Corresponds to the JSON property `name`
496
+ # @return [String]
497
+ attr_accessor :name
498
+
499
+ # The normal response of the operation in case of success. If the original
500
+ # method returns no data on success, such as `Delete`, the response is `google.
501
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
502
+ # the response should be the resource. For other methods, the response should
503
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
504
+ # example, if the original method name is `TakeSnapshot()`, the inferred
505
+ # response type is `TakeSnapshotResponse`.
506
+ # Corresponds to the JSON property `response`
507
+ # @return [Hash<String,Object>]
508
+ attr_accessor :response
509
+
510
+ def initialize(**args)
511
+ update!(**args)
512
+ end
513
+
514
+ # Update properties of this object
515
+ def update!(**args)
516
+ @done = args[:done] if args.key?(:done)
517
+ @error = args[:error] if args.key?(:error)
518
+ @metadata = args[:metadata] if args.key?(:metadata)
519
+ @name = args[:name] if args.key?(:name)
520
+ @response = args[:response] if args.key?(:response)
521
+ end
522
+ end
523
+
524
+ # Represents the metadata of the long-running operation.
525
+ class OperationMetadata
526
+ include Google::Apis::Core::Hashable
527
+
528
+ # Output only. API version used to start the operation.
529
+ # Corresponds to the JSON property `apiVersion`
530
+ # @return [String]
531
+ attr_accessor :api_version
532
+
533
+ # Output only. The time the operation was created.
534
+ # Corresponds to the JSON property `createTime`
535
+ # @return [String]
536
+ attr_accessor :create_time
537
+
538
+ # Output only. The time the operation finished running.
539
+ # Corresponds to the JSON property `endTime`
540
+ # @return [String]
541
+ attr_accessor :end_time
542
+
543
+ # Output only. Identifies whether the user has requested cancellation of the
544
+ # operation. Operations that have successfully been cancelled have Operation.
545
+ # error value with a google.rpc.Status.code of 1, corresponding to `Code.
546
+ # CANCELLED`.
547
+ # Corresponds to the JSON property `requestedCancellation`
548
+ # @return [Boolean]
549
+ attr_accessor :requested_cancellation
550
+ alias_method :requested_cancellation?, :requested_cancellation
551
+
552
+ # Output only. Human-readable status of the operation, if any.
553
+ # Corresponds to the JSON property `statusMessage`
554
+ # @return [String]
555
+ attr_accessor :status_message
556
+
557
+ # Output only. Server-defined resource path for the target of the operation.
558
+ # Corresponds to the JSON property `target`
559
+ # @return [String]
560
+ attr_accessor :target
561
+
562
+ # Output only. Name of the verb executed by the operation.
563
+ # Corresponds to the JSON property `verb`
564
+ # @return [String]
565
+ attr_accessor :verb
566
+
567
+ def initialize(**args)
568
+ update!(**args)
569
+ end
570
+
571
+ # Update properties of this object
572
+ def update!(**args)
573
+ @api_version = args[:api_version] if args.key?(:api_version)
574
+ @create_time = args[:create_time] if args.key?(:create_time)
575
+ @end_time = args[:end_time] if args.key?(:end_time)
576
+ @requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
577
+ @status_message = args[:status_message] if args.key?(:status_message)
578
+ @target = args[:target] if args.key?(:target)
579
+ @verb = args[:verb] if args.key?(:verb)
580
+ end
581
+ end
582
+
583
+ # An Identity and Access Management (IAM) policy, which specifies access
584
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
585
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
586
+ # Principals can be user accounts, service accounts, Google groups, and domains (
587
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
588
+ # an IAM predefined role or a user-created custom role. For some types of Google
589
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
590
+ # logical expression that allows access to a resource only if the expression
591
+ # evaluates to `true`. A condition can add constraints based on attributes of
592
+ # the request, the resource, or both. To learn which resources support
593
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
594
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
595
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
596
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
597
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
598
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
599
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
600
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
601
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
602
+ # bindings: - members: - user:mike@example.com - group:admins@example.com -
603
+ # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
604
+ # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
605
+ # com role: roles/resourcemanager.organizationViewer condition: title: expirable
606
+ # access description: Does not grant access after Sep 2020 expression: request.
607
+ # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
608
+ # a description of IAM and its features, see the [IAM documentation](https://
609
+ # cloud.google.com/iam/docs/).
610
+ class Policy
611
+ include Google::Apis::Core::Hashable
612
+
613
+ # Specifies cloud audit logging configuration for this policy.
614
+ # Corresponds to the JSON property `auditConfigs`
615
+ # @return [Array<Google::Apis::IdsV1::AuditConfig>]
616
+ attr_accessor :audit_configs
617
+
618
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
619
+ # specify a `condition` that determines how and when the `bindings` are applied.
620
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
621
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
622
+ # can be Google groups. Each occurrence of a principal counts towards these
623
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
624
+ # example.com`, and not to any other principal, then you can add another 1,450
625
+ # principals to the `bindings` in the `Policy`.
626
+ # Corresponds to the JSON property `bindings`
627
+ # @return [Array<Google::Apis::IdsV1::Binding>]
628
+ attr_accessor :bindings
629
+
630
+ # `etag` is used for optimistic concurrency control as a way to help prevent
631
+ # simultaneous updates of a policy from overwriting each other. It is strongly
632
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
633
+ # to perform policy updates in order to avoid race conditions: An `etag` is
634
+ # returned in the response to `getIamPolicy`, and systems are expected to put
635
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
636
+ # applied to the same version of the policy. **Important:** If you use IAM
637
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
638
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
639
+ # with a version `1` policy, and all of the conditions in the version `3` policy
640
+ # are lost.
641
+ # Corresponds to the JSON property `etag`
642
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
643
+ # @return [String]
644
+ attr_accessor :etag
645
+
646
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
647
+ # Requests that specify an invalid value are rejected. Any operation that
648
+ # affects conditional role bindings must specify version `3`. This requirement
649
+ # applies to the following operations: * Getting a policy that includes a
650
+ # conditional role binding * Adding a conditional role binding to a policy *
651
+ # Changing a conditional role binding in a policy * Removing any role binding,
652
+ # with or without a condition, from a policy that includes conditions **
653
+ # Important:** If you use IAM Conditions, you must include the `etag` field
654
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
655
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
656
+ # conditions in the version `3` policy are lost. If a policy does not include
657
+ # any conditions, operations on that policy may specify any valid version or
658
+ # leave the field unset. To learn which resources support conditions in their
659
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
660
+ # conditions/resource-policies).
661
+ # Corresponds to the JSON property `version`
662
+ # @return [Fixnum]
663
+ attr_accessor :version
664
+
665
+ def initialize(**args)
666
+ update!(**args)
667
+ end
668
+
669
+ # Update properties of this object
670
+ def update!(**args)
671
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
672
+ @bindings = args[:bindings] if args.key?(:bindings)
673
+ @etag = args[:etag] if args.key?(:etag)
674
+ @version = args[:version] if args.key?(:version)
675
+ end
676
+ end
677
+
678
+ # Request message for `SetIamPolicy` method.
679
+ class SetIamPolicyRequest
680
+ include Google::Apis::Core::Hashable
681
+
682
+ # An Identity and Access Management (IAM) policy, which specifies access
683
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
684
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
685
+ # Principals can be user accounts, service accounts, Google groups, and domains (
686
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
687
+ # an IAM predefined role or a user-created custom role. For some types of Google
688
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
689
+ # logical expression that allows access to a resource only if the expression
690
+ # evaluates to `true`. A condition can add constraints based on attributes of
691
+ # the request, the resource, or both. To learn which resources support
692
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
693
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
694
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
695
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
696
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
697
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
698
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
699
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
700
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
701
+ # bindings: - members: - user:mike@example.com - group:admins@example.com -
702
+ # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
703
+ # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
704
+ # com role: roles/resourcemanager.organizationViewer condition: title: expirable
705
+ # access description: Does not grant access after Sep 2020 expression: request.
706
+ # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
707
+ # a description of IAM and its features, see the [IAM documentation](https://
708
+ # cloud.google.com/iam/docs/).
709
+ # Corresponds to the JSON property `policy`
710
+ # @return [Google::Apis::IdsV1::Policy]
711
+ attr_accessor :policy
712
+
713
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
714
+ # the fields in the mask will be modified. If no mask is provided, the following
715
+ # default mask is used: `paths: "bindings, etag"`
716
+ # Corresponds to the JSON property `updateMask`
717
+ # @return [String]
718
+ attr_accessor :update_mask
719
+
720
+ def initialize(**args)
721
+ update!(**args)
722
+ end
723
+
724
+ # Update properties of this object
725
+ def update!(**args)
726
+ @policy = args[:policy] if args.key?(:policy)
727
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
728
+ end
729
+ end
730
+
731
+ # The `Status` type defines a logical error model that is suitable for different
732
+ # programming environments, including REST APIs and RPC APIs. It is used by [
733
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
734
+ # data: error code, error message, and error details. You can find out more
735
+ # about this error model and how to work with it in the [API Design Guide](https:
736
+ # //cloud.google.com/apis/design/errors).
737
+ class Status
738
+ include Google::Apis::Core::Hashable
739
+
740
+ # The status code, which should be an enum value of google.rpc.Code.
741
+ # Corresponds to the JSON property `code`
742
+ # @return [Fixnum]
743
+ attr_accessor :code
744
+
745
+ # A list of messages that carry the error details. There is a common set of
746
+ # message types for APIs to use.
747
+ # Corresponds to the JSON property `details`
748
+ # @return [Array<Hash<String,Object>>]
749
+ attr_accessor :details
750
+
751
+ # A developer-facing error message, which should be in English. Any user-facing
752
+ # error message should be localized and sent in the google.rpc.Status.details
753
+ # field, or localized by the client.
754
+ # Corresponds to the JSON property `message`
755
+ # @return [String]
756
+ attr_accessor :message
757
+
758
+ def initialize(**args)
759
+ update!(**args)
760
+ end
761
+
762
+ # Update properties of this object
763
+ def update!(**args)
764
+ @code = args[:code] if args.key?(:code)
765
+ @details = args[:details] if args.key?(:details)
766
+ @message = args[:message] if args.key?(:message)
767
+ end
768
+ end
769
+
770
+ # Request message for `TestIamPermissions` method.
771
+ class TestIamPermissionsRequest
772
+ include Google::Apis::Core::Hashable
773
+
774
+ # The set of permissions to check for the `resource`. Permissions with wildcards
775
+ # (such as '*' or 'storage.*') are not allowed. For more information see [IAM
776
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
777
+ # Corresponds to the JSON property `permissions`
778
+ # @return [Array<String>]
779
+ attr_accessor :permissions
780
+
781
+ def initialize(**args)
782
+ update!(**args)
783
+ end
784
+
785
+ # Update properties of this object
786
+ def update!(**args)
787
+ @permissions = args[:permissions] if args.key?(:permissions)
788
+ end
789
+ end
790
+
791
+ # Response message for `TestIamPermissions` method.
792
+ class TestIamPermissionsResponse
793
+ include Google::Apis::Core::Hashable
794
+
795
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
796
+ # Corresponds to the JSON property `permissions`
797
+ # @return [Array<String>]
798
+ attr_accessor :permissions
799
+
800
+ def initialize(**args)
801
+ update!(**args)
802
+ end
803
+
804
+ # Update properties of this object
805
+ def update!(**args)
806
+ @permissions = args[:permissions] if args.key?(:permissions)
807
+ end
808
+ end
809
+ end
810
+ end
811
+ end