google-cloud-spanner-admin-database-v1 0.2.0 → 0.5.1

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.
@@ -105,8 +105,13 @@ module Google
105
105
  # Lists operations that match the specified filter in the request. If the
106
106
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
107
107
  #
108
- # NOTE: the `name` binding below allows API services to override the binding
109
- # to use different resource name schemes, such as `users/*/operations`.
108
+ # NOTE: the `name` binding allows API services to override the binding
109
+ # to use different resource name schemes, such as `users/*/operations`. To
110
+ # override the binding, API services can add a binding such as
111
+ # `"/v1/{name=users/*}/operations"` to their service configuration.
112
+ # For backwards compatibility, the default name includes the operations
113
+ # collection id, however overriding users must ensure the name binding
114
+ # is the parent resource, without the operations collection id.
110
115
  #
111
116
  # @overload list_operations(request, options = nil)
112
117
  # Pass arguments to `list_operations` via a request object, either of type
@@ -124,7 +129,7 @@ module Google
124
129
  # the default parameter values, pass an empty Hash as a request object (see above).
125
130
  #
126
131
  # @param name [::String]
127
- # The name of the operation collection.
132
+ # The name of the operation's parent resource.
128
133
  # @param filter [::String]
129
134
  # The standard list filter.
130
135
  # @param page_size [::Integer]
@@ -392,6 +397,79 @@ module Google
392
397
  raise ::Google::Cloud::Error.from_error(e)
393
398
  end
394
399
 
400
+ ##
401
+ # Waits for the specified long-running operation until it is done or reaches
402
+ # at most a specified timeout, returning the latest state. If the operation
403
+ # is already done, the latest state is immediately returned. If the timeout
404
+ # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
405
+ # timeout is used. If the server does not support this method, it returns
406
+ # `google.rpc.Code.UNIMPLEMENTED`.
407
+ # Note that this method is on a best-effort basis. It may return the latest
408
+ # state before the specified timeout (including immediately), meaning even an
409
+ # immediate response is no guarantee that the operation is done.
410
+ #
411
+ # @overload wait_operation(request, options = nil)
412
+ # Pass arguments to `wait_operation` via a request object, either of type
413
+ # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash.
414
+ #
415
+ # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash]
416
+ # A request object representing the call parameters. Required. To specify no
417
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
418
+ # @param options [::Gapic::CallOptions, ::Hash]
419
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
420
+ #
421
+ # @overload wait_operation(name: nil, timeout: nil)
422
+ # Pass arguments to `wait_operation` via keyword arguments. Note that at
423
+ # least one keyword argument is required. To specify no parameters, or to keep all
424
+ # the default parameter values, pass an empty Hash as a request object (see above).
425
+ #
426
+ # @param name [::String]
427
+ # The name of the operation resource to wait on.
428
+ # @param timeout [::Google::Protobuf::Duration, ::Hash]
429
+ # The maximum duration to wait before timing out. If left blank, the wait
430
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
431
+ # If RPC context deadline is also specified, the shorter one will be used.
432
+ #
433
+ # @yield [response, operation] Access the result along with the RPC operation
434
+ # @yieldparam response [::Gapic::Operation]
435
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
436
+ #
437
+ # @return [::Gapic::Operation]
438
+ #
439
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
440
+ #
441
+ def wait_operation request, options = nil
442
+ raise ::ArgumentError, "request must be provided" if request.nil?
443
+
444
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest
445
+
446
+ # Converts hash and nil to an options object
447
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
448
+
449
+ # Customize the options with defaults
450
+ metadata = @config.rpcs.wait_operation.metadata.to_h
451
+
452
+ # Set x-goog-api-client and x-goog-user-project headers
453
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
454
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
455
+ gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
456
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
+
458
+ options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
459
+ metadata: metadata,
460
+ retry_policy: @config.rpcs.wait_operation.retry_policy
461
+ options.apply_defaults metadata: @config.metadata,
462
+ retry_policy: @config.retry_policy
463
+
464
+ @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
465
+ response = ::Gapic::Operation.new response, @operations_client, options: options
466
+ yield response, operation if block_given?
467
+ return response
468
+ end
469
+ rescue ::GRPC::BadStatus => e
470
+ raise ::Google::Cloud::Error.from_error(e)
471
+ end
472
+
395
473
  ##
396
474
  # Configuration class for the Operations API.
397
475
  #
@@ -484,7 +562,7 @@ module Google
484
562
  config_attr :scope, nil, ::String, ::Array, nil
485
563
  config_attr :lib_name, nil, ::String, nil
486
564
  config_attr :lib_version, nil, ::String, nil
487
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
565
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
488
566
  config_attr :interceptors, nil, ::Array, nil
489
567
  config_attr :timeout, nil, ::Numeric, nil
490
568
  config_attr :metadata, nil, ::Hash, nil
@@ -505,7 +583,7 @@ module Google
505
583
  def rpcs
506
584
  @rpcs ||= begin
507
585
  parent_rpcs = nil
508
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
586
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
509
587
  Rpcs.new parent_rpcs
510
588
  end
511
589
  end
@@ -517,7 +595,7 @@ module Google
517
595
  # Each configuration object is of type `Gapic::Config::Method` and includes
518
596
  # the following configuration fields:
519
597
  #
520
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
598
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
521
599
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
522
600
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
523
601
  # include the following keys:
@@ -548,17 +626,24 @@ module Google
548
626
  # @return [::Gapic::Config::Method]
549
627
  #
550
628
  attr_reader :cancel_operation
629
+ ##
630
+ # RPC-specific configuration for `wait_operation`
631
+ # @return [::Gapic::Config::Method]
632
+ #
633
+ attr_reader :wait_operation
551
634
 
552
635
  # @private
553
636
  def initialize parent_rpcs = nil
554
- list_operations_config = parent_rpcs&.list_operations if parent_rpcs&.respond_to? :list_operations
637
+ list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations
555
638
  @list_operations = ::Gapic::Config::Method.new list_operations_config
556
- get_operation_config = parent_rpcs&.get_operation if parent_rpcs&.respond_to? :get_operation
639
+ get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation
557
640
  @get_operation = ::Gapic::Config::Method.new get_operation_config
558
- delete_operation_config = parent_rpcs&.delete_operation if parent_rpcs&.respond_to? :delete_operation
641
+ delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation
559
642
  @delete_operation = ::Gapic::Config::Method.new delete_operation_config
560
- cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
643
+ cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation
561
644
  @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
645
+ wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation
646
+ @wait_operation = ::Gapic::Config::Method.new wait_operation_config
562
647
 
563
648
  yield self if block_given?
564
649
  end
@@ -45,6 +45,50 @@ module Google
45
45
  "projects/#{project}/instances/#{instance}/backups/#{backup}"
46
46
  end
47
47
 
48
+ ##
49
+ # Create a fully-qualified CryptoKey resource string.
50
+ #
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param key_ring [String]
58
+ # @param crypto_key [String]
59
+ #
60
+ # @return [::String]
61
+ def crypto_key_path project:, location:, key_ring:, crypto_key:
62
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
63
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
64
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
65
+
66
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
67
+ end
68
+
69
+ ##
70
+ # Create a fully-qualified CryptoKeyVersion resource string.
71
+ #
72
+ # The resource will be in the following format:
73
+ #
74
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`
75
+ #
76
+ # @param project [String]
77
+ # @param location [String]
78
+ # @param key_ring [String]
79
+ # @param crypto_key [String]
80
+ # @param crypto_key_version [String]
81
+ #
82
+ # @return [::String]
83
+ def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
84
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
85
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
86
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
87
+ raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"
88
+
89
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
90
+ end
91
+
48
92
  ##
49
93
  # Create a fully-qualified Database resource string.
50
94
  #
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Database
25
25
  module V1
26
- VERSION = "0.2.0"
26
+ VERSION = "0.5.1"
27
27
  end
28
28
  end
29
29
  end
@@ -9,17 +9,18 @@ require 'google/longrunning/operations_pb'
9
9
  require 'google/protobuf/field_mask_pb'
10
10
  require 'google/protobuf/timestamp_pb'
11
11
  require 'google/spanner/admin/database/v1/common_pb'
12
- require 'google/api/annotations_pb'
13
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
13
  add_file("google/spanner/admin/database/v1/backup.proto", :syntax => :proto3) do
15
14
  add_message "google.spanner.admin.database.v1.Backup" do
16
15
  optional :database, :string, 2
16
+ optional :version_time, :message, 9, "google.protobuf.Timestamp"
17
17
  optional :expire_time, :message, 3, "google.protobuf.Timestamp"
18
18
  optional :name, :string, 1
19
19
  optional :create_time, :message, 4, "google.protobuf.Timestamp"
20
20
  optional :size_bytes, :int64, 5
21
21
  optional :state, :enum, 6, "google.spanner.admin.database.v1.Backup.State"
22
22
  repeated :referencing_databases, :string, 7
23
+ optional :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
23
24
  end
24
25
  add_enum "google.spanner.admin.database.v1.Backup.State" do
25
26
  value :STATE_UNSPECIFIED, 0
@@ -30,6 +31,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
30
31
  optional :parent, :string, 1
31
32
  optional :backup_id, :string, 2
32
33
  optional :backup, :message, 3, "google.spanner.admin.database.v1.Backup"
34
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.CreateBackupEncryptionConfig"
33
35
  end
34
36
  add_message "google.spanner.admin.database.v1.CreateBackupMetadata" do
35
37
  optional :name, :string, 1
@@ -69,9 +71,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
69
71
  end
70
72
  add_message "google.spanner.admin.database.v1.BackupInfo" do
71
73
  optional :backup, :string, 1
74
+ optional :version_time, :message, 4, "google.protobuf.Timestamp"
72
75
  optional :create_time, :message, 2, "google.protobuf.Timestamp"
73
76
  optional :source_database, :string, 3
74
77
  end
78
+ add_message "google.spanner.admin.database.v1.CreateBackupEncryptionConfig" do
79
+ optional :encryption_type, :enum, 1, "google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType"
80
+ optional :kms_key_name, :string, 2
81
+ end
82
+ add_enum "google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType" do
83
+ value :ENCRYPTION_TYPE_UNSPECIFIED, 0
84
+ value :USE_DATABASE_ENCRYPTION, 1
85
+ value :GOOGLE_DEFAULT_ENCRYPTION, 2
86
+ value :CUSTOMER_MANAGED_ENCRYPTION, 3
87
+ end
75
88
  end
76
89
  end
77
90
 
@@ -93,6 +106,8 @@ module Google
93
106
  ListBackupOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsRequest").msgclass
94
107
  ListBackupOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsResponse").msgclass
95
108
  BackupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInfo").msgclass
109
+ CreateBackupEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig").msgclass
110
+ CreateBackupEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType").enummodule
96
111
  end
97
112
  end
98
113
  end
@@ -4,8 +4,9 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
7
8
  require 'google/protobuf/timestamp_pb'
8
- require 'google/api/annotations_pb'
9
+ require 'google/rpc/status_pb'
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/spanner/admin/database/v1/common.proto", :syntax => :proto3) do
11
12
  add_message "google.spanner.admin.database.v1.OperationProgress" do
@@ -13,6 +14,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  optional :start_time, :message, 2, "google.protobuf.Timestamp"
14
15
  optional :end_time, :message, 3, "google.protobuf.Timestamp"
15
16
  end
17
+ add_message "google.spanner.admin.database.v1.EncryptionConfig" do
18
+ optional :kms_key_name, :string, 2
19
+ end
20
+ add_message "google.spanner.admin.database.v1.EncryptionInfo" do
21
+ optional :encryption_type, :enum, 3, "google.spanner.admin.database.v1.EncryptionInfo.Type"
22
+ optional :encryption_status, :message, 4, "google.rpc.Status"
23
+ optional :kms_key_version, :string, 2
24
+ end
25
+ add_enum "google.spanner.admin.database.v1.EncryptionInfo.Type" do
26
+ value :TYPE_UNSPECIFIED, 0
27
+ value :GOOGLE_DEFAULT_ENCRYPTION, 1
28
+ value :CUSTOMER_MANAGED_ENCRYPTION, 2
29
+ end
16
30
  end
17
31
  end
18
32
 
@@ -23,6 +37,9 @@ module Google
23
37
  module Database
24
38
  module V1
25
39
  OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OperationProgress").msgclass
40
+ EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionConfig").msgclass
41
+ EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo").msgclass
42
+ EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo.Type").enummodule
26
43
  end
27
44
  end
28
45
  end
@@ -27,6 +27,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
27
27
  optional :state, :enum, 2, "google.spanner.admin.database.v1.Database.State"
28
28
  optional :create_time, :message, 3, "google.protobuf.Timestamp"
29
29
  optional :restore_info, :message, 4, "google.spanner.admin.database.v1.RestoreInfo"
30
+ optional :encryption_config, :message, 5, "google.spanner.admin.database.v1.EncryptionConfig"
31
+ repeated :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
32
+ optional :version_retention_period, :string, 6
33
+ optional :earliest_version_time, :message, 7, "google.protobuf.Timestamp"
30
34
  end
31
35
  add_enum "google.spanner.admin.database.v1.Database.State" do
32
36
  value :STATE_UNSPECIFIED, 0
@@ -47,6 +51,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
47
51
  optional :parent, :string, 1
48
52
  optional :create_statement, :string, 2
49
53
  repeated :extra_statements, :string, 3
54
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.EncryptionConfig"
50
55
  end
51
56
  add_message "google.spanner.admin.database.v1.CreateDatabaseMetadata" do
52
57
  optional :database, :string, 1
@@ -87,10 +92,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
87
92
  add_message "google.spanner.admin.database.v1.RestoreDatabaseRequest" do
88
93
  optional :parent, :string, 1
89
94
  optional :database_id, :string, 2
95
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig"
90
96
  oneof :source do
91
97
  optional :backup, :string, 3
92
98
  end
93
99
  end
100
+ add_message "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig" do
101
+ optional :encryption_type, :enum, 1, "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType"
102
+ optional :kms_key_name, :string, 2
103
+ end
104
+ add_enum "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType" do
105
+ value :ENCRYPTION_TYPE_UNSPECIFIED, 0
106
+ value :USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION, 1
107
+ value :GOOGLE_DEFAULT_ENCRYPTION, 2
108
+ value :CUSTOMER_MANAGED_ENCRYPTION, 3
109
+ end
94
110
  add_message "google.spanner.admin.database.v1.RestoreDatabaseMetadata" do
95
111
  optional :name, :string, 1
96
112
  optional :source_type, :enum, 2, "google.spanner.admin.database.v1.RestoreSourceType"
@@ -134,6 +150,8 @@ module Google
134
150
  ListDatabaseOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsRequest").msgclass
135
151
  ListDatabaseOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsResponse").msgclass
136
152
  RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseRequest").msgclass
153
+ RestoreDatabaseEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig").msgclass
154
+ RestoreDatabaseEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType").enummodule
137
155
  RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseMetadata").msgclass
138
156
  OptimizeRestoredDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata").msgclass
139
157
  RestoreSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule
@@ -47,8 +47,8 @@ module Google
47
47
  # have a name of the format `<database_name>/operations/<operation_id>` and
48
48
  # can be used to track preparation of the database. The
49
49
  # [metadata][google.longrunning.Operation.metadata] field type is
50
- # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
51
- # [response][google.longrunning.Operation.response] field type is
50
+ # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
51
+ # The [response][google.longrunning.Operation.response] field type is
52
52
  # [Database][google.spanner.admin.database.v1.Database], if successful.
53
53
  rpc :CreateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation
54
54
  # Gets the state of a Cloud Spanner database.
@@ -59,7 +59,8 @@ module Google
59
59
  # the format `<database_name>/operations/<operation_id>` and can be used to
60
60
  # track execution of the schema change(s). The
61
61
  # [metadata][google.longrunning.Operation.metadata] field type is
62
- # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
62
+ # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
63
+ # The operation has no response.
63
64
  rpc :UpdateDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Google::Longrunning::Operation
64
65
  # Drops (aka deletes) a Cloud Spanner database.
65
66
  # Completed backups for the database will be retained according to their
@@ -103,18 +104,21 @@ module Google
103
104
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
104
105
  # and can be used to track creation of the backup. The
105
106
  # [metadata][google.longrunning.Operation.metadata] field type is
106
- # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The
107
- # [response][google.longrunning.Operation.response] field type is
108
- # [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
109
- # creation and delete the backup.
110
- # There can be only one pending backup creation per database. Backup creation
111
- # of different databases can run concurrently.
107
+ # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
108
+ # The [response][google.longrunning.Operation.response] field type is
109
+ # [Backup][google.spanner.admin.database.v1.Backup], if successful.
110
+ # Cancelling the returned operation will stop the creation and delete the
111
+ # backup. There can be only one pending backup creation per database. Backup
112
+ # creation of different databases can run concurrently.
112
113
  rpc :CreateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Google::Longrunning::Operation
113
- # Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
114
+ # Gets metadata on a pending or completed
115
+ # [Backup][google.spanner.admin.database.v1.Backup].
114
116
  rpc :GetBackup, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
115
- # Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
117
+ # Updates a pending or completed
118
+ # [Backup][google.spanner.admin.database.v1.Backup].
116
119
  rpc :UpdateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
117
- # Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
120
+ # Deletes a pending or completed
121
+ # [Backup][google.spanner.admin.database.v1.Backup].
118
122
  rpc :DeleteBackup, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Google::Protobuf::Empty
119
123
  # Lists completed and pending backups.
120
124
  # Backups returned are ordered by `create_time` in descending order,
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
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
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -25,7 +25,7 @@ module Google
25
25
  # @return [::String]
26
26
  # The server-assigned name, which is only unique within the same service that
27
27
  # originally returns it. If you use the default HTTP mapping, the
28
- # `name` should have the format of `operations/some/unique/name`.
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
29
  # @!attribute [rw] metadata
30
30
  # @return [::Google::Protobuf::Any]
31
31
  # Service-specific metadata associated with the operation. It typically
@@ -35,7 +35,7 @@ module Google
35
35
  # @!attribute [rw] done
36
36
  # @return [::Boolean]
37
37
  # If the value is `false`, it means the operation is still in progress.
38
- # If true, the operation is completed, and either `error` or `response` is
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
39
  # available.
40
40
  # @!attribute [rw] error
41
41
  # @return [::Google::Rpc::Status]
@@ -67,7 +67,7 @@ module Google
67
67
  # The request message for Operations.ListOperations.
68
68
  # @!attribute [rw] name
69
69
  # @return [::String]
70
- # The name of the operation collection.
70
+ # The name of the operation's parent resource.
71
71
  # @!attribute [rw] filter
72
72
  # @return [::String]
73
73
  # The standard list filter.
@@ -112,6 +112,20 @@ module Google
112
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
113
  end
114
114
 
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
115
129
  # A message representing the message types used by a long-running operation.
116
130
  #
117
131
  # Example: