google-cloud-datastore-v1 0.3.0 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d918d4cb6ad7190c69cab633db5c1fab74a364377e62bc284bca565f2166e1cd
4
- data.tar.gz: 10327c922c71faa3dda7cada986ddd0ec5f677067d1ac2823e653213c0e83621
3
+ metadata.gz: 28a77756e55c308bd2010284d16fcaf2c134b7e74bac0c33c3fb49600bf39736
4
+ data.tar.gz: e3a9ccd5fc1d9f7ef842f52f97ca698cafa0672580c30a2c806427e9b491ecdc
5
5
  SHA512:
6
- metadata.gz: 8ea3c1cd4378077745c0c54043e6d52b888534cddbee7b81d0098eb93c1d845bfa66856ddd9d123c5c189af69ed751e5bac6823417c10369323a29afe896eb44
7
- data.tar.gz: 886a9867ac653e2d99704e80384ce7b38d800e4eb88e1d2b43e4ce25b84a8171fd17b5080f109bd7d0bd2571d594a5174a0145d214fc35ca07b421e18df9da0b
6
+ metadata.gz: dcf7c0b3284d5b7f3b3801b8257a7f86740d8886e05bf3537a2fc1dc48f21f21a856e5775e941a0f29c7a9c046c33c6082481c45ab98cd62dced754cb3c472e6
7
+ data.tar.gz: 251c3c3bb5de836a5d82eaa3a85a9b0a962bfddce9c805cf97e22b9a5f8b45124e8e7bd3a923f6964d9d6e05963ba8d23faad4f087888b44048ffcd59506564b
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-datastore-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Datastore::V1::Datastore::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/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Datastore::V1::Datastore::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/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Datastore::V1::Datastore::Client.new do |config|
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/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/v1"
34
34
 
35
35
  client = ::Google::Cloud::Datastore::V1::Datastore::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Datastore::V1::LookupRequest.new # (request fields as keyword arguments...)
37
37
  response = client.lookup request
38
38
  ```
39
39
 
@@ -44,13 +44,12 @@ module Google
44
44
  # See {::Google::Cloud::Datastore::V1::Datastore::Client::Configuration}
45
45
  # for a description of the configuration fields.
46
46
  #
47
- # ## Example
47
+ # @example
48
48
  #
49
- # To modify the configuration for all Datastore clients:
50
- #
51
- # ::Google::Cloud::Datastore::V1::Datastore::Client.configure do |config|
52
- # config.timeout = 10.0
53
- # end
49
+ # # Modify the configuration for all Datastore clients
50
+ # ::Google::Cloud::Datastore::V1::Datastore::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
54
53
  #
55
54
  # @yield [config] Configure the Client client.
56
55
  # @yieldparam config [Client::Configuration]
@@ -70,18 +69,12 @@ module Google
70
69
 
71
70
  default_config.rpcs.lookup.timeout = 60.0
72
71
  default_config.rpcs.lookup.retry_policy = {
73
- initial_delay: 0.1,
74
- max_delay: 60.0,
75
- multiplier: 1.3,
76
- retry_codes: [14, 4]
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
77
73
  }
78
74
 
79
75
  default_config.rpcs.run_query.timeout = 60.0
80
76
  default_config.rpcs.run_query.retry_policy = {
81
- initial_delay: 0.1,
82
- max_delay: 60.0,
83
- multiplier: 1.3,
84
- retry_codes: [14, 4]
77
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
85
78
  }
86
79
 
87
80
  default_config.rpcs.begin_transaction.timeout = 60.0
@@ -94,10 +87,7 @@ module Google
94
87
 
95
88
  default_config.rpcs.reserve_ids.timeout = 60.0
96
89
  default_config.rpcs.reserve_ids.retry_policy = {
97
- initial_delay: 0.1,
98
- max_delay: 60.0,
99
- multiplier: 1.3,
100
- retry_codes: [14, 4]
90
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
101
91
  }
102
92
 
103
93
  default_config
@@ -129,19 +119,15 @@ module Google
129
119
  ##
130
120
  # Create a new Datastore client object.
131
121
  #
132
- # ## Examples
133
- #
134
- # To create a new Datastore client with the default
135
- # configuration:
122
+ # @example
136
123
  #
137
- # client = ::Google::Cloud::Datastore::V1::Datastore::Client.new
124
+ # # Create a client using the default configuration
125
+ # client = ::Google::Cloud::Datastore::V1::Datastore::Client.new
138
126
  #
139
- # To create a new Datastore client with a custom
140
- # configuration:
141
- #
142
- # client = ::Google::Cloud::Datastore::V1::Datastore::Client.new do |config|
143
- # config.timeout = 10.0
144
- # end
127
+ # # Create a client using a custom configuration
128
+ # client = ::Google::Cloud::Datastore::V1::Datastore::Client.new do |config|
129
+ # config.timeout = 10.0
130
+ # end
145
131
  #
146
132
  # @yield [config] Configure the Datastore client.
147
133
  # @yieldparam config [Client::Configuration]
@@ -161,14 +147,13 @@ module Google
161
147
 
162
148
  # Create credentials
163
149
  credentials = @config.credentials
164
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
150
+ # Use self-signed JWT if the endpoint is unchanged from default,
165
151
  # but only if the default endpoint does not have a region prefix.
166
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
167
- @config.endpoint == Client.configure.endpoint &&
152
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
168
153
  !@config.endpoint.split(".").first.include?("-")
169
154
  credentials ||= Credentials.default scope: @config.scope,
170
155
  enable_self_signed_jwt: enable_self_signed_jwt
171
- if credentials.is_a?(String) || credentials.is_a?(Hash)
156
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
172
157
  credentials = Credentials.new credentials, scope: @config.scope
173
158
  end
174
159
  @quota_project_id = @config.quota_project
@@ -218,6 +203,21 @@ module Google
218
203
  #
219
204
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
220
205
  #
206
+ # @example Basic example
207
+ # require "google/cloud/datastore/v1"
208
+ #
209
+ # # Create a client object. The client can be reused for multiple calls.
210
+ # client = Google::Cloud::Datastore::V1::Datastore::Client.new
211
+ #
212
+ # # Create a request. To set request fields, pass in keyword arguments.
213
+ # request = Google::Cloud::Datastore::V1::LookupRequest.new
214
+ #
215
+ # # Call the lookup method.
216
+ # result = client.lookup request
217
+ #
218
+ # # The returned object is of type Google::Cloud::Datastore::V1::LookupResponse.
219
+ # p result
220
+ #
221
221
  def lookup request, options = nil
222
222
  raise ::ArgumentError, "request must be provided" if request.nil?
223
223
 
@@ -235,16 +235,20 @@ module Google
235
235
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
236
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
237
237
 
238
- header_params = {
239
- "project_id" => request.project_id
240
- }
238
+ header_params = {}
239
+ if request.project_id
240
+ header_params["project_id"] = request.project_id
241
+ end
242
+
241
243
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
242
244
  metadata[:"x-goog-request-params"] ||= request_params_header
243
245
 
244
246
  options.apply_defaults timeout: @config.rpcs.lookup.timeout,
245
247
  metadata: metadata,
246
248
  retry_policy: @config.rpcs.lookup.retry_policy
247
- options.apply_defaults metadata: @config.metadata,
249
+
250
+ options.apply_defaults timeout: @config.timeout,
251
+ metadata: @config.metadata,
248
252
  retry_policy: @config.retry_policy
249
253
 
250
254
  @datastore_stub.call_rpc :lookup, request, options: options do |response, operation|
@@ -295,6 +299,21 @@ module Google
295
299
  #
296
300
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
297
301
  #
302
+ # @example Basic example
303
+ # require "google/cloud/datastore/v1"
304
+ #
305
+ # # Create a client object. The client can be reused for multiple calls.
306
+ # client = Google::Cloud::Datastore::V1::Datastore::Client.new
307
+ #
308
+ # # Create a request. To set request fields, pass in keyword arguments.
309
+ # request = Google::Cloud::Datastore::V1::RunQueryRequest.new
310
+ #
311
+ # # Call the run_query method.
312
+ # result = client.run_query request
313
+ #
314
+ # # The returned object is of type Google::Cloud::Datastore::V1::RunQueryResponse.
315
+ # p result
316
+ #
298
317
  def run_query request, options = nil
299
318
  raise ::ArgumentError, "request must be provided" if request.nil?
300
319
 
@@ -312,16 +331,20 @@ module Google
312
331
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
313
332
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
314
333
 
315
- header_params = {
316
- "project_id" => request.project_id
317
- }
334
+ header_params = {}
335
+ if request.project_id
336
+ header_params["project_id"] = request.project_id
337
+ end
338
+
318
339
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
319
340
  metadata[:"x-goog-request-params"] ||= request_params_header
320
341
 
321
342
  options.apply_defaults timeout: @config.rpcs.run_query.timeout,
322
343
  metadata: metadata,
323
344
  retry_policy: @config.rpcs.run_query.retry_policy
324
- options.apply_defaults metadata: @config.metadata,
345
+
346
+ options.apply_defaults timeout: @config.timeout,
347
+ metadata: @config.metadata,
325
348
  retry_policy: @config.retry_policy
326
349
 
327
350
  @datastore_stub.call_rpc :run_query, request, options: options do |response, operation|
@@ -363,6 +386,21 @@ module Google
363
386
  #
364
387
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
365
388
  #
389
+ # @example Basic example
390
+ # require "google/cloud/datastore/v1"
391
+ #
392
+ # # Create a client object. The client can be reused for multiple calls.
393
+ # client = Google::Cloud::Datastore::V1::Datastore::Client.new
394
+ #
395
+ # # Create a request. To set request fields, pass in keyword arguments.
396
+ # request = Google::Cloud::Datastore::V1::BeginTransactionRequest.new
397
+ #
398
+ # # Call the begin_transaction method.
399
+ # result = client.begin_transaction request
400
+ #
401
+ # # The returned object is of type Google::Cloud::Datastore::V1::BeginTransactionResponse.
402
+ # p result
403
+ #
366
404
  def begin_transaction request, options = nil
367
405
  raise ::ArgumentError, "request must be provided" if request.nil?
368
406
 
@@ -380,16 +418,20 @@ module Google
380
418
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
381
419
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
382
420
 
383
- header_params = {
384
- "project_id" => request.project_id
385
- }
421
+ header_params = {}
422
+ if request.project_id
423
+ header_params["project_id"] = request.project_id
424
+ end
425
+
386
426
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
387
427
  metadata[:"x-goog-request-params"] ||= request_params_header
388
428
 
389
429
  options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout,
390
430
  metadata: metadata,
391
431
  retry_policy: @config.rpcs.begin_transaction.retry_policy
392
- options.apply_defaults metadata: @config.metadata,
432
+
433
+ options.apply_defaults timeout: @config.timeout,
434
+ metadata: @config.metadata,
393
435
  retry_policy: @config.retry_policy
394
436
 
395
437
  @datastore_stub.call_rpc :begin_transaction, request, options: options do |response, operation|
@@ -450,6 +492,21 @@ module Google
450
492
  #
451
493
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
452
494
  #
495
+ # @example Basic example
496
+ # require "google/cloud/datastore/v1"
497
+ #
498
+ # # Create a client object. The client can be reused for multiple calls.
499
+ # client = Google::Cloud::Datastore::V1::Datastore::Client.new
500
+ #
501
+ # # Create a request. To set request fields, pass in keyword arguments.
502
+ # request = Google::Cloud::Datastore::V1::CommitRequest.new
503
+ #
504
+ # # Call the commit method.
505
+ # result = client.commit request
506
+ #
507
+ # # The returned object is of type Google::Cloud::Datastore::V1::CommitResponse.
508
+ # p result
509
+ #
453
510
  def commit request, options = nil
454
511
  raise ::ArgumentError, "request must be provided" if request.nil?
455
512
 
@@ -467,16 +524,20 @@ module Google
467
524
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
468
525
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
469
526
 
470
- header_params = {
471
- "project_id" => request.project_id
472
- }
527
+ header_params = {}
528
+ if request.project_id
529
+ header_params["project_id"] = request.project_id
530
+ end
531
+
473
532
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
474
533
  metadata[:"x-goog-request-params"] ||= request_params_header
475
534
 
476
535
  options.apply_defaults timeout: @config.rpcs.commit.timeout,
477
536
  metadata: metadata,
478
537
  retry_policy: @config.rpcs.commit.retry_policy
479
- options.apply_defaults metadata: @config.metadata,
538
+
539
+ options.apply_defaults timeout: @config.timeout,
540
+ metadata: @config.metadata,
480
541
  retry_policy: @config.retry_policy
481
542
 
482
543
  @datastore_stub.call_rpc :commit, request, options: options do |response, operation|
@@ -519,6 +580,21 @@ module Google
519
580
  #
520
581
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
521
582
  #
583
+ # @example Basic example
584
+ # require "google/cloud/datastore/v1"
585
+ #
586
+ # # Create a client object. The client can be reused for multiple calls.
587
+ # client = Google::Cloud::Datastore::V1::Datastore::Client.new
588
+ #
589
+ # # Create a request. To set request fields, pass in keyword arguments.
590
+ # request = Google::Cloud::Datastore::V1::RollbackRequest.new
591
+ #
592
+ # # Call the rollback method.
593
+ # result = client.rollback request
594
+ #
595
+ # # The returned object is of type Google::Cloud::Datastore::V1::RollbackResponse.
596
+ # p result
597
+ #
522
598
  def rollback request, options = nil
523
599
  raise ::ArgumentError, "request must be provided" if request.nil?
524
600
 
@@ -536,16 +612,20 @@ module Google
536
612
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
537
613
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
538
614
 
539
- header_params = {
540
- "project_id" => request.project_id
541
- }
615
+ header_params = {}
616
+ if request.project_id
617
+ header_params["project_id"] = request.project_id
618
+ end
619
+
542
620
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
543
621
  metadata[:"x-goog-request-params"] ||= request_params_header
544
622
 
545
623
  options.apply_defaults timeout: @config.rpcs.rollback.timeout,
546
624
  metadata: metadata,
547
625
  retry_policy: @config.rpcs.rollback.retry_policy
548
- options.apply_defaults metadata: @config.metadata,
626
+
627
+ options.apply_defaults timeout: @config.timeout,
628
+ metadata: @config.metadata,
549
629
  retry_policy: @config.retry_policy
550
630
 
551
631
  @datastore_stub.call_rpc :rollback, request, options: options do |response, operation|
@@ -589,6 +669,21 @@ module Google
589
669
  #
590
670
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
591
671
  #
672
+ # @example Basic example
673
+ # require "google/cloud/datastore/v1"
674
+ #
675
+ # # Create a client object. The client can be reused for multiple calls.
676
+ # client = Google::Cloud::Datastore::V1::Datastore::Client.new
677
+ #
678
+ # # Create a request. To set request fields, pass in keyword arguments.
679
+ # request = Google::Cloud::Datastore::V1::AllocateIdsRequest.new
680
+ #
681
+ # # Call the allocate_ids method.
682
+ # result = client.allocate_ids request
683
+ #
684
+ # # The returned object is of type Google::Cloud::Datastore::V1::AllocateIdsResponse.
685
+ # p result
686
+ #
592
687
  def allocate_ids request, options = nil
593
688
  raise ::ArgumentError, "request must be provided" if request.nil?
594
689
 
@@ -606,16 +701,20 @@ module Google
606
701
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
607
702
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
608
703
 
609
- header_params = {
610
- "project_id" => request.project_id
611
- }
704
+ header_params = {}
705
+ if request.project_id
706
+ header_params["project_id"] = request.project_id
707
+ end
708
+
612
709
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
613
710
  metadata[:"x-goog-request-params"] ||= request_params_header
614
711
 
615
712
  options.apply_defaults timeout: @config.rpcs.allocate_ids.timeout,
616
713
  metadata: metadata,
617
714
  retry_policy: @config.rpcs.allocate_ids.retry_policy
618
- options.apply_defaults metadata: @config.metadata,
715
+
716
+ options.apply_defaults timeout: @config.timeout,
717
+ metadata: @config.metadata,
619
718
  retry_policy: @config.retry_policy
620
719
 
621
720
  @datastore_stub.call_rpc :allocate_ids, request, options: options do |response, operation|
@@ -661,6 +760,21 @@ module Google
661
760
  #
662
761
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
663
762
  #
763
+ # @example Basic example
764
+ # require "google/cloud/datastore/v1"
765
+ #
766
+ # # Create a client object. The client can be reused for multiple calls.
767
+ # client = Google::Cloud::Datastore::V1::Datastore::Client.new
768
+ #
769
+ # # Create a request. To set request fields, pass in keyword arguments.
770
+ # request = Google::Cloud::Datastore::V1::ReserveIdsRequest.new
771
+ #
772
+ # # Call the reserve_ids method.
773
+ # result = client.reserve_ids request
774
+ #
775
+ # # The returned object is of type Google::Cloud::Datastore::V1::ReserveIdsResponse.
776
+ # p result
777
+ #
664
778
  def reserve_ids request, options = nil
665
779
  raise ::ArgumentError, "request must be provided" if request.nil?
666
780
 
@@ -678,16 +792,20 @@ module Google
678
792
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
679
793
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
680
794
 
681
- header_params = {
682
- "project_id" => request.project_id
683
- }
795
+ header_params = {}
796
+ if request.project_id
797
+ header_params["project_id"] = request.project_id
798
+ end
799
+
684
800
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
685
801
  metadata[:"x-goog-request-params"] ||= request_params_header
686
802
 
687
803
  options.apply_defaults timeout: @config.rpcs.reserve_ids.timeout,
688
804
  metadata: metadata,
689
805
  retry_policy: @config.rpcs.reserve_ids.retry_policy
690
- options.apply_defaults metadata: @config.metadata,
806
+
807
+ options.apply_defaults timeout: @config.timeout,
808
+ metadata: @config.metadata,
691
809
  retry_policy: @config.retry_policy
692
810
 
693
811
  @datastore_stub.call_rpc :reserve_ids, request, options: options do |response, operation|
@@ -711,22 +829,21 @@ module Google
711
829
  # Configuration can be applied globally to all clients, or to a single client
712
830
  # on construction.
713
831
  #
714
- # # Examples
715
- #
716
- # To modify the global config, setting the timeout for lookup
717
- # to 20 seconds, and all remaining timeouts to 10 seconds:
718
- #
719
- # ::Google::Cloud::Datastore::V1::Datastore::Client.configure do |config|
720
- # config.timeout = 10.0
721
- # config.rpcs.lookup.timeout = 20.0
722
- # end
723
- #
724
- # To apply the above configuration only to a new client:
725
- #
726
- # client = ::Google::Cloud::Datastore::V1::Datastore::Client.new do |config|
727
- # config.timeout = 10.0
728
- # config.rpcs.lookup.timeout = 20.0
729
- # end
832
+ # @example
833
+ #
834
+ # # Modify the global config, setting the timeout for
835
+ # # lookup to 20 seconds,
836
+ # # and all remaining timeouts to 10 seconds.
837
+ # ::Google::Cloud::Datastore::V1::Datastore::Client.configure do |config|
838
+ # config.timeout = 10.0
839
+ # config.rpcs.lookup.timeout = 20.0
840
+ # end
841
+ #
842
+ # # Apply the above configuration only to a new client.
843
+ # client = ::Google::Cloud::Datastore::V1::Datastore::Client.new do |config|
844
+ # config.timeout = 10.0
845
+ # config.rpcs.lookup.timeout = 20.0
846
+ # end
730
847
  #
731
848
  # @!attribute [rw] endpoint
732
849
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Datastore
23
23
  module V1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.3.4"
25
25
  end
26
26
  end
27
27
  end
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/datastore/v1/datastore.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'
9
7
  require 'google/datastore/v1/entity_pb'
10
8
  require 'google/datastore/v1/query_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/datastore/v1/datastore.proto", :syntax => :proto3) do
13
13
  add_message "google.datastore.v1.LookupRequest" do
@@ -33,7 +33,7 @@ module Google
33
33
  #
34
34
  class Service
35
35
 
36
- include GRPC::GenericService
36
+ include ::GRPC::GenericService
37
37
 
38
38
  self.marshal_class_method = :encode
39
39
  self.unmarshal_class_method = :decode
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/datastore/v1/entity.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/protobuf/struct_pb'
8
6
  require 'google/protobuf/timestamp_pb'
9
7
  require 'google/type/latlng_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/datastore/v1/entity.proto", :syntax => :proto3) do
12
12
  add_message "google.datastore.v1.PartitionId" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/datastore/v1/query.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/datastore/v1/entity_pb'
8
6
  require 'google/protobuf/wrappers_pb'
9
7
  require 'google/type/latlng_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/datastore/v1/query.proto", :syntax => :proto3) do
12
12
  add_message "google.datastore.v1.EntityResult" 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
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.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-03-09 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
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
@@ -202,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
208
  - !ruby/object:Gem::Version
203
209
  version: '0'
204
210
  requirements: []
205
- rubygems_version: 3.2.13
211
+ rubygems_version: 3.2.17
206
212
  signing_key:
207
213
  specification_version: 4
208
214
  summary: API Client library for the Firestore in Datastore mode V1 API