google-apis-spanner_v1 0.8.0 → 0.13.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.8.0"
19
+ GEM_VERSION = "0.13.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.3.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210325"
25
+ REVISION = "20210611"
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,33 @@ 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 :unit, as: 'unit', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1025
+
1026
+ property :value, as: 'value'
1027
+ end
1028
+ end
1029
+
1030
+ class KeyRangeInfos
1031
+ # @private
1032
+ class Representation < Google::Apis::Core::JsonRepresentation
1033
+ collection :infos, as: 'infos', class: Google::Apis::SpannerV1::KeyRangeInfo, decorator: Google::Apis::SpannerV1::KeyRangeInfo::Representation
1034
+
1035
+ property :total_size, as: 'totalSize'
1036
+ end
1037
+ end
1038
+
865
1039
  class KeySet
866
1040
  # @private
867
1041
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -940,6 +1114,15 @@ module Google
940
1114
  end
941
1115
  end
942
1116
 
1117
+ class ListScansResponse
1118
+ # @private
1119
+ class Representation < Google::Apis::Core::JsonRepresentation
1120
+ property :next_page_token, as: 'nextPageToken'
1121
+ collection :scans, as: 'scans', class: Google::Apis::SpannerV1::Scan, decorator: Google::Apis::SpannerV1::Scan::Representation
1122
+
1123
+ end
1124
+ end
1125
+
943
1126
  class ListSessionsResponse
944
1127
  # @private
945
1128
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -949,6 +1132,56 @@ module Google
949
1132
  end
950
1133
  end
951
1134
 
1135
+ class LocalizedString
1136
+ # @private
1137
+ class Representation < Google::Apis::Core::JsonRepresentation
1138
+ hash :args, as: 'args'
1139
+ property :message, as: 'message'
1140
+ property :token, as: 'token'
1141
+ end
1142
+ end
1143
+
1144
+ class Metric
1145
+ # @private
1146
+ class Representation < Google::Apis::Core::JsonRepresentation
1147
+ property :aggregation, as: 'aggregation'
1148
+ property :category, as: 'category', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1149
+
1150
+ property :derived, as: 'derived', class: Google::Apis::SpannerV1::DerivedMetric, decorator: Google::Apis::SpannerV1::DerivedMetric::Representation
1151
+
1152
+ property :display_label, as: 'displayLabel', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1153
+
1154
+ property :has_nonzero_data, as: 'hasNonzeroData'
1155
+ property :hot_value, as: 'hotValue'
1156
+ hash :indexed_hot_keys, as: 'indexedHotKeys', class: Google::Apis::SpannerV1::IndexedHotKey, decorator: Google::Apis::SpannerV1::IndexedHotKey::Representation
1157
+
1158
+ hash :indexed_key_range_infos, as: 'indexedKeyRangeInfos', class: Google::Apis::SpannerV1::IndexedKeyRangeInfos, decorator: Google::Apis::SpannerV1::IndexedKeyRangeInfos::Representation
1159
+
1160
+ property :info, as: 'info', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1161
+
1162
+ property :matrix, as: 'matrix', class: Google::Apis::SpannerV1::MetricMatrix, decorator: Google::Apis::SpannerV1::MetricMatrix::Representation
1163
+
1164
+ property :unit, as: 'unit', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
1165
+
1166
+ property :visible, as: 'visible'
1167
+ end
1168
+ end
1169
+
1170
+ class MetricMatrix
1171
+ # @private
1172
+ class Representation < Google::Apis::Core::JsonRepresentation
1173
+ collection :rows, as: 'rows', class: Google::Apis::SpannerV1::MetricMatrixRow, decorator: Google::Apis::SpannerV1::MetricMatrixRow::Representation
1174
+
1175
+ end
1176
+ end
1177
+
1178
+ class MetricMatrixRow
1179
+ # @private
1180
+ class Representation < Google::Apis::Core::JsonRepresentation
1181
+ collection :cols, as: 'cols'
1182
+ end
1183
+ end
1184
+
952
1185
  class Mutation
953
1186
  # @private
954
1187
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1093,6 +1326,17 @@ module Google
1093
1326
  end
1094
1327
  end
1095
1328
 
1329
+ class PrefixNode
1330
+ # @private
1331
+ class Representation < Google::Apis::Core::JsonRepresentation
1332
+ property :data_source_node, as: 'dataSourceNode'
1333
+ property :depth, as: 'depth'
1334
+ property :end_index, as: 'endIndex'
1335
+ property :start_index, as: 'startIndex'
1336
+ property :word, as: 'word'
1337
+ end
1338
+ end
1339
+
1096
1340
  class QueryOptions
1097
1341
  # @private
1098
1342
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1247,6 +1491,28 @@ module Google
1247
1491
  end
1248
1492
  end
1249
1493
 
1494
+ class Scan
1495
+ # @private
1496
+ class Representation < Google::Apis::Core::JsonRepresentation
1497
+ hash :details, as: 'details'
1498
+ property :end_time, as: 'endTime'
1499
+ property :name, as: 'name'
1500
+ property :scan_data, as: 'scanData', class: Google::Apis::SpannerV1::ScanData, decorator: Google::Apis::SpannerV1::ScanData::Representation
1501
+
1502
+ property :start_time, as: 'startTime'
1503
+ end
1504
+ end
1505
+
1506
+ class ScanData
1507
+ # @private
1508
+ class Representation < Google::Apis::Core::JsonRepresentation
1509
+ property :data, as: 'data', class: Google::Apis::SpannerV1::VisualizationData, decorator: Google::Apis::SpannerV1::VisualizationData::Representation
1510
+
1511
+ property :end_time, as: 'endTime'
1512
+ property :start_time, as: 'startTime'
1513
+ end
1514
+ end
1515
+
1250
1516
  class Session
1251
1517
  # @private
1252
1518
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1396,6 +1662,25 @@ module Google
1396
1662
  end
1397
1663
  end
1398
1664
 
1665
+ class VisualizationData
1666
+ # @private
1667
+ class Representation < Google::Apis::Core::JsonRepresentation
1668
+ property :data_source_end_token, as: 'dataSourceEndToken'
1669
+ property :data_source_separator_token, as: 'dataSourceSeparatorToken'
1670
+ collection :diagnostic_messages, as: 'diagnosticMessages', class: Google::Apis::SpannerV1::DiagnosticMessage, decorator: Google::Apis::SpannerV1::DiagnosticMessage::Representation
1671
+
1672
+ collection :end_key_strings, as: 'endKeyStrings'
1673
+ property :has_pii, as: 'hasPii'
1674
+ collection :indexed_keys, as: 'indexedKeys'
1675
+ property :key_separator, as: 'keySeparator'
1676
+ property :key_unit, as: 'keyUnit'
1677
+ collection :metrics, as: 'metrics', class: Google::Apis::SpannerV1::Metric, decorator: Google::Apis::SpannerV1::Metric::Representation
1678
+
1679
+ collection :prefix_nodes, as: 'prefixNodes', class: Google::Apis::SpannerV1::PrefixNode, decorator: Google::Apis::SpannerV1::PrefixNode::Representation
1680
+
1681
+ end
1682
+ end
1683
+
1399
1684
  class Write
1400
1685
  # @private
1401
1686
  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