forked from googleapis/google-api-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.rb
1817 lines (1500 loc) · 68.6 KB
/
classes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module SqladminV1beta4
# An entry for an Access Control list.
class AclEntry
include Google::Apis::Core::Hashable
# The time when this access control entry expires in RFC 3339 format, for
# example 2012-11-15T16:19:00.094Z.
# Corresponds to the JSON property `expirationTime`
# @return [DateTime]
attr_accessor :expiration_time
# This is always sql#aclEntry.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# An optional label to identify this entry.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The whitelisted value for the access control list.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@expiration_time = args[:expiration_time] unless args[:expiration_time].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@value = args[:value] unless args[:value].nil?
end
end
# Database instance backup configuration.
class BackupConfiguration
include Google::Apis::Core::Hashable
# Whether binary log is enabled. If backup configuration is disabled, binary log
# must be disabled as well.
# Corresponds to the JSON property `binaryLogEnabled`
# @return [Boolean]
attr_accessor :binary_log_enabled
alias_method :binary_log_enabled?, :binary_log_enabled
# Whether this configuration is enabled.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
# This is always sql#backupConfiguration.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Start time for the daily backup configuration in UTC timezone in the 24 hour
# format - HH:MM.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@binary_log_enabled = args[:binary_log_enabled] unless args[:binary_log_enabled].nil?
@enabled = args[:enabled] unless args[:enabled].nil?
@kind = args[:kind] unless args[:kind].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
end
end
# A database instance backup run resource.
class BackupRun
include Google::Apis::Core::Hashable
# The time the backup operation completed in UTC timezone in RFC 3339 format,
# for example 2012-11-15T16:19:00.094Z.
# Corresponds to the JSON property `endTime`
# @return [DateTime]
attr_accessor :end_time
# The time the run was enqueued in UTC timezone in RFC 3339 format, for example
# 2012-11-15T16:19:00.094Z.
# Corresponds to the JSON property `enqueuedTime`
# @return [DateTime]
attr_accessor :enqueued_time
# Database instance operation error.
# Corresponds to the JSON property `error`
# @return [Google::Apis::SqladminV1beta4::OperationError]
attr_accessor :error
# A unique identifier for this backup run. Note that this is unique only within
# the scope of a particular Cloud SQL instance.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Name of the database instance.
# Corresponds to the JSON property `instance`
# @return [String]
attr_accessor :instance
# This is always sql#backupRun.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The URI of this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# The time the backup operation actually started in UTC timezone in RFC 3339
# format, for example 2012-11-15T16:19:00.094Z.
# Corresponds to the JSON property `startTime`
# @return [DateTime]
attr_accessor :start_time
# The status of this run.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# The start time of the backup window during which this the backup was attempted
# in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
# Corresponds to the JSON property `windowStartTime`
# @return [DateTime]
attr_accessor :window_start_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@end_time = args[:end_time] unless args[:end_time].nil?
@enqueued_time = args[:enqueued_time] unless args[:enqueued_time].nil?
@error = args[:error] unless args[:error].nil?
@id = args[:id] unless args[:id].nil?
@instance = args[:instance] unless args[:instance].nil?
@kind = args[:kind] unless args[:kind].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
@status = args[:status] unless args[:status].nil?
@window_start_time = args[:window_start_time] unless args[:window_start_time].nil?
end
end
# Backup run list results.
class ListBackupRunsResponse
include Google::Apis::Core::Hashable
# A list of backup runs in reverse chronological order of the enqueued time.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::SqladminV1beta4::BackupRun>]
attr_accessor :items
# This is always sql#backupRunsList.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The continuation token, used to page through large result sets. Provide this
# value in a subsequent request to return the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Binary log coordinates.
class BinLogCoordinates
include Google::Apis::Core::Hashable
# Name of the binary log file for a Cloud SQL instance.
# Corresponds to the JSON property `binLogFileName`
# @return [String]
attr_accessor :bin_log_file_name
# Position (offset) within the binary log file.
# Corresponds to the JSON property `binLogPosition`
# @return [String]
attr_accessor :bin_log_position
# This is always sql#binLogCoordinates.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bin_log_file_name = args[:bin_log_file_name] unless args[:bin_log_file_name].nil?
@bin_log_position = args[:bin_log_position] unless args[:bin_log_position].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# Database instance clone context.
class CloneContext
include Google::Apis::Core::Hashable
# Binary log coordinates.
# Corresponds to the JSON property `binLogCoordinates`
# @return [Google::Apis::SqladminV1beta4::BinLogCoordinates]
attr_accessor :bin_log_coordinates
# Name of the Cloud SQL instance to be created as a clone.
# Corresponds to the JSON property `destinationInstanceName`
# @return [String]
attr_accessor :destination_instance_name
# This is always sql#cloneContext.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bin_log_coordinates = args[:bin_log_coordinates] unless args[:bin_log_coordinates].nil?
@destination_instance_name = args[:destination_instance_name] unless args[:destination_instance_name].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# A database resource inside a Cloud SQL instance.
class Database
include Google::Apis::Core::Hashable
# The MySQL charset value.
# Corresponds to the JSON property `charset`
# @return [String]
attr_accessor :charset
# The MySQL collation value.
# Corresponds to the JSON property `collation`
# @return [String]
attr_accessor :collation
# HTTP 1.1 Entity tag for the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The name of the Cloud SQL instance. This does not include the project ID.
# Corresponds to the JSON property `instance`
# @return [String]
attr_accessor :instance
# This is always sql#database.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The name of the database in the Cloud SQL instance. This does not include the
# project ID or instance name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The project ID of the project containing the Cloud SQL database. The Google
# apps domain is prefixed if applicable.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# The URI of this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@charset = args[:charset] unless args[:charset].nil?
@collation = args[:collation] unless args[:collation].nil?
@etag = args[:etag] unless args[:etag].nil?
@instance = args[:instance] unless args[:instance].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@project = args[:project] unless args[:project].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
end
end
# MySQL flags for Cloud SQL instances.
class DatabaseFlags
include Google::Apis::Core::Hashable
# The name of the flag. These flags are passed at instance startup, so include
# both MySQL server options and MySQL system variables. Flags should be
# specified with underscores, not hyphens. For more information, see Configuring
# MySQL Flags in the Google Cloud SQL documentation, as well as the official
# MySQL documentation for server options and system variables.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The value of the flag. Booleans should be set to on for true and off for false.
# This field must be omitted if the flag doesn't take a value.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@value = args[:value] unless args[:value].nil?
end
end
# A Cloud SQL instance resource.
class DatabaseInstance
include Google::Apis::Core::Hashable
# The current disk usage of the instance in bytes.
# Corresponds to the JSON property `currentDiskSize`
# @return [String]
attr_accessor :current_disk_size
# The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults
# to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
# Corresponds to the JSON property `databaseVersion`
# @return [String]
attr_accessor :database_version
# HTTP 1.1 Entity tag for the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The instance type. This can be one of the following.
# CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
# ON_PREMISES_INSTANCE: An instance running on the customer's premises.
# READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
# Corresponds to the JSON property `instanceType`
# @return [String]
attr_accessor :instance_type
# The assigned IP addresses for the instance.
# Corresponds to the JSON property `ipAddresses`
# @return [Array<Google::Apis::SqladminV1beta4::IpMapping>]
attr_accessor :ip_addresses
# The IPv6 address assigned to the instance.
# Corresponds to the JSON property `ipv6Address`
# @return [String]
attr_accessor :ipv6_address
# This is always sql#instance.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The name of the instance which will act as master in the replication setup.
# Corresponds to the JSON property `masterInstanceName`
# @return [String]
attr_accessor :master_instance_name
# The maximum disk size of the instance in bytes.
# Corresponds to the JSON property `maxDiskSize`
# @return [String]
attr_accessor :max_disk_size
# Name of the Cloud SQL instance. This does not include the project ID.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# On-premises instance configuration.
# Corresponds to the JSON property `onPremisesConfiguration`
# @return [Google::Apis::SqladminV1beta4::OnPremisesConfiguration]
attr_accessor :on_premises_configuration
# The project ID of the project containing the Cloud SQL instance. The Google
# apps domain is prefixed if applicable.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# The geographical region. Can be us-central, asia-east1 or europe-west1.
# Defaults to us-central. The region can not be changed after instance creation.
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# Read-replica configuration for connecting to the master.
# Corresponds to the JSON property `replicaConfiguration`
# @return [Google::Apis::SqladminV1beta4::ReplicaConfiguration]
attr_accessor :replica_configuration
# The replicas of the instance.
# Corresponds to the JSON property `replicaNames`
# @return [Array<String>]
attr_accessor :replica_names
# The URI of this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# SslCerts Resource
# Corresponds to the JSON property `serverCaCert`
# @return [Google::Apis::SqladminV1beta4::SslCert]
attr_accessor :server_ca_cert
# The service account email address assigned to the instance.
# Corresponds to the JSON property `serviceAccountEmailAddress`
# @return [String]
attr_accessor :service_account_email_address
# Database instance settings.
# Corresponds to the JSON property `settings`
# @return [Google::Apis::SqladminV1beta4::Settings]
attr_accessor :settings
# The current serving state of the Cloud SQL instance. This can be one of the
# following.
# RUNNABLE: The instance is running, or is ready to run when accessed.
# SUSPENDED: The instance is not available, for example due to problems with
# billing.
# PENDING_CREATE: The instance is being created.
# MAINTENANCE: The instance is down for maintenance.
# FAILED: The instance creation failed.
# UNKNOWN_STATE: The state of the instance is unknown.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_disk_size = args[:current_disk_size] unless args[:current_disk_size].nil?
@database_version = args[:database_version] unless args[:database_version].nil?
@etag = args[:etag] unless args[:etag].nil?
@instance_type = args[:instance_type] unless args[:instance_type].nil?
@ip_addresses = args[:ip_addresses] unless args[:ip_addresses].nil?
@ipv6_address = args[:ipv6_address] unless args[:ipv6_address].nil?
@kind = args[:kind] unless args[:kind].nil?
@master_instance_name = args[:master_instance_name] unless args[:master_instance_name].nil?
@max_disk_size = args[:max_disk_size] unless args[:max_disk_size].nil?
@name = args[:name] unless args[:name].nil?
@on_premises_configuration = args[:on_premises_configuration] unless args[:on_premises_configuration].nil?
@project = args[:project] unless args[:project].nil?
@region = args[:region] unless args[:region].nil?
@replica_configuration = args[:replica_configuration] unless args[:replica_configuration].nil?
@replica_names = args[:replica_names] unless args[:replica_names].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@server_ca_cert = args[:server_ca_cert] unless args[:server_ca_cert].nil?
@service_account_email_address = args[:service_account_email_address] unless args[:service_account_email_address].nil?
@settings = args[:settings] unless args[:settings].nil?
@state = args[:state] unless args[:state].nil?
end
end
# Database list response.
class ListDatabasesResponse
include Google::Apis::Core::Hashable
# List of database resources in the instance.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::SqladminV1beta4::Database>]
attr_accessor :items
# This is always sql#databasesList.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# Database instance export context.
class ExportContext
include Google::Apis::Core::Hashable
# Options for exporting data as CSV.
# Corresponds to the JSON property `csvExportOptions`
# @return [Google::Apis::SqladminV1beta4::ExportContext::CsvExportOptions]
attr_accessor :csv_export_options
# Databases (for example, guestbook) from which the export is made. If fileType
# is SQL and no database is specified, all databases are exported. If fileType
# is CSV, you can optionally specify at most one database to export. If
# csvExportOptions.selectQuery also specifies the database, this field will be
# ignored.
# Corresponds to the JSON property `databases`
# @return [Array<String>]
attr_accessor :databases
# The file type for the specified uri.
# SQL: The file contains SQL statements.
# CSV: The file contains CSV data.
# Corresponds to the JSON property `fileType`
# @return [String]
attr_accessor :file_type
# This is always sql#exportContext.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Options for exporting data as SQL statements.
# Corresponds to the JSON property `sqlExportOptions`
# @return [Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions]
attr_accessor :sql_export_options
# The path to the file in Google Cloud Storage where the export will be stored.
# The URI is in the form gs://bucketName/fileName. If the file already exists,
# the operation fails. If fileType is SQL and the filename ends with .gz, the
# contents are compressed.
# Corresponds to the JSON property `uri`
# @return [String]
attr_accessor :uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@csv_export_options = args[:csv_export_options] unless args[:csv_export_options].nil?
@databases = args[:databases] unless args[:databases].nil?
@file_type = args[:file_type] unless args[:file_type].nil?
@kind = args[:kind] unless args[:kind].nil?
@sql_export_options = args[:sql_export_options] unless args[:sql_export_options].nil?
@uri = args[:uri] unless args[:uri].nil?
end
# Options for exporting data as CSV.
class CsvExportOptions
include Google::Apis::Core::Hashable
# The select query used to extract the data.
# Corresponds to the JSON property `selectQuery`
# @return [String]
attr_accessor :select_query
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@select_query = args[:select_query] unless args[:select_query].nil?
end
end
# Options for exporting data as SQL statements.
class SqlExportOptions
include Google::Apis::Core::Hashable
# Tables to export, or that were exported, from the specified database. If you
# specify tables, specify one and only one database.
# Corresponds to the JSON property `tables`
# @return [Array<String>]
attr_accessor :tables
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@tables = args[:tables] unless args[:tables].nil?
end
end
end
# A Google Cloud SQL service flag resource.
class Flag
include Google::Apis::Core::Hashable
# For STRING flags, a list of strings that the value can be set to.
# Corresponds to the JSON property `allowedStringValues`
# @return [Array<String>]
attr_accessor :allowed_string_values
# The database version this flag applies to. Currently this can only be [
# MYSQL_5_5].
# Corresponds to the JSON property `appliesTo`
# @return [Array<String>]
attr_accessor :applies_to
# This is always sql#flag.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# For INTEGER flags, the maximum allowed value.
# Corresponds to the JSON property `maxValue`
# @return [String]
attr_accessor :max_value
# For INTEGER flags, the minimum allowed value.
# Corresponds to the JSON property `minValue`
# @return [String]
attr_accessor :min_value
# This is the name of the flag. Flag names always use underscores, not hyphens,
# e.g. max_allowed_packet
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or
# NONE. NONE is used for flags which do not take a value, such as
# skip_grant_tables.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@allowed_string_values = args[:allowed_string_values] unless args[:allowed_string_values].nil?
@applies_to = args[:applies_to] unless args[:applies_to].nil?
@kind = args[:kind] unless args[:kind].nil?
@max_value = args[:max_value] unless args[:max_value].nil?
@min_value = args[:min_value] unless args[:min_value].nil?
@name = args[:name] unless args[:name].nil?
@type = args[:type] unless args[:type].nil?
end
end
# Flags list response.
class ListFlagsResponse
include Google::Apis::Core::Hashable
# List of flags.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::SqladminV1beta4::Flag>]
attr_accessor :items
# This is always sql#flagsList.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# Database instance import context.
class ImportContext
include Google::Apis::Core::Hashable
# Options for importing data as CSV.
# Corresponds to the JSON property `csvImportOptions`
# @return [Google::Apis::SqladminV1beta4::ImportContext::CsvImportOptions]
attr_accessor :csv_import_options
# The database (for example, guestbook) to which the import is made. If fileType
# is SQL and no database is specified, it is assumed that the database is
# specified in the file to be imported. If fileType is CSV, it must be specified.
# Corresponds to the JSON property `database`
# @return [String]
attr_accessor :database
# The file type for the specified uri.
# SQL: The file contains SQL statements.
# CSV: The file contains CSV data.
# Corresponds to the JSON property `fileType`
# @return [String]
attr_accessor :file_type
# This is always sql#importContext.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A path to the file in Google Cloud Storage from which the import is made. The
# URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are
# supported when fileType is SQL.
# Corresponds to the JSON property `uri`
# @return [String]
attr_accessor :uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@csv_import_options = args[:csv_import_options] unless args[:csv_import_options].nil?
@database = args[:database] unless args[:database].nil?
@file_type = args[:file_type] unless args[:file_type].nil?
@kind = args[:kind] unless args[:kind].nil?
@uri = args[:uri] unless args[:uri].nil?
end
# Options for importing data as CSV.
class CsvImportOptions
include Google::Apis::Core::Hashable
# The columns to which CSV data is imported. If not specified, all columns of
# the database table are loaded with CSV data.
# Corresponds to the JSON property `columns`
# @return [Array<String>]
attr_accessor :columns
# The table to which CSV data is imported.
# Corresponds to the JSON property `table`
# @return [String]
attr_accessor :table
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@columns = args[:columns] unless args[:columns].nil?
@table = args[:table] unless args[:table].nil?
end
end
end
# Database instance clone request.
class CloneInstancesRequest
include Google::Apis::Core::Hashable
# Database instance clone context.
# Corresponds to the JSON property `cloneContext`
# @return [Google::Apis::SqladminV1beta4::CloneContext]
attr_accessor :clone_context
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@clone_context = args[:clone_context] unless args[:clone_context].nil?
end
end
# Database instance export request.
class ExportInstancesRequest
include Google::Apis::Core::Hashable
# Database instance export context.
# Corresponds to the JSON property `exportContext`
# @return [Google::Apis::SqladminV1beta4::ExportContext]
attr_accessor :export_context
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@export_context = args[:export_context] unless args[:export_context].nil?
end
end
# Database instance import request.
class ImportInstancesRequest
include Google::Apis::Core::Hashable
# Database instance import context.
# Corresponds to the JSON property `importContext`
# @return [Google::Apis::SqladminV1beta4::ImportContext]
attr_accessor :import_context
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@import_context = args[:import_context] unless args[:import_context].nil?
end
end
# Database instances list response.
class ListInstancesResponse
include Google::Apis::Core::Hashable
# List of database instance resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::SqladminV1beta4::DatabaseInstance>]
attr_accessor :items
# This is always sql#instancesList.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The continuation token, used to page through large result sets. Provide this
# value in a subsequent request to return the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Database instance restore backup request.
class RestoreInstancesBackupRequest
include Google::Apis::Core::Hashable
# Database instance restore from backup context.
# Corresponds to the JSON property `restoreBackupContext`
# @return [Google::Apis::SqladminV1beta4::RestoreBackupContext]
attr_accessor :restore_backup_context
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@restore_backup_context = args[:restore_backup_context] unless args[:restore_backup_context].nil?
end
end
# IP Management configuration.
class IpConfiguration
include Google::Apis::Core::Hashable
# The list of external networks that are allowed to connect to the instance
# using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.
# 100.0/24).
# Corresponds to the JSON property `authorizedNetworks`
# @return [Array<Google::Apis::SqladminV1beta4::AclEntry>]
attr_accessor :authorized_networks
# Whether the instance should be assigned an IP address or not.
# Corresponds to the JSON property `ipv4Enabled`
# @return [Boolean]
attr_accessor :ipv4_enabled
alias_method :ipv4_enabled?, :ipv4_enabled
# Whether the mysqld should default to 'REQUIRE X509' for users connecting over
# IP.
# Corresponds to the JSON property `requireSsl`
# @return [Boolean]
attr_accessor :require_ssl
alias_method :require_ssl?, :require_ssl
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@authorized_networks = args[:authorized_networks] unless args[:authorized_networks].nil?
@ipv4_enabled = args[:ipv4_enabled] unless args[:ipv4_enabled].nil?
@require_ssl = args[:require_ssl] unless args[:require_ssl].nil?
end
end
# Database instance IP Mapping.
class IpMapping
include Google::Apis::Core::Hashable
# The IP address assigned.
# Corresponds to the JSON property `ipAddress`
# @return [String]
attr_accessor :ip_address
# The due time for this IP to be retired in RFC 3339 format, for example 2012-11-
# 15T16:19:00.094Z. This field is only available when the IP is scheduled to be
# retired.
# Corresponds to the JSON property `timeToRetire`
# @return [DateTime]
attr_accessor :time_to_retire
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ip_address = args[:ip_address] unless args[:ip_address].nil?
@time_to_retire = args[:time_to_retire] unless args[:time_to_retire].nil?
end
end
# Preferred location. This specifies where a Cloud SQL instance should
# preferably be located, either in a specific Compute Engine zone, or co-located
# with an App Engine application. Note that if the preferred location is not
# available, the instance will be located as close as possible within the region.
# Only one location may be specified.
class LocationPreference
include Google::Apis::Core::Hashable
# The AppEngine application to follow, it must be in the same region as the
# Cloud SQL instance.
# Corresponds to the JSON property `followGaeApplication`
# @return [String]
attr_accessor :follow_gae_application
# This is always sql#locationPreference.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@follow_gae_application = args[:follow_gae_application] unless args[:follow_gae_application].nil?
@kind = args[:kind] unless args[:kind].nil?
@zone = args[:zone] unless args[:zone].nil?