google-cloud-spanner-admin-database-v1 0.14.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,9 @@ module Google
28
28
  module Rest
29
29
  # Service that implements Longrunning Operations API.
30
30
  class Operations
31
+ # @private
32
+ DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$"
33
+
31
34
  # @private
32
35
  attr_reader :operations_stub
33
36
 
@@ -62,6 +65,15 @@ module Google
62
65
  @config
63
66
  end
64
67
 
68
+ ##
69
+ # The effective universe domain
70
+ #
71
+ # @return [String]
72
+ #
73
+ def universe_domain
74
+ @operations_stub.universe_domain
75
+ end
76
+
65
77
  ##
66
78
  # Create a new Operations client object.
67
79
  #
@@ -86,8 +98,10 @@ module Google
86
98
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
87
99
 
88
100
  @operations_stub = OperationsServiceStub.new(
89
- endpoint: @config.endpoint,
90
- credentials: credentials
101
+ endpoint: @config.endpoint,
102
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
103
+ universe_domain: @config.universe_domain,
104
+ credentials: credentials
91
105
  )
92
106
 
93
107
  # Used by an LRO wrapper for some methods of this service
@@ -138,6 +152,26 @@ module Google
138
152
  # @return [::Gapic::Operation]
139
153
  #
140
154
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
155
+ #
156
+ # @example Basic example
157
+ # require "google/longrunning"
158
+ #
159
+ # # Create a client object. The client can be reused for multiple calls.
160
+ # client = Google::Longrunning::Operations::Rest::Client.new
161
+ #
162
+ # # Create a request. To set request fields, pass in keyword arguments.
163
+ # request = Google::Longrunning::ListOperationsRequest.new
164
+ #
165
+ # # Call the list_operations method.
166
+ # result = client.list_operations request
167
+ #
168
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
169
+ # # over elements, and API calls will be issued to fetch pages as needed.
170
+ # result.each do |item|
171
+ # # Each element is of type ::Google::Longrunning::Operation.
172
+ # p item
173
+ # end
174
+ #
141
175
  def list_operations request, options = nil
142
176
  raise ::ArgumentError, "request must be provided" if request.nil?
143
177
 
@@ -203,6 +237,29 @@ module Google
203
237
  # @return [::Gapic::Operation]
204
238
  #
205
239
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
240
+ #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Rest::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use it to
254
+ # # check the status of an operation, cancel it, or wait for results.
255
+ # # Here is how to wait for a response.
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "No response received."
261
+ # end
262
+ #
206
263
  def get_operation request, options = nil
207
264
  raise ::ArgumentError, "request must be provided" if request.nil?
208
265
 
@@ -269,6 +326,22 @@ module Google
269
326
  # @return [::Google::Protobuf::Empty]
270
327
  #
271
328
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
329
+ #
330
+ # @example Basic example
331
+ # require "google/longrunning"
332
+ #
333
+ # # Create a client object. The client can be reused for multiple calls.
334
+ # client = Google::Longrunning::Operations::Rest::Client.new
335
+ #
336
+ # # Create a request. To set request fields, pass in keyword arguments.
337
+ # request = Google::Longrunning::DeleteOperationRequest.new
338
+ #
339
+ # # Call the delete_operation method.
340
+ # result = client.delete_operation request
341
+ #
342
+ # # The returned object is of type Google::Protobuf::Empty.
343
+ # p result
344
+ #
272
345
  def delete_operation request, options = nil
273
346
  raise ::ArgumentError, "request must be provided" if request.nil?
274
347
 
@@ -340,6 +413,22 @@ module Google
340
413
  # @return [::Google::Protobuf::Empty]
341
414
  #
342
415
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
416
+ #
417
+ # @example Basic example
418
+ # require "google/longrunning"
419
+ #
420
+ # # Create a client object. The client can be reused for multiple calls.
421
+ # client = Google::Longrunning::Operations::Rest::Client.new
422
+ #
423
+ # # Create a request. To set request fields, pass in keyword arguments.
424
+ # request = Google::Longrunning::CancelOperationRequest.new
425
+ #
426
+ # # Call the cancel_operation method.
427
+ # result = client.cancel_operation request
428
+ #
429
+ # # The returned object is of type Google::Protobuf::Empty.
430
+ # p result
431
+ #
343
432
  def cancel_operation request, options = nil
344
433
  raise ::ArgumentError, "request must be provided" if request.nil?
345
434
 
@@ -405,9 +494,9 @@ module Google
405
494
  # end
406
495
  #
407
496
  # @!attribute [rw] endpoint
408
- # The hostname or hostname:port of the service endpoint.
409
- # Defaults to `"spanner.googleapis.com"`.
410
- # @return [::String]
497
+ # A custom service endpoint, as a hostname or hostname:port. The default is
498
+ # nil, indicating to use the default endpoint in the current universe domain.
499
+ # @return [::String,nil]
411
500
  # @!attribute [rw] credentials
412
501
  # Credentials to send with calls. You may provide any of the following types:
413
502
  # * (`String`) The path to a service account key file in JSON format
@@ -444,13 +533,20 @@ module Google
444
533
  # @!attribute [rw] quota_project
445
534
  # A separate project against which to charge quota.
446
535
  # @return [::String]
536
+ # @!attribute [rw] universe_domain
537
+ # The universe domain within which to make requests. This determines the
538
+ # default endpoint URL. The default value of nil uses the environment
539
+ # universe (usually the default "googleapis.com" universe).
540
+ # @return [::String,nil]
447
541
  #
448
542
  class Configuration
449
543
  extend ::Gapic::Config
450
544
 
545
+ # @private
546
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
451
547
  DEFAULT_ENDPOINT = "spanner.googleapis.com"
452
548
 
453
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
549
+ config_attr :endpoint, nil, ::String, nil
454
550
  config_attr :credentials, nil do |value|
455
551
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
456
552
  allowed.any? { |klass| klass === value }
@@ -462,6 +558,7 @@ module Google
462
558
  config_attr :metadata, nil, ::Hash, nil
463
559
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
464
560
  config_attr :quota_project, nil, ::String, nil
561
+ config_attr :universe_domain, nil, ::String, nil
465
562
 
466
563
  # @private
467
564
  def initialize parent_config = nil
@@ -544,12 +641,15 @@ module Google
544
641
  # Service stub contains baseline method implementations
545
642
  # including transcoding, making the REST call, and deserialing the response.
546
643
  class OperationsServiceStub
547
- def initialize endpoint:, credentials:
644
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
548
645
  # These require statements are intentionally placed here to initialize
549
646
  # the REST modules only when it's required.
550
647
  require "gapic/rest"
551
648
 
552
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
649
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
650
+ endpoint_template: endpoint_template,
651
+ universe_domain: universe_domain,
652
+ credentials: credentials
553
653
  end
554
654
 
555
655
  ##
@@ -32,16 +32,28 @@ module Google
32
32
  # including transcoding, making the REST call, and deserialing the response.
33
33
  #
34
34
  class ServiceStub
35
- def initialize endpoint:, credentials:
35
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
36
36
  # These require statements are intentionally placed here to initialize
37
37
  # the REST modules only when it's required.
38
38
  require "gapic/rest"
39
39
 
40
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
41
+ endpoint_template: endpoint_template,
42
+ universe_domain: universe_domain,
43
+ credentials: credentials,
41
44
  numeric_enums: true,
42
45
  raise_faraday_errors: false
43
46
  end
44
47
 
48
+ ##
49
+ # The effective universe domain
50
+ #
51
+ # @return [String]
52
+ #
53
+ def universe_domain
54
+ @client_stub.universe_domain
55
+ end
56
+
45
57
  ##
46
58
  # Baseline implementation for the list_databases REST call
47
59
  #
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Database
25
25
  module V1
26
- VERSION = "0.14.2"
26
+ VERSION = "0.16.0"
27
27
  end
28
28
  end
29
29
  end
@@ -21,6 +21,7 @@ module Google
21
21
  module Api
22
22
  # Required information for every language.
23
23
  # @!attribute [rw] reference_docs_uri
24
+ # @deprecated This field is deprecated and may be removed in the next major version update.
24
25
  # @return [::String]
25
26
  # Link to automatically generated reference documentation. Example:
26
27
  # https://cloud.google.com/nodejs/docs/reference/asset/latest
@@ -304,6 +305,19 @@ module Google
304
305
  # seconds: 360 # 6 minutes
305
306
  # total_poll_timeout:
306
307
  # seconds: 54000 # 90 minutes
308
+ # @!attribute [rw] auto_populated_fields
309
+ # @return [::Array<::String>]
310
+ # List of top-level fields of the request message, that should be
311
+ # automatically populated by the client libraries based on their
312
+ # (google.api.field_info).format. Currently supported format: UUID4.
313
+ #
314
+ # Example of a YAML configuration:
315
+ #
316
+ # publishing:
317
+ # method_settings:
318
+ # - selector: google.example.v1.ExampleService.CreateExample
319
+ # auto_populated_fields:
320
+ # - request_id
307
321
  class MethodSettings
308
322
  include ::Google::Protobuf::MessageExts
309
323
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
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.14.2
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-04 00:00:00.000000000 Z
11
+ date: 2024-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.19.1
19
+ version: 0.21.1
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.19.1
29
+ version: 0.21.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  - !ruby/object:Gem::Version
239
239
  version: '0'
240
240
  requirements: []
241
- rubygems_version: 3.4.2
241
+ rubygems_version: 3.5.3
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Cloud Spanner is a managed, mission-critical, globally consistent and scalable