forked from googleapis/google-api-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclasses.rb
More file actions
7626 lines (6471 loc) · 347 KB
/
classes.rb
File metadata and controls
7626 lines (6471 loc) · 347 KB
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 2020 Google LLC
#
# 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 SpannerV1
# Arguments to ack operations.
class Ack
include Google::Apis::Core::Hashable
# By default, an attempt to ack a message that does not exist will fail with a `
# NOT_FOUND` error. With `ignore_not_found` set to true, the ack will succeed
# even if the message does not exist. This is useful for unconditionally acking
# a message, even if it is missing or has already been acked.
# Corresponds to the JSON property `ignoreNotFound`
# @return [Boolean]
attr_accessor :ignore_not_found
alias_method :ignore_not_found?, :ignore_not_found
# Required. The primary key of the message to be acked.
# Corresponds to the JSON property `key`
# @return [Array<Object>]
attr_accessor :key
# Required. The queue where the message to be acked is stored.
# Corresponds to the JSON property `queue`
# @return [String]
attr_accessor :queue
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ignore_not_found = args[:ignore_not_found] if args.key?(:ignore_not_found)
@key = args[:key] if args.key?(:key)
@queue = args[:queue] if args.key?(:queue)
end
end
# Message sent by the client to the adapter.
class AdaptMessageRequest
include Google::Apis::Core::Hashable
# Optional. Opaque request state passed by the client to the server.
# Corresponds to the JSON property `attachments`
# @return [Hash<String,String>]
attr_accessor :attachments
# Optional. Uninterpreted bytes from the underlying wire protocol.
# Corresponds to the JSON property `payload`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :payload
# Required. Identifier for the underlying wire protocol.
# Corresponds to the JSON property `protocol`
# @return [String]
attr_accessor :protocol
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@attachments = args[:attachments] if args.key?(:attachments)
@payload = args[:payload] if args.key?(:payload)
@protocol = args[:protocol] if args.key?(:protocol)
end
end
# Message sent by the adapter to the client.
class AdaptMessageResponse
include Google::Apis::Core::Hashable
# Optional. Indicates whether this is the last AdaptMessageResponse in the
# stream. This field may be optionally set by the server. Clients should not
# rely on this field being set in all cases.
# Corresponds to the JSON property `last`
# @return [Boolean]
attr_accessor :last
alias_method :last?, :last
# Optional. Uninterpreted bytes from the underlying wire protocol.
# Corresponds to the JSON property `payload`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :payload
# Optional. Opaque state updates to be applied by the client.
# Corresponds to the JSON property `stateUpdates`
# @return [Hash<String,String>]
attr_accessor :state_updates
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@last = args[:last] if args.key?(:last)
@payload = args[:payload] if args.key?(:payload)
@state_updates = args[:state_updates] if args.key?(:state_updates)
end
end
# A session in the Cloud Spanner Adapter API.
class AdapterSession
include Google::Apis::Core::Hashable
# Identifier. The name of the session. This is always system-assigned.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
end
end
# The request for AddSplitPoints.
class AddSplitPointsRequest
include Google::Apis::Core::Hashable
# Optional. A user-supplied tag associated with the split points. For example, "
# initial_data_load", "special_event_1". Defaults to "CloudAddSplitPointsAPI" if
# not specified. The length of the tag must not exceed 50 characters, or else it
# is trimmed. Only valid UTF8 characters are allowed.
# Corresponds to the JSON property `initiator`
# @return [String]
attr_accessor :initiator
# Required. The split points to add.
# Corresponds to the JSON property `splitPoints`
# @return [Array<Google::Apis::SpannerV1::SplitPoints>]
attr_accessor :split_points
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@initiator = args[:initiator] if args.key?(:initiator)
@split_points = args[:split_points] if args.key?(:split_points)
end
end
# The response for AddSplitPoints.
class AddSplitPointsResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# AsymmetricAutoscalingOption specifies the scaling of replicas identified by
# the given selection.
class AsymmetricAutoscalingOption
include Google::Apis::Core::Hashable
# Overrides the top-level autoscaling configuration for the replicas identified
# by `replica_selection`. All fields in this message are optional. Any
# unspecified fields will use the corresponding values from the top-level
# autoscaling configuration.
# Corresponds to the JSON property `overrides`
# @return [Google::Apis::SpannerV1::AutoscalingConfigOverrides]
attr_accessor :overrides
# ReplicaSelection identifies replicas with common properties.
# Corresponds to the JSON property `replicaSelection`
# @return [Google::Apis::SpannerV1::InstanceReplicaSelection]
attr_accessor :replica_selection
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@overrides = args[:overrides] if args.key?(:overrides)
@replica_selection = args[:replica_selection] if args.key?(:replica_selection)
end
end
# Autoscaling configuration for an instance.
class AutoscalingConfig
include Google::Apis::Core::Hashable
# Optional. Optional asymmetric autoscaling options. Replicas matching the
# replica selection criteria will be autoscaled independently from other
# replicas. The autoscaler will scale the replicas based on the utilization of
# replicas identified by the replica selection. Replica selections should not
# overlap with each other. Other replicas (those do not match any replica
# selection) will be autoscaled together and will have the same compute capacity
# allocated to them.
# Corresponds to the JSON property `asymmetricAutoscalingOptions`
# @return [Array<Google::Apis::SpannerV1::AsymmetricAutoscalingOption>]
attr_accessor :asymmetric_autoscaling_options
# The autoscaling limits for the instance. Users can define the minimum and
# maximum compute capacity allocated to the instance, and the autoscaler will
# only scale within that range. Users can either use nodes or processing units
# to specify the limits, but should use the same unit to set both the min_limit
# and max_limit.
# Corresponds to the JSON property `autoscalingLimits`
# @return [Google::Apis::SpannerV1::AutoscalingLimits]
attr_accessor :autoscaling_limits
# The autoscaling targets for an instance.
# Corresponds to the JSON property `autoscalingTargets`
# @return [Google::Apis::SpannerV1::AutoscalingTargets]
attr_accessor :autoscaling_targets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@asymmetric_autoscaling_options = args[:asymmetric_autoscaling_options] if args.key?(:asymmetric_autoscaling_options)
@autoscaling_limits = args[:autoscaling_limits] if args.key?(:autoscaling_limits)
@autoscaling_targets = args[:autoscaling_targets] if args.key?(:autoscaling_targets)
end
end
# Overrides the top-level autoscaling configuration for the replicas identified
# by `replica_selection`. All fields in this message are optional. Any
# unspecified fields will use the corresponding values from the top-level
# autoscaling configuration.
class AutoscalingConfigOverrides
include Google::Apis::Core::Hashable
# The autoscaling limits for the instance. Users can define the minimum and
# maximum compute capacity allocated to the instance, and the autoscaler will
# only scale within that range. Users can either use nodes or processing units
# to specify the limits, but should use the same unit to set both the min_limit
# and max_limit.
# Corresponds to the JSON property `autoscalingLimits`
# @return [Google::Apis::SpannerV1::AutoscalingLimits]
attr_accessor :autoscaling_limits
# Optional. If specified, overrides the autoscaling target
# high_priority_cpu_utilization_percent in the top-level autoscaling
# configuration for the selected replicas.
# Corresponds to the JSON property `autoscalingTargetHighPriorityCpuUtilizationPercent`
# @return [Fixnum]
attr_accessor :autoscaling_target_high_priority_cpu_utilization_percent
# Optional. If specified, overrides the autoscaling target `
# total_cpu_utilization_percent` in the top-level autoscaling configuration for
# the selected replicas.
# Corresponds to the JSON property `autoscalingTargetTotalCpuUtilizationPercent`
# @return [Fixnum]
attr_accessor :autoscaling_target_total_cpu_utilization_percent
# Optional. If true, disables high priority CPU autoscaling for the selected
# replicas and ignores high_priority_cpu_utilization_percent in the top-level
# autoscaling configuration. When setting this field to true, setting
# autoscaling_target_high_priority_cpu_utilization_percent field to a non-zero
# value for the same replica is not supported. If false, the
# autoscaling_target_high_priority_cpu_utilization_percent field in the replica
# will be used if set to a non-zero value. Otherwise, the
# high_priority_cpu_utilization_percent field in the top-level autoscaling
# configuration will be used. Setting both disable_high_priority_cpu_autoscaling
# and disable_total_cpu_autoscaling to true for the same replica is not
# supported.
# Corresponds to the JSON property `disableHighPriorityCpuAutoscaling`
# @return [Boolean]
attr_accessor :disable_high_priority_cpu_autoscaling
alias_method :disable_high_priority_cpu_autoscaling?, :disable_high_priority_cpu_autoscaling
# Optional. If true, disables total CPU autoscaling for the selected replicas
# and ignores total_cpu_utilization_percent in the top-level autoscaling
# configuration. When setting this field to true, setting
# autoscaling_target_total_cpu_utilization_percent field to a non-zero value for
# the same replica is not supported. If false, the
# autoscaling_target_total_cpu_utilization_percent field in the replica will be
# used if set to a non-zero value. Otherwise, the total_cpu_utilization_percent
# field in the top-level autoscaling configuration will be used. Setting both
# disable_high_priority_cpu_autoscaling and disable_total_cpu_autoscaling to
# true for the same replica is not supported.
# Corresponds to the JSON property `disableTotalCpuAutoscaling`
# @return [Boolean]
attr_accessor :disable_total_cpu_autoscaling
alias_method :disable_total_cpu_autoscaling?, :disable_total_cpu_autoscaling
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@autoscaling_limits = args[:autoscaling_limits] if args.key?(:autoscaling_limits)
@autoscaling_target_high_priority_cpu_utilization_percent = args[:autoscaling_target_high_priority_cpu_utilization_percent] if args.key?(:autoscaling_target_high_priority_cpu_utilization_percent)
@autoscaling_target_total_cpu_utilization_percent = args[:autoscaling_target_total_cpu_utilization_percent] if args.key?(:autoscaling_target_total_cpu_utilization_percent)
@disable_high_priority_cpu_autoscaling = args[:disable_high_priority_cpu_autoscaling] if args.key?(:disable_high_priority_cpu_autoscaling)
@disable_total_cpu_autoscaling = args[:disable_total_cpu_autoscaling] if args.key?(:disable_total_cpu_autoscaling)
end
end
# The autoscaling limits for the instance. Users can define the minimum and
# maximum compute capacity allocated to the instance, and the autoscaler will
# only scale within that range. Users can either use nodes or processing units
# to specify the limits, but should use the same unit to set both the min_limit
# and max_limit.
class AutoscalingLimits
include Google::Apis::Core::Hashable
# Maximum number of nodes allocated to the instance. If set, this number should
# be greater than or equal to min_nodes.
# Corresponds to the JSON property `maxNodes`
# @return [Fixnum]
attr_accessor :max_nodes
# Maximum number of processing units allocated to the instance. If set, this
# number should be multiples of 1000 and be greater than or equal to
# min_processing_units.
# Corresponds to the JSON property `maxProcessingUnits`
# @return [Fixnum]
attr_accessor :max_processing_units
# Minimum number of nodes allocated to the instance. If set, this number should
# be greater than or equal to 1.
# Corresponds to the JSON property `minNodes`
# @return [Fixnum]
attr_accessor :min_nodes
# Minimum number of processing units allocated to the instance. If set, this
# number should be multiples of 1000.
# Corresponds to the JSON property `minProcessingUnits`
# @return [Fixnum]
attr_accessor :min_processing_units
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@max_nodes = args[:max_nodes] if args.key?(:max_nodes)
@max_processing_units = args[:max_processing_units] if args.key?(:max_processing_units)
@min_nodes = args[:min_nodes] if args.key?(:min_nodes)
@min_processing_units = args[:min_processing_units] if args.key?(:min_processing_units)
end
end
# The autoscaling targets for an instance.
class AutoscalingTargets
include Google::Apis::Core::Hashable
# Optional. The target high priority cpu utilization percentage that the
# autoscaler should be trying to achieve for the instance. This number is on a
# scale from 0 (no utilization) to 100 (full utilization). The valid range is [
# 10, 90] inclusive. If not specified or set to 0, the autoscaler skips scaling
# based on high priority CPU utilization.
# Corresponds to the JSON property `highPriorityCpuUtilizationPercent`
# @return [Fixnum]
attr_accessor :high_priority_cpu_utilization_percent
# Required. The target storage utilization percentage that the autoscaler should
# be trying to achieve for the instance. This number is on a scale from 0 (no
# utilization) to 100 (full utilization). The valid range is [10, 99] inclusive.
# Corresponds to the JSON property `storageUtilizationPercent`
# @return [Fixnum]
attr_accessor :storage_utilization_percent
# Optional. The target total CPU utilization percentage that the autoscaler
# should be trying to achieve for the instance. This number is on a scale from 0
# (no utilization) to 100 (full utilization). The valid range is [10, 90]
# inclusive. If not specified or set to 0, the autoscaler skips scaling based on
# total CPU utilization. If both `high_priority_cpu_utilization_percent` and `
# total_cpu_utilization_percent` are specified, the autoscaler provisions the
# larger of the two required compute capacities to satisfy both targets.
# Corresponds to the JSON property `totalCpuUtilizationPercent`
# @return [Fixnum]
attr_accessor :total_cpu_utilization_percent
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@high_priority_cpu_utilization_percent = args[:high_priority_cpu_utilization_percent] if args.key?(:high_priority_cpu_utilization_percent)
@storage_utilization_percent = args[:storage_utilization_percent] if args.key?(:storage_utilization_percent)
@total_cpu_utilization_percent = args[:total_cpu_utilization_percent] if args.key?(:total_cpu_utilization_percent)
end
end
# A backup of a Cloud Spanner database.
class Backup
include Google::Apis::Core::Hashable
# Output only. List of backup schedule URIs that are associated with creating
# this backup. This is only applicable for scheduled backups, and is empty for
# on-demand backups. To optimize for storage, whenever possible, multiple
# schedules are collapsed together to create one backup. In such cases, this
# field captures the list of all backup schedule URIs that are associated with
# creating this backup. If collapsing is not done, then this field captures the
# single backup schedule URI associated with creating this backup.
# Corresponds to the JSON property `backupSchedules`
# @return [Array<String>]
attr_accessor :backup_schedules
# Output only. The time the CreateBackup request is received. If the request
# does not specify `version_time`, the `version_time` of the backup will be
# equivalent to the `create_time`.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Required for the CreateBackup operation. Name of the database from which this
# backup was created. This needs to be in the same instance as the backup.
# Values are of the form `projects//instances//databases/`.
# Corresponds to the JSON property `database`
# @return [String]
attr_accessor :database
# Output only. The database dialect information for the backup.
# Corresponds to the JSON property `databaseDialect`
# @return [String]
attr_accessor :database_dialect
# Encryption information for a Cloud Spanner database or backup.
# Corresponds to the JSON property `encryptionInfo`
# @return [Google::Apis::SpannerV1::EncryptionInfo]
attr_accessor :encryption_info
# Output only. The encryption information for the backup, whether it is
# protected by one or more KMS keys. The information includes all Cloud KMS key
# versions used to encrypt the backup. The `encryption_status` field inside of
# each `EncryptionInfo` is not populated. At least one of the key versions must
# be available for the backup to be restored. If a key version is revoked in the
# middle of a restore, the restore behavior is undefined.
# Corresponds to the JSON property `encryptionInformation`
# @return [Array<Google::Apis::SpannerV1::EncryptionInfo>]
attr_accessor :encryption_information
# Output only. For a backup in an incremental backup chain, this is the storage
# space needed to keep the data that has changed since the previous backup. For
# all other backups, this is always the size of the backup. This value may
# change if backups on the same chain get deleted or expired. This field can be
# used to calculate the total storage space used by a set of backups. For
# example, the total space used by all backups of a database can be computed by
# summing up this field.
# Corresponds to the JSON property `exclusiveSizeBytes`
# @return [Fixnum]
attr_accessor :exclusive_size_bytes
# Required for the CreateBackup operation. The expiration time of the backup,
# with microseconds granularity that must be at least 6 hours and at most 366
# days from the time the CreateBackup request is processed. Once the `
# expire_time` has passed, the backup is eligible to be automatically deleted by
# Cloud Spanner to free the resources used by the backup.
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
# Output only. The number of bytes that will be freed by deleting this backup.
# This value will be zero if, for example, this backup is part of an incremental
# backup chain and younger backups in the chain require that we keep its data.
# For backups not in an incremental backup chain, this is always the size of the
# backup. This value may change if backups on the same chain get created,
# deleted or expired.
# Corresponds to the JSON property `freeableSizeBytes`
# @return [Fixnum]
attr_accessor :freeable_size_bytes
# Output only. Populated only for backups in an incremental backup chain.
# Backups share the same chain id if and only if they belong to the same
# incremental backup chain. Use this field to determine which backups are part
# of the same incremental backup chain. The ordering of backups in the chain can
# be determined by ordering the backup `version_time`.
# Corresponds to the JSON property `incrementalBackupChainId`
# @return [String]
attr_accessor :incremental_backup_chain_id
# Output only. The instance partition storing the backup. This is the same as
# the list of the instance partitions that the database recorded at the backup's
# `version_time`.
# Corresponds to the JSON property `instancePartitions`
# @return [Array<Google::Apis::SpannerV1::BackupInstancePartition>]
attr_accessor :instance_partitions
# Output only. The max allowed expiration time of the backup, with microseconds
# granularity. A backup's expiration time can be configured in multiple APIs:
# CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing
# backup, the expiration time specified must be less than `Backup.
# max_expire_time`.
# Corresponds to the JSON property `maxExpireTime`
# @return [String]
attr_accessor :max_expire_time
# Output only. The minimum edition required to successfully restore the backup.
# Populated only if the edition is Enterprise or Enterprise Plus.
# Corresponds to the JSON property `minimumRestorableEdition`
# @return [String]
attr_accessor :minimum_restorable_edition
# Output only for the CreateBackup operation. Required for the UpdateBackup
# operation. A globally unique identifier for the backup which cannot be changed.
# Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final
# segment of the name must be between 2 and 60 characters in length. The backup
# is stored in the location(s) specified in the instance configuration of the
# instance containing the backup, identified by the prefix of the backup name of
# the form `projects//instances/`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Output only. Data deleted at a time older than this is guaranteed not to be
# retained in order to support this backup. For a backup in an incremental
# backup chain, this is the version time of the oldest backup that exists or
# ever existed in the chain. For all other backups, this is the version time of
# the backup. This field can be used to understand what data is being retained
# by the backup system.
# Corresponds to the JSON property `oldestVersionTime`
# @return [String]
attr_accessor :oldest_version_time
# Output only. The names of the destination backups being created by copying
# this source backup. The backup names are of the form `projects//instances//
# backups/`. Referencing backups may exist in different instances. The existence
# of any referencing backup prevents the backup from being deleted. When the
# copy operation is done (either successfully completed or cancelled or the
# destination backup is deleted), the reference to the backup is removed.
# Corresponds to the JSON property `referencingBackups`
# @return [Array<String>]
attr_accessor :referencing_backups
# Output only. The names of the restored databases that reference the backup.
# The database names are of the form `projects//instances//databases/`.
# Referencing databases may exist in different instances. The existence of any
# referencing database prevents the backup from being deleted. When a restored
# database from the backup enters the `READY` state, the reference to the backup
# is removed.
# Corresponds to the JSON property `referencingDatabases`
# @return [Array<String>]
attr_accessor :referencing_databases
# Output only. Size of the backup in bytes. For a backup in an incremental
# backup chain, this is the sum of the `exclusive_size_bytes` of itself and all
# older backups in the chain.
# Corresponds to the JSON property `sizeBytes`
# @return [Fixnum]
attr_accessor :size_bytes
# Output only. The current state of the backup.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# The backup will contain an externally consistent copy of the database at the
# timestamp specified by `version_time`. If `version_time` is not specified, the
# system will set `version_time` to the `create_time` of the backup.
# Corresponds to the JSON property `versionTime`
# @return [String]
attr_accessor :version_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@backup_schedules = args[:backup_schedules] if args.key?(:backup_schedules)
@create_time = args[:create_time] if args.key?(:create_time)
@database = args[:database] if args.key?(:database)
@database_dialect = args[:database_dialect] if args.key?(:database_dialect)
@encryption_info = args[:encryption_info] if args.key?(:encryption_info)
@encryption_information = args[:encryption_information] if args.key?(:encryption_information)
@exclusive_size_bytes = args[:exclusive_size_bytes] if args.key?(:exclusive_size_bytes)
@expire_time = args[:expire_time] if args.key?(:expire_time)
@freeable_size_bytes = args[:freeable_size_bytes] if args.key?(:freeable_size_bytes)
@incremental_backup_chain_id = args[:incremental_backup_chain_id] if args.key?(:incremental_backup_chain_id)
@instance_partitions = args[:instance_partitions] if args.key?(:instance_partitions)
@max_expire_time = args[:max_expire_time] if args.key?(:max_expire_time)
@minimum_restorable_edition = args[:minimum_restorable_edition] if args.key?(:minimum_restorable_edition)
@name = args[:name] if args.key?(:name)
@oldest_version_time = args[:oldest_version_time] if args.key?(:oldest_version_time)
@referencing_backups = args[:referencing_backups] if args.key?(:referencing_backups)
@referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
@size_bytes = args[:size_bytes] if args.key?(:size_bytes)
@state = args[:state] if args.key?(:state)
@version_time = args[:version_time] if args.key?(:version_time)
end
end
# Information about a backup.
class BackupInfo
include Google::Apis::Core::Hashable
# Name of the backup.
# Corresponds to the JSON property `backup`
# @return [String]
attr_accessor :backup
# The time the CreateBackup request was received.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Name of the database the backup was created from.
# Corresponds to the JSON property `sourceDatabase`
# @return [String]
attr_accessor :source_database
# The backup contains an externally consistent copy of `source_database` at the
# timestamp specified by `version_time`. If the CreateBackup request did not
# specify `version_time`, the `version_time` of the backup is equivalent to the `
# create_time`.
# Corresponds to the JSON property `versionTime`
# @return [String]
attr_accessor :version_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@backup = args[:backup] if args.key?(:backup)
@create_time = args[:create_time] if args.key?(:create_time)
@source_database = args[:source_database] if args.key?(:source_database)
@version_time = args[:version_time] if args.key?(:version_time)
end
end
# Instance partition information for the backup.
class BackupInstancePartition
include Google::Apis::Core::Hashable
# A unique identifier for the instance partition. Values are of the form `
# projects//instances//instancePartitions/`
# Corresponds to the JSON property `instancePartition`
# @return [String]
attr_accessor :instance_partition
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@instance_partition = args[:instance_partition] if args.key?(:instance_partition)
end
end
# BackupSchedule expresses the automated backup creation specification for a
# Spanner database.
class BackupSchedule
include Google::Apis::Core::Hashable
# Encryption configuration for the backup to create.
# Corresponds to the JSON property `encryptionConfig`
# @return [Google::Apis::SpannerV1::CreateBackupEncryptionConfig]
attr_accessor :encryption_config
# The specification for full backups. A full backup stores the entire contents
# of the database at a given version time.
# Corresponds to the JSON property `fullBackupSpec`
# @return [Google::Apis::SpannerV1::FullBackupSpec]
attr_accessor :full_backup_spec
# The specification for incremental backup chains. An incremental backup stores
# the delta of changes between a previous backup and the database contents at a
# given version time. An incremental backup chain consists of a full backup and
# zero or more successive incremental backups. The first backup created for an
# incremental backup chain is always a full backup.
# Corresponds to the JSON property `incrementalBackupSpec`
# @return [Google::Apis::SpannerV1::IncrementalBackupSpec]
attr_accessor :incremental_backup_spec
# Identifier. Output only for the CreateBackupSchedule operation. Required for
# the UpdateBackupSchedule operation. A globally unique identifier for the
# backup schedule which cannot be changed. Values are of the form `projects//
# instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the
# name must be between 2 and 60 characters in length.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Optional. The retention duration of a backup that must be at least 6 hours and
# at most 366 days. The backup is eligible to be automatically deleted once the
# retention period has elapsed.
# Corresponds to the JSON property `retentionDuration`
# @return [String]
attr_accessor :retention_duration
# Defines specifications of the backup schedule.
# Corresponds to the JSON property `spec`
# @return [Google::Apis::SpannerV1::BackupScheduleSpec]
attr_accessor :spec
# Output only. The timestamp at which the schedule was last updated. If the
# schedule has never been updated, this field contains the timestamp when the
# schedule was first created.
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@encryption_config = args[:encryption_config] if args.key?(:encryption_config)
@full_backup_spec = args[:full_backup_spec] if args.key?(:full_backup_spec)
@incremental_backup_spec = args[:incremental_backup_spec] if args.key?(:incremental_backup_spec)
@name = args[:name] if args.key?(:name)
@retention_duration = args[:retention_duration] if args.key?(:retention_duration)
@spec = args[:spec] if args.key?(:spec)
@update_time = args[:update_time] if args.key?(:update_time)
end
end
# Defines specifications of the backup schedule.
class BackupScheduleSpec
include Google::Apis::Core::Hashable
# CrontabSpec can be used to specify the version time and frequency at which the
# backup is created.
# Corresponds to the JSON property `cronSpec`
# @return [Google::Apis::SpannerV1::CrontabSpec]
attr_accessor :cron_spec
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cron_spec = args[:cron_spec] if args.key?(:cron_spec)
end
end
# The request for BatchCreateSessions.
class BatchCreateSessionsRequest
include Google::Apis::Core::Hashable
# Required. The number of sessions to be created in this batch call. At least
# one session is created. The API can return fewer than the requested number of
# sessions. If a specific number of sessions are desired, the client can make
# additional calls to `BatchCreateSessions` (adjusting session_count as
# necessary).
# Corresponds to the JSON property `sessionCount`
# @return [Fixnum]
attr_accessor :session_count
# A session in the Cloud Spanner API.
# Corresponds to the JSON property `sessionTemplate`
# @return [Google::Apis::SpannerV1::Session]
attr_accessor :session_template
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@session_count = args[:session_count] if args.key?(:session_count)
@session_template = args[:session_template] if args.key?(:session_template)
end
end
# The response for BatchCreateSessions.
class BatchCreateSessionsResponse
include Google::Apis::Core::Hashable
# The freshly created sessions.
# Corresponds to the JSON property `session`
# @return [Array<Google::Apis::SpannerV1::Session>]
attr_accessor :session
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@session = args[:session] if args.key?(:session)
end
end
# The request for BatchWrite.
class BatchWriteRequest
include Google::Apis::Core::Hashable
# Optional. If you don't set the `exclude_txn_from_change_streams` option or if
# it's set to `false`, then any change streams monitoring columns modified by
# transactions will capture the updates made within that transaction.
# Corresponds to the JSON property `excludeTxnFromChangeStreams`
# @return [Boolean]
attr_accessor :exclude_txn_from_change_streams
alias_method :exclude_txn_from_change_streams?, :exclude_txn_from_change_streams
# Required. The groups of mutations to be applied.
# Corresponds to the JSON property `mutationGroups`
# @return [Array<Google::Apis::SpannerV1::MutationGroup>]
attr_accessor :mutation_groups
# Common request options for various APIs.
# Corresponds to the JSON property `requestOptions`
# @return [Google::Apis::SpannerV1::RequestOptions]
attr_accessor :request_options
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exclude_txn_from_change_streams = args[:exclude_txn_from_change_streams] if args.key?(:exclude_txn_from_change_streams)
@mutation_groups = args[:mutation_groups] if args.key?(:mutation_groups)
@request_options = args[:request_options] if args.key?(:request_options)
end
end
# The result of applying a batch of mutations.
class BatchWriteResponse
include Google::Apis::Core::Hashable
# The commit timestamp of the transaction that applied this batch. Present if
# status is OK and the mutation groups were applied, absent otherwise. For
# mutation groups with conditions, a status=OK and missing commit_timestamp
# means that the mutation groups were not applied due to the condition not being
# satisfied after evaluation.
# Corresponds to the JSON property `commitTimestamp`
# @return [String]
attr_accessor :commit_timestamp
# The mutation groups applied in this batch. The values index into the `
# mutation_groups` field in the corresponding `BatchWriteRequest`.
# Corresponds to the JSON property `indexes`
# @return [Array<Fixnum>]
attr_accessor :indexes
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
# Corresponds to the JSON property `status`
# @return [Google::Apis::SpannerV1::Status]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
@indexes = args[:indexes] if args.key?(:indexes)
@status = args[:status] if args.key?(:status)
end
end
# The request for BeginTransaction.
class BeginTransactionRequest
include Google::Apis::Core::Hashable
# A modification to one or more Cloud Spanner rows. Mutations can be applied to
# a Cloud Spanner database by sending them in a Commit call.
# Corresponds to the JSON property `mutationKey`
# @return [Google::Apis::SpannerV1::Mutation]
attr_accessor :mutation_key
# Options to use for transactions.
# Corresponds to the JSON property `options`
# @return [Google::Apis::SpannerV1::TransactionOptions]
attr_accessor :options
# Common request options for various APIs.
# Corresponds to the JSON property `requestOptions`
# @return [Google::Apis::SpannerV1::RequestOptions]
attr_accessor :request_options
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@mutation_key = args[:mutation_key] if args.key?(:mutation_key)
@options = args[:options] if args.key?(:options)
@request_options = args[:request_options] if args.key?(:request_options)
end
end
# Associates `members`, or principals, with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
# "Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::SpannerV1::Expr]
attr_accessor :condition
# Specifies the principals requesting access for a Google Cloud resource. `
# members` can have the following values: * `allUsers`: A special identifier
# that represents anyone who is on the internet; with or without a Google
# account. * `allAuthenticatedUsers`: A special identifier that represents
# anyone who is authenticated with a Google account or a service account. Does
# not include identities that come from external identity providers (IdPs)
# through identity federation. * `user:`emailid``: An email address that
# represents a specific Google account. For example, `alice@example.com` . * `
# serviceAccount:`emailid``: An email address that represents a Google service
# account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
# serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
# identifier for a [Kubernetes service account](https://cloud.google.com/
# kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
# project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
# email address that represents a Google group. For example, `admins@example.com`
# . * `domain:`domain``: The G Suite domain (primary) that represents all the
# users of that domain. For example, `google.com` or `example.com`. * `principal:
# //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
# subject_attribute_value``: A single identity in a workforce identity pool. * `
# principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
# group/`group_id``: All workforce identities in a group. * `principalSet://iam.
# googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
# attribute_name`/`attribute_value``: All workforce identities with a specific
# attribute value. * `principalSet://iam.googleapis.com/locations/global/
# workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
# principal://iam.googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
# identity in a workload identity pool. * `principalSet://iam.googleapis.com/
# projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
# group/`group_id``: A workload identity pool group. * `principalSet://iam.
# googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
# All identities in a workload identity pool with a certain attribute. * `
# principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For example, `
# alice@example.com?uid=123456789012345678901`. If the user is recovered, this
# value reverts to `user:`emailid`` and the recovered user retains the role in
# the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
# address (plus unique identifier) representing a service account that has been
# recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
# 123456789012345678901`. If the service account is undeleted, this value
# reverts to `serviceAccount:`emailid`` and the undeleted service account
# retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
# An email address (plus unique identifier) representing a Google group that has
# been recently deleted. For example, `admins@example.com?uid=
# 123456789012345678901`. If the group is recovered, this value reverts to `
# group:`emailid`` and the recovered group retains the role in the binding. * `
# deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
# pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
# workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
# locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
# Corresponds to the JSON property `members`