google-cloud-datastore-v1 0.3.3 → 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: 8f4b1ec7e2540148ff498680ccf47d354e74f5b0fbff2d4cbfbbeba4f61d021e
4
- data.tar.gz: 95366804163d82c3ce2371380b8b2611fdf25613ce60e9909c0cdc57a4ea74ca
3
+ metadata.gz: 28a77756e55c308bd2010284d16fcaf2c134b7e74bac0c33c3fb49600bf39736
4
+ data.tar.gz: e3a9ccd5fc1d9f7ef842f52f97ca698cafa0672580c30a2c806427e9b491ecdc
5
5
  SHA512:
6
- metadata.gz: 685b32bb81fcf9c0cbf1f0bfbda8371ea82642091dc04f2088fcadc8d0920e142113ff4be45644a72e66d232607ddcce56f39308f8ff889d15abccf50b64b663
7
- data.tar.gz: ac64e6e6b34535d31c17576f2b404af520486196049f3c0c52bfd735bba939aa89efcd12ea038af6fb5295d6329e6b4f9340c5f256480d199753a7fc7de116b7
6
+ metadata.gz: dcf7c0b3284d5b7f3b3801b8257a7f86740d8886e05bf3537a2fc1dc48f21f21a856e5775e941a0f29c7a9c046c33c6082481c45ab98cd62dced754cb3c472e6
7
+ data.tar.gz: 251c3c3bb5de836a5d82eaa3a85a9b0a962bfddce9c805cf97e22b9a5f8b45124e8e7bd3a923f6964d9d6e05963ba8d23faad4f087888b44048ffcd59506564b
@@ -203,6 +203,21 @@ module Google
203
203
  #
204
204
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
205
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
+ #
206
221
  def lookup request, options = nil
207
222
  raise ::ArgumentError, "request must be provided" if request.nil?
208
223
 
@@ -220,9 +235,11 @@ module Google
220
235
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
221
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
222
237
 
223
- header_params = {
224
- "project_id" => request.project_id
225
- }
238
+ header_params = {}
239
+ if request.project_id
240
+ header_params["project_id"] = request.project_id
241
+ end
242
+
226
243
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
227
244
  metadata[:"x-goog-request-params"] ||= request_params_header
228
245
 
@@ -282,6 +299,21 @@ module Google
282
299
  #
283
300
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
284
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
+ #
285
317
  def run_query request, options = nil
286
318
  raise ::ArgumentError, "request must be provided" if request.nil?
287
319
 
@@ -299,9 +331,11 @@ module Google
299
331
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
300
332
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
301
333
 
302
- header_params = {
303
- "project_id" => request.project_id
304
- }
334
+ header_params = {}
335
+ if request.project_id
336
+ header_params["project_id"] = request.project_id
337
+ end
338
+
305
339
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
306
340
  metadata[:"x-goog-request-params"] ||= request_params_header
307
341
 
@@ -352,6 +386,21 @@ module Google
352
386
  #
353
387
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
354
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
+ #
355
404
  def begin_transaction request, options = nil
356
405
  raise ::ArgumentError, "request must be provided" if request.nil?
357
406
 
@@ -369,9 +418,11 @@ module Google
369
418
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
370
419
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
371
420
 
372
- header_params = {
373
- "project_id" => request.project_id
374
- }
421
+ header_params = {}
422
+ if request.project_id
423
+ header_params["project_id"] = request.project_id
424
+ end
425
+
375
426
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
376
427
  metadata[:"x-goog-request-params"] ||= request_params_header
377
428
 
@@ -441,6 +492,21 @@ module Google
441
492
  #
442
493
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
443
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
+ #
444
510
  def commit request, options = nil
445
511
  raise ::ArgumentError, "request must be provided" if request.nil?
446
512
 
@@ -458,9 +524,11 @@ module Google
458
524
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
459
525
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
460
526
 
461
- header_params = {
462
- "project_id" => request.project_id
463
- }
527
+ header_params = {}
528
+ if request.project_id
529
+ header_params["project_id"] = request.project_id
530
+ end
531
+
464
532
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
465
533
  metadata[:"x-goog-request-params"] ||= request_params_header
466
534
 
@@ -512,6 +580,21 @@ module Google
512
580
  #
513
581
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
514
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
+ #
515
598
  def rollback request, options = nil
516
599
  raise ::ArgumentError, "request must be provided" if request.nil?
517
600
 
@@ -529,9 +612,11 @@ module Google
529
612
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
530
613
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
531
614
 
532
- header_params = {
533
- "project_id" => request.project_id
534
- }
615
+ header_params = {}
616
+ if request.project_id
617
+ header_params["project_id"] = request.project_id
618
+ end
619
+
535
620
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
536
621
  metadata[:"x-goog-request-params"] ||= request_params_header
537
622
 
@@ -584,6 +669,21 @@ module Google
584
669
  #
585
670
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
586
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
+ #
587
687
  def allocate_ids request, options = nil
588
688
  raise ::ArgumentError, "request must be provided" if request.nil?
589
689
 
@@ -601,9 +701,11 @@ module Google
601
701
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
602
702
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
603
703
 
604
- header_params = {
605
- "project_id" => request.project_id
606
- }
704
+ header_params = {}
705
+ if request.project_id
706
+ header_params["project_id"] = request.project_id
707
+ end
708
+
607
709
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
608
710
  metadata[:"x-goog-request-params"] ||= request_params_header
609
711
 
@@ -658,6 +760,21 @@ module Google
658
760
  #
659
761
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
660
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
+ #
661
778
  def reserve_ids request, options = nil
662
779
  raise ::ArgumentError, "request must be provided" if request.nil?
663
780
 
@@ -675,9 +792,11 @@ module Google
675
792
  gapic_version: ::Google::Cloud::Datastore::V1::VERSION
676
793
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
677
794
 
678
- header_params = {
679
- "project_id" => request.project_id
680
- }
795
+ header_params = {}
796
+ if request.project_id
797
+ header_params["project_id"] = request.project_id
798
+ end
799
+
681
800
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
682
801
  metadata[:"x-goog-request-params"] ||= request_params_header
683
802
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Datastore
23
23
  module V1
24
- VERSION = "0.3.3"
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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
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-08-11 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