google-api-client 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/MIGRATING.md +22 -7
- data/README.md +4 -8
- data/api_names.yaml +1210 -37815
- data/generated/google/apis/acceleratedmobilepageurl_v1.rb +32 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +144 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +86 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +90 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +764 -764
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +180 -180
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +421 -421
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +1 -0
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +187 -187
- data/generated/google/apis/analyticsreporting_v4/representations.rb +42 -42
- data/generated/google/apis/appengine_v1.rb +40 -0
- data/generated/google/apis/appengine_v1/classes.rb +2251 -0
- data/generated/google/apis/appengine_v1/representations.rb +858 -0
- data/generated/google/apis/appengine_v1/service.rb +894 -0
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +11 -6
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/classes.rb +26 -0
- data/generated/google/apis/books_v1/representations.rb +15 -0
- data/generated/google/apis/books_v1/service.rb +4 -1
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +638 -637
- data/generated/google/apis/cloudbuild_v1/representations.rb +110 -110
- data/generated/google/apis/cloudbuild_v1/service.rb +139 -139
- data/generated/google/apis/clouddebugger_v2.rb +3 -3
- data/generated/google/apis/clouddebugger_v2/classes.rb +131 -131
- data/generated/google/apis/clouddebugger_v2/representations.rb +25 -25
- data/generated/google/apis/clouderrorreporting_v1beta1.rb +36 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +590 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +252 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +350 -0
- data/generated/google/apis/cloudfunctions_v1.rb +35 -0
- data/generated/google/apis/cloudfunctions_v1/classes.rb +98 -0
- data/generated/google/apis/cloudfunctions_v1/representations.rb +57 -0
- data/generated/google/apis/cloudfunctions_v1/service.rb +89 -0
- data/generated/google/apis/cloudkms_v1/classes.rb +277 -270
- data/generated/google/apis/cloudkms_v1/representations.rb +73 -73
- data/generated/google/apis/cloudkms_v1/service.rb +194 -194
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1147 -1144
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +513 -936
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +307 -916
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +63 -285
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +333 -681
- data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
- data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
- data/generated/google/apis/cloudtrace_v1/service.rb +16 -16
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +32 -7
- data/generated/google/apis/compute_beta/representations.rb +2 -0
- data/generated/google/apis/compute_beta/service.rb +11 -11
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +95 -2
- data/generated/google/apis/compute_v1/representations.rb +33 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +3333 -3333
- data/generated/google/apis/dataflow_v1b3/representations.rb +759 -759
- data/generated/google/apis/dataflow_v1b3/service.rb +154 -154
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +1097 -1097
- data/generated/google/apis/dataproc_v1/representations.rb +200 -200
- data/generated/google/apis/dataproc_v1/service.rb +356 -356
- data/generated/google/apis/datastore_v1.rb +4 -4
- data/generated/google/apis/datastore_v1/classes.rb +701 -690
- data/generated/google/apis/datastore_v1/representations.rb +160 -160
- data/generated/google/apis/datastore_v1/service.rb +52 -52
- data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +158 -35
- data/generated/google/apis/drive_v2/representations.rb +39 -0
- data/generated/google/apis/drive_v2/service.rb +4 -4
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +162 -33
- data/generated/google/apis/drive_v3/representations.rb +39 -0
- data/generated/google/apis/drive_v3/service.rb +4 -4
- data/generated/google/apis/firebasedynamiclinks_v1.rb +35 -0
- data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +466 -0
- data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +222 -0
- data/generated/google/apis/firebasedynamiclinks_v1/service.rb +95 -0
- data/generated/google/apis/firebaserules_v1.rb +41 -0
- data/generated/google/apis/firebaserules_v1/classes.rb +425 -0
- data/generated/google/apis/firebaserules_v1/representations.rb +222 -0
- data/generated/google/apis/firebaserules_v1/service.rb +495 -0
- data/generated/google/apis/games_v1/classes.rb +4 -0
- data/generated/google/apis/genomics_v1.rb +7 -7
- data/generated/google/apis/genomics_v1/classes.rb +2336 -2335
- data/generated/google/apis/genomics_v1/representations.rb +387 -387
- data/generated/google/apis/genomics_v1/service.rb +1187 -1187
- data/generated/google/apis/gmail_v1/classes.rb +3 -0
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +123 -117
- data/generated/google/apis/iam_v1/representations.rb +33 -33
- data/generated/google/apis/iam_v1/service.rb +109 -109
- data/generated/google/apis/identitytoolkit_v3/classes.rb +5 -0
- data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
- data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
- data/generated/google/apis/kgsearch_v1/service.rb +4 -4
- data/generated/google/apis/language_v1.rb +36 -0
- data/generated/google/apis/language_v1/classes.rb +757 -0
- data/generated/google/apis/language_v1/representations.rb +338 -0
- data/generated/google/apis/language_v1/service.rb +185 -0
- data/generated/google/apis/language_v1beta1/classes.rb +407 -407
- data/generated/google/apis/language_v1beta1/representations.rb +103 -103
- data/generated/google/apis/language_v1beta1/service.rb +45 -45
- data/generated/google/apis/logging_v2.rb +46 -0
- data/generated/google/apis/logging_v2/classes.rb +1271 -0
- data/generated/google/apis/logging_v2/representations.rb +421 -0
- data/generated/google/apis/logging_v2/service.rb +1569 -0
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +886 -886
- data/generated/google/apis/logging_v2beta1/representations.rb +132 -132
- data/generated/google/apis/logging_v2beta1/service.rb +235 -235
- data/generated/google/apis/manufacturers_v1/classes.rb +147 -147
- data/generated/google/apis/manufacturers_v1/representations.rb +29 -29
- data/generated/google/apis/ml_v1.rb +34 -0
- data/generated/google/apis/ml_v1/classes.rb +1617 -0
- data/generated/google/apis/ml_v1/representations.rb +498 -0
- data/generated/google/apis/ml_v1/service.rb +769 -0
- data/generated/google/apis/monitoring_v3.rb +4 -4
- data/generated/google/apis/monitoring_v3/classes.rb +630 -630
- data/generated/google/apis/monitoring_v3/representations.rb +134 -134
- data/generated/google/apis/monitoring_v3/service.rb +240 -240
- data/generated/google/apis/pagespeedonline_v2/classes.rb +1 -0
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +639 -639
- data/generated/google/apis/partners_v2/representations.rb +168 -168
- data/generated/google/apis/partners_v2/service.rb +381 -381
- data/generated/google/apis/people_v1.rb +10 -10
- data/generated/google/apis/people_v1/classes.rb +524 -524
- data/generated/google/apis/people_v1/representations.rb +143 -143
- data/generated/google/apis/people_v1/service.rb +30 -30
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +454 -444
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +90 -90
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +110 -110
- data/generated/google/apis/pubsub_v1/classes.rb +175 -173
- data/generated/google/apis/pubsub_v1/representations.rb +53 -53
- data/generated/google/apis/pubsub_v1/service.rb +210 -210
- data/generated/google/apis/replicapool_v1beta2/classes.rb +2 -0
- data/generated/google/apis/runtimeconfig_v1.rb +38 -0
- data/generated/google/apis/runtimeconfig_v1/classes.rb +252 -0
- data/generated/google/apis/runtimeconfig_v1/representations.rb +98 -0
- data/generated/google/apis/runtimeconfig_v1/service.rb +176 -0
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -6
- data/generated/google/apis/script_v1/representations.rb +1 -1
- data/generated/google/apis/searchconsole_v1.rb +31 -0
- data/generated/google/apis/searchconsole_v1/classes.rb +205 -0
- data/generated/google/apis/searchconsole_v1/representations.rb +129 -0
- data/generated/google/apis/searchconsole_v1/service.rb +88 -0
- data/generated/google/apis/servicecontrol_v1.rb +38 -0
- data/generated/google/apis/servicecontrol_v1/classes.rb +1675 -0
- data/generated/google/apis/servicecontrol_v1/representations.rb +601 -0
- data/generated/google/apis/servicecontrol_v1/service.rb +337 -0
- data/generated/google/apis/servicemanagement_v1.rb +45 -0
- data/generated/google/apis/servicemanagement_v1/classes.rb +4934 -0
- data/generated/google/apis/servicemanagement_v1/representations.rb +1526 -0
- data/generated/google/apis/servicemanagement_v1/service.rb +860 -0
- data/generated/google/apis/serviceuser_v1.rb +42 -0
- data/generated/google/apis/serviceuser_v1/classes.rb +3746 -0
- data/generated/google/apis/serviceuser_v1/representations.rb +1041 -0
- data/generated/google/apis/serviceuser_v1/service.rb +214 -0
- data/generated/google/apis/sheets_v4.rb +3 -3
- data/generated/google/apis/sheets_v4/classes.rb +4390 -4390
- data/generated/google/apis/sheets_v4/representations.rb +381 -381
- data/generated/google/apis/sheets_v4/service.rb +48 -48
- data/generated/google/apis/slides_v1.rb +3 -3
- data/generated/google/apis/slides_v1/classes.rb +2860 -2860
- data/generated/google/apis/slides_v1/representations.rb +693 -693
- data/generated/google/apis/slides_v1/service.rb +30 -30
- data/generated/google/apis/sourcerepo_v1.rb +34 -0
- data/generated/google/apis/sourcerepo_v1/classes.rb +687 -0
- data/generated/google/apis/sourcerepo_v1/representations.rb +285 -0
- data/generated/google/apis/sourcerepo_v1/service.rb +291 -0
- data/generated/google/apis/spanner_v1.rb +35 -0
- data/generated/google/apis/spanner_v1/classes.rb +3294 -0
- data/generated/google/apis/spanner_v1/representations.rb +984 -0
- data/generated/google/apis/spanner_v1/service.rb +1504 -0
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +197 -196
- data/generated/google/apis/speech_v1beta1/representations.rb +53 -53
- data/generated/google/apis/speech_v1beta1/service.rb +27 -27
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +131 -0
- data/generated/google/apis/storage_v1/representations.rb +51 -0
- data/generated/google/apis/storage_v1/service.rb +182 -0
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +732 -661
- data/generated/google/apis/storagetransfer_v1/representations.rb +132 -132
- data/generated/google/apis/storagetransfer_v1/service.rb +174 -197
- data/generated/google/apis/surveys_v2.rb +40 -0
- data/generated/google/apis/surveys_v2/classes.rb +806 -0
- data/generated/google/apis/surveys_v2/representations.rb +347 -0
- data/generated/google/apis/surveys_v2/service.rb +477 -0
- data/generated/google/apis/tagmanager_v2.rb +52 -0
- data/generated/google/apis/tagmanager_v2/classes.rb +2435 -0
- data/generated/google/apis/tagmanager_v2/representations.rb +993 -0
- data/generated/google/apis/tagmanager_v2/service.rb +2865 -0
- data/generated/google/apis/toolresults_v1beta3.rb +34 -0
- data/generated/google/apis/toolresults_v1beta3/classes.rb +2160 -0
- data/generated/google/apis/toolresults_v1beta3/representations.rb +729 -0
- data/generated/google/apis/toolresults_v1beta3/service.rb +1236 -0
- data/generated/google/apis/tracing_v1.rb +40 -0
- data/generated/google/apis/tracing_v1/classes.rb +664 -0
- data/generated/google/apis/tracing_v1/representations.rb +279 -0
- data/generated/google/apis/tracing_v1/service.rb +225 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1223 -1222
- data/generated/google/apis/vision_v1/representations.rb +234 -234
- data/generated/google/apis/vision_v1/service.rb +10 -10
- data/generated/google/apis/webfonts_v1.rb +33 -0
- data/generated/google/apis/webfonts_v1/classes.rb +113 -0
- data/generated/google/apis/webfonts_v1/representations.rb +62 -0
- data/generated/google/apis/webfonts_v1/service.rb +102 -0
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +31 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +41 -0
- data/generated/google/apis/youtube_v3/classes.rb +1 -0
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +76 -76
- data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
- data/generated/google/apis/youtubereporting_v1/service.rb +95 -95
- data/lib/google/apis/generator/annotator.rb +5 -4
- data/lib/google/apis/generator/templates/_class.tmpl +3 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/adsense.rb +99 -0
- data/samples/cli/lib/samples/analytics.rb +18 -0
- data/samples/cli/lib/samples/gmail.rb +33 -0
- data/samples/cli/lib/samples/vision.rb +69 -0
- metadata +89 -4
- data/sync.rb +0 -71
@@ -0,0 +1,35 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/spanner_v1/service.rb'
|
16
|
+
require 'google/apis/spanner_v1/classes.rb'
|
17
|
+
require 'google/apis/spanner_v1/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# Cloud Spanner API
|
22
|
+
#
|
23
|
+
# Cloud Spanner is a managed, mission-critical, globally consistent and scalable
|
24
|
+
# relational database service.
|
25
|
+
#
|
26
|
+
# @see https://cloud.google.com/spanner/
|
27
|
+
module SpannerV1
|
28
|
+
VERSION = 'V1'
|
29
|
+
REVISION = '20170317'
|
30
|
+
|
31
|
+
# View and manage your data across Google Cloud Platform services
|
32
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,3294 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module SpannerV1
|
24
|
+
|
25
|
+
# The response for ListInstanceConfigs.
|
26
|
+
class ListInstanceConfigsResponse
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# `next_page_token` can be sent in a subsequent
|
30
|
+
# ListInstanceConfigs call to
|
31
|
+
# fetch more of the matching instance configurations.
|
32
|
+
# Corresponds to the JSON property `nextPageToken`
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :next_page_token
|
35
|
+
|
36
|
+
# The list of requested instance configurations.
|
37
|
+
# Corresponds to the JSON property `instanceConfigs`
|
38
|
+
# @return [Array<Google::Apis::SpannerV1::InstanceConfig>]
|
39
|
+
attr_accessor :instance_configs
|
40
|
+
|
41
|
+
def initialize(**args)
|
42
|
+
update!(**args)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Update properties of this object
|
46
|
+
def update!(**args)
|
47
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
48
|
+
@instance_configs = args[:instance_configs] if args.key?(:instance_configs)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# The request for BeginTransaction.
|
53
|
+
class BeginTransactionRequest
|
54
|
+
include Google::Apis::Core::Hashable
|
55
|
+
|
56
|
+
# # Transactions
|
57
|
+
# Each session can have at most one active transaction at a time. After the
|
58
|
+
# active transaction is completed, the session can immediately be
|
59
|
+
# re-used for the next transaction. It is not necessary to create a
|
60
|
+
# new session for each transaction.
|
61
|
+
# # Transaction Modes
|
62
|
+
# Cloud Spanner supports two transaction modes:
|
63
|
+
# 1. Locking read-write. This type of transaction is the only way
|
64
|
+
# to write data into Cloud Spanner. These transactions rely on
|
65
|
+
# pessimistic locking and, if necessary, two-phase commit.
|
66
|
+
# Locking read-write transactions may abort, requiring the
|
67
|
+
# application to retry.
|
68
|
+
# 2. Snapshot read-only. This transaction type provides guaranteed
|
69
|
+
# consistency across several reads, but does not allow
|
70
|
+
# writes. Snapshot read-only transactions can be configured to
|
71
|
+
# read at timestamps in the past. Snapshot read-only
|
72
|
+
# transactions do not need to be committed.
|
73
|
+
# For transactions that only read, snapshot read-only transactions
|
74
|
+
# provide simpler semantics and are almost always faster. In
|
75
|
+
# particular, read-only transactions do not take locks, so they do
|
76
|
+
# not conflict with read-write transactions. As a consequence of not
|
77
|
+
# taking locks, they also do not abort, so retry loops are not needed.
|
78
|
+
# Transactions may only read/write data in a single database. They
|
79
|
+
# may, however, read/write data in different tables within that
|
80
|
+
# database.
|
81
|
+
# ## Locking Read-Write Transactions
|
82
|
+
# Locking transactions may be used to atomically read-modify-write
|
83
|
+
# data anywhere in a database. This type of transaction is externally
|
84
|
+
# consistent.
|
85
|
+
# Clients should attempt to minimize the amount of time a transaction
|
86
|
+
# is active. Faster transactions commit with higher probability
|
87
|
+
# and cause less contention. Cloud Spanner attempts to keep read locks
|
88
|
+
# active as long as the transaction continues to do reads, and the
|
89
|
+
# transaction has not been terminated by
|
90
|
+
# Commit or
|
91
|
+
# Rollback. Long periods of
|
92
|
+
# inactivity at the client may cause Cloud Spanner to release a
|
93
|
+
# transaction's locks and abort it.
|
94
|
+
# Reads performed within a transaction acquire locks on the data
|
95
|
+
# being read. Writes can only be done at commit time, after all reads
|
96
|
+
# have been completed.
|
97
|
+
# Conceptually, a read-write transaction consists of zero or more
|
98
|
+
# reads or SQL queries followed by
|
99
|
+
# Commit. At any time before
|
100
|
+
# Commit, the client can send a
|
101
|
+
# Rollback request to abort the
|
102
|
+
# transaction.
|
103
|
+
# ### Semantics
|
104
|
+
# Cloud Spanner can commit the transaction if all read locks it acquired
|
105
|
+
# are still valid at commit time, and it is able to acquire write
|
106
|
+
# locks for all writes. Cloud Spanner can abort the transaction for any
|
107
|
+
# reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
|
108
|
+
# that the transaction has not modified any user data in Cloud Spanner.
|
109
|
+
# Unless the transaction commits, Cloud Spanner makes no guarantees about
|
110
|
+
# how long the transaction's locks were held for. It is an error to
|
111
|
+
# use Cloud Spanner locks for any sort of mutual exclusion other than
|
112
|
+
# between Cloud Spanner transactions themselves.
|
113
|
+
# ### Retrying Aborted Transactions
|
114
|
+
# When a transaction aborts, the application can choose to retry the
|
115
|
+
# whole transaction again. To maximize the chances of successfully
|
116
|
+
# committing the retry, the client should execute the retry in the
|
117
|
+
# same session as the original attempt. The original session's lock
|
118
|
+
# priority increases with each consecutive abort, meaning that each
|
119
|
+
# attempt has a slightly better chance of success than the previous.
|
120
|
+
# Under some circumstances (e.g., many transactions attempting to
|
121
|
+
# modify the same row(s)), a transaction can abort many times in a
|
122
|
+
# short period before successfully committing. Thus, it is not a good
|
123
|
+
# idea to cap the number of retries a transaction can attempt;
|
124
|
+
# instead, it is better to limit the total amount of wall time spent
|
125
|
+
# retrying.
|
126
|
+
# ### Idle Transactions
|
127
|
+
# A transaction is considered idle if it has no outstanding reads or
|
128
|
+
# SQL queries and has not started a read or SQL query within the last 10
|
129
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they
|
130
|
+
# don't hold on to locks indefinitely. In that case, the commit will
|
131
|
+
# fail with error `ABORTED`.
|
132
|
+
# If this behavior is undesirable, periodically executing a simple
|
133
|
+
# SQL query in the transaction (e.g., `SELECT 1`) prevents the
|
134
|
+
# transaction from becoming idle.
|
135
|
+
# ## Snapshot Read-Only Transactions
|
136
|
+
# Snapshot read-only transactions provides a simpler method than
|
137
|
+
# locking read-write transactions for doing several consistent
|
138
|
+
# reads. However, this type of transaction does not support writes.
|
139
|
+
# Snapshot transactions do not take locks. Instead, they work by
|
140
|
+
# choosing a Cloud Spanner timestamp, then executing all reads at that
|
141
|
+
# timestamp. Since they do not acquire locks, they do not block
|
142
|
+
# concurrent read-write transactions.
|
143
|
+
# Unlike locking read-write transactions, snapshot read-only
|
144
|
+
# transactions never abort. They can fail if the chosen read
|
145
|
+
# timestamp is garbage collected; however, the default garbage
|
146
|
+
# collection policy is generous enough that most applications do not
|
147
|
+
# need to worry about this in practice.
|
148
|
+
# Snapshot read-only transactions do not need to call
|
149
|
+
# Commit or
|
150
|
+
# Rollback (and in fact are not
|
151
|
+
# permitted to do so).
|
152
|
+
# To execute a snapshot transaction, the client specifies a timestamp
|
153
|
+
# bound, which tells Cloud Spanner how to choose a read timestamp.
|
154
|
+
# The types of timestamp bound are:
|
155
|
+
# - Strong (the default).
|
156
|
+
# - Bounded staleness.
|
157
|
+
# - Exact staleness.
|
158
|
+
# If the Cloud Spanner database to be read is geographically distributed,
|
159
|
+
# stale read-only transactions can execute more quickly than strong
|
160
|
+
# or read-write transaction, because they are able to execute far
|
161
|
+
# from the leader replica.
|
162
|
+
# Each type of timestamp bound is discussed in detail below.
|
163
|
+
# ### Strong
|
164
|
+
# Strong reads are guaranteed to see the effects of all transactions
|
165
|
+
# that have committed before the start of the read. Furthermore, all
|
166
|
+
# rows yielded by a single read are consistent with each other -- if
|
167
|
+
# any part of the read observes a transaction, all parts of the read
|
168
|
+
# see the transaction.
|
169
|
+
# Strong reads are not repeatable: two consecutive strong read-only
|
170
|
+
# transactions might return inconsistent results if there are
|
171
|
+
# concurrent writes. If consistency across reads is required, the
|
172
|
+
# reads should be executed within a transaction or at an exact read
|
173
|
+
# timestamp.
|
174
|
+
# See TransactionOptions.ReadOnly.strong.
|
175
|
+
# ### Exact Staleness
|
176
|
+
# These timestamp bounds execute reads at a user-specified
|
177
|
+
# timestamp. Reads at a timestamp are guaranteed to see a consistent
|
178
|
+
# prefix of the global transaction history: they observe
|
179
|
+
# modifications done by all transactions with a commit timestamp <=
|
180
|
+
# the read timestamp, and observe none of the modifications done by
|
181
|
+
# transactions with a larger commit timestamp. They will block until
|
182
|
+
# all conflicting transactions that may be assigned commit timestamps
|
183
|
+
# <= the read timestamp have finished.
|
184
|
+
# The timestamp can either be expressed as an absolute Cloud Spanner commit
|
185
|
+
# timestamp or a staleness relative to the current time.
|
186
|
+
# These modes do not require a "negotiation phase" to pick a
|
187
|
+
# timestamp. As a result, they execute slightly faster than the
|
188
|
+
# equivalent boundedly stale concurrency modes. On the other hand,
|
189
|
+
# boundedly stale reads usually return fresher results.
|
190
|
+
# See TransactionOptions.ReadOnly.read_timestamp and
|
191
|
+
# TransactionOptions.ReadOnly.exact_staleness.
|
192
|
+
# ### Bounded Staleness
|
193
|
+
# Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
|
194
|
+
# subject to a user-provided staleness bound. Cloud Spanner chooses the
|
195
|
+
# newest timestamp within the staleness bound that allows execution
|
196
|
+
# of the reads at the closest available replica without blocking.
|
197
|
+
# All rows yielded are consistent with each other -- if any part of
|
198
|
+
# the read observes a transaction, all parts of the read see the
|
199
|
+
# transaction. Boundedly stale reads are not repeatable: two stale
|
200
|
+
# reads, even if they use the same staleness bound, can execute at
|
201
|
+
# different timestamps and thus return inconsistent results.
|
202
|
+
# Boundedly stale reads execute in two phases: the first phase
|
203
|
+
# negotiates a timestamp among all replicas needed to serve the
|
204
|
+
# read. In the second phase, reads are executed at the negotiated
|
205
|
+
# timestamp.
|
206
|
+
# As a result of the two phase execution, bounded staleness reads are
|
207
|
+
# usually a little slower than comparable exact staleness
|
208
|
+
# reads. However, they are typically able to return fresher
|
209
|
+
# results, and are more likely to execute at the closest replica.
|
210
|
+
# Because the timestamp negotiation requires up-front knowledge of
|
211
|
+
# which rows will be read, it can only be used with single-use
|
212
|
+
# read-only transactions.
|
213
|
+
# See TransactionOptions.ReadOnly.max_staleness and
|
214
|
+
# TransactionOptions.ReadOnly.min_read_timestamp.
|
215
|
+
# ### Old Read Timestamps and Garbage Collection
|
216
|
+
# Cloud Spanner continuously garbage collects deleted and overwritten data
|
217
|
+
# in the background to reclaim storage space. This process is known
|
218
|
+
# as "version GC". By default, version GC reclaims versions after they
|
219
|
+
# are one hour old. Because of this, Cloud Spanner cannot perform reads
|
220
|
+
# at read timestamps more than one hour in the past. This
|
221
|
+
# restriction also applies to in-progress reads and/or SQL queries whose
|
222
|
+
# timestamp become too old while executing. Reads and SQL queries with
|
223
|
+
# too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
224
|
+
# Corresponds to the JSON property `options`
|
225
|
+
# @return [Google::Apis::SpannerV1::TransactionOptions]
|
226
|
+
attr_accessor :options
|
227
|
+
|
228
|
+
def initialize(**args)
|
229
|
+
update!(**args)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Update properties of this object
|
233
|
+
def update!(**args)
|
234
|
+
@options = args[:options] if args.key?(:options)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# The request for Commit.
|
239
|
+
class CommitRequest
|
240
|
+
include Google::Apis::Core::Hashable
|
241
|
+
|
242
|
+
# # Transactions
|
243
|
+
# Each session can have at most one active transaction at a time. After the
|
244
|
+
# active transaction is completed, the session can immediately be
|
245
|
+
# re-used for the next transaction. It is not necessary to create a
|
246
|
+
# new session for each transaction.
|
247
|
+
# # Transaction Modes
|
248
|
+
# Cloud Spanner supports two transaction modes:
|
249
|
+
# 1. Locking read-write. This type of transaction is the only way
|
250
|
+
# to write data into Cloud Spanner. These transactions rely on
|
251
|
+
# pessimistic locking and, if necessary, two-phase commit.
|
252
|
+
# Locking read-write transactions may abort, requiring the
|
253
|
+
# application to retry.
|
254
|
+
# 2. Snapshot read-only. This transaction type provides guaranteed
|
255
|
+
# consistency across several reads, but does not allow
|
256
|
+
# writes. Snapshot read-only transactions can be configured to
|
257
|
+
# read at timestamps in the past. Snapshot read-only
|
258
|
+
# transactions do not need to be committed.
|
259
|
+
# For transactions that only read, snapshot read-only transactions
|
260
|
+
# provide simpler semantics and are almost always faster. In
|
261
|
+
# particular, read-only transactions do not take locks, so they do
|
262
|
+
# not conflict with read-write transactions. As a consequence of not
|
263
|
+
# taking locks, they also do not abort, so retry loops are not needed.
|
264
|
+
# Transactions may only read/write data in a single database. They
|
265
|
+
# may, however, read/write data in different tables within that
|
266
|
+
# database.
|
267
|
+
# ## Locking Read-Write Transactions
|
268
|
+
# Locking transactions may be used to atomically read-modify-write
|
269
|
+
# data anywhere in a database. This type of transaction is externally
|
270
|
+
# consistent.
|
271
|
+
# Clients should attempt to minimize the amount of time a transaction
|
272
|
+
# is active. Faster transactions commit with higher probability
|
273
|
+
# and cause less contention. Cloud Spanner attempts to keep read locks
|
274
|
+
# active as long as the transaction continues to do reads, and the
|
275
|
+
# transaction has not been terminated by
|
276
|
+
# Commit or
|
277
|
+
# Rollback. Long periods of
|
278
|
+
# inactivity at the client may cause Cloud Spanner to release a
|
279
|
+
# transaction's locks and abort it.
|
280
|
+
# Reads performed within a transaction acquire locks on the data
|
281
|
+
# being read. Writes can only be done at commit time, after all reads
|
282
|
+
# have been completed.
|
283
|
+
# Conceptually, a read-write transaction consists of zero or more
|
284
|
+
# reads or SQL queries followed by
|
285
|
+
# Commit. At any time before
|
286
|
+
# Commit, the client can send a
|
287
|
+
# Rollback request to abort the
|
288
|
+
# transaction.
|
289
|
+
# ### Semantics
|
290
|
+
# Cloud Spanner can commit the transaction if all read locks it acquired
|
291
|
+
# are still valid at commit time, and it is able to acquire write
|
292
|
+
# locks for all writes. Cloud Spanner can abort the transaction for any
|
293
|
+
# reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
|
294
|
+
# that the transaction has not modified any user data in Cloud Spanner.
|
295
|
+
# Unless the transaction commits, Cloud Spanner makes no guarantees about
|
296
|
+
# how long the transaction's locks were held for. It is an error to
|
297
|
+
# use Cloud Spanner locks for any sort of mutual exclusion other than
|
298
|
+
# between Cloud Spanner transactions themselves.
|
299
|
+
# ### Retrying Aborted Transactions
|
300
|
+
# When a transaction aborts, the application can choose to retry the
|
301
|
+
# whole transaction again. To maximize the chances of successfully
|
302
|
+
# committing the retry, the client should execute the retry in the
|
303
|
+
# same session as the original attempt. The original session's lock
|
304
|
+
# priority increases with each consecutive abort, meaning that each
|
305
|
+
# attempt has a slightly better chance of success than the previous.
|
306
|
+
# Under some circumstances (e.g., many transactions attempting to
|
307
|
+
# modify the same row(s)), a transaction can abort many times in a
|
308
|
+
# short period before successfully committing. Thus, it is not a good
|
309
|
+
# idea to cap the number of retries a transaction can attempt;
|
310
|
+
# instead, it is better to limit the total amount of wall time spent
|
311
|
+
# retrying.
|
312
|
+
# ### Idle Transactions
|
313
|
+
# A transaction is considered idle if it has no outstanding reads or
|
314
|
+
# SQL queries and has not started a read or SQL query within the last 10
|
315
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they
|
316
|
+
# don't hold on to locks indefinitely. In that case, the commit will
|
317
|
+
# fail with error `ABORTED`.
|
318
|
+
# If this behavior is undesirable, periodically executing a simple
|
319
|
+
# SQL query in the transaction (e.g., `SELECT 1`) prevents the
|
320
|
+
# transaction from becoming idle.
|
321
|
+
# ## Snapshot Read-Only Transactions
|
322
|
+
# Snapshot read-only transactions provides a simpler method than
|
323
|
+
# locking read-write transactions for doing several consistent
|
324
|
+
# reads. However, this type of transaction does not support writes.
|
325
|
+
# Snapshot transactions do not take locks. Instead, they work by
|
326
|
+
# choosing a Cloud Spanner timestamp, then executing all reads at that
|
327
|
+
# timestamp. Since they do not acquire locks, they do not block
|
328
|
+
# concurrent read-write transactions.
|
329
|
+
# Unlike locking read-write transactions, snapshot read-only
|
330
|
+
# transactions never abort. They can fail if the chosen read
|
331
|
+
# timestamp is garbage collected; however, the default garbage
|
332
|
+
# collection policy is generous enough that most applications do not
|
333
|
+
# need to worry about this in practice.
|
334
|
+
# Snapshot read-only transactions do not need to call
|
335
|
+
# Commit or
|
336
|
+
# Rollback (and in fact are not
|
337
|
+
# permitted to do so).
|
338
|
+
# To execute a snapshot transaction, the client specifies a timestamp
|
339
|
+
# bound, which tells Cloud Spanner how to choose a read timestamp.
|
340
|
+
# The types of timestamp bound are:
|
341
|
+
# - Strong (the default).
|
342
|
+
# - Bounded staleness.
|
343
|
+
# - Exact staleness.
|
344
|
+
# If the Cloud Spanner database to be read is geographically distributed,
|
345
|
+
# stale read-only transactions can execute more quickly than strong
|
346
|
+
# or read-write transaction, because they are able to execute far
|
347
|
+
# from the leader replica.
|
348
|
+
# Each type of timestamp bound is discussed in detail below.
|
349
|
+
# ### Strong
|
350
|
+
# Strong reads are guaranteed to see the effects of all transactions
|
351
|
+
# that have committed before the start of the read. Furthermore, all
|
352
|
+
# rows yielded by a single read are consistent with each other -- if
|
353
|
+
# any part of the read observes a transaction, all parts of the read
|
354
|
+
# see the transaction.
|
355
|
+
# Strong reads are not repeatable: two consecutive strong read-only
|
356
|
+
# transactions might return inconsistent results if there are
|
357
|
+
# concurrent writes. If consistency across reads is required, the
|
358
|
+
# reads should be executed within a transaction or at an exact read
|
359
|
+
# timestamp.
|
360
|
+
# See TransactionOptions.ReadOnly.strong.
|
361
|
+
# ### Exact Staleness
|
362
|
+
# These timestamp bounds execute reads at a user-specified
|
363
|
+
# timestamp. Reads at a timestamp are guaranteed to see a consistent
|
364
|
+
# prefix of the global transaction history: they observe
|
365
|
+
# modifications done by all transactions with a commit timestamp <=
|
366
|
+
# the read timestamp, and observe none of the modifications done by
|
367
|
+
# transactions with a larger commit timestamp. They will block until
|
368
|
+
# all conflicting transactions that may be assigned commit timestamps
|
369
|
+
# <= the read timestamp have finished.
|
370
|
+
# The timestamp can either be expressed as an absolute Cloud Spanner commit
|
371
|
+
# timestamp or a staleness relative to the current time.
|
372
|
+
# These modes do not require a "negotiation phase" to pick a
|
373
|
+
# timestamp. As a result, they execute slightly faster than the
|
374
|
+
# equivalent boundedly stale concurrency modes. On the other hand,
|
375
|
+
# boundedly stale reads usually return fresher results.
|
376
|
+
# See TransactionOptions.ReadOnly.read_timestamp and
|
377
|
+
# TransactionOptions.ReadOnly.exact_staleness.
|
378
|
+
# ### Bounded Staleness
|
379
|
+
# Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
|
380
|
+
# subject to a user-provided staleness bound. Cloud Spanner chooses the
|
381
|
+
# newest timestamp within the staleness bound that allows execution
|
382
|
+
# of the reads at the closest available replica without blocking.
|
383
|
+
# All rows yielded are consistent with each other -- if any part of
|
384
|
+
# the read observes a transaction, all parts of the read see the
|
385
|
+
# transaction. Boundedly stale reads are not repeatable: two stale
|
386
|
+
# reads, even if they use the same staleness bound, can execute at
|
387
|
+
# different timestamps and thus return inconsistent results.
|
388
|
+
# Boundedly stale reads execute in two phases: the first phase
|
389
|
+
# negotiates a timestamp among all replicas needed to serve the
|
390
|
+
# read. In the second phase, reads are executed at the negotiated
|
391
|
+
# timestamp.
|
392
|
+
# As a result of the two phase execution, bounded staleness reads are
|
393
|
+
# usually a little slower than comparable exact staleness
|
394
|
+
# reads. However, they are typically able to return fresher
|
395
|
+
# results, and are more likely to execute at the closest replica.
|
396
|
+
# Because the timestamp negotiation requires up-front knowledge of
|
397
|
+
# which rows will be read, it can only be used with single-use
|
398
|
+
# read-only transactions.
|
399
|
+
# See TransactionOptions.ReadOnly.max_staleness and
|
400
|
+
# TransactionOptions.ReadOnly.min_read_timestamp.
|
401
|
+
# ### Old Read Timestamps and Garbage Collection
|
402
|
+
# Cloud Spanner continuously garbage collects deleted and overwritten data
|
403
|
+
# in the background to reclaim storage space. This process is known
|
404
|
+
# as "version GC". By default, version GC reclaims versions after they
|
405
|
+
# are one hour old. Because of this, Cloud Spanner cannot perform reads
|
406
|
+
# at read timestamps more than one hour in the past. This
|
407
|
+
# restriction also applies to in-progress reads and/or SQL queries whose
|
408
|
+
# timestamp become too old while executing. Reads and SQL queries with
|
409
|
+
# too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
410
|
+
# Corresponds to the JSON property `singleUseTransaction`
|
411
|
+
# @return [Google::Apis::SpannerV1::TransactionOptions]
|
412
|
+
attr_accessor :single_use_transaction
|
413
|
+
|
414
|
+
# The mutations to be executed when this transaction commits. All
|
415
|
+
# mutations are applied atomically, in the order they appear in
|
416
|
+
# this list.
|
417
|
+
# Corresponds to the JSON property `mutations`
|
418
|
+
# @return [Array<Google::Apis::SpannerV1::Mutation>]
|
419
|
+
attr_accessor :mutations
|
420
|
+
|
421
|
+
# Commit a previously-started transaction.
|
422
|
+
# Corresponds to the JSON property `transactionId`
|
423
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
424
|
+
# @return [String]
|
425
|
+
attr_accessor :transaction_id
|
426
|
+
|
427
|
+
def initialize(**args)
|
428
|
+
update!(**args)
|
429
|
+
end
|
430
|
+
|
431
|
+
# Update properties of this object
|
432
|
+
def update!(**args)
|
433
|
+
@single_use_transaction = args[:single_use_transaction] if args.key?(:single_use_transaction)
|
434
|
+
@mutations = args[:mutations] if args.key?(:mutations)
|
435
|
+
@transaction_id = args[:transaction_id] if args.key?(:transaction_id)
|
436
|
+
end
|
437
|
+
end
|
438
|
+
|
439
|
+
# Request message for `GetIamPolicy` method.
|
440
|
+
class GetIamPolicyRequest
|
441
|
+
include Google::Apis::Core::Hashable
|
442
|
+
|
443
|
+
def initialize(**args)
|
444
|
+
update!(**args)
|
445
|
+
end
|
446
|
+
|
447
|
+
# Update properties of this object
|
448
|
+
def update!(**args)
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
# Response message for `TestIamPermissions` method.
|
453
|
+
class TestIamPermissionsResponse
|
454
|
+
include Google::Apis::Core::Hashable
|
455
|
+
|
456
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
457
|
+
# allowed.
|
458
|
+
# Corresponds to the JSON property `permissions`
|
459
|
+
# @return [Array<String>]
|
460
|
+
attr_accessor :permissions
|
461
|
+
|
462
|
+
def initialize(**args)
|
463
|
+
update!(**args)
|
464
|
+
end
|
465
|
+
|
466
|
+
# Update properties of this object
|
467
|
+
def update!(**args)
|
468
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
469
|
+
end
|
470
|
+
end
|
471
|
+
|
472
|
+
# Metadata type for the operation returned by
|
473
|
+
# CreateDatabase.
|
474
|
+
class CreateDatabaseMetadata
|
475
|
+
include Google::Apis::Core::Hashable
|
476
|
+
|
477
|
+
# The database being created.
|
478
|
+
# Corresponds to the JSON property `database`
|
479
|
+
# @return [String]
|
480
|
+
attr_accessor :database
|
481
|
+
|
482
|
+
def initialize(**args)
|
483
|
+
update!(**args)
|
484
|
+
end
|
485
|
+
|
486
|
+
# Update properties of this object
|
487
|
+
def update!(**args)
|
488
|
+
@database = args[:database] if args.key?(:database)
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
# A rule to be applied in a Policy.
|
493
|
+
class Rule
|
494
|
+
include Google::Apis::Core::Hashable
|
495
|
+
|
496
|
+
# Human-readable description of the rule.
|
497
|
+
# Corresponds to the JSON property `description`
|
498
|
+
# @return [String]
|
499
|
+
attr_accessor :description
|
500
|
+
|
501
|
+
# Additional restrictions that must be met
|
502
|
+
# Corresponds to the JSON property `conditions`
|
503
|
+
# @return [Array<Google::Apis::SpannerV1::Condition>]
|
504
|
+
attr_accessor :conditions
|
505
|
+
|
506
|
+
# The config returned to callers of tech.iam.IAM.CheckPolicy for any entries
|
507
|
+
# that match the LOG action.
|
508
|
+
# Corresponds to the JSON property `logConfig`
|
509
|
+
# @return [Array<Google::Apis::SpannerV1::LogConfig>]
|
510
|
+
attr_accessor :log_config
|
511
|
+
|
512
|
+
# If one or more 'in' clauses are specified, the rule matches if
|
513
|
+
# the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
|
514
|
+
# Corresponds to the JSON property `in`
|
515
|
+
# @return [Array<String>]
|
516
|
+
attr_accessor :in
|
517
|
+
|
518
|
+
# A permission is a string of form '<service>.<resource type>.<verb>'
|
519
|
+
# (e.g., 'storage.buckets.list'). A value of '*' matches all permissions,
|
520
|
+
# and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
|
521
|
+
# Corresponds to the JSON property `permissions`
|
522
|
+
# @return [Array<String>]
|
523
|
+
attr_accessor :permissions
|
524
|
+
|
525
|
+
# Required
|
526
|
+
# Corresponds to the JSON property `action`
|
527
|
+
# @return [String]
|
528
|
+
attr_accessor :action
|
529
|
+
|
530
|
+
# If one or more 'not_in' clauses are specified, the rule matches
|
531
|
+
# if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
|
532
|
+
# The format for in and not_in entries is the same as for members in a
|
533
|
+
# Binding (see google/iam/v1/policy.proto).
|
534
|
+
# Corresponds to the JSON property `notIn`
|
535
|
+
# @return [Array<String>]
|
536
|
+
attr_accessor :not_in
|
537
|
+
|
538
|
+
def initialize(**args)
|
539
|
+
update!(**args)
|
540
|
+
end
|
541
|
+
|
542
|
+
# Update properties of this object
|
543
|
+
def update!(**args)
|
544
|
+
@description = args[:description] if args.key?(:description)
|
545
|
+
@conditions = args[:conditions] if args.key?(:conditions)
|
546
|
+
@log_config = args[:log_config] if args.key?(:log_config)
|
547
|
+
@in = args[:in] if args.key?(:in)
|
548
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
549
|
+
@action = args[:action] if args.key?(:action)
|
550
|
+
@not_in = args[:not_in] if args.key?(:not_in)
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
# Specifies what kind of log the caller must write
|
555
|
+
# Increment a streamz counter with the specified metric and field names.
|
556
|
+
# Metric names should start with a '/', generally be lowercase-only,
|
557
|
+
# and end in "_count". Field names should not contain an initial slash.
|
558
|
+
# The actual exported metric names will have "/iam/policy" prepended.
|
559
|
+
# Field names correspond to IAM request parameters and field values are
|
560
|
+
# their respective values.
|
561
|
+
# At present the only supported field names are
|
562
|
+
# - "iam_principal", corresponding to IAMContext.principal;
|
563
|
+
# - "" (empty string), resulting in one aggretated counter with no field.
|
564
|
+
# Examples:
|
565
|
+
# counter ` metric: "/debug_access_count" field: "iam_principal" `
|
566
|
+
# ==> increment counter /iam/policy/backend_debug_access_count
|
567
|
+
# `iam_principal=[value of IAMContext.principal]`
|
568
|
+
# At this time we do not support:
|
569
|
+
# * multiple field names (though this may be supported in the future)
|
570
|
+
# * decrementing the counter
|
571
|
+
# * incrementing it by anything other than 1
|
572
|
+
class LogConfig
|
573
|
+
include Google::Apis::Core::Hashable
|
574
|
+
|
575
|
+
# Options for counters
|
576
|
+
# Corresponds to the JSON property `counter`
|
577
|
+
# @return [Google::Apis::SpannerV1::CounterOptions]
|
578
|
+
attr_accessor :counter
|
579
|
+
|
580
|
+
# Write a Data Access (Gin) log
|
581
|
+
# Corresponds to the JSON property `dataAccess`
|
582
|
+
# @return [Google::Apis::SpannerV1::DataAccessOptions]
|
583
|
+
attr_accessor :data_access
|
584
|
+
|
585
|
+
# Write a Cloud Audit log
|
586
|
+
# Corresponds to the JSON property `cloudAudit`
|
587
|
+
# @return [Google::Apis::SpannerV1::CloudAuditOptions]
|
588
|
+
attr_accessor :cloud_audit
|
589
|
+
|
590
|
+
def initialize(**args)
|
591
|
+
update!(**args)
|
592
|
+
end
|
593
|
+
|
594
|
+
# Update properties of this object
|
595
|
+
def update!(**args)
|
596
|
+
@counter = args[:counter] if args.key?(:counter)
|
597
|
+
@data_access = args[:data_access] if args.key?(:data_access)
|
598
|
+
@cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit)
|
599
|
+
end
|
600
|
+
end
|
601
|
+
|
602
|
+
# A session in the Cloud Spanner API.
|
603
|
+
class Session
|
604
|
+
include Google::Apis::Core::Hashable
|
605
|
+
|
606
|
+
# Required. The name of the session.
|
607
|
+
# Corresponds to the JSON property `name`
|
608
|
+
# @return [String]
|
609
|
+
attr_accessor :name
|
610
|
+
|
611
|
+
def initialize(**args)
|
612
|
+
update!(**args)
|
613
|
+
end
|
614
|
+
|
615
|
+
# Update properties of this object
|
616
|
+
def update!(**args)
|
617
|
+
@name = args[:name] if args.key?(:name)
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
621
|
+
# The response for ListInstances.
|
622
|
+
class ListInstancesResponse
|
623
|
+
include Google::Apis::Core::Hashable
|
624
|
+
|
625
|
+
# `next_page_token` can be sent in a subsequent
|
626
|
+
# ListInstances call to fetch more
|
627
|
+
# of the matching instances.
|
628
|
+
# Corresponds to the JSON property `nextPageToken`
|
629
|
+
# @return [String]
|
630
|
+
attr_accessor :next_page_token
|
631
|
+
|
632
|
+
# The list of requested instances.
|
633
|
+
# Corresponds to the JSON property `instances`
|
634
|
+
# @return [Array<Google::Apis::SpannerV1::Instance>]
|
635
|
+
attr_accessor :instances
|
636
|
+
|
637
|
+
def initialize(**args)
|
638
|
+
update!(**args)
|
639
|
+
end
|
640
|
+
|
641
|
+
# Update properties of this object
|
642
|
+
def update!(**args)
|
643
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
644
|
+
@instances = args[:instances] if args.key?(:instances)
|
645
|
+
end
|
646
|
+
end
|
647
|
+
|
648
|
+
# KeyRange represents a range of rows in a table or index.
|
649
|
+
# A range has a start key and an end key. These keys can be open or
|
650
|
+
# closed, indicating if the range includes rows with that key.
|
651
|
+
# Keys are represented by lists, where the ith value in the list
|
652
|
+
# corresponds to the ith component of the table or index primary key.
|
653
|
+
# Individual values are encoded as described here.
|
654
|
+
# For example, consider the following table definition:
|
655
|
+
# CREATE TABLE UserEvents (
|
656
|
+
# UserName STRING(MAX),
|
657
|
+
# EventDate STRING(10)
|
658
|
+
# ) PRIMARY KEY(UserName, EventDate);
|
659
|
+
# The following keys name rows in this table:
|
660
|
+
# "Bob", "2014-09-23"
|
661
|
+
# Since the `UserEvents` table's `PRIMARY KEY` clause names two
|
662
|
+
# columns, each `UserEvents` key has two elements; the first is the
|
663
|
+
# `UserName`, and the second is the `EventDate`.
|
664
|
+
# Key ranges with multiple components are interpreted
|
665
|
+
# lexicographically by component using the table or index key's declared
|
666
|
+
# sort order. For example, the following range returns all events for
|
667
|
+
# user `"Bob"` that occurred in the year 2015:
|
668
|
+
# "start_closed": ["Bob", "2015-01-01"]
|
669
|
+
# "end_closed": ["Bob", "2015-12-31"]
|
670
|
+
# Start and end keys can omit trailing key components. This affects the
|
671
|
+
# inclusion and exclusion of rows that exactly match the provided key
|
672
|
+
# components: if the key is closed, then rows that exactly match the
|
673
|
+
# provided components are included; if the key is open, then rows
|
674
|
+
# that exactly match are not included.
|
675
|
+
# For example, the following range includes all events for `"Bob"` that
|
676
|
+
# occurred during and after the year 2000:
|
677
|
+
# "start_closed": ["Bob", "2000-01-01"]
|
678
|
+
# "end_closed": ["Bob"]
|
679
|
+
# The next example retrieves all events for `"Bob"`:
|
680
|
+
# "start_closed": ["Bob"]
|
681
|
+
# "end_closed": ["Bob"]
|
682
|
+
# To retrieve events before the year 2000:
|
683
|
+
# "start_closed": ["Bob"]
|
684
|
+
# "end_open": ["Bob", "2000-01-01"]
|
685
|
+
# The following range includes all rows in the table:
|
686
|
+
# "start_closed": []
|
687
|
+
# "end_closed": []
|
688
|
+
# This range returns all users whose `UserName` begins with any
|
689
|
+
# character from A to C:
|
690
|
+
# "start_closed": ["A"]
|
691
|
+
# "end_open": ["D"]
|
692
|
+
# This range returns all users whose `UserName` begins with B:
|
693
|
+
# "start_closed": ["B"]
|
694
|
+
# "end_open": ["C"]
|
695
|
+
# Key ranges honor column sort order. For example, suppose a table is
|
696
|
+
# defined as follows:
|
697
|
+
# CREATE TABLE DescendingSortedTable `
|
698
|
+
# Key INT64,
|
699
|
+
# ...
|
700
|
+
# ) PRIMARY KEY(Key DESC);
|
701
|
+
# The following range retrieves all rows with key values between 1
|
702
|
+
# and 100 inclusive:
|
703
|
+
# "start_closed": ["100"]
|
704
|
+
# "end_closed": ["1"]
|
705
|
+
# Note that 100 is passed as the start, and 1 is passed as the end,
|
706
|
+
# because `Key` is a descending column in the schema.
|
707
|
+
class KeyRange
|
708
|
+
include Google::Apis::Core::Hashable
|
709
|
+
|
710
|
+
# If the end is closed, then the range includes all rows whose
|
711
|
+
# first `len(end_closed)` key columns exactly match `end_closed`.
|
712
|
+
# Corresponds to the JSON property `endClosed`
|
713
|
+
# @return [Array<Object>]
|
714
|
+
attr_accessor :end_closed
|
715
|
+
|
716
|
+
# If the start is closed, then the range includes all rows whose
|
717
|
+
# first `len(start_closed)` key columns exactly match `start_closed`.
|
718
|
+
# Corresponds to the JSON property `startClosed`
|
719
|
+
# @return [Array<Object>]
|
720
|
+
attr_accessor :start_closed
|
721
|
+
|
722
|
+
# If the start is open, then the range excludes rows whose first
|
723
|
+
# `len(start_open)` key columns exactly match `start_open`.
|
724
|
+
# Corresponds to the JSON property `startOpen`
|
725
|
+
# @return [Array<Object>]
|
726
|
+
attr_accessor :start_open
|
727
|
+
|
728
|
+
# If the end is open, then the range excludes rows whose first
|
729
|
+
# `len(end_open)` key columns exactly match `end_open`.
|
730
|
+
# Corresponds to the JSON property `endOpen`
|
731
|
+
# @return [Array<Object>]
|
732
|
+
attr_accessor :end_open
|
733
|
+
|
734
|
+
def initialize(**args)
|
735
|
+
update!(**args)
|
736
|
+
end
|
737
|
+
|
738
|
+
# Update properties of this object
|
739
|
+
def update!(**args)
|
740
|
+
@end_closed = args[:end_closed] if args.key?(:end_closed)
|
741
|
+
@start_closed = args[:start_closed] if args.key?(:start_closed)
|
742
|
+
@start_open = args[:start_open] if args.key?(:start_open)
|
743
|
+
@end_open = args[:end_open] if args.key?(:end_open)
|
744
|
+
end
|
745
|
+
end
|
746
|
+
|
747
|
+
# Condensed representation of a node and its subtree. Only present for
|
748
|
+
# `SCALAR` PlanNode(s).
|
749
|
+
class ShortRepresentation
|
750
|
+
include Google::Apis::Core::Hashable
|
751
|
+
|
752
|
+
# A string representation of the expression subtree rooted at this node.
|
753
|
+
# Corresponds to the JSON property `description`
|
754
|
+
# @return [String]
|
755
|
+
attr_accessor :description
|
756
|
+
|
757
|
+
# A mapping of (subquery variable name) -> (subquery node id) for cases
|
758
|
+
# where the `description` string of this node references a `SCALAR`
|
759
|
+
# subquery contained in the expression subtree rooted at this node. The
|
760
|
+
# referenced `SCALAR` subquery may not necessarily be a direct child of
|
761
|
+
# this node.
|
762
|
+
# Corresponds to the JSON property `subqueries`
|
763
|
+
# @return [Hash<String,Fixnum>]
|
764
|
+
attr_accessor :subqueries
|
765
|
+
|
766
|
+
def initialize(**args)
|
767
|
+
update!(**args)
|
768
|
+
end
|
769
|
+
|
770
|
+
# Update properties of this object
|
771
|
+
def update!(**args)
|
772
|
+
@description = args[:description] if args.key?(:description)
|
773
|
+
@subqueries = args[:subqueries] if args.key?(:subqueries)
|
774
|
+
end
|
775
|
+
end
|
776
|
+
|
777
|
+
# A possible configuration for a Cloud Spanner instance. Configurations
|
778
|
+
# define the geographic placement of nodes and their replication.
|
779
|
+
class InstanceConfig
|
780
|
+
include Google::Apis::Core::Hashable
|
781
|
+
|
782
|
+
# A unique identifier for the instance configuration. Values
|
783
|
+
# are of the form
|
784
|
+
# `projects/<project>/instanceConfigs/a-z*`
|
785
|
+
# Corresponds to the JSON property `name`
|
786
|
+
# @return [String]
|
787
|
+
attr_accessor :name
|
788
|
+
|
789
|
+
# The name of this instance configuration as it appears in UIs.
|
790
|
+
# Corresponds to the JSON property `displayName`
|
791
|
+
# @return [String]
|
792
|
+
attr_accessor :display_name
|
793
|
+
|
794
|
+
def initialize(**args)
|
795
|
+
update!(**args)
|
796
|
+
end
|
797
|
+
|
798
|
+
# Update properties of this object
|
799
|
+
def update!(**args)
|
800
|
+
@name = args[:name] if args.key?(:name)
|
801
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
802
|
+
end
|
803
|
+
end
|
804
|
+
|
805
|
+
# The request for UpdateInstance.
|
806
|
+
class UpdateInstanceRequest
|
807
|
+
include Google::Apis::Core::Hashable
|
808
|
+
|
809
|
+
# An isolated set of Cloud Spanner resources on which databases can be hosted.
|
810
|
+
# Corresponds to the JSON property `instance`
|
811
|
+
# @return [Google::Apis::SpannerV1::Instance]
|
812
|
+
attr_accessor :instance
|
813
|
+
|
814
|
+
# Required. A mask specifying which fields in [][google.spanner.admin.instance.
|
815
|
+
# v1.UpdateInstanceRequest.instance] should be updated.
|
816
|
+
# The field mask must always be specified; this prevents any future fields in
|
817
|
+
# [][google.spanner.admin.instance.v1.Instance] from being erased accidentally
|
818
|
+
# by clients that do not know
|
819
|
+
# about them.
|
820
|
+
# Corresponds to the JSON property `fieldMask`
|
821
|
+
# @return [String]
|
822
|
+
attr_accessor :field_mask
|
823
|
+
|
824
|
+
def initialize(**args)
|
825
|
+
update!(**args)
|
826
|
+
end
|
827
|
+
|
828
|
+
# Update properties of this object
|
829
|
+
def update!(**args)
|
830
|
+
@instance = args[:instance] if args.key?(:instance)
|
831
|
+
@field_mask = args[:field_mask] if args.key?(:field_mask)
|
832
|
+
end
|
833
|
+
end
|
834
|
+
|
835
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
836
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
837
|
+
# or the response type of an API method. For instance:
|
838
|
+
# service Foo `
|
839
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
840
|
+
# `
|
841
|
+
# The JSON representation for `Empty` is empty JSON object ````.
|
842
|
+
class Empty
|
843
|
+
include Google::Apis::Core::Hashable
|
844
|
+
|
845
|
+
def initialize(**args)
|
846
|
+
update!(**args)
|
847
|
+
end
|
848
|
+
|
849
|
+
# Update properties of this object
|
850
|
+
def update!(**args)
|
851
|
+
end
|
852
|
+
end
|
853
|
+
|
854
|
+
# # Transactions
|
855
|
+
# Each session can have at most one active transaction at a time. After the
|
856
|
+
# active transaction is completed, the session can immediately be
|
857
|
+
# re-used for the next transaction. It is not necessary to create a
|
858
|
+
# new session for each transaction.
|
859
|
+
# # Transaction Modes
|
860
|
+
# Cloud Spanner supports two transaction modes:
|
861
|
+
# 1. Locking read-write. This type of transaction is the only way
|
862
|
+
# to write data into Cloud Spanner. These transactions rely on
|
863
|
+
# pessimistic locking and, if necessary, two-phase commit.
|
864
|
+
# Locking read-write transactions may abort, requiring the
|
865
|
+
# application to retry.
|
866
|
+
# 2. Snapshot read-only. This transaction type provides guaranteed
|
867
|
+
# consistency across several reads, but does not allow
|
868
|
+
# writes. Snapshot read-only transactions can be configured to
|
869
|
+
# read at timestamps in the past. Snapshot read-only
|
870
|
+
# transactions do not need to be committed.
|
871
|
+
# For transactions that only read, snapshot read-only transactions
|
872
|
+
# provide simpler semantics and are almost always faster. In
|
873
|
+
# particular, read-only transactions do not take locks, so they do
|
874
|
+
# not conflict with read-write transactions. As a consequence of not
|
875
|
+
# taking locks, they also do not abort, so retry loops are not needed.
|
876
|
+
# Transactions may only read/write data in a single database. They
|
877
|
+
# may, however, read/write data in different tables within that
|
878
|
+
# database.
|
879
|
+
# ## Locking Read-Write Transactions
|
880
|
+
# Locking transactions may be used to atomically read-modify-write
|
881
|
+
# data anywhere in a database. This type of transaction is externally
|
882
|
+
# consistent.
|
883
|
+
# Clients should attempt to minimize the amount of time a transaction
|
884
|
+
# is active. Faster transactions commit with higher probability
|
885
|
+
# and cause less contention. Cloud Spanner attempts to keep read locks
|
886
|
+
# active as long as the transaction continues to do reads, and the
|
887
|
+
# transaction has not been terminated by
|
888
|
+
# Commit or
|
889
|
+
# Rollback. Long periods of
|
890
|
+
# inactivity at the client may cause Cloud Spanner to release a
|
891
|
+
# transaction's locks and abort it.
|
892
|
+
# Reads performed within a transaction acquire locks on the data
|
893
|
+
# being read. Writes can only be done at commit time, after all reads
|
894
|
+
# have been completed.
|
895
|
+
# Conceptually, a read-write transaction consists of zero or more
|
896
|
+
# reads or SQL queries followed by
|
897
|
+
# Commit. At any time before
|
898
|
+
# Commit, the client can send a
|
899
|
+
# Rollback request to abort the
|
900
|
+
# transaction.
|
901
|
+
# ### Semantics
|
902
|
+
# Cloud Spanner can commit the transaction if all read locks it acquired
|
903
|
+
# are still valid at commit time, and it is able to acquire write
|
904
|
+
# locks for all writes. Cloud Spanner can abort the transaction for any
|
905
|
+
# reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
|
906
|
+
# that the transaction has not modified any user data in Cloud Spanner.
|
907
|
+
# Unless the transaction commits, Cloud Spanner makes no guarantees about
|
908
|
+
# how long the transaction's locks were held for. It is an error to
|
909
|
+
# use Cloud Spanner locks for any sort of mutual exclusion other than
|
910
|
+
# between Cloud Spanner transactions themselves.
|
911
|
+
# ### Retrying Aborted Transactions
|
912
|
+
# When a transaction aborts, the application can choose to retry the
|
913
|
+
# whole transaction again. To maximize the chances of successfully
|
914
|
+
# committing the retry, the client should execute the retry in the
|
915
|
+
# same session as the original attempt. The original session's lock
|
916
|
+
# priority increases with each consecutive abort, meaning that each
|
917
|
+
# attempt has a slightly better chance of success than the previous.
|
918
|
+
# Under some circumstances (e.g., many transactions attempting to
|
919
|
+
# modify the same row(s)), a transaction can abort many times in a
|
920
|
+
# short period before successfully committing. Thus, it is not a good
|
921
|
+
# idea to cap the number of retries a transaction can attempt;
|
922
|
+
# instead, it is better to limit the total amount of wall time spent
|
923
|
+
# retrying.
|
924
|
+
# ### Idle Transactions
|
925
|
+
# A transaction is considered idle if it has no outstanding reads or
|
926
|
+
# SQL queries and has not started a read or SQL query within the last 10
|
927
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they
|
928
|
+
# don't hold on to locks indefinitely. In that case, the commit will
|
929
|
+
# fail with error `ABORTED`.
|
930
|
+
# If this behavior is undesirable, periodically executing a simple
|
931
|
+
# SQL query in the transaction (e.g., `SELECT 1`) prevents the
|
932
|
+
# transaction from becoming idle.
|
933
|
+
# ## Snapshot Read-Only Transactions
|
934
|
+
# Snapshot read-only transactions provides a simpler method than
|
935
|
+
# locking read-write transactions for doing several consistent
|
936
|
+
# reads. However, this type of transaction does not support writes.
|
937
|
+
# Snapshot transactions do not take locks. Instead, they work by
|
938
|
+
# choosing a Cloud Spanner timestamp, then executing all reads at that
|
939
|
+
# timestamp. Since they do not acquire locks, they do not block
|
940
|
+
# concurrent read-write transactions.
|
941
|
+
# Unlike locking read-write transactions, snapshot read-only
|
942
|
+
# transactions never abort. They can fail if the chosen read
|
943
|
+
# timestamp is garbage collected; however, the default garbage
|
944
|
+
# collection policy is generous enough that most applications do not
|
945
|
+
# need to worry about this in practice.
|
946
|
+
# Snapshot read-only transactions do not need to call
|
947
|
+
# Commit or
|
948
|
+
# Rollback (and in fact are not
|
949
|
+
# permitted to do so).
|
950
|
+
# To execute a snapshot transaction, the client specifies a timestamp
|
951
|
+
# bound, which tells Cloud Spanner how to choose a read timestamp.
|
952
|
+
# The types of timestamp bound are:
|
953
|
+
# - Strong (the default).
|
954
|
+
# - Bounded staleness.
|
955
|
+
# - Exact staleness.
|
956
|
+
# If the Cloud Spanner database to be read is geographically distributed,
|
957
|
+
# stale read-only transactions can execute more quickly than strong
|
958
|
+
# or read-write transaction, because they are able to execute far
|
959
|
+
# from the leader replica.
|
960
|
+
# Each type of timestamp bound is discussed in detail below.
|
961
|
+
# ### Strong
|
962
|
+
# Strong reads are guaranteed to see the effects of all transactions
|
963
|
+
# that have committed before the start of the read. Furthermore, all
|
964
|
+
# rows yielded by a single read are consistent with each other -- if
|
965
|
+
# any part of the read observes a transaction, all parts of the read
|
966
|
+
# see the transaction.
|
967
|
+
# Strong reads are not repeatable: two consecutive strong read-only
|
968
|
+
# transactions might return inconsistent results if there are
|
969
|
+
# concurrent writes. If consistency across reads is required, the
|
970
|
+
# reads should be executed within a transaction or at an exact read
|
971
|
+
# timestamp.
|
972
|
+
# See TransactionOptions.ReadOnly.strong.
|
973
|
+
# ### Exact Staleness
|
974
|
+
# These timestamp bounds execute reads at a user-specified
|
975
|
+
# timestamp. Reads at a timestamp are guaranteed to see a consistent
|
976
|
+
# prefix of the global transaction history: they observe
|
977
|
+
# modifications done by all transactions with a commit timestamp <=
|
978
|
+
# the read timestamp, and observe none of the modifications done by
|
979
|
+
# transactions with a larger commit timestamp. They will block until
|
980
|
+
# all conflicting transactions that may be assigned commit timestamps
|
981
|
+
# <= the read timestamp have finished.
|
982
|
+
# The timestamp can either be expressed as an absolute Cloud Spanner commit
|
983
|
+
# timestamp or a staleness relative to the current time.
|
984
|
+
# These modes do not require a "negotiation phase" to pick a
|
985
|
+
# timestamp. As a result, they execute slightly faster than the
|
986
|
+
# equivalent boundedly stale concurrency modes. On the other hand,
|
987
|
+
# boundedly stale reads usually return fresher results.
|
988
|
+
# See TransactionOptions.ReadOnly.read_timestamp and
|
989
|
+
# TransactionOptions.ReadOnly.exact_staleness.
|
990
|
+
# ### Bounded Staleness
|
991
|
+
# Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
|
992
|
+
# subject to a user-provided staleness bound. Cloud Spanner chooses the
|
993
|
+
# newest timestamp within the staleness bound that allows execution
|
994
|
+
# of the reads at the closest available replica without blocking.
|
995
|
+
# All rows yielded are consistent with each other -- if any part of
|
996
|
+
# the read observes a transaction, all parts of the read see the
|
997
|
+
# transaction. Boundedly stale reads are not repeatable: two stale
|
998
|
+
# reads, even if they use the same staleness bound, can execute at
|
999
|
+
# different timestamps and thus return inconsistent results.
|
1000
|
+
# Boundedly stale reads execute in two phases: the first phase
|
1001
|
+
# negotiates a timestamp among all replicas needed to serve the
|
1002
|
+
# read. In the second phase, reads are executed at the negotiated
|
1003
|
+
# timestamp.
|
1004
|
+
# As a result of the two phase execution, bounded staleness reads are
|
1005
|
+
# usually a little slower than comparable exact staleness
|
1006
|
+
# reads. However, they are typically able to return fresher
|
1007
|
+
# results, and are more likely to execute at the closest replica.
|
1008
|
+
# Because the timestamp negotiation requires up-front knowledge of
|
1009
|
+
# which rows will be read, it can only be used with single-use
|
1010
|
+
# read-only transactions.
|
1011
|
+
# See TransactionOptions.ReadOnly.max_staleness and
|
1012
|
+
# TransactionOptions.ReadOnly.min_read_timestamp.
|
1013
|
+
# ### Old Read Timestamps and Garbage Collection
|
1014
|
+
# Cloud Spanner continuously garbage collects deleted and overwritten data
|
1015
|
+
# in the background to reclaim storage space. This process is known
|
1016
|
+
# as "version GC". By default, version GC reclaims versions after they
|
1017
|
+
# are one hour old. Because of this, Cloud Spanner cannot perform reads
|
1018
|
+
# at read timestamps more than one hour in the past. This
|
1019
|
+
# restriction also applies to in-progress reads and/or SQL queries whose
|
1020
|
+
# timestamp become too old while executing. Reads and SQL queries with
|
1021
|
+
# too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
1022
|
+
class TransactionOptions
|
1023
|
+
include Google::Apis::Core::Hashable
|
1024
|
+
|
1025
|
+
# Options for read-write transactions.
|
1026
|
+
# Corresponds to the JSON property `readWrite`
|
1027
|
+
# @return [Google::Apis::SpannerV1::ReadWrite]
|
1028
|
+
attr_accessor :read_write
|
1029
|
+
|
1030
|
+
# Options for read-only transactions.
|
1031
|
+
# Corresponds to the JSON property `readOnly`
|
1032
|
+
# @return [Google::Apis::SpannerV1::ReadOnly]
|
1033
|
+
attr_accessor :read_only
|
1034
|
+
|
1035
|
+
def initialize(**args)
|
1036
|
+
update!(**args)
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
# Update properties of this object
|
1040
|
+
def update!(**args)
|
1041
|
+
@read_write = args[:read_write] if args.key?(:read_write)
|
1042
|
+
@read_only = args[:read_only] if args.key?(:read_only)
|
1043
|
+
end
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
# The request for CreateDatabase.
|
1047
|
+
class CreateDatabaseRequest
|
1048
|
+
include Google::Apis::Core::Hashable
|
1049
|
+
|
1050
|
+
# An optional list of DDL statements to run inside the newly created
|
1051
|
+
# database. Statements can create tables, indexes, etc. These
|
1052
|
+
# statements execute atomically with the creation of the database:
|
1053
|
+
# if there is an error in any statement, the database is not created.
|
1054
|
+
# Corresponds to the JSON property `extraStatements`
|
1055
|
+
# @return [Array<String>]
|
1056
|
+
attr_accessor :extra_statements
|
1057
|
+
|
1058
|
+
# Required. A `CREATE DATABASE` statement, which specifies the ID of the
|
1059
|
+
# new database. The database ID must conform to the regular expression
|
1060
|
+
# `a-z*[a-z0-9]` and be between 2 and 30 characters in length.
|
1061
|
+
# Corresponds to the JSON property `createStatement`
|
1062
|
+
# @return [String]
|
1063
|
+
attr_accessor :create_statement
|
1064
|
+
|
1065
|
+
def initialize(**args)
|
1066
|
+
update!(**args)
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
# Update properties of this object
|
1070
|
+
def update!(**args)
|
1071
|
+
@extra_statements = args[:extra_statements] if args.key?(:extra_statements)
|
1072
|
+
@create_statement = args[:create_statement] if args.key?(:create_statement)
|
1073
|
+
end
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
# The request for CreateInstance.
|
1077
|
+
class CreateInstanceRequest
|
1078
|
+
include Google::Apis::Core::Hashable
|
1079
|
+
|
1080
|
+
# An isolated set of Cloud Spanner resources on which databases can be hosted.
|
1081
|
+
# Corresponds to the JSON property `instance`
|
1082
|
+
# @return [Google::Apis::SpannerV1::Instance]
|
1083
|
+
attr_accessor :instance
|
1084
|
+
|
1085
|
+
# Required. The ID of the instance to create. Valid identifiers are of the
|
1086
|
+
# form `a-z*[a-z0-9]` and must be between 6 and 30 characters in
|
1087
|
+
# length.
|
1088
|
+
# Corresponds to the JSON property `instanceId`
|
1089
|
+
# @return [String]
|
1090
|
+
attr_accessor :instance_id
|
1091
|
+
|
1092
|
+
def initialize(**args)
|
1093
|
+
update!(**args)
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
# Update properties of this object
|
1097
|
+
def update!(**args)
|
1098
|
+
@instance = args[:instance] if args.key?(:instance)
|
1099
|
+
@instance_id = args[:instance_id] if args.key?(:instance_id)
|
1100
|
+
end
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
# A condition to be met.
|
1104
|
+
class Condition
|
1105
|
+
include Google::Apis::Core::Hashable
|
1106
|
+
|
1107
|
+
# Trusted attributes discharged by the service.
|
1108
|
+
# Corresponds to the JSON property `svc`
|
1109
|
+
# @return [String]
|
1110
|
+
attr_accessor :svc
|
1111
|
+
|
1112
|
+
# DEPRECATED. Use 'values' instead.
|
1113
|
+
# Corresponds to the JSON property `value`
|
1114
|
+
# @return [String]
|
1115
|
+
attr_accessor :value
|
1116
|
+
|
1117
|
+
# Trusted attributes supplied by any service that owns resources and uses
|
1118
|
+
# the IAM system for access control.
|
1119
|
+
# Corresponds to the JSON property `sys`
|
1120
|
+
# @return [String]
|
1121
|
+
attr_accessor :sys
|
1122
|
+
|
1123
|
+
# The objects of the condition. This is mutually exclusive with 'value'.
|
1124
|
+
# Corresponds to the JSON property `values`
|
1125
|
+
# @return [Array<String>]
|
1126
|
+
attr_accessor :values
|
1127
|
+
|
1128
|
+
# Trusted attributes supplied by the IAM system.
|
1129
|
+
# Corresponds to the JSON property `iam`
|
1130
|
+
# @return [String]
|
1131
|
+
attr_accessor :iam
|
1132
|
+
|
1133
|
+
# An operator to apply the subject with.
|
1134
|
+
# Corresponds to the JSON property `op`
|
1135
|
+
# @return [String]
|
1136
|
+
attr_accessor :op
|
1137
|
+
|
1138
|
+
def initialize(**args)
|
1139
|
+
update!(**args)
|
1140
|
+
end
|
1141
|
+
|
1142
|
+
# Update properties of this object
|
1143
|
+
def update!(**args)
|
1144
|
+
@svc = args[:svc] if args.key?(:svc)
|
1145
|
+
@value = args[:value] if args.key?(:value)
|
1146
|
+
@sys = args[:sys] if args.key?(:sys)
|
1147
|
+
@values = args[:values] if args.key?(:values)
|
1148
|
+
@iam = args[:iam] if args.key?(:iam)
|
1149
|
+
@op = args[:op] if args.key?(:op)
|
1150
|
+
end
|
1151
|
+
end
|
1152
|
+
|
1153
|
+
# Provides the configuration for logging a type of permissions.
|
1154
|
+
# Example:
|
1155
|
+
# `
|
1156
|
+
# "audit_log_configs": [
|
1157
|
+
# `
|
1158
|
+
# "log_type": "DATA_READ",
|
1159
|
+
# "exempted_members": [
|
1160
|
+
# "user:foo@gmail.com"
|
1161
|
+
# ]
|
1162
|
+
# `,
|
1163
|
+
# `
|
1164
|
+
# "log_type": "DATA_WRITE",
|
1165
|
+
# `
|
1166
|
+
# ]
|
1167
|
+
# `
|
1168
|
+
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
|
1169
|
+
# foo@gmail.com from DATA_READ logging.
|
1170
|
+
class AuditLogConfig
|
1171
|
+
include Google::Apis::Core::Hashable
|
1172
|
+
|
1173
|
+
# Specifies the identities that do not cause logging for this type of
|
1174
|
+
# permission.
|
1175
|
+
# Follows the same format of Binding.members.
|
1176
|
+
# Corresponds to the JSON property `exemptedMembers`
|
1177
|
+
# @return [Array<String>]
|
1178
|
+
attr_accessor :exempted_members
|
1179
|
+
|
1180
|
+
# The log type that this config enables.
|
1181
|
+
# Corresponds to the JSON property `logType`
|
1182
|
+
# @return [String]
|
1183
|
+
attr_accessor :log_type
|
1184
|
+
|
1185
|
+
def initialize(**args)
|
1186
|
+
update!(**args)
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
# Update properties of this object
|
1190
|
+
def update!(**args)
|
1191
|
+
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
1192
|
+
@log_type = args[:log_type] if args.key?(:log_type)
|
1193
|
+
end
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
# Options for read-only transactions.
|
1197
|
+
class ReadOnly
|
1198
|
+
include Google::Apis::Core::Hashable
|
1199
|
+
|
1200
|
+
# Executes all reads at a timestamp >= `min_read_timestamp`.
|
1201
|
+
# This is useful for requesting fresher data than some previous
|
1202
|
+
# read, or data that is fresh enough to observe the effects of some
|
1203
|
+
# previously committed transaction whose timestamp is known.
|
1204
|
+
# Note that this option can only be used in single-use transactions.
|
1205
|
+
# Corresponds to the JSON property `minReadTimestamp`
|
1206
|
+
# @return [String]
|
1207
|
+
attr_accessor :min_read_timestamp
|
1208
|
+
|
1209
|
+
# Read data at a timestamp >= `NOW - max_staleness`
|
1210
|
+
# seconds. Guarantees that all writes that have committed more
|
1211
|
+
# than the specified number of seconds ago are visible. Because
|
1212
|
+
# Cloud Spanner chooses the exact timestamp, this mode works even if
|
1213
|
+
# the client's local clock is substantially skewed from Cloud Spanner
|
1214
|
+
# commit timestamps.
|
1215
|
+
# Useful for reading the freshest data available at a nearby
|
1216
|
+
# replica, while bounding the possible staleness if the local
|
1217
|
+
# replica has fallen behind.
|
1218
|
+
# Note that this option can only be used in single-use
|
1219
|
+
# transactions.
|
1220
|
+
# Corresponds to the JSON property `maxStaleness`
|
1221
|
+
# @return [String]
|
1222
|
+
attr_accessor :max_staleness
|
1223
|
+
|
1224
|
+
# Executes all reads at the given timestamp. Unlike other modes,
|
1225
|
+
# reads at a specific timestamp are repeatable; the same read at
|
1226
|
+
# the same timestamp always returns the same data. If the
|
1227
|
+
# timestamp is in the future, the read will block until the
|
1228
|
+
# specified timestamp, modulo the read's deadline.
|
1229
|
+
# Useful for large scale consistent reads such as mapreduces, or
|
1230
|
+
# for coordinating many reads against a consistent snapshot of the
|
1231
|
+
# data.
|
1232
|
+
# Corresponds to the JSON property `readTimestamp`
|
1233
|
+
# @return [String]
|
1234
|
+
attr_accessor :read_timestamp
|
1235
|
+
|
1236
|
+
# If true, the Cloud Spanner-selected read timestamp is included in
|
1237
|
+
# the Transaction message that describes the transaction.
|
1238
|
+
# Corresponds to the JSON property `returnReadTimestamp`
|
1239
|
+
# @return [Boolean]
|
1240
|
+
attr_accessor :return_read_timestamp
|
1241
|
+
alias_method :return_read_timestamp?, :return_read_timestamp
|
1242
|
+
|
1243
|
+
# Executes all reads at a timestamp that is `exact_staleness`
|
1244
|
+
# old. The timestamp is chosen soon after the read is started.
|
1245
|
+
# Guarantees that all writes that have committed more than the
|
1246
|
+
# specified number of seconds ago are visible. Because Cloud Spanner
|
1247
|
+
# chooses the exact timestamp, this mode works even if the client's
|
1248
|
+
# local clock is substantially skewed from Cloud Spanner commit
|
1249
|
+
# timestamps.
|
1250
|
+
# Useful for reading at nearby replicas without the distributed
|
1251
|
+
# timestamp negotiation overhead of `max_staleness`.
|
1252
|
+
# Corresponds to the JSON property `exactStaleness`
|
1253
|
+
# @return [String]
|
1254
|
+
attr_accessor :exact_staleness
|
1255
|
+
|
1256
|
+
# Read at a timestamp where all previously committed transactions
|
1257
|
+
# are visible.
|
1258
|
+
# Corresponds to the JSON property `strong`
|
1259
|
+
# @return [Boolean]
|
1260
|
+
attr_accessor :strong
|
1261
|
+
alias_method :strong?, :strong
|
1262
|
+
|
1263
|
+
def initialize(**args)
|
1264
|
+
update!(**args)
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# Update properties of this object
|
1268
|
+
def update!(**args)
|
1269
|
+
@min_read_timestamp = args[:min_read_timestamp] if args.key?(:min_read_timestamp)
|
1270
|
+
@max_staleness = args[:max_staleness] if args.key?(:max_staleness)
|
1271
|
+
@read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp)
|
1272
|
+
@return_read_timestamp = args[:return_read_timestamp] if args.key?(:return_read_timestamp)
|
1273
|
+
@exact_staleness = args[:exact_staleness] if args.key?(:exact_staleness)
|
1274
|
+
@strong = args[:strong] if args.key?(:strong)
|
1275
|
+
end
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
# The request for ExecuteSql and
|
1279
|
+
# ExecuteStreamingSql.
|
1280
|
+
class ExecuteSqlRequest
|
1281
|
+
include Google::Apis::Core::Hashable
|
1282
|
+
|
1283
|
+
# Used to control the amount of debugging information returned in
|
1284
|
+
# ResultSetStats.
|
1285
|
+
# Corresponds to the JSON property `queryMode`
|
1286
|
+
# @return [String]
|
1287
|
+
attr_accessor :query_mode
|
1288
|
+
|
1289
|
+
# This message is used to select the transaction in which a
|
1290
|
+
# Read or
|
1291
|
+
# ExecuteSql call runs.
|
1292
|
+
# See TransactionOptions for more information about transactions.
|
1293
|
+
# Corresponds to the JSON property `transaction`
|
1294
|
+
# @return [Google::Apis::SpannerV1::TransactionSelector]
|
1295
|
+
attr_accessor :transaction
|
1296
|
+
|
1297
|
+
# If this request is resuming a previously interrupted SQL query
|
1298
|
+
# execution, `resume_token` should be copied from the last
|
1299
|
+
# PartialResultSet yielded before the interruption. Doing this
|
1300
|
+
# enables the new SQL query execution to resume where the last one left
|
1301
|
+
# off. The rest of the request parameters must exactly match the
|
1302
|
+
# request that yielded this token.
|
1303
|
+
# Corresponds to the JSON property `resumeToken`
|
1304
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1305
|
+
# @return [String]
|
1306
|
+
attr_accessor :resume_token
|
1307
|
+
|
1308
|
+
# It is not always possible for Cloud Spanner to infer the right SQL type
|
1309
|
+
# from a JSON value. For example, values of type `BYTES` and values
|
1310
|
+
# of type `STRING` both appear in params as JSON strings.
|
1311
|
+
# In these cases, `param_types` can be used to specify the exact
|
1312
|
+
# SQL type for some or all of the SQL query parameters. See the
|
1313
|
+
# definition of Type for more information
|
1314
|
+
# about SQL types.
|
1315
|
+
# Corresponds to the JSON property `paramTypes`
|
1316
|
+
# @return [Hash<String,Google::Apis::SpannerV1::Type>]
|
1317
|
+
attr_accessor :param_types
|
1318
|
+
|
1319
|
+
# Required. The SQL query string.
|
1320
|
+
# Corresponds to the JSON property `sql`
|
1321
|
+
# @return [String]
|
1322
|
+
attr_accessor :sql
|
1323
|
+
|
1324
|
+
# The SQL query string can contain parameter placeholders. A parameter
|
1325
|
+
# placeholder consists of `'@'` followed by the parameter
|
1326
|
+
# name. Parameter names consist of any combination of letters,
|
1327
|
+
# numbers, and underscores.
|
1328
|
+
# Parameters can appear anywhere that a literal value is expected. The same
|
1329
|
+
# parameter name can be used more than once, for example:
|
1330
|
+
# `"WHERE id > @msg_id AND id < @msg_id + 100"`
|
1331
|
+
# It is an error to execute an SQL query with unbound parameters.
|
1332
|
+
# Parameter values are specified using `params`, which is a JSON
|
1333
|
+
# object whose keys are parameter names, and whose values are the
|
1334
|
+
# corresponding parameter values.
|
1335
|
+
# Corresponds to the JSON property `params`
|
1336
|
+
# @return [Hash<String,Object>]
|
1337
|
+
attr_accessor :params
|
1338
|
+
|
1339
|
+
def initialize(**args)
|
1340
|
+
update!(**args)
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
# Update properties of this object
|
1344
|
+
def update!(**args)
|
1345
|
+
@query_mode = args[:query_mode] if args.key?(:query_mode)
|
1346
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
1347
|
+
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
1348
|
+
@param_types = args[:param_types] if args.key?(:param_types)
|
1349
|
+
@sql = args[:sql] if args.key?(:sql)
|
1350
|
+
@params = args[:params] if args.key?(:params)
|
1351
|
+
end
|
1352
|
+
end
|
1353
|
+
|
1354
|
+
# Defines an Identity and Access Management (IAM) policy. It is used to
|
1355
|
+
# specify access control policies for Cloud Platform resources.
|
1356
|
+
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
1357
|
+
# `members` to a `role`, where the members can be user accounts, Google groups,
|
1358
|
+
# Google domains, and service accounts. A `role` is a named list of permissions
|
1359
|
+
# defined by IAM.
|
1360
|
+
# **Example**
|
1361
|
+
# `
|
1362
|
+
# "bindings": [
|
1363
|
+
# `
|
1364
|
+
# "role": "roles/owner",
|
1365
|
+
# "members": [
|
1366
|
+
# "user:mike@example.com",
|
1367
|
+
# "group:admins@example.com",
|
1368
|
+
# "domain:google.com",
|
1369
|
+
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
1370
|
+
# ]
|
1371
|
+
# `,
|
1372
|
+
# `
|
1373
|
+
# "role": "roles/viewer",
|
1374
|
+
# "members": ["user:sean@example.com"]
|
1375
|
+
# `
|
1376
|
+
# ]
|
1377
|
+
# `
|
1378
|
+
# For a description of IAM and its features, see the
|
1379
|
+
# [IAM developer's guide](https://cloud.google.com/iam).
|
1380
|
+
class Policy
|
1381
|
+
include Google::Apis::Core::Hashable
|
1382
|
+
|
1383
|
+
# Version of the `Policy`. The default version is 0.
|
1384
|
+
# Corresponds to the JSON property `version`
|
1385
|
+
# @return [Fixnum]
|
1386
|
+
attr_accessor :version
|
1387
|
+
|
1388
|
+
# Specifies cloud audit logging configuration for this policy.
|
1389
|
+
# Corresponds to the JSON property `auditConfigs`
|
1390
|
+
# @return [Array<Google::Apis::SpannerV1::AuditConfig>]
|
1391
|
+
attr_accessor :audit_configs
|
1392
|
+
|
1393
|
+
# Associates a list of `members` to a `role`.
|
1394
|
+
# Multiple `bindings` must not be specified for the same `role`.
|
1395
|
+
# `bindings` with no members will result in an error.
|
1396
|
+
# Corresponds to the JSON property `bindings`
|
1397
|
+
# @return [Array<Google::Apis::SpannerV1::Binding>]
|
1398
|
+
attr_accessor :bindings
|
1399
|
+
|
1400
|
+
# `etag` is used for optimistic concurrency control as a way to help
|
1401
|
+
# prevent simultaneous updates of a policy from overwriting each other.
|
1402
|
+
# It is strongly suggested that systems make use of the `etag` in the
|
1403
|
+
# read-modify-write cycle to perform policy updates in order to avoid race
|
1404
|
+
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
1405
|
+
# systems are expected to put that etag in the request to `setIamPolicy` to
|
1406
|
+
# ensure that their change will be applied to the same version of the policy.
|
1407
|
+
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
|
1408
|
+
# policy is overwritten blindly.
|
1409
|
+
# Corresponds to the JSON property `etag`
|
1410
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1411
|
+
# @return [String]
|
1412
|
+
attr_accessor :etag
|
1413
|
+
|
1414
|
+
#
|
1415
|
+
# Corresponds to the JSON property `iamOwned`
|
1416
|
+
# @return [Boolean]
|
1417
|
+
attr_accessor :iam_owned
|
1418
|
+
alias_method :iam_owned?, :iam_owned
|
1419
|
+
|
1420
|
+
# If more than one rule is specified, the rules are applied in the following
|
1421
|
+
# manner:
|
1422
|
+
# - All matching LOG rules are always applied.
|
1423
|
+
# - If any DENY/DENY_WITH_LOG rule matches, permission is denied.
|
1424
|
+
# Logging will be applied if one or more matching rule requires logging.
|
1425
|
+
# - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
|
1426
|
+
# granted.
|
1427
|
+
# Logging will be applied if one or more matching rule requires logging.
|
1428
|
+
# - Otherwise, if no rule applies, permission is denied.
|
1429
|
+
# Corresponds to the JSON property `rules`
|
1430
|
+
# @return [Array<Google::Apis::SpannerV1::Rule>]
|
1431
|
+
attr_accessor :rules
|
1432
|
+
|
1433
|
+
def initialize(**args)
|
1434
|
+
update!(**args)
|
1435
|
+
end
|
1436
|
+
|
1437
|
+
# Update properties of this object
|
1438
|
+
def update!(**args)
|
1439
|
+
@version = args[:version] if args.key?(:version)
|
1440
|
+
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
1441
|
+
@bindings = args[:bindings] if args.key?(:bindings)
|
1442
|
+
@etag = args[:etag] if args.key?(:etag)
|
1443
|
+
@iam_owned = args[:iam_owned] if args.key?(:iam_owned)
|
1444
|
+
@rules = args[:rules] if args.key?(:rules)
|
1445
|
+
end
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
# The request for Read and
|
1449
|
+
# StreamingRead.
|
1450
|
+
class ReadRequest
|
1451
|
+
include Google::Apis::Core::Hashable
|
1452
|
+
|
1453
|
+
# This message is used to select the transaction in which a
|
1454
|
+
# Read or
|
1455
|
+
# ExecuteSql call runs.
|
1456
|
+
# See TransactionOptions for more information about transactions.
|
1457
|
+
# Corresponds to the JSON property `transaction`
|
1458
|
+
# @return [Google::Apis::SpannerV1::TransactionSelector]
|
1459
|
+
attr_accessor :transaction
|
1460
|
+
|
1461
|
+
# If this request is resuming a previously interrupted read,
|
1462
|
+
# `resume_token` should be copied from the last
|
1463
|
+
# PartialResultSet yielded before the interruption. Doing this
|
1464
|
+
# enables the new read to resume where the last read left off. The
|
1465
|
+
# rest of the request parameters must exactly match the request
|
1466
|
+
# that yielded this token.
|
1467
|
+
# Corresponds to the JSON property `resumeToken`
|
1468
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1469
|
+
# @return [String]
|
1470
|
+
attr_accessor :resume_token
|
1471
|
+
|
1472
|
+
# Required. The name of the table in the database to be read.
|
1473
|
+
# Corresponds to the JSON property `table`
|
1474
|
+
# @return [String]
|
1475
|
+
attr_accessor :table
|
1476
|
+
|
1477
|
+
# If greater than zero, only the first `limit` rows are yielded. If `limit`
|
1478
|
+
# is zero, the default is no limit.
|
1479
|
+
# Corresponds to the JSON property `limit`
|
1480
|
+
# @return [String]
|
1481
|
+
attr_accessor :limit
|
1482
|
+
|
1483
|
+
# If non-empty, the name of an index on table. This index is
|
1484
|
+
# used instead of the table primary key when interpreting key_set
|
1485
|
+
# and sorting result rows. See key_set for further information.
|
1486
|
+
# Corresponds to the JSON property `index`
|
1487
|
+
# @return [String]
|
1488
|
+
attr_accessor :index
|
1489
|
+
|
1490
|
+
# `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
|
1491
|
+
# the keys are expected to be in the same table or index. The keys need
|
1492
|
+
# not be sorted in any particular way.
|
1493
|
+
# If the same key is specified multiple times in the set (for example
|
1494
|
+
# if two ranges, two keys, or a key and a range overlap), Cloud Spanner
|
1495
|
+
# behaves as if the key were only specified once.
|
1496
|
+
# Corresponds to the JSON property `keySet`
|
1497
|
+
# @return [Google::Apis::SpannerV1::KeySet]
|
1498
|
+
attr_accessor :key_set
|
1499
|
+
|
1500
|
+
# The columns of table to be returned for each row matching
|
1501
|
+
# this request.
|
1502
|
+
# Corresponds to the JSON property `columns`
|
1503
|
+
# @return [Array<String>]
|
1504
|
+
attr_accessor :columns
|
1505
|
+
|
1506
|
+
def initialize(**args)
|
1507
|
+
update!(**args)
|
1508
|
+
end
|
1509
|
+
|
1510
|
+
# Update properties of this object
|
1511
|
+
def update!(**args)
|
1512
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
1513
|
+
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
1514
|
+
@table = args[:table] if args.key?(:table)
|
1515
|
+
@limit = args[:limit] if args.key?(:limit)
|
1516
|
+
@index = args[:index] if args.key?(:index)
|
1517
|
+
@key_set = args[:key_set] if args.key?(:key_set)
|
1518
|
+
@columns = args[:columns] if args.key?(:columns)
|
1519
|
+
end
|
1520
|
+
end
|
1521
|
+
|
1522
|
+
# Arguments to insert, update, insert_or_update, and
|
1523
|
+
# replace operations.
|
1524
|
+
class Write
|
1525
|
+
include Google::Apis::Core::Hashable
|
1526
|
+
|
1527
|
+
# Required. The table whose rows will be written.
|
1528
|
+
# Corresponds to the JSON property `table`
|
1529
|
+
# @return [String]
|
1530
|
+
attr_accessor :table
|
1531
|
+
|
1532
|
+
# The names of the columns in table to be written.
|
1533
|
+
# The list of columns must contain enough columns to allow
|
1534
|
+
# Cloud Spanner to derive values for all primary key columns in the
|
1535
|
+
# row(s) to be modified.
|
1536
|
+
# Corresponds to the JSON property `columns`
|
1537
|
+
# @return [Array<String>]
|
1538
|
+
attr_accessor :columns
|
1539
|
+
|
1540
|
+
# The values to be written. `values` can contain more than one
|
1541
|
+
# list of values. If it does, then multiple rows are written, one
|
1542
|
+
# for each entry in `values`. Each list in `values` must have
|
1543
|
+
# exactly as many entries as there are entries in columns
|
1544
|
+
# above. Sending multiple lists is equivalent to sending multiple
|
1545
|
+
# `Mutation`s, each containing one `values` entry and repeating
|
1546
|
+
# table and columns. Individual values in each list are
|
1547
|
+
# encoded as described here.
|
1548
|
+
# Corresponds to the JSON property `values`
|
1549
|
+
# @return [Array<Array<Object>>]
|
1550
|
+
attr_accessor :values
|
1551
|
+
|
1552
|
+
def initialize(**args)
|
1553
|
+
update!(**args)
|
1554
|
+
end
|
1555
|
+
|
1556
|
+
# Update properties of this object
|
1557
|
+
def update!(**args)
|
1558
|
+
@table = args[:table] if args.key?(:table)
|
1559
|
+
@columns = args[:columns] if args.key?(:columns)
|
1560
|
+
@values = args[:values] if args.key?(:values)
|
1561
|
+
end
|
1562
|
+
end
|
1563
|
+
|
1564
|
+
# Options for read-write transactions.
|
1565
|
+
class ReadWrite
|
1566
|
+
include Google::Apis::Core::Hashable
|
1567
|
+
|
1568
|
+
def initialize(**args)
|
1569
|
+
update!(**args)
|
1570
|
+
end
|
1571
|
+
|
1572
|
+
# Update properties of this object
|
1573
|
+
def update!(**args)
|
1574
|
+
end
|
1575
|
+
end
|
1576
|
+
|
1577
|
+
# Write a Data Access (Gin) log
|
1578
|
+
class DataAccessOptions
|
1579
|
+
include Google::Apis::Core::Hashable
|
1580
|
+
|
1581
|
+
def initialize(**args)
|
1582
|
+
update!(**args)
|
1583
|
+
end
|
1584
|
+
|
1585
|
+
# Update properties of this object
|
1586
|
+
def update!(**args)
|
1587
|
+
end
|
1588
|
+
end
|
1589
|
+
|
1590
|
+
# This resource represents a long-running operation that is the result of a
|
1591
|
+
# network API call.
|
1592
|
+
class Operation
|
1593
|
+
include Google::Apis::Core::Hashable
|
1594
|
+
|
1595
|
+
# The normal response of the operation in case of success. If the original
|
1596
|
+
# method returns no data on success, such as `Delete`, the response is
|
1597
|
+
# `google.protobuf.Empty`. If the original method is standard
|
1598
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
1599
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
1600
|
+
# is the original method name. For example, if the original method name
|
1601
|
+
# is `TakeSnapshot()`, the inferred response type is
|
1602
|
+
# `TakeSnapshotResponse`.
|
1603
|
+
# Corresponds to the JSON property `response`
|
1604
|
+
# @return [Hash<String,Object>]
|
1605
|
+
attr_accessor :response
|
1606
|
+
|
1607
|
+
# The server-assigned name, which is only unique within the same service that
|
1608
|
+
# originally returns it. If you use the default HTTP mapping, the
|
1609
|
+
# `name` should have the format of `operations/some/unique/name`.
|
1610
|
+
# Corresponds to the JSON property `name`
|
1611
|
+
# @return [String]
|
1612
|
+
attr_accessor :name
|
1613
|
+
|
1614
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1615
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
1616
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
1617
|
+
# - Simple to use and understand for most users
|
1618
|
+
# - Flexible enough to meet unexpected needs
|
1619
|
+
# # Overview
|
1620
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
1621
|
+
# and error details. The error code should be an enum value of
|
1622
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
1623
|
+
# error message should be a developer-facing English message that helps
|
1624
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
1625
|
+
# error message is needed, put the localized message in the error details or
|
1626
|
+
# localize it in the client. The optional error details may contain arbitrary
|
1627
|
+
# information about the error. There is a predefined set of error detail types
|
1628
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
1629
|
+
# # Language mapping
|
1630
|
+
# The `Status` message is the logical representation of the error model, but it
|
1631
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
1632
|
+
# exposed in different client libraries and different wire protocols, it can be
|
1633
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
1634
|
+
# in Java, but more likely mapped to some error codes in C.
|
1635
|
+
# # Other uses
|
1636
|
+
# The error model and the `Status` message can be used in a variety of
|
1637
|
+
# environments, either with or without APIs, to provide a
|
1638
|
+
# consistent developer experience across different environments.
|
1639
|
+
# Example uses of this error model include:
|
1640
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
1641
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
1642
|
+
# errors.
|
1643
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
1644
|
+
# have a `Status` message for error reporting purpose.
|
1645
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
1646
|
+
# `Status` message should be used directly inside batch response, one for
|
1647
|
+
# each error sub-response.
|
1648
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
1649
|
+
# results in its response, the status of those operations should be
|
1650
|
+
# represented directly using the `Status` message.
|
1651
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
1652
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
1653
|
+
# Corresponds to the JSON property `error`
|
1654
|
+
# @return [Google::Apis::SpannerV1::Status]
|
1655
|
+
attr_accessor :error
|
1656
|
+
|
1657
|
+
# Service-specific metadata associated with the operation. It typically
|
1658
|
+
# contains progress information and common metadata such as create time.
|
1659
|
+
# Some services might not provide such metadata. Any method that returns a
|
1660
|
+
# long-running operation should document the metadata type, if any.
|
1661
|
+
# Corresponds to the JSON property `metadata`
|
1662
|
+
# @return [Hash<String,Object>]
|
1663
|
+
attr_accessor :metadata
|
1664
|
+
|
1665
|
+
# If the value is `false`, it means the operation is still in progress.
|
1666
|
+
# If true, the operation is completed, and either `error` or `response` is
|
1667
|
+
# available.
|
1668
|
+
# Corresponds to the JSON property `done`
|
1669
|
+
# @return [Boolean]
|
1670
|
+
attr_accessor :done
|
1671
|
+
alias_method :done?, :done
|
1672
|
+
|
1673
|
+
def initialize(**args)
|
1674
|
+
update!(**args)
|
1675
|
+
end
|
1676
|
+
|
1677
|
+
# Update properties of this object
|
1678
|
+
def update!(**args)
|
1679
|
+
@response = args[:response] if args.key?(:response)
|
1680
|
+
@name = args[:name] if args.key?(:name)
|
1681
|
+
@error = args[:error] if args.key?(:error)
|
1682
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1683
|
+
@done = args[:done] if args.key?(:done)
|
1684
|
+
end
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
# Results from Read or
|
1688
|
+
# ExecuteSql.
|
1689
|
+
class ResultSet
|
1690
|
+
include Google::Apis::Core::Hashable
|
1691
|
+
|
1692
|
+
# Each element in `rows` is a row whose format is defined by
|
1693
|
+
# metadata.row_type. The ith element
|
1694
|
+
# in each row matches the ith field in
|
1695
|
+
# metadata.row_type. Elements are
|
1696
|
+
# encoded based on type as described
|
1697
|
+
# here.
|
1698
|
+
# Corresponds to the JSON property `rows`
|
1699
|
+
# @return [Array<Array<Object>>]
|
1700
|
+
attr_accessor :rows
|
1701
|
+
|
1702
|
+
# Metadata about a ResultSet or PartialResultSet.
|
1703
|
+
# Corresponds to the JSON property `metadata`
|
1704
|
+
# @return [Google::Apis::SpannerV1::ResultSetMetadata]
|
1705
|
+
attr_accessor :metadata
|
1706
|
+
|
1707
|
+
# Additional statistics about a ResultSet or PartialResultSet.
|
1708
|
+
# Corresponds to the JSON property `stats`
|
1709
|
+
# @return [Google::Apis::SpannerV1::ResultSetStats]
|
1710
|
+
attr_accessor :stats
|
1711
|
+
|
1712
|
+
def initialize(**args)
|
1713
|
+
update!(**args)
|
1714
|
+
end
|
1715
|
+
|
1716
|
+
# Update properties of this object
|
1717
|
+
def update!(**args)
|
1718
|
+
@rows = args[:rows] if args.key?(:rows)
|
1719
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1720
|
+
@stats = args[:stats] if args.key?(:stats)
|
1721
|
+
end
|
1722
|
+
end
|
1723
|
+
|
1724
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1725
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
1726
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
1727
|
+
# - Simple to use and understand for most users
|
1728
|
+
# - Flexible enough to meet unexpected needs
|
1729
|
+
# # Overview
|
1730
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
1731
|
+
# and error details. The error code should be an enum value of
|
1732
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
1733
|
+
# error message should be a developer-facing English message that helps
|
1734
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
1735
|
+
# error message is needed, put the localized message in the error details or
|
1736
|
+
# localize it in the client. The optional error details may contain arbitrary
|
1737
|
+
# information about the error. There is a predefined set of error detail types
|
1738
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
1739
|
+
# # Language mapping
|
1740
|
+
# The `Status` message is the logical representation of the error model, but it
|
1741
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
1742
|
+
# exposed in different client libraries and different wire protocols, it can be
|
1743
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
1744
|
+
# in Java, but more likely mapped to some error codes in C.
|
1745
|
+
# # Other uses
|
1746
|
+
# The error model and the `Status` message can be used in a variety of
|
1747
|
+
# environments, either with or without APIs, to provide a
|
1748
|
+
# consistent developer experience across different environments.
|
1749
|
+
# Example uses of this error model include:
|
1750
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
1751
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
1752
|
+
# errors.
|
1753
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
1754
|
+
# have a `Status` message for error reporting purpose.
|
1755
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
1756
|
+
# `Status` message should be used directly inside batch response, one for
|
1757
|
+
# each error sub-response.
|
1758
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
1759
|
+
# results in its response, the status of those operations should be
|
1760
|
+
# represented directly using the `Status` message.
|
1761
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
1762
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
1763
|
+
class Status
|
1764
|
+
include Google::Apis::Core::Hashable
|
1765
|
+
|
1766
|
+
# A list of messages that carry the error details. There will be a
|
1767
|
+
# common set of message types for APIs to use.
|
1768
|
+
# Corresponds to the JSON property `details`
|
1769
|
+
# @return [Array<Hash<String,Object>>]
|
1770
|
+
attr_accessor :details
|
1771
|
+
|
1772
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1773
|
+
# Corresponds to the JSON property `code`
|
1774
|
+
# @return [Fixnum]
|
1775
|
+
attr_accessor :code
|
1776
|
+
|
1777
|
+
# A developer-facing error message, which should be in English. Any
|
1778
|
+
# user-facing error message should be localized and sent in the
|
1779
|
+
# google.rpc.Status.details field, or localized by the client.
|
1780
|
+
# Corresponds to the JSON property `message`
|
1781
|
+
# @return [String]
|
1782
|
+
attr_accessor :message
|
1783
|
+
|
1784
|
+
def initialize(**args)
|
1785
|
+
update!(**args)
|
1786
|
+
end
|
1787
|
+
|
1788
|
+
# Update properties of this object
|
1789
|
+
def update!(**args)
|
1790
|
+
@details = args[:details] if args.key?(:details)
|
1791
|
+
@code = args[:code] if args.key?(:code)
|
1792
|
+
@message = args[:message] if args.key?(:message)
|
1793
|
+
end
|
1794
|
+
end
|
1795
|
+
|
1796
|
+
# Associates `members` with a `role`.
|
1797
|
+
class Binding
|
1798
|
+
include Google::Apis::Core::Hashable
|
1799
|
+
|
1800
|
+
# Specifies the identities requesting access for a Cloud Platform resource.
|
1801
|
+
# `members` can have the following values:
|
1802
|
+
# * `allUsers`: A special identifier that represents anyone who is
|
1803
|
+
# on the internet; with or without a Google account.
|
1804
|
+
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
1805
|
+
# who is authenticated with a Google account or a service account.
|
1806
|
+
# * `user:`emailid``: An email address that represents a specific Google
|
1807
|
+
# account. For example, `alice@gmail.com` or `joe@example.com`.
|
1808
|
+
# * `serviceAccount:`emailid``: An email address that represents a service
|
1809
|
+
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
1810
|
+
# * `group:`emailid``: An email address that represents a Google group.
|
1811
|
+
# For example, `admins@example.com`.
|
1812
|
+
# * `domain:`domain``: A Google Apps domain name that represents all the
|
1813
|
+
# users of that domain. For example, `google.com` or `example.com`.
|
1814
|
+
# Corresponds to the JSON property `members`
|
1815
|
+
# @return [Array<String>]
|
1816
|
+
attr_accessor :members
|
1817
|
+
|
1818
|
+
# Role that is assigned to `members`.
|
1819
|
+
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
1820
|
+
# Required
|
1821
|
+
# Corresponds to the JSON property `role`
|
1822
|
+
# @return [String]
|
1823
|
+
attr_accessor :role
|
1824
|
+
|
1825
|
+
def initialize(**args)
|
1826
|
+
update!(**args)
|
1827
|
+
end
|
1828
|
+
|
1829
|
+
# Update properties of this object
|
1830
|
+
def update!(**args)
|
1831
|
+
@members = args[:members] if args.key?(:members)
|
1832
|
+
@role = args[:role] if args.key?(:role)
|
1833
|
+
end
|
1834
|
+
end
|
1835
|
+
|
1836
|
+
# Enqueues the given DDL statements to be applied, in order but not
|
1837
|
+
# necessarily all at once, to the database schema at some point (or
|
1838
|
+
# points) in the future. The server checks that the statements
|
1839
|
+
# are executable (syntactically valid, name tables that exist, etc.)
|
1840
|
+
# before enqueueing them, but they may still fail upon
|
1841
|
+
# later execution (e.g., if a statement from another batch of
|
1842
|
+
# statements is applied first and it conflicts in some way, or if
|
1843
|
+
# there is some data-related problem like a `NULL` value in a column to
|
1844
|
+
# which `NOT NULL` would be added). If a statement fails, all
|
1845
|
+
# subsequent statements in the batch are automatically cancelled.
|
1846
|
+
# Each batch of statements is assigned a name which can be used with
|
1847
|
+
# the Operations API to monitor
|
1848
|
+
# progress. See the
|
1849
|
+
# operation_id field for more
|
1850
|
+
# details.
|
1851
|
+
class UpdateDatabaseDdlRequest
|
1852
|
+
include Google::Apis::Core::Hashable
|
1853
|
+
|
1854
|
+
# DDL statements to be applied to the database.
|
1855
|
+
# Corresponds to the JSON property `statements`
|
1856
|
+
# @return [Array<String>]
|
1857
|
+
attr_accessor :statements
|
1858
|
+
|
1859
|
+
# If empty, the new update request is assigned an
|
1860
|
+
# automatically-generated operation ID. Otherwise, `operation_id`
|
1861
|
+
# is used to construct the name of the resulting
|
1862
|
+
# Operation.
|
1863
|
+
# Specifying an explicit operation ID simplifies determining
|
1864
|
+
# whether the statements were executed in the event that the
|
1865
|
+
# UpdateDatabaseDdl call is replayed,
|
1866
|
+
# or the return value is otherwise lost: the database and
|
1867
|
+
# `operation_id` fields can be combined to form the
|
1868
|
+
# name of the resulting
|
1869
|
+
# longrunning.Operation: `<database>/operations/<operation_id>`.
|
1870
|
+
# `operation_id` should be unique within the database, and must be
|
1871
|
+
# a valid identifier: `a-z*`. Note that
|
1872
|
+
# automatically-generated operation IDs always begin with an
|
1873
|
+
# underscore. If the named operation already exists,
|
1874
|
+
# UpdateDatabaseDdl returns
|
1875
|
+
# `ALREADY_EXISTS`.
|
1876
|
+
# Corresponds to the JSON property `operationId`
|
1877
|
+
# @return [String]
|
1878
|
+
attr_accessor :operation_id
|
1879
|
+
|
1880
|
+
def initialize(**args)
|
1881
|
+
update!(**args)
|
1882
|
+
end
|
1883
|
+
|
1884
|
+
# Update properties of this object
|
1885
|
+
def update!(**args)
|
1886
|
+
@statements = args[:statements] if args.key?(:statements)
|
1887
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
1888
|
+
end
|
1889
|
+
end
|
1890
|
+
|
1891
|
+
# Partial results from a streaming read or SQL query. Streaming reads and
|
1892
|
+
# SQL queries better tolerate large result sets, large rows, and large
|
1893
|
+
# values, but are a little trickier to consume.
|
1894
|
+
class PartialResultSet
|
1895
|
+
include Google::Apis::Core::Hashable
|
1896
|
+
|
1897
|
+
# Streaming calls might be interrupted for a variety of reasons, such
|
1898
|
+
# as TCP connection loss. If this occurs, the stream of results can
|
1899
|
+
# be resumed by re-sending the original request and including
|
1900
|
+
# `resume_token`. Note that executing any other transaction in the
|
1901
|
+
# same session invalidates the token.
|
1902
|
+
# Corresponds to the JSON property `resumeToken`
|
1903
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1904
|
+
# @return [String]
|
1905
|
+
attr_accessor :resume_token
|
1906
|
+
|
1907
|
+
# Additional statistics about a ResultSet or PartialResultSet.
|
1908
|
+
# Corresponds to the JSON property `stats`
|
1909
|
+
# @return [Google::Apis::SpannerV1::ResultSetStats]
|
1910
|
+
attr_accessor :stats
|
1911
|
+
|
1912
|
+
# If true, then the final value in values is chunked, and must
|
1913
|
+
# be combined with more values from subsequent `PartialResultSet`s
|
1914
|
+
# to obtain a complete field value.
|
1915
|
+
# Corresponds to the JSON property `chunkedValue`
|
1916
|
+
# @return [Boolean]
|
1917
|
+
attr_accessor :chunked_value
|
1918
|
+
alias_method :chunked_value?, :chunked_value
|
1919
|
+
|
1920
|
+
# Metadata about a ResultSet or PartialResultSet.
|
1921
|
+
# Corresponds to the JSON property `metadata`
|
1922
|
+
# @return [Google::Apis::SpannerV1::ResultSetMetadata]
|
1923
|
+
attr_accessor :metadata
|
1924
|
+
|
1925
|
+
# A streamed result set consists of a stream of values, which might
|
1926
|
+
# be split into many `PartialResultSet` messages to accommodate
|
1927
|
+
# large rows and/or large values. Every N complete values defines a
|
1928
|
+
# row, where N is equal to the number of entries in
|
1929
|
+
# metadata.row_type.fields.
|
1930
|
+
# Most values are encoded based on type as described
|
1931
|
+
# here.
|
1932
|
+
# It is possible that the last value in values is "chunked",
|
1933
|
+
# meaning that the rest of the value is sent in subsequent
|
1934
|
+
# `PartialResultSet`(s). This is denoted by the chunked_value
|
1935
|
+
# field. Two or more chunked values can be merged to form a
|
1936
|
+
# complete value as follows:
|
1937
|
+
# * `bool/number/null`: cannot be chunked
|
1938
|
+
# * `string`: concatenate the strings
|
1939
|
+
# * `list`: concatenate the lists. If the last element in a list is a
|
1940
|
+
# `string`, `list`, or `object`, merge it with the first element in
|
1941
|
+
# the next list by applying these rules recursively.
|
1942
|
+
# * `object`: concatenate the (field name, field value) pairs. If a
|
1943
|
+
# field name is duplicated, then apply these rules recursively
|
1944
|
+
# to merge the field values.
|
1945
|
+
# Some examples of merging:
|
1946
|
+
# # Strings are concatenated.
|
1947
|
+
# "foo", "bar" => "foobar"
|
1948
|
+
# # Lists of non-strings are concatenated.
|
1949
|
+
# [2, 3], [4] => [2, 3, 4]
|
1950
|
+
# # Lists are concatenated, but the last and first elements are merged
|
1951
|
+
# # because they are strings.
|
1952
|
+
# ["a", "b"], ["c", "d"] => ["a", "bc", "d"]
|
1953
|
+
# # Lists are concatenated, but the last and first elements are merged
|
1954
|
+
# # because they are lists. Recursively, the last and first elements
|
1955
|
+
# # of the inner lists are merged because they are strings.
|
1956
|
+
# ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"]
|
1957
|
+
# # Non-overlapping object fields are combined.
|
1958
|
+
# `"a": "1"`, `"b": "2"` => `"a": "1", "b": 2"`
|
1959
|
+
# # Overlapping object fields are merged.
|
1960
|
+
# `"a": "1"`, `"a": "2"` => `"a": "12"`
|
1961
|
+
# # Examples of merging objects containing lists of strings.
|
1962
|
+
# `"a": ["1"]`, `"a": ["2"]` => `"a": ["12"]`
|
1963
|
+
# For a more complete example, suppose a streaming SQL query is
|
1964
|
+
# yielding a result set whose rows contain a single string
|
1965
|
+
# field. The following `PartialResultSet`s might be yielded:
|
1966
|
+
# `
|
1967
|
+
# "metadata": ` ... `
|
1968
|
+
# "values": ["Hello", "W"]
|
1969
|
+
# "chunked_value": true
|
1970
|
+
# "resume_token": "Af65..."
|
1971
|
+
# `
|
1972
|
+
# `
|
1973
|
+
# "values": ["orl"]
|
1974
|
+
# "chunked_value": true
|
1975
|
+
# "resume_token": "Bqp2..."
|
1976
|
+
# `
|
1977
|
+
# `
|
1978
|
+
# "values": ["d"]
|
1979
|
+
# "resume_token": "Zx1B..."
|
1980
|
+
# `
|
1981
|
+
# This sequence of `PartialResultSet`s encodes two rows, one
|
1982
|
+
# containing the field value `"Hello"`, and a second containing the
|
1983
|
+
# field value `"World" = "W" + "orl" + "d"`.
|
1984
|
+
# Corresponds to the JSON property `values`
|
1985
|
+
# @return [Array<Object>]
|
1986
|
+
attr_accessor :values
|
1987
|
+
|
1988
|
+
def initialize(**args)
|
1989
|
+
update!(**args)
|
1990
|
+
end
|
1991
|
+
|
1992
|
+
# Update properties of this object
|
1993
|
+
def update!(**args)
|
1994
|
+
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
1995
|
+
@stats = args[:stats] if args.key?(:stats)
|
1996
|
+
@chunked_value = args[:chunked_value] if args.key?(:chunked_value)
|
1997
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1998
|
+
@values = args[:values] if args.key?(:values)
|
1999
|
+
end
|
2000
|
+
end
|
2001
|
+
|
2002
|
+
# Metadata type for the operation returned by
|
2003
|
+
# UpdateInstance.
|
2004
|
+
class UpdateInstanceMetadata
|
2005
|
+
include Google::Apis::Core::Hashable
|
2006
|
+
|
2007
|
+
# An isolated set of Cloud Spanner resources on which databases can be hosted.
|
2008
|
+
# Corresponds to the JSON property `instance`
|
2009
|
+
# @return [Google::Apis::SpannerV1::Instance]
|
2010
|
+
attr_accessor :instance
|
2011
|
+
|
2012
|
+
# The time at which UpdateInstance
|
2013
|
+
# request was received.
|
2014
|
+
# Corresponds to the JSON property `startTime`
|
2015
|
+
# @return [String]
|
2016
|
+
attr_accessor :start_time
|
2017
|
+
|
2018
|
+
# The time at which this operation was cancelled. If set, this operation is
|
2019
|
+
# in the process of undoing itself (which is guaranteed to succeed) and
|
2020
|
+
# cannot be cancelled again.
|
2021
|
+
# Corresponds to the JSON property `cancelTime`
|
2022
|
+
# @return [String]
|
2023
|
+
attr_accessor :cancel_time
|
2024
|
+
|
2025
|
+
# The time at which this operation failed or was completed successfully.
|
2026
|
+
# Corresponds to the JSON property `endTime`
|
2027
|
+
# @return [String]
|
2028
|
+
attr_accessor :end_time
|
2029
|
+
|
2030
|
+
def initialize(**args)
|
2031
|
+
update!(**args)
|
2032
|
+
end
|
2033
|
+
|
2034
|
+
# Update properties of this object
|
2035
|
+
def update!(**args)
|
2036
|
+
@instance = args[:instance] if args.key?(:instance)
|
2037
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
2038
|
+
@cancel_time = args[:cancel_time] if args.key?(:cancel_time)
|
2039
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
2040
|
+
end
|
2041
|
+
end
|
2042
|
+
|
2043
|
+
# The response message for Operations.ListOperations.
|
2044
|
+
class ListOperationsResponse
|
2045
|
+
include Google::Apis::Core::Hashable
|
2046
|
+
|
2047
|
+
# The standard List next-page token.
|
2048
|
+
# Corresponds to the JSON property `nextPageToken`
|
2049
|
+
# @return [String]
|
2050
|
+
attr_accessor :next_page_token
|
2051
|
+
|
2052
|
+
# A list of operations that matches the specified filter in the request.
|
2053
|
+
# Corresponds to the JSON property `operations`
|
2054
|
+
# @return [Array<Google::Apis::SpannerV1::Operation>]
|
2055
|
+
attr_accessor :operations
|
2056
|
+
|
2057
|
+
def initialize(**args)
|
2058
|
+
update!(**args)
|
2059
|
+
end
|
2060
|
+
|
2061
|
+
# Update properties of this object
|
2062
|
+
def update!(**args)
|
2063
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2064
|
+
@operations = args[:operations] if args.key?(:operations)
|
2065
|
+
end
|
2066
|
+
end
|
2067
|
+
|
2068
|
+
# Metadata about a ResultSet or PartialResultSet.
|
2069
|
+
class ResultSetMetadata
|
2070
|
+
include Google::Apis::Core::Hashable
|
2071
|
+
|
2072
|
+
# A transaction.
|
2073
|
+
# Corresponds to the JSON property `transaction`
|
2074
|
+
# @return [Google::Apis::SpannerV1::Transaction]
|
2075
|
+
attr_accessor :transaction
|
2076
|
+
|
2077
|
+
# `StructType` defines the fields of a STRUCT type.
|
2078
|
+
# Corresponds to the JSON property `rowType`
|
2079
|
+
# @return [Google::Apis::SpannerV1::StructType]
|
2080
|
+
attr_accessor :row_type
|
2081
|
+
|
2082
|
+
def initialize(**args)
|
2083
|
+
update!(**args)
|
2084
|
+
end
|
2085
|
+
|
2086
|
+
# Update properties of this object
|
2087
|
+
def update!(**args)
|
2088
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
2089
|
+
@row_type = args[:row_type] if args.key?(:row_type)
|
2090
|
+
end
|
2091
|
+
end
|
2092
|
+
|
2093
|
+
# This message is used to select the transaction in which a
|
2094
|
+
# Read or
|
2095
|
+
# ExecuteSql call runs.
|
2096
|
+
# See TransactionOptions for more information about transactions.
|
2097
|
+
class TransactionSelector
|
2098
|
+
include Google::Apis::Core::Hashable
|
2099
|
+
|
2100
|
+
# Execute the read or SQL query in a previously-started transaction.
|
2101
|
+
# Corresponds to the JSON property `id`
|
2102
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2103
|
+
# @return [String]
|
2104
|
+
attr_accessor :id
|
2105
|
+
|
2106
|
+
# # Transactions
|
2107
|
+
# Each session can have at most one active transaction at a time. After the
|
2108
|
+
# active transaction is completed, the session can immediately be
|
2109
|
+
# re-used for the next transaction. It is not necessary to create a
|
2110
|
+
# new session for each transaction.
|
2111
|
+
# # Transaction Modes
|
2112
|
+
# Cloud Spanner supports two transaction modes:
|
2113
|
+
# 1. Locking read-write. This type of transaction is the only way
|
2114
|
+
# to write data into Cloud Spanner. These transactions rely on
|
2115
|
+
# pessimistic locking and, if necessary, two-phase commit.
|
2116
|
+
# Locking read-write transactions may abort, requiring the
|
2117
|
+
# application to retry.
|
2118
|
+
# 2. Snapshot read-only. This transaction type provides guaranteed
|
2119
|
+
# consistency across several reads, but does not allow
|
2120
|
+
# writes. Snapshot read-only transactions can be configured to
|
2121
|
+
# read at timestamps in the past. Snapshot read-only
|
2122
|
+
# transactions do not need to be committed.
|
2123
|
+
# For transactions that only read, snapshot read-only transactions
|
2124
|
+
# provide simpler semantics and are almost always faster. In
|
2125
|
+
# particular, read-only transactions do not take locks, so they do
|
2126
|
+
# not conflict with read-write transactions. As a consequence of not
|
2127
|
+
# taking locks, they also do not abort, so retry loops are not needed.
|
2128
|
+
# Transactions may only read/write data in a single database. They
|
2129
|
+
# may, however, read/write data in different tables within that
|
2130
|
+
# database.
|
2131
|
+
# ## Locking Read-Write Transactions
|
2132
|
+
# Locking transactions may be used to atomically read-modify-write
|
2133
|
+
# data anywhere in a database. This type of transaction is externally
|
2134
|
+
# consistent.
|
2135
|
+
# Clients should attempt to minimize the amount of time a transaction
|
2136
|
+
# is active. Faster transactions commit with higher probability
|
2137
|
+
# and cause less contention. Cloud Spanner attempts to keep read locks
|
2138
|
+
# active as long as the transaction continues to do reads, and the
|
2139
|
+
# transaction has not been terminated by
|
2140
|
+
# Commit or
|
2141
|
+
# Rollback. Long periods of
|
2142
|
+
# inactivity at the client may cause Cloud Spanner to release a
|
2143
|
+
# transaction's locks and abort it.
|
2144
|
+
# Reads performed within a transaction acquire locks on the data
|
2145
|
+
# being read. Writes can only be done at commit time, after all reads
|
2146
|
+
# have been completed.
|
2147
|
+
# Conceptually, a read-write transaction consists of zero or more
|
2148
|
+
# reads or SQL queries followed by
|
2149
|
+
# Commit. At any time before
|
2150
|
+
# Commit, the client can send a
|
2151
|
+
# Rollback request to abort the
|
2152
|
+
# transaction.
|
2153
|
+
# ### Semantics
|
2154
|
+
# Cloud Spanner can commit the transaction if all read locks it acquired
|
2155
|
+
# are still valid at commit time, and it is able to acquire write
|
2156
|
+
# locks for all writes. Cloud Spanner can abort the transaction for any
|
2157
|
+
# reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
|
2158
|
+
# that the transaction has not modified any user data in Cloud Spanner.
|
2159
|
+
# Unless the transaction commits, Cloud Spanner makes no guarantees about
|
2160
|
+
# how long the transaction's locks were held for. It is an error to
|
2161
|
+
# use Cloud Spanner locks for any sort of mutual exclusion other than
|
2162
|
+
# between Cloud Spanner transactions themselves.
|
2163
|
+
# ### Retrying Aborted Transactions
|
2164
|
+
# When a transaction aborts, the application can choose to retry the
|
2165
|
+
# whole transaction again. To maximize the chances of successfully
|
2166
|
+
# committing the retry, the client should execute the retry in the
|
2167
|
+
# same session as the original attempt. The original session's lock
|
2168
|
+
# priority increases with each consecutive abort, meaning that each
|
2169
|
+
# attempt has a slightly better chance of success than the previous.
|
2170
|
+
# Under some circumstances (e.g., many transactions attempting to
|
2171
|
+
# modify the same row(s)), a transaction can abort many times in a
|
2172
|
+
# short period before successfully committing. Thus, it is not a good
|
2173
|
+
# idea to cap the number of retries a transaction can attempt;
|
2174
|
+
# instead, it is better to limit the total amount of wall time spent
|
2175
|
+
# retrying.
|
2176
|
+
# ### Idle Transactions
|
2177
|
+
# A transaction is considered idle if it has no outstanding reads or
|
2178
|
+
# SQL queries and has not started a read or SQL query within the last 10
|
2179
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they
|
2180
|
+
# don't hold on to locks indefinitely. In that case, the commit will
|
2181
|
+
# fail with error `ABORTED`.
|
2182
|
+
# If this behavior is undesirable, periodically executing a simple
|
2183
|
+
# SQL query in the transaction (e.g., `SELECT 1`) prevents the
|
2184
|
+
# transaction from becoming idle.
|
2185
|
+
# ## Snapshot Read-Only Transactions
|
2186
|
+
# Snapshot read-only transactions provides a simpler method than
|
2187
|
+
# locking read-write transactions for doing several consistent
|
2188
|
+
# reads. However, this type of transaction does not support writes.
|
2189
|
+
# Snapshot transactions do not take locks. Instead, they work by
|
2190
|
+
# choosing a Cloud Spanner timestamp, then executing all reads at that
|
2191
|
+
# timestamp. Since they do not acquire locks, they do not block
|
2192
|
+
# concurrent read-write transactions.
|
2193
|
+
# Unlike locking read-write transactions, snapshot read-only
|
2194
|
+
# transactions never abort. They can fail if the chosen read
|
2195
|
+
# timestamp is garbage collected; however, the default garbage
|
2196
|
+
# collection policy is generous enough that most applications do not
|
2197
|
+
# need to worry about this in practice.
|
2198
|
+
# Snapshot read-only transactions do not need to call
|
2199
|
+
# Commit or
|
2200
|
+
# Rollback (and in fact are not
|
2201
|
+
# permitted to do so).
|
2202
|
+
# To execute a snapshot transaction, the client specifies a timestamp
|
2203
|
+
# bound, which tells Cloud Spanner how to choose a read timestamp.
|
2204
|
+
# The types of timestamp bound are:
|
2205
|
+
# - Strong (the default).
|
2206
|
+
# - Bounded staleness.
|
2207
|
+
# - Exact staleness.
|
2208
|
+
# If the Cloud Spanner database to be read is geographically distributed,
|
2209
|
+
# stale read-only transactions can execute more quickly than strong
|
2210
|
+
# or read-write transaction, because they are able to execute far
|
2211
|
+
# from the leader replica.
|
2212
|
+
# Each type of timestamp bound is discussed in detail below.
|
2213
|
+
# ### Strong
|
2214
|
+
# Strong reads are guaranteed to see the effects of all transactions
|
2215
|
+
# that have committed before the start of the read. Furthermore, all
|
2216
|
+
# rows yielded by a single read are consistent with each other -- if
|
2217
|
+
# any part of the read observes a transaction, all parts of the read
|
2218
|
+
# see the transaction.
|
2219
|
+
# Strong reads are not repeatable: two consecutive strong read-only
|
2220
|
+
# transactions might return inconsistent results if there are
|
2221
|
+
# concurrent writes. If consistency across reads is required, the
|
2222
|
+
# reads should be executed within a transaction or at an exact read
|
2223
|
+
# timestamp.
|
2224
|
+
# See TransactionOptions.ReadOnly.strong.
|
2225
|
+
# ### Exact Staleness
|
2226
|
+
# These timestamp bounds execute reads at a user-specified
|
2227
|
+
# timestamp. Reads at a timestamp are guaranteed to see a consistent
|
2228
|
+
# prefix of the global transaction history: they observe
|
2229
|
+
# modifications done by all transactions with a commit timestamp <=
|
2230
|
+
# the read timestamp, and observe none of the modifications done by
|
2231
|
+
# transactions with a larger commit timestamp. They will block until
|
2232
|
+
# all conflicting transactions that may be assigned commit timestamps
|
2233
|
+
# <= the read timestamp have finished.
|
2234
|
+
# The timestamp can either be expressed as an absolute Cloud Spanner commit
|
2235
|
+
# timestamp or a staleness relative to the current time.
|
2236
|
+
# These modes do not require a "negotiation phase" to pick a
|
2237
|
+
# timestamp. As a result, they execute slightly faster than the
|
2238
|
+
# equivalent boundedly stale concurrency modes. On the other hand,
|
2239
|
+
# boundedly stale reads usually return fresher results.
|
2240
|
+
# See TransactionOptions.ReadOnly.read_timestamp and
|
2241
|
+
# TransactionOptions.ReadOnly.exact_staleness.
|
2242
|
+
# ### Bounded Staleness
|
2243
|
+
# Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
|
2244
|
+
# subject to a user-provided staleness bound. Cloud Spanner chooses the
|
2245
|
+
# newest timestamp within the staleness bound that allows execution
|
2246
|
+
# of the reads at the closest available replica without blocking.
|
2247
|
+
# All rows yielded are consistent with each other -- if any part of
|
2248
|
+
# the read observes a transaction, all parts of the read see the
|
2249
|
+
# transaction. Boundedly stale reads are not repeatable: two stale
|
2250
|
+
# reads, even if they use the same staleness bound, can execute at
|
2251
|
+
# different timestamps and thus return inconsistent results.
|
2252
|
+
# Boundedly stale reads execute in two phases: the first phase
|
2253
|
+
# negotiates a timestamp among all replicas needed to serve the
|
2254
|
+
# read. In the second phase, reads are executed at the negotiated
|
2255
|
+
# timestamp.
|
2256
|
+
# As a result of the two phase execution, bounded staleness reads are
|
2257
|
+
# usually a little slower than comparable exact staleness
|
2258
|
+
# reads. However, they are typically able to return fresher
|
2259
|
+
# results, and are more likely to execute at the closest replica.
|
2260
|
+
# Because the timestamp negotiation requires up-front knowledge of
|
2261
|
+
# which rows will be read, it can only be used with single-use
|
2262
|
+
# read-only transactions.
|
2263
|
+
# See TransactionOptions.ReadOnly.max_staleness and
|
2264
|
+
# TransactionOptions.ReadOnly.min_read_timestamp.
|
2265
|
+
# ### Old Read Timestamps and Garbage Collection
|
2266
|
+
# Cloud Spanner continuously garbage collects deleted and overwritten data
|
2267
|
+
# in the background to reclaim storage space. This process is known
|
2268
|
+
# as "version GC". By default, version GC reclaims versions after they
|
2269
|
+
# are one hour old. Because of this, Cloud Spanner cannot perform reads
|
2270
|
+
# at read timestamps more than one hour in the past. This
|
2271
|
+
# restriction also applies to in-progress reads and/or SQL queries whose
|
2272
|
+
# timestamp become too old while executing. Reads and SQL queries with
|
2273
|
+
# too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
2274
|
+
# Corresponds to the JSON property `singleUse`
|
2275
|
+
# @return [Google::Apis::SpannerV1::TransactionOptions]
|
2276
|
+
attr_accessor :single_use
|
2277
|
+
|
2278
|
+
# # Transactions
|
2279
|
+
# Each session can have at most one active transaction at a time. After the
|
2280
|
+
# active transaction is completed, the session can immediately be
|
2281
|
+
# re-used for the next transaction. It is not necessary to create a
|
2282
|
+
# new session for each transaction.
|
2283
|
+
# # Transaction Modes
|
2284
|
+
# Cloud Spanner supports two transaction modes:
|
2285
|
+
# 1. Locking read-write. This type of transaction is the only way
|
2286
|
+
# to write data into Cloud Spanner. These transactions rely on
|
2287
|
+
# pessimistic locking and, if necessary, two-phase commit.
|
2288
|
+
# Locking read-write transactions may abort, requiring the
|
2289
|
+
# application to retry.
|
2290
|
+
# 2. Snapshot read-only. This transaction type provides guaranteed
|
2291
|
+
# consistency across several reads, but does not allow
|
2292
|
+
# writes. Snapshot read-only transactions can be configured to
|
2293
|
+
# read at timestamps in the past. Snapshot read-only
|
2294
|
+
# transactions do not need to be committed.
|
2295
|
+
# For transactions that only read, snapshot read-only transactions
|
2296
|
+
# provide simpler semantics and are almost always faster. In
|
2297
|
+
# particular, read-only transactions do not take locks, so they do
|
2298
|
+
# not conflict with read-write transactions. As a consequence of not
|
2299
|
+
# taking locks, they also do not abort, so retry loops are not needed.
|
2300
|
+
# Transactions may only read/write data in a single database. They
|
2301
|
+
# may, however, read/write data in different tables within that
|
2302
|
+
# database.
|
2303
|
+
# ## Locking Read-Write Transactions
|
2304
|
+
# Locking transactions may be used to atomically read-modify-write
|
2305
|
+
# data anywhere in a database. This type of transaction is externally
|
2306
|
+
# consistent.
|
2307
|
+
# Clients should attempt to minimize the amount of time a transaction
|
2308
|
+
# is active. Faster transactions commit with higher probability
|
2309
|
+
# and cause less contention. Cloud Spanner attempts to keep read locks
|
2310
|
+
# active as long as the transaction continues to do reads, and the
|
2311
|
+
# transaction has not been terminated by
|
2312
|
+
# Commit or
|
2313
|
+
# Rollback. Long periods of
|
2314
|
+
# inactivity at the client may cause Cloud Spanner to release a
|
2315
|
+
# transaction's locks and abort it.
|
2316
|
+
# Reads performed within a transaction acquire locks on the data
|
2317
|
+
# being read. Writes can only be done at commit time, after all reads
|
2318
|
+
# have been completed.
|
2319
|
+
# Conceptually, a read-write transaction consists of zero or more
|
2320
|
+
# reads or SQL queries followed by
|
2321
|
+
# Commit. At any time before
|
2322
|
+
# Commit, the client can send a
|
2323
|
+
# Rollback request to abort the
|
2324
|
+
# transaction.
|
2325
|
+
# ### Semantics
|
2326
|
+
# Cloud Spanner can commit the transaction if all read locks it acquired
|
2327
|
+
# are still valid at commit time, and it is able to acquire write
|
2328
|
+
# locks for all writes. Cloud Spanner can abort the transaction for any
|
2329
|
+
# reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
|
2330
|
+
# that the transaction has not modified any user data in Cloud Spanner.
|
2331
|
+
# Unless the transaction commits, Cloud Spanner makes no guarantees about
|
2332
|
+
# how long the transaction's locks were held for. It is an error to
|
2333
|
+
# use Cloud Spanner locks for any sort of mutual exclusion other than
|
2334
|
+
# between Cloud Spanner transactions themselves.
|
2335
|
+
# ### Retrying Aborted Transactions
|
2336
|
+
# When a transaction aborts, the application can choose to retry the
|
2337
|
+
# whole transaction again. To maximize the chances of successfully
|
2338
|
+
# committing the retry, the client should execute the retry in the
|
2339
|
+
# same session as the original attempt. The original session's lock
|
2340
|
+
# priority increases with each consecutive abort, meaning that each
|
2341
|
+
# attempt has a slightly better chance of success than the previous.
|
2342
|
+
# Under some circumstances (e.g., many transactions attempting to
|
2343
|
+
# modify the same row(s)), a transaction can abort many times in a
|
2344
|
+
# short period before successfully committing. Thus, it is not a good
|
2345
|
+
# idea to cap the number of retries a transaction can attempt;
|
2346
|
+
# instead, it is better to limit the total amount of wall time spent
|
2347
|
+
# retrying.
|
2348
|
+
# ### Idle Transactions
|
2349
|
+
# A transaction is considered idle if it has no outstanding reads or
|
2350
|
+
# SQL queries and has not started a read or SQL query within the last 10
|
2351
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they
|
2352
|
+
# don't hold on to locks indefinitely. In that case, the commit will
|
2353
|
+
# fail with error `ABORTED`.
|
2354
|
+
# If this behavior is undesirable, periodically executing a simple
|
2355
|
+
# SQL query in the transaction (e.g., `SELECT 1`) prevents the
|
2356
|
+
# transaction from becoming idle.
|
2357
|
+
# ## Snapshot Read-Only Transactions
|
2358
|
+
# Snapshot read-only transactions provides a simpler method than
|
2359
|
+
# locking read-write transactions for doing several consistent
|
2360
|
+
# reads. However, this type of transaction does not support writes.
|
2361
|
+
# Snapshot transactions do not take locks. Instead, they work by
|
2362
|
+
# choosing a Cloud Spanner timestamp, then executing all reads at that
|
2363
|
+
# timestamp. Since they do not acquire locks, they do not block
|
2364
|
+
# concurrent read-write transactions.
|
2365
|
+
# Unlike locking read-write transactions, snapshot read-only
|
2366
|
+
# transactions never abort. They can fail if the chosen read
|
2367
|
+
# timestamp is garbage collected; however, the default garbage
|
2368
|
+
# collection policy is generous enough that most applications do not
|
2369
|
+
# need to worry about this in practice.
|
2370
|
+
# Snapshot read-only transactions do not need to call
|
2371
|
+
# Commit or
|
2372
|
+
# Rollback (and in fact are not
|
2373
|
+
# permitted to do so).
|
2374
|
+
# To execute a snapshot transaction, the client specifies a timestamp
|
2375
|
+
# bound, which tells Cloud Spanner how to choose a read timestamp.
|
2376
|
+
# The types of timestamp bound are:
|
2377
|
+
# - Strong (the default).
|
2378
|
+
# - Bounded staleness.
|
2379
|
+
# - Exact staleness.
|
2380
|
+
# If the Cloud Spanner database to be read is geographically distributed,
|
2381
|
+
# stale read-only transactions can execute more quickly than strong
|
2382
|
+
# or read-write transaction, because they are able to execute far
|
2383
|
+
# from the leader replica.
|
2384
|
+
# Each type of timestamp bound is discussed in detail below.
|
2385
|
+
# ### Strong
|
2386
|
+
# Strong reads are guaranteed to see the effects of all transactions
|
2387
|
+
# that have committed before the start of the read. Furthermore, all
|
2388
|
+
# rows yielded by a single read are consistent with each other -- if
|
2389
|
+
# any part of the read observes a transaction, all parts of the read
|
2390
|
+
# see the transaction.
|
2391
|
+
# Strong reads are not repeatable: two consecutive strong read-only
|
2392
|
+
# transactions might return inconsistent results if there are
|
2393
|
+
# concurrent writes. If consistency across reads is required, the
|
2394
|
+
# reads should be executed within a transaction or at an exact read
|
2395
|
+
# timestamp.
|
2396
|
+
# See TransactionOptions.ReadOnly.strong.
|
2397
|
+
# ### Exact Staleness
|
2398
|
+
# These timestamp bounds execute reads at a user-specified
|
2399
|
+
# timestamp. Reads at a timestamp are guaranteed to see a consistent
|
2400
|
+
# prefix of the global transaction history: they observe
|
2401
|
+
# modifications done by all transactions with a commit timestamp <=
|
2402
|
+
# the read timestamp, and observe none of the modifications done by
|
2403
|
+
# transactions with a larger commit timestamp. They will block until
|
2404
|
+
# all conflicting transactions that may be assigned commit timestamps
|
2405
|
+
# <= the read timestamp have finished.
|
2406
|
+
# The timestamp can either be expressed as an absolute Cloud Spanner commit
|
2407
|
+
# timestamp or a staleness relative to the current time.
|
2408
|
+
# These modes do not require a "negotiation phase" to pick a
|
2409
|
+
# timestamp. As a result, they execute slightly faster than the
|
2410
|
+
# equivalent boundedly stale concurrency modes. On the other hand,
|
2411
|
+
# boundedly stale reads usually return fresher results.
|
2412
|
+
# See TransactionOptions.ReadOnly.read_timestamp and
|
2413
|
+
# TransactionOptions.ReadOnly.exact_staleness.
|
2414
|
+
# ### Bounded Staleness
|
2415
|
+
# Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
|
2416
|
+
# subject to a user-provided staleness bound. Cloud Spanner chooses the
|
2417
|
+
# newest timestamp within the staleness bound that allows execution
|
2418
|
+
# of the reads at the closest available replica without blocking.
|
2419
|
+
# All rows yielded are consistent with each other -- if any part of
|
2420
|
+
# the read observes a transaction, all parts of the read see the
|
2421
|
+
# transaction. Boundedly stale reads are not repeatable: two stale
|
2422
|
+
# reads, even if they use the same staleness bound, can execute at
|
2423
|
+
# different timestamps and thus return inconsistent results.
|
2424
|
+
# Boundedly stale reads execute in two phases: the first phase
|
2425
|
+
# negotiates a timestamp among all replicas needed to serve the
|
2426
|
+
# read. In the second phase, reads are executed at the negotiated
|
2427
|
+
# timestamp.
|
2428
|
+
# As a result of the two phase execution, bounded staleness reads are
|
2429
|
+
# usually a little slower than comparable exact staleness
|
2430
|
+
# reads. However, they are typically able to return fresher
|
2431
|
+
# results, and are more likely to execute at the closest replica.
|
2432
|
+
# Because the timestamp negotiation requires up-front knowledge of
|
2433
|
+
# which rows will be read, it can only be used with single-use
|
2434
|
+
# read-only transactions.
|
2435
|
+
# See TransactionOptions.ReadOnly.max_staleness and
|
2436
|
+
# TransactionOptions.ReadOnly.min_read_timestamp.
|
2437
|
+
# ### Old Read Timestamps and Garbage Collection
|
2438
|
+
# Cloud Spanner continuously garbage collects deleted and overwritten data
|
2439
|
+
# in the background to reclaim storage space. This process is known
|
2440
|
+
# as "version GC". By default, version GC reclaims versions after they
|
2441
|
+
# are one hour old. Because of this, Cloud Spanner cannot perform reads
|
2442
|
+
# at read timestamps more than one hour in the past. This
|
2443
|
+
# restriction also applies to in-progress reads and/or SQL queries whose
|
2444
|
+
# timestamp become too old while executing. Reads and SQL queries with
|
2445
|
+
# too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
2446
|
+
# Corresponds to the JSON property `begin`
|
2447
|
+
# @return [Google::Apis::SpannerV1::TransactionOptions]
|
2448
|
+
attr_accessor :begin
|
2449
|
+
|
2450
|
+
def initialize(**args)
|
2451
|
+
update!(**args)
|
2452
|
+
end
|
2453
|
+
|
2454
|
+
# Update properties of this object
|
2455
|
+
def update!(**args)
|
2456
|
+
@id = args[:id] if args.key?(:id)
|
2457
|
+
@single_use = args[:single_use] if args.key?(:single_use)
|
2458
|
+
@begin = args[:begin] if args.key?(:begin)
|
2459
|
+
end
|
2460
|
+
end
|
2461
|
+
|
2462
|
+
# A modification to one or more Cloud Spanner rows. Mutations can be
|
2463
|
+
# applied to a Cloud Spanner database by sending them in a
|
2464
|
+
# Commit call.
|
2465
|
+
class Mutation
|
2466
|
+
include Google::Apis::Core::Hashable
|
2467
|
+
|
2468
|
+
# Arguments to delete operations.
|
2469
|
+
# Corresponds to the JSON property `delete`
|
2470
|
+
# @return [Google::Apis::SpannerV1::Delete]
|
2471
|
+
attr_accessor :delete
|
2472
|
+
|
2473
|
+
# Arguments to insert, update, insert_or_update, and
|
2474
|
+
# replace operations.
|
2475
|
+
# Corresponds to the JSON property `insert`
|
2476
|
+
# @return [Google::Apis::SpannerV1::Write]
|
2477
|
+
attr_accessor :insert
|
2478
|
+
|
2479
|
+
# Arguments to insert, update, insert_or_update, and
|
2480
|
+
# replace operations.
|
2481
|
+
# Corresponds to the JSON property `insertOrUpdate`
|
2482
|
+
# @return [Google::Apis::SpannerV1::Write]
|
2483
|
+
attr_accessor :insert_or_update
|
2484
|
+
|
2485
|
+
# Arguments to insert, update, insert_or_update, and
|
2486
|
+
# replace operations.
|
2487
|
+
# Corresponds to the JSON property `update`
|
2488
|
+
# @return [Google::Apis::SpannerV1::Write]
|
2489
|
+
attr_accessor :update
|
2490
|
+
|
2491
|
+
# Arguments to insert, update, insert_or_update, and
|
2492
|
+
# replace operations.
|
2493
|
+
# Corresponds to the JSON property `replace`
|
2494
|
+
# @return [Google::Apis::SpannerV1::Write]
|
2495
|
+
attr_accessor :replace
|
2496
|
+
|
2497
|
+
def initialize(**args)
|
2498
|
+
update!(**args)
|
2499
|
+
end
|
2500
|
+
|
2501
|
+
# Update properties of this object
|
2502
|
+
def update!(**args)
|
2503
|
+
@delete = args[:delete] if args.key?(:delete)
|
2504
|
+
@insert = args[:insert] if args.key?(:insert)
|
2505
|
+
@insert_or_update = args[:insert_or_update] if args.key?(:insert_or_update)
|
2506
|
+
@update = args[:update] if args.key?(:update)
|
2507
|
+
@replace = args[:replace] if args.key?(:replace)
|
2508
|
+
end
|
2509
|
+
end
|
2510
|
+
|
2511
|
+
# `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
|
2512
|
+
# the keys are expected to be in the same table or index. The keys need
|
2513
|
+
# not be sorted in any particular way.
|
2514
|
+
# If the same key is specified multiple times in the set (for example
|
2515
|
+
# if two ranges, two keys, or a key and a range overlap), Cloud Spanner
|
2516
|
+
# behaves as if the key were only specified once.
|
2517
|
+
class KeySet
|
2518
|
+
include Google::Apis::Core::Hashable
|
2519
|
+
|
2520
|
+
# A list of key ranges. See KeyRange for more information about
|
2521
|
+
# key range specifications.
|
2522
|
+
# Corresponds to the JSON property `ranges`
|
2523
|
+
# @return [Array<Google::Apis::SpannerV1::KeyRange>]
|
2524
|
+
attr_accessor :ranges
|
2525
|
+
|
2526
|
+
# A list of specific keys. Entries in `keys` should have exactly as
|
2527
|
+
# many elements as there are columns in the primary or index key
|
2528
|
+
# with which this `KeySet` is used. Individual key values are
|
2529
|
+
# encoded as described here.
|
2530
|
+
# Corresponds to the JSON property `keys`
|
2531
|
+
# @return [Array<Array<Object>>]
|
2532
|
+
attr_accessor :keys
|
2533
|
+
|
2534
|
+
# For convenience `all` can be set to `true` to indicate that this
|
2535
|
+
# `KeySet` matches all keys in the table or index. Note that any keys
|
2536
|
+
# specified in `keys` or `ranges` are only yielded once.
|
2537
|
+
# Corresponds to the JSON property `all`
|
2538
|
+
# @return [Boolean]
|
2539
|
+
attr_accessor :all
|
2540
|
+
alias_method :all?, :all
|
2541
|
+
|
2542
|
+
def initialize(**args)
|
2543
|
+
update!(**args)
|
2544
|
+
end
|
2545
|
+
|
2546
|
+
# Update properties of this object
|
2547
|
+
def update!(**args)
|
2548
|
+
@ranges = args[:ranges] if args.key?(:ranges)
|
2549
|
+
@keys = args[:keys] if args.key?(:keys)
|
2550
|
+
@all = args[:all] if args.key?(:all)
|
2551
|
+
end
|
2552
|
+
end
|
2553
|
+
|
2554
|
+
# The response for GetDatabaseDdl.
|
2555
|
+
class GetDatabaseDdlResponse
|
2556
|
+
include Google::Apis::Core::Hashable
|
2557
|
+
|
2558
|
+
# A list of formatted DDL statements defining the schema of the database
|
2559
|
+
# specified in the request.
|
2560
|
+
# Corresponds to the JSON property `statements`
|
2561
|
+
# @return [Array<String>]
|
2562
|
+
attr_accessor :statements
|
2563
|
+
|
2564
|
+
def initialize(**args)
|
2565
|
+
update!(**args)
|
2566
|
+
end
|
2567
|
+
|
2568
|
+
# Update properties of this object
|
2569
|
+
def update!(**args)
|
2570
|
+
@statements = args[:statements] if args.key?(:statements)
|
2571
|
+
end
|
2572
|
+
end
|
2573
|
+
|
2574
|
+
# A Cloud Spanner database.
|
2575
|
+
class Database
|
2576
|
+
include Google::Apis::Core::Hashable
|
2577
|
+
|
2578
|
+
# Output only. The current database state.
|
2579
|
+
# Corresponds to the JSON property `state`
|
2580
|
+
# @return [String]
|
2581
|
+
attr_accessor :state
|
2582
|
+
|
2583
|
+
# Required. The name of the database. Values are of the form
|
2584
|
+
# `projects/<project>/instances/<instance>/databases/<database>`,
|
2585
|
+
# where `<database>` is as specified in the `CREATE DATABASE`
|
2586
|
+
# statement. This name can be passed to other API methods to
|
2587
|
+
# identify the database.
|
2588
|
+
# Corresponds to the JSON property `name`
|
2589
|
+
# @return [String]
|
2590
|
+
attr_accessor :name
|
2591
|
+
|
2592
|
+
def initialize(**args)
|
2593
|
+
update!(**args)
|
2594
|
+
end
|
2595
|
+
|
2596
|
+
# Update properties of this object
|
2597
|
+
def update!(**args)
|
2598
|
+
@state = args[:state] if args.key?(:state)
|
2599
|
+
@name = args[:name] if args.key?(:name)
|
2600
|
+
end
|
2601
|
+
end
|
2602
|
+
|
2603
|
+
# The response for ListDatabases.
|
2604
|
+
class ListDatabasesResponse
|
2605
|
+
include Google::Apis::Core::Hashable
|
2606
|
+
|
2607
|
+
# `next_page_token` can be sent in a subsequent
|
2608
|
+
# ListDatabases call to fetch more
|
2609
|
+
# of the matching databases.
|
2610
|
+
# Corresponds to the JSON property `nextPageToken`
|
2611
|
+
# @return [String]
|
2612
|
+
attr_accessor :next_page_token
|
2613
|
+
|
2614
|
+
# Databases that matched the request.
|
2615
|
+
# Corresponds to the JSON property `databases`
|
2616
|
+
# @return [Array<Google::Apis::SpannerV1::Database>]
|
2617
|
+
attr_accessor :databases
|
2618
|
+
|
2619
|
+
def initialize(**args)
|
2620
|
+
update!(**args)
|
2621
|
+
end
|
2622
|
+
|
2623
|
+
# Update properties of this object
|
2624
|
+
def update!(**args)
|
2625
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2626
|
+
@databases = args[:databases] if args.key?(:databases)
|
2627
|
+
end
|
2628
|
+
end
|
2629
|
+
|
2630
|
+
# Request message for `SetIamPolicy` method.
|
2631
|
+
class SetIamPolicyRequest
|
2632
|
+
include Google::Apis::Core::Hashable
|
2633
|
+
|
2634
|
+
# Defines an Identity and Access Management (IAM) policy. It is used to
|
2635
|
+
# specify access control policies for Cloud Platform resources.
|
2636
|
+
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
2637
|
+
# `members` to a `role`, where the members can be user accounts, Google groups,
|
2638
|
+
# Google domains, and service accounts. A `role` is a named list of permissions
|
2639
|
+
# defined by IAM.
|
2640
|
+
# **Example**
|
2641
|
+
# `
|
2642
|
+
# "bindings": [
|
2643
|
+
# `
|
2644
|
+
# "role": "roles/owner",
|
2645
|
+
# "members": [
|
2646
|
+
# "user:mike@example.com",
|
2647
|
+
# "group:admins@example.com",
|
2648
|
+
# "domain:google.com",
|
2649
|
+
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
2650
|
+
# ]
|
2651
|
+
# `,
|
2652
|
+
# `
|
2653
|
+
# "role": "roles/viewer",
|
2654
|
+
# "members": ["user:sean@example.com"]
|
2655
|
+
# `
|
2656
|
+
# ]
|
2657
|
+
# `
|
2658
|
+
# For a description of IAM and its features, see the
|
2659
|
+
# [IAM developer's guide](https://cloud.google.com/iam).
|
2660
|
+
# Corresponds to the JSON property `policy`
|
2661
|
+
# @return [Google::Apis::SpannerV1::Policy]
|
2662
|
+
attr_accessor :policy
|
2663
|
+
|
2664
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
2665
|
+
# the fields in the mask will be modified. If no mask is provided, a default
|
2666
|
+
# mask is used:
|
2667
|
+
# paths: "bindings, etag"
|
2668
|
+
# This field is only used by Cloud IAM.
|
2669
|
+
# Corresponds to the JSON property `updateMask`
|
2670
|
+
# @return [String]
|
2671
|
+
attr_accessor :update_mask
|
2672
|
+
|
2673
|
+
def initialize(**args)
|
2674
|
+
update!(**args)
|
2675
|
+
end
|
2676
|
+
|
2677
|
+
# Update properties of this object
|
2678
|
+
def update!(**args)
|
2679
|
+
@policy = args[:policy] if args.key?(:policy)
|
2680
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
2681
|
+
end
|
2682
|
+
end
|
2683
|
+
|
2684
|
+
# An isolated set of Cloud Spanner resources on which databases can be hosted.
|
2685
|
+
class Instance
|
2686
|
+
include Google::Apis::Core::Hashable
|
2687
|
+
|
2688
|
+
# Required. The number of nodes allocated to this instance.
|
2689
|
+
# Corresponds to the JSON property `nodeCount`
|
2690
|
+
# @return [Fixnum]
|
2691
|
+
attr_accessor :node_count
|
2692
|
+
|
2693
|
+
# Cloud Labels are a flexible and lightweight mechanism for organizing cloud
|
2694
|
+
# resources into groups that reflect a customer's organizational needs and
|
2695
|
+
# deployment strategies. Cloud Labels can be used to filter collections of
|
2696
|
+
# resources. They can be used to control how resource metrics are aggregated.
|
2697
|
+
# And they can be used as arguments to policy management rules (e.g. route,
|
2698
|
+
# firewall, load balancing, etc.).
|
2699
|
+
# * Label keys must be between 1 and 63 characters long and must conform to
|
2700
|
+
# the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
|
2701
|
+
# * Label values must be between 0 and 63 characters long and must conform
|
2702
|
+
# to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
|
2703
|
+
# * No more than 64 labels can be associated with a given resource.
|
2704
|
+
# See https://goo.gl/xmQnxf for more information on and examples of labels.
|
2705
|
+
# If you plan to use labels in your own code, please note that additional
|
2706
|
+
# characters may be allowed in the future. And so you are advised to use an
|
2707
|
+
# internal label representation, such as JSON, which doesn't rely upon
|
2708
|
+
# specific characters being disallowed. For example, representing labels
|
2709
|
+
# as the string: name + "_" + value would prove problematic if we were to
|
2710
|
+
# allow "_" in a future release.
|
2711
|
+
# Corresponds to the JSON property `labels`
|
2712
|
+
# @return [Hash<String,String>]
|
2713
|
+
attr_accessor :labels
|
2714
|
+
|
2715
|
+
# Required. The name of the instance's configuration. Values are of the form
|
2716
|
+
# `projects/<project>/instanceConfigs/<configuration>`. See
|
2717
|
+
# also InstanceConfig and
|
2718
|
+
# ListInstanceConfigs.
|
2719
|
+
# Corresponds to the JSON property `config`
|
2720
|
+
# @return [String]
|
2721
|
+
attr_accessor :config
|
2722
|
+
|
2723
|
+
# Output only. The current instance state. For
|
2724
|
+
# CreateInstance, the state must be
|
2725
|
+
# either omitted or set to `CREATING`. For
|
2726
|
+
# UpdateInstance, the state must be
|
2727
|
+
# either omitted or set to `READY`.
|
2728
|
+
# Corresponds to the JSON property `state`
|
2729
|
+
# @return [String]
|
2730
|
+
attr_accessor :state
|
2731
|
+
|
2732
|
+
# Required. A unique identifier for the instance, which cannot be changed
|
2733
|
+
# after the instance is created. Values are of the form
|
2734
|
+
# `projects/<project>/instances/a-z*[a-z0-9]`. The final
|
2735
|
+
# segment of the name must be between 6 and 30 characters in length.
|
2736
|
+
# Corresponds to the JSON property `name`
|
2737
|
+
# @return [String]
|
2738
|
+
attr_accessor :name
|
2739
|
+
|
2740
|
+
# Required. The descriptive name for this instance as it appears in UIs.
|
2741
|
+
# Must be unique per project and between 4 and 30 characters in length.
|
2742
|
+
# Corresponds to the JSON property `displayName`
|
2743
|
+
# @return [String]
|
2744
|
+
attr_accessor :display_name
|
2745
|
+
|
2746
|
+
def initialize(**args)
|
2747
|
+
update!(**args)
|
2748
|
+
end
|
2749
|
+
|
2750
|
+
# Update properties of this object
|
2751
|
+
def update!(**args)
|
2752
|
+
@node_count = args[:node_count] if args.key?(:node_count)
|
2753
|
+
@labels = args[:labels] if args.key?(:labels)
|
2754
|
+
@config = args[:config] if args.key?(:config)
|
2755
|
+
@state = args[:state] if args.key?(:state)
|
2756
|
+
@name = args[:name] if args.key?(:name)
|
2757
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
2758
|
+
end
|
2759
|
+
end
|
2760
|
+
|
2761
|
+
# The request for Rollback.
|
2762
|
+
class RollbackRequest
|
2763
|
+
include Google::Apis::Core::Hashable
|
2764
|
+
|
2765
|
+
# Required. The transaction to roll back.
|
2766
|
+
# Corresponds to the JSON property `transactionId`
|
2767
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2768
|
+
# @return [String]
|
2769
|
+
attr_accessor :transaction_id
|
2770
|
+
|
2771
|
+
def initialize(**args)
|
2772
|
+
update!(**args)
|
2773
|
+
end
|
2774
|
+
|
2775
|
+
# Update properties of this object
|
2776
|
+
def update!(**args)
|
2777
|
+
@transaction_id = args[:transaction_id] if args.key?(:transaction_id)
|
2778
|
+
end
|
2779
|
+
end
|
2780
|
+
|
2781
|
+
# A transaction.
|
2782
|
+
class Transaction
|
2783
|
+
include Google::Apis::Core::Hashable
|
2784
|
+
|
2785
|
+
# For snapshot read-only transactions, the read timestamp chosen
|
2786
|
+
# for the transaction. Not returned by default: see
|
2787
|
+
# TransactionOptions.ReadOnly.return_read_timestamp.
|
2788
|
+
# Corresponds to the JSON property `readTimestamp`
|
2789
|
+
# @return [String]
|
2790
|
+
attr_accessor :read_timestamp
|
2791
|
+
|
2792
|
+
# `id` may be used to identify the transaction in subsequent
|
2793
|
+
# Read,
|
2794
|
+
# ExecuteSql,
|
2795
|
+
# Commit, or
|
2796
|
+
# Rollback calls.
|
2797
|
+
# Single-use read-only transactions do not have IDs, because
|
2798
|
+
# single-use transactions do not support multiple requests.
|
2799
|
+
# Corresponds to the JSON property `id`
|
2800
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2801
|
+
# @return [String]
|
2802
|
+
attr_accessor :id
|
2803
|
+
|
2804
|
+
def initialize(**args)
|
2805
|
+
update!(**args)
|
2806
|
+
end
|
2807
|
+
|
2808
|
+
# Update properties of this object
|
2809
|
+
def update!(**args)
|
2810
|
+
@read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp)
|
2811
|
+
@id = args[:id] if args.key?(:id)
|
2812
|
+
end
|
2813
|
+
end
|
2814
|
+
|
2815
|
+
# Metadata type for the operation returned by
|
2816
|
+
# UpdateDatabaseDdl.
|
2817
|
+
class UpdateDatabaseDdlMetadata
|
2818
|
+
include Google::Apis::Core::Hashable
|
2819
|
+
|
2820
|
+
# The database being modified.
|
2821
|
+
# Corresponds to the JSON property `database`
|
2822
|
+
# @return [String]
|
2823
|
+
attr_accessor :database
|
2824
|
+
|
2825
|
+
# For an update this list contains all the statements. For an
|
2826
|
+
# individual statement, this list contains only that statement.
|
2827
|
+
# Corresponds to the JSON property `statements`
|
2828
|
+
# @return [Array<String>]
|
2829
|
+
attr_accessor :statements
|
2830
|
+
|
2831
|
+
# Reports the commit timestamps of all statements that have
|
2832
|
+
# succeeded so far, where `commit_timestamps[i]` is the commit
|
2833
|
+
# timestamp for the statement `statements[i]`.
|
2834
|
+
# Corresponds to the JSON property `commitTimestamps`
|
2835
|
+
# @return [Array<String>]
|
2836
|
+
attr_accessor :commit_timestamps
|
2837
|
+
|
2838
|
+
def initialize(**args)
|
2839
|
+
update!(**args)
|
2840
|
+
end
|
2841
|
+
|
2842
|
+
# Update properties of this object
|
2843
|
+
def update!(**args)
|
2844
|
+
@database = args[:database] if args.key?(:database)
|
2845
|
+
@statements = args[:statements] if args.key?(:statements)
|
2846
|
+
@commit_timestamps = args[:commit_timestamps] if args.key?(:commit_timestamps)
|
2847
|
+
end
|
2848
|
+
end
|
2849
|
+
|
2850
|
+
# Options for counters
|
2851
|
+
class CounterOptions
|
2852
|
+
include Google::Apis::Core::Hashable
|
2853
|
+
|
2854
|
+
# The metric to update.
|
2855
|
+
# Corresponds to the JSON property `metric`
|
2856
|
+
# @return [String]
|
2857
|
+
attr_accessor :metric
|
2858
|
+
|
2859
|
+
# The field value to attribute.
|
2860
|
+
# Corresponds to the JSON property `field`
|
2861
|
+
# @return [String]
|
2862
|
+
attr_accessor :field
|
2863
|
+
|
2864
|
+
def initialize(**args)
|
2865
|
+
update!(**args)
|
2866
|
+
end
|
2867
|
+
|
2868
|
+
# Update properties of this object
|
2869
|
+
def update!(**args)
|
2870
|
+
@metric = args[:metric] if args.key?(:metric)
|
2871
|
+
@field = args[:field] if args.key?(:field)
|
2872
|
+
end
|
2873
|
+
end
|
2874
|
+
|
2875
|
+
# Contains an ordered list of nodes appearing in the query plan.
|
2876
|
+
class QueryPlan
|
2877
|
+
include Google::Apis::Core::Hashable
|
2878
|
+
|
2879
|
+
# The nodes in the query plan. Plan nodes are returned in pre-order starting
|
2880
|
+
# with the plan root. Each PlanNode's `id` corresponds to its index in
|
2881
|
+
# `plan_nodes`.
|
2882
|
+
# Corresponds to the JSON property `planNodes`
|
2883
|
+
# @return [Array<Google::Apis::SpannerV1::PlanNode>]
|
2884
|
+
attr_accessor :plan_nodes
|
2885
|
+
|
2886
|
+
def initialize(**args)
|
2887
|
+
update!(**args)
|
2888
|
+
end
|
2889
|
+
|
2890
|
+
# Update properties of this object
|
2891
|
+
def update!(**args)
|
2892
|
+
@plan_nodes = args[:plan_nodes] if args.key?(:plan_nodes)
|
2893
|
+
end
|
2894
|
+
end
|
2895
|
+
|
2896
|
+
# `StructType` defines the fields of a STRUCT type.
|
2897
|
+
class StructType
|
2898
|
+
include Google::Apis::Core::Hashable
|
2899
|
+
|
2900
|
+
# The list of fields that make up this struct. Order is
|
2901
|
+
# significant, because values of this struct type are represented as
|
2902
|
+
# lists, where the order of field values matches the order of
|
2903
|
+
# fields in the StructType. In turn, the order of fields
|
2904
|
+
# matches the order of columns in a read request, or the order of
|
2905
|
+
# fields in the `SELECT` clause of a query.
|
2906
|
+
# Corresponds to the JSON property `fields`
|
2907
|
+
# @return [Array<Google::Apis::SpannerV1::Field>]
|
2908
|
+
attr_accessor :fields
|
2909
|
+
|
2910
|
+
def initialize(**args)
|
2911
|
+
update!(**args)
|
2912
|
+
end
|
2913
|
+
|
2914
|
+
# Update properties of this object
|
2915
|
+
def update!(**args)
|
2916
|
+
@fields = args[:fields] if args.key?(:fields)
|
2917
|
+
end
|
2918
|
+
end
|
2919
|
+
|
2920
|
+
# Message representing a single field of a struct.
|
2921
|
+
class Field
|
2922
|
+
include Google::Apis::Core::Hashable
|
2923
|
+
|
2924
|
+
# The name of the field. For reads, this is the column name. For
|
2925
|
+
# SQL queries, it is the column alias (e.g., `"Word"` in the
|
2926
|
+
# query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
|
2927
|
+
# `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
|
2928
|
+
# columns might have an empty name (e.g., !"SELECT
|
2929
|
+
# UPPER(ColName)"`). Note that a query result can contain
|
2930
|
+
# multiple fields with the same name.
|
2931
|
+
# Corresponds to the JSON property `name`
|
2932
|
+
# @return [String]
|
2933
|
+
attr_accessor :name
|
2934
|
+
|
2935
|
+
# `Type` indicates the type of a Cloud Spanner value, as might be stored in a
|
2936
|
+
# table cell or returned from an SQL query.
|
2937
|
+
# Corresponds to the JSON property `type`
|
2938
|
+
# @return [Google::Apis::SpannerV1::Type]
|
2939
|
+
attr_accessor :type
|
2940
|
+
|
2941
|
+
def initialize(**args)
|
2942
|
+
update!(**args)
|
2943
|
+
end
|
2944
|
+
|
2945
|
+
# Update properties of this object
|
2946
|
+
def update!(**args)
|
2947
|
+
@name = args[:name] if args.key?(:name)
|
2948
|
+
@type = args[:type] if args.key?(:type)
|
2949
|
+
end
|
2950
|
+
end
|
2951
|
+
|
2952
|
+
# Request message for `TestIamPermissions` method.
|
2953
|
+
class TestIamPermissionsRequest
|
2954
|
+
include Google::Apis::Core::Hashable
|
2955
|
+
|
2956
|
+
# REQUIRED: The set of permissions to check for 'resource'.
|
2957
|
+
# Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*')
|
2958
|
+
# are not allowed.
|
2959
|
+
# Corresponds to the JSON property `permissions`
|
2960
|
+
# @return [Array<String>]
|
2961
|
+
attr_accessor :permissions
|
2962
|
+
|
2963
|
+
def initialize(**args)
|
2964
|
+
update!(**args)
|
2965
|
+
end
|
2966
|
+
|
2967
|
+
# Update properties of this object
|
2968
|
+
def update!(**args)
|
2969
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
2970
|
+
end
|
2971
|
+
end
|
2972
|
+
|
2973
|
+
# Additional statistics about a ResultSet or PartialResultSet.
|
2974
|
+
class ResultSetStats
|
2975
|
+
include Google::Apis::Core::Hashable
|
2976
|
+
|
2977
|
+
# Contains an ordered list of nodes appearing in the query plan.
|
2978
|
+
# Corresponds to the JSON property `queryPlan`
|
2979
|
+
# @return [Google::Apis::SpannerV1::QueryPlan]
|
2980
|
+
attr_accessor :query_plan
|
2981
|
+
|
2982
|
+
# Aggregated statistics from the execution of the query. Only present when
|
2983
|
+
# the query is profiled. For example, a query could return the statistics as
|
2984
|
+
# follows:
|
2985
|
+
# `
|
2986
|
+
# "rows_returned": "3",
|
2987
|
+
# "elapsed_time": "1.22 secs",
|
2988
|
+
# "cpu_time": "1.19 secs"
|
2989
|
+
# `
|
2990
|
+
# Corresponds to the JSON property `queryStats`
|
2991
|
+
# @return [Hash<String,Object>]
|
2992
|
+
attr_accessor :query_stats
|
2993
|
+
|
2994
|
+
def initialize(**args)
|
2995
|
+
update!(**args)
|
2996
|
+
end
|
2997
|
+
|
2998
|
+
# Update properties of this object
|
2999
|
+
def update!(**args)
|
3000
|
+
@query_plan = args[:query_plan] if args.key?(:query_plan)
|
3001
|
+
@query_stats = args[:query_stats] if args.key?(:query_stats)
|
3002
|
+
end
|
3003
|
+
end
|
3004
|
+
|
3005
|
+
# The response for Commit.
|
3006
|
+
class CommitResponse
|
3007
|
+
include Google::Apis::Core::Hashable
|
3008
|
+
|
3009
|
+
# The Cloud Spanner timestamp at which the transaction committed.
|
3010
|
+
# Corresponds to the JSON property `commitTimestamp`
|
3011
|
+
# @return [String]
|
3012
|
+
attr_accessor :commit_timestamp
|
3013
|
+
|
3014
|
+
def initialize(**args)
|
3015
|
+
update!(**args)
|
3016
|
+
end
|
3017
|
+
|
3018
|
+
# Update properties of this object
|
3019
|
+
def update!(**args)
|
3020
|
+
@commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
|
3021
|
+
end
|
3022
|
+
end
|
3023
|
+
|
3024
|
+
# `Type` indicates the type of a Cloud Spanner value, as might be stored in a
|
3025
|
+
# table cell or returned from an SQL query.
|
3026
|
+
class Type
|
3027
|
+
include Google::Apis::Core::Hashable
|
3028
|
+
|
3029
|
+
# `StructType` defines the fields of a STRUCT type.
|
3030
|
+
# Corresponds to the JSON property `structType`
|
3031
|
+
# @return [Google::Apis::SpannerV1::StructType]
|
3032
|
+
attr_accessor :struct_type
|
3033
|
+
|
3034
|
+
# `Type` indicates the type of a Cloud Spanner value, as might be stored in a
|
3035
|
+
# table cell or returned from an SQL query.
|
3036
|
+
# Corresponds to the JSON property `arrayElementType`
|
3037
|
+
# @return [Google::Apis::SpannerV1::Type]
|
3038
|
+
attr_accessor :array_element_type
|
3039
|
+
|
3040
|
+
# Required. The TypeCode for this type.
|
3041
|
+
# Corresponds to the JSON property `code`
|
3042
|
+
# @return [String]
|
3043
|
+
attr_accessor :code
|
3044
|
+
|
3045
|
+
def initialize(**args)
|
3046
|
+
update!(**args)
|
3047
|
+
end
|
3048
|
+
|
3049
|
+
# Update properties of this object
|
3050
|
+
def update!(**args)
|
3051
|
+
@struct_type = args[:struct_type] if args.key?(:struct_type)
|
3052
|
+
@array_element_type = args[:array_element_type] if args.key?(:array_element_type)
|
3053
|
+
@code = args[:code] if args.key?(:code)
|
3054
|
+
end
|
3055
|
+
end
|
3056
|
+
|
3057
|
+
# Node information for nodes appearing in a QueryPlan.plan_nodes.
|
3058
|
+
class PlanNode
|
3059
|
+
include Google::Apis::Core::Hashable
|
3060
|
+
|
3061
|
+
# Attributes relevant to the node contained in a group of key-value pairs.
|
3062
|
+
# For example, a Parameter Reference node could have the following
|
3063
|
+
# information in its metadata:
|
3064
|
+
# `
|
3065
|
+
# "parameter_reference": "param1",
|
3066
|
+
# "parameter_type": "array"
|
3067
|
+
# `
|
3068
|
+
# Corresponds to the JSON property `metadata`
|
3069
|
+
# @return [Hash<String,Object>]
|
3070
|
+
attr_accessor :metadata
|
3071
|
+
|
3072
|
+
# The execution statistics associated with the node, contained in a group of
|
3073
|
+
# key-value pairs. Only present if the plan was returned as a result of a
|
3074
|
+
# profile query. For example, number of executions, number of rows/time per
|
3075
|
+
# execution etc.
|
3076
|
+
# Corresponds to the JSON property `executionStats`
|
3077
|
+
# @return [Hash<String,Object>]
|
3078
|
+
attr_accessor :execution_stats
|
3079
|
+
|
3080
|
+
# Condensed representation of a node and its subtree. Only present for
|
3081
|
+
# `SCALAR` PlanNode(s).
|
3082
|
+
# Corresponds to the JSON property `shortRepresentation`
|
3083
|
+
# @return [Google::Apis::SpannerV1::ShortRepresentation]
|
3084
|
+
attr_accessor :short_representation
|
3085
|
+
|
3086
|
+
# The `PlanNode`'s index in node list.
|
3087
|
+
# Corresponds to the JSON property `index`
|
3088
|
+
# @return [Fixnum]
|
3089
|
+
attr_accessor :index
|
3090
|
+
|
3091
|
+
# The display name for the node.
|
3092
|
+
# Corresponds to the JSON property `displayName`
|
3093
|
+
# @return [String]
|
3094
|
+
attr_accessor :display_name
|
3095
|
+
|
3096
|
+
# Used to determine the type of node. May be needed for visualizing
|
3097
|
+
# different kinds of nodes differently. For example, If the node is a
|
3098
|
+
# SCALAR node, it will have a condensed representation
|
3099
|
+
# which can be used to directly embed a description of the node in its
|
3100
|
+
# parent.
|
3101
|
+
# Corresponds to the JSON property `kind`
|
3102
|
+
# @return [String]
|
3103
|
+
attr_accessor :kind
|
3104
|
+
|
3105
|
+
# List of child node `index`es and their relationship to this parent.
|
3106
|
+
# Corresponds to the JSON property `childLinks`
|
3107
|
+
# @return [Array<Google::Apis::SpannerV1::ChildLink>]
|
3108
|
+
attr_accessor :child_links
|
3109
|
+
|
3110
|
+
def initialize(**args)
|
3111
|
+
update!(**args)
|
3112
|
+
end
|
3113
|
+
|
3114
|
+
# Update properties of this object
|
3115
|
+
def update!(**args)
|
3116
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
3117
|
+
@execution_stats = args[:execution_stats] if args.key?(:execution_stats)
|
3118
|
+
@short_representation = args[:short_representation] if args.key?(:short_representation)
|
3119
|
+
@index = args[:index] if args.key?(:index)
|
3120
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
3121
|
+
@kind = args[:kind] if args.key?(:kind)
|
3122
|
+
@child_links = args[:child_links] if args.key?(:child_links)
|
3123
|
+
end
|
3124
|
+
end
|
3125
|
+
|
3126
|
+
# Specifies the audit configuration for a service.
|
3127
|
+
# It consists of which permission types are logged, and what identities, if
|
3128
|
+
# any, are exempted from logging.
|
3129
|
+
# An AuditConifg must have one or more AuditLogConfigs.
|
3130
|
+
class AuditConfig
|
3131
|
+
include Google::Apis::Core::Hashable
|
3132
|
+
|
3133
|
+
# Specifies the identities that are exempted from "data access" audit
|
3134
|
+
# logging for the `service` specified above.
|
3135
|
+
# Follows the same format of Binding.members.
|
3136
|
+
# This field is deprecated in favor of per-permission-type exemptions.
|
3137
|
+
# Corresponds to the JSON property `exemptedMembers`
|
3138
|
+
# @return [Array<String>]
|
3139
|
+
attr_accessor :exempted_members
|
3140
|
+
|
3141
|
+
# Specifies a service that will be enabled for audit logging.
|
3142
|
+
# For example, `resourcemanager`, `storage`, `compute`.
|
3143
|
+
# `allServices` is a special value that covers all services.
|
3144
|
+
# Corresponds to the JSON property `service`
|
3145
|
+
# @return [String]
|
3146
|
+
attr_accessor :service
|
3147
|
+
|
3148
|
+
# The configuration for logging of each type of permission.
|
3149
|
+
# Next ID: 4
|
3150
|
+
# Corresponds to the JSON property `auditLogConfigs`
|
3151
|
+
# @return [Array<Google::Apis::SpannerV1::AuditLogConfig>]
|
3152
|
+
attr_accessor :audit_log_configs
|
3153
|
+
|
3154
|
+
def initialize(**args)
|
3155
|
+
update!(**args)
|
3156
|
+
end
|
3157
|
+
|
3158
|
+
# Update properties of this object
|
3159
|
+
def update!(**args)
|
3160
|
+
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
3161
|
+
@service = args[:service] if args.key?(:service)
|
3162
|
+
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
3163
|
+
end
|
3164
|
+
end
|
3165
|
+
|
3166
|
+
# Metadata type for the operation returned by
|
3167
|
+
# CreateInstance.
|
3168
|
+
class CreateInstanceMetadata
|
3169
|
+
include Google::Apis::Core::Hashable
|
3170
|
+
|
3171
|
+
# The time at which this operation was cancelled. If set, this operation is
|
3172
|
+
# in the process of undoing itself (which is guaranteed to succeed) and
|
3173
|
+
# cannot be cancelled again.
|
3174
|
+
# Corresponds to the JSON property `cancelTime`
|
3175
|
+
# @return [String]
|
3176
|
+
attr_accessor :cancel_time
|
3177
|
+
|
3178
|
+
# The time at which this operation failed or was completed successfully.
|
3179
|
+
# Corresponds to the JSON property `endTime`
|
3180
|
+
# @return [String]
|
3181
|
+
attr_accessor :end_time
|
3182
|
+
|
3183
|
+
# An isolated set of Cloud Spanner resources on which databases can be hosted.
|
3184
|
+
# Corresponds to the JSON property `instance`
|
3185
|
+
# @return [Google::Apis::SpannerV1::Instance]
|
3186
|
+
attr_accessor :instance
|
3187
|
+
|
3188
|
+
# The time at which the
|
3189
|
+
# CreateInstance request was
|
3190
|
+
# received.
|
3191
|
+
# Corresponds to the JSON property `startTime`
|
3192
|
+
# @return [String]
|
3193
|
+
attr_accessor :start_time
|
3194
|
+
|
3195
|
+
def initialize(**args)
|
3196
|
+
update!(**args)
|
3197
|
+
end
|
3198
|
+
|
3199
|
+
# Update properties of this object
|
3200
|
+
def update!(**args)
|
3201
|
+
@cancel_time = args[:cancel_time] if args.key?(:cancel_time)
|
3202
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
3203
|
+
@instance = args[:instance] if args.key?(:instance)
|
3204
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
3205
|
+
end
|
3206
|
+
end
|
3207
|
+
|
3208
|
+
# Metadata associated with a parent-child relationship appearing in a
|
3209
|
+
# PlanNode.
|
3210
|
+
class ChildLink
|
3211
|
+
include Google::Apis::Core::Hashable
|
3212
|
+
|
3213
|
+
# The node to which the link points.
|
3214
|
+
# Corresponds to the JSON property `childIndex`
|
3215
|
+
# @return [Fixnum]
|
3216
|
+
attr_accessor :child_index
|
3217
|
+
|
3218
|
+
# Only present if the child node is SCALAR and corresponds
|
3219
|
+
# to an output variable of the parent node. The field carries the name of
|
3220
|
+
# the output variable.
|
3221
|
+
# For example, a `TableScan` operator that reads rows from a table will
|
3222
|
+
# have child links to the `SCALAR` nodes representing the output variables
|
3223
|
+
# created for each column that is read by the operator. The corresponding
|
3224
|
+
# `variable` fields will be set to the variable names assigned to the
|
3225
|
+
# columns.
|
3226
|
+
# Corresponds to the JSON property `variable`
|
3227
|
+
# @return [String]
|
3228
|
+
attr_accessor :variable
|
3229
|
+
|
3230
|
+
# The type of the link. For example, in Hash Joins this could be used to
|
3231
|
+
# distinguish between the build child and the probe child, or in the case
|
3232
|
+
# of the child being an output variable, to represent the tag associated
|
3233
|
+
# with the output variable.
|
3234
|
+
# Corresponds to the JSON property `type`
|
3235
|
+
# @return [String]
|
3236
|
+
attr_accessor :type
|
3237
|
+
|
3238
|
+
def initialize(**args)
|
3239
|
+
update!(**args)
|
3240
|
+
end
|
3241
|
+
|
3242
|
+
# Update properties of this object
|
3243
|
+
def update!(**args)
|
3244
|
+
@child_index = args[:child_index] if args.key?(:child_index)
|
3245
|
+
@variable = args[:variable] if args.key?(:variable)
|
3246
|
+
@type = args[:type] if args.key?(:type)
|
3247
|
+
end
|
3248
|
+
end
|
3249
|
+
|
3250
|
+
# Write a Cloud Audit log
|
3251
|
+
class CloudAuditOptions
|
3252
|
+
include Google::Apis::Core::Hashable
|
3253
|
+
|
3254
|
+
def initialize(**args)
|
3255
|
+
update!(**args)
|
3256
|
+
end
|
3257
|
+
|
3258
|
+
# Update properties of this object
|
3259
|
+
def update!(**args)
|
3260
|
+
end
|
3261
|
+
end
|
3262
|
+
|
3263
|
+
# Arguments to delete operations.
|
3264
|
+
class Delete
|
3265
|
+
include Google::Apis::Core::Hashable
|
3266
|
+
|
3267
|
+
# Required. The table whose rows will be deleted.
|
3268
|
+
# Corresponds to the JSON property `table`
|
3269
|
+
# @return [String]
|
3270
|
+
attr_accessor :table
|
3271
|
+
|
3272
|
+
# `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
|
3273
|
+
# the keys are expected to be in the same table or index. The keys need
|
3274
|
+
# not be sorted in any particular way.
|
3275
|
+
# If the same key is specified multiple times in the set (for example
|
3276
|
+
# if two ranges, two keys, or a key and a range overlap), Cloud Spanner
|
3277
|
+
# behaves as if the key were only specified once.
|
3278
|
+
# Corresponds to the JSON property `keySet`
|
3279
|
+
# @return [Google::Apis::SpannerV1::KeySet]
|
3280
|
+
attr_accessor :key_set
|
3281
|
+
|
3282
|
+
def initialize(**args)
|
3283
|
+
update!(**args)
|
3284
|
+
end
|
3285
|
+
|
3286
|
+
# Update properties of this object
|
3287
|
+
def update!(**args)
|
3288
|
+
@table = args[:table] if args.key?(:table)
|
3289
|
+
@key_set = args[:key_set] if args.key?(:key_set)
|
3290
|
+
end
|
3291
|
+
end
|
3292
|
+
end
|
3293
|
+
end
|
3294
|
+
end
|