google-apis-alloydb_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2750 @@
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 AlloydbV1
24
+
25
+ # Message describing the user-specified automated backup policy. All fields in
26
+ # the automated backup policy are optional. Defaults for each field are provided
27
+ # if they are not set.
28
+ class AutomatedBackupPolicy
29
+ include Google::Apis::Core::Hashable
30
+
31
+ # The length of the time window during which a backup can be taken. If a backup
32
+ # does not succeed within this time window, it will be canceled and considered
33
+ # failed. The backup window must be at least 5 minutes long. There is no upper
34
+ # bound on the window. If not set, it defaults to 1 hour.
35
+ # Corresponds to the JSON property `backupWindow`
36
+ # @return [String]
37
+ attr_accessor :backup_window
38
+
39
+ # Whether automated automated backups are enabled. If not set, defaults to true.
40
+ # Corresponds to the JSON property `enabled`
41
+ # @return [Boolean]
42
+ attr_accessor :enabled
43
+ alias_method :enabled?, :enabled
44
+
45
+ # EncryptionConfig describes the encryption config of a cluster or a backup that
46
+ # is encrypted with a CMEK (customer-managed encryption key).
47
+ # Corresponds to the JSON property `encryptionConfig`
48
+ # @return [Google::Apis::AlloydbV1::EncryptionConfig]
49
+ attr_accessor :encryption_config
50
+
51
+ # Labels to apply to backups created using this configuration.
52
+ # Corresponds to the JSON property `labels`
53
+ # @return [Hash<String,String>]
54
+ attr_accessor :labels
55
+
56
+ # The location where the backup will be stored. Currently, the only supported
57
+ # option is to store the backup in the same region as the cluster. If empty,
58
+ # defaults to the region of the cluster.
59
+ # Corresponds to the JSON property `location`
60
+ # @return [String]
61
+ attr_accessor :location
62
+
63
+ # A quantity based policy specifies that a certain number of the most recent
64
+ # successful backups should be retained.
65
+ # Corresponds to the JSON property `quantityBasedRetention`
66
+ # @return [Google::Apis::AlloydbV1::QuantityBasedRetention]
67
+ attr_accessor :quantity_based_retention
68
+
69
+ # A time based retention policy specifies that all backups within a certain time
70
+ # period should be retained.
71
+ # Corresponds to the JSON property `timeBasedRetention`
72
+ # @return [Google::Apis::AlloydbV1::TimeBasedRetention]
73
+ attr_accessor :time_based_retention
74
+
75
+ # A weekly schedule starts a backup at prescribed start times within a day, for
76
+ # the specified days of the week. The weekly schedule message is flexible and
77
+ # can be used to create many types of schedules. For example, to have a daily
78
+ # backup that starts at 22:00, configure the `start_times` field to have one
79
+ # element "22:00" and the `days_of_week` field to have all seven days of the
80
+ # week.
81
+ # Corresponds to the JSON property `weeklySchedule`
82
+ # @return [Google::Apis::AlloydbV1::WeeklySchedule]
83
+ attr_accessor :weekly_schedule
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @backup_window = args[:backup_window] if args.key?(:backup_window)
92
+ @enabled = args[:enabled] if args.key?(:enabled)
93
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
94
+ @labels = args[:labels] if args.key?(:labels)
95
+ @location = args[:location] if args.key?(:location)
96
+ @quantity_based_retention = args[:quantity_based_retention] if args.key?(:quantity_based_retention)
97
+ @time_based_retention = args[:time_based_retention] if args.key?(:time_based_retention)
98
+ @weekly_schedule = args[:weekly_schedule] if args.key?(:weekly_schedule)
99
+ end
100
+ end
101
+
102
+ # Message describing Backup object
103
+ class Backup
104
+ include Google::Apis::Core::Hashable
105
+
106
+ # Annotations to allow client tools to store small amount of arbitrary data.
107
+ # This is distinct from labels. https://google.aip.dev/128
108
+ # Corresponds to the JSON property `annotations`
109
+ # @return [Hash<String,String>]
110
+ attr_accessor :annotations
111
+
112
+ # Required. The full resource name of the backup source cluster (e.g., projects/`
113
+ # project`/locations/`region`/clusters/`cluster_id`).
114
+ # Corresponds to the JSON property `clusterName`
115
+ # @return [String]
116
+ attr_accessor :cluster_name
117
+
118
+ # Output only. The system-generated UID of the cluster which was used to create
119
+ # this resource.
120
+ # Corresponds to the JSON property `clusterUid`
121
+ # @return [String]
122
+ attr_accessor :cluster_uid
123
+
124
+ # Output only. Create time stamp
125
+ # Corresponds to the JSON property `createTime`
126
+ # @return [String]
127
+ attr_accessor :create_time
128
+
129
+ # Output only. The database engine major version of the cluster this backup was
130
+ # created from. Any restored cluster created from this backup will have the same
131
+ # database version.
132
+ # Corresponds to the JSON property `databaseVersion`
133
+ # @return [String]
134
+ attr_accessor :database_version
135
+
136
+ # Output only. Delete time stamp
137
+ # Corresponds to the JSON property `deleteTime`
138
+ # @return [String]
139
+ attr_accessor :delete_time
140
+
141
+ # User-provided description of the backup.
142
+ # Corresponds to the JSON property `description`
143
+ # @return [String]
144
+ attr_accessor :description
145
+
146
+ # User-settable and human-readable display name for the Backup.
147
+ # Corresponds to the JSON property `displayName`
148
+ # @return [String]
149
+ attr_accessor :display_name
150
+
151
+ # EncryptionConfig describes the encryption config of a cluster or a backup that
152
+ # is encrypted with a CMEK (customer-managed encryption key).
153
+ # Corresponds to the JSON property `encryptionConfig`
154
+ # @return [Google::Apis::AlloydbV1::EncryptionConfig]
155
+ attr_accessor :encryption_config
156
+
157
+ # EncryptionInfo describes the encryption information of a cluster or a backup.
158
+ # Corresponds to the JSON property `encryptionInfo`
159
+ # @return [Google::Apis::AlloydbV1::EncryptionInfo]
160
+ attr_accessor :encryption_info
161
+
162
+ # For Resource freshness validation (https://google.aip.dev/154)
163
+ # Corresponds to the JSON property `etag`
164
+ # @return [String]
165
+ attr_accessor :etag
166
+
167
+ # A backup's position in a quantity-based retention queue, of backups with the
168
+ # same source cluster and type, with length, retention, specified by the backup'
169
+ # s retention policy. Once the position is greater than the retention, the
170
+ # backup is eligible to be garbage collected. Example: 5 backups from the same
171
+ # source cluster and type with a quantity-based retention of 3 and denoted by
172
+ # backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3),
173
+ # backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)
174
+ # Corresponds to the JSON property `expiryQuantity`
175
+ # @return [Google::Apis::AlloydbV1::QuantityBasedExpiry]
176
+ attr_accessor :expiry_quantity
177
+
178
+ # Output only. The time at which after the backup is eligible to be garbage
179
+ # collected. It is the duration specified by the backup's retention policy,
180
+ # added to the backup's create_time.
181
+ # Corresponds to the JSON property `expiryTime`
182
+ # @return [String]
183
+ attr_accessor :expiry_time
184
+
185
+ # Labels as key value pairs
186
+ # Corresponds to the JSON property `labels`
187
+ # @return [Hash<String,String>]
188
+ attr_accessor :labels
189
+
190
+ # Output only. The name of the backup resource with the format: * projects/`
191
+ # project`/locations/`region`/backups/`backup_id` where the cluster and backup
192
+ # ID segments should satisfy the regex expression `[a-z]([a-z0-9-]`0,61`[a-z0-9])
193
+ # ?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting
194
+ # with a letter, and ending with a letter or number. For more details see https:/
195
+ # /google.aip.dev/122. The prefix of the backup resource name is the name of the
196
+ # parent resource: * projects/`project`/locations/`region`
197
+ # Corresponds to the JSON property `name`
198
+ # @return [String]
199
+ attr_accessor :name
200
+
201
+ # Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true,
202
+ # indicates that the service is actively updating the resource. This can happen
203
+ # due to user-triggered updates or system actions like failover or maintenance.
204
+ # Corresponds to the JSON property `reconciling`
205
+ # @return [Boolean]
206
+ attr_accessor :reconciling
207
+ alias_method :reconciling?, :reconciling
208
+
209
+ # Output only. The size of the backup in bytes.
210
+ # Corresponds to the JSON property `sizeBytes`
211
+ # @return [Fixnum]
212
+ attr_accessor :size_bytes
213
+
214
+ # Output only. The current state of the backup.
215
+ # Corresponds to the JSON property `state`
216
+ # @return [String]
217
+ attr_accessor :state
218
+
219
+ # The backup type, which suggests the trigger for the backup.
220
+ # Corresponds to the JSON property `type`
221
+ # @return [String]
222
+ attr_accessor :type
223
+
224
+ # Output only. The system-generated UID of the resource. The UID is assigned
225
+ # when the resource is created, and it is retained until it is deleted.
226
+ # Corresponds to the JSON property `uid`
227
+ # @return [String]
228
+ attr_accessor :uid
229
+
230
+ # Output only. Update time stamp
231
+ # Corresponds to the JSON property `updateTime`
232
+ # @return [String]
233
+ attr_accessor :update_time
234
+
235
+ def initialize(**args)
236
+ update!(**args)
237
+ end
238
+
239
+ # Update properties of this object
240
+ def update!(**args)
241
+ @annotations = args[:annotations] if args.key?(:annotations)
242
+ @cluster_name = args[:cluster_name] if args.key?(:cluster_name)
243
+ @cluster_uid = args[:cluster_uid] if args.key?(:cluster_uid)
244
+ @create_time = args[:create_time] if args.key?(:create_time)
245
+ @database_version = args[:database_version] if args.key?(:database_version)
246
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
247
+ @description = args[:description] if args.key?(:description)
248
+ @display_name = args[:display_name] if args.key?(:display_name)
249
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
250
+ @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
251
+ @etag = args[:etag] if args.key?(:etag)
252
+ @expiry_quantity = args[:expiry_quantity] if args.key?(:expiry_quantity)
253
+ @expiry_time = args[:expiry_time] if args.key?(:expiry_time)
254
+ @labels = args[:labels] if args.key?(:labels)
255
+ @name = args[:name] if args.key?(:name)
256
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
257
+ @size_bytes = args[:size_bytes] if args.key?(:size_bytes)
258
+ @state = args[:state] if args.key?(:state)
259
+ @type = args[:type] if args.key?(:type)
260
+ @uid = args[:uid] if args.key?(:uid)
261
+ @update_time = args[:update_time] if args.key?(:update_time)
262
+ end
263
+ end
264
+
265
+ # Message describing a BackupSource.
266
+ class BackupSource
267
+ include Google::Apis::Core::Hashable
268
+
269
+ # Required. The name of the backup resource with the format: * projects/`project`
270
+ # /locations/`region`/backups/`backup_id`
271
+ # Corresponds to the JSON property `backupName`
272
+ # @return [String]
273
+ attr_accessor :backup_name
274
+
275
+ # Output only. The system-generated UID of the backup which was used to create
276
+ # this resource. The UID is generated when the backup is created, and it is
277
+ # retained until the backup is deleted.
278
+ # Corresponds to the JSON property `backupUid`
279
+ # @return [String]
280
+ attr_accessor :backup_uid
281
+
282
+ def initialize(**args)
283
+ update!(**args)
284
+ end
285
+
286
+ # Update properties of this object
287
+ def update!(**args)
288
+ @backup_name = args[:backup_name] if args.key?(:backup_name)
289
+ @backup_uid = args[:backup_uid] if args.key?(:backup_uid)
290
+ end
291
+ end
292
+
293
+ # The request message for Operations.CancelOperation.
294
+ class CancelOperationRequest
295
+ include Google::Apis::Core::Hashable
296
+
297
+ def initialize(**args)
298
+ update!(**args)
299
+ end
300
+
301
+ # Update properties of this object
302
+ def update!(**args)
303
+ end
304
+ end
305
+
306
+ # Client connection configuration
307
+ class ClientConnectionConfig
308
+ include Google::Apis::Core::Hashable
309
+
310
+ # Optional. Configuration to enforce connectors only (ex: AuthProxy) connections
311
+ # to the database.
312
+ # Corresponds to the JSON property `requireConnectors`
313
+ # @return [Boolean]
314
+ attr_accessor :require_connectors
315
+ alias_method :require_connectors?, :require_connectors
316
+
317
+ # SSL configuration.
318
+ # Corresponds to the JSON property `sslConfig`
319
+ # @return [Google::Apis::AlloydbV1::SslConfig]
320
+ attr_accessor :ssl_config
321
+
322
+ def initialize(**args)
323
+ update!(**args)
324
+ end
325
+
326
+ # Update properties of this object
327
+ def update!(**args)
328
+ @require_connectors = args[:require_connectors] if args.key?(:require_connectors)
329
+ @ssl_config = args[:ssl_config] if args.key?(:ssl_config)
330
+ end
331
+ end
332
+
333
+ # Operation metadata returned by the CLH during resource state reconciliation.
334
+ class CloudControl2SharedOperationsReconciliationOperationMetadata
335
+ include Google::Apis::Core::Hashable
336
+
337
+ # DEPRECATED. Use exclusive_action instead.
338
+ # Corresponds to the JSON property `deleteResource`
339
+ # @return [Boolean]
340
+ attr_accessor :delete_resource
341
+ alias_method :delete_resource?, :delete_resource
342
+
343
+ # Excluisive action returned by the CLH.
344
+ # Corresponds to the JSON property `exclusiveAction`
345
+ # @return [String]
346
+ attr_accessor :exclusive_action
347
+
348
+ def initialize(**args)
349
+ update!(**args)
350
+ end
351
+
352
+ # Update properties of this object
353
+ def update!(**args)
354
+ @delete_resource = args[:delete_resource] if args.key?(:delete_resource)
355
+ @exclusive_action = args[:exclusive_action] if args.key?(:exclusive_action)
356
+ end
357
+ end
358
+
359
+ # A cluster is a collection of regional AlloyDB resources. It can include a
360
+ # primary instance and one or more read pool instances. All cluster resources
361
+ # share a storage layer, which scales as needed.
362
+ class Cluster
363
+ include Google::Apis::Core::Hashable
364
+
365
+ # Annotations to allow client tools to store small amount of arbitrary data.
366
+ # This is distinct from labels. https://google.aip.dev/128
367
+ # Corresponds to the JSON property `annotations`
368
+ # @return [Hash<String,String>]
369
+ attr_accessor :annotations
370
+
371
+ # Message describing the user-specified automated backup policy. All fields in
372
+ # the automated backup policy are optional. Defaults for each field are provided
373
+ # if they are not set.
374
+ # Corresponds to the JSON property `automatedBackupPolicy`
375
+ # @return [Google::Apis::AlloydbV1::AutomatedBackupPolicy]
376
+ attr_accessor :automated_backup_policy
377
+
378
+ # Message describing a BackupSource.
379
+ # Corresponds to the JSON property `backupSource`
380
+ # @return [Google::Apis::AlloydbV1::BackupSource]
381
+ attr_accessor :backup_source
382
+
383
+ # Output only. The type of the cluster. This is an output-only field and it's
384
+ # populated at the Cluster creation time or the Cluster promotion time. The
385
+ # cluster type is determined by which RPC was used to create the cluster (i.e. `
386
+ # CreateCluster` vs. `CreateSecondaryCluster`
387
+ # Corresponds to the JSON property `clusterType`
388
+ # @return [String]
389
+ attr_accessor :cluster_type
390
+
391
+ # ContinuousBackupConfig describes the continuous backups recovery
392
+ # configurations of a cluster.
393
+ # Corresponds to the JSON property `continuousBackupConfig`
394
+ # @return [Google::Apis::AlloydbV1::ContinuousBackupConfig]
395
+ attr_accessor :continuous_backup_config
396
+
397
+ # ContinuousBackupInfo describes the continuous backup properties of a cluster.
398
+ # Corresponds to the JSON property `continuousBackupInfo`
399
+ # @return [Google::Apis::AlloydbV1::ContinuousBackupInfo]
400
+ attr_accessor :continuous_backup_info
401
+
402
+ # Output only. Create time stamp
403
+ # Corresponds to the JSON property `createTime`
404
+ # @return [String]
405
+ attr_accessor :create_time
406
+
407
+ # Optional. The database engine major version. This is an optional field and it
408
+ # is populated at the Cluster creation time. If a database version is not
409
+ # supplied at cluster creation time, then a default database version will be
410
+ # used.
411
+ # Corresponds to the JSON property `databaseVersion`
412
+ # @return [String]
413
+ attr_accessor :database_version
414
+
415
+ # Output only. Delete time stamp
416
+ # Corresponds to the JSON property `deleteTime`
417
+ # @return [String]
418
+ attr_accessor :delete_time
419
+
420
+ # User-settable and human-readable display name for the Cluster.
421
+ # Corresponds to the JSON property `displayName`
422
+ # @return [String]
423
+ attr_accessor :display_name
424
+
425
+ # EncryptionConfig describes the encryption config of a cluster or a backup that
426
+ # is encrypted with a CMEK (customer-managed encryption key).
427
+ # Corresponds to the JSON property `encryptionConfig`
428
+ # @return [Google::Apis::AlloydbV1::EncryptionConfig]
429
+ attr_accessor :encryption_config
430
+
431
+ # EncryptionInfo describes the encryption information of a cluster or a backup.
432
+ # Corresponds to the JSON property `encryptionInfo`
433
+ # @return [Google::Apis::AlloydbV1::EncryptionInfo]
434
+ attr_accessor :encryption_info
435
+
436
+ # For Resource freshness validation (https://google.aip.dev/154)
437
+ # Corresponds to the JSON property `etag`
438
+ # @return [String]
439
+ attr_accessor :etag
440
+
441
+ # The username/password for a database user. Used for specifying initial users
442
+ # at cluster creation time.
443
+ # Corresponds to the JSON property `initialUser`
444
+ # @return [Google::Apis::AlloydbV1::UserPassword]
445
+ attr_accessor :initial_user
446
+
447
+ # Labels as key value pairs
448
+ # Corresponds to the JSON property `labels`
449
+ # @return [Hash<String,String>]
450
+ attr_accessor :labels
451
+
452
+ # Subset of the source instance configuration that is available when reading the
453
+ # cluster resource.
454
+ # Corresponds to the JSON property `migrationSource`
455
+ # @return [Google::Apis::AlloydbV1::MigrationSource]
456
+ attr_accessor :migration_source
457
+
458
+ # Output only. The name of the cluster resource with the format: * projects/`
459
+ # project`/locations/`region`/clusters/`cluster_id` where the cluster ID segment
460
+ # should satisfy the regex expression `[a-z0-9-]+`. For more details see https://
461
+ # google.aip.dev/122. The prefix of the cluster resource name is the name of the
462
+ # parent resource: * projects/`project`/locations/`region`
463
+ # Corresponds to the JSON property `name`
464
+ # @return [String]
465
+ attr_accessor :name
466
+
467
+ # Required. The resource link for the VPC network in which cluster resources are
468
+ # created and from which they are accessible via Private IP. The network must
469
+ # belong to the same project as the cluster. It is specified in the form: "
470
+ # projects/`project`/global/networks/`network_id`". This is required to create a
471
+ # cluster. Deprecated, use network_config.network instead.
472
+ # Corresponds to the JSON property `network`
473
+ # @return [String]
474
+ attr_accessor :network
475
+
476
+ # Metadata related to network configuration.
477
+ # Corresponds to the JSON property `networkConfig`
478
+ # @return [Google::Apis::AlloydbV1::NetworkConfig]
479
+ attr_accessor :network_config
480
+
481
+ # Configuration for the primary cluster. It has the list of clusters that are
482
+ # replicating from this cluster. This should be set if and only if the cluster
483
+ # is of type PRIMARY.
484
+ # Corresponds to the JSON property `primaryConfig`
485
+ # @return [Google::Apis::AlloydbV1::PrimaryConfig]
486
+ attr_accessor :primary_config
487
+
488
+ # Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to
489
+ # true if the current state of Cluster does not match the user's intended state,
490
+ # and the service is actively updating the resource to reconcile them. This can
491
+ # happen due to user-triggered updates or system actions like failover or
492
+ # maintenance.
493
+ # Corresponds to the JSON property `reconciling`
494
+ # @return [Boolean]
495
+ attr_accessor :reconciling
496
+ alias_method :reconciling?, :reconciling
497
+
498
+ # Configuration information for the secondary cluster. This should be set if and
499
+ # only if the cluster is of type SECONDARY.
500
+ # Corresponds to the JSON property `secondaryConfig`
501
+ # @return [Google::Apis::AlloydbV1::SecondaryConfig]
502
+ attr_accessor :secondary_config
503
+
504
+ # SSL configuration.
505
+ # Corresponds to the JSON property `sslConfig`
506
+ # @return [Google::Apis::AlloydbV1::SslConfig]
507
+ attr_accessor :ssl_config
508
+
509
+ # Output only. The current serving state of the cluster.
510
+ # Corresponds to the JSON property `state`
511
+ # @return [String]
512
+ attr_accessor :state
513
+
514
+ # Output only. The system-generated UID of the resource. The UID is assigned
515
+ # when the resource is created, and it is retained until it is deleted.
516
+ # Corresponds to the JSON property `uid`
517
+ # @return [String]
518
+ attr_accessor :uid
519
+
520
+ # Output only. Update time stamp
521
+ # Corresponds to the JSON property `updateTime`
522
+ # @return [String]
523
+ attr_accessor :update_time
524
+
525
+ def initialize(**args)
526
+ update!(**args)
527
+ end
528
+
529
+ # Update properties of this object
530
+ def update!(**args)
531
+ @annotations = args[:annotations] if args.key?(:annotations)
532
+ @automated_backup_policy = args[:automated_backup_policy] if args.key?(:automated_backup_policy)
533
+ @backup_source = args[:backup_source] if args.key?(:backup_source)
534
+ @cluster_type = args[:cluster_type] if args.key?(:cluster_type)
535
+ @continuous_backup_config = args[:continuous_backup_config] if args.key?(:continuous_backup_config)
536
+ @continuous_backup_info = args[:continuous_backup_info] if args.key?(:continuous_backup_info)
537
+ @create_time = args[:create_time] if args.key?(:create_time)
538
+ @database_version = args[:database_version] if args.key?(:database_version)
539
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
540
+ @display_name = args[:display_name] if args.key?(:display_name)
541
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
542
+ @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
543
+ @etag = args[:etag] if args.key?(:etag)
544
+ @initial_user = args[:initial_user] if args.key?(:initial_user)
545
+ @labels = args[:labels] if args.key?(:labels)
546
+ @migration_source = args[:migration_source] if args.key?(:migration_source)
547
+ @name = args[:name] if args.key?(:name)
548
+ @network = args[:network] if args.key?(:network)
549
+ @network_config = args[:network_config] if args.key?(:network_config)
550
+ @primary_config = args[:primary_config] if args.key?(:primary_config)
551
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
552
+ @secondary_config = args[:secondary_config] if args.key?(:secondary_config)
553
+ @ssl_config = args[:ssl_config] if args.key?(:ssl_config)
554
+ @state = args[:state] if args.key?(:state)
555
+ @uid = args[:uid] if args.key?(:uid)
556
+ @update_time = args[:update_time] if args.key?(:update_time)
557
+ end
558
+ end
559
+
560
+ # ConnectionInfo singleton resource. https://google.aip.dev/156
561
+ class ConnectionInfo
562
+ include Google::Apis::Core::Hashable
563
+
564
+ # Output only. The unique ID of the Instance.
565
+ # Corresponds to the JSON property `instanceUid`
566
+ # @return [String]
567
+ attr_accessor :instance_uid
568
+
569
+ # Output only. The private network IP address for the Instance. This is the
570
+ # default IP for the instance and is always created (even if enable_public_ip is
571
+ # set). This is the connection endpoint for an end-user application.
572
+ # Corresponds to the JSON property `ipAddress`
573
+ # @return [String]
574
+ attr_accessor :ip_address
575
+
576
+ # The name of the ConnectionInfo singleton resource, e.g.: projects/`project`/
577
+ # locations/`location`/clusters/*/instances/*/connectionInfo This field
578
+ # currently has no semantic meaning.
579
+ # Corresponds to the JSON property `name`
580
+ # @return [String]
581
+ attr_accessor :name
582
+
583
+ def initialize(**args)
584
+ update!(**args)
585
+ end
586
+
587
+ # Update properties of this object
588
+ def update!(**args)
589
+ @instance_uid = args[:instance_uid] if args.key?(:instance_uid)
590
+ @ip_address = args[:ip_address] if args.key?(:ip_address)
591
+ @name = args[:name] if args.key?(:name)
592
+ end
593
+ end
594
+
595
+ # ContinuousBackupConfig describes the continuous backups recovery
596
+ # configurations of a cluster.
597
+ class ContinuousBackupConfig
598
+ include Google::Apis::Core::Hashable
599
+
600
+ # Whether ContinuousBackup is enabled.
601
+ # Corresponds to the JSON property `enabled`
602
+ # @return [Boolean]
603
+ attr_accessor :enabled
604
+ alias_method :enabled?, :enabled
605
+
606
+ # EncryptionConfig describes the encryption config of a cluster or a backup that
607
+ # is encrypted with a CMEK (customer-managed encryption key).
608
+ # Corresponds to the JSON property `encryptionConfig`
609
+ # @return [Google::Apis::AlloydbV1::EncryptionConfig]
610
+ attr_accessor :encryption_config
611
+
612
+ # The number of days that are eligible to restore from using PITR. To support
613
+ # the entire recovery window, backups and logs are retained for one day more
614
+ # than the recovery window. If not set, defaults to 14 days.
615
+ # Corresponds to the JSON property `recoveryWindowDays`
616
+ # @return [Fixnum]
617
+ attr_accessor :recovery_window_days
618
+
619
+ def initialize(**args)
620
+ update!(**args)
621
+ end
622
+
623
+ # Update properties of this object
624
+ def update!(**args)
625
+ @enabled = args[:enabled] if args.key?(:enabled)
626
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
627
+ @recovery_window_days = args[:recovery_window_days] if args.key?(:recovery_window_days)
628
+ end
629
+ end
630
+
631
+ # ContinuousBackupInfo describes the continuous backup properties of a cluster.
632
+ class ContinuousBackupInfo
633
+ include Google::Apis::Core::Hashable
634
+
635
+ # Output only. The earliest restorable time that can be restored to. Output only
636
+ # field.
637
+ # Corresponds to the JSON property `earliestRestorableTime`
638
+ # @return [String]
639
+ attr_accessor :earliest_restorable_time
640
+
641
+ # Output only. When ContinuousBackup was most recently enabled. Set to null if
642
+ # ContinuousBackup is not enabled.
643
+ # Corresponds to the JSON property `enabledTime`
644
+ # @return [String]
645
+ attr_accessor :enabled_time
646
+
647
+ # EncryptionInfo describes the encryption information of a cluster or a backup.
648
+ # Corresponds to the JSON property `encryptionInfo`
649
+ # @return [Google::Apis::AlloydbV1::EncryptionInfo]
650
+ attr_accessor :encryption_info
651
+
652
+ # Output only. Days of the week on which a continuous backup is taken. Output
653
+ # only field. Ignored if passed into the request.
654
+ # Corresponds to the JSON property `schedule`
655
+ # @return [Array<String>]
656
+ attr_accessor :schedule
657
+
658
+ def initialize(**args)
659
+ update!(**args)
660
+ end
661
+
662
+ # Update properties of this object
663
+ def update!(**args)
664
+ @earliest_restorable_time = args[:earliest_restorable_time] if args.key?(:earliest_restorable_time)
665
+ @enabled_time = args[:enabled_time] if args.key?(:enabled_time)
666
+ @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
667
+ @schedule = args[:schedule] if args.key?(:schedule)
668
+ end
669
+ end
670
+
671
+ # Message describing a ContinuousBackupSource.
672
+ class ContinuousBackupSource
673
+ include Google::Apis::Core::Hashable
674
+
675
+ # Required. The source cluster from which to restore. This cluster must have
676
+ # continuous backup enabled for this operation to succeed. For the required
677
+ # format, see the comment on the Cluster.name field.
678
+ # Corresponds to the JSON property `cluster`
679
+ # @return [String]
680
+ attr_accessor :cluster
681
+
682
+ # Required. The point in time to restore to.
683
+ # Corresponds to the JSON property `pointInTime`
684
+ # @return [String]
685
+ attr_accessor :point_in_time
686
+
687
+ def initialize(**args)
688
+ update!(**args)
689
+ end
690
+
691
+ # Update properties of this object
692
+ def update!(**args)
693
+ @cluster = args[:cluster] if args.key?(:cluster)
694
+ @point_in_time = args[:point_in_time] if args.key?(:point_in_time)
695
+ end
696
+ end
697
+
698
+ # A generic empty message that you can re-use to avoid defining duplicated empty
699
+ # messages in your APIs. A typical example is to use it as the request or the
700
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
701
+ # protobuf.Empty) returns (google.protobuf.Empty); `
702
+ class Empty
703
+ include Google::Apis::Core::Hashable
704
+
705
+ def initialize(**args)
706
+ update!(**args)
707
+ end
708
+
709
+ # Update properties of this object
710
+ def update!(**args)
711
+ end
712
+ end
713
+
714
+ # EncryptionConfig describes the encryption config of a cluster or a backup that
715
+ # is encrypted with a CMEK (customer-managed encryption key).
716
+ class EncryptionConfig
717
+ include Google::Apis::Core::Hashable
718
+
719
+ # The fully-qualified resource name of the KMS key. Each Cloud KMS key is
720
+ # regionalized and has the following format: projects/[PROJECT]/locations/[
721
+ # REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
722
+ # Corresponds to the JSON property `kmsKeyName`
723
+ # @return [String]
724
+ attr_accessor :kms_key_name
725
+
726
+ def initialize(**args)
727
+ update!(**args)
728
+ end
729
+
730
+ # Update properties of this object
731
+ def update!(**args)
732
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
733
+ end
734
+ end
735
+
736
+ # EncryptionInfo describes the encryption information of a cluster or a backup.
737
+ class EncryptionInfo
738
+ include Google::Apis::Core::Hashable
739
+
740
+ # Output only. Type of encryption.
741
+ # Corresponds to the JSON property `encryptionType`
742
+ # @return [String]
743
+ attr_accessor :encryption_type
744
+
745
+ # Output only. Cloud KMS key versions that are being used to protect the
746
+ # database or the backup.
747
+ # Corresponds to the JSON property `kmsKeyVersions`
748
+ # @return [Array<String>]
749
+ attr_accessor :kms_key_versions
750
+
751
+ def initialize(**args)
752
+ update!(**args)
753
+ end
754
+
755
+ # Update properties of this object
756
+ def update!(**args)
757
+ @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
758
+ @kms_key_versions = args[:kms_key_versions] if args.key?(:kms_key_versions)
759
+ end
760
+ end
761
+
762
+ # Message for triggering failover on an Instance
763
+ class FailoverInstanceRequest
764
+ include Google::Apis::Core::Hashable
765
+
766
+ # Optional. An optional request ID to identify requests. Specify a unique
767
+ # request ID so that if you must retry your request, the server will know to
768
+ # ignore the request if it has already been completed. The server will guarantee
769
+ # that for at least 60 minutes after the first request. For example, consider a
770
+ # situation where you make an initial request and the request times out. If you
771
+ # make the request again with the same request ID, the server can check if
772
+ # original operation with the same request ID was received, and if so, will
773
+ # ignore the second request. This prevents clients from accidentally creating
774
+ # duplicate commitments. The request ID must be a valid UUID with the exception
775
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
776
+ # Corresponds to the JSON property `requestId`
777
+ # @return [String]
778
+ attr_accessor :request_id
779
+
780
+ # Optional. If set, performs request validation (e.g. permission checks and any
781
+ # other type of validation), but do not actually execute the failover.
782
+ # Corresponds to the JSON property `validateOnly`
783
+ # @return [Boolean]
784
+ attr_accessor :validate_only
785
+ alias_method :validate_only?, :validate_only
786
+
787
+ def initialize(**args)
788
+ update!(**args)
789
+ end
790
+
791
+ # Update properties of this object
792
+ def update!(**args)
793
+ @request_id = args[:request_id] if args.key?(:request_id)
794
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
795
+ end
796
+ end
797
+
798
+ # Message for requests to generate a client certificate signed by the Cluster CA.
799
+ class GenerateClientCertificateRequest
800
+ include Google::Apis::Core::Hashable
801
+
802
+ # Optional. An optional hint to the endpoint to generate the client certificate
803
+ # with the requested duration. The duration can be from 1 hour to 24 hours. The
804
+ # endpoint may or may not honor the hint. If the hint is left unspecified or is
805
+ # not honored, then the endpoint will pick an appropriate default duration.
806
+ # Corresponds to the JSON property `certDuration`
807
+ # @return [String]
808
+ attr_accessor :cert_duration
809
+
810
+ # Optional. The public key from the client.
811
+ # Corresponds to the JSON property `publicKey`
812
+ # @return [String]
813
+ attr_accessor :public_key
814
+
815
+ # Optional. An optional request ID to identify requests. Specify a unique
816
+ # request ID so that if you must retry your request, the server will know to
817
+ # ignore the request if it has already been completed. The server will guarantee
818
+ # that for at least 60 minutes after the first request. For example, consider a
819
+ # situation where you make an initial request and the request times out. If you
820
+ # make the request again with the same request ID, the server can check if
821
+ # original operation with the same request ID was received, and if so, will
822
+ # ignore the second request. This prevents clients from accidentally creating
823
+ # duplicate commitments. The request ID must be a valid UUID with the exception
824
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
825
+ # Corresponds to the JSON property `requestId`
826
+ # @return [String]
827
+ attr_accessor :request_id
828
+
829
+ def initialize(**args)
830
+ update!(**args)
831
+ end
832
+
833
+ # Update properties of this object
834
+ def update!(**args)
835
+ @cert_duration = args[:cert_duration] if args.key?(:cert_duration)
836
+ @public_key = args[:public_key] if args.key?(:public_key)
837
+ @request_id = args[:request_id] if args.key?(:request_id)
838
+ end
839
+ end
840
+
841
+ # Message returned by a GenerateClientCertificate operation.
842
+ class GenerateClientCertificateResponse
843
+ include Google::Apis::Core::Hashable
844
+
845
+ # Optional. The pem-encoded cluster ca X.509 certificate.
846
+ # Corresponds to the JSON property `caCert`
847
+ # @return [String]
848
+ attr_accessor :ca_cert
849
+
850
+ # Output only. The pem-encoded chain that may be used to verify the X.509
851
+ # certificate. Expected to be in issuer-to-root order according to RFC 5246.
852
+ # Corresponds to the JSON property `pemCertificateChain`
853
+ # @return [Array<String>]
854
+ attr_accessor :pem_certificate_chain
855
+
856
+ def initialize(**args)
857
+ update!(**args)
858
+ end
859
+
860
+ # Update properties of this object
861
+ def update!(**args)
862
+ @ca_cert = args[:ca_cert] if args.key?(:ca_cert)
863
+ @pem_certificate_chain = args[:pem_certificate_chain] if args.key?(:pem_certificate_chain)
864
+ end
865
+ end
866
+
867
+ # The response message for Locations.ListLocations.
868
+ class GoogleCloudLocationListLocationsResponse
869
+ include Google::Apis::Core::Hashable
870
+
871
+ # A list of locations that matches the specified filter in the request.
872
+ # Corresponds to the JSON property `locations`
873
+ # @return [Array<Google::Apis::AlloydbV1::GoogleCloudLocationLocation>]
874
+ attr_accessor :locations
875
+
876
+ # The standard List next-page token.
877
+ # Corresponds to the JSON property `nextPageToken`
878
+ # @return [String]
879
+ attr_accessor :next_page_token
880
+
881
+ def initialize(**args)
882
+ update!(**args)
883
+ end
884
+
885
+ # Update properties of this object
886
+ def update!(**args)
887
+ @locations = args[:locations] if args.key?(:locations)
888
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
889
+ end
890
+ end
891
+
892
+ # A resource that represents a Google Cloud location.
893
+ class GoogleCloudLocationLocation
894
+ include Google::Apis::Core::Hashable
895
+
896
+ # The friendly name for this location, typically a nearby city name. For example,
897
+ # "Tokyo".
898
+ # Corresponds to the JSON property `displayName`
899
+ # @return [String]
900
+ attr_accessor :display_name
901
+
902
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
903
+ # region": "us-east1"`
904
+ # Corresponds to the JSON property `labels`
905
+ # @return [Hash<String,String>]
906
+ attr_accessor :labels
907
+
908
+ # The canonical id for this location. For example: `"us-east1"`.
909
+ # Corresponds to the JSON property `locationId`
910
+ # @return [String]
911
+ attr_accessor :location_id
912
+
913
+ # Service-specific metadata. For example the available capacity at the given
914
+ # location.
915
+ # Corresponds to the JSON property `metadata`
916
+ # @return [Hash<String,Object>]
917
+ attr_accessor :metadata
918
+
919
+ # Resource name for the location, which may vary between implementations. For
920
+ # example: `"projects/example-project/locations/us-east1"`
921
+ # Corresponds to the JSON property `name`
922
+ # @return [String]
923
+ attr_accessor :name
924
+
925
+ def initialize(**args)
926
+ update!(**args)
927
+ end
928
+
929
+ # Update properties of this object
930
+ def update!(**args)
931
+ @display_name = args[:display_name] if args.key?(:display_name)
932
+ @labels = args[:labels] if args.key?(:labels)
933
+ @location_id = args[:location_id] if args.key?(:location_id)
934
+ @metadata = args[:metadata] if args.key?(:metadata)
935
+ @name = args[:name] if args.key?(:name)
936
+ end
937
+ end
938
+
939
+ # Represents a time of day. The date and time zone are either not significant or
940
+ # are specified elsewhere. An API may choose to allow leap seconds. Related
941
+ # types are google.type.Date and `google.protobuf.Timestamp`.
942
+ class GoogleTypeTimeOfDay
943
+ include Google::Apis::Core::Hashable
944
+
945
+ # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to
946
+ # allow the value "24:00:00" for scenarios like business closing time.
947
+ # Corresponds to the JSON property `hours`
948
+ # @return [Fixnum]
949
+ attr_accessor :hours
950
+
951
+ # Minutes of hour of day. Must be from 0 to 59.
952
+ # Corresponds to the JSON property `minutes`
953
+ # @return [Fixnum]
954
+ attr_accessor :minutes
955
+
956
+ # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
957
+ # Corresponds to the JSON property `nanos`
958
+ # @return [Fixnum]
959
+ attr_accessor :nanos
960
+
961
+ # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
962
+ # allow the value 60 if it allows leap-seconds.
963
+ # Corresponds to the JSON property `seconds`
964
+ # @return [Fixnum]
965
+ attr_accessor :seconds
966
+
967
+ def initialize(**args)
968
+ update!(**args)
969
+ end
970
+
971
+ # Update properties of this object
972
+ def update!(**args)
973
+ @hours = args[:hours] if args.key?(:hours)
974
+ @minutes = args[:minutes] if args.key?(:minutes)
975
+ @nanos = args[:nanos] if args.key?(:nanos)
976
+ @seconds = args[:seconds] if args.key?(:seconds)
977
+ end
978
+ end
979
+
980
+ # Message for triggering fault injection on an instance
981
+ class InjectFaultRequest
982
+ include Google::Apis::Core::Hashable
983
+
984
+ # Required. The type of fault to be injected in an instance.
985
+ # Corresponds to the JSON property `faultType`
986
+ # @return [String]
987
+ attr_accessor :fault_type
988
+
989
+ # Optional. An optional request ID to identify requests. Specify a unique
990
+ # request ID so that if you must retry your request, the server will know to
991
+ # ignore the request if it has already been completed. The server will guarantee
992
+ # that for at least 60 minutes after the first request. For example, consider a
993
+ # situation where you make an initial request and the request times out. If you
994
+ # make the request again with the same request ID, the server can check if
995
+ # original operation with the same request ID was received, and if so, will
996
+ # ignore the second request. This prevents clients from accidentally creating
997
+ # duplicate commitments. The request ID must be a valid UUID with the exception
998
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
999
+ # Corresponds to the JSON property `requestId`
1000
+ # @return [String]
1001
+ attr_accessor :request_id
1002
+
1003
+ # Optional. If set, performs request validation (e.g. permission checks and any
1004
+ # other type of validation), but do not actually execute the fault injection.
1005
+ # Corresponds to the JSON property `validateOnly`
1006
+ # @return [Boolean]
1007
+ attr_accessor :validate_only
1008
+ alias_method :validate_only?, :validate_only
1009
+
1010
+ def initialize(**args)
1011
+ update!(**args)
1012
+ end
1013
+
1014
+ # Update properties of this object
1015
+ def update!(**args)
1016
+ @fault_type = args[:fault_type] if args.key?(:fault_type)
1017
+ @request_id = args[:request_id] if args.key?(:request_id)
1018
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1019
+ end
1020
+ end
1021
+
1022
+ # An Instance is a computing unit that an end customer can connect to. It's the
1023
+ # main unit of computing resources in AlloyDB.
1024
+ class Instance
1025
+ include Google::Apis::Core::Hashable
1026
+
1027
+ # Annotations to allow client tools to store small amount of arbitrary data.
1028
+ # This is distinct from labels. https://google.aip.dev/128
1029
+ # Corresponds to the JSON property `annotations`
1030
+ # @return [Hash<String,String>]
1031
+ attr_accessor :annotations
1032
+
1033
+ # Availability type of an Instance. If empty, defaults to REGIONAL for primary
1034
+ # instances. For read pools, availability_type is always UNSPECIFIED. Instances
1035
+ # in the read pools are evenly distributed across available zones within the
1036
+ # region (i.e. read pools with more than one node will have a node in at least
1037
+ # two zones).
1038
+ # Corresponds to the JSON property `availabilityType`
1039
+ # @return [String]
1040
+ attr_accessor :availability_type
1041
+
1042
+ # Client connection configuration
1043
+ # Corresponds to the JSON property `clientConnectionConfig`
1044
+ # @return [Google::Apis::AlloydbV1::ClientConnectionConfig]
1045
+ attr_accessor :client_connection_config
1046
+
1047
+ # Output only. Create time stamp
1048
+ # Corresponds to the JSON property `createTime`
1049
+ # @return [String]
1050
+ attr_accessor :create_time
1051
+
1052
+ # Database flags. Set at instance level. * They are copied from primary instance
1053
+ # on read instance creation. * Read instances can set new or override existing
1054
+ # flags that are relevant for reads, e.g. for enabling columnar cache on a read
1055
+ # instance. Flags set on read instance may or may not be present on primary.
1056
+ # This is a list of "key": "value" pairs. "key": The name of the flag. These
1057
+ # flags are passed at instance setup time, so include both server options and
1058
+ # system variables for Postgres. Flags are specified with underscores, not
1059
+ # hyphens. "value": The value of the flag. Booleans are set to **on** for true
1060
+ # and **off** for false. This field must be omitted if the flag doesn't take a
1061
+ # value.
1062
+ # Corresponds to the JSON property `databaseFlags`
1063
+ # @return [Hash<String,String>]
1064
+ attr_accessor :database_flags
1065
+
1066
+ # Output only. Delete time stamp
1067
+ # Corresponds to the JSON property `deleteTime`
1068
+ # @return [String]
1069
+ attr_accessor :delete_time
1070
+
1071
+ # User-settable and human-readable display name for the Instance.
1072
+ # Corresponds to the JSON property `displayName`
1073
+ # @return [String]
1074
+ attr_accessor :display_name
1075
+
1076
+ # For Resource freshness validation (https://google.aip.dev/154)
1077
+ # Corresponds to the JSON property `etag`
1078
+ # @return [String]
1079
+ attr_accessor :etag
1080
+
1081
+ # The Compute Engine zone that the instance should serve from, per https://cloud.
1082
+ # google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL
1083
+ # instances. If present for a REGIONAL instance, an error will be thrown. If
1084
+ # this is absent for a ZONAL instance, instance is created in a random zone with
1085
+ # available capacity.
1086
+ # Corresponds to the JSON property `gceZone`
1087
+ # @return [String]
1088
+ attr_accessor :gce_zone
1089
+
1090
+ # Required. The type of the instance. Specified at creation time.
1091
+ # Corresponds to the JSON property `instanceType`
1092
+ # @return [String]
1093
+ attr_accessor :instance_type
1094
+
1095
+ # Output only. The IP address for the Instance. This is the connection endpoint
1096
+ # for an end-user application.
1097
+ # Corresponds to the JSON property `ipAddress`
1098
+ # @return [String]
1099
+ attr_accessor :ip_address
1100
+
1101
+ # Labels as key value pairs
1102
+ # Corresponds to the JSON property `labels`
1103
+ # @return [Hash<String,String>]
1104
+ attr_accessor :labels
1105
+
1106
+ # MachineConfig describes the configuration of a machine.
1107
+ # Corresponds to the JSON property `machineConfig`
1108
+ # @return [Google::Apis::AlloydbV1::MachineConfig]
1109
+ attr_accessor :machine_config
1110
+
1111
+ # Output only. The name of the instance resource with the format: * projects/`
1112
+ # project`/locations/`region`/clusters/`cluster_id`/instances/`instance_id`
1113
+ # where the cluster and instance ID segments should satisfy the regex expression
1114
+ # `[a-z]([a-z0-9-]`0,61`[a-z0-9])?`, e.g. 1-63 characters of lowercase letters,
1115
+ # numbers, and dashes, starting with a letter, and ending with a letter or
1116
+ # number. For more details see https://google.aip.dev/122. The prefix of the
1117
+ # instance resource name is the name of the parent resource: * projects/`project`
1118
+ # /locations/`region`/clusters/`cluster_id`
1119
+ # Corresponds to the JSON property `name`
1120
+ # @return [String]
1121
+ attr_accessor :name
1122
+
1123
+ # Output only. List of available read-only VMs in this instance, including the
1124
+ # standby for a PRIMARY instance.
1125
+ # Corresponds to the JSON property `nodes`
1126
+ # @return [Array<Google::Apis::AlloydbV1::Node>]
1127
+ attr_accessor :nodes
1128
+
1129
+ # QueryInsights Instance specific configuration.
1130
+ # Corresponds to the JSON property `queryInsightsConfig`
1131
+ # @return [Google::Apis::AlloydbV1::QueryInsightsInstanceConfig]
1132
+ attr_accessor :query_insights_config
1133
+
1134
+ # Configuration for a read pool instance.
1135
+ # Corresponds to the JSON property `readPoolConfig`
1136
+ # @return [Google::Apis::AlloydbV1::ReadPoolConfig]
1137
+ attr_accessor :read_pool_config
1138
+
1139
+ # Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to
1140
+ # true if the current state of Instance does not match the user's intended state,
1141
+ # and the service is actively updating the resource to reconcile them. This can
1142
+ # happen due to user-triggered updates or system actions like failover or
1143
+ # maintenance.
1144
+ # Corresponds to the JSON property `reconciling`
1145
+ # @return [Boolean]
1146
+ attr_accessor :reconciling
1147
+ alias_method :reconciling?, :reconciling
1148
+
1149
+ # Output only. The current serving state of the instance.
1150
+ # Corresponds to the JSON property `state`
1151
+ # @return [String]
1152
+ attr_accessor :state
1153
+
1154
+ # Output only. The system-generated UID of the resource. The UID is assigned
1155
+ # when the resource is created, and it is retained until it is deleted.
1156
+ # Corresponds to the JSON property `uid`
1157
+ # @return [String]
1158
+ attr_accessor :uid
1159
+
1160
+ # Output only. Update time stamp
1161
+ # Corresponds to the JSON property `updateTime`
1162
+ # @return [String]
1163
+ attr_accessor :update_time
1164
+
1165
+ # Details of a single node in the instance. Nodes in an AlloyDB instance are
1166
+ # ephemereal, they can change during update, failover, autohealing and resize
1167
+ # operations.
1168
+ # Corresponds to the JSON property `writableNode`
1169
+ # @return [Google::Apis::AlloydbV1::Node]
1170
+ attr_accessor :writable_node
1171
+
1172
+ def initialize(**args)
1173
+ update!(**args)
1174
+ end
1175
+
1176
+ # Update properties of this object
1177
+ def update!(**args)
1178
+ @annotations = args[:annotations] if args.key?(:annotations)
1179
+ @availability_type = args[:availability_type] if args.key?(:availability_type)
1180
+ @client_connection_config = args[:client_connection_config] if args.key?(:client_connection_config)
1181
+ @create_time = args[:create_time] if args.key?(:create_time)
1182
+ @database_flags = args[:database_flags] if args.key?(:database_flags)
1183
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1184
+ @display_name = args[:display_name] if args.key?(:display_name)
1185
+ @etag = args[:etag] if args.key?(:etag)
1186
+ @gce_zone = args[:gce_zone] if args.key?(:gce_zone)
1187
+ @instance_type = args[:instance_type] if args.key?(:instance_type)
1188
+ @ip_address = args[:ip_address] if args.key?(:ip_address)
1189
+ @labels = args[:labels] if args.key?(:labels)
1190
+ @machine_config = args[:machine_config] if args.key?(:machine_config)
1191
+ @name = args[:name] if args.key?(:name)
1192
+ @nodes = args[:nodes] if args.key?(:nodes)
1193
+ @query_insights_config = args[:query_insights_config] if args.key?(:query_insights_config)
1194
+ @read_pool_config = args[:read_pool_config] if args.key?(:read_pool_config)
1195
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
1196
+ @state = args[:state] if args.key?(:state)
1197
+ @uid = args[:uid] if args.key?(:uid)
1198
+ @update_time = args[:update_time] if args.key?(:update_time)
1199
+ @writable_node = args[:writable_node] if args.key?(:writable_node)
1200
+ end
1201
+ end
1202
+
1203
+ # Restrictions on INTEGER type values.
1204
+ class IntegerRestrictions
1205
+ include Google::Apis::Core::Hashable
1206
+
1207
+ # The maximum value that can be specified, if applicable.
1208
+ # Corresponds to the JSON property `maxValue`
1209
+ # @return [Fixnum]
1210
+ attr_accessor :max_value
1211
+
1212
+ # The minimum value that can be specified, if applicable.
1213
+ # Corresponds to the JSON property `minValue`
1214
+ # @return [Fixnum]
1215
+ attr_accessor :min_value
1216
+
1217
+ def initialize(**args)
1218
+ update!(**args)
1219
+ end
1220
+
1221
+ # Update properties of this object
1222
+ def update!(**args)
1223
+ @max_value = args[:max_value] if args.key?(:max_value)
1224
+ @min_value = args[:min_value] if args.key?(:min_value)
1225
+ end
1226
+ end
1227
+
1228
+ # Message for response to listing Backups
1229
+ class ListBackupsResponse
1230
+ include Google::Apis::Core::Hashable
1231
+
1232
+ # The list of Backup
1233
+ # Corresponds to the JSON property `backups`
1234
+ # @return [Array<Google::Apis::AlloydbV1::Backup>]
1235
+ attr_accessor :backups
1236
+
1237
+ # A token identifying a page of results the server should return.
1238
+ # Corresponds to the JSON property `nextPageToken`
1239
+ # @return [String]
1240
+ attr_accessor :next_page_token
1241
+
1242
+ # Locations that could not be reached.
1243
+ # Corresponds to the JSON property `unreachable`
1244
+ # @return [Array<String>]
1245
+ attr_accessor :unreachable
1246
+
1247
+ def initialize(**args)
1248
+ update!(**args)
1249
+ end
1250
+
1251
+ # Update properties of this object
1252
+ def update!(**args)
1253
+ @backups = args[:backups] if args.key?(:backups)
1254
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1255
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1256
+ end
1257
+ end
1258
+
1259
+ # Message for response to listing Clusters
1260
+ class ListClustersResponse
1261
+ include Google::Apis::Core::Hashable
1262
+
1263
+ # The list of Cluster
1264
+ # Corresponds to the JSON property `clusters`
1265
+ # @return [Array<Google::Apis::AlloydbV1::Cluster>]
1266
+ attr_accessor :clusters
1267
+
1268
+ # A token identifying a page of results the server should return.
1269
+ # Corresponds to the JSON property `nextPageToken`
1270
+ # @return [String]
1271
+ attr_accessor :next_page_token
1272
+
1273
+ # Locations that could not be reached.
1274
+ # Corresponds to the JSON property `unreachable`
1275
+ # @return [Array<String>]
1276
+ attr_accessor :unreachable
1277
+
1278
+ def initialize(**args)
1279
+ update!(**args)
1280
+ end
1281
+
1282
+ # Update properties of this object
1283
+ def update!(**args)
1284
+ @clusters = args[:clusters] if args.key?(:clusters)
1285
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1286
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1287
+ end
1288
+ end
1289
+
1290
+ # Message for response to listing Instances
1291
+ class ListInstancesResponse
1292
+ include Google::Apis::Core::Hashable
1293
+
1294
+ # The list of Instance
1295
+ # Corresponds to the JSON property `instances`
1296
+ # @return [Array<Google::Apis::AlloydbV1::Instance>]
1297
+ attr_accessor :instances
1298
+
1299
+ # A token identifying a page of results the server should return.
1300
+ # Corresponds to the JSON property `nextPageToken`
1301
+ # @return [String]
1302
+ attr_accessor :next_page_token
1303
+
1304
+ # Locations that could not be reached.
1305
+ # Corresponds to the JSON property `unreachable`
1306
+ # @return [Array<String>]
1307
+ attr_accessor :unreachable
1308
+
1309
+ def initialize(**args)
1310
+ update!(**args)
1311
+ end
1312
+
1313
+ # Update properties of this object
1314
+ def update!(**args)
1315
+ @instances = args[:instances] if args.key?(:instances)
1316
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1317
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1318
+ end
1319
+ end
1320
+
1321
+ # The response message for Operations.ListOperations.
1322
+ class ListOperationsResponse
1323
+ include Google::Apis::Core::Hashable
1324
+
1325
+ # The standard List next-page token.
1326
+ # Corresponds to the JSON property `nextPageToken`
1327
+ # @return [String]
1328
+ attr_accessor :next_page_token
1329
+
1330
+ # A list of operations that matches the specified filter in the request.
1331
+ # Corresponds to the JSON property `operations`
1332
+ # @return [Array<Google::Apis::AlloydbV1::Operation>]
1333
+ attr_accessor :operations
1334
+
1335
+ def initialize(**args)
1336
+ update!(**args)
1337
+ end
1338
+
1339
+ # Update properties of this object
1340
+ def update!(**args)
1341
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1342
+ @operations = args[:operations] if args.key?(:operations)
1343
+ end
1344
+ end
1345
+
1346
+ # Message for response to listing SupportedDatabaseFlags.
1347
+ class ListSupportedDatabaseFlagsResponse
1348
+ include Google::Apis::Core::Hashable
1349
+
1350
+ # A token identifying a page of results the server should return.
1351
+ # Corresponds to the JSON property `nextPageToken`
1352
+ # @return [String]
1353
+ attr_accessor :next_page_token
1354
+
1355
+ # The list of SupportedDatabaseFlags.
1356
+ # Corresponds to the JSON property `supportedDatabaseFlags`
1357
+ # @return [Array<Google::Apis::AlloydbV1::SupportedDatabaseFlag>]
1358
+ attr_accessor :supported_database_flags
1359
+
1360
+ def initialize(**args)
1361
+ update!(**args)
1362
+ end
1363
+
1364
+ # Update properties of this object
1365
+ def update!(**args)
1366
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1367
+ @supported_database_flags = args[:supported_database_flags] if args.key?(:supported_database_flags)
1368
+ end
1369
+ end
1370
+
1371
+ # Message for response to listing Users
1372
+ class ListUsersResponse
1373
+ include Google::Apis::Core::Hashable
1374
+
1375
+ # A token identifying a page of results the server should return.
1376
+ # Corresponds to the JSON property `nextPageToken`
1377
+ # @return [String]
1378
+ attr_accessor :next_page_token
1379
+
1380
+ # Locations that could not be reached.
1381
+ # Corresponds to the JSON property `unreachable`
1382
+ # @return [Array<String>]
1383
+ attr_accessor :unreachable
1384
+
1385
+ # The list of User
1386
+ # Corresponds to the JSON property `users`
1387
+ # @return [Array<Google::Apis::AlloydbV1::User>]
1388
+ attr_accessor :users
1389
+
1390
+ def initialize(**args)
1391
+ update!(**args)
1392
+ end
1393
+
1394
+ # Update properties of this object
1395
+ def update!(**args)
1396
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1397
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1398
+ @users = args[:users] if args.key?(:users)
1399
+ end
1400
+ end
1401
+
1402
+ # MachineConfig describes the configuration of a machine.
1403
+ class MachineConfig
1404
+ include Google::Apis::Core::Hashable
1405
+
1406
+ # The number of CPU's in the VM instance.
1407
+ # Corresponds to the JSON property `cpuCount`
1408
+ # @return [Fixnum]
1409
+ attr_accessor :cpu_count
1410
+
1411
+ def initialize(**args)
1412
+ update!(**args)
1413
+ end
1414
+
1415
+ # Update properties of this object
1416
+ def update!(**args)
1417
+ @cpu_count = args[:cpu_count] if args.key?(:cpu_count)
1418
+ end
1419
+ end
1420
+
1421
+ # Subset of the source instance configuration that is available when reading the
1422
+ # cluster resource.
1423
+ class MigrationSource
1424
+ include Google::Apis::Core::Hashable
1425
+
1426
+ # Output only. The host and port of the on-premises instance in host:port format
1427
+ # Corresponds to the JSON property `hostPort`
1428
+ # @return [String]
1429
+ attr_accessor :host_port
1430
+
1431
+ # Output only. Place holder for the external source identifier(e.g DMS job name)
1432
+ # that created the cluster.
1433
+ # Corresponds to the JSON property `referenceId`
1434
+ # @return [String]
1435
+ attr_accessor :reference_id
1436
+
1437
+ # Output only. Type of migration source.
1438
+ # Corresponds to the JSON property `sourceType`
1439
+ # @return [String]
1440
+ attr_accessor :source_type
1441
+
1442
+ def initialize(**args)
1443
+ update!(**args)
1444
+ end
1445
+
1446
+ # Update properties of this object
1447
+ def update!(**args)
1448
+ @host_port = args[:host_port] if args.key?(:host_port)
1449
+ @reference_id = args[:reference_id] if args.key?(:reference_id)
1450
+ @source_type = args[:source_type] if args.key?(:source_type)
1451
+ end
1452
+ end
1453
+
1454
+ # Metadata related to network configuration.
1455
+ class NetworkConfig
1456
+ include Google::Apis::Core::Hashable
1457
+
1458
+ # Optional. Name of the allocated IP range for the private IP AlloyDB cluster,
1459
+ # for example: "google-managed-services-default". If set, the instance IPs for
1460
+ # this cluster will be created in the allocated range. The range name must
1461
+ # comply with RFC 1035. Specifically, the name must be 1-63 characters long and
1462
+ # match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Field name is
1463
+ # intended to be consistent with CloudSQL.
1464
+ # Corresponds to the JSON property `allocatedIpRange`
1465
+ # @return [String]
1466
+ attr_accessor :allocated_ip_range
1467
+
1468
+ # Required. The resource link for the VPC network in which cluster resources are
1469
+ # created and from which they are accessible via Private IP. The network must
1470
+ # belong to the same project as the cluster. It is specified in the form: "
1471
+ # projects/`project_number`/global/networks/`network_id`". This is required to
1472
+ # create a cluster.
1473
+ # Corresponds to the JSON property `network`
1474
+ # @return [String]
1475
+ attr_accessor :network
1476
+
1477
+ def initialize(**args)
1478
+ update!(**args)
1479
+ end
1480
+
1481
+ # Update properties of this object
1482
+ def update!(**args)
1483
+ @allocated_ip_range = args[:allocated_ip_range] if args.key?(:allocated_ip_range)
1484
+ @network = args[:network] if args.key?(:network)
1485
+ end
1486
+ end
1487
+
1488
+ # Details of a single node in the instance. Nodes in an AlloyDB instance are
1489
+ # ephemereal, they can change during update, failover, autohealing and resize
1490
+ # operations.
1491
+ class Node
1492
+ include Google::Apis::Core::Hashable
1493
+
1494
+ # The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
1495
+ # Corresponds to the JSON property `id`
1496
+ # @return [String]
1497
+ attr_accessor :id
1498
+
1499
+ # The private IP address of the VM e.g. "10.57.0.34".
1500
+ # Corresponds to the JSON property `ip`
1501
+ # @return [String]
1502
+ attr_accessor :ip
1503
+
1504
+ # Determined by state of the compute VM and postgres-service health. Compute VM
1505
+ # state can have values listed in https://cloud.google.com/compute/docs/
1506
+ # instances/instance-life-cycle and postgres-service health can have values:
1507
+ # HEALTHY and UNHEALTHY.
1508
+ # Corresponds to the JSON property `state`
1509
+ # @return [String]
1510
+ attr_accessor :state
1511
+
1512
+ # The Compute Engine zone of the VM e.g. "us-central1-b".
1513
+ # Corresponds to the JSON property `zoneId`
1514
+ # @return [String]
1515
+ attr_accessor :zone_id
1516
+
1517
+ def initialize(**args)
1518
+ update!(**args)
1519
+ end
1520
+
1521
+ # Update properties of this object
1522
+ def update!(**args)
1523
+ @id = args[:id] if args.key?(:id)
1524
+ @ip = args[:ip] if args.key?(:ip)
1525
+ @state = args[:state] if args.key?(:state)
1526
+ @zone_id = args[:zone_id] if args.key?(:zone_id)
1527
+ end
1528
+ end
1529
+
1530
+ # This resource represents a long-running operation that is the result of a
1531
+ # network API call.
1532
+ class Operation
1533
+ include Google::Apis::Core::Hashable
1534
+
1535
+ # If the value is `false`, it means the operation is still in progress. If `true`
1536
+ # , the operation is completed, and either `error` or `response` is available.
1537
+ # Corresponds to the JSON property `done`
1538
+ # @return [Boolean]
1539
+ attr_accessor :done
1540
+ alias_method :done?, :done
1541
+
1542
+ # The `Status` type defines a logical error model that is suitable for different
1543
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1544
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1545
+ # data: error code, error message, and error details. You can find out more
1546
+ # about this error model and how to work with it in the [API Design Guide](https:
1547
+ # //cloud.google.com/apis/design/errors).
1548
+ # Corresponds to the JSON property `error`
1549
+ # @return [Google::Apis::AlloydbV1::Status]
1550
+ attr_accessor :error
1551
+
1552
+ # Service-specific metadata associated with the operation. It typically contains
1553
+ # progress information and common metadata such as create time. Some services
1554
+ # might not provide such metadata. Any method that returns a long-running
1555
+ # operation should document the metadata type, if any.
1556
+ # Corresponds to the JSON property `metadata`
1557
+ # @return [Hash<String,Object>]
1558
+ attr_accessor :metadata
1559
+
1560
+ # The server-assigned name, which is only unique within the same service that
1561
+ # originally returns it. If you use the default HTTP mapping, the `name` should
1562
+ # be a resource name ending with `operations/`unique_id``.
1563
+ # Corresponds to the JSON property `name`
1564
+ # @return [String]
1565
+ attr_accessor :name
1566
+
1567
+ # The normal, successful response of the operation. If the original method
1568
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
1569
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
1570
+ # response should be the resource. For other methods, the response should have
1571
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
1572
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
1573
+ # `TakeSnapshotResponse`.
1574
+ # Corresponds to the JSON property `response`
1575
+ # @return [Hash<String,Object>]
1576
+ attr_accessor :response
1577
+
1578
+ def initialize(**args)
1579
+ update!(**args)
1580
+ end
1581
+
1582
+ # Update properties of this object
1583
+ def update!(**args)
1584
+ @done = args[:done] if args.key?(:done)
1585
+ @error = args[:error] if args.key?(:error)
1586
+ @metadata = args[:metadata] if args.key?(:metadata)
1587
+ @name = args[:name] if args.key?(:name)
1588
+ @response = args[:response] if args.key?(:response)
1589
+ end
1590
+ end
1591
+
1592
+ # Represents the metadata of the long-running operation.
1593
+ class OperationMetadata
1594
+ include Google::Apis::Core::Hashable
1595
+
1596
+ # Output only. API version used to start the operation.
1597
+ # Corresponds to the JSON property `apiVersion`
1598
+ # @return [String]
1599
+ attr_accessor :api_version
1600
+
1601
+ # Output only. The time the operation was created.
1602
+ # Corresponds to the JSON property `createTime`
1603
+ # @return [String]
1604
+ attr_accessor :create_time
1605
+
1606
+ # Output only. The time the operation finished running.
1607
+ # Corresponds to the JSON property `endTime`
1608
+ # @return [String]
1609
+ attr_accessor :end_time
1610
+
1611
+ # Output only. Identifies whether the user has requested cancellation of the
1612
+ # operation. Operations that have successfully been cancelled have Operation.
1613
+ # error value with a google.rpc.Status.code of 1, corresponding to `Code.
1614
+ # CANCELLED`.
1615
+ # Corresponds to the JSON property `requestedCancellation`
1616
+ # @return [Boolean]
1617
+ attr_accessor :requested_cancellation
1618
+ alias_method :requested_cancellation?, :requested_cancellation
1619
+
1620
+ # Output only. Human-readable status of the operation, if any.
1621
+ # Corresponds to the JSON property `statusMessage`
1622
+ # @return [String]
1623
+ attr_accessor :status_message
1624
+
1625
+ # Output only. Server-defined resource path for the target of the operation.
1626
+ # Corresponds to the JSON property `target`
1627
+ # @return [String]
1628
+ attr_accessor :target
1629
+
1630
+ # Output only. Name of the verb executed by the operation.
1631
+ # Corresponds to the JSON property `verb`
1632
+ # @return [String]
1633
+ attr_accessor :verb
1634
+
1635
+ def initialize(**args)
1636
+ update!(**args)
1637
+ end
1638
+
1639
+ # Update properties of this object
1640
+ def update!(**args)
1641
+ @api_version = args[:api_version] if args.key?(:api_version)
1642
+ @create_time = args[:create_time] if args.key?(:create_time)
1643
+ @end_time = args[:end_time] if args.key?(:end_time)
1644
+ @requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
1645
+ @status_message = args[:status_message] if args.key?(:status_message)
1646
+ @target = args[:target] if args.key?(:target)
1647
+ @verb = args[:verb] if args.key?(:verb)
1648
+ end
1649
+ end
1650
+
1651
+ # Configuration for the primary cluster. It has the list of clusters that are
1652
+ # replicating from this cluster. This should be set if and only if the cluster
1653
+ # is of type PRIMARY.
1654
+ class PrimaryConfig
1655
+ include Google::Apis::Core::Hashable
1656
+
1657
+ # Output only. Names of the clusters that are replicating from this cluster.
1658
+ # Corresponds to the JSON property `secondaryClusterNames`
1659
+ # @return [Array<String>]
1660
+ attr_accessor :secondary_cluster_names
1661
+
1662
+ def initialize(**args)
1663
+ update!(**args)
1664
+ end
1665
+
1666
+ # Update properties of this object
1667
+ def update!(**args)
1668
+ @secondary_cluster_names = args[:secondary_cluster_names] if args.key?(:secondary_cluster_names)
1669
+ end
1670
+ end
1671
+
1672
+ # Message for promoting a Cluster
1673
+ class PromoteClusterRequest
1674
+ include Google::Apis::Core::Hashable
1675
+
1676
+ # Optional. The current etag of the Cluster. If an etag is provided and does not
1677
+ # match the current etag of the Cluster, deletion will be blocked and an ABORTED
1678
+ # error will be returned.
1679
+ # Corresponds to the JSON property `etag`
1680
+ # @return [String]
1681
+ attr_accessor :etag
1682
+
1683
+ # Optional. An optional request ID to identify requests. Specify a unique
1684
+ # request ID so that if you must retry your request, the server will know to
1685
+ # ignore the request if it has already been completed. The server will guarantee
1686
+ # that for at least 60 minutes after the first request. For example, consider a
1687
+ # situation where you make an initial request and the request times out. If you
1688
+ # make the request again with the same request ID, the server can check if
1689
+ # original operation with the same request ID was received, and if so, will
1690
+ # ignore the second request. This prevents clients from accidentally creating
1691
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1692
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1693
+ # Corresponds to the JSON property `requestId`
1694
+ # @return [String]
1695
+ attr_accessor :request_id
1696
+
1697
+ # Optional. If set, performs request validation (e.g. permission checks and any
1698
+ # other type of validation), but do not actually execute the delete.
1699
+ # Corresponds to the JSON property `validateOnly`
1700
+ # @return [Boolean]
1701
+ attr_accessor :validate_only
1702
+ alias_method :validate_only?, :validate_only
1703
+
1704
+ def initialize(**args)
1705
+ update!(**args)
1706
+ end
1707
+
1708
+ # Update properties of this object
1709
+ def update!(**args)
1710
+ @etag = args[:etag] if args.key?(:etag)
1711
+ @request_id = args[:request_id] if args.key?(:request_id)
1712
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1713
+ end
1714
+ end
1715
+
1716
+ # A backup's position in a quantity-based retention queue, of backups with the
1717
+ # same source cluster and type, with length, retention, specified by the backup'
1718
+ # s retention policy. Once the position is greater than the retention, the
1719
+ # backup is eligible to be garbage collected. Example: 5 backups from the same
1720
+ # source cluster and type with a quantity-based retention of 3 and denoted by
1721
+ # backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3),
1722
+ # backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)
1723
+ class QuantityBasedExpiry
1724
+ include Google::Apis::Core::Hashable
1725
+
1726
+ # Output only. The backup's position among its backups with the same source
1727
+ # cluster and type, by descending chronological order create time(i.e. newest
1728
+ # first).
1729
+ # Corresponds to the JSON property `retentionCount`
1730
+ # @return [Fixnum]
1731
+ attr_accessor :retention_count
1732
+
1733
+ # Output only. The length of the quantity-based queue, specified by the backup's
1734
+ # retention policy.
1735
+ # Corresponds to the JSON property `totalRetentionCount`
1736
+ # @return [Fixnum]
1737
+ attr_accessor :total_retention_count
1738
+
1739
+ def initialize(**args)
1740
+ update!(**args)
1741
+ end
1742
+
1743
+ # Update properties of this object
1744
+ def update!(**args)
1745
+ @retention_count = args[:retention_count] if args.key?(:retention_count)
1746
+ @total_retention_count = args[:total_retention_count] if args.key?(:total_retention_count)
1747
+ end
1748
+ end
1749
+
1750
+ # A quantity based policy specifies that a certain number of the most recent
1751
+ # successful backups should be retained.
1752
+ class QuantityBasedRetention
1753
+ include Google::Apis::Core::Hashable
1754
+
1755
+ # The number of backups to retain.
1756
+ # Corresponds to the JSON property `count`
1757
+ # @return [Fixnum]
1758
+ attr_accessor :count
1759
+
1760
+ def initialize(**args)
1761
+ update!(**args)
1762
+ end
1763
+
1764
+ # Update properties of this object
1765
+ def update!(**args)
1766
+ @count = args[:count] if args.key?(:count)
1767
+ end
1768
+ end
1769
+
1770
+ # QueryInsights Instance specific configuration.
1771
+ class QueryInsightsInstanceConfig
1772
+ include Google::Apis::Core::Hashable
1773
+
1774
+ # Number of query execution plans captured by Insights per minute for all
1775
+ # queries combined. The default value is 5. Any integer between 0 and 20 is
1776
+ # considered valid.
1777
+ # Corresponds to the JSON property `queryPlansPerMinute`
1778
+ # @return [Fixnum]
1779
+ attr_accessor :query_plans_per_minute
1780
+
1781
+ # Query string length. The default value is 1024. Any integer between 256 and
1782
+ # 4500 is considered valid.
1783
+ # Corresponds to the JSON property `queryStringLength`
1784
+ # @return [Fixnum]
1785
+ attr_accessor :query_string_length
1786
+
1787
+ # Record application tags for an instance. This flag is turned "on" by default.
1788
+ # Corresponds to the JSON property `recordApplicationTags`
1789
+ # @return [Boolean]
1790
+ attr_accessor :record_application_tags
1791
+ alias_method :record_application_tags?, :record_application_tags
1792
+
1793
+ # Record client address for an instance. Client address is PII information. This
1794
+ # flag is turned "on" by default.
1795
+ # Corresponds to the JSON property `recordClientAddress`
1796
+ # @return [Boolean]
1797
+ attr_accessor :record_client_address
1798
+ alias_method :record_client_address?, :record_client_address
1799
+
1800
+ def initialize(**args)
1801
+ update!(**args)
1802
+ end
1803
+
1804
+ # Update properties of this object
1805
+ def update!(**args)
1806
+ @query_plans_per_minute = args[:query_plans_per_minute] if args.key?(:query_plans_per_minute)
1807
+ @query_string_length = args[:query_string_length] if args.key?(:query_string_length)
1808
+ @record_application_tags = args[:record_application_tags] if args.key?(:record_application_tags)
1809
+ @record_client_address = args[:record_client_address] if args.key?(:record_client_address)
1810
+ end
1811
+ end
1812
+
1813
+ # Configuration for a read pool instance.
1814
+ class ReadPoolConfig
1815
+ include Google::Apis::Core::Hashable
1816
+
1817
+ # Read capacity, i.e. number of nodes in a read pool instance.
1818
+ # Corresponds to the JSON property `nodeCount`
1819
+ # @return [Fixnum]
1820
+ attr_accessor :node_count
1821
+
1822
+ def initialize(**args)
1823
+ update!(**args)
1824
+ end
1825
+
1826
+ # Update properties of this object
1827
+ def update!(**args)
1828
+ @node_count = args[:node_count] if args.key?(:node_count)
1829
+ end
1830
+ end
1831
+
1832
+ #
1833
+ class RestartInstanceRequest
1834
+ include Google::Apis::Core::Hashable
1835
+
1836
+ # Optional. An optional request ID to identify requests. Specify a unique
1837
+ # request ID so that if you must retry your request, the server will know to
1838
+ # ignore the request if it has already been completed. The server will guarantee
1839
+ # that for at least 60 minutes after the first request. For example, consider a
1840
+ # situation where you make an initial request and the request times out. If you
1841
+ # make the request again with the same request ID, the server can check if
1842
+ # original operation with the same request ID was received, and if so, will
1843
+ # ignore the second request. This prevents clients from accidentally creating
1844
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1845
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1846
+ # Corresponds to the JSON property `requestId`
1847
+ # @return [String]
1848
+ attr_accessor :request_id
1849
+
1850
+ # Optional. If set, performs request validation (e.g. permission checks and any
1851
+ # other type of validation), but do not actually execute the restart.
1852
+ # Corresponds to the JSON property `validateOnly`
1853
+ # @return [Boolean]
1854
+ attr_accessor :validate_only
1855
+ alias_method :validate_only?, :validate_only
1856
+
1857
+ def initialize(**args)
1858
+ update!(**args)
1859
+ end
1860
+
1861
+ # Update properties of this object
1862
+ def update!(**args)
1863
+ @request_id = args[:request_id] if args.key?(:request_id)
1864
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1865
+ end
1866
+ end
1867
+
1868
+ # Message for restoring a Cluster from a backup or another cluster at a given
1869
+ # point in time.
1870
+ class RestoreClusterRequest
1871
+ include Google::Apis::Core::Hashable
1872
+
1873
+ # Message describing a BackupSource.
1874
+ # Corresponds to the JSON property `backupSource`
1875
+ # @return [Google::Apis::AlloydbV1::BackupSource]
1876
+ attr_accessor :backup_source
1877
+
1878
+ # A cluster is a collection of regional AlloyDB resources. It can include a
1879
+ # primary instance and one or more read pool instances. All cluster resources
1880
+ # share a storage layer, which scales as needed.
1881
+ # Corresponds to the JSON property `cluster`
1882
+ # @return [Google::Apis::AlloydbV1::Cluster]
1883
+ attr_accessor :cluster
1884
+
1885
+ # Required. ID of the requesting object.
1886
+ # Corresponds to the JSON property `clusterId`
1887
+ # @return [String]
1888
+ attr_accessor :cluster_id
1889
+
1890
+ # Message describing a ContinuousBackupSource.
1891
+ # Corresponds to the JSON property `continuousBackupSource`
1892
+ # @return [Google::Apis::AlloydbV1::ContinuousBackupSource]
1893
+ attr_accessor :continuous_backup_source
1894
+
1895
+ # Optional. An optional request ID to identify requests. Specify a unique
1896
+ # request ID so that if you must retry your request, the server will know to
1897
+ # ignore the request if it has already been completed. The server will guarantee
1898
+ # that for at least 60 minutes since the first request. For example, consider a
1899
+ # situation where you make an initial request and the request times out. If you
1900
+ # make the request again with the same request ID, the server can check if
1901
+ # original operation with the same request ID was received, and if so, will
1902
+ # ignore the second request. This prevents clients from accidentally creating
1903
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1904
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1905
+ # Corresponds to the JSON property `requestId`
1906
+ # @return [String]
1907
+ attr_accessor :request_id
1908
+
1909
+ # Optional. If set, performs request validation (e.g. permission checks and any
1910
+ # other type of validation), but do not actually execute the import request.
1911
+ # Corresponds to the JSON property `validateOnly`
1912
+ # @return [Boolean]
1913
+ attr_accessor :validate_only
1914
+ alias_method :validate_only?, :validate_only
1915
+
1916
+ def initialize(**args)
1917
+ update!(**args)
1918
+ end
1919
+
1920
+ # Update properties of this object
1921
+ def update!(**args)
1922
+ @backup_source = args[:backup_source] if args.key?(:backup_source)
1923
+ @cluster = args[:cluster] if args.key?(:cluster)
1924
+ @cluster_id = args[:cluster_id] if args.key?(:cluster_id)
1925
+ @continuous_backup_source = args[:continuous_backup_source] if args.key?(:continuous_backup_source)
1926
+ @request_id = args[:request_id] if args.key?(:request_id)
1927
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1928
+ end
1929
+ end
1930
+
1931
+ # Configuration information for the secondary cluster. This should be set if and
1932
+ # only if the cluster is of type SECONDARY.
1933
+ class SecondaryConfig
1934
+ include Google::Apis::Core::Hashable
1935
+
1936
+ # The name of the primary cluster name with the format: * projects/`project`/
1937
+ # locations/`region`/clusters/`cluster_id`
1938
+ # Corresponds to the JSON property `primaryClusterName`
1939
+ # @return [String]
1940
+ attr_accessor :primary_cluster_name
1941
+
1942
+ def initialize(**args)
1943
+ update!(**args)
1944
+ end
1945
+
1946
+ # Update properties of this object
1947
+ def update!(**args)
1948
+ @primary_cluster_name = args[:primary_cluster_name] if args.key?(:primary_cluster_name)
1949
+ end
1950
+ end
1951
+
1952
+ # SSL configuration.
1953
+ class SslConfig
1954
+ include Google::Apis::Core::Hashable
1955
+
1956
+ # Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is
1957
+ # supported currently, and is the default value.
1958
+ # Corresponds to the JSON property `caSource`
1959
+ # @return [String]
1960
+ attr_accessor :ca_source
1961
+
1962
+ # Optional. SSL mode. Specifies client-server SSL/TLS connection behavior.
1963
+ # Corresponds to the JSON property `sslMode`
1964
+ # @return [String]
1965
+ attr_accessor :ssl_mode
1966
+
1967
+ def initialize(**args)
1968
+ update!(**args)
1969
+ end
1970
+
1971
+ # Update properties of this object
1972
+ def update!(**args)
1973
+ @ca_source = args[:ca_source] if args.key?(:ca_source)
1974
+ @ssl_mode = args[:ssl_mode] if args.key?(:ssl_mode)
1975
+ end
1976
+ end
1977
+
1978
+ # The `Status` type defines a logical error model that is suitable for different
1979
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1980
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1981
+ # data: error code, error message, and error details. You can find out more
1982
+ # about this error model and how to work with it in the [API Design Guide](https:
1983
+ # //cloud.google.com/apis/design/errors).
1984
+ class Status
1985
+ include Google::Apis::Core::Hashable
1986
+
1987
+ # The status code, which should be an enum value of google.rpc.Code.
1988
+ # Corresponds to the JSON property `code`
1989
+ # @return [Fixnum]
1990
+ attr_accessor :code
1991
+
1992
+ # A list of messages that carry the error details. There is a common set of
1993
+ # message types for APIs to use.
1994
+ # Corresponds to the JSON property `details`
1995
+ # @return [Array<Hash<String,Object>>]
1996
+ attr_accessor :details
1997
+
1998
+ # A developer-facing error message, which should be in English. Any user-facing
1999
+ # error message should be localized and sent in the google.rpc.Status.details
2000
+ # field, or localized by the client.
2001
+ # Corresponds to the JSON property `message`
2002
+ # @return [String]
2003
+ attr_accessor :message
2004
+
2005
+ def initialize(**args)
2006
+ update!(**args)
2007
+ end
2008
+
2009
+ # Update properties of this object
2010
+ def update!(**args)
2011
+ @code = args[:code] if args.key?(:code)
2012
+ @details = args[:details] if args.key?(:details)
2013
+ @message = args[:message] if args.key?(:message)
2014
+ end
2015
+ end
2016
+
2017
+ # Configuration for availability of database instance
2018
+ class StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration
2019
+ include Google::Apis::Core::Hashable
2020
+
2021
+ # Availability type. Potential values: * `ZONAL`: The instance serves data from
2022
+ # only one zone. Outages in that zone affect data accessibility. * `REGIONAL`:
2023
+ # The instance can serve data from more than one zone in a region (it is highly
2024
+ # available).
2025
+ # Corresponds to the JSON property `availabilityType`
2026
+ # @return [String]
2027
+ attr_accessor :availability_type
2028
+
2029
+ #
2030
+ # Corresponds to the JSON property `externalReplicaConfigured`
2031
+ # @return [Boolean]
2032
+ attr_accessor :external_replica_configured
2033
+ alias_method :external_replica_configured?, :external_replica_configured
2034
+
2035
+ #
2036
+ # Corresponds to the JSON property `promotableReplicaConfigured`
2037
+ # @return [Boolean]
2038
+ attr_accessor :promotable_replica_configured
2039
+ alias_method :promotable_replica_configured?, :promotable_replica_configured
2040
+
2041
+ def initialize(**args)
2042
+ update!(**args)
2043
+ end
2044
+
2045
+ # Update properties of this object
2046
+ def update!(**args)
2047
+ @availability_type = args[:availability_type] if args.key?(:availability_type)
2048
+ @external_replica_configured = args[:external_replica_configured] if args.key?(:external_replica_configured)
2049
+ @promotable_replica_configured = args[:promotable_replica_configured] if args.key?(:promotable_replica_configured)
2050
+ end
2051
+ end
2052
+
2053
+ # Configuration for automatic backups
2054
+ class StorageDatabasecenterPartnerapiV1mainBackupConfiguration
2055
+ include Google::Apis::Core::Hashable
2056
+
2057
+ # Whether customer visible automated backups are enabled on the instance.
2058
+ # Corresponds to the JSON property `automatedBackupEnabled`
2059
+ # @return [Boolean]
2060
+ attr_accessor :automated_backup_enabled
2061
+ alias_method :automated_backup_enabled?, :automated_backup_enabled
2062
+
2063
+ # Backup retention settings.
2064
+ # Corresponds to the JSON property `backupRetentionSettings`
2065
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainRetentionSettings]
2066
+ attr_accessor :backup_retention_settings
2067
+
2068
+ # Whether point-in-time recovery is enabled. This is optional field, if the
2069
+ # database service does not have this feature or metadata is not available in
2070
+ # control plane, this can be omitted.
2071
+ # Corresponds to the JSON property `pointInTimeRecoveryEnabled`
2072
+ # @return [Boolean]
2073
+ attr_accessor :point_in_time_recovery_enabled
2074
+ alias_method :point_in_time_recovery_enabled?, :point_in_time_recovery_enabled
2075
+
2076
+ def initialize(**args)
2077
+ update!(**args)
2078
+ end
2079
+
2080
+ # Update properties of this object
2081
+ def update!(**args)
2082
+ @automated_backup_enabled = args[:automated_backup_enabled] if args.key?(:automated_backup_enabled)
2083
+ @backup_retention_settings = args[:backup_retention_settings] if args.key?(:backup_retention_settings)
2084
+ @point_in_time_recovery_enabled = args[:point_in_time_recovery_enabled] if args.key?(:point_in_time_recovery_enabled)
2085
+ end
2086
+ end
2087
+
2088
+ # A backup run.
2089
+ class StorageDatabasecenterPartnerapiV1mainBackupRun
2090
+ include Google::Apis::Core::Hashable
2091
+
2092
+ # The time the backup operation completed. REQUIRED
2093
+ # Corresponds to the JSON property `endTime`
2094
+ # @return [String]
2095
+ attr_accessor :end_time
2096
+
2097
+ # An error that occurred during a backup creation operation.
2098
+ # Corresponds to the JSON property `error`
2099
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainOperationError]
2100
+ attr_accessor :error
2101
+
2102
+ # The time the backup operation started. REQUIRED
2103
+ # Corresponds to the JSON property `startTime`
2104
+ # @return [String]
2105
+ attr_accessor :start_time
2106
+
2107
+ # The status of this run. REQUIRED
2108
+ # Corresponds to the JSON property `status`
2109
+ # @return [String]
2110
+ attr_accessor :status
2111
+
2112
+ def initialize(**args)
2113
+ update!(**args)
2114
+ end
2115
+
2116
+ # Update properties of this object
2117
+ def update!(**args)
2118
+ @end_time = args[:end_time] if args.key?(:end_time)
2119
+ @error = args[:error] if args.key?(:error)
2120
+ @start_time = args[:start_time] if args.key?(:start_time)
2121
+ @status = args[:status] if args.key?(:status)
2122
+ end
2123
+ end
2124
+
2125
+ # Contains compliance information about a security standard indicating unmet
2126
+ # recommendations.
2127
+ class StorageDatabasecenterPartnerapiV1mainCompliance
2128
+ include Google::Apis::Core::Hashable
2129
+
2130
+ # Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.
2131
+ # Corresponds to the JSON property `standard`
2132
+ # @return [String]
2133
+ attr_accessor :standard
2134
+
2135
+ # Version of the standard or benchmark, for example, 1.1
2136
+ # Corresponds to the JSON property `version`
2137
+ # @return [String]
2138
+ attr_accessor :version
2139
+
2140
+ def initialize(**args)
2141
+ update!(**args)
2142
+ end
2143
+
2144
+ # Update properties of this object
2145
+ def update!(**args)
2146
+ @standard = args[:standard] if args.key?(:standard)
2147
+ @version = args[:version] if args.key?(:version)
2148
+ end
2149
+ end
2150
+
2151
+ # DatabaseResourceFeed is the top level proto to be used to ingest different
2152
+ # database resource level events into Condor platform.
2153
+ class StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed
2154
+ include Google::Apis::Core::Hashable
2155
+
2156
+ # Required. Timestamp when feed is generated.
2157
+ # Corresponds to the JSON property `feedTimestamp`
2158
+ # @return [String]
2159
+ attr_accessor :feed_timestamp
2160
+
2161
+ # Required. Type feed to be ingested into condor
2162
+ # Corresponds to the JSON property `feedType`
2163
+ # @return [String]
2164
+ attr_accessor :feed_type
2165
+
2166
+ # Common model for database resource health signal data.
2167
+ # Corresponds to the JSON property `resourceHealthSignalData`
2168
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData]
2169
+ attr_accessor :resource_health_signal_data
2170
+
2171
+ # DatabaseResourceId will serve as primary key for any resource ingestion event.
2172
+ # Corresponds to the JSON property `resourceId`
2173
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainDatabaseResourceId]
2174
+ attr_accessor :resource_id
2175
+
2176
+ # Common model for database resource instance metadata.
2177
+ # Corresponds to the JSON property `resourceMetadata`
2178
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata]
2179
+ attr_accessor :resource_metadata
2180
+
2181
+ def initialize(**args)
2182
+ update!(**args)
2183
+ end
2184
+
2185
+ # Update properties of this object
2186
+ def update!(**args)
2187
+ @feed_timestamp = args[:feed_timestamp] if args.key?(:feed_timestamp)
2188
+ @feed_type = args[:feed_type] if args.key?(:feed_type)
2189
+ @resource_health_signal_data = args[:resource_health_signal_data] if args.key?(:resource_health_signal_data)
2190
+ @resource_id = args[:resource_id] if args.key?(:resource_id)
2191
+ @resource_metadata = args[:resource_metadata] if args.key?(:resource_metadata)
2192
+ end
2193
+ end
2194
+
2195
+ # Common model for database resource health signal data.
2196
+ class StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData
2197
+ include Google::Apis::Core::Hashable
2198
+
2199
+ # Any other additional metadata
2200
+ # Corresponds to the JSON property `additionalMetadata`
2201
+ # @return [Hash<String,Object>]
2202
+ attr_accessor :additional_metadata
2203
+
2204
+ # Industry standards associated with this signal; if this signal is an issue,
2205
+ # that could be a violation of the associated industry standard(s). For example,
2206
+ # AUTO_BACKUP_DISABLED signal is associated with CIS GCP 1.1, CIS GCP 1.2, CIS
2207
+ # GCP 1.3, NIST 800-53 and ISO-27001 compliance standards. If a database
2208
+ # resource does not have automated backup enable, it will violate these
2209
+ # following industry standards.
2210
+ # Corresponds to the JSON property `compliance`
2211
+ # @return [Array<Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainCompliance>]
2212
+ attr_accessor :compliance
2213
+
2214
+ # Description associated with signal
2215
+ # Corresponds to the JSON property `description`
2216
+ # @return [String]
2217
+ attr_accessor :description
2218
+
2219
+ # The last time at which the event described by this signal took place
2220
+ # Corresponds to the JSON property `eventTime`
2221
+ # @return [String]
2222
+ attr_accessor :event_time
2223
+
2224
+ # The external-uri of the signal, using which more information about this signal
2225
+ # can be obtained. In GCP, this will take user to SCC page to get more details
2226
+ # about signals.
2227
+ # Corresponds to the JSON property `externalUri`
2228
+ # @return [String]
2229
+ attr_accessor :external_uri
2230
+
2231
+ # The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.
2232
+ # Corresponds to the JSON property `name`
2233
+ # @return [String]
2234
+ attr_accessor :name
2235
+
2236
+ # Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged
2237
+ # Corresponds to the JSON property `provider`
2238
+ # @return [String]
2239
+ attr_accessor :provider
2240
+
2241
+ # Closest parent container of this resource. In GCP, 'container' refers to a
2242
+ # Cloud Resource Manager project. It must be resource name of a Cloud Resource
2243
+ # Manager project with the format of "provider//", such as "gcp/projects/123".
2244
+ # Corresponds to the JSON property `resourceContainer`
2245
+ # @return [String]
2246
+ attr_accessor :resource_container
2247
+
2248
+ # Database resource name associated with the signal. Resource name to follow
2249
+ # CAIS resource_name format as noted here go/condor-common-datamodel
2250
+ # Corresponds to the JSON property `resourceName`
2251
+ # @return [String]
2252
+ attr_accessor :resource_name
2253
+
2254
+ # The class of the signal, such as if it's a THREAT or VULNERABILITY.
2255
+ # Corresponds to the JSON property `signalClass`
2256
+ # @return [String]
2257
+ attr_accessor :signal_class
2258
+
2259
+ # Unique identifier for the signal. This is an unique id which would be
2260
+ # mainatined by partner to identify a signal.
2261
+ # Corresponds to the JSON property `signalId`
2262
+ # @return [String]
2263
+ attr_accessor :signal_id
2264
+
2265
+ #
2266
+ # Corresponds to the JSON property `state`
2267
+ # @return [String]
2268
+ attr_accessor :state
2269
+
2270
+ def initialize(**args)
2271
+ update!(**args)
2272
+ end
2273
+
2274
+ # Update properties of this object
2275
+ def update!(**args)
2276
+ @additional_metadata = args[:additional_metadata] if args.key?(:additional_metadata)
2277
+ @compliance = args[:compliance] if args.key?(:compliance)
2278
+ @description = args[:description] if args.key?(:description)
2279
+ @event_time = args[:event_time] if args.key?(:event_time)
2280
+ @external_uri = args[:external_uri] if args.key?(:external_uri)
2281
+ @name = args[:name] if args.key?(:name)
2282
+ @provider = args[:provider] if args.key?(:provider)
2283
+ @resource_container = args[:resource_container] if args.key?(:resource_container)
2284
+ @resource_name = args[:resource_name] if args.key?(:resource_name)
2285
+ @signal_class = args[:signal_class] if args.key?(:signal_class)
2286
+ @signal_id = args[:signal_id] if args.key?(:signal_id)
2287
+ @state = args[:state] if args.key?(:state)
2288
+ end
2289
+ end
2290
+
2291
+ # DatabaseResourceId will serve as primary key for any resource ingestion event.
2292
+ class StorageDatabasecenterPartnerapiV1mainDatabaseResourceId
2293
+ include Google::Apis::Core::Hashable
2294
+
2295
+ # Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged
2296
+ # Corresponds to the JSON property `provider`
2297
+ # @return [String]
2298
+ attr_accessor :provider
2299
+
2300
+ # Optional. Needs to be used only when the provider is PROVIDER_OTHER.
2301
+ # Corresponds to the JSON property `providerDescription`
2302
+ # @return [String]
2303
+ attr_accessor :provider_description
2304
+
2305
+ # Required. The type of resource this ID is identifying. Ex alloydb.googleapis.
2306
+ # com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance
2307
+ # REQUIRED Please refer go/condor-common-datamodel
2308
+ # Corresponds to the JSON property `resourceType`
2309
+ # @return [String]
2310
+ attr_accessor :resource_type
2311
+
2312
+ # Required. A service-local token that distinguishes this resource from other
2313
+ # resources within the same service.
2314
+ # Corresponds to the JSON property `uniqueId`
2315
+ # @return [String]
2316
+ attr_accessor :unique_id
2317
+
2318
+ def initialize(**args)
2319
+ update!(**args)
2320
+ end
2321
+
2322
+ # Update properties of this object
2323
+ def update!(**args)
2324
+ @provider = args[:provider] if args.key?(:provider)
2325
+ @provider_description = args[:provider_description] if args.key?(:provider_description)
2326
+ @resource_type = args[:resource_type] if args.key?(:resource_type)
2327
+ @unique_id = args[:unique_id] if args.key?(:unique_id)
2328
+ end
2329
+ end
2330
+
2331
+ # Common model for database resource instance metadata.
2332
+ class StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata
2333
+ include Google::Apis::Core::Hashable
2334
+
2335
+ # Configuration for availability of database instance
2336
+ # Corresponds to the JSON property `availabilityConfiguration`
2337
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration]
2338
+ attr_accessor :availability_configuration
2339
+
2340
+ # Configuration for automatic backups
2341
+ # Corresponds to the JSON property `backupConfiguration`
2342
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainBackupConfiguration]
2343
+ attr_accessor :backup_configuration
2344
+
2345
+ # A backup run.
2346
+ # Corresponds to the JSON property `backupRun`
2347
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainBackupRun]
2348
+ attr_accessor :backup_run
2349
+
2350
+ # The creation time of the resource, i.e. the time when resource is created and
2351
+ # recorded in partner service.
2352
+ # Corresponds to the JSON property `creationTime`
2353
+ # @return [String]
2354
+ attr_accessor :creation_time
2355
+
2356
+ # Current state of the instance.
2357
+ # Corresponds to the JSON property `currentState`
2358
+ # @return [String]
2359
+ attr_accessor :current_state
2360
+
2361
+ # Any custom metadata associated with the resource (a JSON field)
2362
+ # Corresponds to the JSON property `customMetadata`
2363
+ # @return [Hash<String,Object>]
2364
+ attr_accessor :custom_metadata
2365
+
2366
+ # The state that the instance is expected to be in. For example, an instance
2367
+ # state can transition to UNHEALTHY due to wrong patch update, while the
2368
+ # expected state will remain at the HEALTHY.
2369
+ # Corresponds to the JSON property `expectedState`
2370
+ # @return [String]
2371
+ attr_accessor :expected_state
2372
+
2373
+ # DatabaseResourceId will serve as primary key for any resource ingestion event.
2374
+ # Corresponds to the JSON property `id`
2375
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainDatabaseResourceId]
2376
+ attr_accessor :id
2377
+
2378
+ # The type of the instance. Specified at creation time.
2379
+ # Corresponds to the JSON property `instanceType`
2380
+ # @return [String]
2381
+ attr_accessor :instance_type
2382
+
2383
+ # The resource location. REQUIRED
2384
+ # Corresponds to the JSON property `location`
2385
+ # @return [String]
2386
+ attr_accessor :location
2387
+
2388
+ # DatabaseResourceId will serve as primary key for any resource ingestion event.
2389
+ # Corresponds to the JSON property `primaryResourceId`
2390
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterPartnerapiV1mainDatabaseResourceId]
2391
+ attr_accessor :primary_resource_id
2392
+
2393
+ # Product specification for Condor resources.
2394
+ # Corresponds to the JSON property `product`
2395
+ # @return [Google::Apis::AlloydbV1::StorageDatabasecenterProtoCommonProduct]
2396
+ attr_accessor :product
2397
+
2398
+ # Closest parent Cloud Resource Manager container of this resource. It must be
2399
+ # resource name of a Cloud Resource Manager project with the format of "provider/
2400
+ # /", such as "gcp/projects/123".
2401
+ # Corresponds to the JSON property `resourceContainer`
2402
+ # @return [String]
2403
+ attr_accessor :resource_container
2404
+
2405
+ # Required. Different from DatabaseResourceId.unique_id, a resource name can be
2406
+ # reused over time. That is, after a resource named "ABC" is deleted, the name "
2407
+ # ABC" can be used to to create a new resource within the same source. Resource
2408
+ # name to follow CAIS resource_name format as noted here go/condor-common-
2409
+ # datamodel
2410
+ # Corresponds to the JSON property `resourceName`
2411
+ # @return [String]
2412
+ attr_accessor :resource_name
2413
+
2414
+ # The time at which the resource was updated and recorded at partner service.
2415
+ # Corresponds to the JSON property `updationTime`
2416
+ # @return [String]
2417
+ attr_accessor :updation_time
2418
+
2419
+ # User-provided labels, represented as a dictionary where each label is a single
2420
+ # key value pair.
2421
+ # Corresponds to the JSON property `userLabels`
2422
+ # @return [Hash<String,String>]
2423
+ attr_accessor :user_labels
2424
+
2425
+ def initialize(**args)
2426
+ update!(**args)
2427
+ end
2428
+
2429
+ # Update properties of this object
2430
+ def update!(**args)
2431
+ @availability_configuration = args[:availability_configuration] if args.key?(:availability_configuration)
2432
+ @backup_configuration = args[:backup_configuration] if args.key?(:backup_configuration)
2433
+ @backup_run = args[:backup_run] if args.key?(:backup_run)
2434
+ @creation_time = args[:creation_time] if args.key?(:creation_time)
2435
+ @current_state = args[:current_state] if args.key?(:current_state)
2436
+ @custom_metadata = args[:custom_metadata] if args.key?(:custom_metadata)
2437
+ @expected_state = args[:expected_state] if args.key?(:expected_state)
2438
+ @id = args[:id] if args.key?(:id)
2439
+ @instance_type = args[:instance_type] if args.key?(:instance_type)
2440
+ @location = args[:location] if args.key?(:location)
2441
+ @primary_resource_id = args[:primary_resource_id] if args.key?(:primary_resource_id)
2442
+ @product = args[:product] if args.key?(:product)
2443
+ @resource_container = args[:resource_container] if args.key?(:resource_container)
2444
+ @resource_name = args[:resource_name] if args.key?(:resource_name)
2445
+ @updation_time = args[:updation_time] if args.key?(:updation_time)
2446
+ @user_labels = args[:user_labels] if args.key?(:user_labels)
2447
+ end
2448
+ end
2449
+
2450
+ # An error that occurred during a backup creation operation.
2451
+ class StorageDatabasecenterPartnerapiV1mainOperationError
2452
+ include Google::Apis::Core::Hashable
2453
+
2454
+ # Identifies the specific error that occurred. REQUIRED
2455
+ # Corresponds to the JSON property `code`
2456
+ # @return [String]
2457
+ attr_accessor :code
2458
+
2459
+ # Additional information about the error encountered. REQUIRED
2460
+ # Corresponds to the JSON property `message`
2461
+ # @return [String]
2462
+ attr_accessor :message
2463
+
2464
+ def initialize(**args)
2465
+ update!(**args)
2466
+ end
2467
+
2468
+ # Update properties of this object
2469
+ def update!(**args)
2470
+ @code = args[:code] if args.key?(:code)
2471
+ @message = args[:message] if args.key?(:message)
2472
+ end
2473
+ end
2474
+
2475
+ #
2476
+ class StorageDatabasecenterPartnerapiV1mainRetentionSettings
2477
+ include Google::Apis::Core::Hashable
2478
+
2479
+ #
2480
+ # Corresponds to the JSON property `quantityBasedRetention`
2481
+ # @return [Fixnum]
2482
+ attr_accessor :quantity_based_retention
2483
+
2484
+ # The unit that 'retained_backups' represents.
2485
+ # Corresponds to the JSON property `retentionUnit`
2486
+ # @return [String]
2487
+ attr_accessor :retention_unit
2488
+
2489
+ #
2490
+ # Corresponds to the JSON property `timeBasedRetention`
2491
+ # @return [String]
2492
+ attr_accessor :time_based_retention
2493
+
2494
+ def initialize(**args)
2495
+ update!(**args)
2496
+ end
2497
+
2498
+ # Update properties of this object
2499
+ def update!(**args)
2500
+ @quantity_based_retention = args[:quantity_based_retention] if args.key?(:quantity_based_retention)
2501
+ @retention_unit = args[:retention_unit] if args.key?(:retention_unit)
2502
+ @time_based_retention = args[:time_based_retention] if args.key?(:time_based_retention)
2503
+ end
2504
+ end
2505
+
2506
+ # Product specification for Condor resources.
2507
+ class StorageDatabasecenterProtoCommonProduct
2508
+ include Google::Apis::Core::Hashable
2509
+
2510
+ # The specific engine that the underlying database is running.
2511
+ # Corresponds to the JSON property `engine`
2512
+ # @return [String]
2513
+ attr_accessor :engine
2514
+
2515
+ # Type of specific database product. It could be CloudSQL, AlloyDB etc..
2516
+ # Corresponds to the JSON property `type`
2517
+ # @return [String]
2518
+ attr_accessor :type
2519
+
2520
+ # Version of the underlying database engine. Example values: For MySQL, it could
2521
+ # be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" etc..
2522
+ # Corresponds to the JSON property `version`
2523
+ # @return [String]
2524
+ attr_accessor :version
2525
+
2526
+ def initialize(**args)
2527
+ update!(**args)
2528
+ end
2529
+
2530
+ # Update properties of this object
2531
+ def update!(**args)
2532
+ @engine = args[:engine] if args.key?(:engine)
2533
+ @type = args[:type] if args.key?(:type)
2534
+ @version = args[:version] if args.key?(:version)
2535
+ end
2536
+ end
2537
+
2538
+ # Restrictions on STRING type values
2539
+ class StringRestrictions
2540
+ include Google::Apis::Core::Hashable
2541
+
2542
+ # The list of allowed values, if bounded. This field will be empty if there is a
2543
+ # unbounded number of allowed values.
2544
+ # Corresponds to the JSON property `allowedValues`
2545
+ # @return [Array<String>]
2546
+ attr_accessor :allowed_values
2547
+
2548
+ def initialize(**args)
2549
+ update!(**args)
2550
+ end
2551
+
2552
+ # Update properties of this object
2553
+ def update!(**args)
2554
+ @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
2555
+ end
2556
+ end
2557
+
2558
+ # SupportedDatabaseFlag gives general information about a database flag, like
2559
+ # type and allowed values. This is a static value that is defined on the server
2560
+ # side, and it cannot be modified by callers. To set the Database flags on a
2561
+ # particular Instance, a caller should modify the Instance.database_flags field.
2562
+ class SupportedDatabaseFlag
2563
+ include Google::Apis::Core::Hashable
2564
+
2565
+ # Whether the database flag accepts multiple values. If true, a comma-separated
2566
+ # list of stringified values may be specified.
2567
+ # Corresponds to the JSON property `acceptsMultipleValues`
2568
+ # @return [Boolean]
2569
+ attr_accessor :accepts_multiple_values
2570
+ alias_method :accepts_multiple_values?, :accepts_multiple_values
2571
+
2572
+ # The name of the database flag, e.g. "max_allowed_packets". The is a possibly
2573
+ # key for the Instance.database_flags map field.
2574
+ # Corresponds to the JSON property `flagName`
2575
+ # @return [String]
2576
+ attr_accessor :flag_name
2577
+
2578
+ # Restrictions on INTEGER type values.
2579
+ # Corresponds to the JSON property `integerRestrictions`
2580
+ # @return [Google::Apis::AlloydbV1::IntegerRestrictions]
2581
+ attr_accessor :integer_restrictions
2582
+
2583
+ # The name of the flag resource, following Google Cloud conventions, e.g.: *
2584
+ # projects/`project`/locations/`location`/flags/`flag` This field currently has
2585
+ # no semantic meaning.
2586
+ # Corresponds to the JSON property `name`
2587
+ # @return [String]
2588
+ attr_accessor :name
2589
+
2590
+ # Whether setting or updating this flag on an Instance requires a database
2591
+ # restart. If a flag that requires database restart is set, the backend will
2592
+ # automatically restart the database (making sure to satisfy any availability
2593
+ # SLO's).
2594
+ # Corresponds to the JSON property `requiresDbRestart`
2595
+ # @return [Boolean]
2596
+ attr_accessor :requires_db_restart
2597
+ alias_method :requires_db_restart?, :requires_db_restart
2598
+
2599
+ # Restrictions on STRING type values
2600
+ # Corresponds to the JSON property `stringRestrictions`
2601
+ # @return [Google::Apis::AlloydbV1::StringRestrictions]
2602
+ attr_accessor :string_restrictions
2603
+
2604
+ # Major database engine versions for which this flag is supported.
2605
+ # Corresponds to the JSON property `supportedDbVersions`
2606
+ # @return [Array<String>]
2607
+ attr_accessor :supported_db_versions
2608
+
2609
+ #
2610
+ # Corresponds to the JSON property `valueType`
2611
+ # @return [String]
2612
+ attr_accessor :value_type
2613
+
2614
+ def initialize(**args)
2615
+ update!(**args)
2616
+ end
2617
+
2618
+ # Update properties of this object
2619
+ def update!(**args)
2620
+ @accepts_multiple_values = args[:accepts_multiple_values] if args.key?(:accepts_multiple_values)
2621
+ @flag_name = args[:flag_name] if args.key?(:flag_name)
2622
+ @integer_restrictions = args[:integer_restrictions] if args.key?(:integer_restrictions)
2623
+ @name = args[:name] if args.key?(:name)
2624
+ @requires_db_restart = args[:requires_db_restart] if args.key?(:requires_db_restart)
2625
+ @string_restrictions = args[:string_restrictions] if args.key?(:string_restrictions)
2626
+ @supported_db_versions = args[:supported_db_versions] if args.key?(:supported_db_versions)
2627
+ @value_type = args[:value_type] if args.key?(:value_type)
2628
+ end
2629
+ end
2630
+
2631
+ # A time based retention policy specifies that all backups within a certain time
2632
+ # period should be retained.
2633
+ class TimeBasedRetention
2634
+ include Google::Apis::Core::Hashable
2635
+
2636
+ # The retention period.
2637
+ # Corresponds to the JSON property `retentionPeriod`
2638
+ # @return [String]
2639
+ attr_accessor :retention_period
2640
+
2641
+ def initialize(**args)
2642
+ update!(**args)
2643
+ end
2644
+
2645
+ # Update properties of this object
2646
+ def update!(**args)
2647
+ @retention_period = args[:retention_period] if args.key?(:retention_period)
2648
+ end
2649
+ end
2650
+
2651
+ # Message describing User object.
2652
+ class User
2653
+ include Google::Apis::Core::Hashable
2654
+
2655
+ # Optional. List of database roles this user has. The database role strings are
2656
+ # subject to the PostgreSQL naming conventions.
2657
+ # Corresponds to the JSON property `databaseRoles`
2658
+ # @return [Array<String>]
2659
+ attr_accessor :database_roles
2660
+
2661
+ # Output only. Name of the resource in the form of projects/`project`/locations/`
2662
+ # location`/cluster/`cluster`/users/`user`.
2663
+ # Corresponds to the JSON property `name`
2664
+ # @return [String]
2665
+ attr_accessor :name
2666
+
2667
+ # Input only. Password for the user.
2668
+ # Corresponds to the JSON property `password`
2669
+ # @return [String]
2670
+ attr_accessor :password
2671
+
2672
+ # Optional. Type of this user.
2673
+ # Corresponds to the JSON property `userType`
2674
+ # @return [String]
2675
+ attr_accessor :user_type
2676
+
2677
+ def initialize(**args)
2678
+ update!(**args)
2679
+ end
2680
+
2681
+ # Update properties of this object
2682
+ def update!(**args)
2683
+ @database_roles = args[:database_roles] if args.key?(:database_roles)
2684
+ @name = args[:name] if args.key?(:name)
2685
+ @password = args[:password] if args.key?(:password)
2686
+ @user_type = args[:user_type] if args.key?(:user_type)
2687
+ end
2688
+ end
2689
+
2690
+ # The username/password for a database user. Used for specifying initial users
2691
+ # at cluster creation time.
2692
+ class UserPassword
2693
+ include Google::Apis::Core::Hashable
2694
+
2695
+ # The initial password for the user.
2696
+ # Corresponds to the JSON property `password`
2697
+ # @return [String]
2698
+ attr_accessor :password
2699
+
2700
+ # The database username.
2701
+ # Corresponds to the JSON property `user`
2702
+ # @return [String]
2703
+ attr_accessor :user
2704
+
2705
+ def initialize(**args)
2706
+ update!(**args)
2707
+ end
2708
+
2709
+ # Update properties of this object
2710
+ def update!(**args)
2711
+ @password = args[:password] if args.key?(:password)
2712
+ @user = args[:user] if args.key?(:user)
2713
+ end
2714
+ end
2715
+
2716
+ # A weekly schedule starts a backup at prescribed start times within a day, for
2717
+ # the specified days of the week. The weekly schedule message is flexible and
2718
+ # can be used to create many types of schedules. For example, to have a daily
2719
+ # backup that starts at 22:00, configure the `start_times` field to have one
2720
+ # element "22:00" and the `days_of_week` field to have all seven days of the
2721
+ # week.
2722
+ class WeeklySchedule
2723
+ include Google::Apis::Core::Hashable
2724
+
2725
+ # The days of the week to perform a backup. If this field is left empty, the
2726
+ # default of every day of the week is used.
2727
+ # Corresponds to the JSON property `daysOfWeek`
2728
+ # @return [Array<String>]
2729
+ attr_accessor :days_of_week
2730
+
2731
+ # The times during the day to start a backup. The start times are assumed to be
2732
+ # in UTC and to be an exact hour (e.g., 04:00:00). If no start times are
2733
+ # provided, a single fixed start time is chosen arbitrarily.
2734
+ # Corresponds to the JSON property `startTimes`
2735
+ # @return [Array<Google::Apis::AlloydbV1::GoogleTypeTimeOfDay>]
2736
+ attr_accessor :start_times
2737
+
2738
+ def initialize(**args)
2739
+ update!(**args)
2740
+ end
2741
+
2742
+ # Update properties of this object
2743
+ def update!(**args)
2744
+ @days_of_week = args[:days_of_week] if args.key?(:days_of_week)
2745
+ @start_times = args[:start_times] if args.key?(:start_times)
2746
+ end
2747
+ end
2748
+ end
2749
+ end
2750
+ end