google-cloud-spanner-admin-database-v1 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,10 +36,13 @@ module Google
36
36
  # The Cloud Spanner Database Admin API can be used to:
37
37
  # * create, drop, and list databases
38
38
  # * update the schema of pre-existing databases
39
- # * create, delete and list backups for a database
39
+ # * create, delete, copy and list backups for a database
40
40
  # * restore a database from an existing backup
41
41
  #
42
42
  class Client
43
+ # @private
44
+ API_VERSION = ""
45
+
43
46
  # @private
44
47
  DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$"
45
48
 
@@ -283,8 +286,9 @@ module Google
283
286
  # defaults to the server's maximum allowed page size.
284
287
  # @param page_token [::String]
285
288
  # If non-empty, `page_token` should contain a
286
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
287
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
289
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
290
+ # from a previous
291
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
288
292
  # @yield [result, operation] Access the result along with the TransportOperation object
289
293
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
290
294
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -323,12 +327,13 @@ module Google
323
327
  # Customize the options with defaults
324
328
  call_metadata = @config.rpcs.list_databases.metadata.to_h
325
329
 
326
- # Set x-goog-api-client and x-goog-user-project headers
330
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
327
331
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
328
332
  lib_name: @config.lib_name, lib_version: @config.lib_version,
329
333
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
330
334
  transports_version_send: [:rest]
331
335
 
336
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
332
337
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
333
338
 
334
339
  options.apply_defaults timeout: @config.rpcs.list_databases.timeout,
@@ -354,8 +359,8 @@ module Google
354
359
  # have a name of the format `<database_name>/operations/<operation_id>` and
355
360
  # can be used to track preparation of the database. The
356
361
  # {::Google::Longrunning::Operation#metadata metadata} field type is
357
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. The
358
- # {::Google::Longrunning::Operation#response response} field type is
362
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}.
363
+ # The {::Google::Longrunning::Operation#response response} field type is
359
364
  # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful.
360
365
  #
361
366
  # @overload create_database(request, options = nil)
@@ -388,8 +393,8 @@ module Google
388
393
  # statements execute atomically with the creation of the database:
389
394
  # if there is an error in any statement, the database is not created.
390
395
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash]
391
- # Optional. The encryption configuration for the database. If this field is not
392
- # specified, Cloud Spanner will encrypt/decrypt all data at rest using
396
+ # Optional. The encryption configuration for the database. If this field is
397
+ # not specified, Cloud Spanner will encrypt/decrypt all data at rest using
393
398
  # Google default encryption.
394
399
  # @param database_dialect [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect]
395
400
  # Optional. The dialect of the Cloud Spanner Database.
@@ -450,12 +455,13 @@ module Google
450
455
  # Customize the options with defaults
451
456
  call_metadata = @config.rpcs.create_database.metadata.to_h
452
457
 
453
- # Set x-goog-api-client and x-goog-user-project headers
458
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
454
459
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
455
460
  lib_name: @config.lib_name, lib_version: @config.lib_version,
456
461
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
457
462
  transports_version_send: [:rest]
458
463
 
464
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
459
465
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
460
466
 
461
467
  options.apply_defaults timeout: @config.rpcs.create_database.timeout,
@@ -530,12 +536,13 @@ module Google
530
536
  # Customize the options with defaults
531
537
  call_metadata = @config.rpcs.get_database.metadata.to_h
532
538
 
533
- # Set x-goog-api-client and x-goog-user-project headers
539
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
534
540
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
535
541
  lib_name: @config.lib_name, lib_version: @config.lib_version,
536
542
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
537
543
  transports_version_send: [:rest]
538
544
 
545
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
539
546
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
540
547
 
541
548
  options.apply_defaults timeout: @config.rpcs.get_database.timeout,
@@ -655,12 +662,13 @@ module Google
655
662
  # Customize the options with defaults
656
663
  call_metadata = @config.rpcs.update_database.metadata.to_h
657
664
 
658
- # Set x-goog-api-client and x-goog-user-project headers
665
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
659
666
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
660
667
  lib_name: @config.lib_name, lib_version: @config.lib_version,
661
668
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
662
669
  transports_version_send: [:rest]
663
670
 
671
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
664
672
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
665
673
 
666
674
  options.apply_defaults timeout: @config.rpcs.update_database.timeout,
@@ -687,7 +695,8 @@ module Google
687
695
  # the format `<database_name>/operations/<operation_id>` and can be used to
688
696
  # track execution of the schema change(s). The
689
697
  # {::Google::Longrunning::Operation#metadata metadata} field type is
690
- # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. The operation has no response.
698
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}.
699
+ # The operation has no response.
691
700
  #
692
701
  # @overload update_database_ddl(request, options = nil)
693
702
  # Pass arguments to `update_database_ddl` via a request object, either of type
@@ -716,18 +725,20 @@ module Google
716
725
  #
717
726
  # Specifying an explicit operation ID simplifies determining
718
727
  # whether the statements were executed in the event that the
719
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
720
- # or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
721
- # `operation_id` fields can be combined to form the
728
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl}
729
+ # call is replayed, or the return value is otherwise lost: the
730
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database}
731
+ # and `operation_id` fields can be combined to form the
722
732
  # {::Google::Longrunning::Operation#name name} of the resulting
723
- # {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
733
+ # {::Google::Longrunning::Operation longrunning.Operation}:
734
+ # `<database>/operations/<operation_id>`.
724
735
  #
725
736
  # `operation_id` should be unique within the database, and must be
726
737
  # a valid identifier: `[a-z][a-z0-9_]*`. Note that
727
738
  # automatically-generated operation IDs always begin with an
728
739
  # underscore. If the named operation already exists,
729
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl} returns
730
- # `ALREADY_EXISTS`.
740
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl}
741
+ # returns `ALREADY_EXISTS`.
731
742
  # @param proto_descriptors [::String]
732
743
  # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
733
744
  # Contains a protobuf-serialized
@@ -784,12 +795,13 @@ module Google
784
795
  # Customize the options with defaults
785
796
  call_metadata = @config.rpcs.update_database_ddl.metadata.to_h
786
797
 
787
- # Set x-goog-api-client and x-goog-user-project headers
798
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
788
799
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
789
800
  lib_name: @config.lib_name, lib_version: @config.lib_version,
790
801
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
791
802
  transports_version_send: [:rest]
792
803
 
804
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
793
805
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
794
806
 
795
807
  options.apply_defaults timeout: @config.rpcs.update_database_ddl.timeout,
@@ -867,12 +879,13 @@ module Google
867
879
  # Customize the options with defaults
868
880
  call_metadata = @config.rpcs.drop_database.metadata.to_h
869
881
 
870
- # Set x-goog-api-client and x-goog-user-project headers
882
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
871
883
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
872
884
  lib_name: @config.lib_name, lib_version: @config.lib_version,
873
885
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
874
886
  transports_version_send: [:rest]
875
887
 
888
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
876
889
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
877
890
 
878
891
  options.apply_defaults timeout: @config.rpcs.drop_database.timeout,
@@ -949,12 +962,13 @@ module Google
949
962
  # Customize the options with defaults
950
963
  call_metadata = @config.rpcs.get_database_ddl.metadata.to_h
951
964
 
952
- # Set x-goog-api-client and x-goog-user-project headers
965
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
953
966
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
954
967
  lib_name: @config.lib_name, lib_version: @config.lib_version,
955
968
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
956
969
  transports_version_send: [:rest]
957
970
 
971
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
958
972
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
959
973
 
960
974
  options.apply_defaults timeout: @config.rpcs.get_database_ddl.timeout,
@@ -1045,12 +1059,13 @@ module Google
1045
1059
  # Customize the options with defaults
1046
1060
  call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1047
1061
 
1048
- # Set x-goog-api-client and x-goog-user-project headers
1062
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1049
1063
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1050
1064
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1051
1065
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1052
1066
  transports_version_send: [:rest]
1053
1067
 
1068
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1054
1069
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1055
1070
 
1056
1071
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
@@ -1134,12 +1149,13 @@ module Google
1134
1149
  # Customize the options with defaults
1135
1150
  call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
1136
1151
 
1137
- # Set x-goog-api-client and x-goog-user-project headers
1152
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1138
1153
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1139
1154
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1140
1155
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1141
1156
  transports_version_send: [:rest]
1142
1157
 
1158
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1143
1159
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1144
1160
 
1145
1161
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
@@ -1227,12 +1243,13 @@ module Google
1227
1243
  # Customize the options with defaults
1228
1244
  call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1229
1245
 
1230
- # Set x-goog-api-client and x-goog-user-project headers
1246
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1231
1247
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1232
1248
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1233
1249
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1234
1250
  transports_version_send: [:rest]
1235
1251
 
1252
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1236
1253
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1237
1254
 
1238
1255
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
@@ -1258,12 +1275,12 @@ module Google
1258
1275
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
1259
1276
  # and can be used to track creation of the backup. The
1260
1277
  # {::Google::Longrunning::Operation#metadata metadata} field type is
1261
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. The
1262
- # {::Google::Longrunning::Operation#response response} field type is
1263
- # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
1264
- # creation and delete the backup.
1265
- # There can be only one pending backup creation per database. Backup creation
1266
- # of different databases can run concurrently.
1278
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
1279
+ # The {::Google::Longrunning::Operation#response response} field type is
1280
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
1281
+ # Cancelling the returned operation will stop the creation and delete the
1282
+ # backup. There can be only one pending backup creation per database. Backup
1283
+ # creation of different databases can run concurrently.
1267
1284
  #
1268
1285
  # @overload create_backup(request, options = nil)
1269
1286
  # Pass arguments to `create_backup` via a request object, either of type
@@ -1294,11 +1311,11 @@ module Google
1294
1311
  # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash]
1295
1312
  # Required. The backup to create.
1296
1313
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash]
1297
- # Optional. The encryption configuration used to encrypt the backup. If this field is
1298
- # not specified, the backup will use the same
1299
- # encryption configuration as the database by default, namely
1300
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} =
1301
- # `USE_DATABASE_ENCRYPTION`.
1314
+ # Optional. The encryption configuration used to encrypt the backup. If this
1315
+ # field is not specified, the backup will use the same encryption
1316
+ # configuration as the database by default, namely
1317
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
1318
+ # = `USE_DATABASE_ENCRYPTION`.
1302
1319
  # @yield [result, operation] Access the result along with the TransportOperation object
1303
1320
  # @yieldparam result [::Gapic::Operation]
1304
1321
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1340,12 +1357,13 @@ module Google
1340
1357
  # Customize the options with defaults
1341
1358
  call_metadata = @config.rpcs.create_backup.metadata.to_h
1342
1359
 
1343
- # Set x-goog-api-client and x-goog-user-project headers
1360
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1344
1361
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1345
1362
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1346
1363
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1347
1364
  transports_version_send: [:rest]
1348
1365
 
1366
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1349
1367
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1350
1368
 
1351
1369
  options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
@@ -1375,9 +1393,10 @@ module Google
1375
1393
  # The {::Google::Longrunning::Operation#metadata metadata} field type is
1376
1394
  # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
1377
1395
  # The {::Google::Longrunning::Operation#response response} field type is
1378
- # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
1379
- # copying and delete the backup.
1380
- # Concurrent CopyBackup requests can run on the same source backup.
1396
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
1397
+ # Cancelling the returned operation will stop the copying and delete the
1398
+ # destination backup. Concurrent CopyBackup requests can run on the same
1399
+ # source backup.
1381
1400
  #
1382
1401
  # @overload copy_backup(request, options = nil)
1383
1402
  # Pass arguments to `copy_backup` via a request object, either of type
@@ -1395,8 +1414,8 @@ module Google
1395
1414
  # the default parameter values, pass an empty Hash as a request object (see above).
1396
1415
  #
1397
1416
  # @param parent [::String]
1398
- # Required. The name of the destination instance that will contain the backup copy.
1399
- # Values are of the form: `projects/<project>/instances/<instance>`.
1417
+ # Required. The name of the destination instance that will contain the backup
1418
+ # copy. Values are of the form: `projects/<project>/instances/<instance>`.
1400
1419
  # @param backup_id [::String]
1401
1420
  # Required. The id of the backup copy.
1402
1421
  # The `backup_id` appended to `parent` forms the full backup_uri of the form
@@ -1415,11 +1434,11 @@ module Google
1415
1434
  # passed, the backup is eligible to be automatically deleted by Cloud Spanner
1416
1435
  # to free the resources used by the backup.
1417
1436
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig, ::Hash]
1418
- # Optional. The encryption configuration used to encrypt the backup. If this field is
1419
- # not specified, the backup will use the same
1420
- # encryption configuration as the source backup by default, namely
1421
- # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} =
1422
- # `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1437
+ # Optional. The encryption configuration used to encrypt the backup. If this
1438
+ # field is not specified, the backup will use the same encryption
1439
+ # configuration as the source backup by default, namely
1440
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type}
1441
+ # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1423
1442
  # @yield [result, operation] Access the result along with the TransportOperation object
1424
1443
  # @yieldparam result [::Gapic::Operation]
1425
1444
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1461,12 +1480,13 @@ module Google
1461
1480
  # Customize the options with defaults
1462
1481
  call_metadata = @config.rpcs.copy_backup.metadata.to_h
1463
1482
 
1464
- # Set x-goog-api-client and x-goog-user-project headers
1483
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1465
1484
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1466
1485
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1467
1486
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1468
1487
  transports_version_send: [:rest]
1469
1488
 
1489
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1470
1490
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1471
1491
 
1472
1492
  options.apply_defaults timeout: @config.rpcs.copy_backup.timeout,
@@ -1487,7 +1507,8 @@ module Google
1487
1507
  end
1488
1508
 
1489
1509
  ##
1490
- # Gets metadata on a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1510
+ # Gets metadata on a pending or completed
1511
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1491
1512
  #
1492
1513
  # @overload get_backup(request, options = nil)
1493
1514
  # Pass arguments to `get_backup` via a request object, either of type
@@ -1542,12 +1563,13 @@ module Google
1542
1563
  # Customize the options with defaults
1543
1564
  call_metadata = @config.rpcs.get_backup.metadata.to_h
1544
1565
 
1545
- # Set x-goog-api-client and x-goog-user-project headers
1566
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1546
1567
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1547
1568
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1548
1569
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1549
1570
  transports_version_send: [:rest]
1550
1571
 
1572
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1551
1573
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1552
1574
 
1553
1575
  options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
@@ -1567,7 +1589,8 @@ module Google
1567
1589
  end
1568
1590
 
1569
1591
  ##
1570
- # Updates a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1592
+ # Updates a pending or completed
1593
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1571
1594
  #
1572
1595
  # @overload update_backup(request, options = nil)
1573
1596
  # Pass arguments to `update_backup` via a request object, either of type
@@ -1629,12 +1652,13 @@ module Google
1629
1652
  # Customize the options with defaults
1630
1653
  call_metadata = @config.rpcs.update_backup.metadata.to_h
1631
1654
 
1632
- # Set x-goog-api-client and x-goog-user-project headers
1655
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1633
1656
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1634
1657
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1635
1658
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1636
1659
  transports_version_send: [:rest]
1637
1660
 
1661
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1638
1662
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1639
1663
 
1640
1664
  options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
@@ -1654,7 +1678,8 @@ module Google
1654
1678
  end
1655
1679
 
1656
1680
  ##
1657
- # Deletes a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1681
+ # Deletes a pending or completed
1682
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1658
1683
  #
1659
1684
  # @overload delete_backup(request, options = nil)
1660
1685
  # Pass arguments to `delete_backup` via a request object, either of type
@@ -1709,12 +1734,13 @@ module Google
1709
1734
  # Customize the options with defaults
1710
1735
  call_metadata = @config.rpcs.delete_backup.metadata.to_h
1711
1736
 
1712
- # Set x-goog-api-client and x-goog-user-project headers
1737
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1713
1738
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1714
1739
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1715
1740
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1716
1741
  transports_version_send: [:rest]
1717
1742
 
1743
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1718
1744
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1719
1745
 
1720
1746
  options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
@@ -1765,7 +1791,9 @@ module Google
1765
1791
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1766
1792
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
1767
1793
  #
1768
- # The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
1794
+ # The following fields in the
1795
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
1796
+ # filtering:
1769
1797
  #
1770
1798
  # * `name`
1771
1799
  # * `database`
@@ -1797,9 +1825,10 @@ module Google
1797
1825
  # less, defaults to the server's maximum allowed page size.
1798
1826
  # @param page_token [::String]
1799
1827
  # If non-empty, `page_token` should contain a
1800
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
1801
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
1802
- # `filter`.
1828
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
1829
+ # from a previous
1830
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse}
1831
+ # to the same `parent` and with the same `filter`.
1803
1832
  # @yield [result, operation] Access the result along with the TransportOperation object
1804
1833
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
1805
1834
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1838,12 +1867,13 @@ module Google
1838
1867
  # Customize the options with defaults
1839
1868
  call_metadata = @config.rpcs.list_backups.metadata.to_h
1840
1869
 
1841
- # Set x-goog-api-client and x-goog-user-project headers
1870
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1842
1871
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1843
1872
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1844
1873
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1845
1874
  transports_version_send: [:rest]
1846
1875
 
1876
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1847
1877
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1848
1878
 
1849
1879
  options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
@@ -1912,12 +1942,12 @@ module Google
1912
1942
  # Name of the backup from which to restore. Values are of the form
1913
1943
  # `projects/<project>/instances/<instance>/backups/<backup>`.
1914
1944
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash]
1915
- # Optional. An encryption configuration describing the encryption type and key
1916
- # resources in Cloud KMS used to encrypt/decrypt the database to restore to.
1917
- # If this field is not specified, the restored database will use
1918
- # the same encryption configuration as the backup by default, namely
1919
- # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} =
1920
- # `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1945
+ # Optional. An encryption configuration describing the encryption type and
1946
+ # key resources in Cloud KMS used to encrypt/decrypt the database to restore
1947
+ # to. If this field is not specified, the restored database will use the same
1948
+ # encryption configuration as the backup by default, namely
1949
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
1950
+ # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1921
1951
  # @yield [result, operation] Access the result along with the TransportOperation object
1922
1952
  # @yieldparam result [::Gapic::Operation]
1923
1953
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1959,12 +1989,13 @@ module Google
1959
1989
  # Customize the options with defaults
1960
1990
  call_metadata = @config.rpcs.restore_database.metadata.to_h
1961
1991
 
1962
- # Set x-goog-api-client and x-goog-user-project headers
1992
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1963
1993
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1964
1994
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1965
1995
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
1966
1996
  transports_version_send: [:rest]
1967
1997
 
1998
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1968
1999
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1969
2000
 
1970
2001
  options.apply_defaults timeout: @config.rpcs.restore_database.timeout,
@@ -2027,7 +2058,9 @@ module Google
2027
2058
  # * `name` - The name of the long-running operation
2028
2059
  # * `done` - False if the operation is in progress, else true.
2029
2060
  # * `metadata.@type` - the type of metadata. For example, the type string
2030
- # for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
2061
+ # for
2062
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
2063
+ # is
2031
2064
  # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
2032
2065
  # * `metadata.<field_name>` - any field in metadata.value.
2033
2066
  # `metadata.@type` must be specified first, if filtering on metadata
@@ -2049,7 +2082,8 @@ module Google
2049
2082
  # `(metadata.name:restored_howl) AND` \
2050
2083
  # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
2051
2084
  # `(error:*)` - Return operations where:
2052
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
2085
+ # * The operation's metadata type is
2086
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
2053
2087
  # * The database is restored from a backup.
2054
2088
  # * The backup name contains "backup_howl".
2055
2089
  # * The restored database's name contains "restored_howl".
@@ -2061,8 +2095,9 @@ module Google
2061
2095
  # @param page_token [::String]
2062
2096
  # If non-empty, `page_token` should contain a
2063
2097
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
2064
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
2065
- # same `parent` and with the same `filter`.
2098
+ # from a previous
2099
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse}
2100
+ # to the same `parent` and with the same `filter`.
2066
2101
  # @yield [result, operation] Access the result along with the TransportOperation object
2067
2102
  # @yieldparam result [::Gapic::Operation]
2068
2103
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2101,12 +2136,13 @@ module Google
2101
2136
  # Customize the options with defaults
2102
2137
  call_metadata = @config.rpcs.list_database_operations.metadata.to_h
2103
2138
 
2104
- # Set x-goog-api-client and x-goog-user-project headers
2139
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2105
2140
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2106
2141
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2107
2142
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
2108
2143
  transports_version_send: [:rest]
2109
2144
 
2145
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2110
2146
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2111
2147
 
2112
2148
  options.apply_defaults timeout: @config.rpcs.list_database_operations.timeout,
@@ -2171,7 +2207,9 @@ module Google
2171
2207
  # * `name` - The name of the long-running operation
2172
2208
  # * `done` - False if the operation is in progress, else true.
2173
2209
  # * `metadata.@type` - the type of metadata. For example, the type string
2174
- # for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
2210
+ # for
2211
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
2212
+ # is
2175
2213
  # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
2176
2214
  # * `metadata.<field_name>` - any field in metadata.value.
2177
2215
  # `metadata.@type` must be specified first if filtering on metadata
@@ -2189,14 +2227,15 @@ module Google
2189
2227
  # * `done:true` - The operation is complete.
2190
2228
  # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
2191
2229
  # `metadata.database:prod` - Returns operations where:
2192
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2193
- # * The database the backup was taken from has a name containing the
2194
- # string "prod".
2230
+ # * The operation's metadata type is
2231
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2232
+ # * The source database name of backup contains the string "prod".
2195
2233
  # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
2196
2234
  # `(metadata.name:howl) AND` \
2197
2235
  # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
2198
2236
  # `(error:*)` - Returns operations where:
2199
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2237
+ # * The operation's metadata type is
2238
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2200
2239
  # * The backup name contains the string "howl".
2201
2240
  # * The operation started before 2018-03-28T14:50:00Z.
2202
2241
  # * The operation resulted in an error.
@@ -2204,9 +2243,9 @@ module Google
2204
2243
  # `(metadata.source_backup:test) AND` \
2205
2244
  # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
2206
2245
  # `(error:*)` - Returns operations where:
2207
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
2208
- # * The source backup of the copied backup name contains the string
2209
- # "test".
2246
+ # * The operation's metadata type is
2247
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
2248
+ # * The source backup name contains the string "test".
2210
2249
  # * The operation started before 2022-01-18T14:50:00Z.
2211
2250
  # * The operation resulted in an error.
2212
2251
  # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
@@ -2216,12 +2255,13 @@ module Google
2216
2255
  # `(metadata.source_backup:test_bkp)) AND` \
2217
2256
  # `(error:*)` - Returns operations where:
2218
2257
  # * The operation's metadata matches either of criteria:
2219
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} AND the
2220
- # database the backup was taken from has name containing string
2258
+ # * The operation's metadata type is
2259
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
2260
+ # AND the source database name of the backup contains the string
2221
2261
  # "test_db"
2222
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} AND the
2223
- # backup the backup was copied from has name containing string
2224
- # "test_bkp"
2262
+ # * The operation's metadata type is
2263
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}
2264
+ # AND the source backup name contains the string "test_bkp"
2225
2265
  # * The operation resulted in an error.
2226
2266
  # @param page_size [::Integer]
2227
2267
  # Number of operations to be returned in the response. If 0 or
@@ -2229,8 +2269,9 @@ module Google
2229
2269
  # @param page_token [::String]
2230
2270
  # If non-empty, `page_token` should contain a
2231
2271
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
2232
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
2233
- # same `parent` and with the same `filter`.
2272
+ # from a previous
2273
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse}
2274
+ # to the same `parent` and with the same `filter`.
2234
2275
  # @yield [result, operation] Access the result along with the TransportOperation object
2235
2276
  # @yieldparam result [::Gapic::Operation]
2236
2277
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2269,12 +2310,13 @@ module Google
2269
2310
  # Customize the options with defaults
2270
2311
  call_metadata = @config.rpcs.list_backup_operations.metadata.to_h
2271
2312
 
2272
- # Set x-goog-api-client and x-goog-user-project headers
2313
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2273
2314
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2274
2315
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2275
2316
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
2276
2317
  transports_version_send: [:rest]
2277
2318
 
2319
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2278
2320
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2279
2321
 
2280
2322
  options.apply_defaults timeout: @config.rpcs.list_backup_operations.timeout,
@@ -2315,14 +2357,15 @@ module Google
2315
2357
  # @param parent [::String]
2316
2358
  # Required. The database whose roles should be listed.
2317
2359
  # Values are of the form
2318
- # `projects/<project>/instances/<instance>/databases/<database>/databaseRoles`.
2360
+ # `projects/<project>/instances/<instance>/databases/<database>`.
2319
2361
  # @param page_size [::Integer]
2320
2362
  # Number of database roles to be returned in the response. If 0 or less,
2321
2363
  # defaults to the server's maximum allowed page size.
2322
2364
  # @param page_token [::String]
2323
2365
  # If non-empty, `page_token` should contain a
2324
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} from a
2325
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}.
2366
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token}
2367
+ # from a previous
2368
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}.
2326
2369
  # @yield [result, operation] Access the result along with the TransportOperation object
2327
2370
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>]
2328
2371
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2361,12 +2404,13 @@ module Google
2361
2404
  # Customize the options with defaults
2362
2405
  call_metadata = @config.rpcs.list_database_roles.metadata.to_h
2363
2406
 
2364
- # Set x-goog-api-client and x-goog-user-project headers
2407
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2365
2408
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2366
2409
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2367
2410
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION,
2368
2411
  transports_version_send: [:rest]
2369
2412
 
2413
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2370
2414
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2371
2415
 
2372
2416
  options.apply_defaults timeout: @config.rpcs.list_database_roles.timeout,