google-cloud-spanner-admin-database-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-spanner-admin-database-v1.rb +21 -0
  7. data/lib/google/cloud/spanner/admin/database/v1.rb +39 -0
  8. data/lib/google/cloud/spanner/admin/database/v1/database_admin.rb +59 -0
  9. data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +1989 -0
  10. data/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb +56 -0
  11. data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +574 -0
  12. data/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +92 -0
  13. data/lib/google/cloud/spanner/admin/database/v1/version.rb +32 -0
  14. data/lib/google/spanner/admin/database/v1/backup_pb.rb +101 -0
  15. data/lib/google/spanner/admin/database/v1/common_pb.rb +31 -0
  16. data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +144 -0
  17. data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +170 -0
  18. data/proto_docs/README.md +4 -0
  19. data/proto_docs/google/api/field_behavior.rb +59 -0
  20. data/proto_docs/google/api/resource.rb +247 -0
  21. data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
  22. data/proto_docs/google/iam/v1/options.rb +40 -0
  23. data/proto_docs/google/iam/v1/policy.rb +248 -0
  24. data/proto_docs/google/longrunning/operations.rb +150 -0
  25. data/proto_docs/google/protobuf/any.rb +138 -0
  26. data/proto_docs/google/protobuf/empty.rb +36 -0
  27. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  28. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  29. data/proto_docs/google/rpc/status.rb +46 -0
  30. data/proto_docs/google/spanner/admin/database/v1/backup.rb +364 -0
  31. data/proto_docs/google/spanner/admin/database/v1/common.rb +48 -0
  32. data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +437 -0
  33. data/proto_docs/google/type/expr.rb +52 -0
  34. metadata +235 -0
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Spanner
23
+ module Admin
24
+ module Database
25
+ module V1
26
+ # Encapsulates progress related information for a Cloud Spanner long
27
+ # running operation.
28
+ # @!attribute [rw] progress_percent
29
+ # @return [::Integer]
30
+ # Percent completion of the operation.
31
+ # Values are between 0 and 100 inclusive.
32
+ # @!attribute [rw] start_time
33
+ # @return [::Google::Protobuf::Timestamp]
34
+ # Time the request was received.
35
+ # @!attribute [rw] end_time
36
+ # @return [::Google::Protobuf::Timestamp]
37
+ # If set, the time at which this operation failed or was completed
38
+ # successfully.
39
+ class OperationProgress
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,437 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Spanner
23
+ module Admin
24
+ module Database
25
+ module V1
26
+ # Information about the database restore.
27
+ # @!attribute [rw] source_type
28
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreSourceType]
29
+ # The type of the restore source.
30
+ # @!attribute [rw] backup_info
31
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupInfo]
32
+ # Information about the backup used to restore the database. The backup
33
+ # may no longer exist.
34
+ class RestoreInfo
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+ end
38
+
39
+ # A Cloud Spanner database.
40
+ # @!attribute [rw] name
41
+ # @return [::String]
42
+ # Required. The name of the database. Values are of the form
43
+ # `projects/<project>/instances/<instance>/databases/<database>`,
44
+ # where `<database>` is as specified in the `CREATE DATABASE`
45
+ # statement. This name can be passed to other API methods to
46
+ # identify the database.
47
+ # @!attribute [r] state
48
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database::State]
49
+ # Output only. The current database state.
50
+ # @!attribute [r] create_time
51
+ # @return [::Google::Protobuf::Timestamp]
52
+ # Output only. If exists, the time at which the database creation started.
53
+ # @!attribute [r] restore_info
54
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreInfo]
55
+ # Output only. Applicable only for restored databases. Contains information
56
+ # about the restore source.
57
+ class Database
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+
61
+ # Indicates the current state of the database.
62
+ module State
63
+ # Not specified.
64
+ STATE_UNSPECIFIED = 0
65
+
66
+ # The database is still being created. Operations on the database may fail
67
+ # with `FAILED_PRECONDITION` in this state.
68
+ CREATING = 1
69
+
70
+ # The database is fully created and ready for use.
71
+ READY = 2
72
+
73
+ # The database is fully created and ready for use, but is still
74
+ # being optimized for performance and cannot handle full load.
75
+ #
76
+ # In this state, the database still references the backup
77
+ # it was restore from, preventing the backup
78
+ # from being deleted. When optimizations are complete, the full performance
79
+ # of the database will be restored, and the database will transition to
80
+ # `READY` state.
81
+ READY_OPTIMIZING = 3
82
+ end
83
+ end
84
+
85
+ # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
86
+ # @!attribute [rw] parent
87
+ # @return [::String]
88
+ # Required. The instance whose databases should be listed.
89
+ # Values are of the form `projects/<project>/instances/<instance>`.
90
+ # @!attribute [rw] page_size
91
+ # @return [::Integer]
92
+ # Number of databases to be returned in the response. If 0 or less,
93
+ # defaults to the server's maximum allowed page size.
94
+ # @!attribute [rw] page_token
95
+ # @return [::String]
96
+ # If non-empty, `page_token` should contain a
97
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
98
+ # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
99
+ class ListDatabasesRequest
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
+ end
103
+
104
+ # The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
105
+ # @!attribute [rw] databases
106
+ # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
107
+ # Databases that matched the request.
108
+ # @!attribute [rw] next_page_token
109
+ # @return [::String]
110
+ # `next_page_token` can be sent in a subsequent
111
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases} call to fetch more
112
+ # of the matching databases.
113
+ class ListDatabasesResponse
114
+ include ::Google::Protobuf::MessageExts
115
+ extend ::Google::Protobuf::MessageExts::ClassMethods
116
+ end
117
+
118
+ # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}.
119
+ # @!attribute [rw] parent
120
+ # @return [::String]
121
+ # Required. The name of the instance that will serve the new database.
122
+ # Values are of the form `projects/<project>/instances/<instance>`.
123
+ # @!attribute [rw] create_statement
124
+ # @return [::String]
125
+ # Required. A `CREATE DATABASE` statement, which specifies the ID of the
126
+ # new database. The database ID must conform to the regular expression
127
+ # `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
128
+ # If the database ID is a reserved word or if it contains a hyphen, the
129
+ # database ID must be enclosed in backticks (`` ` ``).
130
+ # @!attribute [rw] extra_statements
131
+ # @return [::Array<::String>]
132
+ # Optional. A list of DDL statements to run inside the newly created
133
+ # database. Statements can create tables, indexes, etc. These
134
+ # statements execute atomically with the creation of the database:
135
+ # if there is an error in any statement, the database is not created.
136
+ class CreateDatabaseRequest
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+ end
140
+
141
+ # Metadata type for the operation returned by
142
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}.
143
+ # @!attribute [rw] database
144
+ # @return [::String]
145
+ # The database being created.
146
+ class CreateDatabaseMetadata
147
+ include ::Google::Protobuf::MessageExts
148
+ extend ::Google::Protobuf::MessageExts::ClassMethods
149
+ end
150
+
151
+ # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}.
152
+ # @!attribute [rw] name
153
+ # @return [::String]
154
+ # Required. The name of the requested database. Values are of the form
155
+ # `projects/<project>/instances/<instance>/databases/<database>`.
156
+ class GetDatabaseRequest
157
+ include ::Google::Protobuf::MessageExts
158
+ extend ::Google::Protobuf::MessageExts::ClassMethods
159
+ end
160
+
161
+ # Enqueues the given DDL statements to be applied, in order but not
162
+ # necessarily all at once, to the database schema at some point (or
163
+ # points) in the future. The server checks that the statements
164
+ # are executable (syntactically valid, name tables that exist, etc.)
165
+ # before enqueueing them, but they may still fail upon
166
+ # later execution (e.g., if a statement from another batch of
167
+ # statements is applied first and it conflicts in some way, or if
168
+ # there is some data-related problem like a `NULL` value in a column to
169
+ # which `NOT NULL` would be added). If a statement fails, all
170
+ # subsequent statements in the batch are automatically cancelled.
171
+ #
172
+ # Each batch of statements is assigned a name which can be used with
173
+ # the Operations API to monitor
174
+ # progress. See the
175
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id} field for more
176
+ # details.
177
+ # @!attribute [rw] database
178
+ # @return [::String]
179
+ # Required. The database to update.
180
+ # @!attribute [rw] statements
181
+ # @return [::Array<::String>]
182
+ # Required. DDL statements to be applied to the database.
183
+ # @!attribute [rw] operation_id
184
+ # @return [::String]
185
+ # If empty, the new update request is assigned an
186
+ # automatically-generated operation ID. Otherwise, `operation_id`
187
+ # is used to construct the name of the resulting
188
+ # {::Google::Longrunning::Operation Operation}.
189
+ #
190
+ # Specifying an explicit operation ID simplifies determining
191
+ # whether the statements were executed in the event that the
192
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
193
+ # or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
194
+ # `operation_id` fields can be combined to form the
195
+ # {::Google::Longrunning::Operation#name name} of the resulting
196
+ # {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
197
+ #
198
+ # `operation_id` should be unique within the database, and must be
199
+ # a valid identifier: `[a-z][a-z0-9_]*`. Note that
200
+ # automatically-generated operation IDs always begin with an
201
+ # underscore. If the named operation already exists,
202
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} returns
203
+ # `ALREADY_EXISTS`.
204
+ class UpdateDatabaseDdlRequest
205
+ include ::Google::Protobuf::MessageExts
206
+ extend ::Google::Protobuf::MessageExts::ClassMethods
207
+ end
208
+
209
+ # Metadata type for the operation returned by
210
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}.
211
+ # @!attribute [rw] database
212
+ # @return [::String]
213
+ # The database being modified.
214
+ # @!attribute [rw] statements
215
+ # @return [::Array<::String>]
216
+ # For an update this list contains all the statements. For an
217
+ # individual statement, this list contains only that statement.
218
+ # @!attribute [rw] commit_timestamps
219
+ # @return [::Array<::Google::Protobuf::Timestamp>]
220
+ # Reports the commit timestamps of all statements that have
221
+ # succeeded so far, where `commit_timestamps[i]` is the commit
222
+ # timestamp for the statement `statements[i]`.
223
+ class UpdateDatabaseDdlMetadata
224
+ include ::Google::Protobuf::MessageExts
225
+ extend ::Google::Protobuf::MessageExts::ClassMethods
226
+ end
227
+
228
+ # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}.
229
+ # @!attribute [rw] database
230
+ # @return [::String]
231
+ # Required. The database to be dropped.
232
+ class DropDatabaseRequest
233
+ include ::Google::Protobuf::MessageExts
234
+ extend ::Google::Protobuf::MessageExts::ClassMethods
235
+ end
236
+
237
+ # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
238
+ # @!attribute [rw] database
239
+ # @return [::String]
240
+ # Required. The database whose schema we wish to get.
241
+ class GetDatabaseDdlRequest
242
+ include ::Google::Protobuf::MessageExts
243
+ extend ::Google::Protobuf::MessageExts::ClassMethods
244
+ end
245
+
246
+ # The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
247
+ # @!attribute [rw] statements
248
+ # @return [::Array<::String>]
249
+ # A list of formatted DDL statements defining the schema of the database
250
+ # specified in the request.
251
+ class GetDatabaseDdlResponse
252
+ include ::Google::Protobuf::MessageExts
253
+ extend ::Google::Protobuf::MessageExts::ClassMethods
254
+ end
255
+
256
+ # The request for
257
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations}.
258
+ # @!attribute [rw] parent
259
+ # @return [::String]
260
+ # Required. The instance of the database operations.
261
+ # Values are of the form `projects/<project>/instances/<instance>`.
262
+ # @!attribute [rw] filter
263
+ # @return [::String]
264
+ # An expression that filters the list of returned operations.
265
+ #
266
+ # A filter expression consists of a field name, a
267
+ # comparison operator, and a value for filtering.
268
+ # The value must be a string, a number, or a boolean. The comparison operator
269
+ # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
270
+ # Colon `:` is the contains operator. Filter rules are not case sensitive.
271
+ #
272
+ # The following fields in the {::Google::Longrunning::Operation Operation}
273
+ # are eligible for filtering:
274
+ #
275
+ # * `name` - The name of the long-running operation
276
+ # * `done` - False if the operation is in progress, else true.
277
+ # * `metadata.@type` - the type of metadata. For example, the type string
278
+ # for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
279
+ # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
280
+ # * `metadata.<field_name>` - any field in metadata.value.
281
+ # * `error` - Error associated with the long-running operation.
282
+ # * `response.@type` - the type of response.
283
+ # * `response.<field_name>` - any field in response.value.
284
+ #
285
+ # You can combine multiple expressions by enclosing each expression in
286
+ # parentheses. By default, expressions are combined with AND logic. However,
287
+ # you can specify AND, OR, and NOT logic explicitly.
288
+ #
289
+ # Here are a few examples:
290
+ #
291
+ # * `done:true` - The operation is complete.
292
+ # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` <br/>
293
+ # `(metadata.source_type:BACKUP) AND` <br/>
294
+ # `(metadata.backup_info.backup:backup_howl) AND` <br/>
295
+ # `(metadata.name:restored_howl) AND` <br/>
296
+ # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
297
+ # `(error:*)` - Return operations where:
298
+ # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
299
+ # * The database is restored from a backup.
300
+ # * The backup name contains "backup_howl".
301
+ # * The restored database's name contains "restored_howl".
302
+ # * The operation started before 2018-03-28T14:50:00Z.
303
+ # * The operation resulted in an error.
304
+ # @!attribute [rw] page_size
305
+ # @return [::Integer]
306
+ # Number of operations to be returned in the response. If 0 or
307
+ # less, defaults to the server's maximum allowed page size.
308
+ # @!attribute [rw] page_token
309
+ # @return [::String]
310
+ # If non-empty, `page_token` should contain a
311
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
312
+ # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
313
+ # same `parent` and with the same `filter`.
314
+ class ListDatabaseOperationsRequest
315
+ include ::Google::Protobuf::MessageExts
316
+ extend ::Google::Protobuf::MessageExts::ClassMethods
317
+ end
318
+
319
+ # The response for
320
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations}.
321
+ # @!attribute [rw] operations
322
+ # @return [::Array<::Google::Longrunning::Operation>]
323
+ # The list of matching database [long-running
324
+ # operations][google.longrunning.Operation]. Each operation's name will be
325
+ # prefixed by the database's name. The operation's
326
+ # {::Google::Longrunning::Operation#metadata metadata} field type
327
+ # `metadata.type_url` describes the type of the metadata.
328
+ # @!attribute [rw] next_page_token
329
+ # @return [::String]
330
+ # `next_page_token` can be sent in a subsequent
331
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations}
332
+ # call to fetch more of the matching metadata.
333
+ class ListDatabaseOperationsResponse
334
+ include ::Google::Protobuf::MessageExts
335
+ extend ::Google::Protobuf::MessageExts::ClassMethods
336
+ end
337
+
338
+ # The request for
339
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}.
340
+ # @!attribute [rw] parent
341
+ # @return [::String]
342
+ # Required. The name of the instance in which to create the
343
+ # restored database. This instance must be in the same project and
344
+ # have the same instance configuration as the instance containing
345
+ # the source backup. Values are of the form
346
+ # `projects/<project>/instances/<instance>`.
347
+ # @!attribute [rw] database_id
348
+ # @return [::String]
349
+ # Required. The id of the database to create and restore to. This
350
+ # database must not already exist. The `database_id` appended to
351
+ # `parent` forms the full database name of the form
352
+ # `projects/<project>/instances/<instance>/databases/<database_id>`.
353
+ # @!attribute [rw] backup
354
+ # @return [::String]
355
+ # Name of the backup from which to restore. Values are of the form
356
+ # `projects/<project>/instances/<instance>/backups/<backup>`.
357
+ class RestoreDatabaseRequest
358
+ include ::Google::Protobuf::MessageExts
359
+ extend ::Google::Protobuf::MessageExts::ClassMethods
360
+ end
361
+
362
+ # Metadata type for the long-running operation returned by
363
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}.
364
+ # @!attribute [rw] name
365
+ # @return [::String]
366
+ # Name of the database being created and restored to.
367
+ # @!attribute [rw] source_type
368
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreSourceType]
369
+ # The type of the restore source.
370
+ # @!attribute [rw] backup_info
371
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupInfo]
372
+ # Information about the backup used to restore the database.
373
+ # @!attribute [rw] progress
374
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
375
+ # The progress of the
376
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}
377
+ # operation.
378
+ # @!attribute [rw] cancel_time
379
+ # @return [::Google::Protobuf::Timestamp]
380
+ # The time at which cancellation of this operation was received.
381
+ # Operations.CancelOperation
382
+ # starts asynchronous cancellation on a long-running operation. The server
383
+ # makes a best effort to cancel the operation, but success is not guaranteed.
384
+ # Clients can use
385
+ # Operations.GetOperation or
386
+ # other methods to check whether the cancellation succeeded or whether the
387
+ # operation completed despite cancellation. On successful cancellation,
388
+ # the operation is not deleted; instead, it becomes an operation with
389
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
390
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to `Code.CANCELLED`.
391
+ # @!attribute [rw] optimize_database_operation_name
392
+ # @return [::String]
393
+ # If exists, the name of the long-running operation that will be used to
394
+ # track the post-restore optimization process to optimize the performance of
395
+ # the restored database, and remove the dependency on the restore source.
396
+ # The name is of the form
397
+ # `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
398
+ # where the <database> is the name of database being created and restored to.
399
+ # The metadata type of the long-running operation is
400
+ # {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}. This long-running operation will be
401
+ # automatically created by the system after the RestoreDatabase long-running
402
+ # operation completes successfully. This operation will not be created if the
403
+ # restore was not successful.
404
+ class RestoreDatabaseMetadata
405
+ include ::Google::Protobuf::MessageExts
406
+ extend ::Google::Protobuf::MessageExts::ClassMethods
407
+ end
408
+
409
+ # Metadata type for the long-running operation used to track the progress
410
+ # of optimizations performed on a newly restored database. This long-running
411
+ # operation is automatically created by the system after the successful
412
+ # completion of a database restore, and cannot be cancelled.
413
+ # @!attribute [rw] name
414
+ # @return [::String]
415
+ # Name of the restored database being optimized.
416
+ # @!attribute [rw] progress
417
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
418
+ # The progress of the post-restore optimizations.
419
+ class OptimizeRestoredDatabaseMetadata
420
+ include ::Google::Protobuf::MessageExts
421
+ extend ::Google::Protobuf::MessageExts::ClassMethods
422
+ end
423
+
424
+ # Indicates the type of the restore source.
425
+ module RestoreSourceType
426
+ # No restore associated.
427
+ TYPE_UNSPECIFIED = 0
428
+
429
+ # A backup was used as the source of the restore.
430
+ BACKUP = 1
431
+ end
432
+ end
433
+ end
434
+ end
435
+ end
436
+ end
437
+ end