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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,10 +34,13 @@ module Google
34
34
  # The Cloud Spanner Database Admin API can be used to:
35
35
  # * create, drop, and list databases
36
36
  # * update the schema of pre-existing databases
37
- # * create, delete and list backups for a database
37
+ # * create, delete, copy and list backups for a database
38
38
  # * restore a database from an existing backup
39
39
  #
40
40
  class Client
41
+ # @private
42
+ API_VERSION = ""
43
+
41
44
  # @private
42
45
  DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$"
43
46
 
@@ -157,6 +160,31 @@ module Google
157
160
  initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
158
161
  }
159
162
 
163
+ default_config.rpcs.create_backup_schedule.timeout = 3600.0
164
+ default_config.rpcs.create_backup_schedule.retry_policy = {
165
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
166
+ }
167
+
168
+ default_config.rpcs.get_backup_schedule.timeout = 3600.0
169
+ default_config.rpcs.get_backup_schedule.retry_policy = {
170
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
171
+ }
172
+
173
+ default_config.rpcs.update_backup_schedule.timeout = 3600.0
174
+ default_config.rpcs.update_backup_schedule.retry_policy = {
175
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
176
+ }
177
+
178
+ default_config.rpcs.delete_backup_schedule.timeout = 3600.0
179
+ default_config.rpcs.delete_backup_schedule.retry_policy = {
180
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
181
+ }
182
+
183
+ default_config.rpcs.list_backup_schedules.timeout = 3600.0
184
+ default_config.rpcs.list_backup_schedules.retry_policy = {
185
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
186
+ }
187
+
160
188
  default_config
161
189
  end
162
190
  yield @configure if block_given?
@@ -290,8 +318,9 @@ module Google
290
318
  # defaults to the server's maximum allowed page size.
291
319
  # @param page_token [::String]
292
320
  # If non-empty, `page_token` should contain a
293
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
294
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
321
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
322
+ # from a previous
323
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
295
324
  #
296
325
  # @yield [response, operation] Access the result along with the RPC operation
297
326
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
@@ -331,10 +360,11 @@ module Google
331
360
  # Customize the options with defaults
332
361
  metadata = @config.rpcs.list_databases.metadata.to_h
333
362
 
334
- # Set x-goog-api-client and x-goog-user-project headers
363
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
335
364
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
336
365
  lib_name: @config.lib_name, lib_version: @config.lib_version,
337
366
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
367
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
338
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
339
369
 
340
370
  header_params = {}
@@ -368,8 +398,8 @@ module Google
368
398
  # have a name of the format `<database_name>/operations/<operation_id>` and
369
399
  # can be used to track preparation of the database. The
370
400
  # {::Google::Longrunning::Operation#metadata metadata} field type is
371
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. The
372
- # {::Google::Longrunning::Operation#response response} field type is
401
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}.
402
+ # The {::Google::Longrunning::Operation#response response} field type is
373
403
  # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful.
374
404
  #
375
405
  # @overload create_database(request, options = nil)
@@ -402,8 +432,8 @@ module Google
402
432
  # statements execute atomically with the creation of the database:
403
433
  # if there is an error in any statement, the database is not created.
404
434
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash]
405
- # Optional. The encryption configuration for the database. If this field is not
406
- # specified, Cloud Spanner will encrypt/decrypt all data at rest using
435
+ # Optional. The encryption configuration for the database. If this field is
436
+ # not specified, Cloud Spanner will encrypt/decrypt all data at rest using
407
437
  # Google default encryption.
408
438
  # @param database_dialect [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect]
409
439
  # Optional. The dialect of the Cloud Spanner Database.
@@ -465,10 +495,11 @@ module Google
465
495
  # Customize the options with defaults
466
496
  metadata = @config.rpcs.create_database.metadata.to_h
467
497
 
468
- # Set x-goog-api-client and x-goog-user-project headers
498
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
469
499
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
470
500
  lib_name: @config.lib_name, lib_version: @config.lib_version,
471
501
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
502
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
472
503
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
504
 
474
505
  header_params = {}
@@ -552,10 +583,11 @@ module Google
552
583
  # Customize the options with defaults
553
584
  metadata = @config.rpcs.get_database.metadata.to_h
554
585
 
555
- # Set x-goog-api-client and x-goog-user-project headers
586
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
556
587
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
557
588
  lib_name: @config.lib_name, lib_version: @config.lib_version,
558
589
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
590
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
559
591
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
592
 
561
593
  header_params = {}
@@ -684,10 +716,11 @@ module Google
684
716
  # Customize the options with defaults
685
717
  metadata = @config.rpcs.update_database.metadata.to_h
686
718
 
687
- # Set x-goog-api-client and x-goog-user-project headers
719
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
688
720
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
689
721
  lib_name: @config.lib_name, lib_version: @config.lib_version,
690
722
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
723
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
691
724
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
692
725
 
693
726
  header_params = {}
@@ -722,7 +755,8 @@ module Google
722
755
  # the format `<database_name>/operations/<operation_id>` and can be used to
723
756
  # track execution of the schema change(s). The
724
757
  # {::Google::Longrunning::Operation#metadata metadata} field type is
725
- # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. The operation has no response.
758
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}.
759
+ # The operation has no response.
726
760
  #
727
761
  # @overload update_database_ddl(request, options = nil)
728
762
  # Pass arguments to `update_database_ddl` via a request object, either of type
@@ -751,18 +785,20 @@ module Google
751
785
  #
752
786
  # Specifying an explicit operation ID simplifies determining
753
787
  # whether the statements were executed in the event that the
754
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
755
- # or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
756
- # `operation_id` fields can be combined to form the
788
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
789
+ # call is replayed, or the return value is otherwise lost: the
790
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database}
791
+ # and `operation_id` fields can be combined to form the
757
792
  # {::Google::Longrunning::Operation#name name} of the resulting
758
- # {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
793
+ # {::Google::Longrunning::Operation longrunning.Operation}:
794
+ # `<database>/operations/<operation_id>`.
759
795
  #
760
796
  # `operation_id` should be unique within the database, and must be
761
797
  # a valid identifier: `[a-z][a-z0-9_]*`. Note that
762
798
  # automatically-generated operation IDs always begin with an
763
799
  # underscore. If the named operation already exists,
764
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} returns
765
- # `ALREADY_EXISTS`.
800
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
801
+ # returns `ALREADY_EXISTS`.
766
802
  # @param proto_descriptors [::String]
767
803
  # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
768
804
  # Contains a protobuf-serialized
@@ -820,10 +856,11 @@ module Google
820
856
  # Customize the options with defaults
821
857
  metadata = @config.rpcs.update_database_ddl.metadata.to_h
822
858
 
823
- # Set x-goog-api-client and x-goog-user-project headers
859
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
824
860
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
825
861
  lib_name: @config.lib_name, lib_version: @config.lib_version,
826
862
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
863
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
827
864
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
828
865
 
829
866
  header_params = {}
@@ -910,10 +947,11 @@ module Google
910
947
  # Customize the options with defaults
911
948
  metadata = @config.rpcs.drop_database.metadata.to_h
912
949
 
913
- # Set x-goog-api-client and x-goog-user-project headers
950
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
914
951
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
915
952
  lib_name: @config.lib_name, lib_version: @config.lib_version,
916
953
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
954
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
917
955
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
918
956
 
919
957
  header_params = {}
@@ -999,10 +1037,11 @@ module Google
999
1037
  # Customize the options with defaults
1000
1038
  metadata = @config.rpcs.get_database_ddl.metadata.to_h
1001
1039
 
1002
- # Set x-goog-api-client and x-goog-user-project headers
1040
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1003
1041
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1004
1042
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1005
1043
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1044
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1006
1045
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1007
1046
 
1008
1047
  header_params = {}
@@ -1102,10 +1141,11 @@ module Google
1102
1141
  # Customize the options with defaults
1103
1142
  metadata = @config.rpcs.set_iam_policy.metadata.to_h
1104
1143
 
1105
- # Set x-goog-api-client and x-goog-user-project headers
1144
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1106
1145
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1107
1146
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1108
1147
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1148
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1109
1149
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1110
1150
 
1111
1151
  header_params = {}
@@ -1198,10 +1238,11 @@ module Google
1198
1238
  # Customize the options with defaults
1199
1239
  metadata = @config.rpcs.get_iam_policy.metadata.to_h
1200
1240
 
1201
- # Set x-goog-api-client and x-goog-user-project headers
1241
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1202
1242
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1203
1243
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1204
1244
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1245
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1205
1246
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1206
1247
 
1207
1248
  header_params = {}
@@ -1298,10 +1339,11 @@ module Google
1298
1339
  # Customize the options with defaults
1299
1340
  metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1300
1341
 
1301
- # Set x-goog-api-client and x-goog-user-project headers
1342
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1302
1343
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1303
1344
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1304
1345
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1346
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1305
1347
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1306
1348
 
1307
1349
  header_params = {}
@@ -1335,12 +1377,12 @@ module Google
1335
1377
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
1336
1378
  # and can be used to track creation of the backup. The
1337
1379
  # {::Google::Longrunning::Operation#metadata metadata} field type is
1338
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. The
1339
- # {::Google::Longrunning::Operation#response response} field type is
1340
- # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
1341
- # creation and delete the backup.
1342
- # There can be only one pending backup creation per database. Backup creation
1343
- # of different databases can run concurrently.
1380
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
1381
+ # The {::Google::Longrunning::Operation#response response} field type is
1382
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
1383
+ # Cancelling the returned operation will stop the creation and delete the
1384
+ # backup. There can be only one pending backup creation per database. Backup
1385
+ # creation of different databases can run concurrently.
1344
1386
  #
1345
1387
  # @overload create_backup(request, options = nil)
1346
1388
  # Pass arguments to `create_backup` via a request object, either of type
@@ -1371,11 +1413,11 @@ module Google
1371
1413
  # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash]
1372
1414
  # Required. The backup to create.
1373
1415
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash]
1374
- # Optional. The encryption configuration used to encrypt the backup. If this field is
1375
- # not specified, the backup will use the same
1376
- # encryption configuration as the database by default, namely
1377
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} =
1378
- # `USE_DATABASE_ENCRYPTION`.
1416
+ # Optional. The encryption configuration used to encrypt the backup. If this
1417
+ # field is not specified, the backup will use the same encryption
1418
+ # configuration as the database by default, namely
1419
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
1420
+ # = `USE_DATABASE_ENCRYPTION`.
1379
1421
  #
1380
1422
  # @yield [response, operation] Access the result along with the RPC operation
1381
1423
  # @yieldparam response [::Gapic::Operation]
@@ -1418,10 +1460,11 @@ module Google
1418
1460
  # Customize the options with defaults
1419
1461
  metadata = @config.rpcs.create_backup.metadata.to_h
1420
1462
 
1421
- # Set x-goog-api-client and x-goog-user-project headers
1463
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1422
1464
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1423
1465
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1424
1466
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1467
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1425
1468
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1426
1469
 
1427
1470
  header_params = {}
@@ -1459,9 +1502,10 @@ module Google
1459
1502
  # The {::Google::Longrunning::Operation#metadata metadata} field type is
1460
1503
  # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
1461
1504
  # The {::Google::Longrunning::Operation#response response} field type is
1462
- # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
1463
- # copying and delete the backup.
1464
- # Concurrent CopyBackup requests can run on the same source backup.
1505
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
1506
+ # Cancelling the returned operation will stop the copying and delete the
1507
+ # destination backup. Concurrent CopyBackup requests can run on the same
1508
+ # source backup.
1465
1509
  #
1466
1510
  # @overload copy_backup(request, options = nil)
1467
1511
  # Pass arguments to `copy_backup` via a request object, either of type
@@ -1479,8 +1523,8 @@ module Google
1479
1523
  # the default parameter values, pass an empty Hash as a request object (see above).
1480
1524
  #
1481
1525
  # @param parent [::String]
1482
- # Required. The name of the destination instance that will contain the backup copy.
1483
- # Values are of the form: `projects/<project>/instances/<instance>`.
1526
+ # Required. The name of the destination instance that will contain the backup
1527
+ # copy. Values are of the form: `projects/<project>/instances/<instance>`.
1484
1528
  # @param backup_id [::String]
1485
1529
  # Required. The id of the backup copy.
1486
1530
  # The `backup_id` appended to `parent` forms the full backup_uri of the form
@@ -1499,11 +1543,11 @@ module Google
1499
1543
  # passed, the backup is eligible to be automatically deleted by Cloud Spanner
1500
1544
  # to free the resources used by the backup.
1501
1545
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig, ::Hash]
1502
- # Optional. The encryption configuration used to encrypt the backup. If this field is
1503
- # not specified, the backup will use the same
1504
- # encryption configuration as the source backup by default, namely
1505
- # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} =
1506
- # `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1546
+ # Optional. The encryption configuration used to encrypt the backup. If this
1547
+ # field is not specified, the backup will use the same encryption
1548
+ # configuration as the source backup by default, namely
1549
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type}
1550
+ # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1507
1551
  #
1508
1552
  # @yield [response, operation] Access the result along with the RPC operation
1509
1553
  # @yieldparam response [::Gapic::Operation]
@@ -1546,10 +1590,11 @@ module Google
1546
1590
  # Customize the options with defaults
1547
1591
  metadata = @config.rpcs.copy_backup.metadata.to_h
1548
1592
 
1549
- # Set x-goog-api-client and x-goog-user-project headers
1593
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1550
1594
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1551
1595
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1552
1596
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1597
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1553
1598
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1554
1599
 
1555
1600
  header_params = {}
@@ -1578,7 +1623,8 @@ module Google
1578
1623
  end
1579
1624
 
1580
1625
  ##
1581
- # Gets metadata on a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1626
+ # Gets metadata on a pending or completed
1627
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1582
1628
  #
1583
1629
  # @overload get_backup(request, options = nil)
1584
1630
  # Pass arguments to `get_backup` via a request object, either of type
@@ -1634,10 +1680,11 @@ module Google
1634
1680
  # Customize the options with defaults
1635
1681
  metadata = @config.rpcs.get_backup.metadata.to_h
1636
1682
 
1637
- # Set x-goog-api-client and x-goog-user-project headers
1683
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1638
1684
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1639
1685
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1640
1686
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1687
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1641
1688
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1642
1689
 
1643
1690
  header_params = {}
@@ -1665,7 +1712,8 @@ module Google
1665
1712
  end
1666
1713
 
1667
1714
  ##
1668
- # Updates a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1715
+ # Updates a pending or completed
1716
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1669
1717
  #
1670
1718
  # @overload update_backup(request, options = nil)
1671
1719
  # Pass arguments to `update_backup` via a request object, either of type
@@ -1728,10 +1776,11 @@ module Google
1728
1776
  # Customize the options with defaults
1729
1777
  metadata = @config.rpcs.update_backup.metadata.to_h
1730
1778
 
1731
- # Set x-goog-api-client and x-goog-user-project headers
1779
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1732
1780
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1733
1781
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1734
1782
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1783
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1735
1784
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1736
1785
 
1737
1786
  header_params = {}
@@ -1759,7 +1808,8 @@ module Google
1759
1808
  end
1760
1809
 
1761
1810
  ##
1762
- # Deletes a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1811
+ # Deletes a pending or completed
1812
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1763
1813
  #
1764
1814
  # @overload delete_backup(request, options = nil)
1765
1815
  # Pass arguments to `delete_backup` via a request object, either of type
@@ -1815,10 +1865,11 @@ module Google
1815
1865
  # Customize the options with defaults
1816
1866
  metadata = @config.rpcs.delete_backup.metadata.to_h
1817
1867
 
1818
- # Set x-goog-api-client and x-goog-user-project headers
1868
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1819
1869
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1820
1870
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1821
1871
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1872
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1822
1873
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1823
1874
 
1824
1875
  header_params = {}
@@ -1877,7 +1928,9 @@ module Google
1877
1928
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1878
1929
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
1879
1930
  #
1880
- # The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
1931
+ # The following fields in the
1932
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
1933
+ # filtering:
1881
1934
  #
1882
1935
  # * `name`
1883
1936
  # * `database`
@@ -1909,9 +1962,10 @@ module Google
1909
1962
  # less, defaults to the server's maximum allowed page size.
1910
1963
  # @param page_token [::String]
1911
1964
  # If non-empty, `page_token` should contain a
1912
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
1913
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
1914
- # `filter`.
1965
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
1966
+ # from a previous
1967
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse}
1968
+ # to the same `parent` and with the same `filter`.
1915
1969
  #
1916
1970
  # @yield [response, operation] Access the result along with the RPC operation
1917
1971
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
@@ -1951,10 +2005,11 @@ module Google
1951
2005
  # Customize the options with defaults
1952
2006
  metadata = @config.rpcs.list_backups.metadata.to_h
1953
2007
 
1954
- # Set x-goog-api-client and x-goog-user-project headers
2008
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1955
2009
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1956
2010
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1957
2011
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2012
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1958
2013
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1959
2014
 
1960
2015
  header_params = {}
@@ -2031,12 +2086,12 @@ module Google
2031
2086
  # Name of the backup from which to restore. Values are of the form
2032
2087
  # `projects/<project>/instances/<instance>/backups/<backup>`.
2033
2088
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash]
2034
- # Optional. An encryption configuration describing the encryption type and key
2035
- # resources in Cloud KMS used to encrypt/decrypt the database to restore to.
2036
- # If this field is not specified, the restored database will use
2037
- # the same encryption configuration as the backup by default, namely
2038
- # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} =
2039
- # `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
2089
+ # Optional. An encryption configuration describing the encryption type and
2090
+ # key resources in Cloud KMS used to encrypt/decrypt the database to restore
2091
+ # to. If this field is not specified, the restored database will use the same
2092
+ # encryption configuration as the backup by default, namely
2093
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
2094
+ # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
2040
2095
  #
2041
2096
  # @yield [response, operation] Access the result along with the RPC operation
2042
2097
  # @yieldparam response [::Gapic::Operation]
@@ -2079,10 +2134,11 @@ module Google
2079
2134
  # Customize the options with defaults
2080
2135
  metadata = @config.rpcs.restore_database.metadata.to_h
2081
2136
 
2082
- # Set x-goog-api-client and x-goog-user-project headers
2137
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2083
2138
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2084
2139
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2085
2140
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2141
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2086
2142
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2087
2143
 
2088
2144
  header_params = {}
@@ -2153,7 +2209,9 @@ module Google
2153
2209
  # * `name` - The name of the long-running operation
2154
2210
  # * `done` - False if the operation is in progress, else true.
2155
2211
  # * `metadata.@type` - the type of metadata. For example, the type string
2156
- # for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
2212
+ # for
2213
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
2214
+ # is
2157
2215
  # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
2158
2216
  # * `metadata.<field_name>` - any field in metadata.value.
2159
2217
  # `metadata.@type` must be specified first, if filtering on metadata
@@ -2175,7 +2233,8 @@ module Google
2175
2233
  # `(metadata.name:restored_howl) AND` \
2176
2234
  # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
2177
2235
  # `(error:*)` - Return operations where:
2178
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
2236
+ # * The operation's metadata type is
2237
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
2179
2238
  # * The database is restored from a backup.
2180
2239
  # * The backup name contains "backup_howl".
2181
2240
  # * The restored database's name contains "restored_howl".
@@ -2187,8 +2246,9 @@ module Google
2187
2246
  # @param page_token [::String]
2188
2247
  # If non-empty, `page_token` should contain a
2189
2248
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
2190
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
2191
- # same `parent` and with the same `filter`.
2249
+ # from a previous
2250
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse}
2251
+ # to the same `parent` and with the same `filter`.
2192
2252
  #
2193
2253
  # @yield [response, operation] Access the result along with the RPC operation
2194
2254
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -2228,10 +2288,11 @@ module Google
2228
2288
  # Customize the options with defaults
2229
2289
  metadata = @config.rpcs.list_database_operations.metadata.to_h
2230
2290
 
2231
- # Set x-goog-api-client and x-goog-user-project headers
2291
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2232
2292
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2233
2293
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2234
2294
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2295
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2235
2296
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2236
2297
 
2237
2298
  header_params = {}
@@ -2305,7 +2366,9 @@ module Google
2305
2366
  # * `name` - The name of the long-running operation
2306
2367
  # * `done` - False if the operation is in progress, else true.
2307
2368
  # * `metadata.@type` - the type of metadata. For example, the type string
2308
- # for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
2369
+ # for
2370
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
2371
+ # is
2309
2372
  # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
2310
2373
  # * `metadata.<field_name>` - any field in metadata.value.
2311
2374
  # `metadata.@type` must be specified first if filtering on metadata
@@ -2323,14 +2386,15 @@ module Google
2323
2386
  # * `done:true` - The operation is complete.
2324
2387
  # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
2325
2388
  # `metadata.database:prod` - Returns operations where:
2326
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2327
- # * The database the backup was taken from has a name containing the
2328
- # string "prod".
2389
+ # * The operation's metadata type is
2390
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2391
+ # * The source database name of backup contains the string "prod".
2329
2392
  # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
2330
2393
  # `(metadata.name:howl) AND` \
2331
2394
  # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
2332
2395
  # `(error:*)` - Returns operations where:
2333
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2396
+ # * The operation's metadata type is
2397
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2334
2398
  # * The backup name contains the string "howl".
2335
2399
  # * The operation started before 2018-03-28T14:50:00Z.
2336
2400
  # * The operation resulted in an error.
@@ -2338,9 +2402,9 @@ module Google
2338
2402
  # `(metadata.source_backup:test) AND` \
2339
2403
  # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
2340
2404
  # `(error:*)` - Returns operations where:
2341
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
2342
- # * The source backup of the copied backup name contains the string
2343
- # "test".
2405
+ # * The operation's metadata type is
2406
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
2407
+ # * The source backup name contains the string "test".
2344
2408
  # * The operation started before 2022-01-18T14:50:00Z.
2345
2409
  # * The operation resulted in an error.
2346
2410
  # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
@@ -2350,12 +2414,13 @@ module Google
2350
2414
  # `(metadata.source_backup:test_bkp)) AND` \
2351
2415
  # `(error:*)` - Returns operations where:
2352
2416
  # * The operation's metadata matches either of criteria:
2353
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} AND the
2354
- # database the backup was taken from has name containing string
2417
+ # * The operation's metadata type is
2418
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
2419
+ # AND the source database name of the backup contains the string
2355
2420
  # "test_db"
2356
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} AND the
2357
- # backup the backup was copied from has name containing string
2358
- # "test_bkp"
2421
+ # * The operation's metadata type is
2422
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}
2423
+ # AND the source backup name contains the string "test_bkp"
2359
2424
  # * The operation resulted in an error.
2360
2425
  # @param page_size [::Integer]
2361
2426
  # Number of operations to be returned in the response. If 0 or
@@ -2363,8 +2428,9 @@ module Google
2363
2428
  # @param page_token [::String]
2364
2429
  # If non-empty, `page_token` should contain a
2365
2430
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
2366
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
2367
- # same `parent` and with the same `filter`.
2431
+ # from a previous
2432
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse}
2433
+ # to the same `parent` and with the same `filter`.
2368
2434
  #
2369
2435
  # @yield [response, operation] Access the result along with the RPC operation
2370
2436
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -2404,10 +2470,11 @@ module Google
2404
2470
  # Customize the options with defaults
2405
2471
  metadata = @config.rpcs.list_backup_operations.metadata.to_h
2406
2472
 
2407
- # Set x-goog-api-client and x-goog-user-project headers
2473
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2408
2474
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2409
2475
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2410
2476
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2477
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2411
2478
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2412
2479
 
2413
2480
  header_params = {}
@@ -2457,14 +2524,15 @@ module Google
2457
2524
  # @param parent [::String]
2458
2525
  # Required. The database whose roles should be listed.
2459
2526
  # Values are of the form
2460
- # `projects/<project>/instances/<instance>/databases/<database>/databaseRoles`.
2527
+ # `projects/<project>/instances/<instance>/databases/<database>`.
2461
2528
  # @param page_size [::Integer]
2462
2529
  # Number of database roles to be returned in the response. If 0 or less,
2463
2530
  # defaults to the server's maximum allowed page size.
2464
2531
  # @param page_token [::String]
2465
2532
  # If non-empty, `page_token` should contain a
2466
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} from a
2467
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}.
2533
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token}
2534
+ # from a previous
2535
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}.
2468
2536
  #
2469
2537
  # @yield [response, operation] Access the result along with the RPC operation
2470
2538
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>]
@@ -2504,10 +2572,11 @@ module Google
2504
2572
  # Customize the options with defaults
2505
2573
  metadata = @config.rpcs.list_database_roles.metadata.to_h
2506
2574
 
2507
- # Set x-goog-api-client and x-goog-user-project headers
2575
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2508
2576
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2509
2577
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2510
2578
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2579
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2511
2580
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2512
2581
 
2513
2582
  header_params = {}
@@ -2535,6 +2604,470 @@ module Google
2535
2604
  raise ::Google::Cloud::Error.from_error(e)
2536
2605
  end
2537
2606
 
2607
+ ##
2608
+ # Creates a new backup schedule.
2609
+ #
2610
+ # @overload create_backup_schedule(request, options = nil)
2611
+ # Pass arguments to `create_backup_schedule` via a request object, either of type
2612
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest} or an equivalent Hash.
2613
+ #
2614
+ # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, ::Hash]
2615
+ # A request object representing the call parameters. Required. To specify no
2616
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2617
+ # @param options [::Gapic::CallOptions, ::Hash]
2618
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2619
+ #
2620
+ # @overload create_backup_schedule(parent: nil, backup_schedule_id: nil, backup_schedule: nil)
2621
+ # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at
2622
+ # least one keyword argument is required. To specify no parameters, or to keep all
2623
+ # the default parameter values, pass an empty Hash as a request object (see above).
2624
+ #
2625
+ # @param parent [::String]
2626
+ # Required. The name of the database that this backup schedule applies to.
2627
+ # @param backup_schedule_id [::String]
2628
+ # Required. The Id to use for the backup schedule. The `backup_schedule_id`
2629
+ # appended to `parent` forms the full backup schedule name of the form
2630
+ # `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
2631
+ # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash]
2632
+ # Required. The backup schedule to create.
2633
+ #
2634
+ # @yield [response, operation] Access the result along with the RPC operation
2635
+ # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
2636
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2637
+ #
2638
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
2639
+ #
2640
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2641
+ #
2642
+ # @example Basic example
2643
+ # require "google/cloud/spanner/admin/database/v1"
2644
+ #
2645
+ # # Create a client object. The client can be reused for multiple calls.
2646
+ # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
2647
+ #
2648
+ # # Create a request. To set request fields, pass in keyword arguments.
2649
+ # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new
2650
+ #
2651
+ # # Call the create_backup_schedule method.
2652
+ # result = client.create_backup_schedule request
2653
+ #
2654
+ # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.
2655
+ # p result
2656
+ #
2657
+ def create_backup_schedule request, options = nil
2658
+ raise ::ArgumentError, "request must be provided" if request.nil?
2659
+
2660
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest
2661
+
2662
+ # Converts hash and nil to an options object
2663
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2664
+
2665
+ # Customize the options with defaults
2666
+ metadata = @config.rpcs.create_backup_schedule.metadata.to_h
2667
+
2668
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2669
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2670
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2671
+ gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2672
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2673
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2674
+
2675
+ header_params = {}
2676
+ if request.parent
2677
+ header_params["parent"] = request.parent
2678
+ end
2679
+
2680
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2681
+ metadata[:"x-goog-request-params"] ||= request_params_header
2682
+
2683
+ options.apply_defaults timeout: @config.rpcs.create_backup_schedule.timeout,
2684
+ metadata: metadata,
2685
+ retry_policy: @config.rpcs.create_backup_schedule.retry_policy
2686
+
2687
+ options.apply_defaults timeout: @config.timeout,
2688
+ metadata: @config.metadata,
2689
+ retry_policy: @config.retry_policy
2690
+
2691
+ @database_admin_stub.call_rpc :create_backup_schedule, request, options: options do |response, operation|
2692
+ yield response, operation if block_given?
2693
+ return response
2694
+ end
2695
+ rescue ::GRPC::BadStatus => e
2696
+ raise ::Google::Cloud::Error.from_error(e)
2697
+ end
2698
+
2699
+ ##
2700
+ # Gets backup schedule for the input schedule name.
2701
+ #
2702
+ # @overload get_backup_schedule(request, options = nil)
2703
+ # Pass arguments to `get_backup_schedule` via a request object, either of type
2704
+ # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest} or an equivalent Hash.
2705
+ #
2706
+ # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, ::Hash]
2707
+ # A request object representing the call parameters. Required. To specify no
2708
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2709
+ # @param options [::Gapic::CallOptions, ::Hash]
2710
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2711
+ #
2712
+ # @overload get_backup_schedule(name: nil)
2713
+ # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at
2714
+ # least one keyword argument is required. To specify no parameters, or to keep all
2715
+ # the default parameter values, pass an empty Hash as a request object (see above).
2716
+ #
2717
+ # @param name [::String]
2718
+ # Required. The name of the schedule to retrieve.
2719
+ # Values are of the form
2720
+ # `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
2721
+ #
2722
+ # @yield [response, operation] Access the result along with the RPC operation
2723
+ # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
2724
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2725
+ #
2726
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
2727
+ #
2728
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2729
+ #
2730
+ # @example Basic example
2731
+ # require "google/cloud/spanner/admin/database/v1"
2732
+ #
2733
+ # # Create a client object. The client can be reused for multiple calls.
2734
+ # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
2735
+ #
2736
+ # # Create a request. To set request fields, pass in keyword arguments.
2737
+ # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new
2738
+ #
2739
+ # # Call the get_backup_schedule method.
2740
+ # result = client.get_backup_schedule request
2741
+ #
2742
+ # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.
2743
+ # p result
2744
+ #
2745
+ def get_backup_schedule request, options = nil
2746
+ raise ::ArgumentError, "request must be provided" if request.nil?
2747
+
2748
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest
2749
+
2750
+ # Converts hash and nil to an options object
2751
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2752
+
2753
+ # Customize the options with defaults
2754
+ metadata = @config.rpcs.get_backup_schedule.metadata.to_h
2755
+
2756
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2757
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2758
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2759
+ gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2760
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2761
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2762
+
2763
+ header_params = {}
2764
+ if request.name
2765
+ header_params["name"] = request.name
2766
+ end
2767
+
2768
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2769
+ metadata[:"x-goog-request-params"] ||= request_params_header
2770
+
2771
+ options.apply_defaults timeout: @config.rpcs.get_backup_schedule.timeout,
2772
+ metadata: metadata,
2773
+ retry_policy: @config.rpcs.get_backup_schedule.retry_policy
2774
+
2775
+ options.apply_defaults timeout: @config.timeout,
2776
+ metadata: @config.metadata,
2777
+ retry_policy: @config.retry_policy
2778
+
2779
+ @database_admin_stub.call_rpc :get_backup_schedule, request, options: options do |response, operation|
2780
+ yield response, operation if block_given?
2781
+ return response
2782
+ end
2783
+ rescue ::GRPC::BadStatus => e
2784
+ raise ::Google::Cloud::Error.from_error(e)
2785
+ end
2786
+
2787
+ ##
2788
+ # Updates a backup schedule.
2789
+ #
2790
+ # @overload update_backup_schedule(request, options = nil)
2791
+ # Pass arguments to `update_backup_schedule` via a request object, either of type
2792
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest} or an equivalent Hash.
2793
+ #
2794
+ # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, ::Hash]
2795
+ # A request object representing the call parameters. Required. To specify no
2796
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2797
+ # @param options [::Gapic::CallOptions, ::Hash]
2798
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2799
+ #
2800
+ # @overload update_backup_schedule(backup_schedule: nil, update_mask: nil)
2801
+ # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at
2802
+ # least one keyword argument is required. To specify no parameters, or to keep all
2803
+ # the default parameter values, pass an empty Hash as a request object (see above).
2804
+ #
2805
+ # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash]
2806
+ # Required. The backup schedule to update. `backup_schedule.name`, and the
2807
+ # fields to be updated as specified by `update_mask` are required. Other
2808
+ # fields are ignored.
2809
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2810
+ # Required. A mask specifying which fields in the BackupSchedule resource
2811
+ # should be updated. This mask is relative to the BackupSchedule resource,
2812
+ # not to the request message. The field mask must always be
2813
+ # specified; this prevents any future fields from being erased
2814
+ # accidentally.
2815
+ #
2816
+ # @yield [response, operation] Access the result along with the RPC operation
2817
+ # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
2818
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2819
+ #
2820
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
2821
+ #
2822
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2823
+ #
2824
+ # @example Basic example
2825
+ # require "google/cloud/spanner/admin/database/v1"
2826
+ #
2827
+ # # Create a client object. The client can be reused for multiple calls.
2828
+ # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
2829
+ #
2830
+ # # Create a request. To set request fields, pass in keyword arguments.
2831
+ # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new
2832
+ #
2833
+ # # Call the update_backup_schedule method.
2834
+ # result = client.update_backup_schedule request
2835
+ #
2836
+ # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.
2837
+ # p result
2838
+ #
2839
+ def update_backup_schedule request, options = nil
2840
+ raise ::ArgumentError, "request must be provided" if request.nil?
2841
+
2842
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest
2843
+
2844
+ # Converts hash and nil to an options object
2845
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2846
+
2847
+ # Customize the options with defaults
2848
+ metadata = @config.rpcs.update_backup_schedule.metadata.to_h
2849
+
2850
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2851
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2852
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2853
+ gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2854
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2855
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2856
+
2857
+ header_params = {}
2858
+ if request.backup_schedule&.name
2859
+ header_params["backup_schedule.name"] = request.backup_schedule.name
2860
+ end
2861
+
2862
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2863
+ metadata[:"x-goog-request-params"] ||= request_params_header
2864
+
2865
+ options.apply_defaults timeout: @config.rpcs.update_backup_schedule.timeout,
2866
+ metadata: metadata,
2867
+ retry_policy: @config.rpcs.update_backup_schedule.retry_policy
2868
+
2869
+ options.apply_defaults timeout: @config.timeout,
2870
+ metadata: @config.metadata,
2871
+ retry_policy: @config.retry_policy
2872
+
2873
+ @database_admin_stub.call_rpc :update_backup_schedule, request, options: options do |response, operation|
2874
+ yield response, operation if block_given?
2875
+ return response
2876
+ end
2877
+ rescue ::GRPC::BadStatus => e
2878
+ raise ::Google::Cloud::Error.from_error(e)
2879
+ end
2880
+
2881
+ ##
2882
+ # Deletes a backup schedule.
2883
+ #
2884
+ # @overload delete_backup_schedule(request, options = nil)
2885
+ # Pass arguments to `delete_backup_schedule` via a request object, either of type
2886
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest} or an equivalent Hash.
2887
+ #
2888
+ # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Hash]
2889
+ # A request object representing the call parameters. Required. To specify no
2890
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2891
+ # @param options [::Gapic::CallOptions, ::Hash]
2892
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2893
+ #
2894
+ # @overload delete_backup_schedule(name: nil)
2895
+ # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at
2896
+ # least one keyword argument is required. To specify no parameters, or to keep all
2897
+ # the default parameter values, pass an empty Hash as a request object (see above).
2898
+ #
2899
+ # @param name [::String]
2900
+ # Required. The name of the schedule to delete.
2901
+ # Values are of the form
2902
+ # `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
2903
+ #
2904
+ # @yield [response, operation] Access the result along with the RPC operation
2905
+ # @yieldparam response [::Google::Protobuf::Empty]
2906
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2907
+ #
2908
+ # @return [::Google::Protobuf::Empty]
2909
+ #
2910
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2911
+ #
2912
+ # @example Basic example
2913
+ # require "google/cloud/spanner/admin/database/v1"
2914
+ #
2915
+ # # Create a client object. The client can be reused for multiple calls.
2916
+ # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
2917
+ #
2918
+ # # Create a request. To set request fields, pass in keyword arguments.
2919
+ # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new
2920
+ #
2921
+ # # Call the delete_backup_schedule method.
2922
+ # result = client.delete_backup_schedule request
2923
+ #
2924
+ # # The returned object is of type Google::Protobuf::Empty.
2925
+ # p result
2926
+ #
2927
+ def delete_backup_schedule request, options = nil
2928
+ raise ::ArgumentError, "request must be provided" if request.nil?
2929
+
2930
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest
2931
+
2932
+ # Converts hash and nil to an options object
2933
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2934
+
2935
+ # Customize the options with defaults
2936
+ metadata = @config.rpcs.delete_backup_schedule.metadata.to_h
2937
+
2938
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2939
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2940
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2941
+ gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2942
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2943
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2944
+
2945
+ header_params = {}
2946
+ if request.name
2947
+ header_params["name"] = request.name
2948
+ end
2949
+
2950
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2951
+ metadata[:"x-goog-request-params"] ||= request_params_header
2952
+
2953
+ options.apply_defaults timeout: @config.rpcs.delete_backup_schedule.timeout,
2954
+ metadata: metadata,
2955
+ retry_policy: @config.rpcs.delete_backup_schedule.retry_policy
2956
+
2957
+ options.apply_defaults timeout: @config.timeout,
2958
+ metadata: @config.metadata,
2959
+ retry_policy: @config.retry_policy
2960
+
2961
+ @database_admin_stub.call_rpc :delete_backup_schedule, request, options: options do |response, operation|
2962
+ yield response, operation if block_given?
2963
+ return response
2964
+ end
2965
+ rescue ::GRPC::BadStatus => e
2966
+ raise ::Google::Cloud::Error.from_error(e)
2967
+ end
2968
+
2969
+ ##
2970
+ # Lists all the backup schedules for the database.
2971
+ #
2972
+ # @overload list_backup_schedules(request, options = nil)
2973
+ # Pass arguments to `list_backup_schedules` via a request object, either of type
2974
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest} or an equivalent Hash.
2975
+ #
2976
+ # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Hash]
2977
+ # A request object representing the call parameters. Required. To specify no
2978
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2979
+ # @param options [::Gapic::CallOptions, ::Hash]
2980
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2981
+ #
2982
+ # @overload list_backup_schedules(parent: nil, page_size: nil, page_token: nil)
2983
+ # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at
2984
+ # least one keyword argument is required. To specify no parameters, or to keep all
2985
+ # the default parameter values, pass an empty Hash as a request object (see above).
2986
+ #
2987
+ # @param parent [::String]
2988
+ # Required. Database is the parent resource whose backup schedules should be
2989
+ # listed. Values are of the form
2990
+ # projects/<project>/instances/<instance>/databases/<database>
2991
+ # @param page_size [::Integer]
2992
+ # Optional. Number of backup schedules to be returned in the response. If 0
2993
+ # or less, defaults to the server's maximum allowed page size.
2994
+ # @param page_token [::String]
2995
+ # Optional. If non-empty, `page_token` should contain a
2996
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token}
2997
+ # from a previous
2998
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse}
2999
+ # to the same `parent`.
3000
+ #
3001
+ # @yield [response, operation] Access the result along with the RPC operation
3002
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>]
3003
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3004
+ #
3005
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>]
3006
+ #
3007
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3008
+ #
3009
+ # @example Basic example
3010
+ # require "google/cloud/spanner/admin/database/v1"
3011
+ #
3012
+ # # Create a client object. The client can be reused for multiple calls.
3013
+ # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
3014
+ #
3015
+ # # Create a request. To set request fields, pass in keyword arguments.
3016
+ # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new
3017
+ #
3018
+ # # Call the list_backup_schedules method.
3019
+ # result = client.list_backup_schedules request
3020
+ #
3021
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3022
+ # # over elements, and API calls will be issued to fetch pages as needed.
3023
+ # result.each do |item|
3024
+ # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.
3025
+ # p item
3026
+ # end
3027
+ #
3028
+ def list_backup_schedules request, options = nil
3029
+ raise ::ArgumentError, "request must be provided" if request.nil?
3030
+
3031
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest
3032
+
3033
+ # Converts hash and nil to an options object
3034
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3035
+
3036
+ # Customize the options with defaults
3037
+ metadata = @config.rpcs.list_backup_schedules.metadata.to_h
3038
+
3039
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3040
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3041
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3042
+ gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
3043
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3044
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3045
+
3046
+ header_params = {}
3047
+ if request.parent
3048
+ header_params["parent"] = request.parent
3049
+ end
3050
+
3051
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3052
+ metadata[:"x-goog-request-params"] ||= request_params_header
3053
+
3054
+ options.apply_defaults timeout: @config.rpcs.list_backup_schedules.timeout,
3055
+ metadata: metadata,
3056
+ retry_policy: @config.rpcs.list_backup_schedules.retry_policy
3057
+
3058
+ options.apply_defaults timeout: @config.timeout,
3059
+ metadata: @config.metadata,
3060
+ retry_policy: @config.retry_policy
3061
+
3062
+ @database_admin_stub.call_rpc :list_backup_schedules, request, options: options do |response, operation|
3063
+ response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_backup_schedules, request, response, operation, options
3064
+ yield response, operation if block_given?
3065
+ return response
3066
+ end
3067
+ rescue ::GRPC::BadStatus => e
3068
+ raise ::Google::Cloud::Error.from_error(e)
3069
+ end
3070
+
2538
3071
  ##
2539
3072
  # Configuration class for the DatabaseAdmin API.
2540
3073
  #
@@ -2788,6 +3321,31 @@ module Google
2788
3321
  # @return [::Gapic::Config::Method]
2789
3322
  #
2790
3323
  attr_reader :list_database_roles
3324
+ ##
3325
+ # RPC-specific configuration for `create_backup_schedule`
3326
+ # @return [::Gapic::Config::Method]
3327
+ #
3328
+ attr_reader :create_backup_schedule
3329
+ ##
3330
+ # RPC-specific configuration for `get_backup_schedule`
3331
+ # @return [::Gapic::Config::Method]
3332
+ #
3333
+ attr_reader :get_backup_schedule
3334
+ ##
3335
+ # RPC-specific configuration for `update_backup_schedule`
3336
+ # @return [::Gapic::Config::Method]
3337
+ #
3338
+ attr_reader :update_backup_schedule
3339
+ ##
3340
+ # RPC-specific configuration for `delete_backup_schedule`
3341
+ # @return [::Gapic::Config::Method]
3342
+ #
3343
+ attr_reader :delete_backup_schedule
3344
+ ##
3345
+ # RPC-specific configuration for `list_backup_schedules`
3346
+ # @return [::Gapic::Config::Method]
3347
+ #
3348
+ attr_reader :list_backup_schedules
2791
3349
 
2792
3350
  # @private
2793
3351
  def initialize parent_rpcs = nil
@@ -2831,6 +3389,16 @@ module Google
2831
3389
  @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config
2832
3390
  list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles
2833
3391
  @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config
3392
+ create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule
3393
+ @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config
3394
+ get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule
3395
+ @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config
3396
+ update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule
3397
+ @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config
3398
+ delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule
3399
+ @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config
3400
+ list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules
3401
+ @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config
2834
3402
 
2835
3403
  yield self if block_given?
2836
3404
  end