google-apis-backupdr_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,883 @@
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 BackupdrV1
24
+
25
+ # Specifies the audit configuration for a service. The configuration determines
26
+ # which permission types are logged, and what identities, if any, are exempted
27
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
28
+ # are AuditConfigs for both `allServices` and a specific service, the union of
29
+ # the two AuditConfigs is used for that service: the log_types specified in each
30
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
31
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
32
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
33
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
34
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
35
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
36
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
37
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
38
+ # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
39
+ # from DATA_WRITE logging.
40
+ class AuditConfig
41
+ include Google::Apis::Core::Hashable
42
+
43
+ # The configuration for logging of each type of permission.
44
+ # Corresponds to the JSON property `auditLogConfigs`
45
+ # @return [Array<Google::Apis::BackupdrV1::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::BackupdrV1::Expr]
117
+ attr_accessor :condition
118
+
119
+ # Specifies the principals requesting access for a Google Cloud resource. `
120
+ # members` can have the following values: * `allUsers`: A special identifier
121
+ # that represents anyone who is on the internet; with or without a Google
122
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
123
+ # anyone who is authenticated with a Google account or a service account. Does
124
+ # not include identities that come from external identity providers (IdPs)
125
+ # through identity federation. * `user:`emailid``: An email address that
126
+ # represents a specific Google account. For example, `alice@example.com` . * `
127
+ # serviceAccount:`emailid``: An email address that represents a Google service
128
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
129
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
130
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
131
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
132
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
133
+ # email address that represents a Google group. For example, `admins@example.com`
134
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
135
+ # users of that domain. For example, `google.com` or `example.com`. * `deleted:
136
+ # user:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
137
+ # representing a user that has been recently deleted. For example, `alice@
138
+ # example.com?uid=123456789012345678901`. If the user is recovered, this value
139
+ # reverts to `user:`emailid`` and the recovered user retains the role in the
140
+ # binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address
141
+ # (plus unique identifier) representing a service account that has been recently
142
+ # deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
143
+ # 123456789012345678901`. If the service account is undeleted, this value
144
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
145
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
146
+ # An email address (plus unique identifier) representing a Google group that has
147
+ # been recently deleted. For example, `admins@example.com?uid=
148
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
149
+ # group:`emailid`` and the recovered group retains the role in the binding.
150
+ # Corresponds to the JSON property `members`
151
+ # @return [Array<String>]
152
+ attr_accessor :members
153
+
154
+ # Role that is assigned to the list of `members`, or principals. For example, `
155
+ # roles/viewer`, `roles/editor`, or `roles/owner`.
156
+ # Corresponds to the JSON property `role`
157
+ # @return [String]
158
+ attr_accessor :role
159
+
160
+ def initialize(**args)
161
+ update!(**args)
162
+ end
163
+
164
+ # Update properties of this object
165
+ def update!(**args)
166
+ @condition = args[:condition] if args.key?(:condition)
167
+ @members = args[:members] if args.key?(:members)
168
+ @role = args[:role] if args.key?(:role)
169
+ end
170
+ end
171
+
172
+ # The request message for Operations.CancelOperation.
173
+ class CancelOperationRequest
174
+ include Google::Apis::Core::Hashable
175
+
176
+ def initialize(**args)
177
+ update!(**args)
178
+ end
179
+
180
+ # Update properties of this object
181
+ def update!(**args)
182
+ end
183
+ end
184
+
185
+ # A generic empty message that you can re-use to avoid defining duplicated empty
186
+ # messages in your APIs. A typical example is to use it as the request or the
187
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
188
+ # protobuf.Empty) returns (google.protobuf.Empty); `
189
+ class Empty
190
+ include Google::Apis::Core::Hashable
191
+
192
+ def initialize(**args)
193
+ update!(**args)
194
+ end
195
+
196
+ # Update properties of this object
197
+ def update!(**args)
198
+ end
199
+ end
200
+
201
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
202
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
203
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
204
+ # "Summary size limit" description: "Determines if a summary is less than 100
205
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
206
+ # Requestor is owner" description: "Determines if requestor is the document
207
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
208
+ # Logic): title: "Public documents" description: "Determine whether the document
209
+ # should be publicly visible" expression: "document.type != 'private' &&
210
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
211
+ # string" description: "Create a notification string with a timestamp."
212
+ # expression: "'New message received at ' + string(document.create_time)" The
213
+ # exact variables and functions that may be referenced within an expression are
214
+ # determined by the service that evaluates it. See the service documentation for
215
+ # additional information.
216
+ class Expr
217
+ include Google::Apis::Core::Hashable
218
+
219
+ # Optional. Description of the expression. This is a longer text which describes
220
+ # the expression, e.g. when hovered over it in a UI.
221
+ # Corresponds to the JSON property `description`
222
+ # @return [String]
223
+ attr_accessor :description
224
+
225
+ # Textual representation of an expression in Common Expression Language syntax.
226
+ # Corresponds to the JSON property `expression`
227
+ # @return [String]
228
+ attr_accessor :expression
229
+
230
+ # Optional. String indicating the location of the expression for error reporting,
231
+ # e.g. a file name and a position in the file.
232
+ # Corresponds to the JSON property `location`
233
+ # @return [String]
234
+ attr_accessor :location
235
+
236
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
237
+ # This can be used e.g. in UIs which allow to enter the expression.
238
+ # Corresponds to the JSON property `title`
239
+ # @return [String]
240
+ attr_accessor :title
241
+
242
+ def initialize(**args)
243
+ update!(**args)
244
+ end
245
+
246
+ # Update properties of this object
247
+ def update!(**args)
248
+ @description = args[:description] if args.key?(:description)
249
+ @expression = args[:expression] if args.key?(:expression)
250
+ @location = args[:location] if args.key?(:location)
251
+ @title = args[:title] if args.key?(:title)
252
+ end
253
+ end
254
+
255
+ # The response message for Locations.ListLocations.
256
+ class ListLocationsResponse
257
+ include Google::Apis::Core::Hashable
258
+
259
+ # A list of locations that matches the specified filter in the request.
260
+ # Corresponds to the JSON property `locations`
261
+ # @return [Array<Google::Apis::BackupdrV1::Location>]
262
+ attr_accessor :locations
263
+
264
+ # The standard List next-page token.
265
+ # Corresponds to the JSON property `nextPageToken`
266
+ # @return [String]
267
+ attr_accessor :next_page_token
268
+
269
+ def initialize(**args)
270
+ update!(**args)
271
+ end
272
+
273
+ # Update properties of this object
274
+ def update!(**args)
275
+ @locations = args[:locations] if args.key?(:locations)
276
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
277
+ end
278
+ end
279
+
280
+ # Response message for listing management servers.
281
+ class ListManagementServersResponse
282
+ include Google::Apis::Core::Hashable
283
+
284
+ # The list of ManagementServer instances in the project for the specified
285
+ # location. If the ``location`` value in the request is "-", the response
286
+ # contains a list of instances from all locations. In case any location is
287
+ # unreachable, the response will only return management servers in reachable
288
+ # locations and the 'unreachable' field will be populated with a list of
289
+ # unreachable locations.
290
+ # Corresponds to the JSON property `managementServers`
291
+ # @return [Array<Google::Apis::BackupdrV1::ManagementServer>]
292
+ attr_accessor :management_servers
293
+
294
+ # A token identifying a page of results the server should return.
295
+ # Corresponds to the JSON property `nextPageToken`
296
+ # @return [String]
297
+ attr_accessor :next_page_token
298
+
299
+ # Locations that could not be reached.
300
+ # Corresponds to the JSON property `unreachable`
301
+ # @return [Array<String>]
302
+ attr_accessor :unreachable
303
+
304
+ def initialize(**args)
305
+ update!(**args)
306
+ end
307
+
308
+ # Update properties of this object
309
+ def update!(**args)
310
+ @management_servers = args[:management_servers] if args.key?(:management_servers)
311
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
312
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
313
+ end
314
+ end
315
+
316
+ # The response message for Operations.ListOperations.
317
+ class ListOperationsResponse
318
+ include Google::Apis::Core::Hashable
319
+
320
+ # The standard List next-page token.
321
+ # Corresponds to the JSON property `nextPageToken`
322
+ # @return [String]
323
+ attr_accessor :next_page_token
324
+
325
+ # A list of operations that matches the specified filter in the request.
326
+ # Corresponds to the JSON property `operations`
327
+ # @return [Array<Google::Apis::BackupdrV1::Operation>]
328
+ attr_accessor :operations
329
+
330
+ def initialize(**args)
331
+ update!(**args)
332
+ end
333
+
334
+ # Update properties of this object
335
+ def update!(**args)
336
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
337
+ @operations = args[:operations] if args.key?(:operations)
338
+ end
339
+ end
340
+
341
+ # A resource that represents a Google Cloud location.
342
+ class Location
343
+ include Google::Apis::Core::Hashable
344
+
345
+ # The friendly name for this location, typically a nearby city name. For example,
346
+ # "Tokyo".
347
+ # Corresponds to the JSON property `displayName`
348
+ # @return [String]
349
+ attr_accessor :display_name
350
+
351
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
352
+ # region": "us-east1"`
353
+ # Corresponds to the JSON property `labels`
354
+ # @return [Hash<String,String>]
355
+ attr_accessor :labels
356
+
357
+ # The canonical id for this location. For example: `"us-east1"`.
358
+ # Corresponds to the JSON property `locationId`
359
+ # @return [String]
360
+ attr_accessor :location_id
361
+
362
+ # Service-specific metadata. For example the available capacity at the given
363
+ # location.
364
+ # Corresponds to the JSON property `metadata`
365
+ # @return [Hash<String,Object>]
366
+ attr_accessor :metadata
367
+
368
+ # Resource name for the location, which may vary between implementations. For
369
+ # example: `"projects/example-project/locations/us-east1"`
370
+ # Corresponds to the JSON property `name`
371
+ # @return [String]
372
+ attr_accessor :name
373
+
374
+ def initialize(**args)
375
+ update!(**args)
376
+ end
377
+
378
+ # Update properties of this object
379
+ def update!(**args)
380
+ @display_name = args[:display_name] if args.key?(:display_name)
381
+ @labels = args[:labels] if args.key?(:labels)
382
+ @location_id = args[:location_id] if args.key?(:location_id)
383
+ @metadata = args[:metadata] if args.key?(:metadata)
384
+ @name = args[:name] if args.key?(:name)
385
+ end
386
+ end
387
+
388
+ # ManagementServer describes a single BackupDR ManagementServer instance.
389
+ class ManagementServer
390
+ include Google::Apis::Core::Hashable
391
+
392
+ # Output only. The time when the instance was created.
393
+ # Corresponds to the JSON property `createTime`
394
+ # @return [String]
395
+ attr_accessor :create_time
396
+
397
+ # Optional. The description of the ManagementServer instance (2048 characters or
398
+ # less).
399
+ # Corresponds to the JSON property `description`
400
+ # @return [String]
401
+ attr_accessor :description
402
+
403
+ # Optional. Server specified ETag for the ManagementServer resource to prevent
404
+ # simultaneous updates from overwiting each other.
405
+ # Corresponds to the JSON property `etag`
406
+ # @return [String]
407
+ attr_accessor :etag
408
+
409
+ # Optional. Resource labels to represent user provided metadata. Labels
410
+ # currently defined: 1. migrate_from_go= If set to true, the MS is created in
411
+ # migration ready mode.
412
+ # Corresponds to the JSON property `labels`
413
+ # @return [Hash<String,String>]
414
+ attr_accessor :labels
415
+
416
+ # ManagementURI for the Management Server resource.
417
+ # Corresponds to the JSON property `managementUri`
418
+ # @return [Google::Apis::BackupdrV1::ManagementUri]
419
+ attr_accessor :management_uri
420
+
421
+ # Output only. The resource name.
422
+ # Corresponds to the JSON property `name`
423
+ # @return [String]
424
+ attr_accessor :name
425
+
426
+ # Required. VPC networks to which the ManagementServer instance is connected.
427
+ # For this version, only a single network is supported.
428
+ # Corresponds to the JSON property `networks`
429
+ # @return [Array<Google::Apis::BackupdrV1::NetworkConfig>]
430
+ attr_accessor :networks
431
+
432
+ # Output only. The OAuth 2.0 client id is required to make API calls to the
433
+ # BackupDR instance API of this ManagementServer. This is the value that should
434
+ # be provided in the ‘aud’ field of the OIDC ID Token (see openid specification
435
+ # https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
436
+ # Corresponds to the JSON property `oauth2ClientId`
437
+ # @return [String]
438
+ attr_accessor :oauth2_client_id
439
+
440
+ # Output only. The ManagementServer state.
441
+ # Corresponds to the JSON property `state`
442
+ # @return [String]
443
+ attr_accessor :state
444
+
445
+ # Required. The type of the ManagementServer resource.
446
+ # Corresponds to the JSON property `type`
447
+ # @return [String]
448
+ attr_accessor :type
449
+
450
+ # Output only. The time when the instance was updated.
451
+ # Corresponds to the JSON property `updateTime`
452
+ # @return [String]
453
+ attr_accessor :update_time
454
+
455
+ def initialize(**args)
456
+ update!(**args)
457
+ end
458
+
459
+ # Update properties of this object
460
+ def update!(**args)
461
+ @create_time = args[:create_time] if args.key?(:create_time)
462
+ @description = args[:description] if args.key?(:description)
463
+ @etag = args[:etag] if args.key?(:etag)
464
+ @labels = args[:labels] if args.key?(:labels)
465
+ @management_uri = args[:management_uri] if args.key?(:management_uri)
466
+ @name = args[:name] if args.key?(:name)
467
+ @networks = args[:networks] if args.key?(:networks)
468
+ @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id)
469
+ @state = args[:state] if args.key?(:state)
470
+ @type = args[:type] if args.key?(:type)
471
+ @update_time = args[:update_time] if args.key?(:update_time)
472
+ end
473
+ end
474
+
475
+ # ManagementURI for the Management Server resource.
476
+ class ManagementUri
477
+ include Google::Apis::Core::Hashable
478
+
479
+ # Output only. The ManagementServer AGM/RD API URL.
480
+ # Corresponds to the JSON property `api`
481
+ # @return [String]
482
+ attr_accessor :api
483
+
484
+ # Output only. The ManagementServer AGM/RD WebUI URL.
485
+ # Corresponds to the JSON property `webUi`
486
+ # @return [String]
487
+ attr_accessor :web_ui
488
+
489
+ def initialize(**args)
490
+ update!(**args)
491
+ end
492
+
493
+ # Update properties of this object
494
+ def update!(**args)
495
+ @api = args[:api] if args.key?(:api)
496
+ @web_ui = args[:web_ui] if args.key?(:web_ui)
497
+ end
498
+ end
499
+
500
+ # Network configuration for ManagementServer instance.
501
+ class NetworkConfig
502
+ include Google::Apis::Core::Hashable
503
+
504
+ # Optional. The resource name of the Google Compute Engine VPC network to which
505
+ # the ManagementServer instance is connected.
506
+ # Corresponds to the JSON property `network`
507
+ # @return [String]
508
+ attr_accessor :network
509
+
510
+ # Optional. The network connect mode of the ManagementServer instance. For this
511
+ # version, only PRIVATE_SERVICE_ACCESS is supported.
512
+ # Corresponds to the JSON property `peeringMode`
513
+ # @return [String]
514
+ attr_accessor :peering_mode
515
+
516
+ def initialize(**args)
517
+ update!(**args)
518
+ end
519
+
520
+ # Update properties of this object
521
+ def update!(**args)
522
+ @network = args[:network] if args.key?(:network)
523
+ @peering_mode = args[:peering_mode] if args.key?(:peering_mode)
524
+ end
525
+ end
526
+
527
+ # This resource represents a long-running operation that is the result of a
528
+ # network API call.
529
+ class Operation
530
+ include Google::Apis::Core::Hashable
531
+
532
+ # If the value is `false`, it means the operation is still in progress. If `true`
533
+ # , the operation is completed, and either `error` or `response` is available.
534
+ # Corresponds to the JSON property `done`
535
+ # @return [Boolean]
536
+ attr_accessor :done
537
+ alias_method :done?, :done
538
+
539
+ # The `Status` type defines a logical error model that is suitable for different
540
+ # programming environments, including REST APIs and RPC APIs. It is used by [
541
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
542
+ # data: error code, error message, and error details. You can find out more
543
+ # about this error model and how to work with it in the [API Design Guide](https:
544
+ # //cloud.google.com/apis/design/errors).
545
+ # Corresponds to the JSON property `error`
546
+ # @return [Google::Apis::BackupdrV1::Status]
547
+ attr_accessor :error
548
+
549
+ # Service-specific metadata associated with the operation. It typically contains
550
+ # progress information and common metadata such as create time. Some services
551
+ # might not provide such metadata. Any method that returns a long-running
552
+ # operation should document the metadata type, if any.
553
+ # Corresponds to the JSON property `metadata`
554
+ # @return [Hash<String,Object>]
555
+ attr_accessor :metadata
556
+
557
+ # The server-assigned name, which is only unique within the same service that
558
+ # originally returns it. If you use the default HTTP mapping, the `name` should
559
+ # be a resource name ending with `operations/`unique_id``.
560
+ # Corresponds to the JSON property `name`
561
+ # @return [String]
562
+ attr_accessor :name
563
+
564
+ # The normal, successful response of the operation. If the original method
565
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
566
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
567
+ # response should be the resource. For other methods, the response should have
568
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
569
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
570
+ # `TakeSnapshotResponse`.
571
+ # Corresponds to the JSON property `response`
572
+ # @return [Hash<String,Object>]
573
+ attr_accessor :response
574
+
575
+ def initialize(**args)
576
+ update!(**args)
577
+ end
578
+
579
+ # Update properties of this object
580
+ def update!(**args)
581
+ @done = args[:done] if args.key?(:done)
582
+ @error = args[:error] if args.key?(:error)
583
+ @metadata = args[:metadata] if args.key?(:metadata)
584
+ @name = args[:name] if args.key?(:name)
585
+ @response = args[:response] if args.key?(:response)
586
+ end
587
+ end
588
+
589
+ # Represents the metadata of the long-running operation.
590
+ class OperationMetadata
591
+ include Google::Apis::Core::Hashable
592
+
593
+ # Output only. AdditionalInfo contains additional Info related to backup plan
594
+ # association resource.
595
+ # Corresponds to the JSON property `additionalInfo`
596
+ # @return [Hash<String,String>]
597
+ attr_accessor :additional_info
598
+
599
+ # Output only. API version used to start the operation.
600
+ # Corresponds to the JSON property `apiVersion`
601
+ # @return [String]
602
+ attr_accessor :api_version
603
+
604
+ # Output only. The time the operation was created.
605
+ # Corresponds to the JSON property `createTime`
606
+ # @return [String]
607
+ attr_accessor :create_time
608
+
609
+ # Output only. The time the operation finished running.
610
+ # Corresponds to the JSON property `endTime`
611
+ # @return [String]
612
+ attr_accessor :end_time
613
+
614
+ # Output only. Identifies whether the user has requested cancellation of the
615
+ # operation. Operations that have successfully been cancelled have Operation.
616
+ # error value with a google.rpc.Status.code of 1, corresponding to `Code.
617
+ # CANCELLED`.
618
+ # Corresponds to the JSON property `requestedCancellation`
619
+ # @return [Boolean]
620
+ attr_accessor :requested_cancellation
621
+ alias_method :requested_cancellation?, :requested_cancellation
622
+
623
+ # Output only. Human-readable status of the operation, if any.
624
+ # Corresponds to the JSON property `statusMessage`
625
+ # @return [String]
626
+ attr_accessor :status_message
627
+
628
+ # Output only. Server-defined resource path for the target of the operation.
629
+ # Corresponds to the JSON property `target`
630
+ # @return [String]
631
+ attr_accessor :target
632
+
633
+ # Output only. Name of the verb executed by the operation.
634
+ # Corresponds to the JSON property `verb`
635
+ # @return [String]
636
+ attr_accessor :verb
637
+
638
+ def initialize(**args)
639
+ update!(**args)
640
+ end
641
+
642
+ # Update properties of this object
643
+ def update!(**args)
644
+ @additional_info = args[:additional_info] if args.key?(:additional_info)
645
+ @api_version = args[:api_version] if args.key?(:api_version)
646
+ @create_time = args[:create_time] if args.key?(:create_time)
647
+ @end_time = args[:end_time] if args.key?(:end_time)
648
+ @requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
649
+ @status_message = args[:status_message] if args.key?(:status_message)
650
+ @target = args[:target] if args.key?(:target)
651
+ @verb = args[:verb] if args.key?(:verb)
652
+ end
653
+ end
654
+
655
+ # An Identity and Access Management (IAM) policy, which specifies access
656
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
657
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
658
+ # Principals can be user accounts, service accounts, Google groups, and domains (
659
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
660
+ # an IAM predefined role or a user-created custom role. For some types of Google
661
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
662
+ # logical expression that allows access to a resource only if the expression
663
+ # evaluates to `true`. A condition can add constraints based on attributes of
664
+ # the request, the resource, or both. To learn which resources support
665
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
666
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
667
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
668
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
669
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
670
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
671
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
672
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
673
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
674
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
675
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
676
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
677
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
678
+ # title: expirable access description: Does not grant access after Sep 2020
679
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
680
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
681
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
682
+ class Policy
683
+ include Google::Apis::Core::Hashable
684
+
685
+ # Specifies cloud audit logging configuration for this policy.
686
+ # Corresponds to the JSON property `auditConfigs`
687
+ # @return [Array<Google::Apis::BackupdrV1::AuditConfig>]
688
+ attr_accessor :audit_configs
689
+
690
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
691
+ # specify a `condition` that determines how and when the `bindings` are applied.
692
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
693
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
694
+ # can be Google groups. Each occurrence of a principal counts towards these
695
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
696
+ # example.com`, and not to any other principal, then you can add another 1,450
697
+ # principals to the `bindings` in the `Policy`.
698
+ # Corresponds to the JSON property `bindings`
699
+ # @return [Array<Google::Apis::BackupdrV1::Binding>]
700
+ attr_accessor :bindings
701
+
702
+ # `etag` is used for optimistic concurrency control as a way to help prevent
703
+ # simultaneous updates of a policy from overwriting each other. It is strongly
704
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
705
+ # to perform policy updates in order to avoid race conditions: An `etag` is
706
+ # returned in the response to `getIamPolicy`, and systems are expected to put
707
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
708
+ # applied to the same version of the policy. **Important:** If you use IAM
709
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
710
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
711
+ # with a version `1` policy, and all of the conditions in the version `3` policy
712
+ # are lost.
713
+ # Corresponds to the JSON property `etag`
714
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
715
+ # @return [String]
716
+ attr_accessor :etag
717
+
718
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
719
+ # Requests that specify an invalid value are rejected. Any operation that
720
+ # affects conditional role bindings must specify version `3`. This requirement
721
+ # applies to the following operations: * Getting a policy that includes a
722
+ # conditional role binding * Adding a conditional role binding to a policy *
723
+ # Changing a conditional role binding in a policy * Removing any role binding,
724
+ # with or without a condition, from a policy that includes conditions **
725
+ # Important:** If you use IAM Conditions, you must include the `etag` field
726
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
727
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
728
+ # conditions in the version `3` policy are lost. If a policy does not include
729
+ # any conditions, operations on that policy may specify any valid version or
730
+ # leave the field unset. To learn which resources support conditions in their
731
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
732
+ # conditions/resource-policies).
733
+ # Corresponds to the JSON property `version`
734
+ # @return [Fixnum]
735
+ attr_accessor :version
736
+
737
+ def initialize(**args)
738
+ update!(**args)
739
+ end
740
+
741
+ # Update properties of this object
742
+ def update!(**args)
743
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
744
+ @bindings = args[:bindings] if args.key?(:bindings)
745
+ @etag = args[:etag] if args.key?(:etag)
746
+ @version = args[:version] if args.key?(:version)
747
+ end
748
+ end
749
+
750
+ # Request message for `SetIamPolicy` method.
751
+ class SetIamPolicyRequest
752
+ include Google::Apis::Core::Hashable
753
+
754
+ # An Identity and Access Management (IAM) policy, which specifies access
755
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
756
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
757
+ # Principals can be user accounts, service accounts, Google groups, and domains (
758
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
759
+ # an IAM predefined role or a user-created custom role. For some types of Google
760
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
761
+ # logical expression that allows access to a resource only if the expression
762
+ # evaluates to `true`. A condition can add constraints based on attributes of
763
+ # the request, the resource, or both. To learn which resources support
764
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
765
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
766
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
767
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
768
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
769
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
770
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
771
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
772
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
773
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
774
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
775
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
776
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
777
+ # title: expirable access description: Does not grant access after Sep 2020
778
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
779
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
780
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
781
+ # Corresponds to the JSON property `policy`
782
+ # @return [Google::Apis::BackupdrV1::Policy]
783
+ attr_accessor :policy
784
+
785
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
786
+ # the fields in the mask will be modified. If no mask is provided, the following
787
+ # default mask is used: `paths: "bindings, etag"`
788
+ # Corresponds to the JSON property `updateMask`
789
+ # @return [String]
790
+ attr_accessor :update_mask
791
+
792
+ def initialize(**args)
793
+ update!(**args)
794
+ end
795
+
796
+ # Update properties of this object
797
+ def update!(**args)
798
+ @policy = args[:policy] if args.key?(:policy)
799
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
800
+ end
801
+ end
802
+
803
+ # The `Status` type defines a logical error model that is suitable for different
804
+ # programming environments, including REST APIs and RPC APIs. It is used by [
805
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
806
+ # data: error code, error message, and error details. You can find out more
807
+ # about this error model and how to work with it in the [API Design Guide](https:
808
+ # //cloud.google.com/apis/design/errors).
809
+ class Status
810
+ include Google::Apis::Core::Hashable
811
+
812
+ # The status code, which should be an enum value of google.rpc.Code.
813
+ # Corresponds to the JSON property `code`
814
+ # @return [Fixnum]
815
+ attr_accessor :code
816
+
817
+ # A list of messages that carry the error details. There is a common set of
818
+ # message types for APIs to use.
819
+ # Corresponds to the JSON property `details`
820
+ # @return [Array<Hash<String,Object>>]
821
+ attr_accessor :details
822
+
823
+ # A developer-facing error message, which should be in English. Any user-facing
824
+ # error message should be localized and sent in the google.rpc.Status.details
825
+ # field, or localized by the client.
826
+ # Corresponds to the JSON property `message`
827
+ # @return [String]
828
+ attr_accessor :message
829
+
830
+ def initialize(**args)
831
+ update!(**args)
832
+ end
833
+
834
+ # Update properties of this object
835
+ def update!(**args)
836
+ @code = args[:code] if args.key?(:code)
837
+ @details = args[:details] if args.key?(:details)
838
+ @message = args[:message] if args.key?(:message)
839
+ end
840
+ end
841
+
842
+ # Request message for `TestIamPermissions` method.
843
+ class TestIamPermissionsRequest
844
+ include Google::Apis::Core::Hashable
845
+
846
+ # The set of permissions to check for the `resource`. Permissions with wildcards
847
+ # (such as `*` or `storage.*`) are not allowed. For more information see [IAM
848
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
849
+ # Corresponds to the JSON property `permissions`
850
+ # @return [Array<String>]
851
+ attr_accessor :permissions
852
+
853
+ def initialize(**args)
854
+ update!(**args)
855
+ end
856
+
857
+ # Update properties of this object
858
+ def update!(**args)
859
+ @permissions = args[:permissions] if args.key?(:permissions)
860
+ end
861
+ end
862
+
863
+ # Response message for `TestIamPermissions` method.
864
+ class TestIamPermissionsResponse
865
+ include Google::Apis::Core::Hashable
866
+
867
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
868
+ # Corresponds to the JSON property `permissions`
869
+ # @return [Array<String>]
870
+ attr_accessor :permissions
871
+
872
+ def initialize(**args)
873
+ update!(**args)
874
+ end
875
+
876
+ # Update properties of this object
877
+ def update!(**args)
878
+ @permissions = args[:permissions] if args.key?(:permissions)
879
+ end
880
+ end
881
+ end
882
+ end
883
+ end