google-apis-spanner_v1 0.1.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 625e4ebcbf0da1d443e489addb6607a46b0dda44997b096f81f78a1b2a66f55e
4
- data.tar.gz: 26c8f98f6954b9cf6d8ed56eec3cc58ff07637fe5dc9563c7151799ae64e35e4
3
+ metadata.gz: f99ff9f6821502c873da0a908d418d033a1f6d9baff866c14287c1b6e5d4a1fb
4
+ data.tar.gz: ee944ff1114fdedcddf45fd62a9e5713e46118bfa87356193ca619f0b4ab54da
5
5
  SHA512:
6
- metadata.gz: 0d1137d4f8a15222bdb338a4ab275fe3510af66e805697ffbd0b5f32664f421bb492105aee1fe069b884d0b8ab29c35cdd259e4cb05187331323f2bb64dc16e8
7
- data.tar.gz: 57b20be9d4bf8e90d7bbd7787099db71b2b57952abd3eb5ecb18649a106ef7a65090aacc2c01652e7543277a87f3e9cdf8a1af7155201410d9bfecdc262cebda
6
+ metadata.gz: 3b00aa6d4ba8ed6403127765bb9f86126791f6a9ff3b3f20f65986d6304a295f4d50478d60639f459cc817920673a6db06a970c99f30302f86b1f18157edbbea
7
+ data.tar.gz: f2afbdbc190d30b4824c01f09ac50d841638e2b0fc6d9b61f505bc128fa1fd986091b753c92f256e9677da2e8dd12406ed50942ea63f96e9d0b46857dab61c88
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release history for google-apis-spanner_v1
2
2
 
3
+ ### v0.6.0 (2021-03-13)
4
+
5
+ * Regenerated from discovery document revision 20210309
6
+ * Regenerated using generator version 0.2.0
7
+
8
+ ### v0.5.0 (2021-03-04)
9
+
10
+ * Unspecified changes
11
+
12
+ ### v0.4.0 (2021-02-24)
13
+
14
+ * Regenerated from discovery document revision 20210217
15
+
16
+ ### v0.3.0 (2021-02-13)
17
+
18
+ * Regenerated from discovery document revision 20210206
19
+
20
+ ### v0.2.0 (2021-01-28)
21
+
22
+ * Regenerated from discovery document revision 20210123
23
+ * Regenerated using generator version 0.1.2
24
+
3
25
  ### v0.1.0 (2021-01-07)
4
26
 
5
27
  * Regenerated using generator version 0.1.1
@@ -26,9 +26,9 @@ module Google
26
26
  class Backup
27
27
  include Google::Apis::Core::Hashable
28
28
 
29
- # Output only. The backup will contain an externally consistent copy of the
30
- # database at the timestamp specified by `create_time`. `create_time` is
31
- # approximately the time the CreateBackup request is received.
29
+ # Output only. The time the CreateBackup request is received. If the request
30
+ # does not specify `version_time`, the `version_time` of the backup will be
31
+ # equivalent to the `create_time`.
32
32
  # Corresponds to the JSON property `createTime`
33
33
  # @return [String]
34
34
  attr_accessor :create_time
@@ -40,6 +40,11 @@ module Google
40
40
  # @return [String]
41
41
  attr_accessor :database
42
42
 
43
+ # Encryption information for a Cloud Spanner database or backup.
44
+ # Corresponds to the JSON property `encryptionInfo`
45
+ # @return [Google::Apis::SpannerV1::EncryptionInfo]
46
+ attr_accessor :encryption_info
47
+
43
48
  # Required for the CreateBackup operation. The expiration time of the backup,
44
49
  # with microseconds granularity that must be at least 6 hours and at most 366
45
50
  # days from the time the CreateBackup request is processed. Once the `
@@ -80,6 +85,13 @@ module Google
80
85
  # @return [String]
81
86
  attr_accessor :state
82
87
 
88
+ # The backup will contain an externally consistent copy of the database at the
89
+ # timestamp specified by `version_time`. If `version_time` is not specified, the
90
+ # system will set `version_time` to the `create_time` of the backup.
91
+ # Corresponds to the JSON property `versionTime`
92
+ # @return [String]
93
+ attr_accessor :version_time
94
+
83
95
  def initialize(**args)
84
96
  update!(**args)
85
97
  end
@@ -88,11 +100,13 @@ module Google
88
100
  def update!(**args)
89
101
  @create_time = args[:create_time] if args.key?(:create_time)
90
102
  @database = args[:database] if args.key?(:database)
103
+ @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
91
104
  @expire_time = args[:expire_time] if args.key?(:expire_time)
92
105
  @name = args[:name] if args.key?(:name)
93
106
  @referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
94
107
  @size_bytes = args[:size_bytes] if args.key?(:size_bytes)
95
108
  @state = args[:state] if args.key?(:state)
109
+ @version_time = args[:version_time] if args.key?(:version_time)
96
110
  end
97
111
  end
98
112
 
@@ -105,8 +119,7 @@ module Google
105
119
  # @return [String]
106
120
  attr_accessor :backup
107
121
 
108
- # The backup contains an externally consistent copy of `source_database` at the
109
- # timestamp specified by `create_time`.
122
+ # The time the CreateBackup request was received.
110
123
  # Corresponds to the JSON property `createTime`
111
124
  # @return [String]
112
125
  attr_accessor :create_time
@@ -116,6 +129,14 @@ module Google
116
129
  # @return [String]
117
130
  attr_accessor :source_database
118
131
 
132
+ # The backup contains an externally consistent copy of `source_database` at the
133
+ # timestamp specified by `version_time`. If the CreateBackup request did not
134
+ # specify `version_time`, the `version_time` of the backup is equivalent to the `
135
+ # create_time`.
136
+ # Corresponds to the JSON property `versionTime`
137
+ # @return [String]
138
+ attr_accessor :version_time
139
+
119
140
  def initialize(**args)
120
141
  update!(**args)
121
142
  end
@@ -125,6 +146,7 @@ module Google
125
146
  @backup = args[:backup] if args.key?(:backup)
126
147
  @create_time = args[:create_time] if args.key?(:create_time)
127
148
  @source_database = args[:source_database] if args.key?(:source_database)
149
+ @version_time = args[:version_time] if args.key?(:version_time)
128
150
  end
129
151
  end
130
152
 
@@ -212,7 +234,7 @@ module Google
212
234
  # inactivity at the client may cause Cloud Spanner to release a transaction's
213
235
  # locks and abort it. Conceptually, a read-write transaction consists of zero or
214
236
  # more reads or SQL statements followed by Commit. At any time before Commit,
215
- # the client can send a Rollback request to abort the transaction. ### Semantics
237
+ # the client can send a Rollback request to abort the transaction. ## Semantics
216
238
  # Cloud Spanner can commit the transaction if all read locks it acquired are
217
239
  # still valid at commit time, and it is able to acquire write locks for all
218
240
  # writes. Cloud Spanner can abort the transaction for any reason. If a commit
@@ -220,7 +242,7 @@ module Google
220
242
  # not modified any user data in Cloud Spanner. Unless the transaction commits,
221
243
  # Cloud Spanner makes no guarantees about how long the transaction's locks were
222
244
  # held for. It is an error to use Cloud Spanner locks for any sort of mutual
223
- # exclusion other than between Cloud Spanner transactions themselves. ###
245
+ # exclusion other than between Cloud Spanner transactions themselves. ##
224
246
  # Retrying Aborted Transactions When a transaction aborts, the application can
225
247
  # choose to retry the whole transaction again. To maximize the chances of
226
248
  # successfully committing the retry, the client should execute the retry in the
@@ -231,7 +253,7 @@ module Google
231
253
  # can abort many times in a short period before successfully committing. Thus,
232
254
  # it is not a good idea to cap the number of retries a transaction can attempt;
233
255
  # instead, it is better to limit the total amount of wall time spent retrying. ##
234
- # # Idle Transactions A transaction is considered idle if it has no outstanding
256
+ # Idle Transactions A transaction is considered idle if it has no outstanding
235
257
  # reads or SQL queries and has not started a read or SQL query within the last
236
258
  # 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
237
259
  # t hold on to locks indefinitely. In that case, the commit will fail with error
@@ -255,7 +277,7 @@ module Google
255
277
  # is geographically distributed, stale read-only transactions can execute more
256
278
  # quickly than strong or read-write transaction, because they are able to
257
279
  # execute far from the leader replica. Each type of timestamp bound is discussed
258
- # in detail below. ### Strong Strong reads are guaranteed to see the effects of
280
+ # in detail below. ## Strong Strong reads are guaranteed to see the effects of
259
281
  # all transactions that have committed before the start of the read. Furthermore,
260
282
  # all rows yielded by a single read are consistent with each other -- if any
261
283
  # part of the read observes a transaction, all parts of the read see the
@@ -263,7 +285,7 @@ module Google
263
285
  # transactions might return inconsistent results if there are concurrent writes.
264
286
  # If consistency across reads is required, the reads should be executed within a
265
287
  # transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
266
- # strong. ### Exact Staleness These timestamp bounds execute reads at a user-
288
+ # strong. ## Exact Staleness These timestamp bounds execute reads at a user-
267
289
  # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
268
290
  # prefix of the global transaction history: they observe modifications done by
269
291
  # all transactions with a commit timestamp <= the read timestamp, and observe
@@ -275,7 +297,7 @@ module Google
275
297
  # to pick a timestamp. As a result, they execute slightly faster than the
276
298
  # equivalent boundedly stale concurrency modes. On the other hand, boundedly
277
299
  # stale reads usually return fresher results. See TransactionOptions.ReadOnly.
278
- # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ### Bounded
300
+ # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
279
301
  # Staleness Bounded staleness modes allow Cloud Spanner to pick the read
280
302
  # timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
281
303
  # the newest timestamp within the staleness bound that allows execution of the
@@ -293,7 +315,7 @@ module Google
293
315
  # timestamp negotiation requires up-front knowledge of which rows will be read,
294
316
  # it can only be used with single-use read-only transactions. See
295
317
  # TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
296
- # min_read_timestamp. ### Old Read Timestamps and Garbage Collection Cloud
318
+ # min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
297
319
  # Spanner continuously garbage collects deleted and overwritten data in the
298
320
  # background to reclaim storage space. This process is known as "version GC". By
299
321
  # default, version GC reclaims versions after they are one hour old. Because of
@@ -472,6 +494,13 @@ module Google
472
494
  # @return [Array<Google::Apis::SpannerV1::Mutation>]
473
495
  attr_accessor :mutations
474
496
 
497
+ # If `true`, then statistics related to the transaction will be included in the
498
+ # CommitResponse. Default value is `false`.
499
+ # Corresponds to the JSON property `returnCommitStats`
500
+ # @return [Boolean]
501
+ attr_accessor :return_commit_stats
502
+ alias_method :return_commit_stats?, :return_commit_stats
503
+
475
504
  # # Transactions Each session can have at most one active transaction at a time (
476
505
  # note that standalone reads and queries use a transaction internally and do
477
506
  # count towards the one transaction limit). After the active transaction is
@@ -505,7 +534,7 @@ module Google
505
534
  # inactivity at the client may cause Cloud Spanner to release a transaction's
506
535
  # locks and abort it. Conceptually, a read-write transaction consists of zero or
507
536
  # more reads or SQL statements followed by Commit. At any time before Commit,
508
- # the client can send a Rollback request to abort the transaction. ### Semantics
537
+ # the client can send a Rollback request to abort the transaction. ## Semantics
509
538
  # Cloud Spanner can commit the transaction if all read locks it acquired are
510
539
  # still valid at commit time, and it is able to acquire write locks for all
511
540
  # writes. Cloud Spanner can abort the transaction for any reason. If a commit
@@ -513,7 +542,7 @@ module Google
513
542
  # not modified any user data in Cloud Spanner. Unless the transaction commits,
514
543
  # Cloud Spanner makes no guarantees about how long the transaction's locks were
515
544
  # held for. It is an error to use Cloud Spanner locks for any sort of mutual
516
- # exclusion other than between Cloud Spanner transactions themselves. ###
545
+ # exclusion other than between Cloud Spanner transactions themselves. ##
517
546
  # Retrying Aborted Transactions When a transaction aborts, the application can
518
547
  # choose to retry the whole transaction again. To maximize the chances of
519
548
  # successfully committing the retry, the client should execute the retry in the
@@ -524,7 +553,7 @@ module Google
524
553
  # can abort many times in a short period before successfully committing. Thus,
525
554
  # it is not a good idea to cap the number of retries a transaction can attempt;
526
555
  # instead, it is better to limit the total amount of wall time spent retrying. ##
527
- # # Idle Transactions A transaction is considered idle if it has no outstanding
556
+ # Idle Transactions A transaction is considered idle if it has no outstanding
528
557
  # reads or SQL queries and has not started a read or SQL query within the last
529
558
  # 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
530
559
  # t hold on to locks indefinitely. In that case, the commit will fail with error
@@ -548,7 +577,7 @@ module Google
548
577
  # is geographically distributed, stale read-only transactions can execute more
549
578
  # quickly than strong or read-write transaction, because they are able to
550
579
  # execute far from the leader replica. Each type of timestamp bound is discussed
551
- # in detail below. ### Strong Strong reads are guaranteed to see the effects of
580
+ # in detail below. ## Strong Strong reads are guaranteed to see the effects of
552
581
  # all transactions that have committed before the start of the read. Furthermore,
553
582
  # all rows yielded by a single read are consistent with each other -- if any
554
583
  # part of the read observes a transaction, all parts of the read see the
@@ -556,7 +585,7 @@ module Google
556
585
  # transactions might return inconsistent results if there are concurrent writes.
557
586
  # If consistency across reads is required, the reads should be executed within a
558
587
  # transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
559
- # strong. ### Exact Staleness These timestamp bounds execute reads at a user-
588
+ # strong. ## Exact Staleness These timestamp bounds execute reads at a user-
560
589
  # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
561
590
  # prefix of the global transaction history: they observe modifications done by
562
591
  # all transactions with a commit timestamp <= the read timestamp, and observe
@@ -568,7 +597,7 @@ module Google
568
597
  # to pick a timestamp. As a result, they execute slightly faster than the
569
598
  # equivalent boundedly stale concurrency modes. On the other hand, boundedly
570
599
  # stale reads usually return fresher results. See TransactionOptions.ReadOnly.
571
- # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ### Bounded
600
+ # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
572
601
  # Staleness Bounded staleness modes allow Cloud Spanner to pick the read
573
602
  # timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
574
603
  # the newest timestamp within the staleness bound that allows execution of the
@@ -586,7 +615,7 @@ module Google
586
615
  # timestamp negotiation requires up-front knowledge of which rows will be read,
587
616
  # it can only be used with single-use read-only transactions. See
588
617
  # TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
589
- # min_read_timestamp. ### Old Read Timestamps and Garbage Collection Cloud
618
+ # min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
590
619
  # Spanner continuously garbage collects deleted and overwritten data in the
591
620
  # background to reclaim storage space. This process is known as "version GC". By
592
621
  # default, version GC reclaims versions after they are one hour old. Because of
@@ -648,6 +677,7 @@ module Google
648
677
  # Update properties of this object
649
678
  def update!(**args)
650
679
  @mutations = args[:mutations] if args.key?(:mutations)
680
+ @return_commit_stats = args[:return_commit_stats] if args.key?(:return_commit_stats)
651
681
  @single_use_transaction = args[:single_use_transaction] if args.key?(:single_use_transaction)
652
682
  @transaction_id = args[:transaction_id] if args.key?(:transaction_id)
653
683
  end
@@ -657,6 +687,11 @@ module Google
657
687
  class CommitResponse
658
688
  include Google::Apis::Core::Hashable
659
689
 
690
+ # Additional statistics about a commit.
691
+ # Corresponds to the JSON property `commitStats`
692
+ # @return [Google::Apis::SpannerV1::CommitStats]
693
+ attr_accessor :commit_stats
694
+
660
695
  # The Cloud Spanner timestamp at which the transaction committed.
661
696
  # Corresponds to the JSON property `commitTimestamp`
662
697
  # @return [String]
@@ -668,10 +703,37 @@ module Google
668
703
 
669
704
  # Update properties of this object
670
705
  def update!(**args)
706
+ @commit_stats = args[:commit_stats] if args.key?(:commit_stats)
671
707
  @commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
672
708
  end
673
709
  end
674
710
 
711
+ # Additional statistics about a commit.
712
+ class CommitStats
713
+ include Google::Apis::Core::Hashable
714
+
715
+ # The total number of mutations for the transaction. Knowing the `mutation_count`
716
+ # value can help you maximize the number of mutations in a transaction and
717
+ # minimize the number of API round trips. You can also monitor this value to
718
+ # prevent transactions from exceeding the system [limit](http://cloud.google.com/
719
+ # spanner/quotas#limits_for_creating_reading_updating_and_deleting_data). If the
720
+ # number of mutations exceeds the limit, the server returns [INVALID_ARGUMENT](
721
+ # http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.
722
+ # INVALID_ARGUMENT).
723
+ # Corresponds to the JSON property `mutationCount`
724
+ # @return [Fixnum]
725
+ attr_accessor :mutation_count
726
+
727
+ def initialize(**args)
728
+ update!(**args)
729
+ end
730
+
731
+ # Update properties of this object
732
+ def update!(**args)
733
+ @mutation_count = args[:mutation_count] if args.key?(:mutation_count)
734
+ end
735
+ end
736
+
675
737
  # Metadata type for the operation returned by CreateBackup.
676
738
  class CreateBackupMetadata
677
739
  include Google::Apis::Core::Hashable
@@ -749,6 +811,11 @@ module Google
749
811
  # @return [String]
750
812
  attr_accessor :create_statement
751
813
 
814
+ # Encryption configuration for a Cloud Spanner database.
815
+ # Corresponds to the JSON property `encryptionConfig`
816
+ # @return [Google::Apis::SpannerV1::EncryptionConfig]
817
+ attr_accessor :encryption_config
818
+
752
819
  # Optional. A list of DDL statements to run inside the newly created database.
753
820
  # Statements can create tables, indexes, etc. These statements execute
754
821
  # atomically with the creation of the database: if there is an error in any
@@ -764,6 +831,7 @@ module Google
764
831
  # Update properties of this object
765
832
  def update!(**args)
766
833
  @create_statement = args[:create_statement] if args.key?(:create_statement)
834
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
767
835
  @extra_statements = args[:extra_statements] if args.key?(:extra_statements)
768
836
  end
769
837
  end
@@ -861,6 +929,30 @@ module Google
861
929
  # @return [String]
862
930
  attr_accessor :create_time
863
931
 
932
+ # Output only. Earliest timestamp at which older versions of the data can be
933
+ # read. This value is continuously updated by Cloud Spanner and becomes stale
934
+ # the moment it is queried. If you are using this value to recover data, make
935
+ # sure to account for the time from the moment when the value is queried to the
936
+ # moment when you initiate the recovery.
937
+ # Corresponds to the JSON property `earliestVersionTime`
938
+ # @return [String]
939
+ attr_accessor :earliest_version_time
940
+
941
+ # Encryption configuration for a Cloud Spanner database.
942
+ # Corresponds to the JSON property `encryptionConfig`
943
+ # @return [Google::Apis::SpannerV1::EncryptionConfig]
944
+ attr_accessor :encryption_config
945
+
946
+ # Output only. For databases that are using customer managed encryption, this
947
+ # field contains the encryption information for the database, such as encryption
948
+ # state and the Cloud KMS key versions that are in use. For databases that are
949
+ # using Google default or other types of encryption, this field is empty. This
950
+ # field is propagated lazily from the backend. There might be a delay from when
951
+ # a key version is being used and when it appears in this field.
952
+ # Corresponds to the JSON property `encryptionInfo`
953
+ # @return [Array<Google::Apis::SpannerV1::EncryptionInfo>]
954
+ attr_accessor :encryption_info
955
+
864
956
  # Required. The name of the database. Values are of the form `projects//
865
957
  # instances//databases/`, where `` is as specified in the `CREATE DATABASE`
866
958
  # statement. This name can be passed to other API methods to identify the
@@ -879,6 +971,13 @@ module Google
879
971
  # @return [String]
880
972
  attr_accessor :state
881
973
 
974
+ # Output only. The period in which Cloud Spanner retains all versions of data
975
+ # for the database. This is the same as the value of version_retention_period
976
+ # database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
977
+ # Corresponds to the JSON property `versionRetentionPeriod`
978
+ # @return [String]
979
+ attr_accessor :version_retention_period
980
+
882
981
  def initialize(**args)
883
982
  update!(**args)
884
983
  end
@@ -886,9 +985,13 @@ module Google
886
985
  # Update properties of this object
887
986
  def update!(**args)
888
987
  @create_time = args[:create_time] if args.key?(:create_time)
988
+ @earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_time)
989
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
990
+ @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
889
991
  @name = args[:name] if args.key?(:name)
890
992
  @restore_info = args[:restore_info] if args.key?(:restore_info)
891
993
  @state = args[:state] if args.key?(:state)
994
+ @version_retention_period = args[:version_retention_period] if args.key?(:version_retention_period)
892
995
  end
893
996
  end
894
997
 
@@ -938,6 +1041,63 @@ module Google
938
1041
  end
939
1042
  end
940
1043
 
1044
+ # Encryption configuration for a Cloud Spanner database.
1045
+ class EncryptionConfig
1046
+ include Google::Apis::Core::Hashable
1047
+
1048
+ # The Cloud KMS key to be used for encrypting and decrypting the database.
1049
+ # Values are of the form `projects//locations//keyRings//cryptoKeys/`.
1050
+ # Corresponds to the JSON property `kmsKeyName`
1051
+ # @return [String]
1052
+ attr_accessor :kms_key_name
1053
+
1054
+ def initialize(**args)
1055
+ update!(**args)
1056
+ end
1057
+
1058
+ # Update properties of this object
1059
+ def update!(**args)
1060
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1061
+ end
1062
+ end
1063
+
1064
+ # Encryption information for a Cloud Spanner database or backup.
1065
+ class EncryptionInfo
1066
+ include Google::Apis::Core::Hashable
1067
+
1068
+ # The `Status` type defines a logical error model that is suitable for different
1069
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1070
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1071
+ # data: error code, error message, and error details. You can find out more
1072
+ # about this error model and how to work with it in the [API Design Guide](https:
1073
+ # //cloud.google.com/apis/design/errors).
1074
+ # Corresponds to the JSON property `encryptionStatus`
1075
+ # @return [Google::Apis::SpannerV1::Status]
1076
+ attr_accessor :encryption_status
1077
+
1078
+ # Output only. The type of encryption.
1079
+ # Corresponds to the JSON property `encryptionType`
1080
+ # @return [String]
1081
+ attr_accessor :encryption_type
1082
+
1083
+ # Output only. A Cloud KMS key version that is being used to protect the
1084
+ # database or backup.
1085
+ # Corresponds to the JSON property `kmsKeyVersion`
1086
+ # @return [String]
1087
+ attr_accessor :kms_key_version
1088
+
1089
+ def initialize(**args)
1090
+ update!(**args)
1091
+ end
1092
+
1093
+ # Update properties of this object
1094
+ def update!(**args)
1095
+ @encryption_status = args[:encryption_status] if args.key?(:encryption_status)
1096
+ @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
1097
+ @kms_key_version = args[:kms_key_version] if args.key?(:kms_key_version)
1098
+ end
1099
+ end
1100
+
941
1101
  # The request for ExecuteBatchDml.
942
1102
  class ExecuteBatchDmlRequest
943
1103
  include Google::Apis::Core::Hashable
@@ -1652,6 +1812,12 @@ module Google
1652
1812
  # @return [String]
1653
1813
  attr_accessor :next_page_token
1654
1814
 
1815
+ # The list of unreachable instances. It includes the names of instances whose
1816
+ # metadata could not be retrieved within instance_deadline.
1817
+ # Corresponds to the JSON property `unreachable`
1818
+ # @return [Array<String>]
1819
+ attr_accessor :unreachable
1820
+
1655
1821
  def initialize(**args)
1656
1822
  update!(**args)
1657
1823
  end
@@ -1660,6 +1826,7 @@ module Google
1660
1826
  def update!(**args)
1661
1827
  @instances = args[:instances] if args.key?(:instances)
1662
1828
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1829
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1663
1830
  end
1664
1831
  end
1665
1832
 
@@ -2326,18 +2493,33 @@ module Google
2326
2493
  class QueryOptions
2327
2494
  include Google::Apis::Core::Hashable
2328
2495
 
2496
+ # Query optimizer statistics package to use. This parameter allows individual
2497
+ # queries to use a different query optimizer statistics. Specifying `latest` as
2498
+ # a value instructs Cloud Spanner to use the latest generated statistics package.
2499
+ # If not specified, Cloud Spanner uses statistics package set at the database
2500
+ # level options, or latest if the database option is not set. The statistics
2501
+ # package requested by the query has to be exempt from garbage collection. This
2502
+ # can be achieved with the following DDL statement: ``` ALTER STATISTICS SET
2503
+ # OPTIONS (allow_gc=false) ``` The list of available statistics packages can be
2504
+ # queried from `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`. Executing a SQL
2505
+ # statement with an invalid optimizer statistics package or with statistics
2506
+ # package that allows garbage collection fails with an `INVALID_ARGUMENT` error.
2507
+ # Corresponds to the JSON property `optimizerStatisticsPackage`
2508
+ # @return [String]
2509
+ attr_accessor :optimizer_statistics_package
2510
+
2329
2511
  # An option to control the selection of optimizer version. This parameter allows
2330
- # individual queries to pick different query optimizer versions. Specifying "
2331
- # latest" as a value instructs Cloud Spanner to use the latest supported query
2332
- # optimizer version. If not specified, Cloud Spanner uses optimizer version set
2333
- # at the database level options. Any other positive integer (from the list of
2334
- # supported optimizer versions) overrides the default optimizer version for
2512
+ # individual queries to pick different query optimizer versions. Specifying `
2513
+ # latest` as a value instructs Cloud Spanner to use the latest supported query
2514
+ # optimizer version. If not specified, Cloud Spanner uses the optimizer version
2515
+ # set at the database level options. Any other positive integer (from the list
2516
+ # of supported optimizer versions) overrides the default optimizer version for
2335
2517
  # query execution. The list of supported optimizer versions can be queried from
2336
2518
  # SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an
2337
- # invalid optimizer version will fail with a syntax error (`INVALID_ARGUMENT`)
2338
- # status. See https://cloud.google.com/spanner/docs/query-optimizer/manage-query-
2339
- # optimizer for more information on managing the query optimizer. The `
2340
- # optimizer_version` statement hint has precedence over this setting.
2519
+ # invalid optimizer version fails with an `INVALID_ARGUMENT` error. See https://
2520
+ # cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more
2521
+ # information on managing the query optimizer. The `optimizer_version` statement
2522
+ # hint has precedence over this setting.
2341
2523
  # Corresponds to the JSON property `optimizerVersion`
2342
2524
  # @return [String]
2343
2525
  attr_accessor :optimizer_version
@@ -2348,6 +2530,7 @@ module Google
2348
2530
 
2349
2531
  # Update properties of this object
2350
2532
  def update!(**args)
2533
+ @optimizer_statistics_package = args[:optimizer_statistics_package] if args.key?(:optimizer_statistics_package)
2351
2534
  @optimizer_version = args[:optimizer_version] if args.key?(:optimizer_version)
2352
2535
  end
2353
2536
  end
@@ -2576,6 +2759,34 @@ module Google
2576
2759
  end
2577
2760
  end
2578
2761
 
2762
+ # Encryption configuration for the restored database.
2763
+ class RestoreDatabaseEncryptionConfig
2764
+ include Google::Apis::Core::Hashable
2765
+
2766
+ # Required. The encryption type of the restored database.
2767
+ # Corresponds to the JSON property `encryptionType`
2768
+ # @return [String]
2769
+ attr_accessor :encryption_type
2770
+
2771
+ # Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored
2772
+ # database. This field should be set only when encryption_type is `
2773
+ # CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
2774
+ # keyRings//cryptoKeys/`.
2775
+ # Corresponds to the JSON property `kmsKeyName`
2776
+ # @return [String]
2777
+ attr_accessor :kms_key_name
2778
+
2779
+ def initialize(**args)
2780
+ update!(**args)
2781
+ end
2782
+
2783
+ # Update properties of this object
2784
+ def update!(**args)
2785
+ @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
2786
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
2787
+ end
2788
+ end
2789
+
2579
2790
  # Metadata type for the long-running operation returned by RestoreDatabase.
2580
2791
  class RestoreDatabaseMetadata
2581
2792
  include Google::Apis::Core::Hashable
@@ -2658,6 +2869,11 @@ module Google
2658
2869
  # @return [String]
2659
2870
  attr_accessor :database_id
2660
2871
 
2872
+ # Encryption configuration for the restored database.
2873
+ # Corresponds to the JSON property `encryptionConfig`
2874
+ # @return [Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig]
2875
+ attr_accessor :encryption_config
2876
+
2661
2877
  def initialize(**args)
2662
2878
  update!(**args)
2663
2879
  end
@@ -2666,6 +2882,7 @@ module Google
2666
2882
  def update!(**args)
2667
2883
  @backup = args[:backup] if args.key?(:backup)
2668
2884
  @database_id = args[:database_id] if args.key?(:database_id)
2885
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
2669
2886
  end
2670
2887
  end
2671
2888
 
@@ -3135,7 +3352,7 @@ module Google
3135
3352
  # inactivity at the client may cause Cloud Spanner to release a transaction's
3136
3353
  # locks and abort it. Conceptually, a read-write transaction consists of zero or
3137
3354
  # more reads or SQL statements followed by Commit. At any time before Commit,
3138
- # the client can send a Rollback request to abort the transaction. ### Semantics
3355
+ # the client can send a Rollback request to abort the transaction. ## Semantics
3139
3356
  # Cloud Spanner can commit the transaction if all read locks it acquired are
3140
3357
  # still valid at commit time, and it is able to acquire write locks for all
3141
3358
  # writes. Cloud Spanner can abort the transaction for any reason. If a commit
@@ -3143,7 +3360,7 @@ module Google
3143
3360
  # not modified any user data in Cloud Spanner. Unless the transaction commits,
3144
3361
  # Cloud Spanner makes no guarantees about how long the transaction's locks were
3145
3362
  # held for. It is an error to use Cloud Spanner locks for any sort of mutual
3146
- # exclusion other than between Cloud Spanner transactions themselves. ###
3363
+ # exclusion other than between Cloud Spanner transactions themselves. ##
3147
3364
  # Retrying Aborted Transactions When a transaction aborts, the application can
3148
3365
  # choose to retry the whole transaction again. To maximize the chances of
3149
3366
  # successfully committing the retry, the client should execute the retry in the
@@ -3154,7 +3371,7 @@ module Google
3154
3371
  # can abort many times in a short period before successfully committing. Thus,
3155
3372
  # it is not a good idea to cap the number of retries a transaction can attempt;
3156
3373
  # instead, it is better to limit the total amount of wall time spent retrying. ##
3157
- # # Idle Transactions A transaction is considered idle if it has no outstanding
3374
+ # Idle Transactions A transaction is considered idle if it has no outstanding
3158
3375
  # reads or SQL queries and has not started a read or SQL query within the last
3159
3376
  # 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
3160
3377
  # t hold on to locks indefinitely. In that case, the commit will fail with error
@@ -3178,7 +3395,7 @@ module Google
3178
3395
  # is geographically distributed, stale read-only transactions can execute more
3179
3396
  # quickly than strong or read-write transaction, because they are able to
3180
3397
  # execute far from the leader replica. Each type of timestamp bound is discussed
3181
- # in detail below. ### Strong Strong reads are guaranteed to see the effects of
3398
+ # in detail below. ## Strong Strong reads are guaranteed to see the effects of
3182
3399
  # all transactions that have committed before the start of the read. Furthermore,
3183
3400
  # all rows yielded by a single read are consistent with each other -- if any
3184
3401
  # part of the read observes a transaction, all parts of the read see the
@@ -3186,7 +3403,7 @@ module Google
3186
3403
  # transactions might return inconsistent results if there are concurrent writes.
3187
3404
  # If consistency across reads is required, the reads should be executed within a
3188
3405
  # transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
3189
- # strong. ### Exact Staleness These timestamp bounds execute reads at a user-
3406
+ # strong. ## Exact Staleness These timestamp bounds execute reads at a user-
3190
3407
  # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
3191
3408
  # prefix of the global transaction history: they observe modifications done by
3192
3409
  # all transactions with a commit timestamp <= the read timestamp, and observe
@@ -3198,7 +3415,7 @@ module Google
3198
3415
  # to pick a timestamp. As a result, they execute slightly faster than the
3199
3416
  # equivalent boundedly stale concurrency modes. On the other hand, boundedly
3200
3417
  # stale reads usually return fresher results. See TransactionOptions.ReadOnly.
3201
- # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ### Bounded
3418
+ # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
3202
3419
  # Staleness Bounded staleness modes allow Cloud Spanner to pick the read
3203
3420
  # timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
3204
3421
  # the newest timestamp within the staleness bound that allows execution of the
@@ -3216,7 +3433,7 @@ module Google
3216
3433
  # timestamp negotiation requires up-front knowledge of which rows will be read,
3217
3434
  # it can only be used with single-use read-only transactions. See
3218
3435
  # TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
3219
- # min_read_timestamp. ### Old Read Timestamps and Garbage Collection Cloud
3436
+ # min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
3220
3437
  # Spanner continuously garbage collects deleted and overwritten data in the
3221
3438
  # background to reclaim storage space. This process is known as "version GC". By
3222
3439
  # default, version GC reclaims versions after they are one hour old. Because of
@@ -3330,7 +3547,7 @@ module Google
3330
3547
  # inactivity at the client may cause Cloud Spanner to release a transaction's
3331
3548
  # locks and abort it. Conceptually, a read-write transaction consists of zero or
3332
3549
  # more reads or SQL statements followed by Commit. At any time before Commit,
3333
- # the client can send a Rollback request to abort the transaction. ### Semantics
3550
+ # the client can send a Rollback request to abort the transaction. ## Semantics
3334
3551
  # Cloud Spanner can commit the transaction if all read locks it acquired are
3335
3552
  # still valid at commit time, and it is able to acquire write locks for all
3336
3553
  # writes. Cloud Spanner can abort the transaction for any reason. If a commit
@@ -3338,7 +3555,7 @@ module Google
3338
3555
  # not modified any user data in Cloud Spanner. Unless the transaction commits,
3339
3556
  # Cloud Spanner makes no guarantees about how long the transaction's locks were
3340
3557
  # held for. It is an error to use Cloud Spanner locks for any sort of mutual
3341
- # exclusion other than between Cloud Spanner transactions themselves. ###
3558
+ # exclusion other than between Cloud Spanner transactions themselves. ##
3342
3559
  # Retrying Aborted Transactions When a transaction aborts, the application can
3343
3560
  # choose to retry the whole transaction again. To maximize the chances of
3344
3561
  # successfully committing the retry, the client should execute the retry in the
@@ -3349,7 +3566,7 @@ module Google
3349
3566
  # can abort many times in a short period before successfully committing. Thus,
3350
3567
  # it is not a good idea to cap the number of retries a transaction can attempt;
3351
3568
  # instead, it is better to limit the total amount of wall time spent retrying. ##
3352
- # # Idle Transactions A transaction is considered idle if it has no outstanding
3569
+ # Idle Transactions A transaction is considered idle if it has no outstanding
3353
3570
  # reads or SQL queries and has not started a read or SQL query within the last
3354
3571
  # 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
3355
3572
  # t hold on to locks indefinitely. In that case, the commit will fail with error
@@ -3373,7 +3590,7 @@ module Google
3373
3590
  # is geographically distributed, stale read-only transactions can execute more
3374
3591
  # quickly than strong or read-write transaction, because they are able to
3375
3592
  # execute far from the leader replica. Each type of timestamp bound is discussed
3376
- # in detail below. ### Strong Strong reads are guaranteed to see the effects of
3593
+ # in detail below. ## Strong Strong reads are guaranteed to see the effects of
3377
3594
  # all transactions that have committed before the start of the read. Furthermore,
3378
3595
  # all rows yielded by a single read are consistent with each other -- if any
3379
3596
  # part of the read observes a transaction, all parts of the read see the
@@ -3381,7 +3598,7 @@ module Google
3381
3598
  # transactions might return inconsistent results if there are concurrent writes.
3382
3599
  # If consistency across reads is required, the reads should be executed within a
3383
3600
  # transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
3384
- # strong. ### Exact Staleness These timestamp bounds execute reads at a user-
3601
+ # strong. ## Exact Staleness These timestamp bounds execute reads at a user-
3385
3602
  # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
3386
3603
  # prefix of the global transaction history: they observe modifications done by
3387
3604
  # all transactions with a commit timestamp <= the read timestamp, and observe
@@ -3393,7 +3610,7 @@ module Google
3393
3610
  # to pick a timestamp. As a result, they execute slightly faster than the
3394
3611
  # equivalent boundedly stale concurrency modes. On the other hand, boundedly
3395
3612
  # stale reads usually return fresher results. See TransactionOptions.ReadOnly.
3396
- # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ### Bounded
3613
+ # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
3397
3614
  # Staleness Bounded staleness modes allow Cloud Spanner to pick the read
3398
3615
  # timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
3399
3616
  # the newest timestamp within the staleness bound that allows execution of the
@@ -3411,7 +3628,7 @@ module Google
3411
3628
  # timestamp negotiation requires up-front knowledge of which rows will be read,
3412
3629
  # it can only be used with single-use read-only transactions. See
3413
3630
  # TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
3414
- # min_read_timestamp. ### Old Read Timestamps and Garbage Collection Cloud
3631
+ # min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
3415
3632
  # Spanner continuously garbage collects deleted and overwritten data in the
3416
3633
  # background to reclaim storage space. This process is known as "version GC". By
3417
3634
  # default, version GC reclaims versions after they are one hour old. Because of
@@ -3499,7 +3716,7 @@ module Google
3499
3716
  # inactivity at the client may cause Cloud Spanner to release a transaction's
3500
3717
  # locks and abort it. Conceptually, a read-write transaction consists of zero or
3501
3718
  # more reads or SQL statements followed by Commit. At any time before Commit,
3502
- # the client can send a Rollback request to abort the transaction. ### Semantics
3719
+ # the client can send a Rollback request to abort the transaction. ## Semantics
3503
3720
  # Cloud Spanner can commit the transaction if all read locks it acquired are
3504
3721
  # still valid at commit time, and it is able to acquire write locks for all
3505
3722
  # writes. Cloud Spanner can abort the transaction for any reason. If a commit
@@ -3507,7 +3724,7 @@ module Google
3507
3724
  # not modified any user data in Cloud Spanner. Unless the transaction commits,
3508
3725
  # Cloud Spanner makes no guarantees about how long the transaction's locks were
3509
3726
  # held for. It is an error to use Cloud Spanner locks for any sort of mutual
3510
- # exclusion other than between Cloud Spanner transactions themselves. ###
3727
+ # exclusion other than between Cloud Spanner transactions themselves. ##
3511
3728
  # Retrying Aborted Transactions When a transaction aborts, the application can
3512
3729
  # choose to retry the whole transaction again. To maximize the chances of
3513
3730
  # successfully committing the retry, the client should execute the retry in the
@@ -3518,7 +3735,7 @@ module Google
3518
3735
  # can abort many times in a short period before successfully committing. Thus,
3519
3736
  # it is not a good idea to cap the number of retries a transaction can attempt;
3520
3737
  # instead, it is better to limit the total amount of wall time spent retrying. ##
3521
- # # Idle Transactions A transaction is considered idle if it has no outstanding
3738
+ # Idle Transactions A transaction is considered idle if it has no outstanding
3522
3739
  # reads or SQL queries and has not started a read or SQL query within the last
3523
3740
  # 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
3524
3741
  # t hold on to locks indefinitely. In that case, the commit will fail with error
@@ -3542,7 +3759,7 @@ module Google
3542
3759
  # is geographically distributed, stale read-only transactions can execute more
3543
3760
  # quickly than strong or read-write transaction, because they are able to
3544
3761
  # execute far from the leader replica. Each type of timestamp bound is discussed
3545
- # in detail below. ### Strong Strong reads are guaranteed to see the effects of
3762
+ # in detail below. ## Strong Strong reads are guaranteed to see the effects of
3546
3763
  # all transactions that have committed before the start of the read. Furthermore,
3547
3764
  # all rows yielded by a single read are consistent with each other -- if any
3548
3765
  # part of the read observes a transaction, all parts of the read see the
@@ -3550,7 +3767,7 @@ module Google
3550
3767
  # transactions might return inconsistent results if there are concurrent writes.
3551
3768
  # If consistency across reads is required, the reads should be executed within a
3552
3769
  # transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
3553
- # strong. ### Exact Staleness These timestamp bounds execute reads at a user-
3770
+ # strong. ## Exact Staleness These timestamp bounds execute reads at a user-
3554
3771
  # specified timestamp. Reads at a timestamp are guaranteed to see a consistent
3555
3772
  # prefix of the global transaction history: they observe modifications done by
3556
3773
  # all transactions with a commit timestamp <= the read timestamp, and observe
@@ -3562,7 +3779,7 @@ module Google
3562
3779
  # to pick a timestamp. As a result, they execute slightly faster than the
3563
3780
  # equivalent boundedly stale concurrency modes. On the other hand, boundedly
3564
3781
  # stale reads usually return fresher results. See TransactionOptions.ReadOnly.
3565
- # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ### Bounded
3782
+ # read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
3566
3783
  # Staleness Bounded staleness modes allow Cloud Spanner to pick the read
3567
3784
  # timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
3568
3785
  # the newest timestamp within the staleness bound that allows execution of the
@@ -3580,7 +3797,7 @@ module Google
3580
3797
  # timestamp negotiation requires up-front knowledge of which rows will be read,
3581
3798
  # it can only be used with single-use read-only transactions. See
3582
3799
  # TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
3583
- # min_read_timestamp. ### Old Read Timestamps and Garbage Collection Cloud
3800
+ # min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
3584
3801
  # Spanner continuously garbage collects deleted and overwritten data in the
3585
3802
  # background to reclaim storage space. This process is known as "version GC". By
3586
3803
  # default, version GC reclaims versions after they are one hour old. Because of
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module SpannerV1
18
18
  # Version of the google-apis-spanner_v1 gem
19
- GEM_VERSION = "0.1.0"
19
+ GEM_VERSION = "0.6.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.1"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20201130"
25
+ REVISION = "20210309"
26
26
  end
27
27
  end
28
28
  end
@@ -76,6 +76,12 @@ module Google
76
76
  include Google::Apis::Core::JsonObjectSupport
77
77
  end
78
78
 
79
+ class CommitStats
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
79
85
  class CreateBackupMetadata
80
86
  class Representation < Google::Apis::Core::JsonRepresentation; end
81
87
 
@@ -130,6 +136,18 @@ module Google
130
136
  include Google::Apis::Core::JsonObjectSupport
131
137
  end
132
138
 
139
+ class EncryptionConfig
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class EncryptionInfo
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
133
151
  class ExecuteBatchDmlRequest
134
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
135
153
 
@@ -364,6 +382,12 @@ module Google
364
382
  include Google::Apis::Core::JsonObjectSupport
365
383
  end
366
384
 
385
+ class RestoreDatabaseEncryptionConfig
386
+ class Representation < Google::Apis::Core::JsonRepresentation; end
387
+
388
+ include Google::Apis::Core::JsonObjectSupport
389
+ end
390
+
367
391
  class RestoreDatabaseMetadata
368
392
  class Representation < Google::Apis::Core::JsonRepresentation; end
369
393
 
@@ -513,11 +537,14 @@ module Google
513
537
  class Representation < Google::Apis::Core::JsonRepresentation
514
538
  property :create_time, as: 'createTime'
515
539
  property :database, as: 'database'
540
+ property :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
541
+
516
542
  property :expire_time, as: 'expireTime'
517
543
  property :name, as: 'name'
518
544
  collection :referencing_databases, as: 'referencingDatabases'
519
545
  property :size_bytes, :numeric_string => true, as: 'sizeBytes'
520
546
  property :state, as: 'state'
547
+ property :version_time, as: 'versionTime'
521
548
  end
522
549
  end
523
550
 
@@ -527,6 +554,7 @@ module Google
527
554
  property :backup, as: 'backup'
528
555
  property :create_time, as: 'createTime'
529
556
  property :source_database, as: 'sourceDatabase'
557
+ property :version_time, as: 'versionTime'
530
558
  end
531
559
  end
532
560
 
@@ -579,6 +607,7 @@ module Google
579
607
  class Representation < Google::Apis::Core::JsonRepresentation
580
608
  collection :mutations, as: 'mutations', class: Google::Apis::SpannerV1::Mutation, decorator: Google::Apis::SpannerV1::Mutation::Representation
581
609
 
610
+ property :return_commit_stats, as: 'returnCommitStats'
582
611
  property :single_use_transaction, as: 'singleUseTransaction', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation
583
612
 
584
613
  property :transaction_id, :base64 => true, as: 'transactionId'
@@ -588,10 +617,19 @@ module Google
588
617
  class CommitResponse
589
618
  # @private
590
619
  class Representation < Google::Apis::Core::JsonRepresentation
620
+ property :commit_stats, as: 'commitStats', class: Google::Apis::SpannerV1::CommitStats, decorator: Google::Apis::SpannerV1::CommitStats::Representation
621
+
591
622
  property :commit_timestamp, as: 'commitTimestamp'
592
623
  end
593
624
  end
594
625
 
626
+ class CommitStats
627
+ # @private
628
+ class Representation < Google::Apis::Core::JsonRepresentation
629
+ property :mutation_count, :numeric_string => true, as: 'mutationCount'
630
+ end
631
+ end
632
+
595
633
  class CreateBackupMetadata
596
634
  # @private
597
635
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -614,6 +652,8 @@ module Google
614
652
  # @private
615
653
  class Representation < Google::Apis::Core::JsonRepresentation
616
654
  property :create_statement, as: 'createStatement'
655
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::EncryptionConfig, decorator: Google::Apis::SpannerV1::EncryptionConfig::Representation
656
+
617
657
  collection :extra_statements, as: 'extraStatements'
618
658
  end
619
659
  end
@@ -650,10 +690,16 @@ module Google
650
690
  # @private
651
691
  class Representation < Google::Apis::Core::JsonRepresentation
652
692
  property :create_time, as: 'createTime'
693
+ property :earliest_version_time, as: 'earliestVersionTime'
694
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::EncryptionConfig, decorator: Google::Apis::SpannerV1::EncryptionConfig::Representation
695
+
696
+ collection :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
697
+
653
698
  property :name, as: 'name'
654
699
  property :restore_info, as: 'restoreInfo', class: Google::Apis::SpannerV1::RestoreInfo, decorator: Google::Apis::SpannerV1::RestoreInfo::Representation
655
700
 
656
701
  property :state, as: 'state'
702
+ property :version_retention_period, as: 'versionRetentionPeriod'
657
703
  end
658
704
  end
659
705
 
@@ -672,6 +718,23 @@ module Google
672
718
  end
673
719
  end
674
720
 
721
+ class EncryptionConfig
722
+ # @private
723
+ class Representation < Google::Apis::Core::JsonRepresentation
724
+ property :kms_key_name, as: 'kmsKeyName'
725
+ end
726
+ end
727
+
728
+ class EncryptionInfo
729
+ # @private
730
+ class Representation < Google::Apis::Core::JsonRepresentation
731
+ property :encryption_status, as: 'encryptionStatus', class: Google::Apis::SpannerV1::Status, decorator: Google::Apis::SpannerV1::Status::Representation
732
+
733
+ property :encryption_type, as: 'encryptionType'
734
+ property :kms_key_version, as: 'kmsKeyVersion'
735
+ end
736
+ end
737
+
675
738
  class ExecuteBatchDmlRequest
676
739
  # @private
677
740
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -850,6 +913,7 @@ module Google
850
913
  collection :instances, as: 'instances', class: Google::Apis::SpannerV1::Instance, decorator: Google::Apis::SpannerV1::Instance::Representation
851
914
 
852
915
  property :next_page_token, as: 'nextPageToken'
916
+ collection :unreachable, as: 'unreachable'
853
917
  end
854
918
  end
855
919
 
@@ -1018,6 +1082,7 @@ module Google
1018
1082
  class QueryOptions
1019
1083
  # @private
1020
1084
  class Representation < Google::Apis::Core::JsonRepresentation
1085
+ property :optimizer_statistics_package, as: 'optimizerStatisticsPackage'
1021
1086
  property :optimizer_version, as: 'optimizerVersion'
1022
1087
  end
1023
1088
  end
@@ -1073,6 +1138,14 @@ module Google
1073
1138
  end
1074
1139
  end
1075
1140
 
1141
+ class RestoreDatabaseEncryptionConfig
1142
+ # @private
1143
+ class Representation < Google::Apis::Core::JsonRepresentation
1144
+ property :encryption_type, as: 'encryptionType'
1145
+ property :kms_key_name, as: 'kmsKeyName'
1146
+ end
1147
+ end
1148
+
1076
1149
  class RestoreDatabaseMetadata
1077
1150
  # @private
1078
1151
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1092,6 +1165,8 @@ module Google
1092
1165
  class Representation < Google::Apis::Core::JsonRepresentation
1093
1166
  property :backup, as: 'backup'
1094
1167
  property :database_id, as: 'databaseId'
1168
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig, decorator: Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig::Representation
1169
+
1095
1170
  end
1096
1171
  end
1097
1172
 
@@ -290,6 +290,10 @@ module Google
290
290
  # value of the label contains the string "dev". * `name:howl labels.env:dev` -->
291
291
  # The instance's name contains "howl" and it has the label "env" with its value
292
292
  # containing "dev".
293
+ # @param [String] instance_deadline
294
+ # Deadline used while retrieving metadata for instances. Instances whose
295
+ # metadata cannot be retrieved within this deadline will be added to unreachable
296
+ # in ListInstancesResponse.
293
297
  # @param [Fixnum] page_size
294
298
  # Number of instances to be returned in the response. If 0 or less, defaults to
295
299
  # the server's maximum allowed page size.
@@ -313,12 +317,13 @@ module Google
313
317
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
314
318
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
315
319
  # @raise [Google::Apis::AuthorizationError] Authorization is required
316
- def list_project_instances(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
320
+ def list_project_instances(parent, filter: nil, instance_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
317
321
  command = make_simple_command(:get, 'v1/{+parent}/instances', options)
318
322
  command.response_representation = Google::Apis::SpannerV1::ListInstancesResponse::Representation
319
323
  command.response_class = Google::Apis::SpannerV1::ListInstancesResponse
320
324
  command.params['parent'] = parent unless parent.nil?
321
325
  command.query['filter'] = filter unless filter.nil?
326
+ command.query['instanceDeadline'] = instance_deadline unless instance_deadline.nil?
322
327
  command.query['pageSize'] = page_size unless page_size.nil?
323
328
  command.query['pageToken'] = page_token unless page_token.nil?
324
329
  command.query['fields'] = fields unless fields.nil?
@@ -544,6 +549,12 @@ module Google
544
549
  # @param [String] backup_id
545
550
  # Required. The id of the backup to be created. The `backup_id` appended to `
546
551
  # parent` forms the full backup name of the form `projects//instances//backups/`.
552
+ # @param [String] encryption_config_encryption_type
553
+ # Required. The encryption type of the backup.
554
+ # @param [String] encryption_config_kms_key_name
555
+ # Optional. The Cloud KMS key that will be used to protect the backup. This
556
+ # field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
557
+ # Values are of the form `projects//locations//keyRings//cryptoKeys/`.
547
558
  # @param [String] fields
548
559
  # Selector specifying which fields to include in a partial response.
549
560
  # @param [String] quota_user
@@ -561,7 +572,7 @@ module Google
561
572
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
562
573
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
563
574
  # @raise [Google::Apis::AuthorizationError] Authorization is required
564
- def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, fields: nil, quota_user: nil, options: nil, &block)
575
+ def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, fields: nil, quota_user: nil, options: nil, &block)
565
576
  command = make_simple_command(:post, 'v1/{+parent}/backups', options)
566
577
  command.request_representation = Google::Apis::SpannerV1::Backup::Representation
567
578
  command.request_object = backup_object
@@ -569,6 +580,8 @@ module Google
569
580
  command.response_class = Google::Apis::SpannerV1::Operation
570
581
  command.params['parent'] = parent unless parent.nil?
571
582
  command.query['backupId'] = backup_id unless backup_id.nil?
583
+ command.query['encryptionConfig.encryptionType'] = encryption_config_encryption_type unless encryption_config_encryption_type.nil?
584
+ command.query['encryptionConfig.kmsKeyName'] = encryption_config_kms_key_name unless encryption_config_kms_key_name.nil?
572
585
  command.query['fields'] = fields unless fields.nil?
573
586
  command.query['quotaUser'] = quota_user unless quota_user.nil?
574
587
  execute_or_queue_command(command, &block)
@@ -688,18 +701,19 @@ module Google
688
701
  # contains operator. Filter rules are not case sensitive. The following fields
689
702
  # in the Backup are eligible for filtering: * `name` * `database` * `state` * `
690
703
  # create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
691
- # expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes`
692
- # You can combine multiple expressions by enclosing each expression in
693
- # parentheses. By default, expressions are combined with AND logic, but you can
694
- # specify AND, OR, and NOT logic explicitly. Here are a few examples: * `name:
695
- # Howl` - The backup's name contains the string "howl". * `database:prod` - The
696
- # database's name contains the string "prod". * `state:CREATING` - The backup is
697
- # pending creation. * `state:READY` - The backup is fully created and ready for
698
- # use. * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - The backup
699
- # name contains the string "howl" and `create_time` of the backup is before 2018-
700
- # 03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\"` - The backup `
701
- # expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes > 10000000000` -
702
- # The backup's size is greater than 10GB
704
+ # expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
705
+ # version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
706
+ # size_bytes` You can combine multiple expressions by enclosing each expression
707
+ # in parentheses. By default, expressions are combined with AND logic, but you
708
+ # can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `
709
+ # name:Howl` - The backup's name contains the string "howl". * `database:prod` -
710
+ # The database's name contains the string "prod". * `state:CREATING` - The
711
+ # backup is pending creation. * `state:READY` - The backup is fully created and
712
+ # ready for use. * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` -
713
+ # The backup name contains the string "howl" and `create_time` of the backup is
714
+ # before 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\"` - The
715
+ # backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes >
716
+ # 10000000000` - The backup's size is greater than 10GB
703
717
  # @param [Fixnum] page_size
704
718
  # Number of backups to be returned in the response. If 0 or less, defaults to
705
719
  # the server's maximum allowed page size.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-spanner_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-08 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.1.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.6.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: '2.4'
65
+ version: '2.5'
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.1.4
72
+ rubygems_version: 3.2.13
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Simple REST client for Cloud Spanner API V1