google-apis-spanner_v1 0.37.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,10 +22,319 @@ module Google
22
22
  module Apis
23
23
  module SpannerV1
24
24
 
25
+ # Message sent by the client to the adapter.
26
+ class AdaptMessageRequest
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Optional. Opaque request state passed by the client to the server.
30
+ # Corresponds to the JSON property `attachments`
31
+ # @return [Hash<String,String>]
32
+ attr_accessor :attachments
33
+
34
+ # Optional. Uninterpreted bytes from the underlying wire protocol.
35
+ # Corresponds to the JSON property `payload`
36
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
37
+ # @return [String]
38
+ attr_accessor :payload
39
+
40
+ # Required. Identifier for the underlying wire protocol.
41
+ # Corresponds to the JSON property `protocol`
42
+ # @return [String]
43
+ attr_accessor :protocol
44
+
45
+ def initialize(**args)
46
+ update!(**args)
47
+ end
48
+
49
+ # Update properties of this object
50
+ def update!(**args)
51
+ @attachments = args[:attachments] if args.key?(:attachments)
52
+ @payload = args[:payload] if args.key?(:payload)
53
+ @protocol = args[:protocol] if args.key?(:protocol)
54
+ end
55
+ end
56
+
57
+ # Message sent by the adapter to the client.
58
+ class AdaptMessageResponse
59
+ include Google::Apis::Core::Hashable
60
+
61
+ # Optional. Uninterpreted bytes from the underlying wire protocol.
62
+ # Corresponds to the JSON property `payload`
63
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
64
+ # @return [String]
65
+ attr_accessor :payload
66
+
67
+ # Optional. Opaque state updates to be applied by the client.
68
+ # Corresponds to the JSON property `stateUpdates`
69
+ # @return [Hash<String,String>]
70
+ attr_accessor :state_updates
71
+
72
+ def initialize(**args)
73
+ update!(**args)
74
+ end
75
+
76
+ # Update properties of this object
77
+ def update!(**args)
78
+ @payload = args[:payload] if args.key?(:payload)
79
+ @state_updates = args[:state_updates] if args.key?(:state_updates)
80
+ end
81
+ end
82
+
83
+ # A session in the Cloud Spanner Adapter API.
84
+ class AdapterSession
85
+ include Google::Apis::Core::Hashable
86
+
87
+ # Identifier. The name of the session. This is always system-assigned.
88
+ # Corresponds to the JSON property `name`
89
+ # @return [String]
90
+ attr_accessor :name
91
+
92
+ def initialize(**args)
93
+ update!(**args)
94
+ end
95
+
96
+ # Update properties of this object
97
+ def update!(**args)
98
+ @name = args[:name] if args.key?(:name)
99
+ end
100
+ end
101
+
102
+ # The request for AddSplitPoints.
103
+ class AddSplitPointsRequest
104
+ include Google::Apis::Core::Hashable
105
+
106
+ # Optional. A user-supplied tag associated with the split points. For example, "
107
+ # initial_data_load", "special_event_1". Defaults to "CloudAddSplitPointsAPI" if
108
+ # not specified. The length of the tag must not exceed 50 characters,else will
109
+ # be trimmed. Only valid UTF8 characters are allowed.
110
+ # Corresponds to the JSON property `initiator`
111
+ # @return [String]
112
+ attr_accessor :initiator
113
+
114
+ # Required. The split points to add.
115
+ # Corresponds to the JSON property `splitPoints`
116
+ # @return [Array<Google::Apis::SpannerV1::SplitPoints>]
117
+ attr_accessor :split_points
118
+
119
+ def initialize(**args)
120
+ update!(**args)
121
+ end
122
+
123
+ # Update properties of this object
124
+ def update!(**args)
125
+ @initiator = args[:initiator] if args.key?(:initiator)
126
+ @split_points = args[:split_points] if args.key?(:split_points)
127
+ end
128
+ end
129
+
130
+ # The response for AddSplitPoints.
131
+ class AddSplitPointsResponse
132
+ include Google::Apis::Core::Hashable
133
+
134
+ def initialize(**args)
135
+ update!(**args)
136
+ end
137
+
138
+ # Update properties of this object
139
+ def update!(**args)
140
+ end
141
+ end
142
+
143
+ # AsymmetricAutoscalingOption specifies the scaling of replicas identified by
144
+ # the given selection.
145
+ class AsymmetricAutoscalingOption
146
+ include Google::Apis::Core::Hashable
147
+
148
+ # Overrides the top-level autoscaling configuration for the replicas identified
149
+ # by `replica_selection`. All fields in this message are optional. Any
150
+ # unspecified fields will use the corresponding values from the top-level
151
+ # autoscaling configuration.
152
+ # Corresponds to the JSON property `overrides`
153
+ # @return [Google::Apis::SpannerV1::AutoscalingConfigOverrides]
154
+ attr_accessor :overrides
155
+
156
+ # ReplicaSelection identifies replicas with common properties.
157
+ # Corresponds to the JSON property `replicaSelection`
158
+ # @return [Google::Apis::SpannerV1::InstanceReplicaSelection]
159
+ attr_accessor :replica_selection
160
+
161
+ def initialize(**args)
162
+ update!(**args)
163
+ end
164
+
165
+ # Update properties of this object
166
+ def update!(**args)
167
+ @overrides = args[:overrides] if args.key?(:overrides)
168
+ @replica_selection = args[:replica_selection] if args.key?(:replica_selection)
169
+ end
170
+ end
171
+
172
+ # Autoscaling configuration for an instance.
173
+ class AutoscalingConfig
174
+ include Google::Apis::Core::Hashable
175
+
176
+ # Optional. Optional asymmetric autoscaling options. Replicas matching the
177
+ # replica selection criteria will be autoscaled independently from other
178
+ # replicas. The autoscaler will scale the replicas based on the utilization of
179
+ # replicas identified by the replica selection. Replica selections should not
180
+ # overlap with each other. Other replicas (those do not match any replica
181
+ # selection) will be autoscaled together and will have the same compute capacity
182
+ # allocated to them.
183
+ # Corresponds to the JSON property `asymmetricAutoscalingOptions`
184
+ # @return [Array<Google::Apis::SpannerV1::AsymmetricAutoscalingOption>]
185
+ attr_accessor :asymmetric_autoscaling_options
186
+
187
+ # The autoscaling limits for the instance. Users can define the minimum and
188
+ # maximum compute capacity allocated to the instance, and the autoscaler will
189
+ # only scale within that range. Users can either use nodes or processing units
190
+ # to specify the limits, but should use the same unit to set both the min_limit
191
+ # and max_limit.
192
+ # Corresponds to the JSON property `autoscalingLimits`
193
+ # @return [Google::Apis::SpannerV1::AutoscalingLimits]
194
+ attr_accessor :autoscaling_limits
195
+
196
+ # The autoscaling targets for an instance.
197
+ # Corresponds to the JSON property `autoscalingTargets`
198
+ # @return [Google::Apis::SpannerV1::AutoscalingTargets]
199
+ attr_accessor :autoscaling_targets
200
+
201
+ def initialize(**args)
202
+ update!(**args)
203
+ end
204
+
205
+ # Update properties of this object
206
+ def update!(**args)
207
+ @asymmetric_autoscaling_options = args[:asymmetric_autoscaling_options] if args.key?(:asymmetric_autoscaling_options)
208
+ @autoscaling_limits = args[:autoscaling_limits] if args.key?(:autoscaling_limits)
209
+ @autoscaling_targets = args[:autoscaling_targets] if args.key?(:autoscaling_targets)
210
+ end
211
+ end
212
+
213
+ # Overrides the top-level autoscaling configuration for the replicas identified
214
+ # by `replica_selection`. All fields in this message are optional. Any
215
+ # unspecified fields will use the corresponding values from the top-level
216
+ # autoscaling configuration.
217
+ class AutoscalingConfigOverrides
218
+ include Google::Apis::Core::Hashable
219
+
220
+ # The autoscaling limits for the instance. Users can define the minimum and
221
+ # maximum compute capacity allocated to the instance, and the autoscaler will
222
+ # only scale within that range. Users can either use nodes or processing units
223
+ # to specify the limits, but should use the same unit to set both the min_limit
224
+ # and max_limit.
225
+ # Corresponds to the JSON property `autoscalingLimits`
226
+ # @return [Google::Apis::SpannerV1::AutoscalingLimits]
227
+ attr_accessor :autoscaling_limits
228
+
229
+ # Optional. If specified, overrides the autoscaling target
230
+ # high_priority_cpu_utilization_percent in the top-level autoscaling
231
+ # configuration for the selected replicas.
232
+ # Corresponds to the JSON property `autoscalingTargetHighPriorityCpuUtilizationPercent`
233
+ # @return [Fixnum]
234
+ attr_accessor :autoscaling_target_high_priority_cpu_utilization_percent
235
+
236
+ def initialize(**args)
237
+ update!(**args)
238
+ end
239
+
240
+ # Update properties of this object
241
+ def update!(**args)
242
+ @autoscaling_limits = args[:autoscaling_limits] if args.key?(:autoscaling_limits)
243
+ @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)
244
+ end
245
+ end
246
+
247
+ # The autoscaling limits for the instance. Users can define the minimum and
248
+ # maximum compute capacity allocated to the instance, and the autoscaler will
249
+ # only scale within that range. Users can either use nodes or processing units
250
+ # to specify the limits, but should use the same unit to set both the min_limit
251
+ # and max_limit.
252
+ class AutoscalingLimits
253
+ include Google::Apis::Core::Hashable
254
+
255
+ # Maximum number of nodes allocated to the instance. If set, this number should
256
+ # be greater than or equal to min_nodes.
257
+ # Corresponds to the JSON property `maxNodes`
258
+ # @return [Fixnum]
259
+ attr_accessor :max_nodes
260
+
261
+ # Maximum number of processing units allocated to the instance. If set, this
262
+ # number should be multiples of 1000 and be greater than or equal to
263
+ # min_processing_units.
264
+ # Corresponds to the JSON property `maxProcessingUnits`
265
+ # @return [Fixnum]
266
+ attr_accessor :max_processing_units
267
+
268
+ # Minimum number of nodes allocated to the instance. If set, this number should
269
+ # be greater than or equal to 1.
270
+ # Corresponds to the JSON property `minNodes`
271
+ # @return [Fixnum]
272
+ attr_accessor :min_nodes
273
+
274
+ # Minimum number of processing units allocated to the instance. If set, this
275
+ # number should be multiples of 1000.
276
+ # Corresponds to the JSON property `minProcessingUnits`
277
+ # @return [Fixnum]
278
+ attr_accessor :min_processing_units
279
+
280
+ def initialize(**args)
281
+ update!(**args)
282
+ end
283
+
284
+ # Update properties of this object
285
+ def update!(**args)
286
+ @max_nodes = args[:max_nodes] if args.key?(:max_nodes)
287
+ @max_processing_units = args[:max_processing_units] if args.key?(:max_processing_units)
288
+ @min_nodes = args[:min_nodes] if args.key?(:min_nodes)
289
+ @min_processing_units = args[:min_processing_units] if args.key?(:min_processing_units)
290
+ end
291
+ end
292
+
293
+ # The autoscaling targets for an instance.
294
+ class AutoscalingTargets
295
+ include Google::Apis::Core::Hashable
296
+
297
+ # Required. The target high priority cpu utilization percentage that the
298
+ # autoscaler should be trying to achieve for the instance. This number is on a
299
+ # scale from 0 (no utilization) to 100 (full utilization). The valid range is [
300
+ # 10, 90] inclusive.
301
+ # Corresponds to the JSON property `highPriorityCpuUtilizationPercent`
302
+ # @return [Fixnum]
303
+ attr_accessor :high_priority_cpu_utilization_percent
304
+
305
+ # Required. The target storage utilization percentage that the autoscaler should
306
+ # be trying to achieve for the instance. This number is on a scale from 0 (no
307
+ # utilization) to 100 (full utilization). The valid range is [10, 99] inclusive.
308
+ # Corresponds to the JSON property `storageUtilizationPercent`
309
+ # @return [Fixnum]
310
+ attr_accessor :storage_utilization_percent
311
+
312
+ def initialize(**args)
313
+ update!(**args)
314
+ end
315
+
316
+ # Update properties of this object
317
+ def update!(**args)
318
+ @high_priority_cpu_utilization_percent = args[:high_priority_cpu_utilization_percent] if args.key?(:high_priority_cpu_utilization_percent)
319
+ @storage_utilization_percent = args[:storage_utilization_percent] if args.key?(:storage_utilization_percent)
320
+ end
321
+ end
322
+
25
323
  # A backup of a Cloud Spanner database.
26
324
  class Backup
27
325
  include Google::Apis::Core::Hashable
28
326
 
327
+ # Output only. List of backup schedule URIs that are associated with creating
328
+ # this backup. This is only applicable for scheduled backups, and is empty for
329
+ # on-demand backups. To optimize for storage, whenever possible, multiple
330
+ # schedules are collapsed together to create one backup. In such cases, this
331
+ # field captures the list of all backup schedule URIs that are associated with
332
+ # creating this backup. If collapsing is not done, then this field captures the
333
+ # single backup schedule URI associated with creating this backup.
334
+ # Corresponds to the JSON property `backupSchedules`
335
+ # @return [Array<String>]
336
+ attr_accessor :backup_schedules
337
+
29
338
  # Output only. The time the CreateBackup request is received. If the request
30
339
  # does not specify `version_time`, the `version_time` of the backup will be
31
340
  # equivalent to the `create_time`.
@@ -50,6 +359,27 @@ module Google
50
359
  # @return [Google::Apis::SpannerV1::EncryptionInfo]
51
360
  attr_accessor :encryption_info
52
361
 
362
+ # Output only. The encryption information for the backup, whether it is
363
+ # protected by one or more KMS keys. The information includes all Cloud KMS key
364
+ # versions used to encrypt the backup. The `encryption_status` field inside of
365
+ # each `EncryptionInfo` is not populated. At least one of the key versions must
366
+ # be available for the backup to be restored. If a key version is revoked in the
367
+ # middle of a restore, the restore behavior is undefined.
368
+ # Corresponds to the JSON property `encryptionInformation`
369
+ # @return [Array<Google::Apis::SpannerV1::EncryptionInfo>]
370
+ attr_accessor :encryption_information
371
+
372
+ # Output only. For a backup in an incremental backup chain, this is the storage
373
+ # space needed to keep the data that has changed since the previous backup. For
374
+ # all other backups, this is always the size of the backup. This value may
375
+ # change if backups on the same chain get deleted or expired. This field can be
376
+ # used to calculate the total storage space used by a set of backups. For
377
+ # example, the total space used by all backups of a database can be computed by
378
+ # summing up this field.
379
+ # Corresponds to the JSON property `exclusiveSizeBytes`
380
+ # @return [Fixnum]
381
+ attr_accessor :exclusive_size_bytes
382
+
53
383
  # Required for the CreateBackup operation. The expiration time of the backup,
54
384
  # with microseconds granularity that must be at least 6 hours and at most 366
55
385
  # days from the time the CreateBackup request is processed. Once the `
@@ -59,6 +389,32 @@ module Google
59
389
  # @return [String]
60
390
  attr_accessor :expire_time
61
391
 
392
+ # Output only. The number of bytes that will be freed by deleting this backup.
393
+ # This value will be zero if, for example, this backup is part of an incremental
394
+ # backup chain and younger backups in the chain require that we keep its data.
395
+ # For backups not in an incremental backup chain, this is always the size of the
396
+ # backup. This value may change if backups on the same chain get created,
397
+ # deleted or expired.
398
+ # Corresponds to the JSON property `freeableSizeBytes`
399
+ # @return [Fixnum]
400
+ attr_accessor :freeable_size_bytes
401
+
402
+ # Output only. Populated only for backups in an incremental backup chain.
403
+ # Backups share the same chain id if and only if they belong to the same
404
+ # incremental backup chain. Use this field to determine which backups are part
405
+ # of the same incremental backup chain. The ordering of backups in the chain can
406
+ # be determined by ordering the backup `version_time`.
407
+ # Corresponds to the JSON property `incrementalBackupChainId`
408
+ # @return [String]
409
+ attr_accessor :incremental_backup_chain_id
410
+
411
+ # Output only. The instance partition(s) storing the backup. This is the same as
412
+ # the list of the instance partition(s) that the database had footprint in at
413
+ # the backup's `version_time`.
414
+ # Corresponds to the JSON property `instancePartitions`
415
+ # @return [Array<Google::Apis::SpannerV1::BackupInstancePartition>]
416
+ attr_accessor :instance_partitions
417
+
62
418
  # Output only. The max allowed expiration time of the backup, with microseconds
63
419
  # granularity. A backup's expiration time can be configured in multiple APIs:
64
420
  # CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing
@@ -79,6 +435,16 @@ module Google
79
435
  # @return [String]
80
436
  attr_accessor :name
81
437
 
438
+ # Output only. Data deleted at a time older than this is guaranteed not to be
439
+ # retained in order to support this backup. For a backup in an incremental
440
+ # backup chain, this is the version time of the oldest backup that exists or
441
+ # ever existed in the chain. For all other backups, this is the version time of
442
+ # the backup. This field can be used to understand what data is being retained
443
+ # by the backup system.
444
+ # Corresponds to the JSON property `oldestVersionTime`
445
+ # @return [String]
446
+ attr_accessor :oldest_version_time
447
+
82
448
  # Output only. The names of the destination backups being created by copying
83
449
  # this source backup. The backup names are of the form `projects//instances//
84
450
  # backups/`. Referencing backups may exist in different instances. The existence
@@ -99,7 +465,9 @@ module Google
99
465
  # @return [Array<String>]
100
466
  attr_accessor :referencing_databases
101
467
 
102
- # Output only. Size of the backup in bytes.
468
+ # Output only. Size of the backup in bytes. For a backup in an incremental
469
+ # backup chain, this is the sum of the `exclusive_size_bytes` of itself and all
470
+ # older backups in the chain.
103
471
  # Corresponds to the JSON property `sizeBytes`
104
472
  # @return [Fixnum]
105
473
  attr_accessor :size_bytes
@@ -122,13 +490,20 @@ module Google
122
490
 
123
491
  # Update properties of this object
124
492
  def update!(**args)
493
+ @backup_schedules = args[:backup_schedules] if args.key?(:backup_schedules)
125
494
  @create_time = args[:create_time] if args.key?(:create_time)
126
495
  @database = args[:database] if args.key?(:database)
127
496
  @database_dialect = args[:database_dialect] if args.key?(:database_dialect)
128
497
  @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
498
+ @encryption_information = args[:encryption_information] if args.key?(:encryption_information)
499
+ @exclusive_size_bytes = args[:exclusive_size_bytes] if args.key?(:exclusive_size_bytes)
129
500
  @expire_time = args[:expire_time] if args.key?(:expire_time)
501
+ @freeable_size_bytes = args[:freeable_size_bytes] if args.key?(:freeable_size_bytes)
502
+ @incremental_backup_chain_id = args[:incremental_backup_chain_id] if args.key?(:incremental_backup_chain_id)
503
+ @instance_partitions = args[:instance_partitions] if args.key?(:instance_partitions)
130
504
  @max_expire_time = args[:max_expire_time] if args.key?(:max_expire_time)
131
505
  @name = args[:name] if args.key?(:name)
506
+ @oldest_version_time = args[:oldest_version_time] if args.key?(:oldest_version_time)
132
507
  @referencing_backups = args[:referencing_backups] if args.key?(:referencing_backups)
133
508
  @referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
134
509
  @size_bytes = args[:size_bytes] if args.key?(:size_bytes)
@@ -177,6 +552,115 @@ module Google
177
552
  end
178
553
  end
179
554
 
555
+ # Instance partition information for the backup.
556
+ class BackupInstancePartition
557
+ include Google::Apis::Core::Hashable
558
+
559
+ # A unique identifier for the instance partition. Values are of the form `
560
+ # projects//instances//instancePartitions/`
561
+ # Corresponds to the JSON property `instancePartition`
562
+ # @return [String]
563
+ attr_accessor :instance_partition
564
+
565
+ def initialize(**args)
566
+ update!(**args)
567
+ end
568
+
569
+ # Update properties of this object
570
+ def update!(**args)
571
+ @instance_partition = args[:instance_partition] if args.key?(:instance_partition)
572
+ end
573
+ end
574
+
575
+ # BackupSchedule expresses the automated backup creation specification for a
576
+ # Spanner database.
577
+ class BackupSchedule
578
+ include Google::Apis::Core::Hashable
579
+
580
+ # Encryption configuration for the backup to create.
581
+ # Corresponds to the JSON property `encryptionConfig`
582
+ # @return [Google::Apis::SpannerV1::CreateBackupEncryptionConfig]
583
+ attr_accessor :encryption_config
584
+
585
+ # The specification for full backups. A full backup stores the entire contents
586
+ # of the database at a given version time.
587
+ # Corresponds to the JSON property `fullBackupSpec`
588
+ # @return [Google::Apis::SpannerV1::FullBackupSpec]
589
+ attr_accessor :full_backup_spec
590
+
591
+ # The specification for incremental backup chains. An incremental backup stores
592
+ # the delta of changes between a previous backup and the database contents at a
593
+ # given version time. An incremental backup chain consists of a full backup and
594
+ # zero or more successive incremental backups. The first backup created for an
595
+ # incremental backup chain is always a full backup.
596
+ # Corresponds to the JSON property `incrementalBackupSpec`
597
+ # @return [Google::Apis::SpannerV1::IncrementalBackupSpec]
598
+ attr_accessor :incremental_backup_spec
599
+
600
+ # Identifier. Output only for the CreateBackupSchedule operation. Required for
601
+ # the UpdateBackupSchedule operation. A globally unique identifier for the
602
+ # backup schedule which cannot be changed. Values are of the form `projects//
603
+ # instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the
604
+ # name must be between 2 and 60 characters in length.
605
+ # Corresponds to the JSON property `name`
606
+ # @return [String]
607
+ attr_accessor :name
608
+
609
+ # Optional. The retention duration of a backup that must be at least 6 hours and
610
+ # at most 366 days. The backup is eligible to be automatically deleted once the
611
+ # retention period has elapsed.
612
+ # Corresponds to the JSON property `retentionDuration`
613
+ # @return [String]
614
+ attr_accessor :retention_duration
615
+
616
+ # Defines specifications of the backup schedule.
617
+ # Corresponds to the JSON property `spec`
618
+ # @return [Google::Apis::SpannerV1::BackupScheduleSpec]
619
+ attr_accessor :spec
620
+
621
+ # Output only. The timestamp at which the schedule was last updated. If the
622
+ # schedule has never been updated, this field contains the timestamp when the
623
+ # schedule was first created.
624
+ # Corresponds to the JSON property `updateTime`
625
+ # @return [String]
626
+ attr_accessor :update_time
627
+
628
+ def initialize(**args)
629
+ update!(**args)
630
+ end
631
+
632
+ # Update properties of this object
633
+ def update!(**args)
634
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
635
+ @full_backup_spec = args[:full_backup_spec] if args.key?(:full_backup_spec)
636
+ @incremental_backup_spec = args[:incremental_backup_spec] if args.key?(:incremental_backup_spec)
637
+ @name = args[:name] if args.key?(:name)
638
+ @retention_duration = args[:retention_duration] if args.key?(:retention_duration)
639
+ @spec = args[:spec] if args.key?(:spec)
640
+ @update_time = args[:update_time] if args.key?(:update_time)
641
+ end
642
+ end
643
+
644
+ # Defines specifications of the backup schedule.
645
+ class BackupScheduleSpec
646
+ include Google::Apis::Core::Hashable
647
+
648
+ # CrontabSpec can be used to specify the version time and frequency at which the
649
+ # backup is created.
650
+ # Corresponds to the JSON property `cronSpec`
651
+ # @return [Google::Apis::SpannerV1::CrontabSpec]
652
+ attr_accessor :cron_spec
653
+
654
+ def initialize(**args)
655
+ update!(**args)
656
+ end
657
+
658
+ # Update properties of this object
659
+ def update!(**args)
660
+ @cron_spec = args[:cron_spec] if args.key?(:cron_spec)
661
+ end
662
+ end
663
+
180
664
  # The request for BatchCreateSessions.
181
665
  class BatchCreateSessionsRequest
182
666
  include Google::Apis::Core::Hashable
@@ -224,10 +708,95 @@ module Google
224
708
  end
225
709
  end
226
710
 
711
+ # The request for BatchWrite.
712
+ class BatchWriteRequest
713
+ include Google::Apis::Core::Hashable
714
+
715
+ # Optional. When `exclude_txn_from_change_streams` is set to `true`: *
716
+ # Modifications from all transactions in this batch write operation will not be
717
+ # recorded in change streams with DDL option `allow_txn_exclusion=true` that are
718
+ # tracking columns modified by these transactions. * Modifications from all
719
+ # transactions in this batch write operation will be recorded in change streams
720
+ # with DDL option `allow_txn_exclusion=false or not set` that are tracking
721
+ # columns modified by these transactions. When `exclude_txn_from_change_streams`
722
+ # is set to `false` or not set, Modifications from all transactions in this
723
+ # batch write operation will be recorded in all change streams that are tracking
724
+ # columns modified by these transactions.
725
+ # Corresponds to the JSON property `excludeTxnFromChangeStreams`
726
+ # @return [Boolean]
727
+ attr_accessor :exclude_txn_from_change_streams
728
+ alias_method :exclude_txn_from_change_streams?, :exclude_txn_from_change_streams
729
+
730
+ # Required. The groups of mutations to be applied.
731
+ # Corresponds to the JSON property `mutationGroups`
732
+ # @return [Array<Google::Apis::SpannerV1::MutationGroup>]
733
+ attr_accessor :mutation_groups
734
+
735
+ # Common request options for various APIs.
736
+ # Corresponds to the JSON property `requestOptions`
737
+ # @return [Google::Apis::SpannerV1::RequestOptions]
738
+ attr_accessor :request_options
739
+
740
+ def initialize(**args)
741
+ update!(**args)
742
+ end
743
+
744
+ # Update properties of this object
745
+ def update!(**args)
746
+ @exclude_txn_from_change_streams = args[:exclude_txn_from_change_streams] if args.key?(:exclude_txn_from_change_streams)
747
+ @mutation_groups = args[:mutation_groups] if args.key?(:mutation_groups)
748
+ @request_options = args[:request_options] if args.key?(:request_options)
749
+ end
750
+ end
751
+
752
+ # The result of applying a batch of mutations.
753
+ class BatchWriteResponse
754
+ include Google::Apis::Core::Hashable
755
+
756
+ # The commit timestamp of the transaction that applied this batch. Present if `
757
+ # status` is `OK`, absent otherwise.
758
+ # Corresponds to the JSON property `commitTimestamp`
759
+ # @return [String]
760
+ attr_accessor :commit_timestamp
761
+
762
+ # The mutation groups applied in this batch. The values index into the `
763
+ # mutation_groups` field in the corresponding `BatchWriteRequest`.
764
+ # Corresponds to the JSON property `indexes`
765
+ # @return [Array<Fixnum>]
766
+ attr_accessor :indexes
767
+
768
+ # The `Status` type defines a logical error model that is suitable for different
769
+ # programming environments, including REST APIs and RPC APIs. It is used by [
770
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
771
+ # data: error code, error message, and error details. You can find out more
772
+ # about this error model and how to work with it in the [API Design Guide](https:
773
+ # //cloud.google.com/apis/design/errors).
774
+ # Corresponds to the JSON property `status`
775
+ # @return [Google::Apis::SpannerV1::Status]
776
+ attr_accessor :status
777
+
778
+ def initialize(**args)
779
+ update!(**args)
780
+ end
781
+
782
+ # Update properties of this object
783
+ def update!(**args)
784
+ @commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
785
+ @indexes = args[:indexes] if args.key?(:indexes)
786
+ @status = args[:status] if args.key?(:status)
787
+ end
788
+ end
789
+
227
790
  # The request for BeginTransaction.
228
791
  class BeginTransactionRequest
229
792
  include Google::Apis::Core::Hashable
230
793
 
794
+ # A modification to one or more Cloud Spanner rows. Mutations can be applied to
795
+ # a Cloud Spanner database by sending them in a Commit call.
796
+ # Corresponds to the JSON property `mutationKey`
797
+ # @return [Google::Apis::SpannerV1::Mutation]
798
+ attr_accessor :mutation_key
799
+
231
800
  # Transactions: Each session can have at most one active transaction at a time (
232
801
  # note that standalone reads and queries use a transaction internally and do
233
802
  # count towards the one transaction limit). After the active transaction is
@@ -244,7 +813,7 @@ module Google
244
813
  # such that the read is guaranteed to see the effects of all transactions that
245
814
  # have committed before the start of the read). Snapshot read-only transactions
246
815
  # do not need to be committed. Queries on change streams must be performed with
247
- # the snapshot read-only transaction mode, specifying a strong read. Please see
816
+ # the snapshot read-only transaction mode, specifying a strong read. See
248
817
  # TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This
249
818
  # type of transaction is used to execute a single Partitioned DML statement.
250
819
  # Partitioned DML partitions the key space and runs the DML statement over each
@@ -280,87 +849,92 @@ module Google
280
849
  # committing the retry, the client should execute the retry in the same session
281
850
  # as the original attempt. The original session's lock priority increases with
282
851
  # each consecutive abort, meaning that each attempt has a slightly better chance
283
- # of success than the previous. Under some circumstances (for example, many
284
- # transactions attempting to modify the same row(s)), a transaction can abort
285
- # many times in a short period before successfully committing. Thus, it is not a
286
- # good idea to cap the number of retries a transaction can attempt; instead, it
287
- # is better to limit the total amount of time spent retrying. Idle transactions:
288
- # A transaction is considered idle if it has no outstanding reads or SQL queries
289
- # and has not started a read or SQL query within the last 10 seconds. Idle
290
- # transactions can be aborted by Cloud Spanner so that they don't hold on to
291
- # locks indefinitely. If an idle transaction is aborted, the commit will fail
292
- # with error `ABORTED`. If this behavior is undesirable, periodically executing
293
- # a simple SQL query in the transaction (for example, `SELECT 1`) prevents the
294
- # transaction from becoming idle. Snapshot read-only transactions: Snapshot read-
295
- # only transactions provides a simpler method than locking read-write
296
- # transactions for doing several consistent reads. However, this type of
297
- # transaction does not support writes. Snapshot transactions do not take locks.
298
- # Instead, they work by choosing a Cloud Spanner timestamp, then executing all
299
- # reads at that timestamp. Since they do not acquire locks, they do not block
300
- # concurrent read-write transactions. Unlike locking read-write transactions,
301
- # snapshot read-only transactions never abort. They can fail if the chosen read
302
- # timestamp is garbage collected; however, the default garbage collection policy
303
- # is generous enough that most applications do not need to worry about this in
304
- # practice. Snapshot read-only transactions do not need to call Commit or
305
- # Rollback (and in fact are not permitted to do so). To execute a snapshot
306
- # transaction, the client specifies a timestamp bound, which tells Cloud Spanner
307
- # how to choose a read timestamp. The types of timestamp bound are: - Strong (
308
- # the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner
309
- # database to be read is geographically distributed, stale read-only
310
- # transactions can execute more quickly than strong or read-write transactions,
311
- # because they are able to execute far from the leader replica. Each type of
312
- # timestamp bound is discussed in detail below. Strong: Strong reads are
313
- # guaranteed to see the effects of all transactions that have committed before
314
- # the start of the read. Furthermore, all rows yielded by a single read are
315
- # consistent with each other -- if any part of the read observes a transaction,
316
- # all parts of the read see the transaction. Strong reads are not repeatable:
317
- # two consecutive strong read-only transactions might return inconsistent
318
- # results if there are concurrent writes. If consistency across reads is
319
- # required, the reads should be executed within a transaction or at an exact
320
- # read timestamp. Queries on change streams (see below for more details) must
321
- # also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.
322
- # strong. Exact staleness: These timestamp bounds execute reads at a user-
323
- # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
324
- # prefix of the global transaction history: they observe modifications done by
325
- # all transactions with a commit timestamp less than or equal to the read
326
- # timestamp, and observe none of the modifications done by transactions with a
327
- # larger commit timestamp. They will block until all conflicting transactions
328
- # that may be assigned commit timestamps <= the read timestamp have finished.
329
- # The timestamp can either be expressed as an absolute Cloud Spanner commit
330
- # timestamp or a staleness relative to the current time. These modes do not
331
- # require a "negotiation phase" to pick a timestamp. As a result, they execute
332
- # slightly faster than the equivalent boundedly stale concurrency modes. On the
333
- # other hand, boundedly stale reads usually return fresher results. See
334
- # TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.
335
- # exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud
336
- # Spanner to pick the read timestamp, subject to a user-provided staleness bound.
337
- # Cloud Spanner chooses the newest timestamp within the staleness bound that
338
- # allows execution of the reads at the closest available replica without
339
- # blocking. All rows yielded are consistent with each other -- if any part of
340
- # the read observes a transaction, all parts of the read see the transaction.
341
- # Boundedly stale reads are not repeatable: two stale reads, even if they use
342
- # the same staleness bound, can execute at different timestamps and thus return
343
- # inconsistent results. Boundedly stale reads execute in two phases: the first
344
- # phase negotiates a timestamp among all replicas needed to serve the read. In
345
- # the second phase, reads are executed at the negotiated timestamp. As a result
346
- # of the two phase execution, bounded staleness reads are usually a little
347
- # slower than comparable exact staleness reads. However, they are typically able
348
- # to return fresher results, and are more likely to execute at the closest
349
- # replica. Because the timestamp negotiation requires up-front knowledge of
350
- # which rows will be read, it can only be used with single-use read-only
351
- # transactions. See TransactionOptions.ReadOnly.max_staleness and
352
- # TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and
353
- # garbage collection: Cloud Spanner continuously garbage collects deleted and
354
- # overwritten data in the background to reclaim storage space. This process is
355
- # known as "version GC". By default, version GC reclaims versions after they are
356
- # one hour old. Because of this, Cloud Spanner cannot perform reads at read
357
- # timestamps more than one hour in the past. This restriction also applies to in-
358
- # progress reads and/or SQL queries whose timestamp become too old while
359
- # executing. Reads and SQL queries with too-old read timestamps fail with the
360
- # error `FAILED_PRECONDITION`. You can configure and extend the `
361
- # VERSION_RETENTION_PERIOD` of a database up to a period as long as one week,
362
- # which allows Cloud Spanner to perform reads up to one week in the past.
363
- # Querying change Streams: A Change Stream is a schema object that can be
852
+ # of success than the previous. Note that the lock priority is preserved per
853
+ # session (not per transaction). Lock priority is set by the first read or write
854
+ # in the first attempt of a read-write transaction. If the application starts a
855
+ # new session to retry the whole transaction, the transaction loses its original
856
+ # lock priority. Moreover, the lock priority is only preserved if the
857
+ # transaction fails with an `ABORTED` error. Under some circumstances (for
858
+ # example, many transactions attempting to modify the same row(s)), a
859
+ # transaction can abort many times in a short period before successfully
860
+ # committing. Thus, it is not a good idea to cap the number of retries a
861
+ # transaction can attempt; instead, it is better to limit the total amount of
862
+ # time spent retrying. Idle transactions: A transaction is considered idle if it
863
+ # has no outstanding reads or SQL queries and has not started a read or SQL
864
+ # query within the last 10 seconds. Idle transactions can be aborted by Cloud
865
+ # Spanner so that they don't hold on to locks indefinitely. If an idle
866
+ # transaction is aborted, the commit will fail with error `ABORTED`. If this
867
+ # behavior is undesirable, periodically executing a simple SQL query in the
868
+ # transaction (for example, `SELECT 1`) prevents the transaction from becoming
869
+ # idle. Snapshot read-only transactions: Snapshot read-only transactions
870
+ # provides a simpler method than locking read-write transactions for doing
871
+ # several consistent reads. However, this type of transaction does not support
872
+ # writes. Snapshot transactions do not take locks. Instead, they work by
873
+ # choosing a Cloud Spanner timestamp, then executing all reads at that timestamp.
874
+ # Since they do not acquire locks, they do not block concurrent read-write
875
+ # transactions. Unlike locking read-write transactions, snapshot read-only
876
+ # transactions never abort. They can fail if the chosen read timestamp is
877
+ # garbage collected; however, the default garbage collection policy is generous
878
+ # enough that most applications do not need to worry about this in practice.
879
+ # Snapshot read-only transactions do not need to call Commit or Rollback (and in
880
+ # fact are not permitted to do so). To execute a snapshot transaction, the
881
+ # client specifies a timestamp bound, which tells Cloud Spanner how to choose a
882
+ # read timestamp. The types of timestamp bound are: - Strong (the default). -
883
+ # Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read
884
+ # is geographically distributed, stale read-only transactions can execute more
885
+ # quickly than strong or read-write transactions, because they are able to
886
+ # execute far from the leader replica. Each type of timestamp bound is discussed
887
+ # in detail below. Strong: Strong reads are guaranteed to see the effects of all
888
+ # transactions that have committed before the start of the read. Furthermore,
889
+ # all rows yielded by a single read are consistent with each other -- if any
890
+ # part of the read observes a transaction, all parts of the read see the
891
+ # transaction. Strong reads are not repeatable: two consecutive strong read-only
892
+ # transactions might return inconsistent results if there are concurrent writes.
893
+ # If consistency across reads is required, the reads should be executed within a
894
+ # transaction or at an exact read timestamp. Queries on change streams (see
895
+ # below for more details) must also specify the strong read timestamp bound. See
896
+ # TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds
897
+ # execute reads at a user-specified timestamp. Reads at a timestamp are
898
+ # guaranteed to see a consistent prefix of the global transaction history: they
899
+ # observe modifications done by all transactions with a commit timestamp less
900
+ # than or equal to the read timestamp, and observe none of the modifications
901
+ # done by transactions with a larger commit timestamp. They will block until all
902
+ # conflicting transactions that may be assigned commit timestamps <= the read
903
+ # timestamp have finished. The timestamp can either be expressed as an absolute
904
+ # Cloud Spanner commit timestamp or a staleness relative to the current time.
905
+ # These modes do not require a "negotiation phase" to pick a timestamp. As a
906
+ # result, they execute slightly faster than the equivalent boundedly stale
907
+ # concurrency modes. On the other hand, boundedly stale reads usually return
908
+ # fresher results. See TransactionOptions.ReadOnly.read_timestamp and
909
+ # TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded
910
+ # staleness modes allow Cloud Spanner to pick the read timestamp, subject to a
911
+ # user-provided staleness bound. Cloud Spanner chooses the newest timestamp
912
+ # within the staleness bound that allows execution of the reads at the closest
913
+ # available replica without blocking. All rows yielded are consistent with each
914
+ # other -- if any part of the read observes a transaction, all parts of the read
915
+ # see the transaction. Boundedly stale reads are not repeatable: two stale reads,
916
+ # even if they use the same staleness bound, can execute at different
917
+ # timestamps and thus return inconsistent results. Boundedly stale reads execute
918
+ # in two phases: the first phase negotiates a timestamp among all replicas
919
+ # needed to serve the read. In the second phase, reads are executed at the
920
+ # negotiated timestamp. As a result of the two phase execution, bounded
921
+ # staleness reads are usually a little slower than comparable exact staleness
922
+ # reads. However, they are typically able to return fresher results, and are
923
+ # more likely to execute at the closest replica. Because the timestamp
924
+ # negotiation requires up-front knowledge of which rows will be read, it can
925
+ # only be used with single-use read-only transactions. See TransactionOptions.
926
+ # ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old
927
+ # read timestamps and garbage collection: Cloud Spanner continuously garbage
928
+ # collects deleted and overwritten data in the background to reclaim storage
929
+ # space. This process is known as "version GC". By default, version GC reclaims
930
+ # versions after they are one hour old. Because of this, Cloud Spanner cannot
931
+ # perform reads at read timestamps more than one hour in the past. This
932
+ # restriction also applies to in-progress reads and/or SQL queries whose
933
+ # timestamp become too old while executing. Reads and SQL queries with too-old
934
+ # read timestamps fail with the error `FAILED_PRECONDITION`. You can configure
935
+ # and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long
936
+ # as one week, which allows Cloud Spanner to perform reads up to one week in the
937
+ # past. Querying change Streams: A Change Stream is a schema object that can be
364
938
  # configured to watch data changes on the entire database, a set of tables, or a
365
939
  # set of columns in a database. When a change stream is created, Spanner
366
940
  # automatically defines a corresponding SQL Table-Valued Function (TVF) that can
@@ -396,12 +970,12 @@ module Google
396
970
  # of the table. Rather, the statement is applied atomically to partitions of the
397
971
  # table, in independent transactions. Secondary index rows are updated
398
972
  # atomically with the base table rows. - Partitioned DML does not guarantee
399
- # exactly-once execution semantics against a partition. The statement will be
400
- # applied at least once to each partition. It is strongly recommended that the
401
- # DML statement should be idempotent to avoid unexpected results. For instance,
402
- # it is potentially dangerous to run a statement such as `UPDATE table SET
403
- # column = column + 1` as it could be run multiple times against some rows. -
404
- # The partitions are committed automatically - there is no support for Commit or
973
+ # exactly-once execution semantics against a partition. The statement is applied
974
+ # at least once to each partition. It is strongly recommended that the DML
975
+ # statement should be idempotent to avoid unexpected results. For instance, it
976
+ # is potentially dangerous to run a statement such as `UPDATE table SET column =
977
+ # column + 1` as it could be run multiple times against some rows. - The
978
+ # partitions are committed automatically - there is no support for Commit or
405
979
  # Rollback. If the call returns an error, or if the client issuing the
406
980
  # ExecuteSql call dies, it is possible that some rows had the statement executed
407
981
  # on them successfully. It is also possible that statement was never executed
@@ -430,6 +1004,7 @@ module Google
430
1004
 
431
1005
  # Update properties of this object
432
1006
  def update!(**args)
1007
+ @mutation_key = args[:mutation_key] if args.key?(:mutation_key)
433
1008
  @options = args[:options] if args.key?(:options)
434
1009
  @request_options = args[:request_options] if args.key?(:request_options)
435
1010
  end
@@ -462,37 +1037,64 @@ module Google
462
1037
  # members` can have the following values: * `allUsers`: A special identifier
463
1038
  # that represents anyone who is on the internet; with or without a Google
464
1039
  # account. * `allAuthenticatedUsers`: A special identifier that represents
465
- # anyone who is authenticated with a Google account or a service account. * `
466
- # user:`emailid``: An email address that represents a specific Google account.
467
- # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
468
- # address that represents a Google service account. For example, `my-other-app@
469
- # appspot.gserviceaccount.com`. * `serviceAccount:`projectid`.svc.id.goog[`
470
- # namespace`/`kubernetes-sa`]`: An identifier for a [Kubernetes service account](
471
- # https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-
472
- # accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`
473
- # . * `group:`emailid``: An email address that represents a Google group. For
474
- # example, `admins@example.com`. * `deleted:user:`emailid`?uid=`uniqueid``: An
475
- # email address (plus unique identifier) representing a user that has been
476
- # recently deleted. For example, `alice@example.com?uid=123456789012345678901`.
477
- # If the user is recovered, this value reverts to `user:`emailid`` and the
478
- # recovered user retains the role in the binding. * `deleted:serviceAccount:`
479
- # emailid`?uid=`uniqueid``: An email address (plus unique identifier)
480
- # representing a service account that has been recently deleted. For example, `
481
- # my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
482
- # service account is undeleted, this value reverts to `serviceAccount:`emailid``
483
- # and the undeleted service account retains the role in the binding. * `deleted:
484
- # group:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
485
- # representing a Google group that has been recently deleted. For example, `
486
- # admins@example.com?uid=123456789012345678901`. If the group is recovered, this
487
- # value reverts to `group:`emailid`` and the recovered group retains the role in
488
- # the binding. * `domain:`domain``: The G Suite domain (primary) that represents
489
- # all the users of that domain. For example, `google.com` or `example.com`.
1040
+ # anyone who is authenticated with a Google account or a service account. Does
1041
+ # not include identities that come from external identity providers (IdPs)
1042
+ # through identity federation. * `user:`emailid``: An email address that
1043
+ # represents a specific Google account. For example, `alice@example.com` . * `
1044
+ # serviceAccount:`emailid``: An email address that represents a Google service
1045
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
1046
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
1047
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
1048
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
1049
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
1050
+ # email address that represents a Google group. For example, `admins@example.com`
1051
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
1052
+ # users of that domain. For example, `google.com` or `example.com`. * `principal:
1053
+ # //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
1054
+ # subject_attribute_value``: A single identity in a workforce identity pool. * `
1055
+ # principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
1056
+ # group/`group_id``: All workforce identities in a group. * `principalSet://iam.
1057
+ # googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
1058
+ # attribute_name`/`attribute_value``: All workforce identities with a specific
1059
+ # attribute value. * `principalSet://iam.googleapis.com/locations/global/
1060
+ # workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
1061
+ # principal://iam.googleapis.com/projects/`project_number`/locations/global/
1062
+ # workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
1063
+ # identity in a workload identity pool. * `principalSet://iam.googleapis.com/
1064
+ # projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
1065
+ # group/`group_id``: A workload identity pool group. * `principalSet://iam.
1066
+ # googleapis.com/projects/`project_number`/locations/global/
1067
+ # workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
1068
+ # All identities in a workload identity pool with a certain attribute. * `
1069
+ # principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
1070
+ # workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
1071
+ # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
1072
+ # identifier) representing a user that has been recently deleted. For example, `
1073
+ # alice@example.com?uid=123456789012345678901`. If the user is recovered, this
1074
+ # value reverts to `user:`emailid`` and the recovered user retains the role in
1075
+ # the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
1076
+ # address (plus unique identifier) representing a service account that has been
1077
+ # recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
1078
+ # 123456789012345678901`. If the service account is undeleted, this value
1079
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
1080
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
1081
+ # An email address (plus unique identifier) representing a Google group that has
1082
+ # been recently deleted. For example, `admins@example.com?uid=
1083
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
1084
+ # group:`emailid`` and the recovered group retains the role in the binding. * `
1085
+ # deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
1086
+ # pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
1087
+ # workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
1088
+ # locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
490
1089
  # Corresponds to the JSON property `members`
491
1090
  # @return [Array<String>]
492
1091
  attr_accessor :members
493
1092
 
494
1093
  # Role that is assigned to the list of `members`, or principals. For example, `
495
- # roles/viewer`, `roles/editor`, or `roles/owner`.
1094
+ # roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM
1095
+ # roles and permissions, see the [IAM documentation](https://cloud.google.com/
1096
+ # iam/docs/roles-overview). For a list of the available pre-defined roles, see [
1097
+ # here](https://cloud.google.com/iam/docs/understanding-roles).
496
1098
  # Corresponds to the JSON property `role`
497
1099
  # @return [String]
498
1100
  attr_accessor :role
@@ -509,6 +1111,74 @@ module Google
509
1111
  end
510
1112
  end
511
1113
 
1114
+ # Metadata type for the long-running operation returned by ChangeQuorum.
1115
+ class ChangeQuorumMetadata
1116
+ include Google::Apis::Core::Hashable
1117
+
1118
+ # If set, the time at which this operation failed or was completed successfully.
1119
+ # Corresponds to the JSON property `endTime`
1120
+ # @return [String]
1121
+ attr_accessor :end_time
1122
+
1123
+ # The request for ChangeQuorum.
1124
+ # Corresponds to the JSON property `request`
1125
+ # @return [Google::Apis::SpannerV1::ChangeQuorumRequest]
1126
+ attr_accessor :request
1127
+
1128
+ # Time the request was received.
1129
+ # Corresponds to the JSON property `startTime`
1130
+ # @return [String]
1131
+ attr_accessor :start_time
1132
+
1133
+ def initialize(**args)
1134
+ update!(**args)
1135
+ end
1136
+
1137
+ # Update properties of this object
1138
+ def update!(**args)
1139
+ @end_time = args[:end_time] if args.key?(:end_time)
1140
+ @request = args[:request] if args.key?(:request)
1141
+ @start_time = args[:start_time] if args.key?(:start_time)
1142
+ end
1143
+ end
1144
+
1145
+ # The request for ChangeQuorum.
1146
+ class ChangeQuorumRequest
1147
+ include Google::Apis::Core::Hashable
1148
+
1149
+ # Optional. The etag is the hash of the `QuorumInfo`. The `ChangeQuorum`
1150
+ # operation is only performed if the etag matches that of the `QuorumInfo` in
1151
+ # the current database resource. Otherwise the API returns an `ABORTED` error.
1152
+ # The etag is used for optimistic concurrency control as a way to help prevent
1153
+ # simultaneous change quorum requests that could create a race condition.
1154
+ # Corresponds to the JSON property `etag`
1155
+ # @return [String]
1156
+ attr_accessor :etag
1157
+
1158
+ # Required. Name of the database in which to apply `ChangeQuorum`. Values are of
1159
+ # the form `projects//instances//databases/`.
1160
+ # Corresponds to the JSON property `name`
1161
+ # @return [String]
1162
+ attr_accessor :name
1163
+
1164
+ # Information about the database quorum type. This only applies to dual-region
1165
+ # instance configs.
1166
+ # Corresponds to the JSON property `quorumType`
1167
+ # @return [Google::Apis::SpannerV1::QuorumType]
1168
+ attr_accessor :quorum_type
1169
+
1170
+ def initialize(**args)
1171
+ update!(**args)
1172
+ end
1173
+
1174
+ # Update properties of this object
1175
+ def update!(**args)
1176
+ @etag = args[:etag] if args.key?(:etag)
1177
+ @name = args[:name] if args.key?(:name)
1178
+ @quorum_type = args[:quorum_type] if args.key?(:quorum_type)
1179
+ end
1180
+ end
1181
+
512
1182
  # Metadata associated with a parent-child relationship appearing in a PlanNode.
513
1183
  class ChildLink
514
1184
  include Google::Apis::Core::Hashable
@@ -552,12 +1222,28 @@ module Google
552
1222
  class CommitRequest
553
1223
  include Google::Apis::Core::Hashable
554
1224
 
1225
+ # Optional. The amount of latency this request is configured to incur in order
1226
+ # to improve throughput. If this field is not set, Spanner assumes requests are
1227
+ # relatively latency sensitive and automatically determines an appropriate delay
1228
+ # time. You can specify a commit delay value between 0 and 500 ms.
1229
+ # Corresponds to the JSON property `maxCommitDelay`
1230
+ # @return [String]
1231
+ attr_accessor :max_commit_delay
1232
+
555
1233
  # The mutations to be executed when this transaction commits. All mutations are
556
1234
  # applied atomically, in the order they appear in this list.
557
1235
  # Corresponds to the JSON property `mutations`
558
1236
  # @return [Array<Google::Apis::SpannerV1::Mutation>]
559
1237
  attr_accessor :mutations
560
1238
 
1239
+ # When a read-write transaction is executed on a multiplexed session, this
1240
+ # precommit token is sent back to the client as a part of the [Transaction]
1241
+ # message in the BeginTransaction response and also as a part of the [ResultSet]
1242
+ # and [PartialResultSet] responses.
1243
+ # Corresponds to the JSON property `precommitToken`
1244
+ # @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
1245
+ attr_accessor :precommit_token
1246
+
561
1247
  # Common request options for various APIs.
562
1248
  # Corresponds to the JSON property `requestOptions`
563
1249
  # @return [Google::Apis::SpannerV1::RequestOptions]
@@ -586,7 +1272,7 @@ module Google
586
1272
  # such that the read is guaranteed to see the effects of all transactions that
587
1273
  # have committed before the start of the read). Snapshot read-only transactions
588
1274
  # do not need to be committed. Queries on change streams must be performed with
589
- # the snapshot read-only transaction mode, specifying a strong read. Please see
1275
+ # the snapshot read-only transaction mode, specifying a strong read. See
590
1276
  # TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This
591
1277
  # type of transaction is used to execute a single Partitioned DML statement.
592
1278
  # Partitioned DML partitions the key space and runs the DML statement over each
@@ -622,87 +1308,92 @@ module Google
622
1308
  # committing the retry, the client should execute the retry in the same session
623
1309
  # as the original attempt. The original session's lock priority increases with
624
1310
  # each consecutive abort, meaning that each attempt has a slightly better chance
625
- # of success than the previous. Under some circumstances (for example, many
626
- # transactions attempting to modify the same row(s)), a transaction can abort
627
- # many times in a short period before successfully committing. Thus, it is not a
628
- # good idea to cap the number of retries a transaction can attempt; instead, it
629
- # is better to limit the total amount of time spent retrying. Idle transactions:
630
- # A transaction is considered idle if it has no outstanding reads or SQL queries
631
- # and has not started a read or SQL query within the last 10 seconds. Idle
632
- # transactions can be aborted by Cloud Spanner so that they don't hold on to
633
- # locks indefinitely. If an idle transaction is aborted, the commit will fail
634
- # with error `ABORTED`. If this behavior is undesirable, periodically executing
635
- # a simple SQL query in the transaction (for example, `SELECT 1`) prevents the
636
- # transaction from becoming idle. Snapshot read-only transactions: Snapshot read-
637
- # only transactions provides a simpler method than locking read-write
638
- # transactions for doing several consistent reads. However, this type of
639
- # transaction does not support writes. Snapshot transactions do not take locks.
640
- # Instead, they work by choosing a Cloud Spanner timestamp, then executing all
641
- # reads at that timestamp. Since they do not acquire locks, they do not block
642
- # concurrent read-write transactions. Unlike locking read-write transactions,
643
- # snapshot read-only transactions never abort. They can fail if the chosen read
644
- # timestamp is garbage collected; however, the default garbage collection policy
645
- # is generous enough that most applications do not need to worry about this in
646
- # practice. Snapshot read-only transactions do not need to call Commit or
647
- # Rollback (and in fact are not permitted to do so). To execute a snapshot
648
- # transaction, the client specifies a timestamp bound, which tells Cloud Spanner
649
- # how to choose a read timestamp. The types of timestamp bound are: - Strong (
650
- # the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner
651
- # database to be read is geographically distributed, stale read-only
652
- # transactions can execute more quickly than strong or read-write transactions,
653
- # because they are able to execute far from the leader replica. Each type of
654
- # timestamp bound is discussed in detail below. Strong: Strong reads are
655
- # guaranteed to see the effects of all transactions that have committed before
656
- # the start of the read. Furthermore, all rows yielded by a single read are
657
- # consistent with each other -- if any part of the read observes a transaction,
658
- # all parts of the read see the transaction. Strong reads are not repeatable:
659
- # two consecutive strong read-only transactions might return inconsistent
660
- # results if there are concurrent writes. If consistency across reads is
661
- # required, the reads should be executed within a transaction or at an exact
662
- # read timestamp. Queries on change streams (see below for more details) must
663
- # also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.
664
- # strong. Exact staleness: These timestamp bounds execute reads at a user-
665
- # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
666
- # prefix of the global transaction history: they observe modifications done by
667
- # all transactions with a commit timestamp less than or equal to the read
668
- # timestamp, and observe none of the modifications done by transactions with a
669
- # larger commit timestamp. They will block until all conflicting transactions
670
- # that may be assigned commit timestamps <= the read timestamp have finished.
671
- # The timestamp can either be expressed as an absolute Cloud Spanner commit
672
- # timestamp or a staleness relative to the current time. These modes do not
673
- # require a "negotiation phase" to pick a timestamp. As a result, they execute
674
- # slightly faster than the equivalent boundedly stale concurrency modes. On the
675
- # other hand, boundedly stale reads usually return fresher results. See
676
- # TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.
677
- # exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud
678
- # Spanner to pick the read timestamp, subject to a user-provided staleness bound.
679
- # Cloud Spanner chooses the newest timestamp within the staleness bound that
680
- # allows execution of the reads at the closest available replica without
681
- # blocking. All rows yielded are consistent with each other -- if any part of
682
- # the read observes a transaction, all parts of the read see the transaction.
683
- # Boundedly stale reads are not repeatable: two stale reads, even if they use
684
- # the same staleness bound, can execute at different timestamps and thus return
685
- # inconsistent results. Boundedly stale reads execute in two phases: the first
686
- # phase negotiates a timestamp among all replicas needed to serve the read. In
687
- # the second phase, reads are executed at the negotiated timestamp. As a result
688
- # of the two phase execution, bounded staleness reads are usually a little
689
- # slower than comparable exact staleness reads. However, they are typically able
690
- # to return fresher results, and are more likely to execute at the closest
691
- # replica. Because the timestamp negotiation requires up-front knowledge of
692
- # which rows will be read, it can only be used with single-use read-only
693
- # transactions. See TransactionOptions.ReadOnly.max_staleness and
694
- # TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and
695
- # garbage collection: Cloud Spanner continuously garbage collects deleted and
696
- # overwritten data in the background to reclaim storage space. This process is
697
- # known as "version GC". By default, version GC reclaims versions after they are
698
- # one hour old. Because of this, Cloud Spanner cannot perform reads at read
699
- # timestamps more than one hour in the past. This restriction also applies to in-
700
- # progress reads and/or SQL queries whose timestamp become too old while
701
- # executing. Reads and SQL queries with too-old read timestamps fail with the
702
- # error `FAILED_PRECONDITION`. You can configure and extend the `
703
- # VERSION_RETENTION_PERIOD` of a database up to a period as long as one week,
704
- # which allows Cloud Spanner to perform reads up to one week in the past.
705
- # Querying change Streams: A Change Stream is a schema object that can be
1311
+ # of success than the previous. Note that the lock priority is preserved per
1312
+ # session (not per transaction). Lock priority is set by the first read or write
1313
+ # in the first attempt of a read-write transaction. If the application starts a
1314
+ # new session to retry the whole transaction, the transaction loses its original
1315
+ # lock priority. Moreover, the lock priority is only preserved if the
1316
+ # transaction fails with an `ABORTED` error. Under some circumstances (for
1317
+ # example, many transactions attempting to modify the same row(s)), a
1318
+ # transaction can abort many times in a short period before successfully
1319
+ # committing. Thus, it is not a good idea to cap the number of retries a
1320
+ # transaction can attempt; instead, it is better to limit the total amount of
1321
+ # time spent retrying. Idle transactions: A transaction is considered idle if it
1322
+ # has no outstanding reads or SQL queries and has not started a read or SQL
1323
+ # query within the last 10 seconds. Idle transactions can be aborted by Cloud
1324
+ # Spanner so that they don't hold on to locks indefinitely. If an idle
1325
+ # transaction is aborted, the commit will fail with error `ABORTED`. If this
1326
+ # behavior is undesirable, periodically executing a simple SQL query in the
1327
+ # transaction (for example, `SELECT 1`) prevents the transaction from becoming
1328
+ # idle. Snapshot read-only transactions: Snapshot read-only transactions
1329
+ # provides a simpler method than locking read-write transactions for doing
1330
+ # several consistent reads. However, this type of transaction does not support
1331
+ # writes. Snapshot transactions do not take locks. Instead, they work by
1332
+ # choosing a Cloud Spanner timestamp, then executing all reads at that timestamp.
1333
+ # Since they do not acquire locks, they do not block concurrent read-write
1334
+ # transactions. Unlike locking read-write transactions, snapshot read-only
1335
+ # transactions never abort. They can fail if the chosen read timestamp is
1336
+ # garbage collected; however, the default garbage collection policy is generous
1337
+ # enough that most applications do not need to worry about this in practice.
1338
+ # Snapshot read-only transactions do not need to call Commit or Rollback (and in
1339
+ # fact are not permitted to do so). To execute a snapshot transaction, the
1340
+ # client specifies a timestamp bound, which tells Cloud Spanner how to choose a
1341
+ # read timestamp. The types of timestamp bound are: - Strong (the default). -
1342
+ # Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read
1343
+ # is geographically distributed, stale read-only transactions can execute more
1344
+ # quickly than strong or read-write transactions, because they are able to
1345
+ # execute far from the leader replica. Each type of timestamp bound is discussed
1346
+ # in detail below. Strong: Strong reads are guaranteed to see the effects of all
1347
+ # transactions that have committed before the start of the read. Furthermore,
1348
+ # all rows yielded by a single read are consistent with each other -- if any
1349
+ # part of the read observes a transaction, all parts of the read see the
1350
+ # transaction. Strong reads are not repeatable: two consecutive strong read-only
1351
+ # transactions might return inconsistent results if there are concurrent writes.
1352
+ # If consistency across reads is required, the reads should be executed within a
1353
+ # transaction or at an exact read timestamp. Queries on change streams (see
1354
+ # below for more details) must also specify the strong read timestamp bound. See
1355
+ # TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds
1356
+ # execute reads at a user-specified timestamp. Reads at a timestamp are
1357
+ # guaranteed to see a consistent prefix of the global transaction history: they
1358
+ # observe modifications done by all transactions with a commit timestamp less
1359
+ # than or equal to the read timestamp, and observe none of the modifications
1360
+ # done by transactions with a larger commit timestamp. They will block until all
1361
+ # conflicting transactions that may be assigned commit timestamps <= the read
1362
+ # timestamp have finished. The timestamp can either be expressed as an absolute
1363
+ # Cloud Spanner commit timestamp or a staleness relative to the current time.
1364
+ # These modes do not require a "negotiation phase" to pick a timestamp. As a
1365
+ # result, they execute slightly faster than the equivalent boundedly stale
1366
+ # concurrency modes. On the other hand, boundedly stale reads usually return
1367
+ # fresher results. See TransactionOptions.ReadOnly.read_timestamp and
1368
+ # TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded
1369
+ # staleness modes allow Cloud Spanner to pick the read timestamp, subject to a
1370
+ # user-provided staleness bound. Cloud Spanner chooses the newest timestamp
1371
+ # within the staleness bound that allows execution of the reads at the closest
1372
+ # available replica without blocking. All rows yielded are consistent with each
1373
+ # other -- if any part of the read observes a transaction, all parts of the read
1374
+ # see the transaction. Boundedly stale reads are not repeatable: two stale reads,
1375
+ # even if they use the same staleness bound, can execute at different
1376
+ # timestamps and thus return inconsistent results. Boundedly stale reads execute
1377
+ # in two phases: the first phase negotiates a timestamp among all replicas
1378
+ # needed to serve the read. In the second phase, reads are executed at the
1379
+ # negotiated timestamp. As a result of the two phase execution, bounded
1380
+ # staleness reads are usually a little slower than comparable exact staleness
1381
+ # reads. However, they are typically able to return fresher results, and are
1382
+ # more likely to execute at the closest replica. Because the timestamp
1383
+ # negotiation requires up-front knowledge of which rows will be read, it can
1384
+ # only be used with single-use read-only transactions. See TransactionOptions.
1385
+ # ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old
1386
+ # read timestamps and garbage collection: Cloud Spanner continuously garbage
1387
+ # collects deleted and overwritten data in the background to reclaim storage
1388
+ # space. This process is known as "version GC". By default, version GC reclaims
1389
+ # versions after they are one hour old. Because of this, Cloud Spanner cannot
1390
+ # perform reads at read timestamps more than one hour in the past. This
1391
+ # restriction also applies to in-progress reads and/or SQL queries whose
1392
+ # timestamp become too old while executing. Reads and SQL queries with too-old
1393
+ # read timestamps fail with the error `FAILED_PRECONDITION`. You can configure
1394
+ # and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long
1395
+ # as one week, which allows Cloud Spanner to perform reads up to one week in the
1396
+ # past. Querying change Streams: A Change Stream is a schema object that can be
706
1397
  # configured to watch data changes on the entire database, a set of tables, or a
707
1398
  # set of columns in a database. When a change stream is created, Spanner
708
1399
  # automatically defines a corresponding SQL Table-Valued Function (TVF) that can
@@ -738,12 +1429,12 @@ module Google
738
1429
  # of the table. Rather, the statement is applied atomically to partitions of the
739
1430
  # table, in independent transactions. Secondary index rows are updated
740
1431
  # atomically with the base table rows. - Partitioned DML does not guarantee
741
- # exactly-once execution semantics against a partition. The statement will be
742
- # applied at least once to each partition. It is strongly recommended that the
743
- # DML statement should be idempotent to avoid unexpected results. For instance,
744
- # it is potentially dangerous to run a statement such as `UPDATE table SET
745
- # column = column + 1` as it could be run multiple times against some rows. -
746
- # The partitions are committed automatically - there is no support for Commit or
1432
+ # exactly-once execution semantics against a partition. The statement is applied
1433
+ # at least once to each partition. It is strongly recommended that the DML
1434
+ # statement should be idempotent to avoid unexpected results. For instance, it
1435
+ # is potentially dangerous to run a statement such as `UPDATE table SET column =
1436
+ # column + 1` as it could be run multiple times against some rows. - The
1437
+ # partitions are committed automatically - there is no support for Commit or
747
1438
  # Rollback. If the call returns an error, or if the client issuing the
748
1439
  # ExecuteSql call dies, it is possible that some rows had the statement executed
749
1440
  # on them successfully. It is also possible that statement was never executed
@@ -773,7 +1464,9 @@ module Google
773
1464
 
774
1465
  # Update properties of this object
775
1466
  def update!(**args)
1467
+ @max_commit_delay = args[:max_commit_delay] if args.key?(:max_commit_delay)
776
1468
  @mutations = args[:mutations] if args.key?(:mutations)
1469
+ @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
777
1470
  @request_options = args[:request_options] if args.key?(:request_options)
778
1471
  @return_commit_stats = args[:return_commit_stats] if args.key?(:return_commit_stats)
779
1472
  @single_use_transaction = args[:single_use_transaction] if args.key?(:single_use_transaction)
@@ -795,6 +1488,14 @@ module Google
795
1488
  # @return [String]
796
1489
  attr_accessor :commit_timestamp
797
1490
 
1491
+ # When a read-write transaction is executed on a multiplexed session, this
1492
+ # precommit token is sent back to the client as a part of the [Transaction]
1493
+ # message in the BeginTransaction response and also as a part of the [ResultSet]
1494
+ # and [PartialResultSet] responses.
1495
+ # Corresponds to the JSON property `precommitToken`
1496
+ # @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
1497
+ attr_accessor :precommit_token
1498
+
798
1499
  def initialize(**args)
799
1500
  update!(**args)
800
1501
  end
@@ -803,6 +1504,7 @@ module Google
803
1504
  def update!(**args)
804
1505
  @commit_stats = args[:commit_stats] if args.key?(:commit_stats)
805
1506
  @commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
1507
+ @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
806
1508
  end
807
1509
  end
808
1510
 
@@ -887,6 +1589,22 @@ module Google
887
1589
  # @return [String]
888
1590
  attr_accessor :kms_key_name
889
1591
 
1592
+ # Optional. Specifies the KMS configuration for the one or more keys used to
1593
+ # protect the backup. Values are of the form `projects//locations//keyRings//
1594
+ # cryptoKeys/`. KMS keys specified can be in any order. The keys referenced by `
1595
+ # kms_key_names` must fully cover all regions of the backup's instance
1596
+ # configuration. Some examples: * For regional (single-region) instance
1597
+ # configurations, specify a regional location KMS key. * For multi-region
1598
+ # instance configurations of type `GOOGLE_MANAGED`, either specify a multi-
1599
+ # region location KMS key or multiple regional location KMS keys that cover all
1600
+ # regions in the instance configuration. * For an instance configuration of type
1601
+ # `USER_MANAGED`, specify only regional location KMS keys to cover each region
1602
+ # in the instance configuration. Multi-region location KMS keys aren't supported
1603
+ # for `USER_MANAGED` type instance configurations.
1604
+ # Corresponds to the JSON property `kmsKeyNames`
1605
+ # @return [Array<String>]
1606
+ attr_accessor :kms_key_names
1607
+
890
1608
  def initialize(**args)
891
1609
  update!(**args)
892
1610
  end
@@ -895,6 +1613,7 @@ module Google
895
1613
  def update!(**args)
896
1614
  @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
897
1615
  @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1616
+ @kms_key_names = args[:kms_key_names] if args.key?(:kms_key_names)
898
1617
  end
899
1618
  end
900
1619
 
@@ -990,6 +1709,49 @@ module Google
990
1709
  end
991
1710
  end
992
1711
 
1712
+ # Encryption configuration for the backup to create.
1713
+ class CreateBackupEncryptionConfig
1714
+ include Google::Apis::Core::Hashable
1715
+
1716
+ # Required. The encryption type of the backup.
1717
+ # Corresponds to the JSON property `encryptionType`
1718
+ # @return [String]
1719
+ attr_accessor :encryption_type
1720
+
1721
+ # Optional. The Cloud KMS key that will be used to protect the backup. This
1722
+ # field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
1723
+ # Values are of the form `projects//locations//keyRings//cryptoKeys/`.
1724
+ # Corresponds to the JSON property `kmsKeyName`
1725
+ # @return [String]
1726
+ attr_accessor :kms_key_name
1727
+
1728
+ # Optional. Specifies the KMS configuration for the one or more keys used to
1729
+ # protect the backup. Values are of the form `projects//locations//keyRings//
1730
+ # cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all
1731
+ # regions of the backup's instance configuration. Some examples: * For regional (
1732
+ # single-region) instance configurations, specify a regional location KMS key. *
1733
+ # For multi-region instance configurations of type `GOOGLE_MANAGED`, either
1734
+ # specify a multi-region location KMS key or multiple regional location KMS keys
1735
+ # that cover all regions in the instance configuration. * For an instance
1736
+ # configuration of type `USER_MANAGED`, specify only regional location KMS keys
1737
+ # to cover each region in the instance configuration. Multi-region location KMS
1738
+ # keys aren't supported for `USER_MANAGED` type instance configurations.
1739
+ # Corresponds to the JSON property `kmsKeyNames`
1740
+ # @return [Array<String>]
1741
+ attr_accessor :kms_key_names
1742
+
1743
+ def initialize(**args)
1744
+ update!(**args)
1745
+ end
1746
+
1747
+ # Update properties of this object
1748
+ def update!(**args)
1749
+ @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
1750
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1751
+ @kms_key_names = args[:kms_key_names] if args.key?(:kms_key_names)
1752
+ end
1753
+ end
1754
+
993
1755
  # Metadata type for the operation returned by CreateBackup.
994
1756
  class CreateBackupMetadata
995
1757
  include Google::Apis::Core::Hashable
@@ -1085,6 +1847,21 @@ module Google
1085
1847
  # @return [Array<String>]
1086
1848
  attr_accessor :extra_statements
1087
1849
 
1850
+ # Optional. Proto descriptors used by `CREATE/ALTER PROTO BUNDLE` statements in '
1851
+ # extra_statements'. Contains a protobuf-serialized [`google.protobuf.
1852
+ # FileDescriptorSet`](https://github.com/protocolbuffers/protobuf/blob/main/src/
1853
+ # google/protobuf/descriptor.proto) descriptor set. To generate it, [install](
1854
+ # https://grpc.io/docs/protoc-installation/) and run `protoc` with --
1855
+ # include_imports and --descriptor_set_out. For example, to generate for moon/
1856
+ # shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \
1857
+ # --include_imports \ --descriptor_set_out=descriptors.data \ moon/shot/app.
1858
+ # proto ``` For more details, see protobuffer [self description](https://
1859
+ # developers.google.com/protocol-buffers/docs/techniques#self-description).
1860
+ # Corresponds to the JSON property `protoDescriptors`
1861
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1862
+ # @return [String]
1863
+ attr_accessor :proto_descriptors
1864
+
1088
1865
  def initialize(**args)
1089
1866
  update!(**args)
1090
1867
  end
@@ -1095,6 +1872,77 @@ module Google
1095
1872
  @database_dialect = args[:database_dialect] if args.key?(:database_dialect)
1096
1873
  @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
1097
1874
  @extra_statements = args[:extra_statements] if args.key?(:extra_statements)
1875
+ @proto_descriptors = args[:proto_descriptors] if args.key?(:proto_descriptors)
1876
+ end
1877
+ end
1878
+
1879
+ # Metadata type for the operation returned by CreateInstanceConfig.
1880
+ class CreateInstanceConfigMetadata
1881
+ include Google::Apis::Core::Hashable
1882
+
1883
+ # The time at which this operation was cancelled.
1884
+ # Corresponds to the JSON property `cancelTime`
1885
+ # @return [String]
1886
+ attr_accessor :cancel_time
1887
+
1888
+ # A possible configuration for a Cloud Spanner instance. Configurations define
1889
+ # the geographic placement of nodes and their replication.
1890
+ # Corresponds to the JSON property `instanceConfig`
1891
+ # @return [Google::Apis::SpannerV1::InstanceConfig]
1892
+ attr_accessor :instance_config
1893
+
1894
+ # Encapsulates progress related information for a Cloud Spanner long running
1895
+ # instance operations.
1896
+ # Corresponds to the JSON property `progress`
1897
+ # @return [Google::Apis::SpannerV1::InstanceOperationProgress]
1898
+ attr_accessor :progress
1899
+
1900
+ def initialize(**args)
1901
+ update!(**args)
1902
+ end
1903
+
1904
+ # Update properties of this object
1905
+ def update!(**args)
1906
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
1907
+ @instance_config = args[:instance_config] if args.key?(:instance_config)
1908
+ @progress = args[:progress] if args.key?(:progress)
1909
+ end
1910
+ end
1911
+
1912
+ # The request for CreateInstanceConfig.
1913
+ class CreateInstanceConfigRequest
1914
+ include Google::Apis::Core::Hashable
1915
+
1916
+ # A possible configuration for a Cloud Spanner instance. Configurations define
1917
+ # the geographic placement of nodes and their replication.
1918
+ # Corresponds to the JSON property `instanceConfig`
1919
+ # @return [Google::Apis::SpannerV1::InstanceConfig]
1920
+ attr_accessor :instance_config
1921
+
1922
+ # Required. The ID of the instance configuration to create. Valid identifiers
1923
+ # are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
1924
+ # characters in length. The `custom-` prefix is required to avoid name conflicts
1925
+ # with Google-managed configurations.
1926
+ # Corresponds to the JSON property `instanceConfigId`
1927
+ # @return [String]
1928
+ attr_accessor :instance_config_id
1929
+
1930
+ # An option to validate, but not actually execute, a request, and provide the
1931
+ # same response.
1932
+ # Corresponds to the JSON property `validateOnly`
1933
+ # @return [Boolean]
1934
+ attr_accessor :validate_only
1935
+ alias_method :validate_only?, :validate_only
1936
+
1937
+ def initialize(**args)
1938
+ update!(**args)
1939
+ end
1940
+
1941
+ # Update properties of this object
1942
+ def update!(**args)
1943
+ @instance_config = args[:instance_config] if args.key?(:instance_config)
1944
+ @instance_config_id = args[:instance_config_id] if args.key?(:instance_config_id)
1945
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1098
1946
  end
1099
1947
  end
1100
1948
 
@@ -1114,6 +1962,11 @@ module Google
1114
1962
  # @return [String]
1115
1963
  attr_accessor :end_time
1116
1964
 
1965
+ # The expected fulfillment period of this create operation.
1966
+ # Corresponds to the JSON property `expectedFulfillmentPeriod`
1967
+ # @return [String]
1968
+ attr_accessor :expected_fulfillment_period
1969
+
1117
1970
  # An isolated set of Cloud Spanner resources on which databases can be hosted.
1118
1971
  # Corresponds to the JSON property `instance`
1119
1972
  # @return [Google::Apis::SpannerV1::Instance]
@@ -1132,11 +1985,79 @@ module Google
1132
1985
  def update!(**args)
1133
1986
  @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
1134
1987
  @end_time = args[:end_time] if args.key?(:end_time)
1988
+ @expected_fulfillment_period = args[:expected_fulfillment_period] if args.key?(:expected_fulfillment_period)
1135
1989
  @instance = args[:instance] if args.key?(:instance)
1136
1990
  @start_time = args[:start_time] if args.key?(:start_time)
1137
1991
  end
1138
1992
  end
1139
1993
 
1994
+ # Metadata type for the operation returned by CreateInstancePartition.
1995
+ class CreateInstancePartitionMetadata
1996
+ include Google::Apis::Core::Hashable
1997
+
1998
+ # The time at which this operation was cancelled. If set, this operation is in
1999
+ # the process of undoing itself (which is guaranteed to succeed) and cannot be
2000
+ # cancelled again.
2001
+ # Corresponds to the JSON property `cancelTime`
2002
+ # @return [String]
2003
+ attr_accessor :cancel_time
2004
+
2005
+ # The time at which this operation failed or was completed successfully.
2006
+ # Corresponds to the JSON property `endTime`
2007
+ # @return [String]
2008
+ attr_accessor :end_time
2009
+
2010
+ # An isolated set of Cloud Spanner resources that databases can define
2011
+ # placements on.
2012
+ # Corresponds to the JSON property `instancePartition`
2013
+ # @return [Google::Apis::SpannerV1::InstancePartition]
2014
+ attr_accessor :instance_partition
2015
+
2016
+ # The time at which the CreateInstancePartition request was received.
2017
+ # Corresponds to the JSON property `startTime`
2018
+ # @return [String]
2019
+ attr_accessor :start_time
2020
+
2021
+ def initialize(**args)
2022
+ update!(**args)
2023
+ end
2024
+
2025
+ # Update properties of this object
2026
+ def update!(**args)
2027
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
2028
+ @end_time = args[:end_time] if args.key?(:end_time)
2029
+ @instance_partition = args[:instance_partition] if args.key?(:instance_partition)
2030
+ @start_time = args[:start_time] if args.key?(:start_time)
2031
+ end
2032
+ end
2033
+
2034
+ # The request for CreateInstancePartition.
2035
+ class CreateInstancePartitionRequest
2036
+ include Google::Apis::Core::Hashable
2037
+
2038
+ # An isolated set of Cloud Spanner resources that databases can define
2039
+ # placements on.
2040
+ # Corresponds to the JSON property `instancePartition`
2041
+ # @return [Google::Apis::SpannerV1::InstancePartition]
2042
+ attr_accessor :instance_partition
2043
+
2044
+ # Required. The ID of the instance partition to create. Valid identifiers are of
2045
+ # the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.
2046
+ # Corresponds to the JSON property `instancePartitionId`
2047
+ # @return [String]
2048
+ attr_accessor :instance_partition_id
2049
+
2050
+ def initialize(**args)
2051
+ update!(**args)
2052
+ end
2053
+
2054
+ # Update properties of this object
2055
+ def update!(**args)
2056
+ @instance_partition = args[:instance_partition] if args.key?(:instance_partition)
2057
+ @instance_partition_id = args[:instance_partition_id] if args.key?(:instance_partition_id)
2058
+ end
2059
+ end
2060
+
1140
2061
  # The request for CreateInstance.
1141
2062
  class CreateInstanceRequest
1142
2063
  include Google::Apis::Core::Hashable
@@ -1182,6 +2103,55 @@ module Google
1182
2103
  end
1183
2104
  end
1184
2105
 
2106
+ # CrontabSpec can be used to specify the version time and frequency at which the
2107
+ # backup is created.
2108
+ class CrontabSpec
2109
+ include Google::Apis::Core::Hashable
2110
+
2111
+ # Output only. Scheduled backups contain an externally consistent copy of the
2112
+ # database at the version time specified in `schedule_spec.cron_spec`. However,
2113
+ # Spanner might not initiate the creation of the scheduled backups at that
2114
+ # version time. Spanner initiates the creation of scheduled backups within the
2115
+ # time window bounded by the version_time specified in `schedule_spec.cron_spec`
2116
+ # and version_time + `creation_window`.
2117
+ # Corresponds to the JSON property `creationWindow`
2118
+ # @return [String]
2119
+ attr_accessor :creation_window
2120
+
2121
+ # Required. Textual representation of the crontab. User can customize the backup
2122
+ # frequency and the backup version time using the cron expression. The version
2123
+ # time must be in UTC timezone. The backup will contain an externally consistent
2124
+ # copy of the database at the version time. Full backups must be scheduled a
2125
+ # minimum of 12 hours apart and incremental backups must be scheduled a minimum
2126
+ # of 4 hours apart. Examples of valid cron specifications: * `0 2/12 * * *` :
2127
+ # every 12 hours at (2, 14) hours past midnight in UTC. * `0 2,14 * * *` : every
2128
+ # 12 hours at (2, 14) hours past midnight in UTC. * `0 */4 * * *` : (incremental
2129
+ # backups only) every 4 hours at (0, 4, 8, 12, 16, 20) hours past midnight in
2130
+ # UTC. * `0 2 * * *` : once a day at 2 past midnight in UTC. * `0 2 * * 0` :
2131
+ # once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * *` : once a
2132
+ # month on 8th day at 2 past midnight in UTC.
2133
+ # Corresponds to the JSON property `text`
2134
+ # @return [String]
2135
+ attr_accessor :text
2136
+
2137
+ # Output only. The time zone of the times in `CrontabSpec.text`. Currently, only
2138
+ # UTC is supported.
2139
+ # Corresponds to the JSON property `timeZone`
2140
+ # @return [String]
2141
+ attr_accessor :time_zone
2142
+
2143
+ def initialize(**args)
2144
+ update!(**args)
2145
+ end
2146
+
2147
+ # Update properties of this object
2148
+ def update!(**args)
2149
+ @creation_window = args[:creation_window] if args.key?(:creation_window)
2150
+ @text = args[:text] if args.key?(:text)
2151
+ @time_zone = args[:time_zone] if args.key?(:time_zone)
2152
+ end
2153
+ end
2154
+
1185
2155
  # A Cloud Spanner database.
1186
2156
  class Database
1187
2157
  include Google::Apis::Core::Hashable
@@ -1213,6 +2183,15 @@ module Google
1213
2183
  # @return [String]
1214
2184
  attr_accessor :earliest_version_time
1215
2185
 
2186
+ # Optional. Whether drop protection is enabled for this database. Defaults to
2187
+ # false, if not set. For more details, please see how to [prevent accidental
2188
+ # database deletion](https://cloud.google.com/spanner/docs/prevent-database-
2189
+ # deletion).
2190
+ # Corresponds to the JSON property `enableDropProtection`
2191
+ # @return [Boolean]
2192
+ attr_accessor :enable_drop_protection
2193
+ alias_method :enable_drop_protection?, :enable_drop_protection
2194
+
1216
2195
  # Encryption configuration for a Cloud Spanner database.
1217
2196
  # Corresponds to the JSON property `encryptionConfig`
1218
2197
  # @return [Google::Apis::SpannerV1::EncryptionConfig]
@@ -1220,7 +2199,7 @@ module Google
1220
2199
 
1221
2200
  # Output only. For databases that are using customer managed encryption, this
1222
2201
  # field contains the encryption information for the database, such as all Cloud
1223
- # KMS key versions that are in use. The `encryption_status' field inside of each
2202
+ # KMS key versions that are in use. The `encryption_status` field inside of each
1224
2203
  # `EncryptionInfo` is not populated. For databases that are using Google default
1225
2204
  # or other types of encryption, this field is empty. This field is propagated
1226
2205
  # lazily from the backend. There might be a delay from when a key version is
@@ -1237,6 +2216,18 @@ module Google
1237
2216
  # @return [String]
1238
2217
  attr_accessor :name
1239
2218
 
2219
+ # Information about the dual-region quorum.
2220
+ # Corresponds to the JSON property `quorumInfo`
2221
+ # @return [Google::Apis::SpannerV1::QuorumInfo]
2222
+ attr_accessor :quorum_info
2223
+
2224
+ # Output only. If true, the database is being updated. If false, there are no
2225
+ # ongoing update operations for the database.
2226
+ # Corresponds to the JSON property `reconciling`
2227
+ # @return [Boolean]
2228
+ attr_accessor :reconciling
2229
+ alias_method :reconciling?, :reconciling
2230
+
1240
2231
  # Information about the database restore.
1241
2232
  # Corresponds to the JSON property `restoreInfo`
1242
2233
  # @return [Google::Apis::SpannerV1::RestoreInfo]
@@ -1264,9 +2255,12 @@ module Google
1264
2255
  @database_dialect = args[:database_dialect] if args.key?(:database_dialect)
1265
2256
  @default_leader = args[:default_leader] if args.key?(:default_leader)
1266
2257
  @earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_time)
2258
+ @enable_drop_protection = args[:enable_drop_protection] if args.key?(:enable_drop_protection)
1267
2259
  @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
1268
2260
  @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
1269
2261
  @name = args[:name] if args.key?(:name)
2262
+ @quorum_info = args[:quorum_info] if args.key?(:quorum_info)
2263
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
1270
2264
  @restore_info = args[:restore_info] if args.key?(:restore_info)
1271
2265
  @state = args[:state] if args.key?(:state)
1272
2266
  @version_retention_period = args[:version_retention_period] if args.key?(:version_retention_period)
@@ -1294,6 +2288,45 @@ module Google
1294
2288
  end
1295
2289
  end
1296
2290
 
2291
+ # Action information extracted from a DDL statement. This proto is used to
2292
+ # display the brief info of the DDL statement for the operation
2293
+ # UpdateDatabaseDdl.
2294
+ class DdlStatementActionInfo
2295
+ include Google::Apis::Core::Hashable
2296
+
2297
+ # The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This
2298
+ # field is a non-empty string.
2299
+ # Corresponds to the JSON property `action`
2300
+ # @return [String]
2301
+ attr_accessor :action
2302
+
2303
+ # The entity name(s) being operated on the DDL statement. E.g. 1. For statement "
2304
+ # CREATE TABLE t1(...)", `entity_names` = ["t1"]. 2. For statement "GRANT ROLE
2305
+ # r1, r2 ...", `entity_names` = ["r1", "r2"]. 3. For statement "ANALYZE", `
2306
+ # entity_names` = [].
2307
+ # Corresponds to the JSON property `entityNames`
2308
+ # @return [Array<String>]
2309
+ attr_accessor :entity_names
2310
+
2311
+ # The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This
2312
+ # field can be empty string for some DDL statement, e.g. for statement "ANALYZE",
2313
+ # `entity_type` = "".
2314
+ # Corresponds to the JSON property `entityType`
2315
+ # @return [String]
2316
+ attr_accessor :entity_type
2317
+
2318
+ def initialize(**args)
2319
+ update!(**args)
2320
+ end
2321
+
2322
+ # Update properties of this object
2323
+ def update!(**args)
2324
+ @action = args[:action] if args.key?(:action)
2325
+ @entity_names = args[:entity_names] if args.key?(:entity_names)
2326
+ @entity_type = args[:entity_type] if args.key?(:entity_type)
2327
+ end
2328
+ end
2329
+
1297
2330
  # Arguments to delete operations.
1298
2331
  class Delete
1299
2332
  include Google::Apis::Core::Hashable
@@ -1394,11 +2427,54 @@ module Google
1394
2427
 
1395
2428
  # Update properties of this object
1396
2429
  def update!(**args)
1397
- @info = args[:info] if args.key?(:info)
1398
- @metric = args[:metric] if args.key?(:metric)
1399
- @metric_specific = args[:metric_specific] if args.key?(:metric_specific)
1400
- @severity = args[:severity] if args.key?(:severity)
1401
- @short_message = args[:short_message] if args.key?(:short_message)
2430
+ @info = args[:info] if args.key?(:info)
2431
+ @metric = args[:metric] if args.key?(:metric)
2432
+ @metric_specific = args[:metric_specific] if args.key?(:metric_specific)
2433
+ @severity = args[:severity] if args.key?(:severity)
2434
+ @short_message = args[:short_message] if args.key?(:short_message)
2435
+ end
2436
+ end
2437
+
2438
+ # The DirectedReadOptions can be used to indicate which replicas or regions
2439
+ # should be used for non-transactional reads or queries. DirectedReadOptions may
2440
+ # only be specified for a read-only transaction, otherwise the API will return
2441
+ # an `INVALID_ARGUMENT` error.
2442
+ class DirectedReadOptions
2443
+ include Google::Apis::Core::Hashable
2444
+
2445
+ # An ExcludeReplicas contains a repeated set of ReplicaSelection that should be
2446
+ # excluded from serving requests.
2447
+ # Corresponds to the JSON property `excludeReplicas`
2448
+ # @return [Google::Apis::SpannerV1::ExcludeReplicas]
2449
+ attr_accessor :exclude_replicas
2450
+
2451
+ # An IncludeReplicas contains a repeated set of ReplicaSelection which indicates
2452
+ # the order in which replicas should be considered.
2453
+ # Corresponds to the JSON property `includeReplicas`
2454
+ # @return [Google::Apis::SpannerV1::IncludeReplicas]
2455
+ attr_accessor :include_replicas
2456
+
2457
+ def initialize(**args)
2458
+ update!(**args)
2459
+ end
2460
+
2461
+ # Update properties of this object
2462
+ def update!(**args)
2463
+ @exclude_replicas = args[:exclude_replicas] if args.key?(:exclude_replicas)
2464
+ @include_replicas = args[:include_replicas] if args.key?(:include_replicas)
2465
+ end
2466
+ end
2467
+
2468
+ # Message type for a dual-region quorum. Currently this type has no options.
2469
+ class DualRegionQuorum
2470
+ include Google::Apis::Core::Hashable
2471
+
2472
+ def initialize(**args)
2473
+ update!(**args)
2474
+ end
2475
+
2476
+ # Update properties of this object
2477
+ def update!(**args)
1402
2478
  end
1403
2479
  end
1404
2480
 
@@ -1428,6 +2504,21 @@ module Google
1428
2504
  # @return [String]
1429
2505
  attr_accessor :kms_key_name
1430
2506
 
2507
+ # Specifies the KMS configuration for one or more keys used to encrypt the
2508
+ # database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
2509
+ # The keys referenced by `kms_key_names` must fully cover all regions of the
2510
+ # database's instance configuration. Some examples: * For regional (single-
2511
+ # region) instance configurations, specify a regional location KMS key. * For
2512
+ # multi-region instance configurations of type `GOOGLE_MANAGED`, either specify
2513
+ # a multi-region location KMS key or multiple regional location KMS keys that
2514
+ # cover all regions in the instance configuration. * For an instance
2515
+ # configuration of type `USER_MANAGED`, specify only regional location KMS keys
2516
+ # to cover each region in the instance configuration. Multi-region location KMS
2517
+ # keys aren't supported for `USER_MANAGED` type instance configurations.
2518
+ # Corresponds to the JSON property `kmsKeyNames`
2519
+ # @return [Array<String>]
2520
+ attr_accessor :kms_key_names
2521
+
1431
2522
  def initialize(**args)
1432
2523
  update!(**args)
1433
2524
  end
@@ -1435,6 +2526,7 @@ module Google
1435
2526
  # Update properties of this object
1436
2527
  def update!(**args)
1437
2528
  @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
2529
+ @kms_key_names = args[:kms_key_names] if args.key?(:kms_key_names)
1438
2530
  end
1439
2531
  end
1440
2532
 
@@ -1475,10 +2567,42 @@ module Google
1475
2567
  end
1476
2568
  end
1477
2569
 
2570
+ # An ExcludeReplicas contains a repeated set of ReplicaSelection that should be
2571
+ # excluded from serving requests.
2572
+ class ExcludeReplicas
2573
+ include Google::Apis::Core::Hashable
2574
+
2575
+ # The directed read replica selector.
2576
+ # Corresponds to the JSON property `replicaSelections`
2577
+ # @return [Array<Google::Apis::SpannerV1::ReplicaSelection>]
2578
+ attr_accessor :replica_selections
2579
+
2580
+ def initialize(**args)
2581
+ update!(**args)
2582
+ end
2583
+
2584
+ # Update properties of this object
2585
+ def update!(**args)
2586
+ @replica_selections = args[:replica_selections] if args.key?(:replica_selections)
2587
+ end
2588
+ end
2589
+
1478
2590
  # The request for ExecuteBatchDml.
1479
2591
  class ExecuteBatchDmlRequest
1480
2592
  include Google::Apis::Core::Hashable
1481
2593
 
2594
+ # Optional. If set to true, this request marks the end of the transaction. The
2595
+ # transaction should be committed or aborted after these statements execute, and
2596
+ # attempts to execute any other requests against this transaction (including
2597
+ # reads and queries) will be rejected. Setting this option may cause some error
2598
+ # reporting to be deferred until commit time (e.g. validation of unique
2599
+ # constraints). Given this, successful execution of statements should not be
2600
+ # assumed until a subsequent Commit call completes successfully.
2601
+ # Corresponds to the JSON property `lastStatements`
2602
+ # @return [Boolean]
2603
+ attr_accessor :last_statements
2604
+ alias_method :last_statements?, :last_statements
2605
+
1482
2606
  # Common request options for various APIs.
1483
2607
  # Corresponds to the JSON property `requestOptions`
1484
2608
  # @return [Google::Apis::SpannerV1::RequestOptions]
@@ -1516,6 +2640,7 @@ module Google
1516
2640
 
1517
2641
  # Update properties of this object
1518
2642
  def update!(**args)
2643
+ @last_statements = args[:last_statements] if args.key?(:last_statements)
1519
2644
  @request_options = args[:request_options] if args.key?(:request_options)
1520
2645
  @seqno = args[:seqno] if args.key?(:seqno)
1521
2646
  @statements = args[:statements] if args.key?(:statements)
@@ -1540,6 +2665,14 @@ module Google
1540
2665
  class ExecuteBatchDmlResponse
1541
2666
  include Google::Apis::Core::Hashable
1542
2667
 
2668
+ # When a read-write transaction is executed on a multiplexed session, this
2669
+ # precommit token is sent back to the client as a part of the [Transaction]
2670
+ # message in the BeginTransaction response and also as a part of the [ResultSet]
2671
+ # and [PartialResultSet] responses.
2672
+ # Corresponds to the JSON property `precommitToken`
2673
+ # @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
2674
+ attr_accessor :precommit_token
2675
+
1543
2676
  # One ResultSet for each statement in the request that ran successfully, in the
1544
2677
  # same order as the statements in the request. Each ResultSet does not contain
1545
2678
  # any rows. The ResultSetStats in each ResultSet contain the number of rows
@@ -1565,6 +2698,7 @@ module Google
1565
2698
 
1566
2699
  # Update properties of this object
1567
2700
  def update!(**args)
2701
+ @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
1568
2702
  @result_sets = args[:result_sets] if args.key?(:result_sets)
1569
2703
  @status = args[:status] if args.key?(:status)
1570
2704
  end
@@ -1574,6 +2708,36 @@ module Google
1574
2708
  class ExecuteSqlRequest
1575
2709
  include Google::Apis::Core::Hashable
1576
2710
 
2711
+ # If this is for a partitioned query and this field is set to `true`, the
2712
+ # request is executed with Spanner Data Boost independent compute resources. If
2713
+ # the field is set to `true` but the request does not set `partition_token`, the
2714
+ # API returns an `INVALID_ARGUMENT` error.
2715
+ # Corresponds to the JSON property `dataBoostEnabled`
2716
+ # @return [Boolean]
2717
+ attr_accessor :data_boost_enabled
2718
+ alias_method :data_boost_enabled?, :data_boost_enabled
2719
+
2720
+ # The DirectedReadOptions can be used to indicate which replicas or regions
2721
+ # should be used for non-transactional reads or queries. DirectedReadOptions may
2722
+ # only be specified for a read-only transaction, otherwise the API will return
2723
+ # an `INVALID_ARGUMENT` error.
2724
+ # Corresponds to the JSON property `directedReadOptions`
2725
+ # @return [Google::Apis::SpannerV1::DirectedReadOptions]
2726
+ attr_accessor :directed_read_options
2727
+
2728
+ # Optional. If set to true, this statement marks the end of the transaction. The
2729
+ # transaction should be committed or aborted after this statement executes, and
2730
+ # attempts to execute any other requests against this transaction (including
2731
+ # reads and queries) will be rejected. For DML statements, setting this option
2732
+ # may cause some error reporting to be deferred until commit time (e.g.
2733
+ # validation of unique constraints). Given this, successful execution of a DML
2734
+ # statement should not be assumed until a subsequent Commit call completes
2735
+ # successfully.
2736
+ # Corresponds to the JSON property `lastStatement`
2737
+ # @return [Boolean]
2738
+ attr_accessor :last_statement
2739
+ alias_method :last_statement?, :last_statement
2740
+
1577
2741
  # It is not always possible for Cloud Spanner to infer the right SQL type from a
1578
2742
  # JSON value. For example, values of type `BYTES` and values of type `STRING`
1579
2743
  # both appear in params as JSON strings. In these cases, `param_types` can be
@@ -1658,6 +2822,9 @@ module Google
1658
2822
 
1659
2823
  # Update properties of this object
1660
2824
  def update!(**args)
2825
+ @data_boost_enabled = args[:data_boost_enabled] if args.key?(:data_boost_enabled)
2826
+ @directed_read_options = args[:directed_read_options] if args.key?(:directed_read_options)
2827
+ @last_statement = args[:last_statement] if args.key?(:last_statement)
1661
2828
  @param_types = args[:param_types] if args.key?(:param_types)
1662
2829
  @params = args[:params] if args.key?(:params)
1663
2830
  @partition_token = args[:partition_token] if args.key?(:partition_token)
@@ -1793,10 +2960,34 @@ module Google
1793
2960
  end
1794
2961
  end
1795
2962
 
2963
+ # The specification for full backups. A full backup stores the entire contents
2964
+ # of the database at a given version time.
2965
+ class FullBackupSpec
2966
+ include Google::Apis::Core::Hashable
2967
+
2968
+ def initialize(**args)
2969
+ update!(**args)
2970
+ end
2971
+
2972
+ # Update properties of this object
2973
+ def update!(**args)
2974
+ end
2975
+ end
2976
+
1796
2977
  # The response for GetDatabaseDdl.
1797
2978
  class GetDatabaseDdlResponse
1798
2979
  include Google::Apis::Core::Hashable
1799
2980
 
2981
+ # Proto descriptors stored in the database. Contains a protobuf-serialized [
2982
+ # google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/
2983
+ # blob/main/src/google/protobuf/descriptor.proto). For more details, see
2984
+ # protobuffer [self description](https://developers.google.com/protocol-buffers/
2985
+ # docs/techniques#self-description).
2986
+ # Corresponds to the JSON property `protoDescriptors`
2987
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
2988
+ # @return [String]
2989
+ attr_accessor :proto_descriptors
2990
+
1800
2991
  # A list of formatted DDL statements defining the schema of the database
1801
2992
  # specified in the request.
1802
2993
  # Corresponds to the JSON property `statements`
@@ -1809,6 +3000,7 @@ module Google
1809
3000
 
1810
3001
  # Update properties of this object
1811
3002
  def update!(**args)
3003
+ @proto_descriptors = args[:proto_descriptors] if args.key?(:proto_descriptors)
1812
3004
  @statements = args[:statements] if args.key?(:statements)
1813
3005
  end
1814
3006
  end
@@ -1860,6 +3052,79 @@ module Google
1860
3052
  end
1861
3053
  end
1862
3054
 
3055
+ # An IncludeReplicas contains a repeated set of ReplicaSelection which indicates
3056
+ # the order in which replicas should be considered.
3057
+ class IncludeReplicas
3058
+ include Google::Apis::Core::Hashable
3059
+
3060
+ # If true, Spanner will not route requests to a replica outside the
3061
+ # include_replicas list when all of the specified replicas are unavailable or
3062
+ # unhealthy. Default value is `false`.
3063
+ # Corresponds to the JSON property `autoFailoverDisabled`
3064
+ # @return [Boolean]
3065
+ attr_accessor :auto_failover_disabled
3066
+ alias_method :auto_failover_disabled?, :auto_failover_disabled
3067
+
3068
+ # The directed read replica selector.
3069
+ # Corresponds to the JSON property `replicaSelections`
3070
+ # @return [Array<Google::Apis::SpannerV1::ReplicaSelection>]
3071
+ attr_accessor :replica_selections
3072
+
3073
+ def initialize(**args)
3074
+ update!(**args)
3075
+ end
3076
+
3077
+ # Update properties of this object
3078
+ def update!(**args)
3079
+ @auto_failover_disabled = args[:auto_failover_disabled] if args.key?(:auto_failover_disabled)
3080
+ @replica_selections = args[:replica_selections] if args.key?(:replica_selections)
3081
+ end
3082
+ end
3083
+
3084
+ # The specification for incremental backup chains. An incremental backup stores
3085
+ # the delta of changes between a previous backup and the database contents at a
3086
+ # given version time. An incremental backup chain consists of a full backup and
3087
+ # zero or more successive incremental backups. The first backup created for an
3088
+ # incremental backup chain is always a full backup.
3089
+ class IncrementalBackupSpec
3090
+ include Google::Apis::Core::Hashable
3091
+
3092
+ def initialize(**args)
3093
+ update!(**args)
3094
+ end
3095
+
3096
+ # Update properties of this object
3097
+ def update!(**args)
3098
+ end
3099
+ end
3100
+
3101
+ # Recommendation to add new indexes to run queries more efficiently.
3102
+ class IndexAdvice
3103
+ include Google::Apis::Core::Hashable
3104
+
3105
+ # Optional. DDL statements to add new indexes that will improve the query.
3106
+ # Corresponds to the JSON property `ddl`
3107
+ # @return [Array<String>]
3108
+ attr_accessor :ddl
3109
+
3110
+ # Optional. Estimated latency improvement factor. For example if the query
3111
+ # currently takes 500 ms to run and the estimated latency with new indexes is
3112
+ # 100 ms this field will be 5.
3113
+ # Corresponds to the JSON property `improvementFactor`
3114
+ # @return [Float]
3115
+ attr_accessor :improvement_factor
3116
+
3117
+ def initialize(**args)
3118
+ update!(**args)
3119
+ end
3120
+
3121
+ # Update properties of this object
3122
+ def update!(**args)
3123
+ @ddl = args[:ddl] if args.key?(:ddl)
3124
+ @improvement_factor = args[:improvement_factor] if args.key?(:improvement_factor)
3125
+ end
3126
+ end
3127
+
1863
3128
  # A message representing a (sparse) collection of hot keys for specific key
1864
3129
  # buckets.
1865
3130
  class IndexedHotKey
@@ -1907,6 +3172,11 @@ module Google
1907
3172
  class Instance
1908
3173
  include Google::Apis::Core::Hashable
1909
3174
 
3175
+ # Autoscaling configuration for an instance.
3176
+ # Corresponds to the JSON property `autoscalingConfig`
3177
+ # @return [Google::Apis::SpannerV1::AutoscalingConfig]
3178
+ attr_accessor :autoscaling_config
3179
+
1910
3180
  # Required. The name of the instance's configuration. Values are of the form `
1911
3181
  # projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.
1912
3182
  # Corresponds to the JSON property `config`
@@ -1918,12 +3188,29 @@ module Google
1918
3188
  # @return [String]
1919
3189
  attr_accessor :create_time
1920
3190
 
3191
+ # Optional. Controls the default backup schedule behavior for new databases
3192
+ # within the instance. By default, a backup schedule is created automatically
3193
+ # when a new database is created in a new instance. Note that the `AUTOMATIC`
3194
+ # value isn't permitted for free instances, as backups and backup schedules aren'
3195
+ # t supported for free instances. In the `GetInstance` or `ListInstances`
3196
+ # response, if the value of `default_backup_schedule_type` isn't set, or set to `
3197
+ # NONE`, Spanner doesn't create a default backup schedule for new databases in
3198
+ # the instance.
3199
+ # Corresponds to the JSON property `defaultBackupScheduleType`
3200
+ # @return [String]
3201
+ attr_accessor :default_backup_schedule_type
3202
+
1921
3203
  # Required. The descriptive name for this instance as it appears in UIs. Must be
1922
3204
  # unique per project and between 4 and 30 characters in length.
1923
3205
  # Corresponds to the JSON property `displayName`
1924
3206
  # @return [String]
1925
3207
  attr_accessor :display_name
1926
3208
 
3209
+ # Optional. The `Edition` of the current instance.
3210
+ # Corresponds to the JSON property `edition`
3211
+ # @return [String]
3212
+ attr_accessor :edition
3213
+
1927
3214
  # Deprecated. This field is not populated.
1928
3215
  # Corresponds to the JSON property `endpointUris`
1929
3216
  # @return [Array<String>]
@@ -1960,40 +3247,340 @@ module Google
1960
3247
  # @return [Hash<String,String>]
1961
3248
  attr_accessor :labels
1962
3249
 
1963
- # Required. A unique identifier for the instance, which cannot be changed after
1964
- # the instance is created. Values are of the form `projects//instances/a-z*[a-z0-
1965
- # 9]`. The final segment of the name must be between 2 and 64 characters in
1966
- # length.
3250
+ # Required. A unique identifier for the instance, which cannot be changed after
3251
+ # the instance is created. Values are of the form `projects//instances/a-z*[a-z0-
3252
+ # 9]`. The final segment of the name must be between 2 and 64 characters in
3253
+ # length.
3254
+ # Corresponds to the JSON property `name`
3255
+ # @return [String]
3256
+ attr_accessor :name
3257
+
3258
+ # The number of nodes allocated to this instance. At most, one of either `
3259
+ # node_count` or `processing_units` should be present in the message. Users can
3260
+ # set the `node_count` field to specify the target number of nodes allocated to
3261
+ # the instance. If autoscaling is enabled, `node_count` is treated as an `
3262
+ # OUTPUT_ONLY` field and reflects the current number of nodes allocated to the
3263
+ # instance. This might be zero in API responses for instances that are not yet
3264
+ # in the `READY` state. If the instance has varying node count across replicas (
3265
+ # achieved by setting `asymmetric_autoscaling_options` in the autoscaling
3266
+ # configuration), the `node_count` set here is the maximum node count across all
3267
+ # replicas. For more information, see [Compute capacity, nodes, and processing
3268
+ # units](https://cloud.google.com/spanner/docs/compute-capacity).
3269
+ # Corresponds to the JSON property `nodeCount`
3270
+ # @return [Fixnum]
3271
+ attr_accessor :node_count
3272
+
3273
+ # The number of processing units allocated to this instance. At most, one of
3274
+ # either `processing_units` or `node_count` should be present in the message.
3275
+ # Users can set the `processing_units` field to specify the target number of
3276
+ # processing units allocated to the instance. If autoscaling is enabled, `
3277
+ # processing_units` is treated as an `OUTPUT_ONLY` field and reflects the
3278
+ # current number of processing units allocated to the instance. This might be
3279
+ # zero in API responses for instances that are not yet in the `READY` state. If
3280
+ # the instance has varying processing units per replica (achieved by setting `
3281
+ # asymmetric_autoscaling_options` in the autoscaling configuration), the `
3282
+ # processing_units` set here is the maximum processing units across all replicas.
3283
+ # For more information, see [Compute capacity, nodes and processing units](
3284
+ # https://cloud.google.com/spanner/docs/compute-capacity).
3285
+ # Corresponds to the JSON property `processingUnits`
3286
+ # @return [Fixnum]
3287
+ attr_accessor :processing_units
3288
+
3289
+ # Output only. Lists the compute capacity per ReplicaSelection. A replica
3290
+ # selection identifies a set of replicas with common properties. Replicas
3291
+ # identified by a ReplicaSelection are scaled with the same compute capacity.
3292
+ # Corresponds to the JSON property `replicaComputeCapacity`
3293
+ # @return [Array<Google::Apis::SpannerV1::ReplicaComputeCapacity>]
3294
+ attr_accessor :replica_compute_capacity
3295
+
3296
+ # Output only. The current instance state. For CreateInstance, the state must be
3297
+ # either omitted or set to `CREATING`. For UpdateInstance, the state must be
3298
+ # either omitted or set to `READY`.
3299
+ # Corresponds to the JSON property `state`
3300
+ # @return [String]
3301
+ attr_accessor :state
3302
+
3303
+ # Output only. The time at which the instance was most recently updated.
3304
+ # Corresponds to the JSON property `updateTime`
3305
+ # @return [String]
3306
+ attr_accessor :update_time
3307
+
3308
+ def initialize(**args)
3309
+ update!(**args)
3310
+ end
3311
+
3312
+ # Update properties of this object
3313
+ def update!(**args)
3314
+ @autoscaling_config = args[:autoscaling_config] if args.key?(:autoscaling_config)
3315
+ @config = args[:config] if args.key?(:config)
3316
+ @create_time = args[:create_time] if args.key?(:create_time)
3317
+ @default_backup_schedule_type = args[:default_backup_schedule_type] if args.key?(:default_backup_schedule_type)
3318
+ @display_name = args[:display_name] if args.key?(:display_name)
3319
+ @edition = args[:edition] if args.key?(:edition)
3320
+ @endpoint_uris = args[:endpoint_uris] if args.key?(:endpoint_uris)
3321
+ @free_instance_metadata = args[:free_instance_metadata] if args.key?(:free_instance_metadata)
3322
+ @instance_type = args[:instance_type] if args.key?(:instance_type)
3323
+ @labels = args[:labels] if args.key?(:labels)
3324
+ @name = args[:name] if args.key?(:name)
3325
+ @node_count = args[:node_count] if args.key?(:node_count)
3326
+ @processing_units = args[:processing_units] if args.key?(:processing_units)
3327
+ @replica_compute_capacity = args[:replica_compute_capacity] if args.key?(:replica_compute_capacity)
3328
+ @state = args[:state] if args.key?(:state)
3329
+ @update_time = args[:update_time] if args.key?(:update_time)
3330
+ end
3331
+ end
3332
+
3333
+ # A possible configuration for a Cloud Spanner instance. Configurations define
3334
+ # the geographic placement of nodes and their replication.
3335
+ class InstanceConfig
3336
+ include Google::Apis::Core::Hashable
3337
+
3338
+ # Base configuration name, e.g. projects//instanceConfigs/nam3, based on which
3339
+ # this configuration is created. Only set for user-managed configurations. `
3340
+ # base_config` must refer to a configuration of type `GOOGLE_MANAGED` in the
3341
+ # same project as this configuration.
3342
+ # Corresponds to the JSON property `baseConfig`
3343
+ # @return [String]
3344
+ attr_accessor :base_config
3345
+
3346
+ # Output only. Whether this instance configuration is a Google-managed or user-
3347
+ # managed configuration.
3348
+ # Corresponds to the JSON property `configType`
3349
+ # @return [String]
3350
+ attr_accessor :config_type
3351
+
3352
+ # The name of this instance configuration as it appears in UIs.
3353
+ # Corresponds to the JSON property `displayName`
3354
+ # @return [String]
3355
+ attr_accessor :display_name
3356
+
3357
+ # etag is used for optimistic concurrency control as a way to help prevent
3358
+ # simultaneous updates of a instance configuration from overwriting each other.
3359
+ # It is strongly suggested that systems make use of the etag in the read-modify-
3360
+ # write cycle to perform instance configuration updates in order to avoid race
3361
+ # conditions: An etag is returned in the response which contains instance
3362
+ # configurations, and systems are expected to put that etag in the request to
3363
+ # update instance configuration to ensure that their change is applied to the
3364
+ # same version of the instance configuration. If no etag is provided in the call
3365
+ # to update the instance configuration, then the existing instance configuration
3366
+ # is overwritten blindly.
3367
+ # Corresponds to the JSON property `etag`
3368
+ # @return [String]
3369
+ attr_accessor :etag
3370
+
3371
+ # Output only. Describes whether free instances are available to be created in
3372
+ # this instance configuration.
3373
+ # Corresponds to the JSON property `freeInstanceAvailability`
3374
+ # @return [String]
3375
+ attr_accessor :free_instance_availability
3376
+
3377
+ # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
3378
+ # resources into groups that reflect a customer's organizational needs and
3379
+ # deployment strategies. Cloud Labels can be used to filter collections of
3380
+ # resources. They can be used to control how resource metrics are aggregated.
3381
+ # And they can be used as arguments to policy management rules (e.g. route,
3382
+ # firewall, load balancing, etc.). * Label keys must be between 1 and 63
3383
+ # characters long and must conform to the following regular expression: `a-z`0,
3384
+ # 62``. * Label values must be between 0 and 63 characters long and must conform
3385
+ # to the regular expression `[a-z0-9_-]`0,63``. * No more than 64 labels can be
3386
+ # associated with a given resource. See https://goo.gl/xmQnxf for more
3387
+ # information on and examples of labels. If you plan to use labels in your own
3388
+ # code, please note that additional characters may be allowed in the future.
3389
+ # Therefore, you are advised to use an internal label representation, such as
3390
+ # JSON, which doesn't rely upon specific characters being disallowed. For
3391
+ # example, representing labels as the string: name + "_" + value would prove
3392
+ # problematic if we were to allow "_" in a future release.
3393
+ # Corresponds to the JSON property `labels`
3394
+ # @return [Hash<String,String>]
3395
+ attr_accessor :labels
3396
+
3397
+ # Allowed values of the "default_leader" schema option for databases in
3398
+ # instances that use this instance configuration.
3399
+ # Corresponds to the JSON property `leaderOptions`
3400
+ # @return [Array<String>]
3401
+ attr_accessor :leader_options
3402
+
3403
+ # A unique identifier for the instance configuration. Values are of the form `
3404
+ # projects//instanceConfigs/a-z*`. User instance configuration must start with `
3405
+ # custom-`.
3406
+ # Corresponds to the JSON property `name`
3407
+ # @return [String]
3408
+ attr_accessor :name
3409
+
3410
+ # Output only. The available optional replicas to choose from for user-managed
3411
+ # configurations. Populated for Google-managed configurations.
3412
+ # Corresponds to the JSON property `optionalReplicas`
3413
+ # @return [Array<Google::Apis::SpannerV1::ReplicaInfo>]
3414
+ attr_accessor :optional_replicas
3415
+
3416
+ # Output only. The `QuorumType` of the instance configuration.
3417
+ # Corresponds to the JSON property `quorumType`
3418
+ # @return [String]
3419
+ attr_accessor :quorum_type
3420
+
3421
+ # Output only. If true, the instance configuration is being created or updated.
3422
+ # If false, there are no ongoing operations for the instance configuration.
3423
+ # Corresponds to the JSON property `reconciling`
3424
+ # @return [Boolean]
3425
+ attr_accessor :reconciling
3426
+ alias_method :reconciling?, :reconciling
3427
+
3428
+ # The geographic placement of nodes in this instance configuration and their
3429
+ # replication properties. To create user-managed configurations, input `replicas`
3430
+ # must include all replicas in `replicas` of the `base_config` and include one
3431
+ # or more replicas in the `optional_replicas` of the `base_config`.
3432
+ # Corresponds to the JSON property `replicas`
3433
+ # @return [Array<Google::Apis::SpannerV1::ReplicaInfo>]
3434
+ attr_accessor :replicas
3435
+
3436
+ # Output only. The current instance configuration state. Applicable only for `
3437
+ # USER_MANAGED` configurations.
3438
+ # Corresponds to the JSON property `state`
3439
+ # @return [String]
3440
+ attr_accessor :state
3441
+
3442
+ # Output only. The storage limit in bytes per processing unit.
3443
+ # Corresponds to the JSON property `storageLimitPerProcessingUnit`
3444
+ # @return [Fixnum]
3445
+ attr_accessor :storage_limit_per_processing_unit
3446
+
3447
+ def initialize(**args)
3448
+ update!(**args)
3449
+ end
3450
+
3451
+ # Update properties of this object
3452
+ def update!(**args)
3453
+ @base_config = args[:base_config] if args.key?(:base_config)
3454
+ @config_type = args[:config_type] if args.key?(:config_type)
3455
+ @display_name = args[:display_name] if args.key?(:display_name)
3456
+ @etag = args[:etag] if args.key?(:etag)
3457
+ @free_instance_availability = args[:free_instance_availability] if args.key?(:free_instance_availability)
3458
+ @labels = args[:labels] if args.key?(:labels)
3459
+ @leader_options = args[:leader_options] if args.key?(:leader_options)
3460
+ @name = args[:name] if args.key?(:name)
3461
+ @optional_replicas = args[:optional_replicas] if args.key?(:optional_replicas)
3462
+ @quorum_type = args[:quorum_type] if args.key?(:quorum_type)
3463
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
3464
+ @replicas = args[:replicas] if args.key?(:replicas)
3465
+ @state = args[:state] if args.key?(:state)
3466
+ @storage_limit_per_processing_unit = args[:storage_limit_per_processing_unit] if args.key?(:storage_limit_per_processing_unit)
3467
+ end
3468
+ end
3469
+
3470
+ # Encapsulates progress related information for a Cloud Spanner long running
3471
+ # instance operations.
3472
+ class InstanceOperationProgress
3473
+ include Google::Apis::Core::Hashable
3474
+
3475
+ # If set, the time at which this operation failed or was completed successfully.
3476
+ # Corresponds to the JSON property `endTime`
3477
+ # @return [String]
3478
+ attr_accessor :end_time
3479
+
3480
+ # Percent completion of the operation. Values are between 0 and 100 inclusive.
3481
+ # Corresponds to the JSON property `progressPercent`
3482
+ # @return [Fixnum]
3483
+ attr_accessor :progress_percent
3484
+
3485
+ # Time the request was received.
3486
+ # Corresponds to the JSON property `startTime`
3487
+ # @return [String]
3488
+ attr_accessor :start_time
3489
+
3490
+ def initialize(**args)
3491
+ update!(**args)
3492
+ end
3493
+
3494
+ # Update properties of this object
3495
+ def update!(**args)
3496
+ @end_time = args[:end_time] if args.key?(:end_time)
3497
+ @progress_percent = args[:progress_percent] if args.key?(:progress_percent)
3498
+ @start_time = args[:start_time] if args.key?(:start_time)
3499
+ end
3500
+ end
3501
+
3502
+ # An isolated set of Cloud Spanner resources that databases can define
3503
+ # placements on.
3504
+ class InstancePartition
3505
+ include Google::Apis::Core::Hashable
3506
+
3507
+ # Required. The name of the instance partition's configuration. Values are of
3508
+ # the form `projects//instanceConfigs/`. See also InstanceConfig and
3509
+ # ListInstanceConfigs.
3510
+ # Corresponds to the JSON property `config`
3511
+ # @return [String]
3512
+ attr_accessor :config
3513
+
3514
+ # Output only. The time at which the instance partition was created.
3515
+ # Corresponds to the JSON property `createTime`
3516
+ # @return [String]
3517
+ attr_accessor :create_time
3518
+
3519
+ # Required. The descriptive name for this instance partition as it appears in
3520
+ # UIs. Must be unique per project and between 4 and 30 characters in length.
3521
+ # Corresponds to the JSON property `displayName`
3522
+ # @return [String]
3523
+ attr_accessor :display_name
3524
+
3525
+ # Used for optimistic concurrency control as a way to help prevent simultaneous
3526
+ # updates of a instance partition from overwriting each other. It is strongly
3527
+ # suggested that systems make use of the etag in the read-modify-write cycle to
3528
+ # perform instance partition updates in order to avoid race conditions: An etag
3529
+ # is returned in the response which contains instance partitions, and systems
3530
+ # are expected to put that etag in the request to update instance partitions to
3531
+ # ensure that their change will be applied to the same version of the instance
3532
+ # partition. If no etag is provided in the call to update instance partition,
3533
+ # then the existing instance partition is overwritten blindly.
3534
+ # Corresponds to the JSON property `etag`
3535
+ # @return [String]
3536
+ attr_accessor :etag
3537
+
3538
+ # Required. A unique identifier for the instance partition. Values are of the
3539
+ # form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment
3540
+ # of the name must be between 2 and 64 characters in length. An instance
3541
+ # partition's name cannot be changed after the instance partition is created.
1967
3542
  # Corresponds to the JSON property `name`
1968
3543
  # @return [String]
1969
3544
  attr_accessor :name
1970
3545
 
1971
- # The number of nodes allocated to this instance. At most one of either
1972
- # node_count or processing_units should be present in the message. This may be
1973
- # zero in API responses for instances that are not yet in state `READY`. See [
1974
- # the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for
1975
- # more information about nodes and processing units.
3546
+ # The number of nodes allocated to this instance partition. Users can set the `
3547
+ # node_count` field to specify the target number of nodes allocated to the
3548
+ # instance partition. This may be zero in API responses for instance partitions
3549
+ # that are not yet in state `READY`.
1976
3550
  # Corresponds to the JSON property `nodeCount`
1977
3551
  # @return [Fixnum]
1978
3552
  attr_accessor :node_count
1979
3553
 
1980
- # The number of processing units allocated to this instance. At most one of
1981
- # processing_units or node_count should be present in the message. This may be
1982
- # zero in API responses for instances that are not yet in state `READY`. See [
1983
- # the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for
1984
- # more information about nodes and processing units.
3554
+ # The number of processing units allocated to this instance partition. Users can
3555
+ # set the `processing_units` field to specify the target number of processing
3556
+ # units allocated to the instance partition. This might be zero in API responses
3557
+ # for instance partitions that are not yet in the `READY` state.
1985
3558
  # Corresponds to the JSON property `processingUnits`
1986
3559
  # @return [Fixnum]
1987
3560
  attr_accessor :processing_units
1988
3561
 
1989
- # Output only. The current instance state. For CreateInstance, the state must be
1990
- # either omitted or set to `CREATING`. For UpdateInstance, the state must be
1991
- # either omitted or set to `READY`.
3562
+ # Output only. Deprecated: This field is not populated. Output only. The names
3563
+ # of the backups that reference this instance partition. Referencing backups
3564
+ # should share the parent instance. The existence of any referencing backup
3565
+ # prevents the instance partition from being deleted.
3566
+ # Corresponds to the JSON property `referencingBackups`
3567
+ # @return [Array<String>]
3568
+ attr_accessor :referencing_backups
3569
+
3570
+ # Output only. The names of the databases that reference this instance partition.
3571
+ # Referencing databases should share the parent instance. The existence of any
3572
+ # referencing database prevents the instance partition from being deleted.
3573
+ # Corresponds to the JSON property `referencingDatabases`
3574
+ # @return [Array<String>]
3575
+ attr_accessor :referencing_databases
3576
+
3577
+ # Output only. The current instance partition state.
1992
3578
  # Corresponds to the JSON property `state`
1993
3579
  # @return [String]
1994
3580
  attr_accessor :state
1995
3581
 
1996
- # Output only. The time at which the instance was most recently updated.
3582
+ # Output only. The time at which the instance partition was most recently
3583
+ # updated.
1997
3584
  # Corresponds to the JSON property `updateTime`
1998
3585
  # @return [String]
1999
3586
  attr_accessor :update_time
@@ -2007,51 +3594,44 @@ module Google
2007
3594
  @config = args[:config] if args.key?(:config)
2008
3595
  @create_time = args[:create_time] if args.key?(:create_time)
2009
3596
  @display_name = args[:display_name] if args.key?(:display_name)
2010
- @endpoint_uris = args[:endpoint_uris] if args.key?(:endpoint_uris)
2011
- @free_instance_metadata = args[:free_instance_metadata] if args.key?(:free_instance_metadata)
2012
- @instance_type = args[:instance_type] if args.key?(:instance_type)
2013
- @labels = args[:labels] if args.key?(:labels)
3597
+ @etag = args[:etag] if args.key?(:etag)
2014
3598
  @name = args[:name] if args.key?(:name)
2015
3599
  @node_count = args[:node_count] if args.key?(:node_count)
2016
3600
  @processing_units = args[:processing_units] if args.key?(:processing_units)
3601
+ @referencing_backups = args[:referencing_backups] if args.key?(:referencing_backups)
3602
+ @referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
2017
3603
  @state = args[:state] if args.key?(:state)
2018
3604
  @update_time = args[:update_time] if args.key?(:update_time)
2019
3605
  end
2020
3606
  end
2021
3607
 
2022
- # A possible configuration for a Cloud Spanner instance. Configurations define
2023
- # the geographic placement of nodes and their replication.
2024
- class InstanceConfig
3608
+ # ReplicaSelection identifies replicas with common properties.
3609
+ class InstanceReplicaSelection
2025
3610
  include Google::Apis::Core::Hashable
2026
3611
 
2027
- # The name of this instance configuration as it appears in UIs.
2028
- # Corresponds to the JSON property `displayName`
3612
+ # Required. Name of the location of the replicas (e.g., "us-central1").
3613
+ # Corresponds to the JSON property `location`
2029
3614
  # @return [String]
2030
- attr_accessor :display_name
3615
+ attr_accessor :location
2031
3616
 
2032
- # Output only. Describes whether free instances are available to be created in
2033
- # this instance config.
2034
- # Corresponds to the JSON property `freeInstanceAvailability`
2035
- # @return [String]
2036
- attr_accessor :free_instance_availability
3617
+ def initialize(**args)
3618
+ update!(**args)
3619
+ end
2037
3620
 
2038
- # Allowed values of the "default_leader" schema option for databases in
2039
- # instances that use this instance configuration.
2040
- # Corresponds to the JSON property `leaderOptions`
2041
- # @return [Array<String>]
2042
- attr_accessor :leader_options
3621
+ # Update properties of this object
3622
+ def update!(**args)
3623
+ @location = args[:location] if args.key?(:location)
3624
+ end
3625
+ end
2043
3626
 
2044
- # A unique identifier for the instance configuration. Values are of the form `
2045
- # projects//instanceConfigs/a-z*`.
2046
- # Corresponds to the JSON property `name`
2047
- # @return [String]
2048
- attr_accessor :name
3627
+ # A split key.
3628
+ class Key
3629
+ include Google::Apis::Core::Hashable
2049
3630
 
2050
- # The geographic placement of nodes in this instance configuration and their
2051
- # replication properties.
2052
- # Corresponds to the JSON property `replicas`
2053
- # @return [Array<Google::Apis::SpannerV1::ReplicaInfo>]
2054
- attr_accessor :replicas
3631
+ # Required. The column values making up the split key.
3632
+ # Corresponds to the JSON property `keyParts`
3633
+ # @return [Array<Object>]
3634
+ attr_accessor :key_parts
2055
3635
 
2056
3636
  def initialize(**args)
2057
3637
  update!(**args)
@@ -2059,11 +3639,7 @@ module Google
2059
3639
 
2060
3640
  # Update properties of this object
2061
3641
  def update!(**args)
2062
- @display_name = args[:display_name] if args.key?(:display_name)
2063
- @free_instance_availability = args[:free_instance_availability] if args.key?(:free_instance_availability)
2064
- @leader_options = args[:leader_options] if args.key?(:leader_options)
2065
- @name = args[:name] if args.key?(:name)
2066
- @replicas = args[:replicas] if args.key?(:replicas)
3642
+ @key_parts = args[:key_parts] if args.key?(:key_parts)
2067
3643
  end
2068
3644
  end
2069
3645
 
@@ -2311,6 +3887,32 @@ module Google
2311
3887
  end
2312
3888
  end
2313
3889
 
3890
+ # The response for ListBackupSchedules.
3891
+ class ListBackupSchedulesResponse
3892
+ include Google::Apis::Core::Hashable
3893
+
3894
+ # The list of backup schedules for a database.
3895
+ # Corresponds to the JSON property `backupSchedules`
3896
+ # @return [Array<Google::Apis::SpannerV1::BackupSchedule>]
3897
+ attr_accessor :backup_schedules
3898
+
3899
+ # `next_page_token` can be sent in a subsequent ListBackupSchedules call to
3900
+ # fetch more of the schedules.
3901
+ # Corresponds to the JSON property `nextPageToken`
3902
+ # @return [String]
3903
+ attr_accessor :next_page_token
3904
+
3905
+ def initialize(**args)
3906
+ update!(**args)
3907
+ end
3908
+
3909
+ # Update properties of this object
3910
+ def update!(**args)
3911
+ @backup_schedules = args[:backup_schedules] if args.key?(:backup_schedules)
3912
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3913
+ end
3914
+ end
3915
+
2314
3916
  # The response for ListBackups.
2315
3917
  class ListBackupsResponse
2316
3918
  include Google::Apis::Core::Hashable
@@ -2418,6 +4020,35 @@ module Google
2418
4020
  end
2419
4021
  end
2420
4022
 
4023
+ # The response for ListInstanceConfigOperations.
4024
+ class ListInstanceConfigOperationsResponse
4025
+ include Google::Apis::Core::Hashable
4026
+
4027
+ # `next_page_token` can be sent in a subsequent ListInstanceConfigOperations
4028
+ # call to fetch more of the matching metadata.
4029
+ # Corresponds to the JSON property `nextPageToken`
4030
+ # @return [String]
4031
+ attr_accessor :next_page_token
4032
+
4033
+ # The list of matching instance configuration long-running operations. Each
4034
+ # operation's name will be prefixed by the name of the instance configuration.
4035
+ # The operation's metadata field type `metadata.type_url` describes the type of
4036
+ # the metadata.
4037
+ # Corresponds to the JSON property `operations`
4038
+ # @return [Array<Google::Apis::SpannerV1::Operation>]
4039
+ attr_accessor :operations
4040
+
4041
+ def initialize(**args)
4042
+ update!(**args)
4043
+ end
4044
+
4045
+ # Update properties of this object
4046
+ def update!(**args)
4047
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4048
+ @operations = args[:operations] if args.key?(:operations)
4049
+ end
4050
+ end
4051
+
2421
4052
  # The response for ListInstanceConfigs.
2422
4053
  class ListInstanceConfigsResponse
2423
4054
  include Google::Apis::Core::Hashable
@@ -2444,6 +4075,77 @@ module Google
2444
4075
  end
2445
4076
  end
2446
4077
 
4078
+ # The response for ListInstancePartitionOperations.
4079
+ class ListInstancePartitionOperationsResponse
4080
+ include Google::Apis::Core::Hashable
4081
+
4082
+ # `next_page_token` can be sent in a subsequent ListInstancePartitionOperations
4083
+ # call to fetch more of the matching metadata.
4084
+ # Corresponds to the JSON property `nextPageToken`
4085
+ # @return [String]
4086
+ attr_accessor :next_page_token
4087
+
4088
+ # The list of matching instance partition long-running operations. Each
4089
+ # operation's name will be prefixed by the instance partition's name. The
4090
+ # operation's metadata field type `metadata.type_url` describes the type of the
4091
+ # metadata.
4092
+ # Corresponds to the JSON property `operations`
4093
+ # @return [Array<Google::Apis::SpannerV1::Operation>]
4094
+ attr_accessor :operations
4095
+
4096
+ # The list of unreachable instance partitions. It includes the names of instance
4097
+ # partitions whose operation metadata could not be retrieved within
4098
+ # instance_partition_deadline.
4099
+ # Corresponds to the JSON property `unreachableInstancePartitions`
4100
+ # @return [Array<String>]
4101
+ attr_accessor :unreachable_instance_partitions
4102
+
4103
+ def initialize(**args)
4104
+ update!(**args)
4105
+ end
4106
+
4107
+ # Update properties of this object
4108
+ def update!(**args)
4109
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4110
+ @operations = args[:operations] if args.key?(:operations)
4111
+ @unreachable_instance_partitions = args[:unreachable_instance_partitions] if args.key?(:unreachable_instance_partitions)
4112
+ end
4113
+ end
4114
+
4115
+ # The response for ListInstancePartitions.
4116
+ class ListInstancePartitionsResponse
4117
+ include Google::Apis::Core::Hashable
4118
+
4119
+ # The list of requested instancePartitions.
4120
+ # Corresponds to the JSON property `instancePartitions`
4121
+ # @return [Array<Google::Apis::SpannerV1::InstancePartition>]
4122
+ attr_accessor :instance_partitions
4123
+
4124
+ # `next_page_token` can be sent in a subsequent ListInstancePartitions call to
4125
+ # fetch more of the matching instance partitions.
4126
+ # Corresponds to the JSON property `nextPageToken`
4127
+ # @return [String]
4128
+ attr_accessor :next_page_token
4129
+
4130
+ # The list of unreachable instances or instance partitions. It includes the
4131
+ # names of instances or instance partitions whose metadata could not be
4132
+ # retrieved within instance_partition_deadline.
4133
+ # Corresponds to the JSON property `unreachable`
4134
+ # @return [Array<String>]
4135
+ attr_accessor :unreachable
4136
+
4137
+ def initialize(**args)
4138
+ update!(**args)
4139
+ end
4140
+
4141
+ # Update properties of this object
4142
+ def update!(**args)
4143
+ @instance_partitions = args[:instance_partitions] if args.key?(:instance_partitions)
4144
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4145
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
4146
+ end
4147
+ end
4148
+
2447
4149
  # The response for ListInstances.
2448
4150
  class ListInstancesResponse
2449
4151
  include Google::Apis::Core::Hashable
@@ -2727,6 +4429,57 @@ module Google
2727
4429
  end
2728
4430
  end
2729
4431
 
4432
+ # The request for MoveInstance.
4433
+ class MoveInstanceRequest
4434
+ include Google::Apis::Core::Hashable
4435
+
4436
+ # Required. The target instance configuration where to move the instance. Values
4437
+ # are of the form `projects//instanceConfigs/`.
4438
+ # Corresponds to the JSON property `targetConfig`
4439
+ # @return [String]
4440
+ attr_accessor :target_config
4441
+
4442
+ def initialize(**args)
4443
+ update!(**args)
4444
+ end
4445
+
4446
+ # Update properties of this object
4447
+ def update!(**args)
4448
+ @target_config = args[:target_config] if args.key?(:target_config)
4449
+ end
4450
+ end
4451
+
4452
+ # When a read-write transaction is executed on a multiplexed session, this
4453
+ # precommit token is sent back to the client as a part of the [Transaction]
4454
+ # message in the BeginTransaction response and also as a part of the [ResultSet]
4455
+ # and [PartialResultSet] responses.
4456
+ class MultiplexedSessionPrecommitToken
4457
+ include Google::Apis::Core::Hashable
4458
+
4459
+ # Opaque precommit token.
4460
+ # Corresponds to the JSON property `precommitToken`
4461
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
4462
+ # @return [String]
4463
+ attr_accessor :precommit_token
4464
+
4465
+ # An incrementing seq number is generated on every precommit token that is
4466
+ # returned. Clients should remember the precommit token with the highest
4467
+ # sequence number from the current transaction attempt.
4468
+ # Corresponds to the JSON property `seqNum`
4469
+ # @return [Fixnum]
4470
+ attr_accessor :seq_num
4471
+
4472
+ def initialize(**args)
4473
+ update!(**args)
4474
+ end
4475
+
4476
+ # Update properties of this object
4477
+ def update!(**args)
4478
+ @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
4479
+ @seq_num = args[:seq_num] if args.key?(:seq_num)
4480
+ end
4481
+ end
4482
+
2730
4483
  # A modification to one or more Cloud Spanner rows. Mutations can be applied to
2731
4484
  # a Cloud Spanner database by sending them in a Commit call.
2732
4485
  class Mutation
@@ -2771,6 +4524,27 @@ module Google
2771
4524
  end
2772
4525
  end
2773
4526
 
4527
+ # A group of mutations to be committed together. Related mutations should be
4528
+ # placed in a group. For example, two mutations inserting rows with the same
4529
+ # primary key prefix in both parent and child tables are related.
4530
+ class MutationGroup
4531
+ include Google::Apis::Core::Hashable
4532
+
4533
+ # Required. The mutations in this group.
4534
+ # Corresponds to the JSON property `mutations`
4535
+ # @return [Array<Google::Apis::SpannerV1::Mutation>]
4536
+ attr_accessor :mutations
4537
+
4538
+ def initialize(**args)
4539
+ update!(**args)
4540
+ end
4541
+
4542
+ # Update properties of this object
4543
+ def update!(**args)
4544
+ @mutations = args[:mutations] if args.key?(:mutations)
4545
+ end
4546
+ end
4547
+
2774
4548
  # This resource represents a long-running operation that is the result of a
2775
4549
  # network API call.
2776
4550
  class Operation
@@ -2808,13 +4582,13 @@ module Google
2808
4582
  # @return [String]
2809
4583
  attr_accessor :name
2810
4584
 
2811
- # The normal response of the operation in case of success. If the original
2812
- # method returns no data on success, such as `Delete`, the response is `google.
2813
- # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
2814
- # the response should be the resource. For other methods, the response should
2815
- # have the type `XxxResponse`, where `Xxx` is the original method name. For
2816
- # example, if the original method name is `TakeSnapshot()`, the inferred
2817
- # response type is `TakeSnapshotResponse`.
4585
+ # The normal, successful response of the operation. If the original method
4586
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
4587
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
4588
+ # response should be the resource. For other methods, the response should have
4589
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
4590
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
4591
+ # `TakeSnapshotResponse`.
2818
4592
  # Corresponds to the JSON property `response`
2819
4593
  # @return [Hash<String,Object>]
2820
4594
  attr_accessor :response
@@ -2913,6 +4687,14 @@ module Google
2913
4687
  # @return [Google::Apis::SpannerV1::ResultSetMetadata]
2914
4688
  attr_accessor :metadata
2915
4689
 
4690
+ # When a read-write transaction is executed on a multiplexed session, this
4691
+ # precommit token is sent back to the client as a part of the [Transaction]
4692
+ # message in the BeginTransaction response and also as a part of the [ResultSet]
4693
+ # and [PartialResultSet] responses.
4694
+ # Corresponds to the JSON property `precommitToken`
4695
+ # @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
4696
+ attr_accessor :precommit_token
4697
+
2916
4698
  # Streaming calls might be interrupted for a variety of reasons, such as TCP
2917
4699
  # connection loss. If this occurs, the stream of results can be resumed by re-
2918
4700
  # sending the original request and including `resume_token`. Note that executing
@@ -2974,6 +4756,7 @@ module Google
2974
4756
  def update!(**args)
2975
4757
  @chunked_value = args[:chunked_value] if args.key?(:chunked_value)
2976
4758
  @metadata = args[:metadata] if args.key?(:metadata)
4759
+ @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
2977
4760
  @resume_token = args[:resume_token] if args.key?(:resume_token)
2978
4761
  @stats = args[:stats] if args.key?(:stats)
2979
4762
  @values = args[:values] if args.key?(:values)
@@ -3064,14 +4847,15 @@ module Google
3064
4847
  # @return [Google::Apis::SpannerV1::PartitionOptions]
3065
4848
  attr_accessor :partition_options
3066
4849
 
3067
- # Required. The query request to generate partitions for. The request will fail
3068
- # if the query is not root partitionable. The query plan of a root partitionable
3069
- # query has a single distributed union operator. A distributed union operator
3070
- # conceptually divides one or more tables into multiple splits, remotely
3071
- # evaluates a subquery independently on each split, and then unions all results.
3072
- # This must not contain DML commands, such as INSERT, UPDATE, or DELETE. Use
3073
- # ExecuteStreamingSql with a PartitionedDml transaction for large, partition-
3074
- # friendly DML operations.
4850
+ # Required. The query request to generate partitions for. The request fails if
4851
+ # the query is not root partitionable. For a query to be root partitionable, it
4852
+ # needs to satisfy a few conditions. For example, if the query execution plan
4853
+ # contains a distributed union operator, then it must be the first operator in
4854
+ # the plan. For more information about other conditions, see [Read data in
4855
+ # parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
4856
+ # The query request must not contain DML commands, such as `INSERT`, `UPDATE`,
4857
+ # or `DELETE`. Use `ExecuteStreamingSql` with a PartitionedDml transaction for
4858
+ # large, partition-friendly DML operations.
3075
4859
  # Corresponds to the JSON property `sql`
3076
4860
  # @return [String]
3077
4861
  attr_accessor :sql
@@ -3265,22 +5049,22 @@ module Google
3265
5049
  # evaluates to `true`. A condition can add constraints based on attributes of
3266
5050
  # the request, the resource, or both. To learn which resources support
3267
5051
  # conditions in their IAM policies, see the [IAM documentation](https://cloud.
3268
- # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
5052
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
3269
5053
  # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
3270
5054
  # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
3271
5055
  # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
3272
5056
  # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
3273
5057
  # ], "condition": ` "title": "expirable access", "description": "Does not grant
3274
5058
  # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
3275
- # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
3276
- # bindings: - members: - user:mike@example.com - group:admins@example.com -
3277
- # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
3278
- # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
3279
- # com role: roles/resourcemanager.organizationViewer condition: title: expirable
3280
- # access description: Does not grant access after Sep 2020 expression: request.
3281
- # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
3282
- # a description of IAM and its features, see the [IAM documentation](https://
3283
- # cloud.google.com/iam/docs/).
5059
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
5060
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
5061
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
5062
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
5063
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
5064
+ # title: expirable access description: Does not grant access after Sep 2020
5065
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
5066
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
5067
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
3284
5068
  class Policy
3285
5069
  include Google::Apis::Core::Hashable
3286
5070
 
@@ -3392,6 +5176,27 @@ module Google
3392
5176
  end
3393
5177
  end
3394
5178
 
5179
+ # Output of query advisor analysis.
5180
+ class QueryAdvisorResult
5181
+ include Google::Apis::Core::Hashable
5182
+
5183
+ # Optional. Index Recommendation for a query. This is an optional field and the
5184
+ # recommendation will only be available when the recommendation guarantees
5185
+ # significant improvement in query performance.
5186
+ # Corresponds to the JSON property `indexAdvice`
5187
+ # @return [Array<Google::Apis::SpannerV1::IndexAdvice>]
5188
+ attr_accessor :index_advice
5189
+
5190
+ def initialize(**args)
5191
+ update!(**args)
5192
+ end
5193
+
5194
+ # Update properties of this object
5195
+ def update!(**args)
5196
+ @index_advice = args[:index_advice] if args.key?(:index_advice)
5197
+ end
5198
+ end
5199
+
3395
5200
  # Query optimizer configuration.
3396
5201
  class QueryOptions
3397
5202
  include Google::Apis::Core::Hashable
@@ -3443,12 +5248,83 @@ module Google
3443
5248
  class QueryPlan
3444
5249
  include Google::Apis::Core::Hashable
3445
5250
 
3446
- # The nodes in the query plan. Plan nodes are returned in pre-order starting
3447
- # with the plan root. Each PlanNode's `id` corresponds to its index in `
3448
- # plan_nodes`.
3449
- # Corresponds to the JSON property `planNodes`
3450
- # @return [Array<Google::Apis::SpannerV1::PlanNode>]
3451
- attr_accessor :plan_nodes
5251
+ # The nodes in the query plan. Plan nodes are returned in pre-order starting
5252
+ # with the plan root. Each PlanNode's `id` corresponds to its index in `
5253
+ # plan_nodes`.
5254
+ # Corresponds to the JSON property `planNodes`
5255
+ # @return [Array<Google::Apis::SpannerV1::PlanNode>]
5256
+ attr_accessor :plan_nodes
5257
+
5258
+ # Output of query advisor analysis.
5259
+ # Corresponds to the JSON property `queryAdvice`
5260
+ # @return [Google::Apis::SpannerV1::QueryAdvisorResult]
5261
+ attr_accessor :query_advice
5262
+
5263
+ def initialize(**args)
5264
+ update!(**args)
5265
+ end
5266
+
5267
+ # Update properties of this object
5268
+ def update!(**args)
5269
+ @plan_nodes = args[:plan_nodes] if args.key?(:plan_nodes)
5270
+ @query_advice = args[:query_advice] if args.key?(:query_advice)
5271
+ end
5272
+ end
5273
+
5274
+ # Information about the dual-region quorum.
5275
+ class QuorumInfo
5276
+ include Google::Apis::Core::Hashable
5277
+
5278
+ # Output only. The etag is used for optimistic concurrency control as a way to
5279
+ # help prevent simultaneous `ChangeQuorum` requests that might create a race
5280
+ # condition.
5281
+ # Corresponds to the JSON property `etag`
5282
+ # @return [String]
5283
+ attr_accessor :etag
5284
+
5285
+ # Output only. Whether this `ChangeQuorum` is Google or User initiated.
5286
+ # Corresponds to the JSON property `initiator`
5287
+ # @return [String]
5288
+ attr_accessor :initiator
5289
+
5290
+ # Information about the database quorum type. This only applies to dual-region
5291
+ # instance configs.
5292
+ # Corresponds to the JSON property `quorumType`
5293
+ # @return [Google::Apis::SpannerV1::QuorumType]
5294
+ attr_accessor :quorum_type
5295
+
5296
+ # Output only. The timestamp when the request was triggered.
5297
+ # Corresponds to the JSON property `startTime`
5298
+ # @return [String]
5299
+ attr_accessor :start_time
5300
+
5301
+ def initialize(**args)
5302
+ update!(**args)
5303
+ end
5304
+
5305
+ # Update properties of this object
5306
+ def update!(**args)
5307
+ @etag = args[:etag] if args.key?(:etag)
5308
+ @initiator = args[:initiator] if args.key?(:initiator)
5309
+ @quorum_type = args[:quorum_type] if args.key?(:quorum_type)
5310
+ @start_time = args[:start_time] if args.key?(:start_time)
5311
+ end
5312
+ end
5313
+
5314
+ # Information about the database quorum type. This only applies to dual-region
5315
+ # instance configs.
5316
+ class QuorumType
5317
+ include Google::Apis::Core::Hashable
5318
+
5319
+ # Message type for a dual-region quorum. Currently this type has no options.
5320
+ # Corresponds to the JSON property `dualRegion`
5321
+ # @return [Google::Apis::SpannerV1::DualRegionQuorum]
5322
+ attr_accessor :dual_region
5323
+
5324
+ # Message type for a single-region quorum.
5325
+ # Corresponds to the JSON property `singleRegion`
5326
+ # @return [Google::Apis::SpannerV1::SingleRegionQuorum]
5327
+ attr_accessor :single_region
3452
5328
 
3453
5329
  def initialize(**args)
3454
5330
  update!(**args)
@@ -3456,7 +5332,8 @@ module Google
3456
5332
 
3457
5333
  # Update properties of this object
3458
5334
  def update!(**args)
3459
- @plan_nodes = args[:plan_nodes] if args.key?(:plan_nodes)
5335
+ @dual_region = args[:dual_region] if args.key?(:dual_region)
5336
+ @single_region = args[:single_region] if args.key?(:single_region)
3460
5337
  end
3461
5338
  end
3462
5339
 
@@ -3545,6 +5422,23 @@ module Google
3545
5422
  # @return [Array<String>]
3546
5423
  attr_accessor :columns
3547
5424
 
5425
+ # If this is for a partitioned read and this field is set to `true`, the request
5426
+ # is executed with Spanner Data Boost independent compute resources. If the
5427
+ # field is set to `true` but the request does not set `partition_token`, the API
5428
+ # returns an `INVALID_ARGUMENT` error.
5429
+ # Corresponds to the JSON property `dataBoostEnabled`
5430
+ # @return [Boolean]
5431
+ attr_accessor :data_boost_enabled
5432
+ alias_method :data_boost_enabled?, :data_boost_enabled
5433
+
5434
+ # The DirectedReadOptions can be used to indicate which replicas or regions
5435
+ # should be used for non-transactional reads or queries. DirectedReadOptions may
5436
+ # only be specified for a read-only transaction, otherwise the API will return
5437
+ # an `INVALID_ARGUMENT` error.
5438
+ # Corresponds to the JSON property `directedReadOptions`
5439
+ # @return [Google::Apis::SpannerV1::DirectedReadOptions]
5440
+ attr_accessor :directed_read_options
5441
+
3548
5442
  # If non-empty, the name of an index on table. This index is used instead of the
3549
5443
  # table primary key when interpreting key_set and sorting result rows. See
3550
5444
  # key_set for further information.
@@ -3568,6 +5462,22 @@ module Google
3568
5462
  # @return [Fixnum]
3569
5463
  attr_accessor :limit
3570
5464
 
5465
+ # Optional. Lock Hint for the request, it can only be used with read-write
5466
+ # transactions.
5467
+ # Corresponds to the JSON property `lockHint`
5468
+ # @return [String]
5469
+ attr_accessor :lock_hint
5470
+
5471
+ # Optional. Order for the returned rows. By default, Spanner will return result
5472
+ # rows in primary key order except for PartitionRead requests. For applications
5473
+ # that do not require rows to be returned in primary key (`ORDER_BY_PRIMARY_KEY`)
5474
+ # order, setting `ORDER_BY_NO_ORDER` option allows Spanner to optimize row
5475
+ # retrieval, resulting in lower latencies in certain cases (e.g. bulk point
5476
+ # lookups).
5477
+ # Corresponds to the JSON property `orderBy`
5478
+ # @return [String]
5479
+ attr_accessor :order_by
5480
+
3571
5481
  # If present, results will be restricted to the specified partition previously
3572
5482
  # created using PartitionRead(). There must be an exact match for the values of
3573
5483
  # fields common to this message and the PartitionReadRequest message used to
@@ -3610,9 +5520,13 @@ module Google
3610
5520
  # Update properties of this object
3611
5521
  def update!(**args)
3612
5522
  @columns = args[:columns] if args.key?(:columns)
5523
+ @data_boost_enabled = args[:data_boost_enabled] if args.key?(:data_boost_enabled)
5524
+ @directed_read_options = args[:directed_read_options] if args.key?(:directed_read_options)
3613
5525
  @index = args[:index] if args.key?(:index)
3614
5526
  @key_set = args[:key_set] if args.key?(:key_set)
3615
5527
  @limit = args[:limit] if args.key?(:limit)
5528
+ @lock_hint = args[:lock_hint] if args.key?(:lock_hint)
5529
+ @order_by = args[:order_by] if args.key?(:order_by)
3616
5530
  @partition_token = args[:partition_token] if args.key?(:partition_token)
3617
5531
  @request_options = args[:request_options] if args.key?(:request_options)
3618
5532
  @resume_token = args[:resume_token] if args.key?(:resume_token)
@@ -3626,12 +5540,61 @@ module Google
3626
5540
  class ReadWrite
3627
5541
  include Google::Apis::Core::Hashable
3628
5542
 
5543
+ # Optional. Clients should pass the transaction ID of the previous transaction
5544
+ # attempt that was aborted if this transaction is being executed on a
5545
+ # multiplexed session.
5546
+ # Corresponds to the JSON property `multiplexedSessionPreviousTransactionId`
5547
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
5548
+ # @return [String]
5549
+ attr_accessor :multiplexed_session_previous_transaction_id
5550
+
5551
+ # Read lock mode for the transaction.
5552
+ # Corresponds to the JSON property `readLockMode`
5553
+ # @return [String]
5554
+ attr_accessor :read_lock_mode
5555
+
5556
+ def initialize(**args)
5557
+ update!(**args)
5558
+ end
5559
+
5560
+ # Update properties of this object
5561
+ def update!(**args)
5562
+ @multiplexed_session_previous_transaction_id = args[:multiplexed_session_previous_transaction_id] if args.key?(:multiplexed_session_previous_transaction_id)
5563
+ @read_lock_mode = args[:read_lock_mode] if args.key?(:read_lock_mode)
5564
+ end
5565
+ end
5566
+
5567
+ # ReplicaComputeCapacity describes the amount of server resources that are
5568
+ # allocated to each replica identified by the replica selection.
5569
+ class ReplicaComputeCapacity
5570
+ include Google::Apis::Core::Hashable
5571
+
5572
+ # The number of nodes allocated to each replica. This may be zero in API
5573
+ # responses for instances that are not yet in state `READY`.
5574
+ # Corresponds to the JSON property `nodeCount`
5575
+ # @return [Fixnum]
5576
+ attr_accessor :node_count
5577
+
5578
+ # The number of processing units allocated to each replica. This may be zero in
5579
+ # API responses for instances that are not yet in state `READY`.
5580
+ # Corresponds to the JSON property `processingUnits`
5581
+ # @return [Fixnum]
5582
+ attr_accessor :processing_units
5583
+
5584
+ # ReplicaSelection identifies replicas with common properties.
5585
+ # Corresponds to the JSON property `replicaSelection`
5586
+ # @return [Google::Apis::SpannerV1::InstanceReplicaSelection]
5587
+ attr_accessor :replica_selection
5588
+
3629
5589
  def initialize(**args)
3630
5590
  update!(**args)
3631
5591
  end
3632
5592
 
3633
5593
  # Update properties of this object
3634
5594
  def update!(**args)
5595
+ @node_count = args[:node_count] if args.key?(:node_count)
5596
+ @processing_units = args[:processing_units] if args.key?(:processing_units)
5597
+ @replica_selection = args[:replica_selection] if args.key?(:replica_selection)
3635
5598
  end
3636
5599
  end
3637
5600
 
@@ -3647,7 +5610,7 @@ module Google
3647
5610
  attr_accessor :default_leader_location
3648
5611
  alias_method :default_leader_location?, :default_leader_location
3649
5612
 
3650
- # The location of the serving resources, e.g. "us-central1".
5613
+ # The location of the serving resources, e.g., "us-central1".
3651
5614
  # Corresponds to the JSON property `location`
3652
5615
  # @return [String]
3653
5616
  attr_accessor :location
@@ -3669,6 +5632,39 @@ module Google
3669
5632
  end
3670
5633
  end
3671
5634
 
5635
+ # The directed read replica selector. Callers must provide one or more of the
5636
+ # following fields for replica selection: * `location` - The location must be
5637
+ # one of the regions within the multi-region configuration of your database. * `
5638
+ # type` - The type of the replica. Some examples of using replica_selectors are:
5639
+ # * `location:us-east1` --> The "us-east1" replica(s) of any available type will
5640
+ # be used to process the request. * `type:READ_ONLY` --> The "READ_ONLY" type
5641
+ # replica(s) in nearest available location will be used to process the request. *
5642
+ # `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) in
5643
+ # location "us-east1" will be used to process the request.
5644
+ class ReplicaSelection
5645
+ include Google::Apis::Core::Hashable
5646
+
5647
+ # The location or region of the serving requests, e.g. "us-east1".
5648
+ # Corresponds to the JSON property `location`
5649
+ # @return [String]
5650
+ attr_accessor :location
5651
+
5652
+ # The type of replica.
5653
+ # Corresponds to the JSON property `type`
5654
+ # @return [String]
5655
+ attr_accessor :type
5656
+
5657
+ def initialize(**args)
5658
+ update!(**args)
5659
+ end
5660
+
5661
+ # Update properties of this object
5662
+ def update!(**args)
5663
+ @location = args[:location] if args.key?(:location)
5664
+ @type = args[:type] if args.key?(:type)
5665
+ end
5666
+ end
5667
+
3672
5668
  # Common request options for various APIs.
3673
5669
  class RequestOptions
3674
5670
  include Google::Apis::Core::Hashable
@@ -3732,6 +5728,21 @@ module Google
3732
5728
  # @return [String]
3733
5729
  attr_accessor :kms_key_name
3734
5730
 
5731
+ # Optional. Specifies the KMS configuration for one or more keys used to encrypt
5732
+ # the database. Values have the form `projects//locations//keyRings//cryptoKeys/`
5733
+ # . The keys referenced by `kms_key_names` must fully cover all regions of the
5734
+ # database's instance configuration. Some examples: * For regional (single-
5735
+ # region) instance configurations, specify a regional location KMS key. * For
5736
+ # multi-region instance configurations of type `GOOGLE_MANAGED`, either specify
5737
+ # a multi-region location KMS key or multiple regional location KMS keys that
5738
+ # cover all regions in the instance configuration. * For an instance
5739
+ # configuration of type `USER_MANAGED`, specify only regional location KMS keys
5740
+ # to cover each region in the instance configuration. Multi-region location KMS
5741
+ # keys aren't supported for `USER_MANAGED` type instance configurations.
5742
+ # Corresponds to the JSON property `kmsKeyNames`
5743
+ # @return [Array<String>]
5744
+ attr_accessor :kms_key_names
5745
+
3735
5746
  def initialize(**args)
3736
5747
  update!(**args)
3737
5748
  end
@@ -3740,6 +5751,7 @@ module Google
3740
5751
  def update!(**args)
3741
5752
  @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
3742
5753
  @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
5754
+ @kms_key_names = args[:kms_key_names] if args.key?(:kms_key_names)
3743
5755
  end
3744
5756
  end
3745
5757
 
@@ -3876,6 +5888,14 @@ module Google
3876
5888
  # @return [Google::Apis::SpannerV1::ResultSetMetadata]
3877
5889
  attr_accessor :metadata
3878
5890
 
5891
+ # When a read-write transaction is executed on a multiplexed session, this
5892
+ # precommit token is sent back to the client as a part of the [Transaction]
5893
+ # message in the BeginTransaction response and also as a part of the [ResultSet]
5894
+ # and [PartialResultSet] responses.
5895
+ # Corresponds to the JSON property `precommitToken`
5896
+ # @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
5897
+ attr_accessor :precommit_token
5898
+
3879
5899
  # Each element in `rows` is a row whose format is defined by metadata.row_type.
3880
5900
  # The ith element in each row matches the ith field in metadata.row_type.
3881
5901
  # Elements are encoded based on type as described here.
@@ -3895,6 +5915,7 @@ module Google
3895
5915
  # Update properties of this object
3896
5916
  def update!(**args)
3897
5917
  @metadata = args[:metadata] if args.key?(:metadata)
5918
+ @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
3898
5919
  @rows = args[:rows] if args.key?(:rows)
3899
5920
  @stats = args[:stats] if args.key?(:stats)
3900
5921
  end
@@ -3914,6 +5935,11 @@ module Google
3914
5935
  # @return [Google::Apis::SpannerV1::Transaction]
3915
5936
  attr_accessor :transaction
3916
5937
 
5938
+ # `StructType` defines the fields of a STRUCT type.
5939
+ # Corresponds to the JSON property `undeclaredParameters`
5940
+ # @return [Google::Apis::SpannerV1::StructType]
5941
+ attr_accessor :undeclared_parameters
5942
+
3917
5943
  def initialize(**args)
3918
5944
  update!(**args)
3919
5945
  end
@@ -3922,6 +5948,7 @@ module Google
3922
5948
  def update!(**args)
3923
5949
  @row_type = args[:row_type] if args.key?(:row_type)
3924
5950
  @transaction = args[:transaction] if args.key?(:transaction)
5951
+ @undeclared_parameters = args[:undeclared_parameters] if args.key?(:undeclared_parameters)
3925
5952
  end
3926
5953
  end
3927
5954
 
@@ -4096,6 +6123,16 @@ module Google
4096
6123
  # @return [Hash<String,String>]
4097
6124
  attr_accessor :labels
4098
6125
 
6126
+ # Optional. If true, specifies a multiplexed session. Use a multiplexed session
6127
+ # for multiple, concurrent read-only operations. Don't use them for read-write
6128
+ # transactions, partitioned reads, or partitioned queries. Use `sessions.create`
6129
+ # to create multiplexed sessions. Don't use BatchCreateSessions to create a
6130
+ # multiplexed session. You can't delete or list multiplexed sessions.
6131
+ # Corresponds to the JSON property `multiplexed`
6132
+ # @return [Boolean]
6133
+ attr_accessor :multiplexed
6134
+ alias_method :multiplexed?, :multiplexed
6135
+
4099
6136
  # Output only. The name of the session. This is always system-assigned.
4100
6137
  # Corresponds to the JSON property `name`
4101
6138
  # @return [String]
@@ -4111,6 +6148,7 @@ module Google
4111
6148
  @create_time = args[:create_time] if args.key?(:create_time)
4112
6149
  @creator_role = args[:creator_role] if args.key?(:creator_role)
4113
6150
  @labels = args[:labels] if args.key?(:labels)
6151
+ @multiplexed = args[:multiplexed] if args.key?(:multiplexed)
4114
6152
  @name = args[:name] if args.key?(:name)
4115
6153
  end
4116
6154
  end
@@ -4130,22 +6168,22 @@ module Google
4130
6168
  # evaluates to `true`. A condition can add constraints based on attributes of
4131
6169
  # the request, the resource, or both. To learn which resources support
4132
6170
  # conditions in their IAM policies, see the [IAM documentation](https://cloud.
4133
- # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
6171
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
4134
6172
  # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
4135
6173
  # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
4136
6174
  # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
4137
6175
  # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
4138
6176
  # ], "condition": ` "title": "expirable access", "description": "Does not grant
4139
6177
  # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
4140
- # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
4141
- # bindings: - members: - user:mike@example.com - group:admins@example.com -
4142
- # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
4143
- # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
4144
- # com role: roles/resourcemanager.organizationViewer condition: title: expirable
4145
- # access description: Does not grant access after Sep 2020 expression: request.
4146
- # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
4147
- # a description of IAM and its features, see the [IAM documentation](https://
4148
- # cloud.google.com/iam/docs/).
6178
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
6179
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
6180
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
6181
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
6182
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
6183
+ # title: expirable access description: Does not grant access after Sep 2020
6184
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
6185
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
6186
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
4149
6187
  # Corresponds to the JSON property `policy`
4150
6188
  # @return [Google::Apis::SpannerV1::Policy]
4151
6189
  attr_accessor :policy
@@ -4189,6 +6227,69 @@ module Google
4189
6227
  end
4190
6228
  end
4191
6229
 
6230
+ # Message type for a single-region quorum.
6231
+ class SingleRegionQuorum
6232
+ include Google::Apis::Core::Hashable
6233
+
6234
+ # Required. The location of the serving region, e.g. "us-central1". The location
6235
+ # must be one of the regions within the dual-region instance configuration of
6236
+ # your database. The list of valid locations is available using the
6237
+ # GetInstanceConfig API. This should only be used if you plan to change quorum
6238
+ # to the single-region quorum type.
6239
+ # Corresponds to the JSON property `servingLocation`
6240
+ # @return [String]
6241
+ attr_accessor :serving_location
6242
+
6243
+ def initialize(**args)
6244
+ update!(**args)
6245
+ end
6246
+
6247
+ # Update properties of this object
6248
+ def update!(**args)
6249
+ @serving_location = args[:serving_location] if args.key?(:serving_location)
6250
+ end
6251
+ end
6252
+
6253
+ # The split points of a table/index.
6254
+ class SplitPoints
6255
+ include Google::Apis::Core::Hashable
6256
+
6257
+ # Optional. The expiration timestamp of the split points. A timestamp in the
6258
+ # past means immediate expiration. The maximum value can be 30 days in the
6259
+ # future. Defaults to 10 days in the future if not specified.
6260
+ # Corresponds to the JSON property `expireTime`
6261
+ # @return [String]
6262
+ attr_accessor :expire_time
6263
+
6264
+ # The index to split. If specified, the `table` field must refer to the index's
6265
+ # base table.
6266
+ # Corresponds to the JSON property `index`
6267
+ # @return [String]
6268
+ attr_accessor :index
6269
+
6270
+ # Required. The list of split keys, i.e., the split boundaries.
6271
+ # Corresponds to the JSON property `keys`
6272
+ # @return [Array<Google::Apis::SpannerV1::Key>]
6273
+ attr_accessor :keys
6274
+
6275
+ # The table to split.
6276
+ # Corresponds to the JSON property `table`
6277
+ # @return [String]
6278
+ attr_accessor :table
6279
+
6280
+ def initialize(**args)
6281
+ update!(**args)
6282
+ end
6283
+
6284
+ # Update properties of this object
6285
+ def update!(**args)
6286
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
6287
+ @index = args[:index] if args.key?(:index)
6288
+ @keys = args[:keys] if args.key?(:keys)
6289
+ @table = args[:table] if args.key?(:table)
6290
+ end
6291
+ end
6292
+
4192
6293
  # A single DML statement.
4193
6294
  class Statement
4194
6295
  include Google::Apis::Core::Hashable
@@ -4343,6 +6444,14 @@ module Google
4343
6444
  # @return [String]
4344
6445
  attr_accessor :id
4345
6446
 
6447
+ # When a read-write transaction is executed on a multiplexed session, this
6448
+ # precommit token is sent back to the client as a part of the [Transaction]
6449
+ # message in the BeginTransaction response and also as a part of the [ResultSet]
6450
+ # and [PartialResultSet] responses.
6451
+ # Corresponds to the JSON property `precommitToken`
6452
+ # @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
6453
+ attr_accessor :precommit_token
6454
+
4346
6455
  # For snapshot read-only transactions, the read timestamp chosen for the
4347
6456
  # transaction. Not returned by default: see TransactionOptions.ReadOnly.
4348
6457
  # return_read_timestamp. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to
@@ -4358,6 +6467,7 @@ module Google
4358
6467
  # Update properties of this object
4359
6468
  def update!(**args)
4360
6469
  @id = args[:id] if args.key?(:id)
6470
+ @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
4361
6471
  @read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp)
4362
6472
  end
4363
6473
  end
@@ -4378,7 +6488,7 @@ module Google
4378
6488
  # such that the read is guaranteed to see the effects of all transactions that
4379
6489
  # have committed before the start of the read). Snapshot read-only transactions
4380
6490
  # do not need to be committed. Queries on change streams must be performed with
4381
- # the snapshot read-only transaction mode, specifying a strong read. Please see
6491
+ # the snapshot read-only transaction mode, specifying a strong read. See
4382
6492
  # TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This
4383
6493
  # type of transaction is used to execute a single Partitioned DML statement.
4384
6494
  # Partitioned DML partitions the key space and runs the DML statement over each
@@ -4414,87 +6524,92 @@ module Google
4414
6524
  # committing the retry, the client should execute the retry in the same session
4415
6525
  # as the original attempt. The original session's lock priority increases with
4416
6526
  # each consecutive abort, meaning that each attempt has a slightly better chance
4417
- # of success than the previous. Under some circumstances (for example, many
4418
- # transactions attempting to modify the same row(s)), a transaction can abort
4419
- # many times in a short period before successfully committing. Thus, it is not a
4420
- # good idea to cap the number of retries a transaction can attempt; instead, it
4421
- # is better to limit the total amount of time spent retrying. Idle transactions:
4422
- # A transaction is considered idle if it has no outstanding reads or SQL queries
4423
- # and has not started a read or SQL query within the last 10 seconds. Idle
4424
- # transactions can be aborted by Cloud Spanner so that they don't hold on to
4425
- # locks indefinitely. If an idle transaction is aborted, the commit will fail
4426
- # with error `ABORTED`. If this behavior is undesirable, periodically executing
4427
- # a simple SQL query in the transaction (for example, `SELECT 1`) prevents the
4428
- # transaction from becoming idle. Snapshot read-only transactions: Snapshot read-
4429
- # only transactions provides a simpler method than locking read-write
4430
- # transactions for doing several consistent reads. However, this type of
4431
- # transaction does not support writes. Snapshot transactions do not take locks.
4432
- # Instead, they work by choosing a Cloud Spanner timestamp, then executing all
4433
- # reads at that timestamp. Since they do not acquire locks, they do not block
4434
- # concurrent read-write transactions. Unlike locking read-write transactions,
4435
- # snapshot read-only transactions never abort. They can fail if the chosen read
4436
- # timestamp is garbage collected; however, the default garbage collection policy
4437
- # is generous enough that most applications do not need to worry about this in
4438
- # practice. Snapshot read-only transactions do not need to call Commit or
4439
- # Rollback (and in fact are not permitted to do so). To execute a snapshot
4440
- # transaction, the client specifies a timestamp bound, which tells Cloud Spanner
4441
- # how to choose a read timestamp. The types of timestamp bound are: - Strong (
4442
- # the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner
4443
- # database to be read is geographically distributed, stale read-only
4444
- # transactions can execute more quickly than strong or read-write transactions,
4445
- # because they are able to execute far from the leader replica. Each type of
4446
- # timestamp bound is discussed in detail below. Strong: Strong reads are
4447
- # guaranteed to see the effects of all transactions that have committed before
4448
- # the start of the read. Furthermore, all rows yielded by a single read are
4449
- # consistent with each other -- if any part of the read observes a transaction,
4450
- # all parts of the read see the transaction. Strong reads are not repeatable:
4451
- # two consecutive strong read-only transactions might return inconsistent
4452
- # results if there are concurrent writes. If consistency across reads is
4453
- # required, the reads should be executed within a transaction or at an exact
4454
- # read timestamp. Queries on change streams (see below for more details) must
4455
- # also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.
4456
- # strong. Exact staleness: These timestamp bounds execute reads at a user-
4457
- # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
4458
- # prefix of the global transaction history: they observe modifications done by
4459
- # all transactions with a commit timestamp less than or equal to the read
4460
- # timestamp, and observe none of the modifications done by transactions with a
4461
- # larger commit timestamp. They will block until all conflicting transactions
4462
- # that may be assigned commit timestamps <= the read timestamp have finished.
4463
- # The timestamp can either be expressed as an absolute Cloud Spanner commit
4464
- # timestamp or a staleness relative to the current time. These modes do not
4465
- # require a "negotiation phase" to pick a timestamp. As a result, they execute
4466
- # slightly faster than the equivalent boundedly stale concurrency modes. On the
4467
- # other hand, boundedly stale reads usually return fresher results. See
4468
- # TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.
4469
- # exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud
4470
- # Spanner to pick the read timestamp, subject to a user-provided staleness bound.
4471
- # Cloud Spanner chooses the newest timestamp within the staleness bound that
4472
- # allows execution of the reads at the closest available replica without
4473
- # blocking. All rows yielded are consistent with each other -- if any part of
4474
- # the read observes a transaction, all parts of the read see the transaction.
4475
- # Boundedly stale reads are not repeatable: two stale reads, even if they use
4476
- # the same staleness bound, can execute at different timestamps and thus return
4477
- # inconsistent results. Boundedly stale reads execute in two phases: the first
4478
- # phase negotiates a timestamp among all replicas needed to serve the read. In
4479
- # the second phase, reads are executed at the negotiated timestamp. As a result
4480
- # of the two phase execution, bounded staleness reads are usually a little
4481
- # slower than comparable exact staleness reads. However, they are typically able
4482
- # to return fresher results, and are more likely to execute at the closest
4483
- # replica. Because the timestamp negotiation requires up-front knowledge of
4484
- # which rows will be read, it can only be used with single-use read-only
4485
- # transactions. See TransactionOptions.ReadOnly.max_staleness and
4486
- # TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and
4487
- # garbage collection: Cloud Spanner continuously garbage collects deleted and
4488
- # overwritten data in the background to reclaim storage space. This process is
4489
- # known as "version GC". By default, version GC reclaims versions after they are
4490
- # one hour old. Because of this, Cloud Spanner cannot perform reads at read
4491
- # timestamps more than one hour in the past. This restriction also applies to in-
4492
- # progress reads and/or SQL queries whose timestamp become too old while
4493
- # executing. Reads and SQL queries with too-old read timestamps fail with the
4494
- # error `FAILED_PRECONDITION`. You can configure and extend the `
4495
- # VERSION_RETENTION_PERIOD` of a database up to a period as long as one week,
4496
- # which allows Cloud Spanner to perform reads up to one week in the past.
4497
- # Querying change Streams: A Change Stream is a schema object that can be
6527
+ # of success than the previous. Note that the lock priority is preserved per
6528
+ # session (not per transaction). Lock priority is set by the first read or write
6529
+ # in the first attempt of a read-write transaction. If the application starts a
6530
+ # new session to retry the whole transaction, the transaction loses its original
6531
+ # lock priority. Moreover, the lock priority is only preserved if the
6532
+ # transaction fails with an `ABORTED` error. Under some circumstances (for
6533
+ # example, many transactions attempting to modify the same row(s)), a
6534
+ # transaction can abort many times in a short period before successfully
6535
+ # committing. Thus, it is not a good idea to cap the number of retries a
6536
+ # transaction can attempt; instead, it is better to limit the total amount of
6537
+ # time spent retrying. Idle transactions: A transaction is considered idle if it
6538
+ # has no outstanding reads or SQL queries and has not started a read or SQL
6539
+ # query within the last 10 seconds. Idle transactions can be aborted by Cloud
6540
+ # Spanner so that they don't hold on to locks indefinitely. If an idle
6541
+ # transaction is aborted, the commit will fail with error `ABORTED`. If this
6542
+ # behavior is undesirable, periodically executing a simple SQL query in the
6543
+ # transaction (for example, `SELECT 1`) prevents the transaction from becoming
6544
+ # idle. Snapshot read-only transactions: Snapshot read-only transactions
6545
+ # provides a simpler method than locking read-write transactions for doing
6546
+ # several consistent reads. However, this type of transaction does not support
6547
+ # writes. Snapshot transactions do not take locks. Instead, they work by
6548
+ # choosing a Cloud Spanner timestamp, then executing all reads at that timestamp.
6549
+ # Since they do not acquire locks, they do not block concurrent read-write
6550
+ # transactions. Unlike locking read-write transactions, snapshot read-only
6551
+ # transactions never abort. They can fail if the chosen read timestamp is
6552
+ # garbage collected; however, the default garbage collection policy is generous
6553
+ # enough that most applications do not need to worry about this in practice.
6554
+ # Snapshot read-only transactions do not need to call Commit or Rollback (and in
6555
+ # fact are not permitted to do so). To execute a snapshot transaction, the
6556
+ # client specifies a timestamp bound, which tells Cloud Spanner how to choose a
6557
+ # read timestamp. The types of timestamp bound are: - Strong (the default). -
6558
+ # Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read
6559
+ # is geographically distributed, stale read-only transactions can execute more
6560
+ # quickly than strong or read-write transactions, because they are able to
6561
+ # execute far from the leader replica. Each type of timestamp bound is discussed
6562
+ # in detail below. Strong: Strong reads are guaranteed to see the effects of all
6563
+ # transactions that have committed before the start of the read. Furthermore,
6564
+ # all rows yielded by a single read are consistent with each other -- if any
6565
+ # part of the read observes a transaction, all parts of the read see the
6566
+ # transaction. Strong reads are not repeatable: two consecutive strong read-only
6567
+ # transactions might return inconsistent results if there are concurrent writes.
6568
+ # If consistency across reads is required, the reads should be executed within a
6569
+ # transaction or at an exact read timestamp. Queries on change streams (see
6570
+ # below for more details) must also specify the strong read timestamp bound. See
6571
+ # TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds
6572
+ # execute reads at a user-specified timestamp. Reads at a timestamp are
6573
+ # guaranteed to see a consistent prefix of the global transaction history: they
6574
+ # observe modifications done by all transactions with a commit timestamp less
6575
+ # than or equal to the read timestamp, and observe none of the modifications
6576
+ # done by transactions with a larger commit timestamp. They will block until all
6577
+ # conflicting transactions that may be assigned commit timestamps <= the read
6578
+ # timestamp have finished. The timestamp can either be expressed as an absolute
6579
+ # Cloud Spanner commit timestamp or a staleness relative to the current time.
6580
+ # These modes do not require a "negotiation phase" to pick a timestamp. As a
6581
+ # result, they execute slightly faster than the equivalent boundedly stale
6582
+ # concurrency modes. On the other hand, boundedly stale reads usually return
6583
+ # fresher results. See TransactionOptions.ReadOnly.read_timestamp and
6584
+ # TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded
6585
+ # staleness modes allow Cloud Spanner to pick the read timestamp, subject to a
6586
+ # user-provided staleness bound. Cloud Spanner chooses the newest timestamp
6587
+ # within the staleness bound that allows execution of the reads at the closest
6588
+ # available replica without blocking. All rows yielded are consistent with each
6589
+ # other -- if any part of the read observes a transaction, all parts of the read
6590
+ # see the transaction. Boundedly stale reads are not repeatable: two stale reads,
6591
+ # even if they use the same staleness bound, can execute at different
6592
+ # timestamps and thus return inconsistent results. Boundedly stale reads execute
6593
+ # in two phases: the first phase negotiates a timestamp among all replicas
6594
+ # needed to serve the read. In the second phase, reads are executed at the
6595
+ # negotiated timestamp. As a result of the two phase execution, bounded
6596
+ # staleness reads are usually a little slower than comparable exact staleness
6597
+ # reads. However, they are typically able to return fresher results, and are
6598
+ # more likely to execute at the closest replica. Because the timestamp
6599
+ # negotiation requires up-front knowledge of which rows will be read, it can
6600
+ # only be used with single-use read-only transactions. See TransactionOptions.
6601
+ # ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old
6602
+ # read timestamps and garbage collection: Cloud Spanner continuously garbage
6603
+ # collects deleted and overwritten data in the background to reclaim storage
6604
+ # space. This process is known as "version GC". By default, version GC reclaims
6605
+ # versions after they are one hour old. Because of this, Cloud Spanner cannot
6606
+ # perform reads at read timestamps more than one hour in the past. This
6607
+ # restriction also applies to in-progress reads and/or SQL queries whose
6608
+ # timestamp become too old while executing. Reads and SQL queries with too-old
6609
+ # read timestamps fail with the error `FAILED_PRECONDITION`. You can configure
6610
+ # and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long
6611
+ # as one week, which allows Cloud Spanner to perform reads up to one week in the
6612
+ # past. Querying change Streams: A Change Stream is a schema object that can be
4498
6613
  # configured to watch data changes on the entire database, a set of tables, or a
4499
6614
  # set of columns in a database. When a change stream is created, Spanner
4500
6615
  # automatically defines a corresponding SQL Table-Valued Function (TVF) that can
@@ -4530,12 +6645,12 @@ module Google
4530
6645
  # of the table. Rather, the statement is applied atomically to partitions of the
4531
6646
  # table, in independent transactions. Secondary index rows are updated
4532
6647
  # atomically with the base table rows. - Partitioned DML does not guarantee
4533
- # exactly-once execution semantics against a partition. The statement will be
4534
- # applied at least once to each partition. It is strongly recommended that the
4535
- # DML statement should be idempotent to avoid unexpected results. For instance,
4536
- # it is potentially dangerous to run a statement such as `UPDATE table SET
4537
- # column = column + 1` as it could be run multiple times against some rows. -
4538
- # The partitions are committed automatically - there is no support for Commit or
6648
+ # exactly-once execution semantics against a partition. The statement is applied
6649
+ # at least once to each partition. It is strongly recommended that the DML
6650
+ # statement should be idempotent to avoid unexpected results. For instance, it
6651
+ # is potentially dangerous to run a statement such as `UPDATE table SET column =
6652
+ # column + 1` as it could be run multiple times against some rows. - The
6653
+ # partitions are committed automatically - there is no support for Commit or
4539
6654
  # Rollback. If the call returns an error, or if the client issuing the
4540
6655
  # ExecuteSql call dies, it is possible that some rows had the statement executed
4541
6656
  # on them successfully. It is also possible that statement was never executed
@@ -4552,6 +6667,22 @@ module Google
4552
6667
  class TransactionOptions
4553
6668
  include Google::Apis::Core::Hashable
4554
6669
 
6670
+ # When `exclude_txn_from_change_streams` is set to `true`: * Modifications from
6671
+ # this transaction will not be recorded in change streams with DDL option `
6672
+ # allow_txn_exclusion=true` that are tracking columns modified by these
6673
+ # transactions. * Modifications from this transaction will be recorded in change
6674
+ # streams with DDL option `allow_txn_exclusion=false or not set` that are
6675
+ # tracking columns modified by these transactions. When `
6676
+ # exclude_txn_from_change_streams` is set to `false` or not set, Modifications
6677
+ # from this transaction will be recorded in all change streams that are tracking
6678
+ # columns modified by these transactions. `exclude_txn_from_change_streams` may
6679
+ # only be specified for read-write or partitioned-dml transactions, otherwise
6680
+ # the API will return an `INVALID_ARGUMENT` error.
6681
+ # Corresponds to the JSON property `excludeTxnFromChangeStreams`
6682
+ # @return [Boolean]
6683
+ attr_accessor :exclude_txn_from_change_streams
6684
+ alias_method :exclude_txn_from_change_streams?, :exclude_txn_from_change_streams
6685
+
4555
6686
  # Message type to initiate a Partitioned DML transaction.
4556
6687
  # Corresponds to the JSON property `partitionedDml`
4557
6688
  # @return [Google::Apis::SpannerV1::PartitionedDml]
@@ -4574,6 +6705,7 @@ module Google
4574
6705
 
4575
6706
  # Update properties of this object
4576
6707
  def update!(**args)
6708
+ @exclude_txn_from_change_streams = args[:exclude_txn_from_change_streams] if args.key?(:exclude_txn_from_change_streams)
4577
6709
  @partitioned_dml = args[:partitioned_dml] if args.key?(:partitioned_dml)
4578
6710
  @read_only = args[:read_only] if args.key?(:read_only)
4579
6711
  @read_write = args[:read_write] if args.key?(:read_write)
@@ -4601,7 +6733,7 @@ module Google
4601
6733
  # such that the read is guaranteed to see the effects of all transactions that
4602
6734
  # have committed before the start of the read). Snapshot read-only transactions
4603
6735
  # do not need to be committed. Queries on change streams must be performed with
4604
- # the snapshot read-only transaction mode, specifying a strong read. Please see
6736
+ # the snapshot read-only transaction mode, specifying a strong read. See
4605
6737
  # TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This
4606
6738
  # type of transaction is used to execute a single Partitioned DML statement.
4607
6739
  # Partitioned DML partitions the key space and runs the DML statement over each
@@ -4637,87 +6769,92 @@ module Google
4637
6769
  # committing the retry, the client should execute the retry in the same session
4638
6770
  # as the original attempt. The original session's lock priority increases with
4639
6771
  # each consecutive abort, meaning that each attempt has a slightly better chance
4640
- # of success than the previous. Under some circumstances (for example, many
4641
- # transactions attempting to modify the same row(s)), a transaction can abort
4642
- # many times in a short period before successfully committing. Thus, it is not a
4643
- # good idea to cap the number of retries a transaction can attempt; instead, it
4644
- # is better to limit the total amount of time spent retrying. Idle transactions:
4645
- # A transaction is considered idle if it has no outstanding reads or SQL queries
4646
- # and has not started a read or SQL query within the last 10 seconds. Idle
4647
- # transactions can be aborted by Cloud Spanner so that they don't hold on to
4648
- # locks indefinitely. If an idle transaction is aborted, the commit will fail
4649
- # with error `ABORTED`. If this behavior is undesirable, periodically executing
4650
- # a simple SQL query in the transaction (for example, `SELECT 1`) prevents the
4651
- # transaction from becoming idle. Snapshot read-only transactions: Snapshot read-
4652
- # only transactions provides a simpler method than locking read-write
4653
- # transactions for doing several consistent reads. However, this type of
4654
- # transaction does not support writes. Snapshot transactions do not take locks.
4655
- # Instead, they work by choosing a Cloud Spanner timestamp, then executing all
4656
- # reads at that timestamp. Since they do not acquire locks, they do not block
4657
- # concurrent read-write transactions. Unlike locking read-write transactions,
4658
- # snapshot read-only transactions never abort. They can fail if the chosen read
4659
- # timestamp is garbage collected; however, the default garbage collection policy
4660
- # is generous enough that most applications do not need to worry about this in
4661
- # practice. Snapshot read-only transactions do not need to call Commit or
4662
- # Rollback (and in fact are not permitted to do so). To execute a snapshot
4663
- # transaction, the client specifies a timestamp bound, which tells Cloud Spanner
4664
- # how to choose a read timestamp. The types of timestamp bound are: - Strong (
4665
- # the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner
4666
- # database to be read is geographically distributed, stale read-only
4667
- # transactions can execute more quickly than strong or read-write transactions,
4668
- # because they are able to execute far from the leader replica. Each type of
4669
- # timestamp bound is discussed in detail below. Strong: Strong reads are
4670
- # guaranteed to see the effects of all transactions that have committed before
4671
- # the start of the read. Furthermore, all rows yielded by a single read are
4672
- # consistent with each other -- if any part of the read observes a transaction,
4673
- # all parts of the read see the transaction. Strong reads are not repeatable:
4674
- # two consecutive strong read-only transactions might return inconsistent
4675
- # results if there are concurrent writes. If consistency across reads is
4676
- # required, the reads should be executed within a transaction or at an exact
4677
- # read timestamp. Queries on change streams (see below for more details) must
4678
- # also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.
4679
- # strong. Exact staleness: These timestamp bounds execute reads at a user-
4680
- # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
4681
- # prefix of the global transaction history: they observe modifications done by
4682
- # all transactions with a commit timestamp less than or equal to the read
4683
- # timestamp, and observe none of the modifications done by transactions with a
4684
- # larger commit timestamp. They will block until all conflicting transactions
4685
- # that may be assigned commit timestamps <= the read timestamp have finished.
4686
- # The timestamp can either be expressed as an absolute Cloud Spanner commit
4687
- # timestamp or a staleness relative to the current time. These modes do not
4688
- # require a "negotiation phase" to pick a timestamp. As a result, they execute
4689
- # slightly faster than the equivalent boundedly stale concurrency modes. On the
4690
- # other hand, boundedly stale reads usually return fresher results. See
4691
- # TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.
4692
- # exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud
4693
- # Spanner to pick the read timestamp, subject to a user-provided staleness bound.
4694
- # Cloud Spanner chooses the newest timestamp within the staleness bound that
4695
- # allows execution of the reads at the closest available replica without
4696
- # blocking. All rows yielded are consistent with each other -- if any part of
4697
- # the read observes a transaction, all parts of the read see the transaction.
4698
- # Boundedly stale reads are not repeatable: two stale reads, even if they use
4699
- # the same staleness bound, can execute at different timestamps and thus return
4700
- # inconsistent results. Boundedly stale reads execute in two phases: the first
4701
- # phase negotiates a timestamp among all replicas needed to serve the read. In
4702
- # the second phase, reads are executed at the negotiated timestamp. As a result
4703
- # of the two phase execution, bounded staleness reads are usually a little
4704
- # slower than comparable exact staleness reads. However, they are typically able
4705
- # to return fresher results, and are more likely to execute at the closest
4706
- # replica. Because the timestamp negotiation requires up-front knowledge of
4707
- # which rows will be read, it can only be used with single-use read-only
4708
- # transactions. See TransactionOptions.ReadOnly.max_staleness and
4709
- # TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and
4710
- # garbage collection: Cloud Spanner continuously garbage collects deleted and
4711
- # overwritten data in the background to reclaim storage space. This process is
4712
- # known as "version GC". By default, version GC reclaims versions after they are
4713
- # one hour old. Because of this, Cloud Spanner cannot perform reads at read
4714
- # timestamps more than one hour in the past. This restriction also applies to in-
4715
- # progress reads and/or SQL queries whose timestamp become too old while
4716
- # executing. Reads and SQL queries with too-old read timestamps fail with the
4717
- # error `FAILED_PRECONDITION`. You can configure and extend the `
4718
- # VERSION_RETENTION_PERIOD` of a database up to a period as long as one week,
4719
- # which allows Cloud Spanner to perform reads up to one week in the past.
4720
- # Querying change Streams: A Change Stream is a schema object that can be
6772
+ # of success than the previous. Note that the lock priority is preserved per
6773
+ # session (not per transaction). Lock priority is set by the first read or write
6774
+ # in the first attempt of a read-write transaction. If the application starts a
6775
+ # new session to retry the whole transaction, the transaction loses its original
6776
+ # lock priority. Moreover, the lock priority is only preserved if the
6777
+ # transaction fails with an `ABORTED` error. Under some circumstances (for
6778
+ # example, many transactions attempting to modify the same row(s)), a
6779
+ # transaction can abort many times in a short period before successfully
6780
+ # committing. Thus, it is not a good idea to cap the number of retries a
6781
+ # transaction can attempt; instead, it is better to limit the total amount of
6782
+ # time spent retrying. Idle transactions: A transaction is considered idle if it
6783
+ # has no outstanding reads or SQL queries and has not started a read or SQL
6784
+ # query within the last 10 seconds. Idle transactions can be aborted by Cloud
6785
+ # Spanner so that they don't hold on to locks indefinitely. If an idle
6786
+ # transaction is aborted, the commit will fail with error `ABORTED`. If this
6787
+ # behavior is undesirable, periodically executing a simple SQL query in the
6788
+ # transaction (for example, `SELECT 1`) prevents the transaction from becoming
6789
+ # idle. Snapshot read-only transactions: Snapshot read-only transactions
6790
+ # provides a simpler method than locking read-write transactions for doing
6791
+ # several consistent reads. However, this type of transaction does not support
6792
+ # writes. Snapshot transactions do not take locks. Instead, they work by
6793
+ # choosing a Cloud Spanner timestamp, then executing all reads at that timestamp.
6794
+ # Since they do not acquire locks, they do not block concurrent read-write
6795
+ # transactions. Unlike locking read-write transactions, snapshot read-only
6796
+ # transactions never abort. They can fail if the chosen read timestamp is
6797
+ # garbage collected; however, the default garbage collection policy is generous
6798
+ # enough that most applications do not need to worry about this in practice.
6799
+ # Snapshot read-only transactions do not need to call Commit or Rollback (and in
6800
+ # fact are not permitted to do so). To execute a snapshot transaction, the
6801
+ # client specifies a timestamp bound, which tells Cloud Spanner how to choose a
6802
+ # read timestamp. The types of timestamp bound are: - Strong (the default). -
6803
+ # Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read
6804
+ # is geographically distributed, stale read-only transactions can execute more
6805
+ # quickly than strong or read-write transactions, because they are able to
6806
+ # execute far from the leader replica. Each type of timestamp bound is discussed
6807
+ # in detail below. Strong: Strong reads are guaranteed to see the effects of all
6808
+ # transactions that have committed before the start of the read. Furthermore,
6809
+ # all rows yielded by a single read are consistent with each other -- if any
6810
+ # part of the read observes a transaction, all parts of the read see the
6811
+ # transaction. Strong reads are not repeatable: two consecutive strong read-only
6812
+ # transactions might return inconsistent results if there are concurrent writes.
6813
+ # If consistency across reads is required, the reads should be executed within a
6814
+ # transaction or at an exact read timestamp. Queries on change streams (see
6815
+ # below for more details) must also specify the strong read timestamp bound. See
6816
+ # TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds
6817
+ # execute reads at a user-specified timestamp. Reads at a timestamp are
6818
+ # guaranteed to see a consistent prefix of the global transaction history: they
6819
+ # observe modifications done by all transactions with a commit timestamp less
6820
+ # than or equal to the read timestamp, and observe none of the modifications
6821
+ # done by transactions with a larger commit timestamp. They will block until all
6822
+ # conflicting transactions that may be assigned commit timestamps <= the read
6823
+ # timestamp have finished. The timestamp can either be expressed as an absolute
6824
+ # Cloud Spanner commit timestamp or a staleness relative to the current time.
6825
+ # These modes do not require a "negotiation phase" to pick a timestamp. As a
6826
+ # result, they execute slightly faster than the equivalent boundedly stale
6827
+ # concurrency modes. On the other hand, boundedly stale reads usually return
6828
+ # fresher results. See TransactionOptions.ReadOnly.read_timestamp and
6829
+ # TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded
6830
+ # staleness modes allow Cloud Spanner to pick the read timestamp, subject to a
6831
+ # user-provided staleness bound. Cloud Spanner chooses the newest timestamp
6832
+ # within the staleness bound that allows execution of the reads at the closest
6833
+ # available replica without blocking. All rows yielded are consistent with each
6834
+ # other -- if any part of the read observes a transaction, all parts of the read
6835
+ # see the transaction. Boundedly stale reads are not repeatable: two stale reads,
6836
+ # even if they use the same staleness bound, can execute at different
6837
+ # timestamps and thus return inconsistent results. Boundedly stale reads execute
6838
+ # in two phases: the first phase negotiates a timestamp among all replicas
6839
+ # needed to serve the read. In the second phase, reads are executed at the
6840
+ # negotiated timestamp. As a result of the two phase execution, bounded
6841
+ # staleness reads are usually a little slower than comparable exact staleness
6842
+ # reads. However, they are typically able to return fresher results, and are
6843
+ # more likely to execute at the closest replica. Because the timestamp
6844
+ # negotiation requires up-front knowledge of which rows will be read, it can
6845
+ # only be used with single-use read-only transactions. See TransactionOptions.
6846
+ # ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old
6847
+ # read timestamps and garbage collection: Cloud Spanner continuously garbage
6848
+ # collects deleted and overwritten data in the background to reclaim storage
6849
+ # space. This process is known as "version GC". By default, version GC reclaims
6850
+ # versions after they are one hour old. Because of this, Cloud Spanner cannot
6851
+ # perform reads at read timestamps more than one hour in the past. This
6852
+ # restriction also applies to in-progress reads and/or SQL queries whose
6853
+ # timestamp become too old while executing. Reads and SQL queries with too-old
6854
+ # read timestamps fail with the error `FAILED_PRECONDITION`. You can configure
6855
+ # and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long
6856
+ # as one week, which allows Cloud Spanner to perform reads up to one week in the
6857
+ # past. Querying change Streams: A Change Stream is a schema object that can be
4721
6858
  # configured to watch data changes on the entire database, a set of tables, or a
4722
6859
  # set of columns in a database. When a change stream is created, Spanner
4723
6860
  # automatically defines a corresponding SQL Table-Valued Function (TVF) that can
@@ -4753,12 +6890,12 @@ module Google
4753
6890
  # of the table. Rather, the statement is applied atomically to partitions of the
4754
6891
  # table, in independent transactions. Secondary index rows are updated
4755
6892
  # atomically with the base table rows. - Partitioned DML does not guarantee
4756
- # exactly-once execution semantics against a partition. The statement will be
4757
- # applied at least once to each partition. It is strongly recommended that the
4758
- # DML statement should be idempotent to avoid unexpected results. For instance,
4759
- # it is potentially dangerous to run a statement such as `UPDATE table SET
4760
- # column = column + 1` as it could be run multiple times against some rows. -
4761
- # The partitions are committed automatically - there is no support for Commit or
6893
+ # exactly-once execution semantics against a partition. The statement is applied
6894
+ # at least once to each partition. It is strongly recommended that the DML
6895
+ # statement should be idempotent to avoid unexpected results. For instance, it
6896
+ # is potentially dangerous to run a statement such as `UPDATE table SET column =
6897
+ # column + 1` as it could be run multiple times against some rows. - The
6898
+ # partitions are committed automatically - there is no support for Commit or
4762
6899
  # Rollback. If the call returns an error, or if the client issuing the
4763
6900
  # ExecuteSql call dies, it is possible that some rows had the statement executed
4764
6901
  # on them successfully. It is also possible that statement was never executed
@@ -4798,7 +6935,7 @@ module Google
4798
6935
  # such that the read is guaranteed to see the effects of all transactions that
4799
6936
  # have committed before the start of the read). Snapshot read-only transactions
4800
6937
  # do not need to be committed. Queries on change streams must be performed with
4801
- # the snapshot read-only transaction mode, specifying a strong read. Please see
6938
+ # the snapshot read-only transaction mode, specifying a strong read. See
4802
6939
  # TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This
4803
6940
  # type of transaction is used to execute a single Partitioned DML statement.
4804
6941
  # Partitioned DML partitions the key space and runs the DML statement over each
@@ -4834,87 +6971,92 @@ module Google
4834
6971
  # committing the retry, the client should execute the retry in the same session
4835
6972
  # as the original attempt. The original session's lock priority increases with
4836
6973
  # each consecutive abort, meaning that each attempt has a slightly better chance
4837
- # of success than the previous. Under some circumstances (for example, many
4838
- # transactions attempting to modify the same row(s)), a transaction can abort
4839
- # many times in a short period before successfully committing. Thus, it is not a
4840
- # good idea to cap the number of retries a transaction can attempt; instead, it
4841
- # is better to limit the total amount of time spent retrying. Idle transactions:
4842
- # A transaction is considered idle if it has no outstanding reads or SQL queries
4843
- # and has not started a read or SQL query within the last 10 seconds. Idle
4844
- # transactions can be aborted by Cloud Spanner so that they don't hold on to
4845
- # locks indefinitely. If an idle transaction is aborted, the commit will fail
4846
- # with error `ABORTED`. If this behavior is undesirable, periodically executing
4847
- # a simple SQL query in the transaction (for example, `SELECT 1`) prevents the
4848
- # transaction from becoming idle. Snapshot read-only transactions: Snapshot read-
4849
- # only transactions provides a simpler method than locking read-write
4850
- # transactions for doing several consistent reads. However, this type of
4851
- # transaction does not support writes. Snapshot transactions do not take locks.
4852
- # Instead, they work by choosing a Cloud Spanner timestamp, then executing all
4853
- # reads at that timestamp. Since they do not acquire locks, they do not block
4854
- # concurrent read-write transactions. Unlike locking read-write transactions,
4855
- # snapshot read-only transactions never abort. They can fail if the chosen read
4856
- # timestamp is garbage collected; however, the default garbage collection policy
4857
- # is generous enough that most applications do not need to worry about this in
4858
- # practice. Snapshot read-only transactions do not need to call Commit or
4859
- # Rollback (and in fact are not permitted to do so). To execute a snapshot
4860
- # transaction, the client specifies a timestamp bound, which tells Cloud Spanner
4861
- # how to choose a read timestamp. The types of timestamp bound are: - Strong (
4862
- # the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner
4863
- # database to be read is geographically distributed, stale read-only
4864
- # transactions can execute more quickly than strong or read-write transactions,
4865
- # because they are able to execute far from the leader replica. Each type of
4866
- # timestamp bound is discussed in detail below. Strong: Strong reads are
4867
- # guaranteed to see the effects of all transactions that have committed before
4868
- # the start of the read. Furthermore, all rows yielded by a single read are
4869
- # consistent with each other -- if any part of the read observes a transaction,
4870
- # all parts of the read see the transaction. Strong reads are not repeatable:
4871
- # two consecutive strong read-only transactions might return inconsistent
4872
- # results if there are concurrent writes. If consistency across reads is
4873
- # required, the reads should be executed within a transaction or at an exact
4874
- # read timestamp. Queries on change streams (see below for more details) must
4875
- # also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.
4876
- # strong. Exact staleness: These timestamp bounds execute reads at a user-
4877
- # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
4878
- # prefix of the global transaction history: they observe modifications done by
4879
- # all transactions with a commit timestamp less than or equal to the read
4880
- # timestamp, and observe none of the modifications done by transactions with a
4881
- # larger commit timestamp. They will block until all conflicting transactions
4882
- # that may be assigned commit timestamps <= the read timestamp have finished.
4883
- # The timestamp can either be expressed as an absolute Cloud Spanner commit
4884
- # timestamp or a staleness relative to the current time. These modes do not
4885
- # require a "negotiation phase" to pick a timestamp. As a result, they execute
4886
- # slightly faster than the equivalent boundedly stale concurrency modes. On the
4887
- # other hand, boundedly stale reads usually return fresher results. See
4888
- # TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.
4889
- # exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud
4890
- # Spanner to pick the read timestamp, subject to a user-provided staleness bound.
4891
- # Cloud Spanner chooses the newest timestamp within the staleness bound that
4892
- # allows execution of the reads at the closest available replica without
4893
- # blocking. All rows yielded are consistent with each other -- if any part of
4894
- # the read observes a transaction, all parts of the read see the transaction.
4895
- # Boundedly stale reads are not repeatable: two stale reads, even if they use
4896
- # the same staleness bound, can execute at different timestamps and thus return
4897
- # inconsistent results. Boundedly stale reads execute in two phases: the first
4898
- # phase negotiates a timestamp among all replicas needed to serve the read. In
4899
- # the second phase, reads are executed at the negotiated timestamp. As a result
4900
- # of the two phase execution, bounded staleness reads are usually a little
4901
- # slower than comparable exact staleness reads. However, they are typically able
4902
- # to return fresher results, and are more likely to execute at the closest
4903
- # replica. Because the timestamp negotiation requires up-front knowledge of
4904
- # which rows will be read, it can only be used with single-use read-only
4905
- # transactions. See TransactionOptions.ReadOnly.max_staleness and
4906
- # TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and
4907
- # garbage collection: Cloud Spanner continuously garbage collects deleted and
4908
- # overwritten data in the background to reclaim storage space. This process is
4909
- # known as "version GC". By default, version GC reclaims versions after they are
4910
- # one hour old. Because of this, Cloud Spanner cannot perform reads at read
4911
- # timestamps more than one hour in the past. This restriction also applies to in-
4912
- # progress reads and/or SQL queries whose timestamp become too old while
4913
- # executing. Reads and SQL queries with too-old read timestamps fail with the
4914
- # error `FAILED_PRECONDITION`. You can configure and extend the `
4915
- # VERSION_RETENTION_PERIOD` of a database up to a period as long as one week,
4916
- # which allows Cloud Spanner to perform reads up to one week in the past.
4917
- # Querying change Streams: A Change Stream is a schema object that can be
6974
+ # of success than the previous. Note that the lock priority is preserved per
6975
+ # session (not per transaction). Lock priority is set by the first read or write
6976
+ # in the first attempt of a read-write transaction. If the application starts a
6977
+ # new session to retry the whole transaction, the transaction loses its original
6978
+ # lock priority. Moreover, the lock priority is only preserved if the
6979
+ # transaction fails with an `ABORTED` error. Under some circumstances (for
6980
+ # example, many transactions attempting to modify the same row(s)), a
6981
+ # transaction can abort many times in a short period before successfully
6982
+ # committing. Thus, it is not a good idea to cap the number of retries a
6983
+ # transaction can attempt; instead, it is better to limit the total amount of
6984
+ # time spent retrying. Idle transactions: A transaction is considered idle if it
6985
+ # has no outstanding reads or SQL queries and has not started a read or SQL
6986
+ # query within the last 10 seconds. Idle transactions can be aborted by Cloud
6987
+ # Spanner so that they don't hold on to locks indefinitely. If an idle
6988
+ # transaction is aborted, the commit will fail with error `ABORTED`. If this
6989
+ # behavior is undesirable, periodically executing a simple SQL query in the
6990
+ # transaction (for example, `SELECT 1`) prevents the transaction from becoming
6991
+ # idle. Snapshot read-only transactions: Snapshot read-only transactions
6992
+ # provides a simpler method than locking read-write transactions for doing
6993
+ # several consistent reads. However, this type of transaction does not support
6994
+ # writes. Snapshot transactions do not take locks. Instead, they work by
6995
+ # choosing a Cloud Spanner timestamp, then executing all reads at that timestamp.
6996
+ # Since they do not acquire locks, they do not block concurrent read-write
6997
+ # transactions. Unlike locking read-write transactions, snapshot read-only
6998
+ # transactions never abort. They can fail if the chosen read timestamp is
6999
+ # garbage collected; however, the default garbage collection policy is generous
7000
+ # enough that most applications do not need to worry about this in practice.
7001
+ # Snapshot read-only transactions do not need to call Commit or Rollback (and in
7002
+ # fact are not permitted to do so). To execute a snapshot transaction, the
7003
+ # client specifies a timestamp bound, which tells Cloud Spanner how to choose a
7004
+ # read timestamp. The types of timestamp bound are: - Strong (the default). -
7005
+ # Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read
7006
+ # is geographically distributed, stale read-only transactions can execute more
7007
+ # quickly than strong or read-write transactions, because they are able to
7008
+ # execute far from the leader replica. Each type of timestamp bound is discussed
7009
+ # in detail below. Strong: Strong reads are guaranteed to see the effects of all
7010
+ # transactions that have committed before the start of the read. Furthermore,
7011
+ # all rows yielded by a single read are consistent with each other -- if any
7012
+ # part of the read observes a transaction, all parts of the read see the
7013
+ # transaction. Strong reads are not repeatable: two consecutive strong read-only
7014
+ # transactions might return inconsistent results if there are concurrent writes.
7015
+ # If consistency across reads is required, the reads should be executed within a
7016
+ # transaction or at an exact read timestamp. Queries on change streams (see
7017
+ # below for more details) must also specify the strong read timestamp bound. See
7018
+ # TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds
7019
+ # execute reads at a user-specified timestamp. Reads at a timestamp are
7020
+ # guaranteed to see a consistent prefix of the global transaction history: they
7021
+ # observe modifications done by all transactions with a commit timestamp less
7022
+ # than or equal to the read timestamp, and observe none of the modifications
7023
+ # done by transactions with a larger commit timestamp. They will block until all
7024
+ # conflicting transactions that may be assigned commit timestamps <= the read
7025
+ # timestamp have finished. The timestamp can either be expressed as an absolute
7026
+ # Cloud Spanner commit timestamp or a staleness relative to the current time.
7027
+ # These modes do not require a "negotiation phase" to pick a timestamp. As a
7028
+ # result, they execute slightly faster than the equivalent boundedly stale
7029
+ # concurrency modes. On the other hand, boundedly stale reads usually return
7030
+ # fresher results. See TransactionOptions.ReadOnly.read_timestamp and
7031
+ # TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded
7032
+ # staleness modes allow Cloud Spanner to pick the read timestamp, subject to a
7033
+ # user-provided staleness bound. Cloud Spanner chooses the newest timestamp
7034
+ # within the staleness bound that allows execution of the reads at the closest
7035
+ # available replica without blocking. All rows yielded are consistent with each
7036
+ # other -- if any part of the read observes a transaction, all parts of the read
7037
+ # see the transaction. Boundedly stale reads are not repeatable: two stale reads,
7038
+ # even if they use the same staleness bound, can execute at different
7039
+ # timestamps and thus return inconsistent results. Boundedly stale reads execute
7040
+ # in two phases: the first phase negotiates a timestamp among all replicas
7041
+ # needed to serve the read. In the second phase, reads are executed at the
7042
+ # negotiated timestamp. As a result of the two phase execution, bounded
7043
+ # staleness reads are usually a little slower than comparable exact staleness
7044
+ # reads. However, they are typically able to return fresher results, and are
7045
+ # more likely to execute at the closest replica. Because the timestamp
7046
+ # negotiation requires up-front knowledge of which rows will be read, it can
7047
+ # only be used with single-use read-only transactions. See TransactionOptions.
7048
+ # ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old
7049
+ # read timestamps and garbage collection: Cloud Spanner continuously garbage
7050
+ # collects deleted and overwritten data in the background to reclaim storage
7051
+ # space. This process is known as "version GC". By default, version GC reclaims
7052
+ # versions after they are one hour old. Because of this, Cloud Spanner cannot
7053
+ # perform reads at read timestamps more than one hour in the past. This
7054
+ # restriction also applies to in-progress reads and/or SQL queries whose
7055
+ # timestamp become too old while executing. Reads and SQL queries with too-old
7056
+ # read timestamps fail with the error `FAILED_PRECONDITION`. You can configure
7057
+ # and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long
7058
+ # as one week, which allows Cloud Spanner to perform reads up to one week in the
7059
+ # past. Querying change Streams: A Change Stream is a schema object that can be
4918
7060
  # configured to watch data changes on the entire database, a set of tables, or a
4919
7061
  # set of columns in a database. When a change stream is created, Spanner
4920
7062
  # automatically defines a corresponding SQL Table-Valued Function (TVF) that can
@@ -4950,12 +7092,12 @@ module Google
4950
7092
  # of the table. Rather, the statement is applied atomically to partitions of the
4951
7093
  # table, in independent transactions. Secondary index rows are updated
4952
7094
  # atomically with the base table rows. - Partitioned DML does not guarantee
4953
- # exactly-once execution semantics against a partition. The statement will be
4954
- # applied at least once to each partition. It is strongly recommended that the
4955
- # DML statement should be idempotent to avoid unexpected results. For instance,
4956
- # it is potentially dangerous to run a statement such as `UPDATE table SET
4957
- # column = column + 1` as it could be run multiple times against some rows. -
4958
- # The partitions are committed automatically - there is no support for Commit or
7095
+ # exactly-once execution semantics against a partition. The statement is applied
7096
+ # at least once to each partition. It is strongly recommended that the DML
7097
+ # statement should be idempotent to avoid unexpected results. For instance, it
7098
+ # is potentially dangerous to run a statement such as `UPDATE table SET column =
7099
+ # column + 1` as it could be run multiple times against some rows. - The
7100
+ # partitions are committed automatically - there is no support for Commit or
4959
7101
  # Rollback. If the call returns an error, or if the client issuing the
4960
7102
  # ExecuteSql call dies, it is possible that some rows had the statement executed
4961
7103
  # on them successfully. It is also possible that statement was never executed
@@ -5001,6 +7143,12 @@ module Google
5001
7143
  # @return [String]
5002
7144
  attr_accessor :code
5003
7145
 
7146
+ # If code == PROTO or code == ENUM, then `proto_type_fqn` is the fully qualified
7147
+ # name of the proto type representing the proto/enum definition.
7148
+ # Corresponds to the JSON property `protoTypeFqn`
7149
+ # @return [String]
7150
+ attr_accessor :proto_type_fqn
7151
+
5004
7152
  # `StructType` defines the fields of a STRUCT type.
5005
7153
  # Corresponds to the JSON property `structType`
5006
7154
  # @return [Google::Apis::SpannerV1::StructType]
@@ -5024,6 +7172,7 @@ module Google
5024
7172
  def update!(**args)
5025
7173
  @array_element_type = args[:array_element_type] if args.key?(:array_element_type)
5026
7174
  @code = args[:code] if args.key?(:code)
7175
+ @proto_type_fqn = args[:proto_type_fqn] if args.key?(:proto_type_fqn)
5027
7176
  @struct_type = args[:struct_type] if args.key?(:struct_type)
5028
7177
  @type_annotation = args[:type_annotation] if args.key?(:type_annotation)
5029
7178
  end
@@ -5033,6 +7182,12 @@ module Google
5033
7182
  class UpdateDatabaseDdlMetadata
5034
7183
  include Google::Apis::Core::Hashable
5035
7184
 
7185
+ # The brief action info for the DDL statements. `actions[i]` is the brief info
7186
+ # for `statements[i]`.
7187
+ # Corresponds to the JSON property `actions`
7188
+ # @return [Array<Google::Apis::SpannerV1::DdlStatementActionInfo>]
7189
+ attr_accessor :actions
7190
+
5036
7191
  # Reports the commit timestamps of all statements that have succeeded so far,
5037
7192
  # where `commit_timestamps[i]` is the commit timestamp for the statement `
5038
7193
  # statements[i]`.
@@ -5045,12 +7200,11 @@ module Google
5045
7200
  # @return [String]
5046
7201
  attr_accessor :database
5047
7202
 
5048
- # The progress of the UpdateDatabaseDdl operations. Currently, only index
5049
- # creation statements will have a continuously updating progress. For non-index
5050
- # creation statements, `progress[i]` will have start time and end time populated
5051
- # with commit timestamp of operation, as well as a progress of 100% once the
5052
- # operation has completed. `progress[i]` is the operation progress for `
5053
- # statements[i]`.
7203
+ # The progress of the UpdateDatabaseDdl operations. All DDL statements will have
7204
+ # continuously updating progress, and `progress[i]` is the operation progress
7205
+ # for `statements[i]`. Also, `progress[i]` will have start time and end time
7206
+ # populated with commit timestamp of operation, as well as a progress of 100%
7207
+ # once the operation has completed.
5054
7208
  # Corresponds to the JSON property `progress`
5055
7209
  # @return [Array<Google::Apis::SpannerV1::OperationProgress>]
5056
7210
  attr_accessor :progress
@@ -5061,7 +7215,7 @@ module Google
5061
7215
  # @return [Array<String>]
5062
7216
  attr_accessor :statements
5063
7217
 
5064
- # Output only. When true, indicates that the operation is throttled e.g due to
7218
+ # Output only. When true, indicates that the operation is throttled e.g. due to
5065
7219
  # resource constraints. When resources become available the operation will
5066
7220
  # resume and this field will be false again.
5067
7221
  # Corresponds to the JSON property `throttled`
@@ -5075,6 +7229,7 @@ module Google
5075
7229
 
5076
7230
  # Update properties of this object
5077
7231
  def update!(**args)
7232
+ @actions = args[:actions] if args.key?(:actions)
5078
7233
  @commit_timestamps = args[:commit_timestamps] if args.key?(:commit_timestamps)
5079
7234
  @database = args[:database] if args.key?(:database)
5080
7235
  @progress = args[:progress] if args.key?(:progress)
@@ -5102,7 +7257,7 @@ module Google
5102
7257
  # resulting Operation. Specifying an explicit operation ID simplifies
5103
7258
  # determining whether the statements were executed in the event that the
5104
7259
  # UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the
5105
- # database and `operation_id` fields can be combined to form the name of the
7260
+ # database and `operation_id` fields can be combined to form the `name` of the
5106
7261
  # resulting longrunning.Operation: `/operations/`. `operation_id` should be
5107
7262
  # unique within the database, and must be a valid identifier: `a-z*`. Note that
5108
7263
  # automatically-generated operation IDs always begin with an underscore. If the
@@ -5111,6 +7266,21 @@ module Google
5111
7266
  # @return [String]
5112
7267
  attr_accessor :operation_id
5113
7268
 
7269
+ # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
7270
+ # Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://
7271
+ # github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.
7272
+ # proto). To generate it, [install](https://grpc.io/docs/protoc-installation/)
7273
+ # and run `protoc` with --include_imports and --descriptor_set_out. For example,
7274
+ # to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --
7275
+ # proto_path=/lib_path \ --include_imports \ --descriptor_set_out=descriptors.
7276
+ # data \ moon/shot/app.proto ``` For more details, see protobuffer [self
7277
+ # description](https://developers.google.com/protocol-buffers/docs/techniques#
7278
+ # self-description).
7279
+ # Corresponds to the JSON property `protoDescriptors`
7280
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
7281
+ # @return [String]
7282
+ attr_accessor :proto_descriptors
7283
+
5114
7284
  # Required. DDL statements to be applied to the database.
5115
7285
  # Corresponds to the JSON property `statements`
5116
7286
  # @return [Array<String>]
@@ -5123,10 +7293,140 @@ module Google
5123
7293
  # Update properties of this object
5124
7294
  def update!(**args)
5125
7295
  @operation_id = args[:operation_id] if args.key?(:operation_id)
7296
+ @proto_descriptors = args[:proto_descriptors] if args.key?(:proto_descriptors)
5126
7297
  @statements = args[:statements] if args.key?(:statements)
5127
7298
  end
5128
7299
  end
5129
7300
 
7301
+ # Metadata type for the operation returned by UpdateDatabase.
7302
+ class UpdateDatabaseMetadata
7303
+ include Google::Apis::Core::Hashable
7304
+
7305
+ # The time at which this operation was cancelled. If set, this operation is in
7306
+ # the process of undoing itself (which is best-effort).
7307
+ # Corresponds to the JSON property `cancelTime`
7308
+ # @return [String]
7309
+ attr_accessor :cancel_time
7310
+
7311
+ # Encapsulates progress related information for a Cloud Spanner long running
7312
+ # operation.
7313
+ # Corresponds to the JSON property `progress`
7314
+ # @return [Google::Apis::SpannerV1::OperationProgress]
7315
+ attr_accessor :progress
7316
+
7317
+ # The request for UpdateDatabase.
7318
+ # Corresponds to the JSON property `request`
7319
+ # @return [Google::Apis::SpannerV1::UpdateDatabaseRequest]
7320
+ attr_accessor :request
7321
+
7322
+ def initialize(**args)
7323
+ update!(**args)
7324
+ end
7325
+
7326
+ # Update properties of this object
7327
+ def update!(**args)
7328
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
7329
+ @progress = args[:progress] if args.key?(:progress)
7330
+ @request = args[:request] if args.key?(:request)
7331
+ end
7332
+ end
7333
+
7334
+ # The request for UpdateDatabase.
7335
+ class UpdateDatabaseRequest
7336
+ include Google::Apis::Core::Hashable
7337
+
7338
+ # A Cloud Spanner database.
7339
+ # Corresponds to the JSON property `database`
7340
+ # @return [Google::Apis::SpannerV1::Database]
7341
+ attr_accessor :database
7342
+
7343
+ # Required. The list of fields to update. Currently, only `
7344
+ # enable_drop_protection` field can be updated.
7345
+ # Corresponds to the JSON property `updateMask`
7346
+ # @return [String]
7347
+ attr_accessor :update_mask
7348
+
7349
+ def initialize(**args)
7350
+ update!(**args)
7351
+ end
7352
+
7353
+ # Update properties of this object
7354
+ def update!(**args)
7355
+ @database = args[:database] if args.key?(:database)
7356
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
7357
+ end
7358
+ end
7359
+
7360
+ # Metadata type for the operation returned by UpdateInstanceConfig.
7361
+ class UpdateInstanceConfigMetadata
7362
+ include Google::Apis::Core::Hashable
7363
+
7364
+ # The time at which this operation was cancelled.
7365
+ # Corresponds to the JSON property `cancelTime`
7366
+ # @return [String]
7367
+ attr_accessor :cancel_time
7368
+
7369
+ # A possible configuration for a Cloud Spanner instance. Configurations define
7370
+ # the geographic placement of nodes and their replication.
7371
+ # Corresponds to the JSON property `instanceConfig`
7372
+ # @return [Google::Apis::SpannerV1::InstanceConfig]
7373
+ attr_accessor :instance_config
7374
+
7375
+ # Encapsulates progress related information for a Cloud Spanner long running
7376
+ # instance operations.
7377
+ # Corresponds to the JSON property `progress`
7378
+ # @return [Google::Apis::SpannerV1::InstanceOperationProgress]
7379
+ attr_accessor :progress
7380
+
7381
+ def initialize(**args)
7382
+ update!(**args)
7383
+ end
7384
+
7385
+ # Update properties of this object
7386
+ def update!(**args)
7387
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
7388
+ @instance_config = args[:instance_config] if args.key?(:instance_config)
7389
+ @progress = args[:progress] if args.key?(:progress)
7390
+ end
7391
+ end
7392
+
7393
+ # The request for UpdateInstanceConfig.
7394
+ class UpdateInstanceConfigRequest
7395
+ include Google::Apis::Core::Hashable
7396
+
7397
+ # A possible configuration for a Cloud Spanner instance. Configurations define
7398
+ # the geographic placement of nodes and their replication.
7399
+ # Corresponds to the JSON property `instanceConfig`
7400
+ # @return [Google::Apis::SpannerV1::InstanceConfig]
7401
+ attr_accessor :instance_config
7402
+
7403
+ # Required. A mask specifying which fields in InstanceConfig should be updated.
7404
+ # The field mask must always be specified; this prevents any future fields in
7405
+ # InstanceConfig from being erased accidentally by clients that do not know
7406
+ # about them. Only display_name and labels can be updated.
7407
+ # Corresponds to the JSON property `updateMask`
7408
+ # @return [String]
7409
+ attr_accessor :update_mask
7410
+
7411
+ # An option to validate, but not actually execute, a request, and provide the
7412
+ # same response.
7413
+ # Corresponds to the JSON property `validateOnly`
7414
+ # @return [Boolean]
7415
+ attr_accessor :validate_only
7416
+ alias_method :validate_only?, :validate_only
7417
+
7418
+ def initialize(**args)
7419
+ update!(**args)
7420
+ end
7421
+
7422
+ # Update properties of this object
7423
+ def update!(**args)
7424
+ @instance_config = args[:instance_config] if args.key?(:instance_config)
7425
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
7426
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
7427
+ end
7428
+ end
7429
+
5130
7430
  # Metadata type for the operation returned by UpdateInstance.
5131
7431
  class UpdateInstanceMetadata
5132
7432
  include Google::Apis::Core::Hashable
@@ -5143,6 +7443,11 @@ module Google
5143
7443
  # @return [String]
5144
7444
  attr_accessor :end_time
5145
7445
 
7446
+ # The expected fulfillment period of this update operation.
7447
+ # Corresponds to the JSON property `expectedFulfillmentPeriod`
7448
+ # @return [String]
7449
+ attr_accessor :expected_fulfillment_period
7450
+
5146
7451
  # An isolated set of Cloud Spanner resources on which databases can be hosted.
5147
7452
  # Corresponds to the JSON property `instance`
5148
7453
  # @return [Google::Apis::SpannerV1::Instance]
@@ -5161,11 +7466,81 @@ module Google
5161
7466
  def update!(**args)
5162
7467
  @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
5163
7468
  @end_time = args[:end_time] if args.key?(:end_time)
7469
+ @expected_fulfillment_period = args[:expected_fulfillment_period] if args.key?(:expected_fulfillment_period)
5164
7470
  @instance = args[:instance] if args.key?(:instance)
5165
7471
  @start_time = args[:start_time] if args.key?(:start_time)
5166
7472
  end
5167
7473
  end
5168
7474
 
7475
+ # Metadata type for the operation returned by UpdateInstancePartition.
7476
+ class UpdateInstancePartitionMetadata
7477
+ include Google::Apis::Core::Hashable
7478
+
7479
+ # The time at which this operation was cancelled. If set, this operation is in
7480
+ # the process of undoing itself (which is guaranteed to succeed) and cannot be
7481
+ # cancelled again.
7482
+ # Corresponds to the JSON property `cancelTime`
7483
+ # @return [String]
7484
+ attr_accessor :cancel_time
7485
+
7486
+ # The time at which this operation failed or was completed successfully.
7487
+ # Corresponds to the JSON property `endTime`
7488
+ # @return [String]
7489
+ attr_accessor :end_time
7490
+
7491
+ # An isolated set of Cloud Spanner resources that databases can define
7492
+ # placements on.
7493
+ # Corresponds to the JSON property `instancePartition`
7494
+ # @return [Google::Apis::SpannerV1::InstancePartition]
7495
+ attr_accessor :instance_partition
7496
+
7497
+ # The time at which UpdateInstancePartition request was received.
7498
+ # Corresponds to the JSON property `startTime`
7499
+ # @return [String]
7500
+ attr_accessor :start_time
7501
+
7502
+ def initialize(**args)
7503
+ update!(**args)
7504
+ end
7505
+
7506
+ # Update properties of this object
7507
+ def update!(**args)
7508
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
7509
+ @end_time = args[:end_time] if args.key?(:end_time)
7510
+ @instance_partition = args[:instance_partition] if args.key?(:instance_partition)
7511
+ @start_time = args[:start_time] if args.key?(:start_time)
7512
+ end
7513
+ end
7514
+
7515
+ # The request for UpdateInstancePartition.
7516
+ class UpdateInstancePartitionRequest
7517
+ include Google::Apis::Core::Hashable
7518
+
7519
+ # Required. A mask specifying which fields in InstancePartition should be
7520
+ # updated. The field mask must always be specified; this prevents any future
7521
+ # fields in InstancePartition from being erased accidentally by clients that do
7522
+ # not know about them.
7523
+ # Corresponds to the JSON property `fieldMask`
7524
+ # @return [String]
7525
+ attr_accessor :field_mask
7526
+
7527
+ # An isolated set of Cloud Spanner resources that databases can define
7528
+ # placements on.
7529
+ # Corresponds to the JSON property `instancePartition`
7530
+ # @return [Google::Apis::SpannerV1::InstancePartition]
7531
+ attr_accessor :instance_partition
7532
+
7533
+ def initialize(**args)
7534
+ update!(**args)
7535
+ end
7536
+
7537
+ # Update properties of this object
7538
+ def update!(**args)
7539
+ @field_mask = args[:field_mask] if args.key?(:field_mask)
7540
+ @instance_partition = args[:instance_partition] if args.key?(:instance_partition)
7541
+ end
7542
+ end
7543
+
5169
7544
  # The request for UpdateInstance.
5170
7545
  class UpdateInstanceRequest
5171
7546
  include Google::Apis::Core::Hashable