google-cloud-datastore-admin-v1 0.3.0 → 0.4.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3625c8bbc579cb83a08da7a675c8193d06e8dc19524650f7371b9d8708f35f12
4
- data.tar.gz: fdcbf5a5caa4cfb53d7d5eb09ef38cc89669dad416ddf485e8e0047eede1f3b6
3
+ metadata.gz: a9aaa6c6fa9c7d34bd6eddf0608875ca17ba47e6d2d9146226f3627cb8777974
4
+ data.tar.gz: 117197c2dcd48ab873e9961a66d8b5d733d18f7afc86320a7c4ebc44894766a8
5
5
  SHA512:
6
- metadata.gz: ced0fa3e2b18b60889b4105266559956b9b445f7ddfc1e1ffe24ecd83887cd66bd7ed23cd3bc39a6a78cc005f15dd9127622dd855ac95030ee9612a5064916fe
7
- data.tar.gz: 7994125ffa47a36f100627f9bc143c8a696ee61852efaa5b899373c8b87217f74e065067c414456c461fd931e9a17aba25e1ff4b66de17d27ee3b5cd37484d4a
6
+ metadata.gz: 9553056a8776be9158a9d50009064e632969d91373622514c5351a6e89988557e2ca67fc488012f07248f33dc6a09532905194fcb9eece369d2d48a2b278c39b
7
+ data.tar.gz: 9e048b52b87e589a0d6e490aec72ab81c882c1e54ae7a4d01e77eb6e633e0a6332024e17dff5980d5c04e937f258c35af86edecf7bbf7819cb109ce1db8bb535
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-datastore-admin-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Credentials}):
68
68
 
69
- 1. `DATASTORE_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `DATASTORE_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `DATASTORE_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `DATASTORE_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/datastore/admin/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/datastore/admin/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new do |c
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/datastore/admin/v1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/datastore/admin/v1"
34
34
 
35
35
  client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Datastore::Admin::V1::ExportEntitiesRequest.new # (request fields as keyword arguments...)
37
37
  response = client.export_entities request
38
38
  ```
39
39
 
@@ -71,11 +71,11 @@ end
71
71
 
72
72
  ## Supported Ruby Versions
73
73
 
74
- This library is supported on Ruby 2.4+.
74
+ This library is supported on Ruby 2.5+.
75
75
 
76
76
  Google provides official support for Ruby versions that are actively supported
77
77
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.4
78
+ in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
81
  about the Ruby support schedule.
@@ -100,13 +100,12 @@ module Google
100
100
  # See {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client::Configuration}
101
101
  # for a description of the configuration fields.
102
102
  #
103
- # ## Example
103
+ # @example
104
104
  #
105
- # To modify the configuration for all DatastoreAdmin clients:
106
- #
107
- # ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.configure do |config|
108
- # config.timeout = 10.0
109
- # end
105
+ # # Modify the configuration for all DatastoreAdmin clients
106
+ # ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.configure do |config|
107
+ # config.timeout = 10.0
108
+ # end
110
109
  #
111
110
  # @yield [config] Configure the Client client.
112
111
  # @yieldparam config [Client::Configuration]
@@ -119,7 +118,7 @@ module Google
119
118
  parent_config = while namespace.any?
120
119
  parent_name = namespace.join "::"
121
120
  parent_const = const_get parent_name
122
- break parent_const.configure if parent_const&.respond_to? :configure
121
+ break parent_const.configure if parent_const.respond_to? :configure
123
122
  namespace.pop
124
123
  end
125
124
  default_config = Client::Configuration.new parent_config
@@ -134,18 +133,12 @@ module Google
134
133
 
135
134
  default_config.rpcs.get_index.timeout = 60.0
136
135
  default_config.rpcs.get_index.retry_policy = {
137
- initial_delay: 0.1,
138
- max_delay: 60.0,
139
- multiplier: 1.3,
140
- retry_codes: [14, 4]
136
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
141
137
  }
142
138
 
143
139
  default_config.rpcs.list_indexes.timeout = 60.0
144
140
  default_config.rpcs.list_indexes.retry_policy = {
145
- initial_delay: 0.1,
146
- max_delay: 60.0,
147
- multiplier: 1.3,
148
- retry_codes: [14, 4]
141
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
149
142
  }
150
143
 
151
144
  default_config
@@ -177,19 +170,15 @@ module Google
177
170
  ##
178
171
  # Create a new DatastoreAdmin client object.
179
172
  #
180
- # ## Examples
181
- #
182
- # To create a new DatastoreAdmin client with the default
183
- # configuration:
184
- #
185
- # client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
173
+ # @example
186
174
  #
187
- # To create a new DatastoreAdmin client with a custom
188
- # configuration:
175
+ # # Create a client using the default configuration
176
+ # client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
189
177
  #
190
- # client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new do |config|
191
- # config.timeout = 10.0
192
- # end
178
+ # # Create a client using a custom configuration
179
+ # client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new do |config|
180
+ # config.timeout = 10.0
181
+ # end
193
182
  #
194
183
  # @yield [config] Configure the DatastoreAdmin client.
195
184
  # @yieldparam config [Client::Configuration]
@@ -209,14 +198,13 @@ module Google
209
198
 
210
199
  # Create credentials
211
200
  credentials = @config.credentials
212
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
201
+ # Use self-signed JWT if the endpoint is unchanged from default,
213
202
  # but only if the default endpoint does not have a region prefix.
214
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
215
- @config.endpoint == Client.configure.endpoint &&
203
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
216
204
  !@config.endpoint.split(".").first.include?("-")
217
- credentials ||= Credentials.default scope: @config.scope,
205
+ credentials ||= Credentials.default scope: @config.scope,
218
206
  enable_self_signed_jwt: enable_self_signed_jwt
219
- if credentials.is_a?(String) || credentials.is_a?(Hash)
207
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
220
208
  credentials = Credentials.new credentials, scope: @config.scope
221
209
  end
222
210
  @quota_project_id = @config.quota_project
@@ -330,7 +318,9 @@ module Google
330
318
  options.apply_defaults timeout: @config.rpcs.export_entities.timeout,
331
319
  metadata: metadata,
332
320
  retry_policy: @config.rpcs.export_entities.retry_policy
333
- options.apply_defaults metadata: @config.metadata,
321
+
322
+ options.apply_defaults timeout: @config.timeout,
323
+ metadata: @config.metadata,
334
324
  retry_policy: @config.retry_policy
335
325
 
336
326
  @datastore_admin_stub.call_rpc :export_entities, request, options: options do |response, operation|
@@ -422,7 +412,9 @@ module Google
422
412
  options.apply_defaults timeout: @config.rpcs.import_entities.timeout,
423
413
  metadata: metadata,
424
414
  retry_policy: @config.rpcs.import_entities.retry_policy
425
- options.apply_defaults metadata: @config.metadata,
415
+
416
+ options.apply_defaults timeout: @config.timeout,
417
+ metadata: @config.metadata,
426
418
  retry_policy: @config.retry_policy
427
419
 
428
420
  @datastore_admin_stub.call_rpc :import_entities, request, options: options do |response, operation|
@@ -505,7 +497,9 @@ module Google
505
497
  options.apply_defaults timeout: @config.rpcs.create_index.timeout,
506
498
  metadata: metadata,
507
499
  retry_policy: @config.rpcs.create_index.retry_policy
508
- options.apply_defaults metadata: @config.metadata,
500
+
501
+ options.apply_defaults timeout: @config.timeout,
502
+ metadata: @config.metadata,
509
503
  retry_policy: @config.retry_policy
510
504
 
511
505
  @datastore_admin_stub.call_rpc :create_index, request, options: options do |response, operation|
@@ -576,7 +570,7 @@ module Google
576
570
 
577
571
  header_params = {
578
572
  "project_id" => request.project_id,
579
- "index_id" => request.index_id
573
+ "index_id" => request.index_id
580
574
  }
581
575
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
582
576
  metadata[:"x-goog-request-params"] ||= request_params_header
@@ -584,7 +578,9 @@ module Google
584
578
  options.apply_defaults timeout: @config.rpcs.delete_index.timeout,
585
579
  metadata: metadata,
586
580
  retry_policy: @config.rpcs.delete_index.retry_policy
587
- options.apply_defaults metadata: @config.metadata,
581
+
582
+ options.apply_defaults timeout: @config.timeout,
583
+ metadata: @config.metadata,
588
584
  retry_policy: @config.retry_policy
589
585
 
590
586
  @datastore_admin_stub.call_rpc :delete_index, request, options: options do |response, operation|
@@ -646,7 +642,7 @@ module Google
646
642
 
647
643
  header_params = {
648
644
  "project_id" => request.project_id,
649
- "index_id" => request.index_id
645
+ "index_id" => request.index_id
650
646
  }
651
647
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
652
648
  metadata[:"x-goog-request-params"] ||= request_params_header
@@ -654,7 +650,9 @@ module Google
654
650
  options.apply_defaults timeout: @config.rpcs.get_index.timeout,
655
651
  metadata: metadata,
656
652
  retry_policy: @config.rpcs.get_index.retry_policy
657
- options.apply_defaults metadata: @config.metadata,
653
+
654
+ options.apply_defaults timeout: @config.timeout,
655
+ metadata: @config.metadata,
658
656
  retry_policy: @config.retry_policy
659
657
 
660
658
  @datastore_admin_stub.call_rpc :get_index, request, options: options do |response, operation|
@@ -728,7 +726,9 @@ module Google
728
726
  options.apply_defaults timeout: @config.rpcs.list_indexes.timeout,
729
727
  metadata: metadata,
730
728
  retry_policy: @config.rpcs.list_indexes.retry_policy
731
- options.apply_defaults metadata: @config.metadata,
729
+
730
+ options.apply_defaults timeout: @config.timeout,
731
+ metadata: @config.metadata,
732
732
  retry_policy: @config.retry_policy
733
733
 
734
734
  @datastore_admin_stub.call_rpc :list_indexes, request, options: options do |response, operation|
@@ -753,22 +753,21 @@ module Google
753
753
  # Configuration can be applied globally to all clients, or to a single client
754
754
  # on construction.
755
755
  #
756
- # # Examples
757
- #
758
- # To modify the global config, setting the timeout for export_entities
759
- # to 20 seconds, and all remaining timeouts to 10 seconds:
760
- #
761
- # ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.configure do |config|
762
- # config.timeout = 10.0
763
- # config.rpcs.export_entities.timeout = 20.0
764
- # end
756
+ # @example
765
757
  #
766
- # To apply the above configuration only to a new client:
758
+ # # Modify the global config, setting the timeout for
759
+ # # export_entities to 20 seconds,
760
+ # # and all remaining timeouts to 10 seconds.
761
+ # ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.configure do |config|
762
+ # config.timeout = 10.0
763
+ # config.rpcs.export_entities.timeout = 20.0
764
+ # end
767
765
  #
768
- # client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new do |config|
769
- # config.timeout = 10.0
770
- # config.rpcs.export_entities.timeout = 20.0
771
- # end
766
+ # # Apply the above configuration only to a new client.
767
+ # client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new do |config|
768
+ # config.timeout = 10.0
769
+ # config.rpcs.export_entities.timeout = 20.0
770
+ # end
772
771
  #
773
772
  # @!attribute [rw] endpoint
774
773
  # The hostname or hostname:port of the service endpoint.
@@ -832,7 +831,7 @@ module Google
832
831
  config_attr :scope, nil, ::String, ::Array, nil
833
832
  config_attr :lib_name, nil, ::String, nil
834
833
  config_attr :lib_version, nil, ::String, nil
835
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
834
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
836
835
  config_attr :interceptors, nil, ::Array, nil
837
836
  config_attr :timeout, nil, ::Numeric, nil
838
837
  config_attr :metadata, nil, ::Hash, nil
@@ -853,7 +852,7 @@ module Google
853
852
  def rpcs
854
853
  @rpcs ||= begin
855
854
  parent_rpcs = nil
856
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
855
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
857
856
  Rpcs.new parent_rpcs
858
857
  end
859
858
  end
@@ -909,17 +908,17 @@ module Google
909
908
 
910
909
  # @private
911
910
  def initialize parent_rpcs = nil
912
- export_entities_config = parent_rpcs&.export_entities if parent_rpcs&.respond_to? :export_entities
911
+ export_entities_config = parent_rpcs.export_entities if parent_rpcs.respond_to? :export_entities
913
912
  @export_entities = ::Gapic::Config::Method.new export_entities_config
914
- import_entities_config = parent_rpcs&.import_entities if parent_rpcs&.respond_to? :import_entities
913
+ import_entities_config = parent_rpcs.import_entities if parent_rpcs.respond_to? :import_entities
915
914
  @import_entities = ::Gapic::Config::Method.new import_entities_config
916
- create_index_config = parent_rpcs&.create_index if parent_rpcs&.respond_to? :create_index
915
+ create_index_config = parent_rpcs.create_index if parent_rpcs.respond_to? :create_index
917
916
  @create_index = ::Gapic::Config::Method.new create_index_config
918
- delete_index_config = parent_rpcs&.delete_index if parent_rpcs&.respond_to? :delete_index
917
+ delete_index_config = parent_rpcs.delete_index if parent_rpcs.respond_to? :delete_index
919
918
  @delete_index = ::Gapic::Config::Method.new delete_index_config
920
- get_index_config = parent_rpcs&.get_index if parent_rpcs&.respond_to? :get_index
919
+ get_index_config = parent_rpcs.get_index if parent_rpcs.respond_to? :get_index
921
920
  @get_index = ::Gapic::Config::Method.new get_index_config
922
- list_indexes_config = parent_rpcs&.list_indexes if parent_rpcs&.respond_to? :list_indexes
921
+ list_indexes_config = parent_rpcs.list_indexes if parent_rpcs.respond_to? :list_indexes
923
922
  @list_indexes = ::Gapic::Config::Method.new list_indexes_config
924
923
 
925
924
  yield self if block_given?
@@ -83,7 +83,7 @@ module Google
83
83
  # Create credentials
84
84
  credentials = @config.credentials
85
85
  credentials ||= Credentials.default scope: @config.scope
86
- if credentials.is_a?(String) || credentials.is_a?(Hash)
86
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
87
87
  credentials = Credentials.new credentials, scope: @config.scope
88
88
  end
89
89
  @quota_project_id = @config.quota_project
@@ -170,7 +170,9 @@ module Google
170
170
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
171
171
  metadata: metadata,
172
172
  retry_policy: @config.rpcs.list_operations.retry_policy
173
- options.apply_defaults metadata: @config.metadata,
173
+
174
+ options.apply_defaults timeout: @config.timeout,
175
+ metadata: @config.metadata,
174
176
  retry_policy: @config.retry_policy
175
177
 
176
178
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -240,7 +242,9 @@ module Google
240
242
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
241
243
  metadata: metadata,
242
244
  retry_policy: @config.rpcs.get_operation.retry_policy
243
- options.apply_defaults metadata: @config.metadata,
245
+
246
+ options.apply_defaults timeout: @config.timeout,
247
+ metadata: @config.metadata,
244
248
  retry_policy: @config.retry_policy
245
249
 
246
250
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -310,7 +314,9 @@ module Google
310
314
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
311
315
  metadata: metadata,
312
316
  retry_policy: @config.rpcs.delete_operation.retry_policy
313
- options.apply_defaults metadata: @config.metadata,
317
+
318
+ options.apply_defaults timeout: @config.timeout,
319
+ metadata: @config.metadata,
314
320
  retry_policy: @config.retry_policy
315
321
 
316
322
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -385,7 +391,9 @@ module Google
385
391
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
386
392
  metadata: metadata,
387
393
  retry_policy: @config.rpcs.cancel_operation.retry_policy
388
- options.apply_defaults metadata: @config.metadata,
394
+
395
+ options.apply_defaults timeout: @config.timeout,
396
+ metadata: @config.metadata,
389
397
  retry_policy: @config.retry_policy
390
398
 
391
399
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -397,9 +405,9 @@ module Google
397
405
  end
398
406
 
399
407
  ##
400
- # Waits for the specified long-running operation until it is done or reaches
401
- # at most a specified timeout, returning the latest state. If the operation
402
- # is already done, the latest state is immediately returned. If the timeout
408
+ # Waits until the specified long-running operation is done or reaches at most
409
+ # a specified timeout, returning the latest state. If the operation is
410
+ # already done, the latest state is immediately returned. If the timeout
403
411
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
404
412
  # timeout is used. If the server does not support this method, it returns
405
413
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -457,7 +465,9 @@ module Google
457
465
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
458
466
  metadata: metadata,
459
467
  retry_policy: @config.rpcs.wait_operation.retry_policy
460
- options.apply_defaults metadata: @config.metadata,
468
+
469
+ options.apply_defaults timeout: @config.timeout,
470
+ metadata: @config.metadata,
461
471
  retry_policy: @config.retry_policy
462
472
 
463
473
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -482,22 +492,21 @@ module Google
482
492
  # Configuration can be applied globally to all clients, or to a single client
483
493
  # on construction.
484
494
  #
485
- # # Examples
486
- #
487
- # To modify the global config, setting the timeout for list_operations
488
- # to 20 seconds, and all remaining timeouts to 10 seconds:
489
- #
490
- # ::Google::Longrunning::Operations::Client.configure do |config|
491
- # config.timeout = 10.0
492
- # config.rpcs.list_operations.timeout = 20.0
493
- # end
495
+ # @example
494
496
  #
495
- # To apply the above configuration only to a new client:
497
+ # # Modify the global config, setting the timeout for
498
+ # # list_operations to 20 seconds,
499
+ # # and all remaining timeouts to 10 seconds.
500
+ # ::Google::Longrunning::Operations::Client.configure do |config|
501
+ # config.timeout = 10.0
502
+ # config.rpcs.list_operations.timeout = 20.0
503
+ # end
496
504
  #
497
- # client = ::Google::Longrunning::Operations::Client.new do |config|
498
- # config.timeout = 10.0
499
- # config.rpcs.list_operations.timeout = 20.0
500
- # end
505
+ # # Apply the above configuration only to a new client.
506
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
507
+ # config.timeout = 10.0
508
+ # config.rpcs.list_operations.timeout = 20.0
509
+ # end
501
510
  #
502
511
  # @!attribute [rw] endpoint
503
512
  # The hostname or hostname:port of the service endpoint.
@@ -561,7 +570,7 @@ module Google
561
570
  config_attr :scope, nil, ::String, ::Array, nil
562
571
  config_attr :lib_name, nil, ::String, nil
563
572
  config_attr :lib_version, nil, ::String, nil
564
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
573
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
565
574
  config_attr :interceptors, nil, ::Array, nil
566
575
  config_attr :timeout, nil, ::Numeric, nil
567
576
  config_attr :metadata, nil, ::Hash, nil
@@ -582,7 +591,7 @@ module Google
582
591
  def rpcs
583
592
  @rpcs ||= begin
584
593
  parent_rpcs = nil
585
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
594
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
586
595
  Rpcs.new parent_rpcs
587
596
  end
588
597
  end
@@ -633,15 +642,15 @@ module Google
633
642
 
634
643
  # @private
635
644
  def initialize parent_rpcs = nil
636
- list_operations_config = parent_rpcs&.list_operations if parent_rpcs&.respond_to? :list_operations
645
+ list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations
637
646
  @list_operations = ::Gapic::Config::Method.new list_operations_config
638
- get_operation_config = parent_rpcs&.get_operation if parent_rpcs&.respond_to? :get_operation
647
+ get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation
639
648
  @get_operation = ::Gapic::Config::Method.new get_operation_config
640
- delete_operation_config = parent_rpcs&.delete_operation if parent_rpcs&.respond_to? :delete_operation
649
+ delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation
641
650
  @delete_operation = ::Gapic::Config::Method.new delete_operation_config
642
- cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
651
+ cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation
643
652
  @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
644
- wait_operation_config = parent_rpcs&.wait_operation if parent_rpcs&.respond_to? :wait_operation
653
+ wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation
645
654
  @wait_operation = ::Gapic::Config::Method.new wait_operation_config
646
655
 
647
656
  yield self if block_given?
@@ -22,7 +22,7 @@ module Google
22
22
  module Datastore
23
23
  module Admin
24
24
  module V1
25
- VERSION = "0.3.0"
25
+ VERSION = "0.4.3"
26
26
  end
27
27
  end
28
28
  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
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-admin-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.3
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-02-25 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +50,14 @@ dependencies:
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 1.24.0
53
+ version: 1.25.1
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 1.24.0
60
+ version: 1.25.1
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: minitest
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -174,13 +180,11 @@ files:
174
180
  - lib/google/datastore/admin/v1/datastore_admin_pb.rb
175
181
  - lib/google/datastore/admin/v1/datastore_admin_services_pb.rb
176
182
  - lib/google/datastore/admin/v1/index_pb.rb
177
- - lib/google/datastore/admin/v1/migration_pb.rb
178
183
  - proto_docs/README.md
179
184
  - proto_docs/google/api/field_behavior.rb
180
185
  - proto_docs/google/api/resource.rb
181
186
  - proto_docs/google/datastore/admin/v1/datastore_admin.rb
182
187
  - proto_docs/google/datastore/admin/v1/index.rb
183
- - proto_docs/google/datastore/admin/v1/migration.rb
184
188
  - proto_docs/google/longrunning/operations.rb
185
189
  - proto_docs/google/protobuf/any.rb
186
190
  - proto_docs/google/protobuf/duration.rb
@@ -199,14 +203,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
203
  requirements:
200
204
  - - ">="
201
205
  - !ruby/object:Gem::Version
202
- version: '2.4'
206
+ version: '2.5'
203
207
  required_rubygems_version: !ruby/object:Gem::Requirement
204
208
  requirements:
205
209
  - - ">="
206
210
  - !ruby/object:Gem::Version
207
211
  version: '0'
208
212
  requirements: []
209
- rubygems_version: 3.2.11
213
+ rubygems_version: 3.2.17
210
214
  signing_key:
211
215
  specification_version: 4
212
216
  summary: API Client library for the Firestore in Datastore mode Admin V1 API
@@ -1,44 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/datastore/admin/v1/migration.proto
3
-
4
- require 'google/protobuf'
5
-
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/datastore/admin/v1/migration.proto", :syntax => :proto3) do
8
- add_message "google.datastore.admin.v1.MigrationStateEvent" do
9
- optional :state, :enum, 1, "google.datastore.admin.v1.MigrationState"
10
- end
11
- add_message "google.datastore.admin.v1.MigrationProgressEvent" do
12
- optional :step, :enum, 1, "google.datastore.admin.v1.MigrationStep"
13
- end
14
- add_enum "google.datastore.admin.v1.MigrationState" do
15
- value :MIGRATION_STATE_UNSPECIFIED, 0
16
- value :RUNNING, 1
17
- value :PAUSED, 2
18
- value :COMPLETE, 3
19
- end
20
- add_enum "google.datastore.admin.v1.MigrationStep" do
21
- value :MIGRATION_STEP_UNSPECIFIED, 0
22
- value :START, 1
23
- value :COPY_AND_VERIFY, 2
24
- value :REDIRECT_EVENTUALLY_CONSISTENT_READS, 3
25
- value :REDIRECT_STRONGLY_CONSISTENT_READS, 4
26
- value :REDIRECT_WRITES, 5
27
- end
28
- end
29
- end
30
-
31
- module Google
32
- module Cloud
33
- module Datastore
34
- module Admin
35
- module V1
36
- MigrationStateEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationStateEvent").msgclass
37
- MigrationProgressEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationProgressEvent").msgclass
38
- MigrationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationState").enummodule
39
- MigrationStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationStep").enummodule
40
- end
41
- end
42
- end
43
- end
44
- end
@@ -1,90 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2021 Google LLC
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # https://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
-
19
-
20
- module Google
21
- module Cloud
22
- module Datastore
23
- module Admin
24
- module V1
25
- # An event signifying a change in state of a [migration from Cloud Datastore to
26
- # Cloud Firestore in Datastore
27
- # mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
28
- # @!attribute [rw] state
29
- # @return [::Google::Cloud::Datastore::Admin::V1::MigrationState]
30
- # The new state of the migration.
31
- class MigrationStateEvent
32
- include ::Google::Protobuf::MessageExts
33
- extend ::Google::Protobuf::MessageExts::ClassMethods
34
- end
35
-
36
- # An event signifying the start of a new step in a [migration from Cloud
37
- # Datastore to Cloud Firestore in Datastore
38
- # mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
39
- # @!attribute [rw] step
40
- # @return [::Google::Cloud::Datastore::Admin::V1::MigrationStep]
41
- # The step that is starting.
42
- #
43
- # An event with step set to `START` indicates that the migration
44
- # has been reverted back to the initial pre-migration state.
45
- class MigrationProgressEvent
46
- include ::Google::Protobuf::MessageExts
47
- extend ::Google::Protobuf::MessageExts::ClassMethods
48
- end
49
-
50
- # States for a migration.
51
- module MigrationState
52
- # Unspecified.
53
- MIGRATION_STATE_UNSPECIFIED = 0
54
-
55
- # The migration is running.
56
- RUNNING = 1
57
-
58
- # The migration is paused.
59
- PAUSED = 2
60
-
61
- # The migration is complete.
62
- COMPLETE = 3
63
- end
64
-
65
- # Steps in a migration.
66
- module MigrationStep
67
- # Unspecified.
68
- MIGRATION_STEP_UNSPECIFIED = 0
69
-
70
- # Start of migration.
71
- START = 1
72
-
73
- # Data is copied to Cloud Firestore and then verified to match the data in
74
- # Cloud Datastore.
75
- COPY_AND_VERIFY = 2
76
-
77
- # Eventually-consistent reads are redirected to Cloud Firestore.
78
- REDIRECT_EVENTUALLY_CONSISTENT_READS = 3
79
-
80
- # Strongly-consistent reads are redirected to Cloud Firestore.
81
- REDIRECT_STRONGLY_CONSISTENT_READS = 4
82
-
83
- # Writes are redirected to Cloud Firestore.
84
- REDIRECT_WRITES = 5
85
- end
86
- end
87
- end
88
- end
89
- end
90
- end