google-cloud-spanner-admin-database-v1 0.1.3 → 0.5.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.
@@ -37,3 +37,6 @@ module Google
37
37
  end
38
38
  end
39
39
  end
40
+
41
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
42
+ require "google/cloud/spanner/admin/database/v1/_helpers" if ::File.file? helper_path
@@ -67,7 +67,7 @@ module Google
67
67
  parent_config = while namespace.any?
68
68
  parent_name = namespace.join "::"
69
69
  parent_const = const_get parent_name
70
- break parent_const.configure if parent_const&.respond_to? :configure
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
71
  namespace.pop
72
72
  end
73
73
  default_config = Client::Configuration.new parent_config
@@ -75,9 +75,9 @@ module Google
75
75
  default_config.rpcs.list_databases.timeout = 3600.0
76
76
  default_config.rpcs.list_databases.retry_policy = {
77
77
  initial_delay: 1.0,
78
- max_delay: 32.0,
79
- multiplier: 1.3,
80
- retry_codes: [14, 4]
78
+ max_delay: 32.0,
79
+ multiplier: 1.3,
80
+ retry_codes: [14, 4]
81
81
  }
82
82
 
83
83
  default_config.rpcs.create_database.timeout = 3600.0
@@ -85,33 +85,33 @@ module Google
85
85
  default_config.rpcs.get_database.timeout = 3600.0
86
86
  default_config.rpcs.get_database.retry_policy = {
87
87
  initial_delay: 1.0,
88
- max_delay: 32.0,
89
- multiplier: 1.3,
90
- retry_codes: [14, 4]
88
+ max_delay: 32.0,
89
+ multiplier: 1.3,
90
+ retry_codes: [14, 4]
91
91
  }
92
92
 
93
93
  default_config.rpcs.update_database_ddl.timeout = 3600.0
94
94
  default_config.rpcs.update_database_ddl.retry_policy = {
95
95
  initial_delay: 1.0,
96
- max_delay: 32.0,
97
- multiplier: 1.3,
98
- retry_codes: [14, 4]
96
+ max_delay: 32.0,
97
+ multiplier: 1.3,
98
+ retry_codes: [14, 4]
99
99
  }
100
100
 
101
101
  default_config.rpcs.drop_database.timeout = 3600.0
102
102
  default_config.rpcs.drop_database.retry_policy = {
103
103
  initial_delay: 1.0,
104
- max_delay: 32.0,
105
- multiplier: 1.3,
106
- retry_codes: [14, 4]
104
+ max_delay: 32.0,
105
+ multiplier: 1.3,
106
+ retry_codes: [14, 4]
107
107
  }
108
108
 
109
109
  default_config.rpcs.get_database_ddl.timeout = 3600.0
110
110
  default_config.rpcs.get_database_ddl.retry_policy = {
111
111
  initial_delay: 1.0,
112
- max_delay: 32.0,
113
- multiplier: 1.3,
114
- retry_codes: [14, 4]
112
+ max_delay: 32.0,
113
+ multiplier: 1.3,
114
+ retry_codes: [14, 4]
115
115
  }
116
116
 
117
117
  default_config.rpcs.set_iam_policy.timeout = 30.0
@@ -119,9 +119,9 @@ module Google
119
119
  default_config.rpcs.get_iam_policy.timeout = 30.0
120
120
  default_config.rpcs.get_iam_policy.retry_policy = {
121
121
  initial_delay: 1.0,
122
- max_delay: 32.0,
123
- multiplier: 1.3,
124
- retry_codes: [14, 4]
122
+ max_delay: 32.0,
123
+ multiplier: 1.3,
124
+ retry_codes: [14, 4]
125
125
  }
126
126
 
127
127
  default_config.rpcs.test_iam_permissions.timeout = 30.0
@@ -131,33 +131,33 @@ module Google
131
131
  default_config.rpcs.get_backup.timeout = 3600.0
132
132
  default_config.rpcs.get_backup.retry_policy = {
133
133
  initial_delay: 1.0,
134
- max_delay: 32.0,
135
- multiplier: 1.3,
136
- retry_codes: [14, 4]
134
+ max_delay: 32.0,
135
+ multiplier: 1.3,
136
+ retry_codes: [14, 4]
137
137
  }
138
138
 
139
139
  default_config.rpcs.update_backup.timeout = 3600.0
140
140
  default_config.rpcs.update_backup.retry_policy = {
141
141
  initial_delay: 1.0,
142
- max_delay: 32.0,
143
- multiplier: 1.3,
144
- retry_codes: [14, 4]
142
+ max_delay: 32.0,
143
+ multiplier: 1.3,
144
+ retry_codes: [14, 4]
145
145
  }
146
146
 
147
147
  default_config.rpcs.delete_backup.timeout = 3600.0
148
148
  default_config.rpcs.delete_backup.retry_policy = {
149
149
  initial_delay: 1.0,
150
- max_delay: 32.0,
151
- multiplier: 1.3,
152
- retry_codes: [14, 4]
150
+ max_delay: 32.0,
151
+ multiplier: 1.3,
152
+ retry_codes: [14, 4]
153
153
  }
154
154
 
155
155
  default_config.rpcs.list_backups.timeout = 3600.0
156
156
  default_config.rpcs.list_backups.retry_policy = {
157
157
  initial_delay: 1.0,
158
- max_delay: 32.0,
159
- multiplier: 1.3,
160
- retry_codes: [14, 4]
158
+ max_delay: 32.0,
159
+ multiplier: 1.3,
160
+ retry_codes: [14, 4]
161
161
  }
162
162
 
163
163
  default_config.rpcs.restore_database.timeout = 3600.0
@@ -165,17 +165,17 @@ module Google
165
165
  default_config.rpcs.list_database_operations.timeout = 3600.0
166
166
  default_config.rpcs.list_database_operations.retry_policy = {
167
167
  initial_delay: 1.0,
168
- max_delay: 32.0,
169
- multiplier: 1.3,
170
- retry_codes: [14, 4]
168
+ max_delay: 32.0,
169
+ multiplier: 1.3,
170
+ retry_codes: [14, 4]
171
171
  }
172
172
 
173
173
  default_config.rpcs.list_backup_operations.timeout = 3600.0
174
174
  default_config.rpcs.list_backup_operations.retry_policy = {
175
175
  initial_delay: 1.0,
176
- max_delay: 32.0,
177
- multiplier: 1.3,
178
- retry_codes: [14, 4]
176
+ max_delay: 32.0,
177
+ multiplier: 1.3,
178
+ retry_codes: [14, 4]
179
179
  }
180
180
 
181
181
  default_config
@@ -239,7 +239,13 @@ module Google
239
239
 
240
240
  # Create credentials
241
241
  credentials = @config.credentials
242
- credentials ||= Credentials.default scope: @config.scope
242
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
243
+ # but only if the default endpoint does not have a region prefix.
244
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
245
+ @config.endpoint == Client.configure.endpoint &&
246
+ !@config.endpoint.split(".").first.include?("-")
247
+ credentials ||= Credentials.default scope: @config.scope,
248
+ enable_self_signed_jwt: enable_self_signed_jwt
243
249
  if credentials.is_a?(String) || credentials.is_a?(Hash)
244
250
  credentials = Credentials.new credentials, scope: @config.scope
245
251
  end
@@ -295,8 +301,9 @@ module Google
295
301
  # defaults to the server's maximum allowed page size.
296
302
  # @param page_token [::String]
297
303
  # If non-empty, `page_token` should contain a
298
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
299
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
304
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
305
+ # from a previous
306
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
300
307
  #
301
308
  # @yield [response, operation] Access the result along with the RPC operation
302
309
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
@@ -350,8 +357,8 @@ module Google
350
357
  # have a name of the format `<database_name>/operations/<operation_id>` and
351
358
  # can be used to track preparation of the database. The
352
359
  # {::Google::Longrunning::Operation#metadata metadata} field type is
353
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. The
354
- # {::Google::Longrunning::Operation#response response} field type is
360
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}.
361
+ # The {::Google::Longrunning::Operation#response response} field type is
355
362
  # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful.
356
363
  #
357
364
  # @overload create_database(request, options = nil)
@@ -364,7 +371,7 @@ module Google
364
371
  # @param options [::Gapic::CallOptions, ::Hash]
365
372
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
366
373
  #
367
- # @overload create_database(parent: nil, create_statement: nil, extra_statements: nil)
374
+ # @overload create_database(parent: nil, create_statement: nil, extra_statements: nil, encryption_config: nil)
368
375
  # Pass arguments to `create_database` via keyword arguments. Note that at
369
376
  # least one keyword argument is required. To specify no parameters, or to keep all
370
377
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -383,6 +390,10 @@ module Google
383
390
  # database. Statements can create tables, indexes, etc. These
384
391
  # statements execute atomically with the creation of the database:
385
392
  # if there is an error in any statement, the database is not created.
393
+ # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash]
394
+ # Optional. The encryption configuration for the database. If this field is
395
+ # not specified, Cloud Spanner will encrypt/decrypt all data at rest using
396
+ # Google default encryption.
386
397
  #
387
398
  # @yield [response, operation] Access the result along with the RPC operation
388
399
  # @yieldparam response [::Gapic::Operation]
@@ -504,7 +515,8 @@ module Google
504
515
  # the format `<database_name>/operations/<operation_id>` and can be used to
505
516
  # track execution of the schema change(s). The
506
517
  # {::Google::Longrunning::Operation#metadata metadata} field type is
507
- # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. The operation has no response.
518
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}.
519
+ # The operation has no response.
508
520
  #
509
521
  # @overload update_database_ddl(request, options = nil)
510
522
  # Pass arguments to `update_database_ddl` via a request object, either of type
@@ -533,18 +545,20 @@ module Google
533
545
  #
534
546
  # Specifying an explicit operation ID simplifies determining
535
547
  # whether the statements were executed in the event that the
536
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
537
- # or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
538
- # `operation_id` fields can be combined to form the
548
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
549
+ # call is replayed, or the return value is otherwise lost: the
550
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database}
551
+ # and `operation_id` fields can be combined to form the
539
552
  # {::Google::Longrunning::Operation#name name} of the resulting
540
- # {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
553
+ # {::Google::Longrunning::Operation longrunning.Operation}:
554
+ # `<database>/operations/<operation_id>`.
541
555
  #
542
556
  # `operation_id` should be unique within the database, and must be
543
557
  # a valid identifier: `[a-z][a-z0-9_]*`. Note that
544
558
  # automatically-generated operation IDs always begin with an
545
559
  # underscore. If the named operation already exists,
546
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} returns
547
- # `ALREADY_EXISTS`.
560
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
561
+ # returns `ALREADY_EXISTS`.
548
562
  #
549
563
  # @yield [response, operation] Access the result along with the RPC operation
550
564
  # @yieldparam response [::Gapic::Operation]
@@ -682,6 +696,8 @@ module Google
682
696
  #
683
697
  # @param database [::String]
684
698
  # Required. The database whose schema we wish to get.
699
+ # Values are of the form
700
+ # `projects/<project>/instances/<instance>/databases/<database>`
685
701
  #
686
702
  # @yield [response, operation] Access the result along with the RPC operation
687
703
  # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse]
@@ -971,12 +987,12 @@ module Google
971
987
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
972
988
  # and can be used to track creation of the backup. The
973
989
  # {::Google::Longrunning::Operation#metadata metadata} field type is
974
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. The
975
- # {::Google::Longrunning::Operation#response response} field type is
976
- # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
977
- # creation and delete the backup.
978
- # There can be only one pending backup creation per database. Backup creation
979
- # of different databases can run concurrently.
990
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
991
+ # The {::Google::Longrunning::Operation#response response} field type is
992
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
993
+ # Cancelling the returned operation will stop the creation and delete the
994
+ # backup. There can be only one pending backup creation per database. Backup
995
+ # creation of different databases can run concurrently.
980
996
  #
981
997
  # @overload create_backup(request, options = nil)
982
998
  # Pass arguments to `create_backup` via a request object, either of type
@@ -988,7 +1004,7 @@ module Google
988
1004
  # @param options [::Gapic::CallOptions, ::Hash]
989
1005
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
990
1006
  #
991
- # @overload create_backup(parent: nil, backup_id: nil, backup: nil)
1007
+ # @overload create_backup(parent: nil, backup_id: nil, backup: nil, encryption_config: nil)
992
1008
  # Pass arguments to `create_backup` via keyword arguments. Note that at
993
1009
  # least one keyword argument is required. To specify no parameters, or to keep all
994
1010
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1006,6 +1022,12 @@ module Google
1006
1022
  # `projects/<project>/instances/<instance>/backups/<backup_id>`.
1007
1023
  # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash]
1008
1024
  # Required. The backup to create.
1025
+ # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash]
1026
+ # Optional. The encryption configuration used to encrypt the backup. If this
1027
+ # field is not specified, the backup will use the same encryption
1028
+ # configuration as the database by default, namely
1029
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
1030
+ # = `USE_DATABASE_ENCRYPTION`.
1009
1031
  #
1010
1032
  # @yield [response, operation] Access the result along with the RPC operation
1011
1033
  # @yieldparam response [::Gapic::Operation]
@@ -1054,7 +1076,8 @@ module Google
1054
1076
  end
1055
1077
 
1056
1078
  ##
1057
- # Gets metadata on a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1079
+ # Gets metadata on a pending or completed
1080
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1058
1081
  #
1059
1082
  # @overload get_backup(request, options = nil)
1060
1083
  # Pass arguments to `get_backup` via a request object, either of type
@@ -1122,7 +1145,8 @@ module Google
1122
1145
  end
1123
1146
 
1124
1147
  ##
1125
- # Updates a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1148
+ # Updates a pending or completed
1149
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1126
1150
  #
1127
1151
  # @overload update_backup(request, options = nil)
1128
1152
  # Pass arguments to `update_backup` via a request object, either of type
@@ -1197,7 +1221,8 @@ module Google
1197
1221
  end
1198
1222
 
1199
1223
  ##
1200
- # Deletes a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1224
+ # Deletes a pending or completed
1225
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1201
1226
  #
1202
1227
  # @overload delete_backup(request, options = nil)
1203
1228
  # Pass arguments to `delete_backup` via a request object, either of type
@@ -1296,13 +1321,16 @@ module Google
1296
1321
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1297
1322
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
1298
1323
  #
1299
- # The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
1324
+ # The following fields in the
1325
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
1326
+ # filtering:
1300
1327
  #
1301
1328
  # * `name`
1302
1329
  # * `database`
1303
1330
  # * `state`
1304
- # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1305
- # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1331
+ # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1332
+ # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1333
+ # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1306
1334
  # * `size_bytes`
1307
1335
  #
1308
1336
  # You can combine multiple expressions by enclosing each expression in
@@ -1327,9 +1355,10 @@ module Google
1327
1355
  # less, defaults to the server's maximum allowed page size.
1328
1356
  # @param page_token [::String]
1329
1357
  # If non-empty, `page_token` should contain a
1330
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
1331
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
1332
- # `filter`.
1358
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
1359
+ # from a previous
1360
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse}
1361
+ # to the same `parent` and with the same `filter`.
1333
1362
  #
1334
1363
  # @yield [response, operation] Access the result along with the RPC operation
1335
1364
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
@@ -1406,7 +1435,7 @@ module Google
1406
1435
  # @param options [::Gapic::CallOptions, ::Hash]
1407
1436
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1408
1437
  #
1409
- # @overload restore_database(parent: nil, database_id: nil, backup: nil)
1438
+ # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil)
1410
1439
  # Pass arguments to `restore_database` via keyword arguments. Note that at
1411
1440
  # least one keyword argument is required. To specify no parameters, or to keep all
1412
1441
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1425,6 +1454,13 @@ module Google
1425
1454
  # @param backup [::String]
1426
1455
  # Name of the backup from which to restore. Values are of the form
1427
1456
  # `projects/<project>/instances/<instance>/backups/<backup>`.
1457
+ # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash]
1458
+ # Optional. An encryption configuration describing the encryption type and
1459
+ # key resources in Cloud KMS used to encrypt/decrypt the database to restore
1460
+ # to. If this field is not specified, the restored database will use the same
1461
+ # encryption configuration as the backup by default, namely
1462
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
1463
+ # = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
1428
1464
  #
1429
1465
  # @yield [response, operation] Access the result along with the RPC operation
1430
1466
  # @yieldparam response [::Gapic::Operation]
@@ -1515,7 +1551,9 @@ module Google
1515
1551
  # * `name` - The name of the long-running operation
1516
1552
  # * `done` - False if the operation is in progress, else true.
1517
1553
  # * `metadata.@type` - the type of metadata. For example, the type string
1518
- # for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
1554
+ # for
1555
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
1556
+ # is
1519
1557
  # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
1520
1558
  # * `metadata.<field_name>` - any field in metadata.value.
1521
1559
  # * `error` - Error associated with the long-running operation.
@@ -1529,13 +1567,14 @@ module Google
1529
1567
  # Here are a few examples:
1530
1568
  #
1531
1569
  # * `done:true` - The operation is complete.
1532
- # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` <br/>
1533
- # `(metadata.source_type:BACKUP) AND` <br/>
1534
- # `(metadata.backup_info.backup:backup_howl) AND` <br/>
1535
- # `(metadata.name:restored_howl) AND` <br/>
1536
- # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
1570
+ # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \
1571
+ # `(metadata.source_type:BACKUP) AND` \
1572
+ # `(metadata.backup_info.backup:backup_howl) AND` \
1573
+ # `(metadata.name:restored_howl) AND` \
1574
+ # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
1537
1575
  # `(error:*)` - Return operations where:
1538
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
1576
+ # * The operation's metadata type is
1577
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
1539
1578
  # * The database is restored from a backup.
1540
1579
  # * The backup name contains "backup_howl".
1541
1580
  # * The restored database's name contains "restored_howl".
@@ -1547,8 +1586,9 @@ module Google
1547
1586
  # @param page_token [::String]
1548
1587
  # If non-empty, `page_token` should contain a
1549
1588
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
1550
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
1551
- # same `parent` and with the same `filter`.
1589
+ # from a previous
1590
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse}
1591
+ # to the same `parent` and with the same `filter`.
1552
1592
  #
1553
1593
  # @yield [response, operation] Access the result along with the RPC operation
1554
1594
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -1642,7 +1682,9 @@ module Google
1642
1682
  # * `name` - The name of the long-running operation
1643
1683
  # * `done` - False if the operation is in progress, else true.
1644
1684
  # * `metadata.@type` - the type of metadata. For example, the type string
1645
- # for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
1685
+ # for
1686
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
1687
+ # is
1646
1688
  # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
1647
1689
  # * `metadata.<field_name>` - any field in metadata.value.
1648
1690
  # * `error` - Error associated with the long-running operation.
@@ -1658,11 +1700,12 @@ module Google
1658
1700
  # * `done:true` - The operation is complete.
1659
1701
  # * `metadata.database:prod` - The database the backup was taken from has
1660
1702
  # a name containing the string "prod".
1661
- # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` <br/>
1662
- # `(metadata.name:howl) AND` <br/>
1663
- # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
1703
+ # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
1704
+ # `(metadata.name:howl) AND` \
1705
+ # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
1664
1706
  # `(error:*)` - Returns operations where:
1665
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
1707
+ # * The operation's metadata type is
1708
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
1666
1709
  # * The backup name contains the string "howl".
1667
1710
  # * The operation started before 2018-03-28T14:50:00Z.
1668
1711
  # * The operation resulted in an error.
@@ -1672,8 +1715,9 @@ module Google
1672
1715
  # @param page_token [::String]
1673
1716
  # If non-empty, `page_token` should contain a
1674
1717
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
1675
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
1676
- # same `parent` and with the same `filter`.
1718
+ # from a previous
1719
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse}
1720
+ # to the same `parent` and with the same `filter`.
1677
1721
  #
1678
1722
  # @yield [response, operation] Access the result along with the RPC operation
1679
1723
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -1814,7 +1858,7 @@ module Google
1814
1858
  config_attr :scope, nil, ::String, ::Array, nil
1815
1859
  config_attr :lib_name, nil, ::String, nil
1816
1860
  config_attr :lib_version, nil, ::String, nil
1817
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1861
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1818
1862
  config_attr :interceptors, nil, ::Array, nil
1819
1863
  config_attr :timeout, nil, ::Numeric, nil
1820
1864
  config_attr :metadata, nil, ::Hash, nil
@@ -1835,7 +1879,7 @@ module Google
1835
1879
  def rpcs
1836
1880
  @rpcs ||= begin
1837
1881
  parent_rpcs = nil
1838
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1882
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1839
1883
  Rpcs.new parent_rpcs
1840
1884
  end
1841
1885
  end
@@ -1847,7 +1891,7 @@ module Google
1847
1891
  # Each configuration object is of type `Gapic::Config::Method` and includes
1848
1892
  # the following configuration fields:
1849
1893
  #
1850
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
1894
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1851
1895
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1852
1896
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1853
1897
  # include the following keys:
@@ -1946,39 +1990,39 @@ module Google
1946
1990
 
1947
1991
  # @private
1948
1992
  def initialize parent_rpcs = nil
1949
- list_databases_config = parent_rpcs&.list_databases if parent_rpcs&.respond_to? :list_databases
1993
+ list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases
1950
1994
  @list_databases = ::Gapic::Config::Method.new list_databases_config
1951
- create_database_config = parent_rpcs&.create_database if parent_rpcs&.respond_to? :create_database
1995
+ create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database
1952
1996
  @create_database = ::Gapic::Config::Method.new create_database_config
1953
- get_database_config = parent_rpcs&.get_database if parent_rpcs&.respond_to? :get_database
1997
+ get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database
1954
1998
  @get_database = ::Gapic::Config::Method.new get_database_config
1955
- update_database_ddl_config = parent_rpcs&.update_database_ddl if parent_rpcs&.respond_to? :update_database_ddl
1999
+ update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl
1956
2000
  @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config
1957
- drop_database_config = parent_rpcs&.drop_database if parent_rpcs&.respond_to? :drop_database
2001
+ drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database
1958
2002
  @drop_database = ::Gapic::Config::Method.new drop_database_config
1959
- get_database_ddl_config = parent_rpcs&.get_database_ddl if parent_rpcs&.respond_to? :get_database_ddl
2003
+ get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl
1960
2004
  @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config
1961
- set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
2005
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1962
2006
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1963
- get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
2007
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1964
2008
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1965
- test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
2009
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1966
2010
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1967
- create_backup_config = parent_rpcs&.create_backup if parent_rpcs&.respond_to? :create_backup
2011
+ create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
1968
2012
  @create_backup = ::Gapic::Config::Method.new create_backup_config
1969
- get_backup_config = parent_rpcs&.get_backup if parent_rpcs&.respond_to? :get_backup
2013
+ get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
1970
2014
  @get_backup = ::Gapic::Config::Method.new get_backup_config
1971
- update_backup_config = parent_rpcs&.update_backup if parent_rpcs&.respond_to? :update_backup
2015
+ update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
1972
2016
  @update_backup = ::Gapic::Config::Method.new update_backup_config
1973
- delete_backup_config = parent_rpcs&.delete_backup if parent_rpcs&.respond_to? :delete_backup
2017
+ delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
1974
2018
  @delete_backup = ::Gapic::Config::Method.new delete_backup_config
1975
- list_backups_config = parent_rpcs&.list_backups if parent_rpcs&.respond_to? :list_backups
2019
+ list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
1976
2020
  @list_backups = ::Gapic::Config::Method.new list_backups_config
1977
- restore_database_config = parent_rpcs&.restore_database if parent_rpcs&.respond_to? :restore_database
2021
+ restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database
1978
2022
  @restore_database = ::Gapic::Config::Method.new restore_database_config
1979
- list_database_operations_config = parent_rpcs&.list_database_operations if parent_rpcs&.respond_to? :list_database_operations
2023
+ list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations
1980
2024
  @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config
1981
- list_backup_operations_config = parent_rpcs&.list_backup_operations if parent_rpcs&.respond_to? :list_backup_operations
2025
+ list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations
1982
2026
  @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config
1983
2027
 
1984
2028
  yield self if block_given?