google-cloud-metastore-v1 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -82,7 +82,7 @@ module Google
82
82
  # Create credentials
83
83
  credentials = @config.credentials
84
84
  credentials ||= Credentials.default scope: @config.scope
85
- if credentials.is_a?(String) || credentials.is_a?(Hash)
85
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
88
  @quota_project_id = @config.quota_project
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -396,9 +404,9 @@ module Google
396
404
  end
397
405
 
398
406
  ##
399
- # Waits for the specified long-running operation until it is done or reaches
400
- # at most a specified timeout, returning the latest state. If the operation
401
- # is already done, the latest state is immediately returned. If the timeout
407
+ # Waits until the specified long-running operation is done or reaches at most
408
+ # a specified timeout, returning the latest state. If the operation is
409
+ # already done, the latest state is immediately returned. If the timeout
402
410
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
411
  # timeout is used. If the server does not support this method, it returns
404
412
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -24,6 +24,27 @@ module Google
24
24
  module DataprocMetastore
25
25
  # Path helper methods for the DataprocMetastore API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified Backup resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/services/{service}/backups/{backup}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param service [String]
37
+ # @param backup [String]
38
+ #
39
+ # @return [::String]
40
+ def backup_path project:, location:, service:, backup:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+ raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/"
44
+
45
+ "projects/#{project}/locations/#{location}/services/#{service}/backups/#{backup}"
46
+ end
47
+
27
48
  ##
28
49
  # Create a fully-qualified Location resource string.
29
50
  #
@@ -75,12 +75,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
75
75
  end
76
76
  add_message "google.cloud.metastore.v1.MetadataManagementActivity" do
77
77
  repeated :metadata_exports, :message, 1, "google.cloud.metastore.v1.MetadataExport"
78
+ repeated :restores, :message, 2, "google.cloud.metastore.v1.Restore"
78
79
  end
79
80
  add_message "google.cloud.metastore.v1.MetadataImport" do
80
81
  optional :name, :string, 1
81
82
  optional :description, :string, 2
82
83
  optional :create_time, :message, 3, "google.protobuf.Timestamp"
83
84
  optional :update_time, :message, 4, "google.protobuf.Timestamp"
85
+ optional :end_time, :message, 7, "google.protobuf.Timestamp"
84
86
  optional :state, :enum, 5, "google.cloud.metastore.v1.MetadataImport.State"
85
87
  oneof :metadata do
86
88
  optional :database_dump, :message, 6, "google.cloud.metastore.v1.MetadataImport.DatabaseDump"
@@ -118,6 +120,43 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
118
120
  value :FAILED, 3
119
121
  value :CANCELLED, 4
120
122
  end
123
+ add_message "google.cloud.metastore.v1.Backup" do
124
+ optional :name, :string, 1
125
+ optional :create_time, :message, 2, "google.protobuf.Timestamp"
126
+ optional :end_time, :message, 3, "google.protobuf.Timestamp"
127
+ optional :state, :enum, 4, "google.cloud.metastore.v1.Backup.State"
128
+ optional :service_revision, :message, 5, "google.cloud.metastore.v1.Service"
129
+ optional :description, :string, 6
130
+ repeated :restoring_services, :string, 7
131
+ end
132
+ add_enum "google.cloud.metastore.v1.Backup.State" do
133
+ value :STATE_UNSPECIFIED, 0
134
+ value :CREATING, 1
135
+ value :DELETING, 2
136
+ value :ACTIVE, 3
137
+ value :FAILED, 4
138
+ value :RESTORING, 5
139
+ end
140
+ add_message "google.cloud.metastore.v1.Restore" do
141
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
142
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
143
+ optional :state, :enum, 3, "google.cloud.metastore.v1.Restore.State"
144
+ optional :backup, :string, 4
145
+ optional :type, :enum, 5, "google.cloud.metastore.v1.Restore.RestoreType"
146
+ optional :details, :string, 6
147
+ end
148
+ add_enum "google.cloud.metastore.v1.Restore.State" do
149
+ value :STATE_UNSPECIFIED, 0
150
+ value :RUNNING, 1
151
+ value :SUCCEEDED, 2
152
+ value :FAILED, 3
153
+ value :CANCELLED, 4
154
+ end
155
+ add_enum "google.cloud.metastore.v1.Restore.RestoreType" do
156
+ value :RESTORE_TYPE_UNSPECIFIED, 0
157
+ value :FULL, 1
158
+ value :METADATA_ONLY, 2
159
+ end
121
160
  add_message "google.cloud.metastore.v1.ListServicesRequest" do
122
161
  optional :parent, :string, 1
123
162
  optional :page_size, :int32, 2
@@ -174,6 +213,31 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
174
213
  optional :metadata_import, :message, 2, "google.cloud.metastore.v1.MetadataImport"
175
214
  optional :request_id, :string, 3
176
215
  end
216
+ add_message "google.cloud.metastore.v1.ListBackupsRequest" do
217
+ optional :parent, :string, 1
218
+ optional :page_size, :int32, 2
219
+ optional :page_token, :string, 3
220
+ optional :filter, :string, 4
221
+ optional :order_by, :string, 5
222
+ end
223
+ add_message "google.cloud.metastore.v1.ListBackupsResponse" do
224
+ repeated :backups, :message, 1, "google.cloud.metastore.v1.Backup"
225
+ optional :next_page_token, :string, 2
226
+ repeated :unreachable, :string, 3
227
+ end
228
+ add_message "google.cloud.metastore.v1.GetBackupRequest" do
229
+ optional :name, :string, 1
230
+ end
231
+ add_message "google.cloud.metastore.v1.CreateBackupRequest" do
232
+ optional :parent, :string, 1
233
+ optional :backup_id, :string, 2
234
+ optional :backup, :message, 3, "google.cloud.metastore.v1.Backup"
235
+ optional :request_id, :string, 4
236
+ end
237
+ add_message "google.cloud.metastore.v1.DeleteBackupRequest" do
238
+ optional :name, :string, 1
239
+ optional :request_id, :string, 2
240
+ end
177
241
  add_message "google.cloud.metastore.v1.ExportMetadataRequest" do
178
242
  optional :service, :string, 1
179
243
  optional :request_id, :string, 3
@@ -182,6 +246,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
182
246
  optional :destination_gcs_folder, :string, 2
183
247
  end
184
248
  end
249
+ add_message "google.cloud.metastore.v1.RestoreServiceRequest" do
250
+ optional :service, :string, 1
251
+ optional :backup, :string, 2
252
+ optional :restore_type, :enum, 3, "google.cloud.metastore.v1.Restore.RestoreType"
253
+ optional :request_id, :string, 4
254
+ end
185
255
  add_message "google.cloud.metastore.v1.OperationMetadata" do
186
256
  optional :create_time, :message, 1, "google.protobuf.Timestamp"
187
257
  optional :end_time, :message, 2, "google.protobuf.Timestamp"
@@ -203,6 +273,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
203
273
  add_enum "google.cloud.metastore.v1.DatabaseDumpSpec.Type" do
204
274
  value :TYPE_UNSPECIFIED, 0
205
275
  value :MYSQL, 1
276
+ value :AVRO, 2
206
277
  end
207
278
  end
208
279
  end
@@ -226,6 +297,11 @@ module Google
226
297
  MetadataImport::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataImport.State").enummodule
227
298
  MetadataExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataExport").msgclass
228
299
  MetadataExport::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataExport.State").enummodule
300
+ Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Backup").msgclass
301
+ Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Backup.State").enummodule
302
+ Restore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Restore").msgclass
303
+ Restore::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Restore.State").enummodule
304
+ Restore::RestoreType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Restore.RestoreType").enummodule
229
305
  ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListServicesRequest").msgclass
230
306
  ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListServicesResponse").msgclass
231
307
  GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.GetServiceRequest").msgclass
@@ -237,7 +313,13 @@ module Google
237
313
  GetMetadataImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.GetMetadataImportRequest").msgclass
238
314
  CreateMetadataImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.CreateMetadataImportRequest").msgclass
239
315
  UpdateMetadataImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.UpdateMetadataImportRequest").msgclass
316
+ ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListBackupsRequest").msgclass
317
+ ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListBackupsResponse").msgclass
318
+ GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.GetBackupRequest").msgclass
319
+ CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.CreateBackupRequest").msgclass
320
+ DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.DeleteBackupRequest").msgclass
240
321
  ExportMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ExportMetadataRequest").msgclass
322
+ RestoreServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.RestoreServiceRequest").msgclass
241
323
  OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.OperationMetadata").msgclass
242
324
  LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.LocationMetadata").msgclass
243
325
  LocationMetadata::HiveMetastoreVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion").msgclass
@@ -25,8 +25,8 @@ module Google
25
25
  module V1
26
26
  module DataprocMetastore
27
27
  # Configures and manages metastore services.
28
- # Metastore services are fully managed, highly available, auto-scaled,
29
- # auto-healing, OSS-native deployments of technical metadata management
28
+ # Metastore services are fully managed, highly available, autoscaled,
29
+ # autohealing, OSS-native deployments of technical metadata management
30
30
  # software. Each metastore service exposes a network endpoint through which
31
31
  # metadata queries are served. Metadata queries can originate from a variety
32
32
  # of sources, including Apache Hive, Apache Presto, and Apache Spark.
@@ -70,6 +70,16 @@ module Google
70
70
  rpc :UpdateMetadataImport, ::Google::Cloud::Metastore::V1::UpdateMetadataImportRequest, ::Google::Longrunning::Operation
71
71
  # Exports metadata from a service.
72
72
  rpc :ExportMetadata, ::Google::Cloud::Metastore::V1::ExportMetadataRequest, ::Google::Longrunning::Operation
73
+ # Restores a service from a backup.
74
+ rpc :RestoreService, ::Google::Cloud::Metastore::V1::RestoreServiceRequest, ::Google::Longrunning::Operation
75
+ # Lists backups in a service.
76
+ rpc :ListBackups, ::Google::Cloud::Metastore::V1::ListBackupsRequest, ::Google::Cloud::Metastore::V1::ListBackupsResponse
77
+ # Gets details of a single backup.
78
+ rpc :GetBackup, ::Google::Cloud::Metastore::V1::GetBackupRequest, ::Google::Cloud::Metastore::V1::Backup
79
+ # Creates a new backup in a given project and location.
80
+ rpc :CreateBackup, ::Google::Cloud::Metastore::V1::CreateBackupRequest, ::Google::Longrunning::Operation
81
+ # Deletes a single backup.
82
+ rpc :DeleteBackup, ::Google::Cloud::Metastore::V1::DeleteBackupRequest, ::Google::Longrunning::Operation
73
83
  end
74
84
 
75
85
  Stub = Service.rpc_stub_class
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Metastore
23
23
  module V1
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -235,6 +235,9 @@ module Google
235
235
  # @!attribute [r] metadata_exports
236
236
  # @return [::Array<::Google::Cloud::Metastore::V1::MetadataExport>]
237
237
  # Output only. The latest metadata exports of the metastore service.
238
+ # @!attribute [r] restores
239
+ # @return [::Array<::Google::Cloud::Metastore::V1::Restore>]
240
+ # Output only. The latest restores of the metastore service.
238
241
  class MetadataManagementActivity
239
242
  include ::Google::Protobuf::MessageExts
240
243
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -254,10 +257,13 @@ module Google
254
257
  # The description of the metadata import.
255
258
  # @!attribute [r] create_time
256
259
  # @return [::Google::Protobuf::Timestamp]
257
- # Output only. The time when the metadata import was created.
260
+ # Output only. The time when the metadata import was started.
258
261
  # @!attribute [r] update_time
259
262
  # @return [::Google::Protobuf::Timestamp]
260
263
  # Output only. The time when the metadata import was last updated.
264
+ # @!attribute [r] end_time
265
+ # @return [::Google::Protobuf::Timestamp]
266
+ # Output only. The time when the metadata import finished.
261
267
  # @!attribute [r] state
262
268
  # @return [::Google::Cloud::Metastore::V1::MetadataImport::State]
263
269
  # Output only. The current state of the metadata import.
@@ -352,6 +358,114 @@ module Google
352
358
  end
353
359
  end
354
360
 
361
+ # The details of a backup resource.
362
+ # @!attribute [rw] name
363
+ # @return [::String]
364
+ # Immutable. The relative resource name of the backup, in the following form:
365
+ #
366
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
367
+ # @!attribute [r] create_time
368
+ # @return [::Google::Protobuf::Timestamp]
369
+ # Output only. The time when the backup was started.
370
+ # @!attribute [r] end_time
371
+ # @return [::Google::Protobuf::Timestamp]
372
+ # Output only. The time when the backup finished creating.
373
+ # @!attribute [r] state
374
+ # @return [::Google::Cloud::Metastore::V1::Backup::State]
375
+ # Output only. The current state of the backup.
376
+ # @!attribute [r] service_revision
377
+ # @return [::Google::Cloud::Metastore::V1::Service]
378
+ # Output only. The revision of the service at the time of backup.
379
+ # @!attribute [rw] description
380
+ # @return [::String]
381
+ # The description of the backup.
382
+ # @!attribute [r] restoring_services
383
+ # @return [::Array<::String>]
384
+ # Output only. Services that are restoring from the backup.
385
+ class Backup
386
+ include ::Google::Protobuf::MessageExts
387
+ extend ::Google::Protobuf::MessageExts::ClassMethods
388
+
389
+ # The current state of the backup.
390
+ module State
391
+ # The state of the backup is unknown.
392
+ STATE_UNSPECIFIED = 0
393
+
394
+ # The backup is being created.
395
+ CREATING = 1
396
+
397
+ # The backup is being deleted.
398
+ DELETING = 2
399
+
400
+ # The backup is active and ready to use.
401
+ ACTIVE = 3
402
+
403
+ # The backup failed.
404
+ FAILED = 4
405
+
406
+ # The backup is being restored.
407
+ RESTORING = 5
408
+ end
409
+ end
410
+
411
+ # The details of a metadata restore operation.
412
+ # @!attribute [r] start_time
413
+ # @return [::Google::Protobuf::Timestamp]
414
+ # Output only. The time when the restore started.
415
+ # @!attribute [r] end_time
416
+ # @return [::Google::Protobuf::Timestamp]
417
+ # Output only. The time when the restore ended.
418
+ # @!attribute [r] state
419
+ # @return [::Google::Cloud::Metastore::V1::Restore::State]
420
+ # Output only. The current state of the restore.
421
+ # @!attribute [r] backup
422
+ # @return [::String]
423
+ # Output only. The relative resource name of the metastore service backup to restore
424
+ # from, in the following form:
425
+ #
426
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
427
+ # @!attribute [r] type
428
+ # @return [::Google::Cloud::Metastore::V1::Restore::RestoreType]
429
+ # Output only. The type of restore.
430
+ # @!attribute [r] details
431
+ # @return [::String]
432
+ # Output only. The restore details containing the revision of the service to be restored
433
+ # to, in format of JSON.
434
+ class Restore
435
+ include ::Google::Protobuf::MessageExts
436
+ extend ::Google::Protobuf::MessageExts::ClassMethods
437
+
438
+ # The current state of the restore.
439
+ module State
440
+ # The state of the metadata restore is unknown.
441
+ STATE_UNSPECIFIED = 0
442
+
443
+ # The metadata restore is running.
444
+ RUNNING = 1
445
+
446
+ # The metadata restore completed successfully.
447
+ SUCCEEDED = 2
448
+
449
+ # The metadata restore failed.
450
+ FAILED = 3
451
+
452
+ # The metadata restore is cancelled.
453
+ CANCELLED = 4
454
+ end
455
+
456
+ # The type of restore. If unspecified, defaults to `METADATA_ONLY`.
457
+ module RestoreType
458
+ # The restore type is unknown.
459
+ RESTORE_TYPE_UNSPECIFIED = 0
460
+
461
+ # The service's metadata and configuration are restored.
462
+ FULL = 1
463
+
464
+ # Only the service's metadata is restored.
465
+ METADATA_ONLY = 2
466
+ end
467
+ end
468
+
355
469
  # Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_services DataprocMetastore.ListServices}.
356
470
  # @!attribute [rw] parent
357
471
  # @return [::String]
@@ -648,6 +762,133 @@ module Google
648
762
  extend ::Google::Protobuf::MessageExts::ClassMethods
649
763
  end
650
764
 
765
+ # Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups}.
766
+ # @!attribute [rw] parent
767
+ # @return [::String]
768
+ # Required. The relative resource name of the service whose backups to
769
+ # list, in the following form:
770
+ #
771
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
772
+ # @!attribute [rw] page_size
773
+ # @return [::Integer]
774
+ # Optional. The maximum number of backups to return. The response may contain less
775
+ # than the maximum number. If unspecified, no more than 500 backups are
776
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
777
+ # @!attribute [rw] page_token
778
+ # @return [::String]
779
+ # Optional. A page token, received from a previous {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups}
780
+ # call. Provide this token to retrieve the subsequent page.
781
+ #
782
+ # To retrieve the first page, supply an empty page token.
783
+ #
784
+ # When paginating, other parameters provided to
785
+ # {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups} must match the call that provided the
786
+ # page token.
787
+ # @!attribute [rw] filter
788
+ # @return [::String]
789
+ # Optional. The filter to apply to list results.
790
+ # @!attribute [rw] order_by
791
+ # @return [::String]
792
+ # Optional. Specify the ordering of results as described in [Sorting
793
+ # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
794
+ # If not specified, the results will be sorted in the default order.
795
+ class ListBackupsRequest
796
+ include ::Google::Protobuf::MessageExts
797
+ extend ::Google::Protobuf::MessageExts::ClassMethods
798
+ end
799
+
800
+ # Response message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups}.
801
+ # @!attribute [rw] backups
802
+ # @return [::Array<::Google::Cloud::Metastore::V1::Backup>]
803
+ # The backups of the specified service.
804
+ # @!attribute [rw] next_page_token
805
+ # @return [::String]
806
+ # A token that can be sent as `page_token` to retrieve the next page. If this
807
+ # field is omitted, there are no subsequent pages.
808
+ # @!attribute [rw] unreachable
809
+ # @return [::Array<::String>]
810
+ # Locations that could not be reached.
811
+ class ListBackupsResponse
812
+ include ::Google::Protobuf::MessageExts
813
+ extend ::Google::Protobuf::MessageExts::ClassMethods
814
+ end
815
+
816
+ # Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#get_backup DataprocMetastore.GetBackup}.
817
+ # @!attribute [rw] name
818
+ # @return [::String]
819
+ # Required. The relative resource name of the backup to retrieve, in the
820
+ # following form:
821
+ #
822
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
823
+ class GetBackupRequest
824
+ include ::Google::Protobuf::MessageExts
825
+ extend ::Google::Protobuf::MessageExts::ClassMethods
826
+ end
827
+
828
+ # Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#create_backup DataprocMetastore.CreateBackup}.
829
+ # @!attribute [rw] parent
830
+ # @return [::String]
831
+ # Required. The relative resource name of the service in which to create a backup
832
+ # of the following form:
833
+ #
834
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}`.
835
+ # @!attribute [rw] backup_id
836
+ # @return [::String]
837
+ # Required. The ID of the backup, which is used as the final component of the
838
+ # backup's name.
839
+ #
840
+ # This value must be between 1 and 64 characters long, begin with a letter,
841
+ # end with a letter or number, and consist of alpha-numeric ASCII characters
842
+ # or hyphens.
843
+ # @!attribute [rw] backup
844
+ # @return [::Google::Cloud::Metastore::V1::Backup]
845
+ # Required. The backup to create. The `name` field is ignored. The ID of the created
846
+ # backup must be provided in the request's `backup_id` field.
847
+ # @!attribute [rw] request_id
848
+ # @return [::String]
849
+ # Optional. A request ID. Specify a unique request ID to allow the server to ignore the
850
+ # request if it has completed. The server will ignore subsequent requests
851
+ # that provide a duplicate request ID for at least 60 minutes after the first
852
+ # request.
853
+ #
854
+ # For example, if an initial request times out, followed by another request
855
+ # with the same request ID, the server ignores the second request to prevent
856
+ # the creation of duplicate commitments.
857
+ #
858
+ # The request ID must be a valid
859
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
860
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
861
+ class CreateBackupRequest
862
+ include ::Google::Protobuf::MessageExts
863
+ extend ::Google::Protobuf::MessageExts::ClassMethods
864
+ end
865
+
866
+ # Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#delete_backup DataprocMetastore.DeleteBackup}.
867
+ # @!attribute [rw] name
868
+ # @return [::String]
869
+ # Required. The relative resource name of the backup to delete, in the
870
+ # following form:
871
+ #
872
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
873
+ # @!attribute [rw] request_id
874
+ # @return [::String]
875
+ # Optional. A request ID. Specify a unique request ID to allow the server to ignore the
876
+ # request if it has completed. The server will ignore subsequent requests
877
+ # that provide a duplicate request ID for at least 60 minutes after the first
878
+ # request.
879
+ #
880
+ # For example, if an initial request times out, followed by another request
881
+ # with the same request ID, the server ignores the second request to prevent
882
+ # the creation of duplicate commitments.
883
+ #
884
+ # The request ID must be a valid
885
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
886
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
887
+ class DeleteBackupRequest
888
+ include ::Google::Protobuf::MessageExts
889
+ extend ::Google::Protobuf::MessageExts::ClassMethods
890
+ end
891
+
651
892
  # Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#export_metadata DataprocMetastore.ExportMetadata}.
652
893
  # @!attribute [rw] destination_gcs_folder
653
894
  # @return [::String]
@@ -682,6 +923,41 @@ module Google
682
923
  extend ::Google::Protobuf::MessageExts::ClassMethods
683
924
  end
684
925
 
926
+ # Request message for [DataprocMetastore.Restore][].
927
+ # @!attribute [rw] service
928
+ # @return [::String]
929
+ # Required. The relative resource name of the metastore service to run restore, in the
930
+ # following form:
931
+ #
932
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
933
+ # @!attribute [rw] backup
934
+ # @return [::String]
935
+ # Required. The relative resource name of the metastore service backup to restore
936
+ # from, in the following form:
937
+ #
938
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
939
+ # @!attribute [rw] restore_type
940
+ # @return [::Google::Cloud::Metastore::V1::Restore::RestoreType]
941
+ # Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
942
+ # @!attribute [rw] request_id
943
+ # @return [::String]
944
+ # Optional. A request ID. Specify a unique request ID to allow the server to ignore the
945
+ # request if it has completed. The server will ignore subsequent requests
946
+ # that provide a duplicate request ID for at least 60 minutes after the first
947
+ # request.
948
+ #
949
+ # For example, if an initial request times out, followed by another request
950
+ # with the same request ID, the server ignores the second request to prevent
951
+ # the creation of duplicate commitments.
952
+ #
953
+ # The request ID must be a valid
954
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
955
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
956
+ class RestoreServiceRequest
957
+ include ::Google::Protobuf::MessageExts
958
+ extend ::Google::Protobuf::MessageExts::ClassMethods
959
+ end
960
+
685
961
  # Represents the metadata of a long-running operation.
686
962
  # @!attribute [r] create_time
687
963
  # @return [::Google::Protobuf::Timestamp]
@@ -748,6 +1024,9 @@ module Google
748
1024
 
749
1025
  # Database dump is a MySQL dump file.
750
1026
  MYSQL = 1
1027
+
1028
+ # Database dump contains Avro files.
1029
+ AVRO = 2
751
1030
  end
752
1031
  end
753
1032
  end