google-cloud-spanner-admin-database-v1 0.7.1 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -145,6 +145,27 @@ module Google
145
145
  #
146
146
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
147
147
  #
148
+ # @example Basic example
149
+ # require "google/longrunning"
150
+ #
151
+ # # Create a client object. The client can be reused for multiple calls.
152
+ # client = Google::Longrunning::Operations::Client.new
153
+ #
154
+ # # Create a request. To set request fields, pass in keyword arguments.
155
+ # request = Google::Longrunning::ListOperationsRequest.new
156
+ #
157
+ # # Call the list_operations method.
158
+ # result = client.list_operations request
159
+ #
160
+ # # The returned object is of type Gapic::PagedEnumerable. You can
161
+ # # iterate over all elements by calling #each, and the enumerable
162
+ # # will lazily make API calls to fetch subsequent pages. Other
163
+ # # methods are also available for managing paging directly.
164
+ # result.each do |response|
165
+ # # Each element is of type ::Google::Longrunning::Operation.
166
+ # p response
167
+ # end
168
+ #
148
169
  def list_operations request, options = nil
149
170
  raise ::ArgumentError, "request must be provided" if request.nil?
150
171
 
@@ -162,16 +183,20 @@ module Google
162
183
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
163
184
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
164
185
 
165
- header_params = {
166
- "name" => request.name
167
- }
186
+ header_params = {}
187
+ if request.name
188
+ header_params["name"] = request.name
189
+ end
190
+
168
191
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
169
192
  metadata[:"x-goog-request-params"] ||= request_params_header
170
193
 
171
194
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
172
195
  metadata: metadata,
173
196
  retry_policy: @config.rpcs.list_operations.retry_policy
174
- options.apply_defaults metadata: @config.metadata,
197
+
198
+ options.apply_defaults timeout: @config.timeout,
199
+ metadata: @config.metadata,
175
200
  retry_policy: @config.retry_policy
176
201
 
177
202
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -215,6 +240,28 @@ module Google
215
240
  #
216
241
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
242
  #
243
+ # @example Basic example
244
+ # require "google/longrunning"
245
+ #
246
+ # # Create a client object. The client can be reused for multiple calls.
247
+ # client = Google::Longrunning::Operations::Client.new
248
+ #
249
+ # # Create a request. To set request fields, pass in keyword arguments.
250
+ # request = Google::Longrunning::GetOperationRequest.new
251
+ #
252
+ # # Call the get_operation method.
253
+ # result = client.get_operation request
254
+ #
255
+ # # The returned object is of type Gapic::Operation. You can use this
256
+ # # object to check the status of an operation, cancel it, or wait
257
+ # # for results. Here is how to block until completion:
258
+ # result.wait_until_done! timeout: 60
259
+ # if result.response?
260
+ # p result.response
261
+ # else
262
+ # puts "Error!"
263
+ # end
264
+ #
218
265
  def get_operation request, options = nil
219
266
  raise ::ArgumentError, "request must be provided" if request.nil?
220
267
 
@@ -232,16 +279,20 @@ module Google
232
279
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
233
280
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
281
 
235
- header_params = {
236
- "name" => request.name
237
- }
282
+ header_params = {}
283
+ if request.name
284
+ header_params["name"] = request.name
285
+ end
286
+
238
287
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
288
  metadata[:"x-goog-request-params"] ||= request_params_header
240
289
 
241
290
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
242
291
  metadata: metadata,
243
292
  retry_policy: @config.rpcs.get_operation.retry_policy
244
- options.apply_defaults metadata: @config.metadata,
293
+
294
+ options.apply_defaults timeout: @config.timeout,
295
+ metadata: @config.metadata,
245
296
  retry_policy: @config.retry_policy
246
297
 
247
298
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -285,6 +336,21 @@ module Google
285
336
  #
286
337
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
287
338
  #
339
+ # @example Basic example
340
+ # require "google/longrunning"
341
+ #
342
+ # # Create a client object. The client can be reused for multiple calls.
343
+ # client = Google::Longrunning::Operations::Client.new
344
+ #
345
+ # # Create a request. To set request fields, pass in keyword arguments.
346
+ # request = Google::Longrunning::DeleteOperationRequest.new
347
+ #
348
+ # # Call the delete_operation method.
349
+ # result = client.delete_operation request
350
+ #
351
+ # # The returned object is of type Google::Protobuf::Empty.
352
+ # p result
353
+ #
288
354
  def delete_operation request, options = nil
289
355
  raise ::ArgumentError, "request must be provided" if request.nil?
290
356
 
@@ -302,16 +368,20 @@ module Google
302
368
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
303
369
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
304
370
 
305
- header_params = {
306
- "name" => request.name
307
- }
371
+ header_params = {}
372
+ if request.name
373
+ header_params["name"] = request.name
374
+ end
375
+
308
376
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
309
377
  metadata[:"x-goog-request-params"] ||= request_params_header
310
378
 
311
379
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
312
380
  metadata: metadata,
313
381
  retry_policy: @config.rpcs.delete_operation.retry_policy
314
- options.apply_defaults metadata: @config.metadata,
382
+
383
+ options.apply_defaults timeout: @config.timeout,
384
+ metadata: @config.metadata,
315
385
  retry_policy: @config.retry_policy
316
386
 
317
387
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -360,6 +430,21 @@ module Google
360
430
  #
361
431
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
362
432
  #
433
+ # @example Basic example
434
+ # require "google/longrunning"
435
+ #
436
+ # # Create a client object. The client can be reused for multiple calls.
437
+ # client = Google::Longrunning::Operations::Client.new
438
+ #
439
+ # # Create a request. To set request fields, pass in keyword arguments.
440
+ # request = Google::Longrunning::CancelOperationRequest.new
441
+ #
442
+ # # Call the cancel_operation method.
443
+ # result = client.cancel_operation request
444
+ #
445
+ # # The returned object is of type Google::Protobuf::Empty.
446
+ # p result
447
+ #
363
448
  def cancel_operation request, options = nil
364
449
  raise ::ArgumentError, "request must be provided" if request.nil?
365
450
 
@@ -377,16 +462,20 @@ module Google
377
462
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
378
463
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
379
464
 
380
- header_params = {
381
- "name" => request.name
382
- }
465
+ header_params = {}
466
+ if request.name
467
+ header_params["name"] = request.name
468
+ end
469
+
383
470
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
384
471
  metadata[:"x-goog-request-params"] ||= request_params_header
385
472
 
386
473
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
387
474
  metadata: metadata,
388
475
  retry_policy: @config.rpcs.cancel_operation.retry_policy
389
- options.apply_defaults metadata: @config.metadata,
476
+
477
+ options.apply_defaults timeout: @config.timeout,
478
+ metadata: @config.metadata,
390
479
  retry_policy: @config.retry_policy
391
480
 
392
481
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -438,6 +527,28 @@ module Google
438
527
  #
439
528
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
440
529
  #
530
+ # @example Basic example
531
+ # require "google/longrunning"
532
+ #
533
+ # # Create a client object. The client can be reused for multiple calls.
534
+ # client = Google::Longrunning::Operations::Client.new
535
+ #
536
+ # # Create a request. To set request fields, pass in keyword arguments.
537
+ # request = Google::Longrunning::WaitOperationRequest.new
538
+ #
539
+ # # Call the wait_operation method.
540
+ # result = client.wait_operation request
541
+ #
542
+ # # The returned object is of type Gapic::Operation. You can use this
543
+ # # object to check the status of an operation, cancel it, or wait
544
+ # # for results. Here is how to block until completion:
545
+ # result.wait_until_done! timeout: 60
546
+ # if result.response?
547
+ # p result.response
548
+ # else
549
+ # puts "Error!"
550
+ # end
551
+ #
441
552
  def wait_operation request, options = nil
442
553
  raise ::ArgumentError, "request must be provided" if request.nil?
443
554
 
@@ -458,7 +569,9 @@ module Google
458
569
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
459
570
  metadata: metadata,
460
571
  retry_policy: @config.rpcs.wait_operation.retry_policy
461
- options.apply_defaults metadata: @config.metadata,
572
+
573
+ options.apply_defaults timeout: @config.timeout,
574
+ metadata: @config.metadata,
462
575
  retry_policy: @config.retry_policy
463
576
 
464
577
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -483,22 +596,21 @@ module Google
483
596
  # Configuration can be applied globally to all clients, or to a single client
484
597
  # on construction.
485
598
  #
486
- # # Examples
487
- #
488
- # To modify the global config, setting the timeout for list_operations
489
- # to 20 seconds, and all remaining timeouts to 10 seconds:
490
- #
491
- # ::Google::Longrunning::Operations::Client.configure do |config|
492
- # config.timeout = 10.0
493
- # config.rpcs.list_operations.timeout = 20.0
494
- # end
495
- #
496
- # To apply the above configuration only to a new client:
497
- #
498
- # client = ::Google::Longrunning::Operations::Client.new do |config|
499
- # config.timeout = 10.0
500
- # config.rpcs.list_operations.timeout = 20.0
501
- # end
599
+ # @example
600
+ #
601
+ # # Modify the global config, setting the timeout for
602
+ # # list_operations to 20 seconds,
603
+ # # and all remaining timeouts to 10 seconds.
604
+ # ::Google::Longrunning::Operations::Client.configure do |config|
605
+ # config.timeout = 10.0
606
+ # config.rpcs.list_operations.timeout = 20.0
607
+ # end
608
+ #
609
+ # # Apply the above configuration only to a new client.
610
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
611
+ # config.timeout = 10.0
612
+ # config.rpcs.list_operations.timeout = 20.0
613
+ # end
502
614
  #
503
615
  # @!attribute [rw] endpoint
504
616
  # The hostname or hostname:port of the service endpoint.
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Database
25
25
  module V1
26
- VERSION = "0.7.1"
26
+ VERSION = "0.7.5"
27
27
  end
28
28
  end
29
29
  end
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/admin/database/v1/backup.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/longrunning/operations_pb'
@@ -10,6 +8,8 @@ require 'google/protobuf/field_mask_pb'
10
8
  require 'google/protobuf/timestamp_pb'
11
9
  require 'google/spanner/admin/database/v1/common_pb'
12
10
  require 'google/api/annotations_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/spanner/admin/database/v1/backup.proto", :syntax => :proto3) do
15
15
  add_message "google.spanner.admin.database.v1.Backup" do
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/admin/database/v1/common.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/protobuf/timestamp_pb'
9
7
  require 'google/rpc/status_pb'
10
8
  require 'google/api/annotations_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/spanner/admin/database/v1/common.proto", :syntax => :proto3) do
13
13
  add_message "google.spanner.admin.database.v1.OperationProgress" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/admin/database/v1/spanner_database_admin.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -14,6 +12,8 @@ require 'google/protobuf/empty_pb'
14
12
  require 'google/protobuf/timestamp_pb'
15
13
  require 'google/spanner/admin/database/v1/backup_pb'
16
14
  require 'google/spanner/admin/database/v1/common_pb'
15
+ require 'google/protobuf'
16
+
17
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
18
18
  add_file("google/spanner/admin/database/v1/spanner_database_admin.proto", :syntax => :proto3) do
19
19
  add_message "google.spanner.admin.database.v1.RestoreInfo" do
@@ -34,7 +34,7 @@ module Google
34
34
  # database and to restore from an existing backup.
35
35
  class Service
36
36
 
37
- include GRPC::GenericService
37
+ include ::GRPC::GenericService
38
38
 
39
39
  self.marshal_class_method = :encode
40
40
  self.unmarshal_class_method = :decode
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner-admin-database-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -179,8 +179,7 @@ dependencies:
179
179
  description: Cloud Spanner is a managed, mission-critical, globally consistent and
180
180
  scalable relational database service. Note that google-cloud-spanner-admin-database-v1
181
181
  is a version-specific client library. For most uses, we recommend installing the
182
- main client library google-cloud-spanner-admin-database instead. See the readme
183
- for more details.
182
+ main client library google-cloud-spanner instead. See the readme for more details.
184
183
  email: googleapis-packages@google.com
185
184
  executables: []
186
185
  extensions: []
@@ -238,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
237
  - !ruby/object:Gem::Version
239
238
  version: '0'
240
239
  requirements: []
241
- rubygems_version: 3.2.17
240
+ rubygems_version: 3.3.4
242
241
  signing_key:
243
242
  specification_version: 4
244
243
  summary: API Client library for the Cloud Spanner Database Admin V1 API