google-apis-sqladmin_v1 0.1.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6b9664fc26ffd61f9fd0027baae368afc5876cc18cbffd22394dce7b63fcae5
4
- data.tar.gz: e07737f759b278b4655e50feb757c12ab93ecf93b9a047f89b5a10d523d43b3e
3
+ metadata.gz: d3804e8fe5e7e20f438892bc14f0ce771765b8049bb265dc9abc3686daca0bd2
4
+ data.tar.gz: f15cd4481eebea0c944cb58647ad6665c44ba4ac722f8d972d7fe60dc38c78b5
5
5
  SHA512:
6
- metadata.gz: fc1a412ade7c646581f82c00b63f334a2f78df97e3420c713e29334a3429bf1036b003222ffb6d88dace42e216c14e3ff7a211bb611a5c0eb2a516166690ee5d
7
- data.tar.gz: 10a6ab3dc18b731af604944e1430c44de4f05d8e0a674b25c3d713e2dab30340eb116d0904be18d34cca244de76c85416750db51215194f481aa1800ec8cdde2
6
+ metadata.gz: 30f5645f91a00bafa7c64421acbfc8bad117036f897b9e89690a1bb6612428de68c8a52f6fb47367e51b3e9af63423e78dc93d1c5952a5a3625ef96ae8b502e8
7
+ data.tar.gz: e5eb911d106a7a24b92d59269b2e42949af3eba7a9478a67baf202fadecf929d2c3b99647794b5af182efcb7c890262a9d19ebe1cadf9772bd1e64432b100e73
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Release history for google-apis-sqladmin_v1
2
2
 
3
+ ### v0.5.0 (2021-09-10)
4
+
5
+ * Regenerated from discovery document revision 20210902
6
+
7
+ ### v0.4.0 (2021-09-01)
8
+
9
+ * Regenerated from discovery document revision 20210816
10
+
11
+ ### v0.3.0 (2021-07-29)
12
+
13
+ * Regenerated from discovery document revision 20210715
14
+
15
+ ### v0.2.0 (2021-07-14)
16
+
17
+ * Regenerated from discovery document revision 20210627
18
+
3
19
  ### v0.1.0 (2021-06-30)
4
20
 
5
21
  * Regenerated from discovery document revision 20210608
@@ -21,6 +21,3549 @@ require 'google/apis/errors'
21
21
  module Google
22
22
  module Apis
23
23
  module SqladminV1
24
+
25
+ # An entry for an Access Control list.
26
+ class AclEntry
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The time when this access control entry expires in [RFC 3339](https://tools.
30
+ # ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
31
+ # Corresponds to the JSON property `expirationTime`
32
+ # @return [String]
33
+ attr_accessor :expiration_time
34
+
35
+ # This is always **sql#aclEntry**.
36
+ # Corresponds to the JSON property `kind`
37
+ # @return [String]
38
+ attr_accessor :kind
39
+
40
+ # Optional. A label to identify this entry.
41
+ # Corresponds to the JSON property `name`
42
+ # @return [String]
43
+ attr_accessor :name
44
+
45
+ # The allowlisted value for the access control list.
46
+ # Corresponds to the JSON property `value`
47
+ # @return [String]
48
+ attr_accessor :value
49
+
50
+ def initialize(**args)
51
+ update!(**args)
52
+ end
53
+
54
+ # Update properties of this object
55
+ def update!(**args)
56
+ @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
57
+ @kind = args[:kind] if args.key?(:kind)
58
+ @name = args[:name] if args.key?(:name)
59
+ @value = args[:value] if args.key?(:value)
60
+ end
61
+ end
62
+
63
+ # An Admin API warning message.
64
+ class ApiWarning
65
+ include Google::Apis::Core::Hashable
66
+
67
+ # Code to uniquely identify the warning type.
68
+ # Corresponds to the JSON property `code`
69
+ # @return [String]
70
+ attr_accessor :code
71
+
72
+ # The warning message.
73
+ # Corresponds to the JSON property `message`
74
+ # @return [String]
75
+ attr_accessor :message
76
+
77
+ # The region name for REGION_UNREACHABLE warning.
78
+ # Corresponds to the JSON property `region`
79
+ # @return [String]
80
+ attr_accessor :region
81
+
82
+ def initialize(**args)
83
+ update!(**args)
84
+ end
85
+
86
+ # Update properties of this object
87
+ def update!(**args)
88
+ @code = args[:code] if args.key?(:code)
89
+ @message = args[:message] if args.key?(:message)
90
+ @region = args[:region] if args.key?(:region)
91
+ end
92
+ end
93
+
94
+ # Database instance backup configuration.
95
+ class BackupConfiguration
96
+ include Google::Apis::Core::Hashable
97
+
98
+ # We currently only support backup retention by specifying the number of backups
99
+ # we will retain.
100
+ # Corresponds to the JSON property `backupRetentionSettings`
101
+ # @return [Google::Apis::SqladminV1::BackupRetentionSettings]
102
+ attr_accessor :backup_retention_settings
103
+
104
+ # (MySQL only) Whether binary log is enabled. If backup configuration is
105
+ # disabled, binarylog must be disabled as well.
106
+ # Corresponds to the JSON property `binaryLogEnabled`
107
+ # @return [Boolean]
108
+ attr_accessor :binary_log_enabled
109
+ alias_method :binary_log_enabled?, :binary_log_enabled
110
+
111
+ # Whether this configuration is enabled.
112
+ # Corresponds to the JSON property `enabled`
113
+ # @return [Boolean]
114
+ attr_accessor :enabled
115
+ alias_method :enabled?, :enabled
116
+
117
+ # This is always **sql#backupConfiguration**.
118
+ # Corresponds to the JSON property `kind`
119
+ # @return [String]
120
+ attr_accessor :kind
121
+
122
+ # Location of the backup
123
+ # Corresponds to the JSON property `location`
124
+ # @return [String]
125
+ attr_accessor :location
126
+
127
+ # (Postgres only) Whether point in time recovery is enabled.
128
+ # Corresponds to the JSON property `pointInTimeRecoveryEnabled`
129
+ # @return [Boolean]
130
+ attr_accessor :point_in_time_recovery_enabled
131
+ alias_method :point_in_time_recovery_enabled?, :point_in_time_recovery_enabled
132
+
133
+ # Reserved for future use.
134
+ # Corresponds to the JSON property `replicationLogArchivingEnabled`
135
+ # @return [Boolean]
136
+ attr_accessor :replication_log_archiving_enabled
137
+ alias_method :replication_log_archiving_enabled?, :replication_log_archiving_enabled
138
+
139
+ # Start time for the daily backup configuration in UTC timezone in the 24 hour
140
+ # format - **HH:MM**.
141
+ # Corresponds to the JSON property `startTime`
142
+ # @return [String]
143
+ attr_accessor :start_time
144
+
145
+ # The number of days of transaction logs we retain for point in time restore,
146
+ # from 1-7.
147
+ # Corresponds to the JSON property `transactionLogRetentionDays`
148
+ # @return [Fixnum]
149
+ attr_accessor :transaction_log_retention_days
150
+
151
+ def initialize(**args)
152
+ update!(**args)
153
+ end
154
+
155
+ # Update properties of this object
156
+ def update!(**args)
157
+ @backup_retention_settings = args[:backup_retention_settings] if args.key?(:backup_retention_settings)
158
+ @binary_log_enabled = args[:binary_log_enabled] if args.key?(:binary_log_enabled)
159
+ @enabled = args[:enabled] if args.key?(:enabled)
160
+ @kind = args[:kind] if args.key?(:kind)
161
+ @location = args[:location] if args.key?(:location)
162
+ @point_in_time_recovery_enabled = args[:point_in_time_recovery_enabled] if args.key?(:point_in_time_recovery_enabled)
163
+ @replication_log_archiving_enabled = args[:replication_log_archiving_enabled] if args.key?(:replication_log_archiving_enabled)
164
+ @start_time = args[:start_time] if args.key?(:start_time)
165
+ @transaction_log_retention_days = args[:transaction_log_retention_days] if args.key?(:transaction_log_retention_days)
166
+ end
167
+ end
168
+
169
+ # Backup context.
170
+ class BackupContext
171
+ include Google::Apis::Core::Hashable
172
+
173
+ # The identifier of the backup.
174
+ # Corresponds to the JSON property `backupId`
175
+ # @return [Fixnum]
176
+ attr_accessor :backup_id
177
+
178
+ # This is always **sql#backupContext**.
179
+ # Corresponds to the JSON property `kind`
180
+ # @return [String]
181
+ attr_accessor :kind
182
+
183
+ def initialize(**args)
184
+ update!(**args)
185
+ end
186
+
187
+ # Update properties of this object
188
+ def update!(**args)
189
+ @backup_id = args[:backup_id] if args.key?(:backup_id)
190
+ @kind = args[:kind] if args.key?(:kind)
191
+ end
192
+ end
193
+
194
+ # We currently only support backup retention by specifying the number of backups
195
+ # we will retain.
196
+ class BackupRetentionSettings
197
+ include Google::Apis::Core::Hashable
198
+
199
+ # Depending on the value of retention_unit, this is used to determine if a
200
+ # backup needs to be deleted. If retention_unit is 'COUNT', we will retain this
201
+ # many backups.
202
+ # Corresponds to the JSON property `retainedBackups`
203
+ # @return [Fixnum]
204
+ attr_accessor :retained_backups
205
+
206
+ # The unit that 'retained_backups' represents.
207
+ # Corresponds to the JSON property `retentionUnit`
208
+ # @return [String]
209
+ attr_accessor :retention_unit
210
+
211
+ def initialize(**args)
212
+ update!(**args)
213
+ end
214
+
215
+ # Update properties of this object
216
+ def update!(**args)
217
+ @retained_backups = args[:retained_backups] if args.key?(:retained_backups)
218
+ @retention_unit = args[:retention_unit] if args.key?(:retention_unit)
219
+ end
220
+ end
221
+
222
+ # A BackupRun resource.
223
+ class BackupRun
224
+ include Google::Apis::Core::Hashable
225
+
226
+ # Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
227
+ # Corresponds to the JSON property `backupKind`
228
+ # @return [String]
229
+ attr_accessor :backup_kind
230
+
231
+ # The description of this run, only applicable to on-demand backups.
232
+ # Corresponds to the JSON property `description`
233
+ # @return [String]
234
+ attr_accessor :description
235
+
236
+ # Disk encryption configuration for an instance.
237
+ # Corresponds to the JSON property `diskEncryptionConfiguration`
238
+ # @return [Google::Apis::SqladminV1::DiskEncryptionConfiguration]
239
+ attr_accessor :disk_encryption_configuration
240
+
241
+ # Disk encryption status for an instance.
242
+ # Corresponds to the JSON property `diskEncryptionStatus`
243
+ # @return [Google::Apis::SqladminV1::DiskEncryptionStatus]
244
+ attr_accessor :disk_encryption_status
245
+
246
+ # The time the backup operation completed in UTC timezone in RFC 3339 format,
247
+ # for example *2012-11-15T16:19:00.094Z*.
248
+ # Corresponds to the JSON property `endTime`
249
+ # @return [String]
250
+ attr_accessor :end_time
251
+
252
+ # The time the run was enqueued in UTC timezone in RFC 3339 format, for example *
253
+ # 2012-11-15T16:19:00.094Z*.
254
+ # Corresponds to the JSON property `enqueuedTime`
255
+ # @return [String]
256
+ attr_accessor :enqueued_time
257
+
258
+ # Database instance operation error.
259
+ # Corresponds to the JSON property `error`
260
+ # @return [Google::Apis::SqladminV1::OperationError]
261
+ attr_accessor :error
262
+
263
+ # The identifier for this backup run. Unique only for a specific Cloud SQL
264
+ # instance.
265
+ # Corresponds to the JSON property `id`
266
+ # @return [Fixnum]
267
+ attr_accessor :id
268
+
269
+ # Name of the database instance.
270
+ # Corresponds to the JSON property `instance`
271
+ # @return [String]
272
+ attr_accessor :instance
273
+
274
+ # This is always *sql#backupRun*.
275
+ # Corresponds to the JSON property `kind`
276
+ # @return [String]
277
+ attr_accessor :kind
278
+
279
+ # Location of the backups.
280
+ # Corresponds to the JSON property `location`
281
+ # @return [String]
282
+ attr_accessor :location
283
+
284
+ # The URI of this resource.
285
+ # Corresponds to the JSON property `selfLink`
286
+ # @return [String]
287
+ attr_accessor :self_link
288
+
289
+ # The time the backup operation actually started in UTC timezone in RFC 3339
290
+ # format, for example *2012-11-15T16:19:00.094Z*.
291
+ # Corresponds to the JSON property `startTime`
292
+ # @return [String]
293
+ attr_accessor :start_time
294
+
295
+ # The status of this run.
296
+ # Corresponds to the JSON property `status`
297
+ # @return [String]
298
+ attr_accessor :status
299
+
300
+ # The type of this run; can be either "AUTOMATED" or "ON_DEMAND". This field
301
+ # defaults to "ON_DEMAND" and is ignored, when specified for insert requests.
302
+ # Corresponds to the JSON property `type`
303
+ # @return [String]
304
+ attr_accessor :type
305
+
306
+ # The start time of the backup window during which this the backup was attempted
307
+ # in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
308
+ # Corresponds to the JSON property `windowStartTime`
309
+ # @return [String]
310
+ attr_accessor :window_start_time
311
+
312
+ def initialize(**args)
313
+ update!(**args)
314
+ end
315
+
316
+ # Update properties of this object
317
+ def update!(**args)
318
+ @backup_kind = args[:backup_kind] if args.key?(:backup_kind)
319
+ @description = args[:description] if args.key?(:description)
320
+ @disk_encryption_configuration = args[:disk_encryption_configuration] if args.key?(:disk_encryption_configuration)
321
+ @disk_encryption_status = args[:disk_encryption_status] if args.key?(:disk_encryption_status)
322
+ @end_time = args[:end_time] if args.key?(:end_time)
323
+ @enqueued_time = args[:enqueued_time] if args.key?(:enqueued_time)
324
+ @error = args[:error] if args.key?(:error)
325
+ @id = args[:id] if args.key?(:id)
326
+ @instance = args[:instance] if args.key?(:instance)
327
+ @kind = args[:kind] if args.key?(:kind)
328
+ @location = args[:location] if args.key?(:location)
329
+ @self_link = args[:self_link] if args.key?(:self_link)
330
+ @start_time = args[:start_time] if args.key?(:start_time)
331
+ @status = args[:status] if args.key?(:status)
332
+ @type = args[:type] if args.key?(:type)
333
+ @window_start_time = args[:window_start_time] if args.key?(:window_start_time)
334
+ end
335
+ end
336
+
337
+ # Backup run list results.
338
+ class BackupRunsListResponse
339
+ include Google::Apis::Core::Hashable
340
+
341
+ # A list of backup runs in reverse chronological order of the enqueued time.
342
+ # Corresponds to the JSON property `items`
343
+ # @return [Array<Google::Apis::SqladminV1::BackupRun>]
344
+ attr_accessor :items
345
+
346
+ # This is always *sql#backupRunsList*.
347
+ # Corresponds to the JSON property `kind`
348
+ # @return [String]
349
+ attr_accessor :kind
350
+
351
+ # The continuation token, used to page through large result sets. Provide this
352
+ # value in a subsequent request to return the next page of results.
353
+ # Corresponds to the JSON property `nextPageToken`
354
+ # @return [String]
355
+ attr_accessor :next_page_token
356
+
357
+ def initialize(**args)
358
+ update!(**args)
359
+ end
360
+
361
+ # Update properties of this object
362
+ def update!(**args)
363
+ @items = args[:items] if args.key?(:items)
364
+ @kind = args[:kind] if args.key?(:kind)
365
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
366
+ end
367
+ end
368
+
369
+ # Binary log coordinates.
370
+ class BinLogCoordinates
371
+ include Google::Apis::Core::Hashable
372
+
373
+ # Name of the binary log file for a Cloud SQL instance.
374
+ # Corresponds to the JSON property `binLogFileName`
375
+ # @return [String]
376
+ attr_accessor :bin_log_file_name
377
+
378
+ # Position (offset) within the binary log file.
379
+ # Corresponds to the JSON property `binLogPosition`
380
+ # @return [Fixnum]
381
+ attr_accessor :bin_log_position
382
+
383
+ # This is always *sql#binLogCoordinates*.
384
+ # Corresponds to the JSON property `kind`
385
+ # @return [String]
386
+ attr_accessor :kind
387
+
388
+ def initialize(**args)
389
+ update!(**args)
390
+ end
391
+
392
+ # Update properties of this object
393
+ def update!(**args)
394
+ @bin_log_file_name = args[:bin_log_file_name] if args.key?(:bin_log_file_name)
395
+ @bin_log_position = args[:bin_log_position] if args.key?(:bin_log_position)
396
+ @kind = args[:kind] if args.key?(:kind)
397
+ end
398
+ end
399
+
400
+ # Database instance clone context.
401
+ class CloneContext
402
+ include Google::Apis::Core::Hashable
403
+
404
+ # Binary log coordinates.
405
+ # Corresponds to the JSON property `binLogCoordinates`
406
+ # @return [Google::Apis::SqladminV1::BinLogCoordinates]
407
+ attr_accessor :bin_log_coordinates
408
+
409
+ # Name of the Cloud SQL instance to be created as a clone.
410
+ # Corresponds to the JSON property `destinationInstanceName`
411
+ # @return [String]
412
+ attr_accessor :destination_instance_name
413
+
414
+ # This is always *sql#cloneContext*.
415
+ # Corresponds to the JSON property `kind`
416
+ # @return [String]
417
+ attr_accessor :kind
418
+
419
+ # Reserved for future use.
420
+ # Corresponds to the JSON property `pitrTimestampMs`
421
+ # @return [Fixnum]
422
+ attr_accessor :pitr_timestamp_ms
423
+
424
+ # Timestamp, if specified, identifies the time to which the source instance is
425
+ # cloned.
426
+ # Corresponds to the JSON property `pointInTime`
427
+ # @return [String]
428
+ attr_accessor :point_in_time
429
+
430
+ def initialize(**args)
431
+ update!(**args)
432
+ end
433
+
434
+ # Update properties of this object
435
+ def update!(**args)
436
+ @bin_log_coordinates = args[:bin_log_coordinates] if args.key?(:bin_log_coordinates)
437
+ @destination_instance_name = args[:destination_instance_name] if args.key?(:destination_instance_name)
438
+ @kind = args[:kind] if args.key?(:kind)
439
+ @pitr_timestamp_ms = args[:pitr_timestamp_ms] if args.key?(:pitr_timestamp_ms)
440
+ @point_in_time = args[:point_in_time] if args.key?(:point_in_time)
441
+ end
442
+ end
443
+
444
+ # Connect settings retrieval response.
445
+ class ConnectSettings
446
+ include Google::Apis::Core::Hashable
447
+
448
+ # **SECOND_GEN**: Cloud SQL database instance. **EXTERNAL**: A database server
449
+ # that is not managed by Google. This property is read-only; use the **tier**
450
+ # property in the **settings** object to determine the database type.
451
+ # Corresponds to the JSON property `backendType`
452
+ # @return [String]
453
+ attr_accessor :backend_type
454
+
455
+ # The database engine type and version. The **databaseVersion** field cannot be
456
+ # changed after instance creation. MySQL instances: **MYSQL_8_0**, **MYSQL_5_7**
457
+ # (default), or **MYSQL_5_6**. PostgreSQL instances: **POSTGRES_9_6**, **
458
+ # POSTGRES_10**, **POSTGRES_11** or **POSTGRES_12** (default). SQL Server
459
+ # instances: **SQLSERVER_2017_STANDARD** (default), **SQLSERVER_2017_ENTERPRISE**
460
+ # , **SQLSERVER_2017_EXPRESS**, or **SQLSERVER_2017_WEB**.
461
+ # Corresponds to the JSON property `databaseVersion`
462
+ # @return [String]
463
+ attr_accessor :database_version
464
+
465
+ # The assigned IP addresses for the instance.
466
+ # Corresponds to the JSON property `ipAddresses`
467
+ # @return [Array<Google::Apis::SqladminV1::IpMapping>]
468
+ attr_accessor :ip_addresses
469
+
470
+ # This is always `sql#connectSettings`.
471
+ # Corresponds to the JSON property `kind`
472
+ # @return [String]
473
+ attr_accessor :kind
474
+
475
+ # The cloud region for the instance. e.g. **us-central1**, **europe-west1**. The
476
+ # region cannot be changed after instance creation.
477
+ # Corresponds to the JSON property `region`
478
+ # @return [String]
479
+ attr_accessor :region
480
+
481
+ # SslCerts Resource
482
+ # Corresponds to the JSON property `serverCaCert`
483
+ # @return [Google::Apis::SqladminV1::SslCert]
484
+ attr_accessor :server_ca_cert
485
+
486
+ def initialize(**args)
487
+ update!(**args)
488
+ end
489
+
490
+ # Update properties of this object
491
+ def update!(**args)
492
+ @backend_type = args[:backend_type] if args.key?(:backend_type)
493
+ @database_version = args[:database_version] if args.key?(:database_version)
494
+ @ip_addresses = args[:ip_addresses] if args.key?(:ip_addresses)
495
+ @kind = args[:kind] if args.key?(:kind)
496
+ @region = args[:region] if args.key?(:region)
497
+ @server_ca_cert = args[:server_ca_cert] if args.key?(:server_ca_cert)
498
+ end
499
+ end
500
+
501
+ # Represents a SQL database on the Cloud SQL instance.
502
+ class Database
503
+ include Google::Apis::Core::Hashable
504
+
505
+ # The Cloud SQL charset value.
506
+ # Corresponds to the JSON property `charset`
507
+ # @return [String]
508
+ attr_accessor :charset
509
+
510
+ # The Cloud SQL collation value.
511
+ # Corresponds to the JSON property `collation`
512
+ # @return [String]
513
+ attr_accessor :collation
514
+
515
+ # This field is deprecated and will be removed from a future version of the API.
516
+ # Corresponds to the JSON property `etag`
517
+ # @return [String]
518
+ attr_accessor :etag
519
+
520
+ # The name of the Cloud SQL instance. This does not include the project ID.
521
+ # Corresponds to the JSON property `instance`
522
+ # @return [String]
523
+ attr_accessor :instance
524
+
525
+ # This is always **sql#database**.
526
+ # Corresponds to the JSON property `kind`
527
+ # @return [String]
528
+ attr_accessor :kind
529
+
530
+ # The name of the database in the Cloud SQL instance. This does not include the
531
+ # project ID or instance name.
532
+ # Corresponds to the JSON property `name`
533
+ # @return [String]
534
+ attr_accessor :name
535
+
536
+ # The project ID of the project containing the Cloud SQL database. The Google
537
+ # apps domain is prefixed if applicable.
538
+ # Corresponds to the JSON property `project`
539
+ # @return [String]
540
+ attr_accessor :project
541
+
542
+ # The URI of this resource.
543
+ # Corresponds to the JSON property `selfLink`
544
+ # @return [String]
545
+ attr_accessor :self_link
546
+
547
+ # Represents a Sql Server database on the Cloud SQL instance.
548
+ # Corresponds to the JSON property `sqlserverDatabaseDetails`
549
+ # @return [Google::Apis::SqladminV1::SqlServerDatabaseDetails]
550
+ attr_accessor :sqlserver_database_details
551
+
552
+ def initialize(**args)
553
+ update!(**args)
554
+ end
555
+
556
+ # Update properties of this object
557
+ def update!(**args)
558
+ @charset = args[:charset] if args.key?(:charset)
559
+ @collation = args[:collation] if args.key?(:collation)
560
+ @etag = args[:etag] if args.key?(:etag)
561
+ @instance = args[:instance] if args.key?(:instance)
562
+ @kind = args[:kind] if args.key?(:kind)
563
+ @name = args[:name] if args.key?(:name)
564
+ @project = args[:project] if args.key?(:project)
565
+ @self_link = args[:self_link] if args.key?(:self_link)
566
+ @sqlserver_database_details = args[:sqlserver_database_details] if args.key?(:sqlserver_database_details)
567
+ end
568
+ end
569
+
570
+ # Database flags for Cloud SQL instances.
571
+ class DatabaseFlags
572
+ include Google::Apis::Core::Hashable
573
+
574
+ # The name of the flag. These flags are passed at instance startup, so include
575
+ # both server options and system variables. Flags are specified with underscores,
576
+ # not hyphens. For more information, see [Configuring Database Flags](https://
577
+ # cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL documentation.
578
+ # Corresponds to the JSON property `name`
579
+ # @return [String]
580
+ attr_accessor :name
581
+
582
+ # The value of the flag. Booleans are set to **on** for true and **off** for
583
+ # false. This field must be omitted if the flag doesn't take a value.
584
+ # Corresponds to the JSON property `value`
585
+ # @return [String]
586
+ attr_accessor :value
587
+
588
+ def initialize(**args)
589
+ update!(**args)
590
+ end
591
+
592
+ # Update properties of this object
593
+ def update!(**args)
594
+ @name = args[:name] if args.key?(:name)
595
+ @value = args[:value] if args.key?(:value)
596
+ end
597
+ end
598
+
599
+ # A Cloud SQL instance resource.
600
+ class DatabaseInstance
601
+ include Google::Apis::Core::Hashable
602
+
603
+ # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that
604
+ # is not managed by Google. This property is read-only; use the *tier* property
605
+ # in the *settings* object to determine the database type.
606
+ # Corresponds to the JSON property `backendType`
607
+ # @return [String]
608
+ attr_accessor :backend_type
609
+
610
+ # Connection name of the Cloud SQL instance used in connection strings.
611
+ # Corresponds to the JSON property `connectionName`
612
+ # @return [String]
613
+ attr_accessor :connection_name
614
+
615
+ # Output only. The time when the instance was created in RFC 3339 format (https:/
616
+ # /tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
617
+ # Corresponds to the JSON property `createTime`
618
+ # @return [String]
619
+ attr_accessor :create_time
620
+
621
+ # The current disk usage of the instance in bytes. This property has been
622
+ # deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric
623
+ # in Cloud Monitoring API instead. Please see this announcement for details.
624
+ # Corresponds to the JSON property `currentDiskSize`
625
+ # @return [Fixnum]
626
+ attr_accessor :current_disk_size
627
+
628
+ # The database engine type and version. The *databaseVersion* field cannot be
629
+ # changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (
630
+ # default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*,
631
+ # *POSTGRES_11*, *POSTGRES_12*, *POSTGRES_13* (default). SQL Server instances: *
632
+ # SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*
633
+ # , or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *
634
+ # SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
635
+ # Corresponds to the JSON property `databaseVersion`
636
+ # @return [String]
637
+ attr_accessor :database_version
638
+
639
+ # Disk encryption configuration for an instance.
640
+ # Corresponds to the JSON property `diskEncryptionConfiguration`
641
+ # @return [Google::Apis::SqladminV1::DiskEncryptionConfiguration]
642
+ attr_accessor :disk_encryption_configuration
643
+
644
+ # Disk encryption status for an instance.
645
+ # Corresponds to the JSON property `diskEncryptionStatus`
646
+ # @return [Google::Apis::SqladminV1::DiskEncryptionStatus]
647
+ attr_accessor :disk_encryption_status
648
+
649
+ # This field is deprecated and will be removed from a future version of the API.
650
+ # Use the *settings.settingsVersion* field instead.
651
+ # Corresponds to the JSON property `etag`
652
+ # @return [String]
653
+ attr_accessor :etag
654
+
655
+ # The name and status of the failover replica.
656
+ # Corresponds to the JSON property `failoverReplica`
657
+ # @return [Google::Apis::SqladminV1::DatabaseInstance::FailoverReplica]
658
+ attr_accessor :failover_replica
659
+
660
+ # The Compute Engine zone that the instance is currently serving from. This
661
+ # value could be different from the zone that was specified when the instance
662
+ # was created if the instance has failed over to its secondary zone.
663
+ # Corresponds to the JSON property `gceZone`
664
+ # @return [String]
665
+ attr_accessor :gce_zone
666
+
667
+ # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A
668
+ # Cloud SQL instance that is not replicating from a primary instance. *
669
+ # ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *
670
+ # READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
671
+ # Corresponds to the JSON property `instanceType`
672
+ # @return [String]
673
+ attr_accessor :instance_type
674
+
675
+ # The assigned IP addresses for the instance.
676
+ # Corresponds to the JSON property `ipAddresses`
677
+ # @return [Array<Google::Apis::SqladminV1::IpMapping>]
678
+ attr_accessor :ip_addresses
679
+
680
+ # The IPv6 address assigned to the instance. (Deprecated) This property was
681
+ # applicable only to First Generation instances.
682
+ # Corresponds to the JSON property `ipv6Address`
683
+ # @return [String]
684
+ attr_accessor :ipv6_address
685
+
686
+ # This is always *sql#instance*.
687
+ # Corresponds to the JSON property `kind`
688
+ # @return [String]
689
+ attr_accessor :kind
690
+
691
+ # The name of the instance which will act as primary in the replication setup.
692
+ # Corresponds to the JSON property `masterInstanceName`
693
+ # @return [String]
694
+ attr_accessor :master_instance_name
695
+
696
+ # The maximum disk size of the instance in bytes.
697
+ # Corresponds to the JSON property `maxDiskSize`
698
+ # @return [Fixnum]
699
+ attr_accessor :max_disk_size
700
+
701
+ # Name of the Cloud SQL instance. This does not include the project ID.
702
+ # Corresponds to the JSON property `name`
703
+ # @return [String]
704
+ attr_accessor :name
705
+
706
+ # On-premises instance configuration.
707
+ # Corresponds to the JSON property `onPremisesConfiguration`
708
+ # @return [Google::Apis::SqladminV1::OnPremisesConfiguration]
709
+ attr_accessor :on_premises_configuration
710
+
711
+ # This message wraps up the information written by out-of-disk detection job.
712
+ # Corresponds to the JSON property `outOfDiskReport`
713
+ # @return [Google::Apis::SqladminV1::SqlOutOfDiskReport]
714
+ attr_accessor :out_of_disk_report
715
+
716
+ # The project ID of the project containing the Cloud SQL instance. The Google
717
+ # apps domain is prefixed if applicable.
718
+ # Corresponds to the JSON property `project`
719
+ # @return [String]
720
+ attr_accessor :project
721
+
722
+ # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-
723
+ # central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*.
724
+ # Defaults to *us-central* or *us-central1* depending on the instance type. The
725
+ # region cannot be changed after instance creation.
726
+ # Corresponds to the JSON property `region`
727
+ # @return [String]
728
+ attr_accessor :region
729
+
730
+ # Read-replica configuration for connecting to the primary instance.
731
+ # Corresponds to the JSON property `replicaConfiguration`
732
+ # @return [Google::Apis::SqladminV1::ReplicaConfiguration]
733
+ attr_accessor :replica_configuration
734
+
735
+ # The replicas of the instance.
736
+ # Corresponds to the JSON property `replicaNames`
737
+ # @return [Array<String>]
738
+ attr_accessor :replica_names
739
+
740
+ # Initial root password. Use only on creation.
741
+ # Corresponds to the JSON property `rootPassword`
742
+ # @return [String]
743
+ attr_accessor :root_password
744
+
745
+ # The status indicating if instance satisfiesPzs. Reserved for future use.
746
+ # Corresponds to the JSON property `satisfiesPzs`
747
+ # @return [Boolean]
748
+ attr_accessor :satisfies_pzs
749
+ alias_method :satisfies_pzs?, :satisfies_pzs
750
+
751
+ # Any scheduled maintenancce for this instance.
752
+ # Corresponds to the JSON property `scheduledMaintenance`
753
+ # @return [Google::Apis::SqladminV1::SqlScheduledMaintenance]
754
+ attr_accessor :scheduled_maintenance
755
+
756
+ # The Compute Engine zone that the failover instance is currently serving from
757
+ # for a regional instance. This value could be different from the zone that was
758
+ # specified when the instance was created if the instance has failed over to its
759
+ # secondary/failover zone. Reserved for future use.
760
+ # Corresponds to the JSON property `secondaryGceZone`
761
+ # @return [String]
762
+ attr_accessor :secondary_gce_zone
763
+
764
+ # The URI of this resource.
765
+ # Corresponds to the JSON property `selfLink`
766
+ # @return [String]
767
+ attr_accessor :self_link
768
+
769
+ # SslCerts Resource
770
+ # Corresponds to the JSON property `serverCaCert`
771
+ # @return [Google::Apis::SqladminV1::SslCert]
772
+ attr_accessor :server_ca_cert
773
+
774
+ # The service account email address assigned to the instance. This property is
775
+ # read-only.
776
+ # Corresponds to the JSON property `serviceAccountEmailAddress`
777
+ # @return [String]
778
+ attr_accessor :service_account_email_address
779
+
780
+ # Database instance settings.
781
+ # Corresponds to the JSON property `settings`
782
+ # @return [Google::Apis::SqladminV1::Settings]
783
+ attr_accessor :settings
784
+
785
+ # The current serving state of the Cloud SQL instance. This can be one of the
786
+ # following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is
787
+ # unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *
788
+ # SUSPENDED*: The instance is not available, for example due to problems with
789
+ # billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*:
790
+ # The instance is being created. *MAINTENANCE*: The instance is down for
791
+ # maintenance. *FAILED*: The instance creation failed.
792
+ # Corresponds to the JSON property `state`
793
+ # @return [String]
794
+ attr_accessor :state
795
+
796
+ # If the instance state is SUSPENDED, the reason for the suspension.
797
+ # Corresponds to the JSON property `suspensionReason`
798
+ # @return [Array<String>]
799
+ attr_accessor :suspension_reason
800
+
801
+ def initialize(**args)
802
+ update!(**args)
803
+ end
804
+
805
+ # Update properties of this object
806
+ def update!(**args)
807
+ @backend_type = args[:backend_type] if args.key?(:backend_type)
808
+ @connection_name = args[:connection_name] if args.key?(:connection_name)
809
+ @create_time = args[:create_time] if args.key?(:create_time)
810
+ @current_disk_size = args[:current_disk_size] if args.key?(:current_disk_size)
811
+ @database_version = args[:database_version] if args.key?(:database_version)
812
+ @disk_encryption_configuration = args[:disk_encryption_configuration] if args.key?(:disk_encryption_configuration)
813
+ @disk_encryption_status = args[:disk_encryption_status] if args.key?(:disk_encryption_status)
814
+ @etag = args[:etag] if args.key?(:etag)
815
+ @failover_replica = args[:failover_replica] if args.key?(:failover_replica)
816
+ @gce_zone = args[:gce_zone] if args.key?(:gce_zone)
817
+ @instance_type = args[:instance_type] if args.key?(:instance_type)
818
+ @ip_addresses = args[:ip_addresses] if args.key?(:ip_addresses)
819
+ @ipv6_address = args[:ipv6_address] if args.key?(:ipv6_address)
820
+ @kind = args[:kind] if args.key?(:kind)
821
+ @master_instance_name = args[:master_instance_name] if args.key?(:master_instance_name)
822
+ @max_disk_size = args[:max_disk_size] if args.key?(:max_disk_size)
823
+ @name = args[:name] if args.key?(:name)
824
+ @on_premises_configuration = args[:on_premises_configuration] if args.key?(:on_premises_configuration)
825
+ @out_of_disk_report = args[:out_of_disk_report] if args.key?(:out_of_disk_report)
826
+ @project = args[:project] if args.key?(:project)
827
+ @region = args[:region] if args.key?(:region)
828
+ @replica_configuration = args[:replica_configuration] if args.key?(:replica_configuration)
829
+ @replica_names = args[:replica_names] if args.key?(:replica_names)
830
+ @root_password = args[:root_password] if args.key?(:root_password)
831
+ @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
832
+ @scheduled_maintenance = args[:scheduled_maintenance] if args.key?(:scheduled_maintenance)
833
+ @secondary_gce_zone = args[:secondary_gce_zone] if args.key?(:secondary_gce_zone)
834
+ @self_link = args[:self_link] if args.key?(:self_link)
835
+ @server_ca_cert = args[:server_ca_cert] if args.key?(:server_ca_cert)
836
+ @service_account_email_address = args[:service_account_email_address] if args.key?(:service_account_email_address)
837
+ @settings = args[:settings] if args.key?(:settings)
838
+ @state = args[:state] if args.key?(:state)
839
+ @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason)
840
+ end
841
+
842
+ # The name and status of the failover replica.
843
+ class FailoverReplica
844
+ include Google::Apis::Core::Hashable
845
+
846
+ # The availability status of the failover replica. A false status indicates that
847
+ # the failover replica is out of sync. The primary instance can only failover to
848
+ # the failover replica when the status is true.
849
+ # Corresponds to the JSON property `available`
850
+ # @return [Boolean]
851
+ attr_accessor :available
852
+ alias_method :available?, :available
853
+
854
+ # The name of the failover replica. If specified at instance creation, a
855
+ # failover replica is created for the instance. The name doesn't include the
856
+ # project ID.
857
+ # Corresponds to the JSON property `name`
858
+ # @return [String]
859
+ attr_accessor :name
860
+
861
+ def initialize(**args)
862
+ update!(**args)
863
+ end
864
+
865
+ # Update properties of this object
866
+ def update!(**args)
867
+ @available = args[:available] if args.key?(:available)
868
+ @name = args[:name] if args.key?(:name)
869
+ end
870
+ end
871
+ end
872
+
873
+ # Database list response.
874
+ class DatabasesListResponse
875
+ include Google::Apis::Core::Hashable
876
+
877
+ # List of database resources in the instance.
878
+ # Corresponds to the JSON property `items`
879
+ # @return [Array<Google::Apis::SqladminV1::Database>]
880
+ attr_accessor :items
881
+
882
+ # This is always *sql#databasesList*.
883
+ # Corresponds to the JSON property `kind`
884
+ # @return [String]
885
+ attr_accessor :kind
886
+
887
+ def initialize(**args)
888
+ update!(**args)
889
+ end
890
+
891
+ # Update properties of this object
892
+ def update!(**args)
893
+ @items = args[:items] if args.key?(:items)
894
+ @kind = args[:kind] if args.key?(:kind)
895
+ end
896
+ end
897
+
898
+ # Read-replica configuration for connecting to the on-premises primary instance.
899
+ class DemoteMasterConfiguration
900
+ include Google::Apis::Core::Hashable
901
+
902
+ # This is always **sql#demoteMasterConfiguration**.
903
+ # Corresponds to the JSON property `kind`
904
+ # @return [String]
905
+ attr_accessor :kind
906
+
907
+ # Read-replica configuration specific to MySQL databases.
908
+ # Corresponds to the JSON property `mysqlReplicaConfiguration`
909
+ # @return [Google::Apis::SqladminV1::DemoteMasterMySqlReplicaConfiguration]
910
+ attr_accessor :mysql_replica_configuration
911
+
912
+ def initialize(**args)
913
+ update!(**args)
914
+ end
915
+
916
+ # Update properties of this object
917
+ def update!(**args)
918
+ @kind = args[:kind] if args.key?(:kind)
919
+ @mysql_replica_configuration = args[:mysql_replica_configuration] if args.key?(:mysql_replica_configuration)
920
+ end
921
+ end
922
+
923
+ # Database instance demote primary instance context.
924
+ class DemoteMasterContext
925
+ include Google::Apis::Core::Hashable
926
+
927
+ # This is always *sql#demoteMasterContext*.
928
+ # Corresponds to the JSON property `kind`
929
+ # @return [String]
930
+ attr_accessor :kind
931
+
932
+ # The name of the instance which will act as on-premises primary instance in the
933
+ # replication setup.
934
+ # Corresponds to the JSON property `masterInstanceName`
935
+ # @return [String]
936
+ attr_accessor :master_instance_name
937
+
938
+ # Read-replica configuration for connecting to the on-premises primary instance.
939
+ # Corresponds to the JSON property `replicaConfiguration`
940
+ # @return [Google::Apis::SqladminV1::DemoteMasterConfiguration]
941
+ attr_accessor :replica_configuration
942
+
943
+ # Flag to skip replication setup on the instance.
944
+ # Corresponds to the JSON property `skipReplicationSetup`
945
+ # @return [Boolean]
946
+ attr_accessor :skip_replication_setup
947
+ alias_method :skip_replication_setup?, :skip_replication_setup
948
+
949
+ # Verify GTID consistency for demote operation. Default value: *True*. Setting
950
+ # this flag to false enables you to bypass GTID consistency check between on-
951
+ # premises primary instance and Cloud SQL instance during the demotion operation
952
+ # but also exposes you to the risk of future replication failures. Change the
953
+ # value value only if you know the reason for the GTID divergence and are
954
+ # confident that doing so will not cause any replication issues.
955
+ # Corresponds to the JSON property `verifyGtidConsistency`
956
+ # @return [Boolean]
957
+ attr_accessor :verify_gtid_consistency
958
+ alias_method :verify_gtid_consistency?, :verify_gtid_consistency
959
+
960
+ def initialize(**args)
961
+ update!(**args)
962
+ end
963
+
964
+ # Update properties of this object
965
+ def update!(**args)
966
+ @kind = args[:kind] if args.key?(:kind)
967
+ @master_instance_name = args[:master_instance_name] if args.key?(:master_instance_name)
968
+ @replica_configuration = args[:replica_configuration] if args.key?(:replica_configuration)
969
+ @skip_replication_setup = args[:skip_replication_setup] if args.key?(:skip_replication_setup)
970
+ @verify_gtid_consistency = args[:verify_gtid_consistency] if args.key?(:verify_gtid_consistency)
971
+ end
972
+ end
973
+
974
+ # Read-replica configuration specific to MySQL databases.
975
+ class DemoteMasterMySqlReplicaConfiguration
976
+ include Google::Apis::Core::Hashable
977
+
978
+ # PEM representation of the trusted CA's x509 certificate.
979
+ # Corresponds to the JSON property `caCertificate`
980
+ # @return [String]
981
+ attr_accessor :ca_certificate
982
+
983
+ # PEM representation of the replica's x509 certificate.
984
+ # Corresponds to the JSON property `clientCertificate`
985
+ # @return [String]
986
+ attr_accessor :client_certificate
987
+
988
+ # PEM representation of the replica's private key. The corresponsing public key
989
+ # is encoded in the client's certificate. The format of the replica's private
990
+ # key can be either PKCS #1 or PKCS #8.
991
+ # Corresponds to the JSON property `clientKey`
992
+ # @return [String]
993
+ attr_accessor :client_key
994
+
995
+ # This is always **sql#demoteMasterMysqlReplicaConfiguration**.
996
+ # Corresponds to the JSON property `kind`
997
+ # @return [String]
998
+ attr_accessor :kind
999
+
1000
+ # The password for the replication connection.
1001
+ # Corresponds to the JSON property `password`
1002
+ # @return [String]
1003
+ attr_accessor :password
1004
+
1005
+ # The username for the replication connection.
1006
+ # Corresponds to the JSON property `username`
1007
+ # @return [String]
1008
+ attr_accessor :username
1009
+
1010
+ def initialize(**args)
1011
+ update!(**args)
1012
+ end
1013
+
1014
+ # Update properties of this object
1015
+ def update!(**args)
1016
+ @ca_certificate = args[:ca_certificate] if args.key?(:ca_certificate)
1017
+ @client_certificate = args[:client_certificate] if args.key?(:client_certificate)
1018
+ @client_key = args[:client_key] if args.key?(:client_key)
1019
+ @kind = args[:kind] if args.key?(:kind)
1020
+ @password = args[:password] if args.key?(:password)
1021
+ @username = args[:username] if args.key?(:username)
1022
+ end
1023
+ end
1024
+
1025
+ # Deny maintenance Periods. This specifies a date range during when all CSA
1026
+ # rollout will be denied.
1027
+ class DenyMaintenancePeriod
1028
+ include Google::Apis::Core::Hashable
1029
+
1030
+ # "deny maintenance period" end date. If the year of the end date is empty, the
1031
+ # year of the start date also must be empty. In this case, it means the no
1032
+ # maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e.,
1033
+ # 2020-11-01, or mm-dd, i.e., 11-01
1034
+ # Corresponds to the JSON property `endDate`
1035
+ # @return [String]
1036
+ attr_accessor :end_date
1037
+
1038
+ # "deny maintenance period" start date. If the year of the start date is empty,
1039
+ # the year of the end date also must be empty. In this case, it means the no
1040
+ # maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e.,
1041
+ # 2020-11-01, or mm-dd, i.e., 11-01
1042
+ # Corresponds to the JSON property `startDate`
1043
+ # @return [String]
1044
+ attr_accessor :start_date
1045
+
1046
+ # Time in UTC when the "deny maintenance period" starts on start_date and ends
1047
+ # on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1048
+ # Corresponds to the JSON property `time`
1049
+ # @return [String]
1050
+ attr_accessor :time
1051
+
1052
+ def initialize(**args)
1053
+ update!(**args)
1054
+ end
1055
+
1056
+ # Update properties of this object
1057
+ def update!(**args)
1058
+ @end_date = args[:end_date] if args.key?(:end_date)
1059
+ @start_date = args[:start_date] if args.key?(:start_date)
1060
+ @time = args[:time] if args.key?(:time)
1061
+ end
1062
+ end
1063
+
1064
+ # Disk encryption configuration for an instance.
1065
+ class DiskEncryptionConfiguration
1066
+ include Google::Apis::Core::Hashable
1067
+
1068
+ # This is always **sql#diskEncryptionConfiguration**.
1069
+ # Corresponds to the JSON property `kind`
1070
+ # @return [String]
1071
+ attr_accessor :kind
1072
+
1073
+ # Resource name of KMS key for disk encryption
1074
+ # Corresponds to the JSON property `kmsKeyName`
1075
+ # @return [String]
1076
+ attr_accessor :kms_key_name
1077
+
1078
+ def initialize(**args)
1079
+ update!(**args)
1080
+ end
1081
+
1082
+ # Update properties of this object
1083
+ def update!(**args)
1084
+ @kind = args[:kind] if args.key?(:kind)
1085
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1086
+ end
1087
+ end
1088
+
1089
+ # Disk encryption status for an instance.
1090
+ class DiskEncryptionStatus
1091
+ include Google::Apis::Core::Hashable
1092
+
1093
+ # This is always **sql#diskEncryptionStatus**.
1094
+ # Corresponds to the JSON property `kind`
1095
+ # @return [String]
1096
+ attr_accessor :kind
1097
+
1098
+ # KMS key version used to encrypt the Cloud SQL instance resource
1099
+ # Corresponds to the JSON property `kmsKeyVersionName`
1100
+ # @return [String]
1101
+ attr_accessor :kms_key_version_name
1102
+
1103
+ def initialize(**args)
1104
+ update!(**args)
1105
+ end
1106
+
1107
+ # Update properties of this object
1108
+ def update!(**args)
1109
+ @kind = args[:kind] if args.key?(:kind)
1110
+ @kms_key_version_name = args[:kms_key_version_name] if args.key?(:kms_key_version_name)
1111
+ end
1112
+ end
1113
+
1114
+ # Database instance export context.
1115
+ class ExportContext
1116
+ include Google::Apis::Core::Hashable
1117
+
1118
+ # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1119
+ # Corresponds to the JSON property `csvExportOptions`
1120
+ # @return [Google::Apis::SqladminV1::ExportContext::CsvExportOptions]
1121
+ attr_accessor :csv_export_options
1122
+
1123
+ # Databases to be exported. **MySQL instances:** If **fileType** is **SQL** and
1124
+ # no database is specified, all databases are exported, except for the **mysql**
1125
+ # system database. If **fileType** is **CSV**, you can specify one database,
1126
+ # either by using this property or by using the **csvExportOptions.selectQuery**
1127
+ # property, which takes precedence over this property. **PostgreSQL instances:**
1128
+ # You must specify one database to be exported. If **fileType** is **CSV**, this
1129
+ # database must match the one specified in the **csvExportOptions.selectQuery**
1130
+ # property. **SQL Server instances:** You must specify one database to be
1131
+ # exported, and the **fileType** must be **BAK**.
1132
+ # Corresponds to the JSON property `databases`
1133
+ # @return [Array<String>]
1134
+ attr_accessor :databases
1135
+
1136
+ # The file type for the specified uri. **SQL**: The file contains SQL statements.
1137
+ # **CSV**: The file contains CSV data. **BAK**: The file contains backup data
1138
+ # for a SQL Server instance.
1139
+ # Corresponds to the JSON property `fileType`
1140
+ # @return [String]
1141
+ attr_accessor :file_type
1142
+
1143
+ # This is always **sql#exportContext**.
1144
+ # Corresponds to the JSON property `kind`
1145
+ # @return [String]
1146
+ attr_accessor :kind
1147
+
1148
+ # Option for export offload.
1149
+ # Corresponds to the JSON property `offload`
1150
+ # @return [Boolean]
1151
+ attr_accessor :offload
1152
+ alias_method :offload?, :offload
1153
+
1154
+ # Options for exporting data as SQL statements.
1155
+ # Corresponds to the JSON property `sqlExportOptions`
1156
+ # @return [Google::Apis::SqladminV1::ExportContext::SqlExportOptions]
1157
+ attr_accessor :sql_export_options
1158
+
1159
+ # The path to the file in Google Cloud Storage where the export will be stored.
1160
+ # The URI is in the form **gs://bucketName/fileName**. If the file already
1161
+ # exists, the request succeeds, but the operation fails. If **fileType** is **
1162
+ # SQL** and the filename ends with .gz, the contents are compressed.
1163
+ # Corresponds to the JSON property `uri`
1164
+ # @return [String]
1165
+ attr_accessor :uri
1166
+
1167
+ def initialize(**args)
1168
+ update!(**args)
1169
+ end
1170
+
1171
+ # Update properties of this object
1172
+ def update!(**args)
1173
+ @csv_export_options = args[:csv_export_options] if args.key?(:csv_export_options)
1174
+ @databases = args[:databases] if args.key?(:databases)
1175
+ @file_type = args[:file_type] if args.key?(:file_type)
1176
+ @kind = args[:kind] if args.key?(:kind)
1177
+ @offload = args[:offload] if args.key?(:offload)
1178
+ @sql_export_options = args[:sql_export_options] if args.key?(:sql_export_options)
1179
+ @uri = args[:uri] if args.key?(:uri)
1180
+ end
1181
+
1182
+ # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1183
+ class CsvExportOptions
1184
+ include Google::Apis::Core::Hashable
1185
+
1186
+ # Specifies the character that should appear before a data character that needs
1187
+ # to be escaped.
1188
+ # Corresponds to the JSON property `escapeCharacter`
1189
+ # @return [String]
1190
+ attr_accessor :escape_character
1191
+
1192
+ # Specifies the character that separates columns within each row (line) of the
1193
+ # file.
1194
+ # Corresponds to the JSON property `fieldsTerminatedBy`
1195
+ # @return [String]
1196
+ attr_accessor :fields_terminated_by
1197
+
1198
+ # This is used to separate lines. If a line does not contain all fields, the
1199
+ # rest of the columns are set to their default values.
1200
+ # Corresponds to the JSON property `linesTerminatedBy`
1201
+ # @return [String]
1202
+ attr_accessor :lines_terminated_by
1203
+
1204
+ # Specifies the quoting character to be used when a data value is quoted.
1205
+ # Corresponds to the JSON property `quoteCharacter`
1206
+ # @return [String]
1207
+ attr_accessor :quote_character
1208
+
1209
+ # The select query used to extract the data.
1210
+ # Corresponds to the JSON property `selectQuery`
1211
+ # @return [String]
1212
+ attr_accessor :select_query
1213
+
1214
+ def initialize(**args)
1215
+ update!(**args)
1216
+ end
1217
+
1218
+ # Update properties of this object
1219
+ def update!(**args)
1220
+ @escape_character = args[:escape_character] if args.key?(:escape_character)
1221
+ @fields_terminated_by = args[:fields_terminated_by] if args.key?(:fields_terminated_by)
1222
+ @lines_terminated_by = args[:lines_terminated_by] if args.key?(:lines_terminated_by)
1223
+ @quote_character = args[:quote_character] if args.key?(:quote_character)
1224
+ @select_query = args[:select_query] if args.key?(:select_query)
1225
+ end
1226
+ end
1227
+
1228
+ # Options for exporting data as SQL statements.
1229
+ class SqlExportOptions
1230
+ include Google::Apis::Core::Hashable
1231
+
1232
+ # Options for exporting from MySQL.
1233
+ # Corresponds to the JSON property `mysqlExportOptions`
1234
+ # @return [Google::Apis::SqladminV1::ExportContext::SqlExportOptions::MysqlExportOptions]
1235
+ attr_accessor :mysql_export_options
1236
+
1237
+ # Export only schemas.
1238
+ # Corresponds to the JSON property `schemaOnly`
1239
+ # @return [Boolean]
1240
+ attr_accessor :schema_only
1241
+ alias_method :schema_only?, :schema_only
1242
+
1243
+ # Tables to export, or that were exported, from the specified database. If you
1244
+ # specify tables, specify one and only one database. For PostgreSQL instances,
1245
+ # you can specify only one table.
1246
+ # Corresponds to the JSON property `tables`
1247
+ # @return [Array<String>]
1248
+ attr_accessor :tables
1249
+
1250
+ def initialize(**args)
1251
+ update!(**args)
1252
+ end
1253
+
1254
+ # Update properties of this object
1255
+ def update!(**args)
1256
+ @mysql_export_options = args[:mysql_export_options] if args.key?(:mysql_export_options)
1257
+ @schema_only = args[:schema_only] if args.key?(:schema_only)
1258
+ @tables = args[:tables] if args.key?(:tables)
1259
+ end
1260
+
1261
+ # Options for exporting from MySQL.
1262
+ class MysqlExportOptions
1263
+ include Google::Apis::Core::Hashable
1264
+
1265
+ # Option to include SQL statement required to set up replication. If set to **1**
1266
+ # , the dump file includes a CHANGE MASTER TO statement with the binary log
1267
+ # coordinates, and --set-gtid-purged is set to ON. If set to **2**, the CHANGE
1268
+ # MASTER TO statement is written as a SQL comment and has no effect. If set to
1269
+ # any value other than **1**, --set-gtid-purged is set to OFF.
1270
+ # Corresponds to the JSON property `masterData`
1271
+ # @return [Fixnum]
1272
+ attr_accessor :master_data
1273
+
1274
+ def initialize(**args)
1275
+ update!(**args)
1276
+ end
1277
+
1278
+ # Update properties of this object
1279
+ def update!(**args)
1280
+ @master_data = args[:master_data] if args.key?(:master_data)
1281
+ end
1282
+ end
1283
+ end
1284
+ end
1285
+
1286
+ # Database instance failover context.
1287
+ class FailoverContext
1288
+ include Google::Apis::Core::Hashable
1289
+
1290
+ # This is always *sql#failoverContext*.
1291
+ # Corresponds to the JSON property `kind`
1292
+ # @return [String]
1293
+ attr_accessor :kind
1294
+
1295
+ # The current settings version of this instance. Request will be rejected if
1296
+ # this version doesn't match the current settings version.
1297
+ # Corresponds to the JSON property `settingsVersion`
1298
+ # @return [Fixnum]
1299
+ attr_accessor :settings_version
1300
+
1301
+ def initialize(**args)
1302
+ update!(**args)
1303
+ end
1304
+
1305
+ # Update properties of this object
1306
+ def update!(**args)
1307
+ @kind = args[:kind] if args.key?(:kind)
1308
+ @settings_version = args[:settings_version] if args.key?(:settings_version)
1309
+ end
1310
+ end
1311
+
1312
+ # A flag resource.
1313
+ class Flag
1314
+ include Google::Apis::Core::Hashable
1315
+
1316
+ # Use this field if only certain integers are accepted. Can be combined with
1317
+ # min_value and max_value to add additional values.
1318
+ # Corresponds to the JSON property `allowedIntValues`
1319
+ # @return [Array<Fixnum>]
1320
+ attr_accessor :allowed_int_values
1321
+
1322
+ # For **STRING** flags, a list of strings that the value can be set to.
1323
+ # Corresponds to the JSON property `allowedStringValues`
1324
+ # @return [Array<String>]
1325
+ attr_accessor :allowed_string_values
1326
+
1327
+ # The database version this flag applies to. Can be **MYSQL_8_0**, **MYSQL_5_6**,
1328
+ # or **MYSQL_5_7**.
1329
+ # Corresponds to the JSON property `appliesTo`
1330
+ # @return [Array<String>]
1331
+ attr_accessor :applies_to
1332
+
1333
+ # Whether or not the flag is considered in beta.
1334
+ # Corresponds to the JSON property `inBeta`
1335
+ # @return [Boolean]
1336
+ attr_accessor :in_beta
1337
+ alias_method :in_beta?, :in_beta
1338
+
1339
+ # This is always **sql#flag**.
1340
+ # Corresponds to the JSON property `kind`
1341
+ # @return [String]
1342
+ attr_accessor :kind
1343
+
1344
+ # For **INTEGER** flags, the maximum allowed value.
1345
+ # Corresponds to the JSON property `maxValue`
1346
+ # @return [Fixnum]
1347
+ attr_accessor :max_value
1348
+
1349
+ # For **INTEGER** flags, the minimum allowed value.
1350
+ # Corresponds to the JSON property `minValue`
1351
+ # @return [Fixnum]
1352
+ attr_accessor :min_value
1353
+
1354
+ # This is the name of the flag. Flag names always use underscores, not hyphens,
1355
+ # for example: **max_allowed_packet**
1356
+ # Corresponds to the JSON property `name`
1357
+ # @return [String]
1358
+ attr_accessor :name
1359
+
1360
+ # Indicates whether changing this flag will trigger a database restart. Only
1361
+ # applicable to Second Generation instances.
1362
+ # Corresponds to the JSON property `requiresRestart`
1363
+ # @return [Boolean]
1364
+ attr_accessor :requires_restart
1365
+ alias_method :requires_restart?, :requires_restart
1366
+
1367
+ # The type of the flag. Flags are typed to being **BOOLEAN**, **STRING**, **
1368
+ # INTEGER** or **NONE**. **NONE** is used for flags which do not take a value,
1369
+ # such as **skip_grant_tables**.
1370
+ # Corresponds to the JSON property `type`
1371
+ # @return [String]
1372
+ attr_accessor :type
1373
+
1374
+ def initialize(**args)
1375
+ update!(**args)
1376
+ end
1377
+
1378
+ # Update properties of this object
1379
+ def update!(**args)
1380
+ @allowed_int_values = args[:allowed_int_values] if args.key?(:allowed_int_values)
1381
+ @allowed_string_values = args[:allowed_string_values] if args.key?(:allowed_string_values)
1382
+ @applies_to = args[:applies_to] if args.key?(:applies_to)
1383
+ @in_beta = args[:in_beta] if args.key?(:in_beta)
1384
+ @kind = args[:kind] if args.key?(:kind)
1385
+ @max_value = args[:max_value] if args.key?(:max_value)
1386
+ @min_value = args[:min_value] if args.key?(:min_value)
1387
+ @name = args[:name] if args.key?(:name)
1388
+ @requires_restart = args[:requires_restart] if args.key?(:requires_restart)
1389
+ @type = args[:type] if args.key?(:type)
1390
+ end
1391
+ end
1392
+
1393
+ # Flags list response.
1394
+ class FlagsListResponse
1395
+ include Google::Apis::Core::Hashable
1396
+
1397
+ # List of flags.
1398
+ # Corresponds to the JSON property `items`
1399
+ # @return [Array<Google::Apis::SqladminV1::Flag>]
1400
+ attr_accessor :items
1401
+
1402
+ # This is always **sql#flagsList**.
1403
+ # Corresponds to the JSON property `kind`
1404
+ # @return [String]
1405
+ attr_accessor :kind
1406
+
1407
+ def initialize(**args)
1408
+ update!(**args)
1409
+ end
1410
+
1411
+ # Update properties of this object
1412
+ def update!(**args)
1413
+ @items = args[:items] if args.key?(:items)
1414
+ @kind = args[:kind] if args.key?(:kind)
1415
+ end
1416
+ end
1417
+
1418
+ # Ephemeral certificate creation request.
1419
+ class GenerateEphemeralCertRequest
1420
+ include Google::Apis::Core::Hashable
1421
+
1422
+ # Optional. Access token to include in the signed certificate.
1423
+ # Corresponds to the JSON property `access_token`
1424
+ # @return [String]
1425
+ attr_accessor :access_token
1426
+
1427
+ # PEM encoded public key to include in the signed certificate.
1428
+ # Corresponds to the JSON property `public_key`
1429
+ # @return [String]
1430
+ attr_accessor :public_key
1431
+
1432
+ # Optional. Optional snapshot read timestamp to trade freshness for performance.
1433
+ # Corresponds to the JSON property `readTime`
1434
+ # @return [String]
1435
+ attr_accessor :read_time
1436
+
1437
+ def initialize(**args)
1438
+ update!(**args)
1439
+ end
1440
+
1441
+ # Update properties of this object
1442
+ def update!(**args)
1443
+ @access_token = args[:access_token] if args.key?(:access_token)
1444
+ @public_key = args[:public_key] if args.key?(:public_key)
1445
+ @read_time = args[:read_time] if args.key?(:read_time)
1446
+ end
1447
+ end
1448
+
1449
+ # Ephemeral certificate creation request.
1450
+ class GenerateEphemeralCertResponse
1451
+ include Google::Apis::Core::Hashable
1452
+
1453
+ # SslCerts Resource
1454
+ # Corresponds to the JSON property `ephemeralCert`
1455
+ # @return [Google::Apis::SqladminV1::SslCert]
1456
+ attr_accessor :ephemeral_cert
1457
+
1458
+ def initialize(**args)
1459
+ update!(**args)
1460
+ end
1461
+
1462
+ # Update properties of this object
1463
+ def update!(**args)
1464
+ @ephemeral_cert = args[:ephemeral_cert] if args.key?(:ephemeral_cert)
1465
+ end
1466
+ end
1467
+
1468
+ # Database instance import context.
1469
+ class ImportContext
1470
+ include Google::Apis::Core::Hashable
1471
+
1472
+ # Import parameters specific to SQL Server .BAK files
1473
+ # Corresponds to the JSON property `bakImportOptions`
1474
+ # @return [Google::Apis::SqladminV1::ImportContext::BakImportOptions]
1475
+ attr_accessor :bak_import_options
1476
+
1477
+ # Options for importing data as CSV.
1478
+ # Corresponds to the JSON property `csvImportOptions`
1479
+ # @return [Google::Apis::SqladminV1::ImportContext::CsvImportOptions]
1480
+ attr_accessor :csv_import_options
1481
+
1482
+ # The target database for the import. If **fileType** is **SQL**, this field is
1483
+ # required only if the import file does not specify a database, and is
1484
+ # overridden by any database specification in the import file. If **fileType**
1485
+ # is **CSV**, one database must be specified.
1486
+ # Corresponds to the JSON property `database`
1487
+ # @return [String]
1488
+ attr_accessor :database
1489
+
1490
+ # The file type for the specified uri. **SQL**: The file contains SQL statements.
1491
+ # **CSV**: The file contains CSV data.
1492
+ # Corresponds to the JSON property `fileType`
1493
+ # @return [String]
1494
+ attr_accessor :file_type
1495
+
1496
+ # The PostgreSQL user for this import operation. PostgreSQL instances only.
1497
+ # Corresponds to the JSON property `importUser`
1498
+ # @return [String]
1499
+ attr_accessor :import_user
1500
+
1501
+ # This is always **sql#importContext**.
1502
+ # Corresponds to the JSON property `kind`
1503
+ # @return [String]
1504
+ attr_accessor :kind
1505
+
1506
+ # Path to the import file in Cloud Storage, in the form **gs://bucketName/
1507
+ # fileName**. Compressed gzip files (.gz) are supported when **fileType** is **
1508
+ # SQL**. The instance must have write permissions to the bucket and read access
1509
+ # to the file.
1510
+ # Corresponds to the JSON property `uri`
1511
+ # @return [String]
1512
+ attr_accessor :uri
1513
+
1514
+ def initialize(**args)
1515
+ update!(**args)
1516
+ end
1517
+
1518
+ # Update properties of this object
1519
+ def update!(**args)
1520
+ @bak_import_options = args[:bak_import_options] if args.key?(:bak_import_options)
1521
+ @csv_import_options = args[:csv_import_options] if args.key?(:csv_import_options)
1522
+ @database = args[:database] if args.key?(:database)
1523
+ @file_type = args[:file_type] if args.key?(:file_type)
1524
+ @import_user = args[:import_user] if args.key?(:import_user)
1525
+ @kind = args[:kind] if args.key?(:kind)
1526
+ @uri = args[:uri] if args.key?(:uri)
1527
+ end
1528
+
1529
+ # Import parameters specific to SQL Server .BAK files
1530
+ class BakImportOptions
1531
+ include Google::Apis::Core::Hashable
1532
+
1533
+ #
1534
+ # Corresponds to the JSON property `encryptionOptions`
1535
+ # @return [Google::Apis::SqladminV1::ImportContext::BakImportOptions::EncryptionOptions]
1536
+ attr_accessor :encryption_options
1537
+
1538
+ def initialize(**args)
1539
+ update!(**args)
1540
+ end
1541
+
1542
+ # Update properties of this object
1543
+ def update!(**args)
1544
+ @encryption_options = args[:encryption_options] if args.key?(:encryption_options)
1545
+ end
1546
+
1547
+ #
1548
+ class EncryptionOptions
1549
+ include Google::Apis::Core::Hashable
1550
+
1551
+ # Path to the Certificate (.cer) in Cloud Storage, in the form **gs://bucketName/
1552
+ # fileName**. The instance must have write permissions to the bucket and read
1553
+ # access to the file.
1554
+ # Corresponds to the JSON property `certPath`
1555
+ # @return [String]
1556
+ attr_accessor :cert_path
1557
+
1558
+ # Password that encrypts the private key
1559
+ # Corresponds to the JSON property `pvkPassword`
1560
+ # @return [String]
1561
+ attr_accessor :pvk_password
1562
+
1563
+ # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form **gs:/
1564
+ # /bucketName/fileName**. The instance must have write permissions to the bucket
1565
+ # and read access to the file.
1566
+ # Corresponds to the JSON property `pvkPath`
1567
+ # @return [String]
1568
+ attr_accessor :pvk_path
1569
+
1570
+ def initialize(**args)
1571
+ update!(**args)
1572
+ end
1573
+
1574
+ # Update properties of this object
1575
+ def update!(**args)
1576
+ @cert_path = args[:cert_path] if args.key?(:cert_path)
1577
+ @pvk_password = args[:pvk_password] if args.key?(:pvk_password)
1578
+ @pvk_path = args[:pvk_path] if args.key?(:pvk_path)
1579
+ end
1580
+ end
1581
+ end
1582
+
1583
+ # Options for importing data as CSV.
1584
+ class CsvImportOptions
1585
+ include Google::Apis::Core::Hashable
1586
+
1587
+ # The columns to which CSV data is imported. If not specified, all columns of
1588
+ # the database table are loaded with CSV data.
1589
+ # Corresponds to the JSON property `columns`
1590
+ # @return [Array<String>]
1591
+ attr_accessor :columns
1592
+
1593
+ # Specifies the character that should appear before a data character that needs
1594
+ # to be escaped.
1595
+ # Corresponds to the JSON property `escapeCharacter`
1596
+ # @return [String]
1597
+ attr_accessor :escape_character
1598
+
1599
+ # Specifies the character that separates columns within each row (line) of the
1600
+ # file.
1601
+ # Corresponds to the JSON property `fieldsTerminatedBy`
1602
+ # @return [String]
1603
+ attr_accessor :fields_terminated_by
1604
+
1605
+ # This is used to separate lines. If a line does not contain all fields, the
1606
+ # rest of the columns are set to their default values.
1607
+ # Corresponds to the JSON property `linesTerminatedBy`
1608
+ # @return [String]
1609
+ attr_accessor :lines_terminated_by
1610
+
1611
+ # Specifies the quoting character to be used when a data value is quoted.
1612
+ # Corresponds to the JSON property `quoteCharacter`
1613
+ # @return [String]
1614
+ attr_accessor :quote_character
1615
+
1616
+ # The table to which CSV data is imported.
1617
+ # Corresponds to the JSON property `table`
1618
+ # @return [String]
1619
+ attr_accessor :table
1620
+
1621
+ def initialize(**args)
1622
+ update!(**args)
1623
+ end
1624
+
1625
+ # Update properties of this object
1626
+ def update!(**args)
1627
+ @columns = args[:columns] if args.key?(:columns)
1628
+ @escape_character = args[:escape_character] if args.key?(:escape_character)
1629
+ @fields_terminated_by = args[:fields_terminated_by] if args.key?(:fields_terminated_by)
1630
+ @lines_terminated_by = args[:lines_terminated_by] if args.key?(:lines_terminated_by)
1631
+ @quote_character = args[:quote_character] if args.key?(:quote_character)
1632
+ @table = args[:table] if args.key?(:table)
1633
+ end
1634
+ end
1635
+ end
1636
+
1637
+ # Insights configuration. This specifies when Cloud SQL Insights feature is
1638
+ # enabled and optional configuration.
1639
+ class InsightsConfig
1640
+ include Google::Apis::Core::Hashable
1641
+
1642
+ # Whether Query Insights feature is enabled.
1643
+ # Corresponds to the JSON property `queryInsightsEnabled`
1644
+ # @return [Boolean]
1645
+ attr_accessor :query_insights_enabled
1646
+ alias_method :query_insights_enabled?, :query_insights_enabled
1647
+
1648
+ # Number of query execution plans captured by Insights per minute for all
1649
+ # queries combined. Default is 5.
1650
+ # Corresponds to the JSON property `queryPlansPerMinute`
1651
+ # @return [Fixnum]
1652
+ attr_accessor :query_plans_per_minute
1653
+
1654
+ # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-
1655
+ # 4500 bytes. Query length more than this field value will be truncated to this
1656
+ # value. When unset, query length will be the default value. Changing query
1657
+ # length will restart the database.
1658
+ # Corresponds to the JSON property `queryStringLength`
1659
+ # @return [Fixnum]
1660
+ attr_accessor :query_string_length
1661
+
1662
+ # Whether Query Insights will record application tags from query when enabled.
1663
+ # Corresponds to the JSON property `recordApplicationTags`
1664
+ # @return [Boolean]
1665
+ attr_accessor :record_application_tags
1666
+ alias_method :record_application_tags?, :record_application_tags
1667
+
1668
+ # Whether Query Insights will record client address when enabled.
1669
+ # Corresponds to the JSON property `recordClientAddress`
1670
+ # @return [Boolean]
1671
+ attr_accessor :record_client_address
1672
+ alias_method :record_client_address?, :record_client_address
1673
+
1674
+ def initialize(**args)
1675
+ update!(**args)
1676
+ end
1677
+
1678
+ # Update properties of this object
1679
+ def update!(**args)
1680
+ @query_insights_enabled = args[:query_insights_enabled] if args.key?(:query_insights_enabled)
1681
+ @query_plans_per_minute = args[:query_plans_per_minute] if args.key?(:query_plans_per_minute)
1682
+ @query_string_length = args[:query_string_length] if args.key?(:query_string_length)
1683
+ @record_application_tags = args[:record_application_tags] if args.key?(:record_application_tags)
1684
+ @record_client_address = args[:record_client_address] if args.key?(:record_client_address)
1685
+ end
1686
+ end
1687
+
1688
+ # Reference to another Cloud SQL instance.
1689
+ class InstanceReference
1690
+ include Google::Apis::Core::Hashable
1691
+
1692
+ # The name of the Cloud SQL instance being referenced. This does not include the
1693
+ # project ID.
1694
+ # Corresponds to the JSON property `name`
1695
+ # @return [String]
1696
+ attr_accessor :name
1697
+
1698
+ # The project ID of the Cloud SQL instance being referenced. The default is the
1699
+ # same project ID as the instance references it.
1700
+ # Corresponds to the JSON property `project`
1701
+ # @return [String]
1702
+ attr_accessor :project
1703
+
1704
+ # The region of the Cloud SQL instance being referenced.
1705
+ # Corresponds to the JSON property `region`
1706
+ # @return [String]
1707
+ attr_accessor :region
1708
+
1709
+ def initialize(**args)
1710
+ update!(**args)
1711
+ end
1712
+
1713
+ # Update properties of this object
1714
+ def update!(**args)
1715
+ @name = args[:name] if args.key?(:name)
1716
+ @project = args[:project] if args.key?(:project)
1717
+ @region = args[:region] if args.key?(:region)
1718
+ end
1719
+ end
1720
+
1721
+ # Database instance clone request.
1722
+ class InstancesCloneRequest
1723
+ include Google::Apis::Core::Hashable
1724
+
1725
+ # Database instance clone context.
1726
+ # Corresponds to the JSON property `cloneContext`
1727
+ # @return [Google::Apis::SqladminV1::CloneContext]
1728
+ attr_accessor :clone_context
1729
+
1730
+ def initialize(**args)
1731
+ update!(**args)
1732
+ end
1733
+
1734
+ # Update properties of this object
1735
+ def update!(**args)
1736
+ @clone_context = args[:clone_context] if args.key?(:clone_context)
1737
+ end
1738
+ end
1739
+
1740
+ # Database demote primary instance request.
1741
+ class InstancesDemoteMasterRequest
1742
+ include Google::Apis::Core::Hashable
1743
+
1744
+ # Database instance demote primary instance context.
1745
+ # Corresponds to the JSON property `demoteMasterContext`
1746
+ # @return [Google::Apis::SqladminV1::DemoteMasterContext]
1747
+ attr_accessor :demote_master_context
1748
+
1749
+ def initialize(**args)
1750
+ update!(**args)
1751
+ end
1752
+
1753
+ # Update properties of this object
1754
+ def update!(**args)
1755
+ @demote_master_context = args[:demote_master_context] if args.key?(:demote_master_context)
1756
+ end
1757
+ end
1758
+
1759
+ # Database instance export request.
1760
+ class InstancesExportRequest
1761
+ include Google::Apis::Core::Hashable
1762
+
1763
+ # Database instance export context.
1764
+ # Corresponds to the JSON property `exportContext`
1765
+ # @return [Google::Apis::SqladminV1::ExportContext]
1766
+ attr_accessor :export_context
1767
+
1768
+ def initialize(**args)
1769
+ update!(**args)
1770
+ end
1771
+
1772
+ # Update properties of this object
1773
+ def update!(**args)
1774
+ @export_context = args[:export_context] if args.key?(:export_context)
1775
+ end
1776
+ end
1777
+
1778
+ # Instance failover request.
1779
+ class InstancesFailoverRequest
1780
+ include Google::Apis::Core::Hashable
1781
+
1782
+ # Database instance failover context.
1783
+ # Corresponds to the JSON property `failoverContext`
1784
+ # @return [Google::Apis::SqladminV1::FailoverContext]
1785
+ attr_accessor :failover_context
1786
+
1787
+ def initialize(**args)
1788
+ update!(**args)
1789
+ end
1790
+
1791
+ # Update properties of this object
1792
+ def update!(**args)
1793
+ @failover_context = args[:failover_context] if args.key?(:failover_context)
1794
+ end
1795
+ end
1796
+
1797
+ # Database instance import request.
1798
+ class InstancesImportRequest
1799
+ include Google::Apis::Core::Hashable
1800
+
1801
+ # Database instance import context.
1802
+ # Corresponds to the JSON property `importContext`
1803
+ # @return [Google::Apis::SqladminV1::ImportContext]
1804
+ attr_accessor :import_context
1805
+
1806
+ def initialize(**args)
1807
+ update!(**args)
1808
+ end
1809
+
1810
+ # Update properties of this object
1811
+ def update!(**args)
1812
+ @import_context = args[:import_context] if args.key?(:import_context)
1813
+ end
1814
+ end
1815
+
1816
+ # Database instances list response.
1817
+ class InstancesListResponse
1818
+ include Google::Apis::Core::Hashable
1819
+
1820
+ # List of database instance resources.
1821
+ # Corresponds to the JSON property `items`
1822
+ # @return [Array<Google::Apis::SqladminV1::DatabaseInstance>]
1823
+ attr_accessor :items
1824
+
1825
+ # This is always *sql#instancesList*.
1826
+ # Corresponds to the JSON property `kind`
1827
+ # @return [String]
1828
+ attr_accessor :kind
1829
+
1830
+ # The continuation token, used to page through large result sets. Provide this
1831
+ # value in a subsequent request to return the next page of results.
1832
+ # Corresponds to the JSON property `nextPageToken`
1833
+ # @return [String]
1834
+ attr_accessor :next_page_token
1835
+
1836
+ # List of warnings that occurred while handling the request.
1837
+ # Corresponds to the JSON property `warnings`
1838
+ # @return [Array<Google::Apis::SqladminV1::ApiWarning>]
1839
+ attr_accessor :warnings
1840
+
1841
+ def initialize(**args)
1842
+ update!(**args)
1843
+ end
1844
+
1845
+ # Update properties of this object
1846
+ def update!(**args)
1847
+ @items = args[:items] if args.key?(:items)
1848
+ @kind = args[:kind] if args.key?(:kind)
1849
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1850
+ @warnings = args[:warnings] if args.key?(:warnings)
1851
+ end
1852
+ end
1853
+
1854
+ # Instances ListServerCas response.
1855
+ class InstancesListServerCasResponse
1856
+ include Google::Apis::Core::Hashable
1857
+
1858
+ #
1859
+ # Corresponds to the JSON property `activeVersion`
1860
+ # @return [String]
1861
+ attr_accessor :active_version
1862
+
1863
+ # List of server CA certificates for the instance.
1864
+ # Corresponds to the JSON property `certs`
1865
+ # @return [Array<Google::Apis::SqladminV1::SslCert>]
1866
+ attr_accessor :certs
1867
+
1868
+ # This is always *sql#instancesListServerCas*.
1869
+ # Corresponds to the JSON property `kind`
1870
+ # @return [String]
1871
+ attr_accessor :kind
1872
+
1873
+ def initialize(**args)
1874
+ update!(**args)
1875
+ end
1876
+
1877
+ # Update properties of this object
1878
+ def update!(**args)
1879
+ @active_version = args[:active_version] if args.key?(:active_version)
1880
+ @certs = args[:certs] if args.key?(:certs)
1881
+ @kind = args[:kind] if args.key?(:kind)
1882
+ end
1883
+ end
1884
+
1885
+ # Database instance restore backup request.
1886
+ class InstancesRestoreBackupRequest
1887
+ include Google::Apis::Core::Hashable
1888
+
1889
+ # Database instance restore from backup context. Backup context contains source
1890
+ # instance id and project id.
1891
+ # Corresponds to the JSON property `restoreBackupContext`
1892
+ # @return [Google::Apis::SqladminV1::RestoreBackupContext]
1893
+ attr_accessor :restore_backup_context
1894
+
1895
+ def initialize(**args)
1896
+ update!(**args)
1897
+ end
1898
+
1899
+ # Update properties of this object
1900
+ def update!(**args)
1901
+ @restore_backup_context = args[:restore_backup_context] if args.key?(:restore_backup_context)
1902
+ end
1903
+ end
1904
+
1905
+ # Rotate server CA request.
1906
+ class InstancesRotateServerCaRequest
1907
+ include Google::Apis::Core::Hashable
1908
+
1909
+ # Instance rotate server CA context.
1910
+ # Corresponds to the JSON property `rotateServerCaContext`
1911
+ # @return [Google::Apis::SqladminV1::RotateServerCaContext]
1912
+ attr_accessor :rotate_server_ca_context
1913
+
1914
+ def initialize(**args)
1915
+ update!(**args)
1916
+ end
1917
+
1918
+ # Update properties of this object
1919
+ def update!(**args)
1920
+ @rotate_server_ca_context = args[:rotate_server_ca_context] if args.key?(:rotate_server_ca_context)
1921
+ end
1922
+ end
1923
+
1924
+ # Instance truncate log request.
1925
+ class InstancesTruncateLogRequest
1926
+ include Google::Apis::Core::Hashable
1927
+
1928
+ # Database Instance truncate log context.
1929
+ # Corresponds to the JSON property `truncateLogContext`
1930
+ # @return [Google::Apis::SqladminV1::TruncateLogContext]
1931
+ attr_accessor :truncate_log_context
1932
+
1933
+ def initialize(**args)
1934
+ update!(**args)
1935
+ end
1936
+
1937
+ # Update properties of this object
1938
+ def update!(**args)
1939
+ @truncate_log_context = args[:truncate_log_context] if args.key?(:truncate_log_context)
1940
+ end
1941
+ end
1942
+
1943
+ # IP Management configuration.
1944
+ class IpConfiguration
1945
+ include Google::Apis::Core::Hashable
1946
+
1947
+ # The name of the allocated ip range for the private ip CloudSQL instance. For
1948
+ # example: "google-managed-services-default". If set, the instance ip will be
1949
+ # created in the allocated range. The range name must comply with [RFC 1035](
1950
+ # https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63
1951
+ # characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`
1952
+ # Reserved for future use.
1953
+ # Corresponds to the JSON property `allocatedIpRange`
1954
+ # @return [String]
1955
+ attr_accessor :allocated_ip_range
1956
+
1957
+ # The list of external networks that are allowed to connect to the instance
1958
+ # using the IP. In 'CIDR' notation, also known as 'slash' notation (for example:
1959
+ # **192.168.100.0/24**).
1960
+ # Corresponds to the JSON property `authorizedNetworks`
1961
+ # @return [Array<Google::Apis::SqladminV1::AclEntry>]
1962
+ attr_accessor :authorized_networks
1963
+
1964
+ # Whether the instance is assigned a public IP address or not.
1965
+ # Corresponds to the JSON property `ipv4Enabled`
1966
+ # @return [Boolean]
1967
+ attr_accessor :ipv4_enabled
1968
+ alias_method :ipv4_enabled?, :ipv4_enabled
1969
+
1970
+ # The resource link for the VPC network from which the Cloud SQL instance is
1971
+ # accessible for private IP. For example, **/projects/myProject/global/networks/
1972
+ # default**. This setting can be updated, but it cannot be removed after it is
1973
+ # set.
1974
+ # Corresponds to the JSON property `privateNetwork`
1975
+ # @return [String]
1976
+ attr_accessor :private_network
1977
+
1978
+ # Whether SSL connections over IP are enforced or not.
1979
+ # Corresponds to the JSON property `requireSsl`
1980
+ # @return [Boolean]
1981
+ attr_accessor :require_ssl
1982
+ alias_method :require_ssl?, :require_ssl
1983
+
1984
+ def initialize(**args)
1985
+ update!(**args)
1986
+ end
1987
+
1988
+ # Update properties of this object
1989
+ def update!(**args)
1990
+ @allocated_ip_range = args[:allocated_ip_range] if args.key?(:allocated_ip_range)
1991
+ @authorized_networks = args[:authorized_networks] if args.key?(:authorized_networks)
1992
+ @ipv4_enabled = args[:ipv4_enabled] if args.key?(:ipv4_enabled)
1993
+ @private_network = args[:private_network] if args.key?(:private_network)
1994
+ @require_ssl = args[:require_ssl] if args.key?(:require_ssl)
1995
+ end
1996
+ end
1997
+
1998
+ # Database instance IP Mapping.
1999
+ class IpMapping
2000
+ include Google::Apis::Core::Hashable
2001
+
2002
+ # The IP address assigned.
2003
+ # Corresponds to the JSON property `ipAddress`
2004
+ # @return [String]
2005
+ attr_accessor :ip_address
2006
+
2007
+ # The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/
2008
+ # html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. This field is
2009
+ # only available when the IP is scheduled to be retired.
2010
+ # Corresponds to the JSON property `timeToRetire`
2011
+ # @return [String]
2012
+ attr_accessor :time_to_retire
2013
+
2014
+ # The type of this IP address. A **PRIMARY** address is a public address that
2015
+ # can accept incoming connections. A **PRIVATE** address is a private address
2016
+ # that can accept incoming connections. An **OUTGOING** address is the source
2017
+ # address of connections originating from the instance, if supported.
2018
+ # Corresponds to the JSON property `type`
2019
+ # @return [String]
2020
+ attr_accessor :type
2021
+
2022
+ def initialize(**args)
2023
+ update!(**args)
2024
+ end
2025
+
2026
+ # Update properties of this object
2027
+ def update!(**args)
2028
+ @ip_address = args[:ip_address] if args.key?(:ip_address)
2029
+ @time_to_retire = args[:time_to_retire] if args.key?(:time_to_retire)
2030
+ @type = args[:type] if args.key?(:type)
2031
+ end
2032
+ end
2033
+
2034
+ # Preferred location. This specifies where a Cloud SQL instance is located. Note
2035
+ # that if the preferred location is not available, the instance will be located
2036
+ # as close as possible within the region. Only one location may be specified.
2037
+ class LocationPreference
2038
+ include Google::Apis::Core::Hashable
2039
+
2040
+ # The App Engine application to follow, it must be in the same region as the
2041
+ # Cloud SQL instance.
2042
+ # Corresponds to the JSON property `followGaeApplication`
2043
+ # @return [String]
2044
+ attr_accessor :follow_gae_application
2045
+
2046
+ # This is always **sql#locationPreference**.
2047
+ # Corresponds to the JSON property `kind`
2048
+ # @return [String]
2049
+ attr_accessor :kind
2050
+
2051
+ # The preferred Compute Engine zone for the secondary/failover (for example: us-
2052
+ # central1-a, us-central1-b, etc.). Reserved for future use.
2053
+ # Corresponds to the JSON property `secondaryZone`
2054
+ # @return [String]
2055
+ attr_accessor :secondary_zone
2056
+
2057
+ # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b,
2058
+ # etc.).
2059
+ # Corresponds to the JSON property `zone`
2060
+ # @return [String]
2061
+ attr_accessor :zone
2062
+
2063
+ def initialize(**args)
2064
+ update!(**args)
2065
+ end
2066
+
2067
+ # Update properties of this object
2068
+ def update!(**args)
2069
+ @follow_gae_application = args[:follow_gae_application] if args.key?(:follow_gae_application)
2070
+ @kind = args[:kind] if args.key?(:kind)
2071
+ @secondary_zone = args[:secondary_zone] if args.key?(:secondary_zone)
2072
+ @zone = args[:zone] if args.key?(:zone)
2073
+ end
2074
+ end
2075
+
2076
+ # Maintenance window. This specifies when a Cloud SQL instance is restarted for
2077
+ # system maintenance purposes.
2078
+ class MaintenanceWindow
2079
+ include Google::Apis::Core::Hashable
2080
+
2081
+ # day of week (1-7), starting on Monday.
2082
+ # Corresponds to the JSON property `day`
2083
+ # @return [Fixnum]
2084
+ attr_accessor :day
2085
+
2086
+ # hour of day - 0 to 23.
2087
+ # Corresponds to the JSON property `hour`
2088
+ # @return [Fixnum]
2089
+ attr_accessor :hour
2090
+
2091
+ # This is always **sql#maintenanceWindow**.
2092
+ # Corresponds to the JSON property `kind`
2093
+ # @return [String]
2094
+ attr_accessor :kind
2095
+
2096
+ # Maintenance timing setting: **canary** (Earlier) or **stable** (Later). [Learn
2097
+ # more] (https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-
2098
+ # timing-2ndgen).
2099
+ # Corresponds to the JSON property `updateTrack`
2100
+ # @return [String]
2101
+ attr_accessor :update_track
2102
+
2103
+ def initialize(**args)
2104
+ update!(**args)
2105
+ end
2106
+
2107
+ # Update properties of this object
2108
+ def update!(**args)
2109
+ @day = args[:day] if args.key?(:day)
2110
+ @hour = args[:hour] if args.key?(:hour)
2111
+ @kind = args[:kind] if args.key?(:kind)
2112
+ @update_track = args[:update_track] if args.key?(:update_track)
2113
+ end
2114
+ end
2115
+
2116
+ # Read-replica configuration specific to MySQL databases.
2117
+ class MySqlReplicaConfiguration
2118
+ include Google::Apis::Core::Hashable
2119
+
2120
+ # PEM representation of the trusted CA's x509 certificate.
2121
+ # Corresponds to the JSON property `caCertificate`
2122
+ # @return [String]
2123
+ attr_accessor :ca_certificate
2124
+
2125
+ # PEM representation of the replica's x509 certificate.
2126
+ # Corresponds to the JSON property `clientCertificate`
2127
+ # @return [String]
2128
+ attr_accessor :client_certificate
2129
+
2130
+ # PEM representation of the replica's private key. The corresponsing public key
2131
+ # is encoded in the client's certificate.
2132
+ # Corresponds to the JSON property `clientKey`
2133
+ # @return [String]
2134
+ attr_accessor :client_key
2135
+
2136
+ # Seconds to wait between connect retries. MySQL's default is 60 seconds.
2137
+ # Corresponds to the JSON property `connectRetryInterval`
2138
+ # @return [Fixnum]
2139
+ attr_accessor :connect_retry_interval
2140
+
2141
+ # Path to a SQL dump file in Google Cloud Storage from which the replica
2142
+ # instance is to be created. The URI is in the form gs://bucketName/fileName.
2143
+ # Compressed gzip files (.gz) are also supported. Dumps have the binlog co-
2144
+ # ordinates from which replication begins. This can be accomplished by setting --
2145
+ # master-data to 1 when using mysqldump.
2146
+ # Corresponds to the JSON property `dumpFilePath`
2147
+ # @return [String]
2148
+ attr_accessor :dump_file_path
2149
+
2150
+ # This is always **sql#mysqlReplicaConfiguration**.
2151
+ # Corresponds to the JSON property `kind`
2152
+ # @return [String]
2153
+ attr_accessor :kind
2154
+
2155
+ # Interval in milliseconds between replication heartbeats.
2156
+ # Corresponds to the JSON property `masterHeartbeatPeriod`
2157
+ # @return [Fixnum]
2158
+ attr_accessor :master_heartbeat_period
2159
+
2160
+ # The password for the replication connection.
2161
+ # Corresponds to the JSON property `password`
2162
+ # @return [String]
2163
+ attr_accessor :password
2164
+
2165
+ # A list of permissible ciphers to use for SSL encryption.
2166
+ # Corresponds to the JSON property `sslCipher`
2167
+ # @return [String]
2168
+ attr_accessor :ssl_cipher
2169
+
2170
+ # The username for the replication connection.
2171
+ # Corresponds to the JSON property `username`
2172
+ # @return [String]
2173
+ attr_accessor :username
2174
+
2175
+ # Whether or not to check the primary instance's Common Name value in the
2176
+ # certificate that it sends during the SSL handshake.
2177
+ # Corresponds to the JSON property `verifyServerCertificate`
2178
+ # @return [Boolean]
2179
+ attr_accessor :verify_server_certificate
2180
+ alias_method :verify_server_certificate?, :verify_server_certificate
2181
+
2182
+ def initialize(**args)
2183
+ update!(**args)
2184
+ end
2185
+
2186
+ # Update properties of this object
2187
+ def update!(**args)
2188
+ @ca_certificate = args[:ca_certificate] if args.key?(:ca_certificate)
2189
+ @client_certificate = args[:client_certificate] if args.key?(:client_certificate)
2190
+ @client_key = args[:client_key] if args.key?(:client_key)
2191
+ @connect_retry_interval = args[:connect_retry_interval] if args.key?(:connect_retry_interval)
2192
+ @dump_file_path = args[:dump_file_path] if args.key?(:dump_file_path)
2193
+ @kind = args[:kind] if args.key?(:kind)
2194
+ @master_heartbeat_period = args[:master_heartbeat_period] if args.key?(:master_heartbeat_period)
2195
+ @password = args[:password] if args.key?(:password)
2196
+ @ssl_cipher = args[:ssl_cipher] if args.key?(:ssl_cipher)
2197
+ @username = args[:username] if args.key?(:username)
2198
+ @verify_server_certificate = args[:verify_server_certificate] if args.key?(:verify_server_certificate)
2199
+ end
2200
+ end
2201
+
2202
+ # MySQL-specific external server sync settings.
2203
+ class MySqlSyncConfig
2204
+ include Google::Apis::Core::Hashable
2205
+
2206
+ # Flags to use for the initial dump.
2207
+ # Corresponds to the JSON property `initialSyncFlags`
2208
+ # @return [Array<Google::Apis::SqladminV1::SyncFlags>]
2209
+ attr_accessor :initial_sync_flags
2210
+
2211
+ def initialize(**args)
2212
+ update!(**args)
2213
+ end
2214
+
2215
+ # Update properties of this object
2216
+ def update!(**args)
2217
+ @initial_sync_flags = args[:initial_sync_flags] if args.key?(:initial_sync_flags)
2218
+ end
2219
+ end
2220
+
2221
+ # On-premises instance configuration.
2222
+ class OnPremisesConfiguration
2223
+ include Google::Apis::Core::Hashable
2224
+
2225
+ # PEM representation of the trusted CA's x509 certificate.
2226
+ # Corresponds to the JSON property `caCertificate`
2227
+ # @return [String]
2228
+ attr_accessor :ca_certificate
2229
+
2230
+ # PEM representation of the replica's x509 certificate.
2231
+ # Corresponds to the JSON property `clientCertificate`
2232
+ # @return [String]
2233
+ attr_accessor :client_certificate
2234
+
2235
+ # PEM representation of the replica's private key. The corresponsing public key
2236
+ # is encoded in the client's certificate.
2237
+ # Corresponds to the JSON property `clientKey`
2238
+ # @return [String]
2239
+ attr_accessor :client_key
2240
+
2241
+ # The dump file to create the Cloud SQL replica.
2242
+ # Corresponds to the JSON property `dumpFilePath`
2243
+ # @return [String]
2244
+ attr_accessor :dump_file_path
2245
+
2246
+ # The host and port of the on-premises instance in host:port format
2247
+ # Corresponds to the JSON property `hostPort`
2248
+ # @return [String]
2249
+ attr_accessor :host_port
2250
+
2251
+ # This is always *sql#onPremisesConfiguration*.
2252
+ # Corresponds to the JSON property `kind`
2253
+ # @return [String]
2254
+ attr_accessor :kind
2255
+
2256
+ # The password for connecting to on-premises instance.
2257
+ # Corresponds to the JSON property `password`
2258
+ # @return [String]
2259
+ attr_accessor :password
2260
+
2261
+ # Reference to another Cloud SQL instance.
2262
+ # Corresponds to the JSON property `sourceInstance`
2263
+ # @return [Google::Apis::SqladminV1::InstanceReference]
2264
+ attr_accessor :source_instance
2265
+
2266
+ # The username for connecting to on-premises instance.
2267
+ # Corresponds to the JSON property `username`
2268
+ # @return [String]
2269
+ attr_accessor :username
2270
+
2271
+ def initialize(**args)
2272
+ update!(**args)
2273
+ end
2274
+
2275
+ # Update properties of this object
2276
+ def update!(**args)
2277
+ @ca_certificate = args[:ca_certificate] if args.key?(:ca_certificate)
2278
+ @client_certificate = args[:client_certificate] if args.key?(:client_certificate)
2279
+ @client_key = args[:client_key] if args.key?(:client_key)
2280
+ @dump_file_path = args[:dump_file_path] if args.key?(:dump_file_path)
2281
+ @host_port = args[:host_port] if args.key?(:host_port)
2282
+ @kind = args[:kind] if args.key?(:kind)
2283
+ @password = args[:password] if args.key?(:password)
2284
+ @source_instance = args[:source_instance] if args.key?(:source_instance)
2285
+ @username = args[:username] if args.key?(:username)
2286
+ end
2287
+ end
2288
+
2289
+ # An Operation resource. For successful operations that return an Operation
2290
+ # resource, only the fields relevant to the operation are populated in the
2291
+ # resource.
2292
+ class Operation
2293
+ include Google::Apis::Core::Hashable
2294
+
2295
+ # Backup context.
2296
+ # Corresponds to the JSON property `backupContext`
2297
+ # @return [Google::Apis::SqladminV1::BackupContext]
2298
+ attr_accessor :backup_context
2299
+
2300
+ # The time this operation finished in UTC timezone in [RFC 3339](https://tools.
2301
+ # ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
2302
+ # Corresponds to the JSON property `endTime`
2303
+ # @return [String]
2304
+ attr_accessor :end_time
2305
+
2306
+ # Database instance operation errors list wrapper.
2307
+ # Corresponds to the JSON property `error`
2308
+ # @return [Google::Apis::SqladminV1::OperationErrors]
2309
+ attr_accessor :error
2310
+
2311
+ # Database instance export context.
2312
+ # Corresponds to the JSON property `exportContext`
2313
+ # @return [Google::Apis::SqladminV1::ExportContext]
2314
+ attr_accessor :export_context
2315
+
2316
+ # Database instance import context.
2317
+ # Corresponds to the JSON property `importContext`
2318
+ # @return [Google::Apis::SqladminV1::ImportContext]
2319
+ attr_accessor :import_context
2320
+
2321
+ # The time this operation was enqueued in UTC timezone in [RFC 3339](https://
2322
+ # tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
2323
+ # Corresponds to the JSON property `insertTime`
2324
+ # @return [String]
2325
+ attr_accessor :insert_time
2326
+
2327
+ # This is always **sql#operation**.
2328
+ # Corresponds to the JSON property `kind`
2329
+ # @return [String]
2330
+ attr_accessor :kind
2331
+
2332
+ # An identifier that uniquely identifies the operation. You can use this
2333
+ # identifier to retrieve the Operations resource that has information about the
2334
+ # operation.
2335
+ # Corresponds to the JSON property `name`
2336
+ # @return [String]
2337
+ attr_accessor :name
2338
+
2339
+ # The type of the operation. Valid values are: **CREATE** **DELETE** **UPDATE** *
2340
+ # *RESTART** **IMPORT** **EXPORT** **BACKUP_VOLUME** **RESTORE_VOLUME** **
2341
+ # CREATE_USER** **DELETE_USER** **CREATE_DATABASE** **DELETE_DATABASE**
2342
+ # Corresponds to the JSON property `operationType`
2343
+ # @return [String]
2344
+ attr_accessor :operation_type
2345
+
2346
+ # The URI of this resource.
2347
+ # Corresponds to the JSON property `selfLink`
2348
+ # @return [String]
2349
+ attr_accessor :self_link
2350
+
2351
+ # The time this operation actually started in UTC timezone in [RFC 3339](https://
2352
+ # tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
2353
+ # Corresponds to the JSON property `startTime`
2354
+ # @return [String]
2355
+ attr_accessor :start_time
2356
+
2357
+ # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE**
2358
+ # **SQL_OPERATION_STATUS_UNSPECIFIED**
2359
+ # Corresponds to the JSON property `status`
2360
+ # @return [String]
2361
+ attr_accessor :status
2362
+
2363
+ # Name of the database instance related to this operation.
2364
+ # Corresponds to the JSON property `targetId`
2365
+ # @return [String]
2366
+ attr_accessor :target_id
2367
+
2368
+ #
2369
+ # Corresponds to the JSON property `targetLink`
2370
+ # @return [String]
2371
+ attr_accessor :target_link
2372
+
2373
+ # The project ID of the target instance related to this operation.
2374
+ # Corresponds to the JSON property `targetProject`
2375
+ # @return [String]
2376
+ attr_accessor :target_project
2377
+
2378
+ # The email address of the user who initiated this operation.
2379
+ # Corresponds to the JSON property `user`
2380
+ # @return [String]
2381
+ attr_accessor :user
2382
+
2383
+ def initialize(**args)
2384
+ update!(**args)
2385
+ end
2386
+
2387
+ # Update properties of this object
2388
+ def update!(**args)
2389
+ @backup_context = args[:backup_context] if args.key?(:backup_context)
2390
+ @end_time = args[:end_time] if args.key?(:end_time)
2391
+ @error = args[:error] if args.key?(:error)
2392
+ @export_context = args[:export_context] if args.key?(:export_context)
2393
+ @import_context = args[:import_context] if args.key?(:import_context)
2394
+ @insert_time = args[:insert_time] if args.key?(:insert_time)
2395
+ @kind = args[:kind] if args.key?(:kind)
2396
+ @name = args[:name] if args.key?(:name)
2397
+ @operation_type = args[:operation_type] if args.key?(:operation_type)
2398
+ @self_link = args[:self_link] if args.key?(:self_link)
2399
+ @start_time = args[:start_time] if args.key?(:start_time)
2400
+ @status = args[:status] if args.key?(:status)
2401
+ @target_id = args[:target_id] if args.key?(:target_id)
2402
+ @target_link = args[:target_link] if args.key?(:target_link)
2403
+ @target_project = args[:target_project] if args.key?(:target_project)
2404
+ @user = args[:user] if args.key?(:user)
2405
+ end
2406
+ end
2407
+
2408
+ # Database instance operation error.
2409
+ class OperationError
2410
+ include Google::Apis::Core::Hashable
2411
+
2412
+ # Identifies the specific error that occurred.
2413
+ # Corresponds to the JSON property `code`
2414
+ # @return [String]
2415
+ attr_accessor :code
2416
+
2417
+ # This is always **sql#operationError**.
2418
+ # Corresponds to the JSON property `kind`
2419
+ # @return [String]
2420
+ attr_accessor :kind
2421
+
2422
+ # Additional information about the error encountered.
2423
+ # Corresponds to the JSON property `message`
2424
+ # @return [String]
2425
+ attr_accessor :message
2426
+
2427
+ def initialize(**args)
2428
+ update!(**args)
2429
+ end
2430
+
2431
+ # Update properties of this object
2432
+ def update!(**args)
2433
+ @code = args[:code] if args.key?(:code)
2434
+ @kind = args[:kind] if args.key?(:kind)
2435
+ @message = args[:message] if args.key?(:message)
2436
+ end
2437
+ end
2438
+
2439
+ # Database instance operation errors list wrapper.
2440
+ class OperationErrors
2441
+ include Google::Apis::Core::Hashable
2442
+
2443
+ # The list of errors encountered while processing this operation.
2444
+ # Corresponds to the JSON property `errors`
2445
+ # @return [Array<Google::Apis::SqladminV1::OperationError>]
2446
+ attr_accessor :errors
2447
+
2448
+ # This is always **sql#operationErrors**.
2449
+ # Corresponds to the JSON property `kind`
2450
+ # @return [String]
2451
+ attr_accessor :kind
2452
+
2453
+ def initialize(**args)
2454
+ update!(**args)
2455
+ end
2456
+
2457
+ # Update properties of this object
2458
+ def update!(**args)
2459
+ @errors = args[:errors] if args.key?(:errors)
2460
+ @kind = args[:kind] if args.key?(:kind)
2461
+ end
2462
+ end
2463
+
2464
+ # Operations list response.
2465
+ class OperationsListResponse
2466
+ include Google::Apis::Core::Hashable
2467
+
2468
+ # List of operation resources.
2469
+ # Corresponds to the JSON property `items`
2470
+ # @return [Array<Google::Apis::SqladminV1::Operation>]
2471
+ attr_accessor :items
2472
+
2473
+ # This is always *sql#operationsList*.
2474
+ # Corresponds to the JSON property `kind`
2475
+ # @return [String]
2476
+ attr_accessor :kind
2477
+
2478
+ # The continuation token, used to page through large result sets. Provide this
2479
+ # value in a subsequent request to return the next page of results.
2480
+ # Corresponds to the JSON property `nextPageToken`
2481
+ # @return [String]
2482
+ attr_accessor :next_page_token
2483
+
2484
+ def initialize(**args)
2485
+ update!(**args)
2486
+ end
2487
+
2488
+ # Update properties of this object
2489
+ def update!(**args)
2490
+ @items = args[:items] if args.key?(:items)
2491
+ @kind = args[:kind] if args.key?(:kind)
2492
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2493
+ end
2494
+ end
2495
+
2496
+ # Read-replica configuration for connecting to the primary instance.
2497
+ class ReplicaConfiguration
2498
+ include Google::Apis::Core::Hashable
2499
+
2500
+ # Specifies if the replica is the failover target. If the field is set to *true*
2501
+ # the replica will be designated as a failover replica. In case the primary
2502
+ # instance fails, the replica instance will be promoted as the new primary
2503
+ # instance. Only one replica can be specified as failover target, and the
2504
+ # replica has to be in different zone with the primary instance.
2505
+ # Corresponds to the JSON property `failoverTarget`
2506
+ # @return [Boolean]
2507
+ attr_accessor :failover_target
2508
+ alias_method :failover_target?, :failover_target
2509
+
2510
+ # This is always *sql#replicaConfiguration*.
2511
+ # Corresponds to the JSON property `kind`
2512
+ # @return [String]
2513
+ attr_accessor :kind
2514
+
2515
+ # Read-replica configuration specific to MySQL databases.
2516
+ # Corresponds to the JSON property `mysqlReplicaConfiguration`
2517
+ # @return [Google::Apis::SqladminV1::MySqlReplicaConfiguration]
2518
+ attr_accessor :mysql_replica_configuration
2519
+
2520
+ def initialize(**args)
2521
+ update!(**args)
2522
+ end
2523
+
2524
+ # Update properties of this object
2525
+ def update!(**args)
2526
+ @failover_target = args[:failover_target] if args.key?(:failover_target)
2527
+ @kind = args[:kind] if args.key?(:kind)
2528
+ @mysql_replica_configuration = args[:mysql_replica_configuration] if args.key?(:mysql_replica_configuration)
2529
+ end
2530
+ end
2531
+
2532
+ #
2533
+ class Reschedule
2534
+ include Google::Apis::Core::Hashable
2535
+
2536
+ # Required. The type of the reschedule.
2537
+ # Corresponds to the JSON property `rescheduleType`
2538
+ # @return [String]
2539
+ attr_accessor :reschedule_type
2540
+
2541
+ # Optional. Timestamp when the maintenance shall be rescheduled to if
2542
+ # reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example *2012-11-15T16:
2543
+ # 19:00.094Z*.
2544
+ # Corresponds to the JSON property `scheduleTime`
2545
+ # @return [String]
2546
+ attr_accessor :schedule_time
2547
+
2548
+ def initialize(**args)
2549
+ update!(**args)
2550
+ end
2551
+
2552
+ # Update properties of this object
2553
+ def update!(**args)
2554
+ @reschedule_type = args[:reschedule_type] if args.key?(:reschedule_type)
2555
+ @schedule_time = args[:schedule_time] if args.key?(:schedule_time)
2556
+ end
2557
+ end
2558
+
2559
+ # Database instance restore from backup context. Backup context contains source
2560
+ # instance id and project id.
2561
+ class RestoreBackupContext
2562
+ include Google::Apis::Core::Hashable
2563
+
2564
+ # The ID of the backup run to restore from.
2565
+ # Corresponds to the JSON property `backupRunId`
2566
+ # @return [Fixnum]
2567
+ attr_accessor :backup_run_id
2568
+
2569
+ # The ID of the instance that the backup was taken from.
2570
+ # Corresponds to the JSON property `instanceId`
2571
+ # @return [String]
2572
+ attr_accessor :instance_id
2573
+
2574
+ # This is always *sql#restoreBackupContext*.
2575
+ # Corresponds to the JSON property `kind`
2576
+ # @return [String]
2577
+ attr_accessor :kind
2578
+
2579
+ # The full project ID of the source instance.
2580
+ # Corresponds to the JSON property `project`
2581
+ # @return [String]
2582
+ attr_accessor :project
2583
+
2584
+ def initialize(**args)
2585
+ update!(**args)
2586
+ end
2587
+
2588
+ # Update properties of this object
2589
+ def update!(**args)
2590
+ @backup_run_id = args[:backup_run_id] if args.key?(:backup_run_id)
2591
+ @instance_id = args[:instance_id] if args.key?(:instance_id)
2592
+ @kind = args[:kind] if args.key?(:kind)
2593
+ @project = args[:project] if args.key?(:project)
2594
+ end
2595
+ end
2596
+
2597
+ # Instance rotate server CA context.
2598
+ class RotateServerCaContext
2599
+ include Google::Apis::Core::Hashable
2600
+
2601
+ # This is always *sql#rotateServerCaContext*.
2602
+ # Corresponds to the JSON property `kind`
2603
+ # @return [String]
2604
+ attr_accessor :kind
2605
+
2606
+ # The fingerprint of the next version to be rotated to. If left unspecified,
2607
+ # will be rotated to the most recently added server CA version.
2608
+ # Corresponds to the JSON property `nextVersion`
2609
+ # @return [String]
2610
+ attr_accessor :next_version
2611
+
2612
+ def initialize(**args)
2613
+ update!(**args)
2614
+ end
2615
+
2616
+ # Update properties of this object
2617
+ def update!(**args)
2618
+ @kind = args[:kind] if args.key?(:kind)
2619
+ @next_version = args[:next_version] if args.key?(:next_version)
2620
+ end
2621
+ end
2622
+
2623
+ # Database instance settings.
2624
+ class Settings
2625
+ include Google::Apis::Core::Hashable
2626
+
2627
+ # The activation policy specifies when the instance is activated; it is
2628
+ # applicable only when the instance state is RUNNABLE. Valid values: **ALWAYS**:
2629
+ # The instance is on, and remains so even in the absence of connection requests.
2630
+ # **NEVER**: The instance is off; it is not activated, even if a connection
2631
+ # request arrives.
2632
+ # Corresponds to the JSON property `activationPolicy`
2633
+ # @return [String]
2634
+ attr_accessor :activation_policy
2635
+
2636
+ # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
2637
+ # Corresponds to the JSON property `activeDirectoryConfig`
2638
+ # @return [Google::Apis::SqladminV1::SqlActiveDirectoryConfig]
2639
+ attr_accessor :active_directory_config
2640
+
2641
+ # The App Engine app IDs that can access this instance. (Deprecated) Applied to
2642
+ # First Generation instances only.
2643
+ # Corresponds to the JSON property `authorizedGaeApplications`
2644
+ # @return [Array<String>]
2645
+ attr_accessor :authorized_gae_applications
2646
+
2647
+ # Availability type. Potential values: **ZONAL**: The instance serves data from
2648
+ # only one zone. Outages in that zone affect data accessibility. **REGIONAL**:
2649
+ # The instance can serve data from more than one zone in a region (it is highly
2650
+ # available). For more information, see [Overview of the High Availability
2651
+ # Configuration](https://cloud.google.com/sql/docs/mysql/high-availability).
2652
+ # Corresponds to the JSON property `availabilityType`
2653
+ # @return [String]
2654
+ attr_accessor :availability_type
2655
+
2656
+ # Database instance backup configuration.
2657
+ # Corresponds to the JSON property `backupConfiguration`
2658
+ # @return [Google::Apis::SqladminV1::BackupConfiguration]
2659
+ attr_accessor :backup_configuration
2660
+
2661
+ # The name of server Instance collation.
2662
+ # Corresponds to the JSON property `collation`
2663
+ # @return [String]
2664
+ attr_accessor :collation
2665
+
2666
+ # Configuration specific to read replica instances. Indicates whether database
2667
+ # flags for crash-safe replication are enabled. This property was only
2668
+ # applicable to First Generation instances.
2669
+ # Corresponds to the JSON property `crashSafeReplicationEnabled`
2670
+ # @return [Boolean]
2671
+ attr_accessor :crash_safe_replication_enabled
2672
+ alias_method :crash_safe_replication_enabled?, :crash_safe_replication_enabled
2673
+
2674
+ # The size of data disk, in GB. The data disk size minimum is 10GB.
2675
+ # Corresponds to the JSON property `dataDiskSizeGb`
2676
+ # @return [Fixnum]
2677
+ attr_accessor :data_disk_size_gb
2678
+
2679
+ # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
2680
+ # Corresponds to the JSON property `dataDiskType`
2681
+ # @return [String]
2682
+ attr_accessor :data_disk_type
2683
+
2684
+ # The database flags passed to the instance at startup.
2685
+ # Corresponds to the JSON property `databaseFlags`
2686
+ # @return [Array<Google::Apis::SqladminV1::DatabaseFlags>]
2687
+ attr_accessor :database_flags
2688
+
2689
+ # Configuration specific to read replica instances. Indicates whether
2690
+ # replication is enabled or not.
2691
+ # Corresponds to the JSON property `databaseReplicationEnabled`
2692
+ # @return [Boolean]
2693
+ attr_accessor :database_replication_enabled
2694
+ alias_method :database_replication_enabled?, :database_replication_enabled
2695
+
2696
+ # Deny maintenance periods
2697
+ # Corresponds to the JSON property `denyMaintenancePeriods`
2698
+ # @return [Array<Google::Apis::SqladminV1::DenyMaintenancePeriod>]
2699
+ attr_accessor :deny_maintenance_periods
2700
+
2701
+ # Insights configuration. This specifies when Cloud SQL Insights feature is
2702
+ # enabled and optional configuration.
2703
+ # Corresponds to the JSON property `insightsConfig`
2704
+ # @return [Google::Apis::SqladminV1::InsightsConfig]
2705
+ attr_accessor :insights_config
2706
+
2707
+ # IP Management configuration.
2708
+ # Corresponds to the JSON property `ipConfiguration`
2709
+ # @return [Google::Apis::SqladminV1::IpConfiguration]
2710
+ attr_accessor :ip_configuration
2711
+
2712
+ # This is always **sql#settings**.
2713
+ # Corresponds to the JSON property `kind`
2714
+ # @return [String]
2715
+ attr_accessor :kind
2716
+
2717
+ # Preferred location. This specifies where a Cloud SQL instance is located. Note
2718
+ # that if the preferred location is not available, the instance will be located
2719
+ # as close as possible within the region. Only one location may be specified.
2720
+ # Corresponds to the JSON property `locationPreference`
2721
+ # @return [Google::Apis::SqladminV1::LocationPreference]
2722
+ attr_accessor :location_preference
2723
+
2724
+ # Maintenance window. This specifies when a Cloud SQL instance is restarted for
2725
+ # system maintenance purposes.
2726
+ # Corresponds to the JSON property `maintenanceWindow`
2727
+ # @return [Google::Apis::SqladminV1::MaintenanceWindow]
2728
+ attr_accessor :maintenance_window
2729
+
2730
+ # The pricing plan for this instance. This can be either **PER_USE** or **
2731
+ # PACKAGE**. Only **PER_USE** is supported for Second Generation instances.
2732
+ # Corresponds to the JSON property `pricingPlan`
2733
+ # @return [String]
2734
+ attr_accessor :pricing_plan
2735
+
2736
+ # The type of replication this instance uses. This can be either **ASYNCHRONOUS**
2737
+ # or **SYNCHRONOUS**. (Deprecated) This property was only applicable to First
2738
+ # Generation instances.
2739
+ # Corresponds to the JSON property `replicationType`
2740
+ # @return [String]
2741
+ attr_accessor :replication_type
2742
+
2743
+ # The version of instance settings. This is a required field for update method
2744
+ # to make sure concurrent updates are handled properly. During update, use the
2745
+ # most recent settingsVersion value for this instance and do not try to update
2746
+ # this value.
2747
+ # Corresponds to the JSON property `settingsVersion`
2748
+ # @return [Fixnum]
2749
+ attr_accessor :settings_version
2750
+
2751
+ # SQL Server specific audit configuration.
2752
+ # Corresponds to the JSON property `sqlServerAuditConfig`
2753
+ # @return [Google::Apis::SqladminV1::SqlServerAuditConfig]
2754
+ attr_accessor :sql_server_audit_config
2755
+
2756
+ # Configuration to increase storage size automatically. The default value is
2757
+ # true.
2758
+ # Corresponds to the JSON property `storageAutoResize`
2759
+ # @return [Boolean]
2760
+ attr_accessor :storage_auto_resize
2761
+ alias_method :storage_auto_resize?, :storage_auto_resize
2762
+
2763
+ # The maximum size to which storage capacity can be automatically increased. The
2764
+ # default value is 0, which specifies that there is no limit.
2765
+ # Corresponds to the JSON property `storageAutoResizeLimit`
2766
+ # @return [Fixnum]
2767
+ attr_accessor :storage_auto_resize_limit
2768
+
2769
+ # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
2770
+ # Corresponds to the JSON property `tier`
2771
+ # @return [String]
2772
+ attr_accessor :tier
2773
+
2774
+ # User-provided labels, represented as a dictionary where each label is a single
2775
+ # key value pair.
2776
+ # Corresponds to the JSON property `userLabels`
2777
+ # @return [Hash<String,String>]
2778
+ attr_accessor :user_labels
2779
+
2780
+ def initialize(**args)
2781
+ update!(**args)
2782
+ end
2783
+
2784
+ # Update properties of this object
2785
+ def update!(**args)
2786
+ @activation_policy = args[:activation_policy] if args.key?(:activation_policy)
2787
+ @active_directory_config = args[:active_directory_config] if args.key?(:active_directory_config)
2788
+ @authorized_gae_applications = args[:authorized_gae_applications] if args.key?(:authorized_gae_applications)
2789
+ @availability_type = args[:availability_type] if args.key?(:availability_type)
2790
+ @backup_configuration = args[:backup_configuration] if args.key?(:backup_configuration)
2791
+ @collation = args[:collation] if args.key?(:collation)
2792
+ @crash_safe_replication_enabled = args[:crash_safe_replication_enabled] if args.key?(:crash_safe_replication_enabled)
2793
+ @data_disk_size_gb = args[:data_disk_size_gb] if args.key?(:data_disk_size_gb)
2794
+ @data_disk_type = args[:data_disk_type] if args.key?(:data_disk_type)
2795
+ @database_flags = args[:database_flags] if args.key?(:database_flags)
2796
+ @database_replication_enabled = args[:database_replication_enabled] if args.key?(:database_replication_enabled)
2797
+ @deny_maintenance_periods = args[:deny_maintenance_periods] if args.key?(:deny_maintenance_periods)
2798
+ @insights_config = args[:insights_config] if args.key?(:insights_config)
2799
+ @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration)
2800
+ @kind = args[:kind] if args.key?(:kind)
2801
+ @location_preference = args[:location_preference] if args.key?(:location_preference)
2802
+ @maintenance_window = args[:maintenance_window] if args.key?(:maintenance_window)
2803
+ @pricing_plan = args[:pricing_plan] if args.key?(:pricing_plan)
2804
+ @replication_type = args[:replication_type] if args.key?(:replication_type)
2805
+ @settings_version = args[:settings_version] if args.key?(:settings_version)
2806
+ @sql_server_audit_config = args[:sql_server_audit_config] if args.key?(:sql_server_audit_config)
2807
+ @storage_auto_resize = args[:storage_auto_resize] if args.key?(:storage_auto_resize)
2808
+ @storage_auto_resize_limit = args[:storage_auto_resize_limit] if args.key?(:storage_auto_resize_limit)
2809
+ @tier = args[:tier] if args.key?(:tier)
2810
+ @user_labels = args[:user_labels] if args.key?(:user_labels)
2811
+ end
2812
+ end
2813
+
2814
+ # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
2815
+ class SqlActiveDirectoryConfig
2816
+ include Google::Apis::Core::Hashable
2817
+
2818
+ # The name of the domain (e.g., mydomain.com).
2819
+ # Corresponds to the JSON property `domain`
2820
+ # @return [String]
2821
+ attr_accessor :domain
2822
+
2823
+ # This is always sql#activeDirectoryConfig.
2824
+ # Corresponds to the JSON property `kind`
2825
+ # @return [String]
2826
+ attr_accessor :kind
2827
+
2828
+ def initialize(**args)
2829
+ update!(**args)
2830
+ end
2831
+
2832
+ # Update properties of this object
2833
+ def update!(**args)
2834
+ @domain = args[:domain] if args.key?(:domain)
2835
+ @kind = args[:kind] if args.key?(:kind)
2836
+ end
2837
+ end
2838
+
2839
+ # External primary instance migration setting error.
2840
+ class SqlExternalSyncSettingError
2841
+ include Google::Apis::Core::Hashable
2842
+
2843
+ # Additional information about the error encountered.
2844
+ # Corresponds to the JSON property `detail`
2845
+ # @return [String]
2846
+ attr_accessor :detail
2847
+
2848
+ # Can be *sql#externalSyncSettingError* or *sql#externalSyncSettingWarning*.
2849
+ # Corresponds to the JSON property `kind`
2850
+ # @return [String]
2851
+ attr_accessor :kind
2852
+
2853
+ # Identifies the specific error that occurred.
2854
+ # Corresponds to the JSON property `type`
2855
+ # @return [String]
2856
+ attr_accessor :type
2857
+
2858
+ def initialize(**args)
2859
+ update!(**args)
2860
+ end
2861
+
2862
+ # Update properties of this object
2863
+ def update!(**args)
2864
+ @detail = args[:detail] if args.key?(:detail)
2865
+ @kind = args[:kind] if args.key?(:kind)
2866
+ @type = args[:type] if args.key?(:type)
2867
+ end
2868
+ end
2869
+
2870
+ # Reschedule options for maintenance windows.
2871
+ class SqlInstancesRescheduleMaintenanceRequestBody
2872
+ include Google::Apis::Core::Hashable
2873
+
2874
+ # Required. The type of the reschedule the user wants.
2875
+ # Corresponds to the JSON property `reschedule`
2876
+ # @return [Google::Apis::SqladminV1::Reschedule]
2877
+ attr_accessor :reschedule
2878
+
2879
+ def initialize(**args)
2880
+ update!(**args)
2881
+ end
2882
+
2883
+ # Update properties of this object
2884
+ def update!(**args)
2885
+ @reschedule = args[:reschedule] if args.key?(:reschedule)
2886
+ end
2887
+ end
2888
+
2889
+ # Instance start external sync request.
2890
+ class SqlInstancesStartExternalSyncRequest
2891
+ include Google::Apis::Core::Hashable
2892
+
2893
+ # MySQL-specific external server sync settings.
2894
+ # Corresponds to the JSON property `mysqlSyncConfig`
2895
+ # @return [Google::Apis::SqladminV1::MySqlSyncConfig]
2896
+ attr_accessor :mysql_sync_config
2897
+
2898
+ # Whether to skip the verification step (VESS).
2899
+ # Corresponds to the JSON property `skipVerification`
2900
+ # @return [Boolean]
2901
+ attr_accessor :skip_verification
2902
+ alias_method :skip_verification?, :skip_verification
2903
+
2904
+ # External sync mode.
2905
+ # Corresponds to the JSON property `syncMode`
2906
+ # @return [String]
2907
+ attr_accessor :sync_mode
2908
+
2909
+ def initialize(**args)
2910
+ update!(**args)
2911
+ end
2912
+
2913
+ # Update properties of this object
2914
+ def update!(**args)
2915
+ @mysql_sync_config = args[:mysql_sync_config] if args.key?(:mysql_sync_config)
2916
+ @skip_verification = args[:skip_verification] if args.key?(:skip_verification)
2917
+ @sync_mode = args[:sync_mode] if args.key?(:sync_mode)
2918
+ end
2919
+ end
2920
+
2921
+ # Instance verify external sync settings request.
2922
+ class SqlInstancesVerifyExternalSyncSettingsRequest
2923
+ include Google::Apis::Core::Hashable
2924
+
2925
+ # MySQL-specific external server sync settings.
2926
+ # Corresponds to the JSON property `mysqlSyncConfig`
2927
+ # @return [Google::Apis::SqladminV1::MySqlSyncConfig]
2928
+ attr_accessor :mysql_sync_config
2929
+
2930
+ # External sync mode
2931
+ # Corresponds to the JSON property `syncMode`
2932
+ # @return [String]
2933
+ attr_accessor :sync_mode
2934
+
2935
+ # Flag to enable verifying connection only
2936
+ # Corresponds to the JSON property `verifyConnectionOnly`
2937
+ # @return [Boolean]
2938
+ attr_accessor :verify_connection_only
2939
+ alias_method :verify_connection_only?, :verify_connection_only
2940
+
2941
+ # Optional. Flag to verify settings required by replication setup only
2942
+ # Corresponds to the JSON property `verifyReplicationOnly`
2943
+ # @return [Boolean]
2944
+ attr_accessor :verify_replication_only
2945
+ alias_method :verify_replication_only?, :verify_replication_only
2946
+
2947
+ def initialize(**args)
2948
+ update!(**args)
2949
+ end
2950
+
2951
+ # Update properties of this object
2952
+ def update!(**args)
2953
+ @mysql_sync_config = args[:mysql_sync_config] if args.key?(:mysql_sync_config)
2954
+ @sync_mode = args[:sync_mode] if args.key?(:sync_mode)
2955
+ @verify_connection_only = args[:verify_connection_only] if args.key?(:verify_connection_only)
2956
+ @verify_replication_only = args[:verify_replication_only] if args.key?(:verify_replication_only)
2957
+ end
2958
+ end
2959
+
2960
+ # Instance verify external sync settings response.
2961
+ class SqlInstancesVerifyExternalSyncSettingsResponse
2962
+ include Google::Apis::Core::Hashable
2963
+
2964
+ # List of migration violations.
2965
+ # Corresponds to the JSON property `errors`
2966
+ # @return [Array<Google::Apis::SqladminV1::SqlExternalSyncSettingError>]
2967
+ attr_accessor :errors
2968
+
2969
+ # This is always *sql#migrationSettingErrorList*.
2970
+ # Corresponds to the JSON property `kind`
2971
+ # @return [String]
2972
+ attr_accessor :kind
2973
+
2974
+ # List of migration warnings.
2975
+ # Corresponds to the JSON property `warnings`
2976
+ # @return [Array<Google::Apis::SqladminV1::SqlExternalSyncSettingError>]
2977
+ attr_accessor :warnings
2978
+
2979
+ def initialize(**args)
2980
+ update!(**args)
2981
+ end
2982
+
2983
+ # Update properties of this object
2984
+ def update!(**args)
2985
+ @errors = args[:errors] if args.key?(:errors)
2986
+ @kind = args[:kind] if args.key?(:kind)
2987
+ @warnings = args[:warnings] if args.key?(:warnings)
2988
+ end
2989
+ end
2990
+
2991
+ # This message wraps up the information written by out-of-disk detection job.
2992
+ class SqlOutOfDiskReport
2993
+ include Google::Apis::Core::Hashable
2994
+
2995
+ # The minimum recommended increase size in GigaBytes This field is consumed by
2996
+ # the frontend Writers: -- the proactive database wellness job for OOD. Readers:
2997
+ # -- the Pantheon frontend
2998
+ # Corresponds to the JSON property `sqlMinRecommendedIncreaseSizeGb`
2999
+ # @return [Fixnum]
3000
+ attr_accessor :sql_min_recommended_increase_size_gb
3001
+
3002
+ # This field represents the state generated by the proactive database wellness
3003
+ # job for OutOfDisk issues. Writers: -- the proactive database wellness job for
3004
+ # OOD. Readers: -- the Pantheon frontend -- the proactive database wellness job
3005
+ # Corresponds to the JSON property `sqlOutOfDiskState`
3006
+ # @return [String]
3007
+ attr_accessor :sql_out_of_disk_state
3008
+
3009
+ def initialize(**args)
3010
+ update!(**args)
3011
+ end
3012
+
3013
+ # Update properties of this object
3014
+ def update!(**args)
3015
+ @sql_min_recommended_increase_size_gb = args[:sql_min_recommended_increase_size_gb] if args.key?(:sql_min_recommended_increase_size_gb)
3016
+ @sql_out_of_disk_state = args[:sql_out_of_disk_state] if args.key?(:sql_out_of_disk_state)
3017
+ end
3018
+ end
3019
+
3020
+ # Any scheduled maintenancce for this instance.
3021
+ class SqlScheduledMaintenance
3022
+ include Google::Apis::Core::Hashable
3023
+
3024
+ #
3025
+ # Corresponds to the JSON property `canDefer`
3026
+ # @return [Boolean]
3027
+ attr_accessor :can_defer
3028
+ alias_method :can_defer?, :can_defer
3029
+
3030
+ # If the scheduled maintenance can be rescheduled.
3031
+ # Corresponds to the JSON property `canReschedule`
3032
+ # @return [Boolean]
3033
+ attr_accessor :can_reschedule
3034
+ alias_method :can_reschedule?, :can_reschedule
3035
+
3036
+ # Maintenance cannot be rescheduled to start beyond this deadline.
3037
+ # Corresponds to the JSON property `scheduleDeadlineTime`
3038
+ # @return [String]
3039
+ attr_accessor :schedule_deadline_time
3040
+
3041
+ # The start time of any upcoming scheduled maintenance for this instance.
3042
+ # Corresponds to the JSON property `startTime`
3043
+ # @return [String]
3044
+ attr_accessor :start_time
3045
+
3046
+ def initialize(**args)
3047
+ update!(**args)
3048
+ end
3049
+
3050
+ # Update properties of this object
3051
+ def update!(**args)
3052
+ @can_defer = args[:can_defer] if args.key?(:can_defer)
3053
+ @can_reschedule = args[:can_reschedule] if args.key?(:can_reschedule)
3054
+ @schedule_deadline_time = args[:schedule_deadline_time] if args.key?(:schedule_deadline_time)
3055
+ @start_time = args[:start_time] if args.key?(:start_time)
3056
+ end
3057
+ end
3058
+
3059
+ # SQL Server specific audit configuration.
3060
+ class SqlServerAuditConfig
3061
+ include Google::Apis::Core::Hashable
3062
+
3063
+ # The name of the destination bucket (e.g., gs://mybucket).
3064
+ # Corresponds to the JSON property `bucket`
3065
+ # @return [String]
3066
+ attr_accessor :bucket
3067
+
3068
+ # This is always sql#sqlServerAuditConfig
3069
+ # Corresponds to the JSON property `kind`
3070
+ # @return [String]
3071
+ attr_accessor :kind
3072
+
3073
+ def initialize(**args)
3074
+ update!(**args)
3075
+ end
3076
+
3077
+ # Update properties of this object
3078
+ def update!(**args)
3079
+ @bucket = args[:bucket] if args.key?(:bucket)
3080
+ @kind = args[:kind] if args.key?(:kind)
3081
+ end
3082
+ end
3083
+
3084
+ # Represents a Sql Server database on the Cloud SQL instance.
3085
+ class SqlServerDatabaseDetails
3086
+ include Google::Apis::Core::Hashable
3087
+
3088
+ # The version of SQL Server with which the database is to be made compatible
3089
+ # Corresponds to the JSON property `compatibilityLevel`
3090
+ # @return [Fixnum]
3091
+ attr_accessor :compatibility_level
3092
+
3093
+ # The recovery model of a SQL Server database
3094
+ # Corresponds to the JSON property `recoveryModel`
3095
+ # @return [String]
3096
+ attr_accessor :recovery_model
3097
+
3098
+ def initialize(**args)
3099
+ update!(**args)
3100
+ end
3101
+
3102
+ # Update properties of this object
3103
+ def update!(**args)
3104
+ @compatibility_level = args[:compatibility_level] if args.key?(:compatibility_level)
3105
+ @recovery_model = args[:recovery_model] if args.key?(:recovery_model)
3106
+ end
3107
+ end
3108
+
3109
+ # Represents a Sql Server user on the Cloud SQL instance.
3110
+ class SqlServerUserDetails
3111
+ include Google::Apis::Core::Hashable
3112
+
3113
+ # If the user has been disabled
3114
+ # Corresponds to the JSON property `disabled`
3115
+ # @return [Boolean]
3116
+ attr_accessor :disabled
3117
+ alias_method :disabled?, :disabled
3118
+
3119
+ # The server roles for this user
3120
+ # Corresponds to the JSON property `serverRoles`
3121
+ # @return [Array<String>]
3122
+ attr_accessor :server_roles
3123
+
3124
+ def initialize(**args)
3125
+ update!(**args)
3126
+ end
3127
+
3128
+ # Update properties of this object
3129
+ def update!(**args)
3130
+ @disabled = args[:disabled] if args.key?(:disabled)
3131
+ @server_roles = args[:server_roles] if args.key?(:server_roles)
3132
+ end
3133
+ end
3134
+
3135
+ # SslCerts Resource
3136
+ class SslCert
3137
+ include Google::Apis::Core::Hashable
3138
+
3139
+ # PEM representation.
3140
+ # Corresponds to the JSON property `cert`
3141
+ # @return [String]
3142
+ attr_accessor :cert
3143
+
3144
+ # Serial number, as extracted from the certificate.
3145
+ # Corresponds to the JSON property `certSerialNumber`
3146
+ # @return [String]
3147
+ attr_accessor :cert_serial_number
3148
+
3149
+ # User supplied name. Constrained to [a-zA-Z.-_ ]+.
3150
+ # Corresponds to the JSON property `commonName`
3151
+ # @return [String]
3152
+ attr_accessor :common_name
3153
+
3154
+ # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/
3155
+ # html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**
3156
+ # Corresponds to the JSON property `createTime`
3157
+ # @return [String]
3158
+ attr_accessor :create_time
3159
+
3160
+ # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/
3161
+ # html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
3162
+ # Corresponds to the JSON property `expirationTime`
3163
+ # @return [String]
3164
+ attr_accessor :expiration_time
3165
+
3166
+ # Name of the database instance.
3167
+ # Corresponds to the JSON property `instance`
3168
+ # @return [String]
3169
+ attr_accessor :instance
3170
+
3171
+ # This is always sql#sslCert.
3172
+ # Corresponds to the JSON property `kind`
3173
+ # @return [String]
3174
+ attr_accessor :kind
3175
+
3176
+ # The URI of this resource.
3177
+ # Corresponds to the JSON property `selfLink`
3178
+ # @return [String]
3179
+ attr_accessor :self_link
3180
+
3181
+ # Sha1 Fingerprint.
3182
+ # Corresponds to the JSON property `sha1Fingerprint`
3183
+ # @return [String]
3184
+ attr_accessor :sha1_fingerprint
3185
+
3186
+ def initialize(**args)
3187
+ update!(**args)
3188
+ end
3189
+
3190
+ # Update properties of this object
3191
+ def update!(**args)
3192
+ @cert = args[:cert] if args.key?(:cert)
3193
+ @cert_serial_number = args[:cert_serial_number] if args.key?(:cert_serial_number)
3194
+ @common_name = args[:common_name] if args.key?(:common_name)
3195
+ @create_time = args[:create_time] if args.key?(:create_time)
3196
+ @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
3197
+ @instance = args[:instance] if args.key?(:instance)
3198
+ @kind = args[:kind] if args.key?(:kind)
3199
+ @self_link = args[:self_link] if args.key?(:self_link)
3200
+ @sha1_fingerprint = args[:sha1_fingerprint] if args.key?(:sha1_fingerprint)
3201
+ end
3202
+ end
3203
+
3204
+ # SslCertDetail.
3205
+ class SslCertDetail
3206
+ include Google::Apis::Core::Hashable
3207
+
3208
+ # SslCerts Resource
3209
+ # Corresponds to the JSON property `certInfo`
3210
+ # @return [Google::Apis::SqladminV1::SslCert]
3211
+ attr_accessor :cert_info
3212
+
3213
+ # The private key for the client cert, in pem format. Keep private in order to
3214
+ # protect your security.
3215
+ # Corresponds to the JSON property `certPrivateKey`
3216
+ # @return [String]
3217
+ attr_accessor :cert_private_key
3218
+
3219
+ def initialize(**args)
3220
+ update!(**args)
3221
+ end
3222
+
3223
+ # Update properties of this object
3224
+ def update!(**args)
3225
+ @cert_info = args[:cert_info] if args.key?(:cert_info)
3226
+ @cert_private_key = args[:cert_private_key] if args.key?(:cert_private_key)
3227
+ end
3228
+ end
3229
+
3230
+ # SslCerts create ephemeral certificate request.
3231
+ class SslCertsCreateEphemeralRequest
3232
+ include Google::Apis::Core::Hashable
3233
+
3234
+ # Access token to include in the signed certificate.
3235
+ # Corresponds to the JSON property `access_token`
3236
+ # @return [String]
3237
+ attr_accessor :access_token
3238
+
3239
+ # PEM encoded public key to include in the signed certificate.
3240
+ # Corresponds to the JSON property `public_key`
3241
+ # @return [String]
3242
+ attr_accessor :public_key
3243
+
3244
+ def initialize(**args)
3245
+ update!(**args)
3246
+ end
3247
+
3248
+ # Update properties of this object
3249
+ def update!(**args)
3250
+ @access_token = args[:access_token] if args.key?(:access_token)
3251
+ @public_key = args[:public_key] if args.key?(:public_key)
3252
+ end
3253
+ end
3254
+
3255
+ # SslCerts insert request.
3256
+ class SslCertsInsertRequest
3257
+ include Google::Apis::Core::Hashable
3258
+
3259
+ # User supplied name. Must be a distinct name from the other certificates for
3260
+ # this instance.
3261
+ # Corresponds to the JSON property `commonName`
3262
+ # @return [String]
3263
+ attr_accessor :common_name
3264
+
3265
+ def initialize(**args)
3266
+ update!(**args)
3267
+ end
3268
+
3269
+ # Update properties of this object
3270
+ def update!(**args)
3271
+ @common_name = args[:common_name] if args.key?(:common_name)
3272
+ end
3273
+ end
3274
+
3275
+ # SslCert insert response.
3276
+ class SslCertsInsertResponse
3277
+ include Google::Apis::Core::Hashable
3278
+
3279
+ # SslCertDetail.
3280
+ # Corresponds to the JSON property `clientCert`
3281
+ # @return [Google::Apis::SqladminV1::SslCertDetail]
3282
+ attr_accessor :client_cert
3283
+
3284
+ # This is always *sql#sslCertsInsert*.
3285
+ # Corresponds to the JSON property `kind`
3286
+ # @return [String]
3287
+ attr_accessor :kind
3288
+
3289
+ # An Operation resource. For successful operations that return an Operation
3290
+ # resource, only the fields relevant to the operation are populated in the
3291
+ # resource.
3292
+ # Corresponds to the JSON property `operation`
3293
+ # @return [Google::Apis::SqladminV1::Operation]
3294
+ attr_accessor :operation
3295
+
3296
+ # SslCerts Resource
3297
+ # Corresponds to the JSON property `serverCaCert`
3298
+ # @return [Google::Apis::SqladminV1::SslCert]
3299
+ attr_accessor :server_ca_cert
3300
+
3301
+ def initialize(**args)
3302
+ update!(**args)
3303
+ end
3304
+
3305
+ # Update properties of this object
3306
+ def update!(**args)
3307
+ @client_cert = args[:client_cert] if args.key?(:client_cert)
3308
+ @kind = args[:kind] if args.key?(:kind)
3309
+ @operation = args[:operation] if args.key?(:operation)
3310
+ @server_ca_cert = args[:server_ca_cert] if args.key?(:server_ca_cert)
3311
+ end
3312
+ end
3313
+
3314
+ # SslCerts list response.
3315
+ class SslCertsListResponse
3316
+ include Google::Apis::Core::Hashable
3317
+
3318
+ # List of client certificates for the instance.
3319
+ # Corresponds to the JSON property `items`
3320
+ # @return [Array<Google::Apis::SqladminV1::SslCert>]
3321
+ attr_accessor :items
3322
+
3323
+ # This is always *sql#sslCertsList*.
3324
+ # Corresponds to the JSON property `kind`
3325
+ # @return [String]
3326
+ attr_accessor :kind
3327
+
3328
+ def initialize(**args)
3329
+ update!(**args)
3330
+ end
3331
+
3332
+ # Update properties of this object
3333
+ def update!(**args)
3334
+ @items = args[:items] if args.key?(:items)
3335
+ @kind = args[:kind] if args.key?(:kind)
3336
+ end
3337
+ end
3338
+
3339
+ # Initial sync flags for certain Cloud SQL APIs. Currently used for the MySQL
3340
+ # external server initial dump.
3341
+ class SyncFlags
3342
+ include Google::Apis::Core::Hashable
3343
+
3344
+ # The name of the flag.
3345
+ # Corresponds to the JSON property `name`
3346
+ # @return [String]
3347
+ attr_accessor :name
3348
+
3349
+ # The value of the flag. This field must be omitted if the flag doesn't take a
3350
+ # value.
3351
+ # Corresponds to the JSON property `value`
3352
+ # @return [String]
3353
+ attr_accessor :value
3354
+
3355
+ def initialize(**args)
3356
+ update!(**args)
3357
+ end
3358
+
3359
+ # Update properties of this object
3360
+ def update!(**args)
3361
+ @name = args[:name] if args.key?(:name)
3362
+ @value = args[:value] if args.key?(:value)
3363
+ end
3364
+ end
3365
+
3366
+ # A Google Cloud SQL service tier resource.
3367
+ class Tier
3368
+ include Google::Apis::Core::Hashable
3369
+
3370
+ # The maximum disk size of this tier in bytes.
3371
+ # Corresponds to the JSON property `DiskQuota`
3372
+ # @return [Fixnum]
3373
+ attr_accessor :disk_quota
3374
+
3375
+ # The maximum RAM usage of this tier in bytes.
3376
+ # Corresponds to the JSON property `RAM`
3377
+ # @return [Fixnum]
3378
+ attr_accessor :ram
3379
+
3380
+ # This is always *sql#tier*.
3381
+ # Corresponds to the JSON property `kind`
3382
+ # @return [String]
3383
+ attr_accessor :kind
3384
+
3385
+ # The applicable regions for this tier.
3386
+ # Corresponds to the JSON property `region`
3387
+ # @return [Array<String>]
3388
+ attr_accessor :region
3389
+
3390
+ # An identifier for the machine type, for example, db-custom-1-3840. For related
3391
+ # information, see Pricing.
3392
+ # Corresponds to the JSON property `tier`
3393
+ # @return [String]
3394
+ attr_accessor :tier
3395
+
3396
+ def initialize(**args)
3397
+ update!(**args)
3398
+ end
3399
+
3400
+ # Update properties of this object
3401
+ def update!(**args)
3402
+ @disk_quota = args[:disk_quota] if args.key?(:disk_quota)
3403
+ @ram = args[:ram] if args.key?(:ram)
3404
+ @kind = args[:kind] if args.key?(:kind)
3405
+ @region = args[:region] if args.key?(:region)
3406
+ @tier = args[:tier] if args.key?(:tier)
3407
+ end
3408
+ end
3409
+
3410
+ # Tiers list response.
3411
+ class TiersListResponse
3412
+ include Google::Apis::Core::Hashable
3413
+
3414
+ # List of tiers.
3415
+ # Corresponds to the JSON property `items`
3416
+ # @return [Array<Google::Apis::SqladminV1::Tier>]
3417
+ attr_accessor :items
3418
+
3419
+ # This is always *sql#tiersList*.
3420
+ # Corresponds to the JSON property `kind`
3421
+ # @return [String]
3422
+ attr_accessor :kind
3423
+
3424
+ def initialize(**args)
3425
+ update!(**args)
3426
+ end
3427
+
3428
+ # Update properties of this object
3429
+ def update!(**args)
3430
+ @items = args[:items] if args.key?(:items)
3431
+ @kind = args[:kind] if args.key?(:kind)
3432
+ end
3433
+ end
3434
+
3435
+ # Database Instance truncate log context.
3436
+ class TruncateLogContext
3437
+ include Google::Apis::Core::Hashable
3438
+
3439
+ # This is always *sql#truncateLogContext*.
3440
+ # Corresponds to the JSON property `kind`
3441
+ # @return [String]
3442
+ attr_accessor :kind
3443
+
3444
+ # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *
3445
+ # MYSQL_SLOW_TABLE*.
3446
+ # Corresponds to the JSON property `logType`
3447
+ # @return [String]
3448
+ attr_accessor :log_type
3449
+
3450
+ def initialize(**args)
3451
+ update!(**args)
3452
+ end
3453
+
3454
+ # Update properties of this object
3455
+ def update!(**args)
3456
+ @kind = args[:kind] if args.key?(:kind)
3457
+ @log_type = args[:log_type] if args.key?(:log_type)
3458
+ end
3459
+ end
3460
+
3461
+ # A Cloud SQL user resource.
3462
+ class User
3463
+ include Google::Apis::Core::Hashable
3464
+
3465
+ # This field is deprecated and will be removed from a future version of the API.
3466
+ # Corresponds to the JSON property `etag`
3467
+ # @return [String]
3468
+ attr_accessor :etag
3469
+
3470
+ # The host name from which the user can connect. For *insert* operations, host
3471
+ # defaults to an empty string. For *update* operations, host is specified as
3472
+ # part of the request URL. The host name cannot be updated after insertion.
3473
+ # Corresponds to the JSON property `host`
3474
+ # @return [String]
3475
+ attr_accessor :host
3476
+
3477
+ # The name of the Cloud SQL instance. This does not include the project ID. Can
3478
+ # be omitted for *update* since it is already specified on the URL.
3479
+ # Corresponds to the JSON property `instance`
3480
+ # @return [String]
3481
+ attr_accessor :instance
3482
+
3483
+ # This is always *sql#user*.
3484
+ # Corresponds to the JSON property `kind`
3485
+ # @return [String]
3486
+ attr_accessor :kind
3487
+
3488
+ # The name of the user in the Cloud SQL instance. Can be omitted for *update*
3489
+ # since it is already specified in the URL.
3490
+ # Corresponds to the JSON property `name`
3491
+ # @return [String]
3492
+ attr_accessor :name
3493
+
3494
+ # The password for the user.
3495
+ # Corresponds to the JSON property `password`
3496
+ # @return [String]
3497
+ attr_accessor :password
3498
+
3499
+ # The project ID of the project containing the Cloud SQL database. The Google
3500
+ # apps domain is prefixed if applicable. Can be omitted for *update* since it is
3501
+ # already specified on the URL.
3502
+ # Corresponds to the JSON property `project`
3503
+ # @return [String]
3504
+ attr_accessor :project
3505
+
3506
+ # Represents a Sql Server user on the Cloud SQL instance.
3507
+ # Corresponds to the JSON property `sqlserverUserDetails`
3508
+ # @return [Google::Apis::SqladminV1::SqlServerUserDetails]
3509
+ attr_accessor :sqlserver_user_details
3510
+
3511
+ # The user type. It determines the method to authenticate the user during login.
3512
+ # The default is the database's built-in user type.
3513
+ # Corresponds to the JSON property `type`
3514
+ # @return [String]
3515
+ attr_accessor :type
3516
+
3517
+ def initialize(**args)
3518
+ update!(**args)
3519
+ end
3520
+
3521
+ # Update properties of this object
3522
+ def update!(**args)
3523
+ @etag = args[:etag] if args.key?(:etag)
3524
+ @host = args[:host] if args.key?(:host)
3525
+ @instance = args[:instance] if args.key?(:instance)
3526
+ @kind = args[:kind] if args.key?(:kind)
3527
+ @name = args[:name] if args.key?(:name)
3528
+ @password = args[:password] if args.key?(:password)
3529
+ @project = args[:project] if args.key?(:project)
3530
+ @sqlserver_user_details = args[:sqlserver_user_details] if args.key?(:sqlserver_user_details)
3531
+ @type = args[:type] if args.key?(:type)
3532
+ end
3533
+ end
3534
+
3535
+ # User list response.
3536
+ class UsersListResponse
3537
+ include Google::Apis::Core::Hashable
3538
+
3539
+ # List of user resources in the instance.
3540
+ # Corresponds to the JSON property `items`
3541
+ # @return [Array<Google::Apis::SqladminV1::User>]
3542
+ attr_accessor :items
3543
+
3544
+ # This is always *sql#usersList*.
3545
+ # Corresponds to the JSON property `kind`
3546
+ # @return [String]
3547
+ attr_accessor :kind
3548
+
3549
+ # An identifier that uniquely identifies the operation. You can use this
3550
+ # identifier to retrieve the Operations resource that has information about the
3551
+ # operation.
3552
+ # Corresponds to the JSON property `nextPageToken`
3553
+ # @return [String]
3554
+ attr_accessor :next_page_token
3555
+
3556
+ def initialize(**args)
3557
+ update!(**args)
3558
+ end
3559
+
3560
+ # Update properties of this object
3561
+ def update!(**args)
3562
+ @items = args[:items] if args.key?(:items)
3563
+ @kind = args[:kind] if args.key?(:kind)
3564
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3565
+ end
3566
+ end
24
3567
  end
25
3568
  end
26
3569
  end