google-cloud-spanner-admin-database-v1 0.7.0 → 0.7.4

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|
@@ -398,9 +487,9 @@ module Google
398
487
  end
399
488
 
400
489
  ##
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
490
+ # Waits until the specified long-running operation is done or reaches at most
491
+ # a specified timeout, returning the latest state. If the operation is
492
+ # already done, the latest state is immediately returned. If the timeout
404
493
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
405
494
  # timeout is used. If the server does not support this method, it returns
406
495
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -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.0"
26
+ VERSION = "0.7.4"
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
@@ -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
@@ -19,30 +19,53 @@
19
19
 
20
20
  module Google
21
21
  module Type
22
- # Represents an expression text. Example:
22
+ # Represents a textual expression in the Common Expression Language (CEL)
23
+ # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
24
+ # are documented at https://github.com/google/cel-spec.
23
25
  #
24
- # title: "User account presence"
25
- # description: "Determines whether the request has a user account"
26
- # expression: "size(request.user) > 0"
26
+ # Example (Comparison):
27
+ #
28
+ # title: "Summary size limit"
29
+ # description: "Determines if a summary is less than 100 chars"
30
+ # expression: "document.summary.size() < 100"
31
+ #
32
+ # Example (Equality):
33
+ #
34
+ # title: "Requestor is owner"
35
+ # description: "Determines if requestor is the document owner"
36
+ # expression: "document.owner == request.auth.claims.email"
37
+ #
38
+ # Example (Logic):
39
+ #
40
+ # title: "Public documents"
41
+ # description: "Determine whether the document should be publicly visible"
42
+ # expression: "document.type != 'private' && document.type != 'internal'"
43
+ #
44
+ # Example (Data Manipulation):
45
+ #
46
+ # title: "Notification string"
47
+ # description: "Create a notification string with a timestamp."
48
+ # expression: "'New message received at ' + string(document.create_time)"
49
+ #
50
+ # The exact variables and functions that may be referenced within an expression
51
+ # are determined by the service that evaluates it. See the service
52
+ # documentation for additional information.
27
53
  # @!attribute [rw] expression
28
54
  # @return [::String]
29
- # Textual representation of an expression in
30
- # Common Expression Language syntax.
31
- #
32
- # The application context of the containing message determines which
33
- # well-known feature set of CEL is supported.
55
+ # Textual representation of an expression in Common Expression Language
56
+ # syntax.
34
57
  # @!attribute [rw] title
35
58
  # @return [::String]
36
- # An optional title for the expression, i.e. a short string describing
59
+ # Optional. Title for the expression, i.e. a short string describing
37
60
  # its purpose. This can be used e.g. in UIs which allow to enter the
38
61
  # expression.
39
62
  # @!attribute [rw] description
40
63
  # @return [::String]
41
- # An optional description of the expression. This is a longer text which
64
+ # Optional. Description of the expression. This is a longer text which
42
65
  # describes the expression, e.g. when hovered over it in a UI.
43
66
  # @!attribute [rw] location
44
67
  # @return [::String]
45
- # An optional string indicating the location of the expression for error
68
+ # Optional. String indicating the location of the expression for error
46
69
  # reporting, e.g. a file name and a position in the file.
47
70
  class Expr
48
71
  include ::Google::Protobuf::MessageExts
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.0
4
+ version: 0.7.4
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-07 00:00:00.000000000 Z
11
+ date: 2021-11-08 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: []