google-cloud-spanner-v1 0.3.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -63,7 +63,7 @@ module Google
63
63
  parent_config = while namespace.any?
64
64
  parent_name = namespace.join "::"
65
65
  parent_const = const_get parent_name
66
- break parent_const.configure if parent_const&.respond_to? :configure
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
67
  namespace.pop
68
68
  end
69
69
  default_config = Client::Configuration.new parent_config
@@ -71,49 +71,49 @@ module Google
71
71
  default_config.rpcs.create_session.timeout = 30.0
72
72
  default_config.rpcs.create_session.retry_policy = {
73
73
  initial_delay: 0.25,
74
- max_delay: 32.0,
75
- multiplier: 1.3,
76
- retry_codes: [14]
74
+ max_delay: 32.0,
75
+ multiplier: 1.3,
76
+ retry_codes: [14]
77
77
  }
78
78
 
79
79
  default_config.rpcs.batch_create_sessions.timeout = 60.0
80
80
  default_config.rpcs.batch_create_sessions.retry_policy = {
81
81
  initial_delay: 0.25,
82
- max_delay: 32.0,
83
- multiplier: 1.3,
84
- retry_codes: [14]
82
+ max_delay: 32.0,
83
+ multiplier: 1.3,
84
+ retry_codes: [14]
85
85
  }
86
86
 
87
87
  default_config.rpcs.get_session.timeout = 30.0
88
88
  default_config.rpcs.get_session.retry_policy = {
89
89
  initial_delay: 0.25,
90
- max_delay: 32.0,
91
- multiplier: 1.3,
92
- retry_codes: [14]
90
+ max_delay: 32.0,
91
+ multiplier: 1.3,
92
+ retry_codes: [14]
93
93
  }
94
94
 
95
95
  default_config.rpcs.list_sessions.timeout = 3600.0
96
96
  default_config.rpcs.list_sessions.retry_policy = {
97
97
  initial_delay: 0.25,
98
- max_delay: 32.0,
99
- multiplier: 1.3,
100
- retry_codes: [14]
98
+ max_delay: 32.0,
99
+ multiplier: 1.3,
100
+ retry_codes: [14]
101
101
  }
102
102
 
103
103
  default_config.rpcs.delete_session.timeout = 30.0
104
104
  default_config.rpcs.delete_session.retry_policy = {
105
105
  initial_delay: 0.25,
106
- max_delay: 32.0,
107
- multiplier: 1.3,
108
- retry_codes: [14]
106
+ max_delay: 32.0,
107
+ multiplier: 1.3,
108
+ retry_codes: [14]
109
109
  }
110
110
 
111
111
  default_config.rpcs.execute_sql.timeout = 30.0
112
112
  default_config.rpcs.execute_sql.retry_policy = {
113
113
  initial_delay: 0.25,
114
- max_delay: 32.0,
115
- multiplier: 1.3,
116
- retry_codes: [14]
114
+ max_delay: 32.0,
115
+ multiplier: 1.3,
116
+ retry_codes: [14]
117
117
  }
118
118
 
119
119
  default_config.rpcs.execute_streaming_sql.timeout = 3600.0
@@ -121,17 +121,17 @@ module Google
121
121
  default_config.rpcs.execute_batch_dml.timeout = 30.0
122
122
  default_config.rpcs.execute_batch_dml.retry_policy = {
123
123
  initial_delay: 0.25,
124
- max_delay: 32.0,
125
- multiplier: 1.3,
126
- retry_codes: [14]
124
+ max_delay: 32.0,
125
+ multiplier: 1.3,
126
+ retry_codes: [14]
127
127
  }
128
128
 
129
129
  default_config.rpcs.read.timeout = 30.0
130
130
  default_config.rpcs.read.retry_policy = {
131
131
  initial_delay: 0.25,
132
- max_delay: 32.0,
133
- multiplier: 1.3,
134
- retry_codes: [14]
132
+ max_delay: 32.0,
133
+ multiplier: 1.3,
134
+ retry_codes: [14]
135
135
  }
136
136
 
137
137
  default_config.rpcs.streaming_read.timeout = 3600.0
@@ -139,41 +139,41 @@ module Google
139
139
  default_config.rpcs.begin_transaction.timeout = 30.0
140
140
  default_config.rpcs.begin_transaction.retry_policy = {
141
141
  initial_delay: 0.25,
142
- max_delay: 32.0,
143
- multiplier: 1.3,
144
- retry_codes: [14]
142
+ max_delay: 32.0,
143
+ multiplier: 1.3,
144
+ retry_codes: [14]
145
145
  }
146
146
 
147
147
  default_config.rpcs.commit.timeout = 3600.0
148
148
  default_config.rpcs.commit.retry_policy = {
149
149
  initial_delay: 0.25,
150
- max_delay: 32.0,
151
- multiplier: 1.3,
152
- retry_codes: [14]
150
+ max_delay: 32.0,
151
+ multiplier: 1.3,
152
+ retry_codes: [14]
153
153
  }
154
154
 
155
155
  default_config.rpcs.rollback.timeout = 30.0
156
156
  default_config.rpcs.rollback.retry_policy = {
157
157
  initial_delay: 0.25,
158
- max_delay: 32.0,
159
- multiplier: 1.3,
160
- retry_codes: [14]
158
+ max_delay: 32.0,
159
+ multiplier: 1.3,
160
+ retry_codes: [14]
161
161
  }
162
162
 
163
163
  default_config.rpcs.partition_query.timeout = 30.0
164
164
  default_config.rpcs.partition_query.retry_policy = {
165
165
  initial_delay: 0.25,
166
- max_delay: 32.0,
167
- multiplier: 1.3,
168
- retry_codes: [14]
166
+ max_delay: 32.0,
167
+ multiplier: 1.3,
168
+ retry_codes: [14]
169
169
  }
170
170
 
171
171
  default_config.rpcs.partition_read.timeout = 30.0
172
172
  default_config.rpcs.partition_read.retry_policy = {
173
173
  initial_delay: 0.25,
174
- max_delay: 32.0,
175
- multiplier: 1.3,
176
- retry_codes: [14]
174
+ max_delay: 32.0,
175
+ multiplier: 1.3,
176
+ retry_codes: [14]
177
177
  }
178
178
 
179
179
  default_config
@@ -237,7 +237,13 @@ module Google
237
237
 
238
238
  # Create credentials
239
239
  credentials = @config.credentials
240
- credentials ||= Credentials.default scope: @config.scope
240
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
241
+ # but only if the default endpoint does not have a region prefix.
242
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
243
+ @config.endpoint == Client.configure.endpoint &&
244
+ !@config.endpoint.split(".").first.include?("-")
245
+ credentials ||= Credentials.default scope: @config.scope,
246
+ enable_self_signed_jwt: enable_self_signed_jwt
241
247
  if credentials.is_a?(String) || credentials.is_a?(Hash)
242
248
  credentials = Credentials.new credentials, scope: @config.scope
243
249
  end
@@ -662,7 +668,7 @@ module Google
662
668
  # @param options [::Gapic::CallOptions, ::Hash]
663
669
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
664
670
  #
665
- # @overload execute_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil)
671
+ # @overload execute_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil)
666
672
  # Pass arguments to `execute_sql` via keyword arguments. Note that at
667
673
  # least one keyword argument is required. To specify no parameters, or to keep all
668
674
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -734,6 +740,8 @@ module Google
734
740
  # Required for DML statements. Ignored for queries.
735
741
  # @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash]
736
742
  # Query optimizer configuration to use for the given query.
743
+ # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
744
+ # Common options for this request.
737
745
  #
738
746
  # @yield [response, operation] Access the result along with the RPC operation
739
747
  # @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet]
@@ -797,7 +805,7 @@ module Google
797
805
  # @param options [::Gapic::CallOptions, ::Hash]
798
806
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
799
807
  #
800
- # @overload execute_streaming_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil)
808
+ # @overload execute_streaming_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil)
801
809
  # Pass arguments to `execute_streaming_sql` via keyword arguments. Note that at
802
810
  # least one keyword argument is required. To specify no parameters, or to keep all
803
811
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -869,6 +877,8 @@ module Google
869
877
  # Required for DML statements. Ignored for queries.
870
878
  # @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash]
871
879
  # Query optimizer configuration to use for the given query.
880
+ # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
881
+ # Common options for this request.
872
882
  #
873
883
  # @yield [response, operation] Access the result along with the RPC operation
874
884
  # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>]
@@ -938,7 +948,7 @@ module Google
938
948
  # @param options [::Gapic::CallOptions, ::Hash]
939
949
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
940
950
  #
941
- # @overload execute_batch_dml(session: nil, transaction: nil, statements: nil, seqno: nil)
951
+ # @overload execute_batch_dml(session: nil, transaction: nil, statements: nil, seqno: nil, request_options: nil)
942
952
  # Pass arguments to `execute_batch_dml` via keyword arguments. Note that at
943
953
  # least one keyword argument is required. To specify no parameters, or to keep all
944
954
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -967,6 +977,8 @@ module Google
967
977
  # transaction. If a request arrives for the first time with an out-of-order
968
978
  # sequence number, the transaction may be aborted. Replays of previously
969
979
  # handled requests will yield the same response as the first execution.
980
+ # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
981
+ # Common options for this request.
970
982
  #
971
983
  # @yield [response, operation] Access the result along with the RPC operation
972
984
  # @yieldparam response [::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse]
@@ -1038,7 +1050,7 @@ module Google
1038
1050
  # @param options [::Gapic::CallOptions, ::Hash]
1039
1051
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1040
1052
  #
1041
- # @overload read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil)
1053
+ # @overload read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil)
1042
1054
  # Pass arguments to `read` via keyword arguments. Note that at
1043
1055
  # least one keyword argument is required. To specify no parameters, or to keep all
1044
1056
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1086,6 +1098,8 @@ module Google
1086
1098
  # previously created using PartitionRead(). There must be an exact
1087
1099
  # match for the values of fields common to this message and the
1088
1100
  # PartitionReadRequest message used to create this partition_token.
1101
+ # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
1102
+ # Common options for this request.
1089
1103
  #
1090
1104
  # @yield [response, operation] Access the result along with the RPC operation
1091
1105
  # @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet]
@@ -1149,7 +1163,7 @@ module Google
1149
1163
  # @param options [::Gapic::CallOptions, ::Hash]
1150
1164
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1151
1165
  #
1152
- # @overload streaming_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil)
1166
+ # @overload streaming_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil)
1153
1167
  # Pass arguments to `streaming_read` via keyword arguments. Note that at
1154
1168
  # least one keyword argument is required. To specify no parameters, or to keep all
1155
1169
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1197,6 +1211,8 @@ module Google
1197
1211
  # previously created using PartitionRead(). There must be an exact
1198
1212
  # match for the values of fields common to this message and the
1199
1213
  # PartitionReadRequest message used to create this partition_token.
1214
+ # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
1215
+ # Common options for this request.
1200
1216
  #
1201
1217
  # @yield [response, operation] Access the result along with the RPC operation
1202
1218
  # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>]
@@ -1259,7 +1275,7 @@ module Google
1259
1275
  # @param options [::Gapic::CallOptions, ::Hash]
1260
1276
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1261
1277
  #
1262
- # @overload begin_transaction(session: nil, options: nil)
1278
+ # @overload begin_transaction(session: nil, options: nil, request_options: nil)
1263
1279
  # Pass arguments to `begin_transaction` via keyword arguments. Note that at
1264
1280
  # least one keyword argument is required. To specify no parameters, or to keep all
1265
1281
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1268,6 +1284,12 @@ module Google
1268
1284
  # Required. The session in which the transaction runs.
1269
1285
  # @param options [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash]
1270
1286
  # Required. Options for the new transaction.
1287
+ # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
1288
+ # Common options for this request.
1289
+ # Priority is ignored for this request. Setting the priority in this
1290
+ # request_options struct will not do anything. To set the priority for a
1291
+ # transaction, set it on the reads and writes that are part of this
1292
+ # transaction instead.
1271
1293
  #
1272
1294
  # @yield [response, operation] Access the result along with the RPC operation
1273
1295
  # @yieldparam response [::Google::Cloud::Spanner::V1::Transaction]
@@ -1340,7 +1362,7 @@ module Google
1340
1362
  # @param options [::Gapic::CallOptions, ::Hash]
1341
1363
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1342
1364
  #
1343
- # @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil)
1365
+ # @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil, request_options: nil)
1344
1366
  # Pass arguments to `commit` via keyword arguments. Note that at
1345
1367
  # least one keyword argument is required. To specify no parameters, or to keep all
1346
1368
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1367,6 +1389,8 @@ module Google
1367
1389
  # If `true`, then statistics related to the transaction will be included in
1368
1390
  # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is
1369
1391
  # `false`.
1392
+ # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
1393
+ # Common options for this request.
1370
1394
  #
1371
1395
  # @yield [response, operation] Access the result along with the RPC operation
1372
1396
  # @yieldparam response [::Google::Cloud::Spanner::V1::CommitResponse]
@@ -1794,7 +1818,7 @@ module Google
1794
1818
  config_attr :scope, nil, ::String, ::Array, nil
1795
1819
  config_attr :lib_name, nil, ::String, nil
1796
1820
  config_attr :lib_version, nil, ::String, nil
1797
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1821
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1798
1822
  config_attr :interceptors, nil, ::Array, nil
1799
1823
  config_attr :timeout, nil, ::Numeric, nil
1800
1824
  config_attr :metadata, nil, ::Hash, nil
@@ -1815,7 +1839,7 @@ module Google
1815
1839
  def rpcs
1816
1840
  @rpcs ||= begin
1817
1841
  parent_rpcs = nil
1818
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1842
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1819
1843
  Rpcs.new parent_rpcs
1820
1844
  end
1821
1845
  end
@@ -1916,35 +1940,35 @@ module Google
1916
1940
 
1917
1941
  # @private
1918
1942
  def initialize parent_rpcs = nil
1919
- create_session_config = parent_rpcs&.create_session if parent_rpcs&.respond_to? :create_session
1943
+ create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session
1920
1944
  @create_session = ::Gapic::Config::Method.new create_session_config
1921
- batch_create_sessions_config = parent_rpcs&.batch_create_sessions if parent_rpcs&.respond_to? :batch_create_sessions
1945
+ batch_create_sessions_config = parent_rpcs.batch_create_sessions if parent_rpcs.respond_to? :batch_create_sessions
1922
1946
  @batch_create_sessions = ::Gapic::Config::Method.new batch_create_sessions_config
1923
- get_session_config = parent_rpcs&.get_session if parent_rpcs&.respond_to? :get_session
1947
+ get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session
1924
1948
  @get_session = ::Gapic::Config::Method.new get_session_config
1925
- list_sessions_config = parent_rpcs&.list_sessions if parent_rpcs&.respond_to? :list_sessions
1949
+ list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions
1926
1950
  @list_sessions = ::Gapic::Config::Method.new list_sessions_config
1927
- delete_session_config = parent_rpcs&.delete_session if parent_rpcs&.respond_to? :delete_session
1951
+ delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session
1928
1952
  @delete_session = ::Gapic::Config::Method.new delete_session_config
1929
- execute_sql_config = parent_rpcs&.execute_sql if parent_rpcs&.respond_to? :execute_sql
1953
+ execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql
1930
1954
  @execute_sql = ::Gapic::Config::Method.new execute_sql_config
1931
- execute_streaming_sql_config = parent_rpcs&.execute_streaming_sql if parent_rpcs&.respond_to? :execute_streaming_sql
1955
+ execute_streaming_sql_config = parent_rpcs.execute_streaming_sql if parent_rpcs.respond_to? :execute_streaming_sql
1932
1956
  @execute_streaming_sql = ::Gapic::Config::Method.new execute_streaming_sql_config
1933
- execute_batch_dml_config = parent_rpcs&.execute_batch_dml if parent_rpcs&.respond_to? :execute_batch_dml
1957
+ execute_batch_dml_config = parent_rpcs.execute_batch_dml if parent_rpcs.respond_to? :execute_batch_dml
1934
1958
  @execute_batch_dml = ::Gapic::Config::Method.new execute_batch_dml_config
1935
- read_config = parent_rpcs&.read if parent_rpcs&.respond_to? :read
1959
+ read_config = parent_rpcs.read if parent_rpcs.respond_to? :read
1936
1960
  @read = ::Gapic::Config::Method.new read_config
1937
- streaming_read_config = parent_rpcs&.streaming_read if parent_rpcs&.respond_to? :streaming_read
1961
+ streaming_read_config = parent_rpcs.streaming_read if parent_rpcs.respond_to? :streaming_read
1938
1962
  @streaming_read = ::Gapic::Config::Method.new streaming_read_config
1939
- begin_transaction_config = parent_rpcs&.begin_transaction if parent_rpcs&.respond_to? :begin_transaction
1963
+ begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction
1940
1964
  @begin_transaction = ::Gapic::Config::Method.new begin_transaction_config
1941
- commit_config = parent_rpcs&.commit if parent_rpcs&.respond_to? :commit
1965
+ commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit
1942
1966
  @commit = ::Gapic::Config::Method.new commit_config
1943
- rollback_config = parent_rpcs&.rollback if parent_rpcs&.respond_to? :rollback
1967
+ rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback
1944
1968
  @rollback = ::Gapic::Config::Method.new rollback_config
1945
- partition_query_config = parent_rpcs&.partition_query if parent_rpcs&.respond_to? :partition_query
1969
+ partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query
1946
1970
  @partition_query = ::Gapic::Config::Method.new partition_query_config
1947
- partition_read_config = parent_rpcs&.partition_read if parent_rpcs&.respond_to? :partition_read
1971
+ partition_read_config = parent_rpcs.partition_read if parent_rpcs.respond_to? :partition_read
1948
1972
  @partition_read = ::Gapic::Config::Method.new partition_read_config
1949
1973
 
1950
1974
  yield self if block_given?
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Spanner
23
23
  module V1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/spanner/v1/commit_response.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/duration_pb'
7
+ require 'google/protobuf/timestamp_pb'
8
+ require 'google/api/annotations_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("google/spanner/v1/commit_response.proto", :syntax => :proto3) do
11
+ add_message "google.spanner.v1.CommitResponse" do
12
+ optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
13
+ optional :commit_stats, :message, 2, "google.spanner.v1.CommitResponse.CommitStats"
14
+ end
15
+ add_message "google.spanner.v1.CommitResponse.CommitStats" do
16
+ optional :mutation_count, :int64, 1
17
+ end
18
+ end
19
+ end
20
+
21
+ module Google
22
+ module Cloud
23
+ module Spanner
24
+ module V1
25
+ CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
26
+ CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass
27
+ end
28
+ end
29
+ end
30
+ end
@@ -3,11 +3,11 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/spanner/v1/commit_response_pb'
6
7
  require 'google/api/annotations_pb'
7
8
  require 'google/api/client_pb'
8
9
  require 'google/api/field_behavior_pb'
9
10
  require 'google/api/resource_pb'
10
- require 'google/protobuf/duration_pb'
11
11
  require 'google/protobuf/empty_pb'
12
12
  require 'google/protobuf/struct_pb'
13
13
  require 'google/protobuf/timestamp_pb'
@@ -53,6 +53,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
53
53
  add_message "google.spanner.v1.DeleteSessionRequest" do
54
54
  optional :name, :string, 1
55
55
  end
56
+ add_message "google.spanner.v1.RequestOptions" do
57
+ optional :priority, :enum, 1, "google.spanner.v1.RequestOptions.Priority"
58
+ optional :request_tag, :string, 2
59
+ optional :transaction_tag, :string, 3
60
+ end
61
+ add_enum "google.spanner.v1.RequestOptions.Priority" do
62
+ value :PRIORITY_UNSPECIFIED, 0
63
+ value :PRIORITY_LOW, 1
64
+ value :PRIORITY_MEDIUM, 2
65
+ value :PRIORITY_HIGH, 3
66
+ end
56
67
  add_message "google.spanner.v1.ExecuteSqlRequest" do
57
68
  optional :session, :string, 1
58
69
  optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
@@ -64,9 +75,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
64
75
  optional :partition_token, :bytes, 8
65
76
  optional :seqno, :int64, 9
66
77
  optional :query_options, :message, 10, "google.spanner.v1.ExecuteSqlRequest.QueryOptions"
78
+ optional :request_options, :message, 11, "google.spanner.v1.RequestOptions"
67
79
  end
68
80
  add_message "google.spanner.v1.ExecuteSqlRequest.QueryOptions" do
69
81
  optional :optimizer_version, :string, 1
82
+ optional :optimizer_statistics_package, :string, 2
70
83
  end
71
84
  add_enum "google.spanner.v1.ExecuteSqlRequest.QueryMode" do
72
85
  value :NORMAL, 0
@@ -78,6 +91,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
78
91
  optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
79
92
  repeated :statements, :message, 3, "google.spanner.v1.ExecuteBatchDmlRequest.Statement"
80
93
  optional :seqno, :int64, 4
94
+ optional :request_options, :message, 5, "google.spanner.v1.RequestOptions"
81
95
  end
82
96
  add_message "google.spanner.v1.ExecuteBatchDmlRequest.Statement" do
83
97
  optional :sql, :string, 1
@@ -126,27 +140,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
126
140
  optional :limit, :int64, 8
127
141
  optional :resume_token, :bytes, 9
128
142
  optional :partition_token, :bytes, 10
143
+ optional :request_options, :message, 11, "google.spanner.v1.RequestOptions"
129
144
  end
130
145
  add_message "google.spanner.v1.BeginTransactionRequest" do
131
146
  optional :session, :string, 1
132
147
  optional :options, :message, 2, "google.spanner.v1.TransactionOptions"
148
+ optional :request_options, :message, 3, "google.spanner.v1.RequestOptions"
133
149
  end
134
150
  add_message "google.spanner.v1.CommitRequest" do
135
151
  optional :session, :string, 1
136
152
  repeated :mutations, :message, 4, "google.spanner.v1.Mutation"
137
153
  optional :return_commit_stats, :bool, 5
154
+ optional :request_options, :message, 6, "google.spanner.v1.RequestOptions"
138
155
  oneof :transaction do
139
156
  optional :transaction_id, :bytes, 2
140
157
  optional :single_use_transaction, :message, 3, "google.spanner.v1.TransactionOptions"
141
158
  end
142
159
  end
143
- add_message "google.spanner.v1.CommitResponse" do
144
- optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
145
- optional :commit_stats, :message, 2, "google.spanner.v1.CommitResponse.CommitStats"
146
- end
147
- add_message "google.spanner.v1.CommitResponse.CommitStats" do
148
- optional :mutation_count, :int64, 1
149
- end
150
160
  add_message "google.spanner.v1.RollbackRequest" do
151
161
  optional :session, :string, 1
152
162
  optional :transaction_id, :bytes, 2
@@ -166,6 +176,8 @@ module Google
166
176
  ListSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ListSessionsRequest").msgclass
167
177
  ListSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ListSessionsResponse").msgclass
168
178
  DeleteSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.DeleteSessionRequest").msgclass
179
+ RequestOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RequestOptions").msgclass
180
+ RequestOptions::Priority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RequestOptions.Priority").enummodule
169
181
  ExecuteSqlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest").msgclass
170
182
  ExecuteSqlRequest::QueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest.QueryOptions").msgclass
171
183
  ExecuteSqlRequest::QueryMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest.QueryMode").enummodule
@@ -180,8 +192,6 @@ module Google
180
192
  ReadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ReadRequest").msgclass
181
193
  BeginTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BeginTransactionRequest").msgclass
182
194
  CommitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitRequest").msgclass
183
- CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
184
- CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass
185
195
  RollbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RollbackRequest").msgclass
186
196
  end
187
197
  end