google-apis-spanner_v1 0.9.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module SpannerV1
18
18
  # Version of the google-apis-spanner_v1 gem
19
- GEM_VERSION = "0.9.0"
19
+ GEM_VERSION = "0.14.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.2.0"
22
+ GENERATOR_VERSION = "0.4.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210405"
25
+ REVISION = "20210624"
26
26
  end
27
27
  end
28
28
  end
@@ -82,6 +82,12 @@ module Google
82
82
  include Google::Apis::Core::JsonObjectSupport
83
83
  end
84
84
 
85
+ class ContextValue
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
85
91
  class CreateBackupMetadata
86
92
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
93
 
@@ -130,6 +136,18 @@ module Google
130
136
  include Google::Apis::Core::JsonObjectSupport
131
137
  end
132
138
 
139
+ class DerivedMetric
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class DiagnosticMessage
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
133
151
  class Empty
134
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
135
153
 
@@ -196,6 +214,18 @@ module Google
196
214
  include Google::Apis::Core::JsonObjectSupport
197
215
  end
198
216
 
217
+ class IndexedHotKey
218
+ class Representation < Google::Apis::Core::JsonRepresentation; end
219
+
220
+ include Google::Apis::Core::JsonObjectSupport
221
+ end
222
+
223
+ class IndexedKeyRangeInfos
224
+ class Representation < Google::Apis::Core::JsonRepresentation; end
225
+
226
+ include Google::Apis::Core::JsonObjectSupport
227
+ end
228
+
199
229
  class Instance
200
230
  class Representation < Google::Apis::Core::JsonRepresentation; end
201
231
 
@@ -214,6 +244,18 @@ module Google
214
244
  include Google::Apis::Core::JsonObjectSupport
215
245
  end
216
246
 
247
+ class KeyRangeInfo
248
+ class Representation < Google::Apis::Core::JsonRepresentation; end
249
+
250
+ include Google::Apis::Core::JsonObjectSupport
251
+ end
252
+
253
+ class KeyRangeInfos
254
+ class Representation < Google::Apis::Core::JsonRepresentation; end
255
+
256
+ include Google::Apis::Core::JsonObjectSupport
257
+ end
258
+
217
259
  class KeySet
218
260
  class Representation < Google::Apis::Core::JsonRepresentation; end
219
261
 
@@ -262,12 +304,42 @@ module Google
262
304
  include Google::Apis::Core::JsonObjectSupport
263
305
  end
264
306
 
307
+ class ListScansResponse
308
+ class Representation < Google::Apis::Core::JsonRepresentation; end
309
+
310
+ include Google::Apis::Core::JsonObjectSupport
311
+ end
312
+
265
313
  class ListSessionsResponse
266
314
  class Representation < Google::Apis::Core::JsonRepresentation; end
267
315
 
268
316
  include Google::Apis::Core::JsonObjectSupport
269
317
  end
270
318
 
319
+ class LocalizedString
320
+ class Representation < Google::Apis::Core::JsonRepresentation; end
321
+
322
+ include Google::Apis::Core::JsonObjectSupport
323
+ end
324
+
325
+ class Metric
326
+ class Representation < Google::Apis::Core::JsonRepresentation; end
327
+
328
+ include Google::Apis::Core::JsonObjectSupport
329
+ end
330
+
331
+ class MetricMatrix
332
+ class Representation < Google::Apis::Core::JsonRepresentation; end
333
+
334
+ include Google::Apis::Core::JsonObjectSupport
335
+ end
336
+
337
+ class MetricMatrixRow
338
+ class Representation < Google::Apis::Core::JsonRepresentation; end
339
+
340
+ include Google::Apis::Core::JsonObjectSupport
341
+ end
342
+
271
343
  class Mutation
272
344
  class Representation < Google::Apis::Core::JsonRepresentation; end
273
345
 
@@ -346,6 +418,12 @@ module Google
346
418
  include Google::Apis::Core::JsonObjectSupport
347
419
  end
348
420
 
421
+ class PrefixNode
422
+ class Representation < Google::Apis::Core::JsonRepresentation; end
423
+
424
+ include Google::Apis::Core::JsonObjectSupport
425
+ end
426
+
349
427
  class QueryOptions
350
428
  class Representation < Google::Apis::Core::JsonRepresentation; end
351
429
 
@@ -436,6 +514,18 @@ module Google
436
514
  include Google::Apis::Core::JsonObjectSupport
437
515
  end
438
516
 
517
+ class Scan
518
+ class Representation < Google::Apis::Core::JsonRepresentation; end
519
+
520
+ include Google::Apis::Core::JsonObjectSupport
521
+ end
522
+
523
+ class ScanData
524
+ class Representation < Google::Apis::Core::JsonRepresentation; end
525
+
526
+ include Google::Apis::Core::JsonObjectSupport
527
+ end
528
+
439
529
  class Session
440
530
  class Representation < Google::Apis::Core::JsonRepresentation; end
441
531
 
@@ -532,6 +622,12 @@ module Google
532
622
  include Google::Apis::Core::JsonObjectSupport
533
623
  end
534
624
 
625
+ class VisualizationData
626
+ class Representation < Google::Apis::Core::JsonRepresentation; end
627
+
628
+ include Google::Apis::Core::JsonObjectSupport
629
+ end
630
+
535
631
  class Write
536
632
  class Representation < Google::Apis::Core::JsonRepresentation; end
537
633
 
@@ -640,6 +736,17 @@ module Google
640
736
  end
641
737
  end
642
738
 
739
+ class ContextValue
740
+ # @private
741
+ class Representation < Google::Apis::Core::JsonRepresentation
742
+ property :label, as: 'label', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
743
+
744
+ property :severity, as: 'severity'
745
+ property :unit, as: 'unit'
746
+ property :value, as: 'value'
747
+ end
748
+ end
749
+
643
750
  class CreateBackupMetadata
644
751
  # @private
645
752
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -722,6 +829,30 @@ module Google
722
829
  end
723
830
  end
724
831
 
832
+ class DerivedMetric
833
+ # @private
834
+ class Representation < Google::Apis::Core::JsonRepresentation
835
+ property :denominator, as: 'denominator', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
836
+
837
+ property :numerator, as: 'numerator', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
838
+
839
+ end
840
+ end
841
+
842
+ class DiagnosticMessage
843
+ # @private
844
+ class Representation < Google::Apis::Core::JsonRepresentation
845
+ property :info, as: 'info', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
846
+
847
+ property :metric, as: 'metric', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
848
+
849
+ property :metric_specific, as: 'metricSpecific'
850
+ property :severity, as: 'severity'
851
+ property :short_message, as: 'shortMessage', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
852
+
853
+ end
854
+ end
855
+
725
856
  class Empty
726
857
  # @private
727
858
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -829,6 +960,21 @@ module Google
829
960
  end
830
961
  end
831
962
 
963
+ class IndexedHotKey
964
+ # @private
965
+ class Representation < Google::Apis::Core::JsonRepresentation
966
+ hash :sparse_hot_keys, as: 'sparseHotKeys'
967
+ end
968
+ end
969
+
970
+ class IndexedKeyRangeInfos
971
+ # @private
972
+ class Representation < Google::Apis::Core::JsonRepresentation
973
+ hash :key_range_infos, as: 'keyRangeInfos', class: Google::Apis::SpannerV1::KeyRangeInfos, decorator: Google::Apis::SpannerV1::KeyRangeInfos::Representation
974
+
975
+ end
976
+ end
977
+
832
978
  class Instance
833
979
  # @private
834
980
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -838,6 +984,7 @@ module Google
838
984
  hash :labels, as: 'labels'
839
985
  property :name, as: 'name'
840
986
  property :node_count, as: 'nodeCount'
987
+ property :processing_units, as: 'processingUnits'
841
988
  property :state, as: 'state'
842
989
  end
843
990
  end
@@ -862,6 +1009,34 @@ module Google
862
1009
  end
863
1010
  end
864
1011
 
1012
+ class KeyRangeInfo
1013
+ # @private
1014
+ class Representation < Google::Apis::Core::JsonRepresentation
1015
+ collection :context_values, as: 'contextValues', class: Google::Apis::SpannerV1::ContextValue, decorator: Google::Apis::SpannerV1::ContextValue::Representation
1016
+
1017
+ property :end_key_index, as: 'endKeyIndex'
1018
+ property :info, as: 'info', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1019
+
1020
+ property :keys_count, :numeric_string => true, as: 'keysCount'
1021
+ property :metric, as: 'metric', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1022
+
1023
+ property :start_key_index, as: 'startKeyIndex'
1024
+ property :time_offset, as: 'timeOffset'
1025
+ property :unit, as: 'unit', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1026
+
1027
+ property :value, as: 'value'
1028
+ end
1029
+ end
1030
+
1031
+ class KeyRangeInfos
1032
+ # @private
1033
+ class Representation < Google::Apis::Core::JsonRepresentation
1034
+ collection :infos, as: 'infos', class: Google::Apis::SpannerV1::KeyRangeInfo, decorator: Google::Apis::SpannerV1::KeyRangeInfo::Representation
1035
+
1036
+ property :total_size, as: 'totalSize'
1037
+ end
1038
+ end
1039
+
865
1040
  class KeySet
866
1041
  # @private
867
1042
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -940,6 +1115,15 @@ module Google
940
1115
  end
941
1116
  end
942
1117
 
1118
+ class ListScansResponse
1119
+ # @private
1120
+ class Representation < Google::Apis::Core::JsonRepresentation
1121
+ property :next_page_token, as: 'nextPageToken'
1122
+ collection :scans, as: 'scans', class: Google::Apis::SpannerV1::Scan, decorator: Google::Apis::SpannerV1::Scan::Representation
1123
+
1124
+ end
1125
+ end
1126
+
943
1127
  class ListSessionsResponse
944
1128
  # @private
945
1129
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -949,6 +1133,56 @@ module Google
949
1133
  end
950
1134
  end
951
1135
 
1136
+ class LocalizedString
1137
+ # @private
1138
+ class Representation < Google::Apis::Core::JsonRepresentation
1139
+ hash :args, as: 'args'
1140
+ property :message, as: 'message'
1141
+ property :token, as: 'token'
1142
+ end
1143
+ end
1144
+
1145
+ class Metric
1146
+ # @private
1147
+ class Representation < Google::Apis::Core::JsonRepresentation
1148
+ property :aggregation, as: 'aggregation'
1149
+ property :category, as: 'category', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1150
+
1151
+ property :derived, as: 'derived', class: Google::Apis::SpannerV1::DerivedMetric, decorator: Google::Apis::SpannerV1::DerivedMetric::Representation
1152
+
1153
+ property :display_label, as: 'displayLabel', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1154
+
1155
+ property :has_nonzero_data, as: 'hasNonzeroData'
1156
+ property :hot_value, as: 'hotValue'
1157
+ hash :indexed_hot_keys, as: 'indexedHotKeys', class: Google::Apis::SpannerV1::IndexedHotKey, decorator: Google::Apis::SpannerV1::IndexedHotKey::Representation
1158
+
1159
+ hash :indexed_key_range_infos, as: 'indexedKeyRangeInfos', class: Google::Apis::SpannerV1::IndexedKeyRangeInfos, decorator: Google::Apis::SpannerV1::IndexedKeyRangeInfos::Representation
1160
+
1161
+ property :info, as: 'info', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1162
+
1163
+ property :matrix, as: 'matrix', class: Google::Apis::SpannerV1::MetricMatrix, decorator: Google::Apis::SpannerV1::MetricMatrix::Representation
1164
+
1165
+ property :unit, as: 'unit', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1166
+
1167
+ property :visible, as: 'visible'
1168
+ end
1169
+ end
1170
+
1171
+ class MetricMatrix
1172
+ # @private
1173
+ class Representation < Google::Apis::Core::JsonRepresentation
1174
+ collection :rows, as: 'rows', class: Google::Apis::SpannerV1::MetricMatrixRow, decorator: Google::Apis::SpannerV1::MetricMatrixRow::Representation
1175
+
1176
+ end
1177
+ end
1178
+
1179
+ class MetricMatrixRow
1180
+ # @private
1181
+ class Representation < Google::Apis::Core::JsonRepresentation
1182
+ collection :cols, as: 'cols'
1183
+ end
1184
+ end
1185
+
952
1186
  class Mutation
953
1187
  # @private
954
1188
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1093,6 +1327,17 @@ module Google
1093
1327
  end
1094
1328
  end
1095
1329
 
1330
+ class PrefixNode
1331
+ # @private
1332
+ class Representation < Google::Apis::Core::JsonRepresentation
1333
+ property :data_source_node, as: 'dataSourceNode'
1334
+ property :depth, as: 'depth'
1335
+ property :end_index, as: 'endIndex'
1336
+ property :start_index, as: 'startIndex'
1337
+ property :word, as: 'word'
1338
+ end
1339
+ end
1340
+
1096
1341
  class QueryOptions
1097
1342
  # @private
1098
1343
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1247,6 +1492,28 @@ module Google
1247
1492
  end
1248
1493
  end
1249
1494
 
1495
+ class Scan
1496
+ # @private
1497
+ class Representation < Google::Apis::Core::JsonRepresentation
1498
+ hash :details, as: 'details'
1499
+ property :end_time, as: 'endTime'
1500
+ property :name, as: 'name'
1501
+ property :scan_data, as: 'scanData', class: Google::Apis::SpannerV1::ScanData, decorator: Google::Apis::SpannerV1::ScanData::Representation
1502
+
1503
+ property :start_time, as: 'startTime'
1504
+ end
1505
+ end
1506
+
1507
+ class ScanData
1508
+ # @private
1509
+ class Representation < Google::Apis::Core::JsonRepresentation
1510
+ property :data, as: 'data', class: Google::Apis::SpannerV1::VisualizationData, decorator: Google::Apis::SpannerV1::VisualizationData::Representation
1511
+
1512
+ property :end_time, as: 'endTime'
1513
+ property :start_time, as: 'startTime'
1514
+ end
1515
+ end
1516
+
1250
1517
  class Session
1251
1518
  # @private
1252
1519
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1396,6 +1663,25 @@ module Google
1396
1663
  end
1397
1664
  end
1398
1665
 
1666
+ class VisualizationData
1667
+ # @private
1668
+ class Representation < Google::Apis::Core::JsonRepresentation
1669
+ property :data_source_end_token, as: 'dataSourceEndToken'
1670
+ property :data_source_separator_token, as: 'dataSourceSeparatorToken'
1671
+ collection :diagnostic_messages, as: 'diagnosticMessages', class: Google::Apis::SpannerV1::DiagnosticMessage, decorator: Google::Apis::SpannerV1::DiagnosticMessage::Representation
1672
+
1673
+ collection :end_key_strings, as: 'endKeyStrings'
1674
+ property :has_pii, as: 'hasPii'
1675
+ collection :indexed_keys, as: 'indexedKeys'
1676
+ property :key_separator, as: 'keySeparator'
1677
+ property :key_unit, as: 'keyUnit'
1678
+ collection :metrics, as: 'metrics', class: Google::Apis::SpannerV1::Metric, decorator: Google::Apis::SpannerV1::Metric::Representation
1679
+
1680
+ collection :prefix_nodes, as: 'prefixNodes', class: Google::Apis::SpannerV1::PrefixNode, decorator: Google::Apis::SpannerV1::PrefixNode::Representation
1681
+
1682
+ end
1683
+ end
1684
+
1399
1685
  class Write
1400
1686
  # @private
1401
1687
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1262,6 +1262,51 @@ module Google
1262
1262
  execute_or_queue_command(command, &block)
1263
1263
  end
1264
1264
 
1265
+ # Request a specific scan with Database-specific data for Cloud Key Visualizer.
1266
+ # @param [String] name
1267
+ # Required. The unique name of the scan containing the requested information,
1268
+ # specific to the Database service implementing this interface.
1269
+ # @param [String] end_time
1270
+ # The upper bound for the time range to retrieve Scan data for.
1271
+ # @param [String] start_time
1272
+ # These fields restrict the Database-specific information returned in the `Scan.
1273
+ # data` field. If a `View` is provided that does not include the `Scan.data`
1274
+ # field, these are ignored. This range of time must be entirely contained within
1275
+ # the defined time range of the targeted scan. The lower bound for the time
1276
+ # range to retrieve Scan data for.
1277
+ # @param [String] view
1278
+ # Specifies which parts of the Scan should be returned in the response. Note, if
1279
+ # left unspecified, the FULL view is assumed.
1280
+ # @param [String] fields
1281
+ # Selector specifying which fields to include in a partial response.
1282
+ # @param [String] quota_user
1283
+ # Available to use for quota purposes for server-side applications. Can be any
1284
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1285
+ # @param [Google::Apis::RequestOptions] options
1286
+ # Request-specific options
1287
+ #
1288
+ # @yield [result, err] Result & error if block supplied
1289
+ # @yieldparam result [Google::Apis::SpannerV1::Scan] parsed result object
1290
+ # @yieldparam err [StandardError] error object if request failed
1291
+ #
1292
+ # @return [Google::Apis::SpannerV1::Scan]
1293
+ #
1294
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1295
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1296
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1297
+ def get_project_instance_database_scans(name, end_time: nil, start_time: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1298
+ command = make_simple_command(:get, 'v1/{+name}/scans', options)
1299
+ command.response_representation = Google::Apis::SpannerV1::Scan::Representation
1300
+ command.response_class = Google::Apis::SpannerV1::Scan
1301
+ command.params['name'] = name unless name.nil?
1302
+ command.query['endTime'] = end_time unless end_time.nil?
1303
+ command.query['startTime'] = start_time unless start_time.nil?
1304
+ command.query['view'] = view unless view.nil?
1305
+ command.query['fields'] = fields unless fields.nil?
1306
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1307
+ execute_or_queue_command(command, &block)
1308
+ end
1309
+
1265
1310
  # Lists Cloud Spanner databases.
1266
1311
  # @param [String] parent
1267
1312
  # Required. The instance whose databases should be listed. Values are of the
@@ -2329,6 +2374,52 @@ module Google
2329
2374
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2330
2375
  execute_or_queue_command(command, &block)
2331
2376
  end
2377
+
2378
+ # Return available scans given a Database-specific resource name.
2379
+ # @param [String] parent
2380
+ # Required. The unique name of the parent resource, specific to the Database
2381
+ # service implementing this interface.
2382
+ # @param [String] filter
2383
+ # A filter expression to restrict the results based on information present in
2384
+ # the available Scan collection. The filter applies to all fields within the
2385
+ # Scan message except for `data`.
2386
+ # @param [Fixnum] page_size
2387
+ # The maximum number of items to return.
2388
+ # @param [String] page_token
2389
+ # The next_page_token value returned from a previous List request, if any.
2390
+ # @param [String] view
2391
+ # Specifies which parts of the Scan should be returned in the response. Note,
2392
+ # only the SUMMARY view (the default) is currently supported for ListScans.
2393
+ # @param [String] fields
2394
+ # Selector specifying which fields to include in a partial response.
2395
+ # @param [String] quota_user
2396
+ # Available to use for quota purposes for server-side applications. Can be any
2397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2398
+ # @param [Google::Apis::RequestOptions] options
2399
+ # Request-specific options
2400
+ #
2401
+ # @yield [result, err] Result & error if block supplied
2402
+ # @yieldparam result [Google::Apis::SpannerV1::ListScansResponse] parsed result object
2403
+ # @yieldparam err [StandardError] error object if request failed
2404
+ #
2405
+ # @return [Google::Apis::SpannerV1::ListScansResponse]
2406
+ #
2407
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2408
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2409
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2410
+ def list_scans(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
2411
+ command = make_simple_command(:get, 'v1/{+parent}', options)
2412
+ command.response_representation = Google::Apis::SpannerV1::ListScansResponse::Representation
2413
+ command.response_class = Google::Apis::SpannerV1::ListScansResponse
2414
+ command.params['parent'] = parent unless parent.nil?
2415
+ command.query['filter'] = filter unless filter.nil?
2416
+ command.query['pageSize'] = page_size unless page_size.nil?
2417
+ command.query['pageToken'] = page_token unless page_token.nil?
2418
+ command.query['view'] = view unless view.nil?
2419
+ command.query['fields'] = fields unless fields.nil?
2420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2421
+ execute_or_queue_command(command, &block)
2422
+ end
2332
2423
 
2333
2424
  protected
2334
2425