google-cloud-datastore-admin-v1 0.4.4 → 0.4.5

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: f695d2eeb23ca141ddb83d2c802e20c4b6a56f321ce7b46b01d88da1bed3243b
4
- data.tar.gz: 194693891682fc2857e65fc247b30e4fcfcd3afd1943718c21a73a6ea4f92054
3
+ metadata.gz: 49649dd73e8047afa2fdd6f4324843531b30001495a5918a28a540aa54806bf9
4
+ data.tar.gz: e5d2e462c04795ae11a6274f91efa852de564dafe4abe653bc96e2a20ebb751c
5
5
  SHA512:
6
- metadata.gz: 4e780df3015ec552862a1081759409a6ad6c3424e2dc52507e344b44394b6b3c546d3eadb7bebfe50236c15ecbef54d0f5d18834aac2373898a12dea25ffc3f7
7
- data.tar.gz: eac744f4d794c6778a58b0bf1a14bf92e91e7189c78422a96720c32df5845cae2f3173911b102bf4d3ddcd22331558d5781f5c75006b513a54da379913a69823
6
+ metadata.gz: 0edb37d1f476ee9107bfdb260f0860465fc28ace395057971e7a54ede247442b1fb28a75ebd8a307922fd141990031c05521ef8440ad1229082a819b37d727c5
7
+ data.tar.gz: a615a1d94825f154fa6505ae4fa083ed454ca60f6db9d7f2e988f27f1edda5288f5ecdf2edeefa7e7e18d00b114c4b30436548a7a8d650bf9a478f3e4f72634c
@@ -292,6 +292,28 @@ module Google
292
292
  #
293
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
294
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/datastore/admin/v1"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Datastore::Admin::V1::ExportEntitiesRequest.new
303
+ #
304
+ # # Call the export_entities method.
305
+ # result = client.export_entities request
306
+ #
307
+ # # The returned object is of type Gapic::Operation. You can use this
308
+ # # object to check the status of an operation, cancel it, or wait
309
+ # # for results. Here is how to block until completion:
310
+ # result.wait_until_done! timeout: 60
311
+ # if result.response?
312
+ # p result.response
313
+ # else
314
+ # puts "Error!"
315
+ # end
316
+ #
295
317
  def export_entities request, options = nil
296
318
  raise ::ArgumentError, "request must be provided" if request.nil?
297
319
 
@@ -309,9 +331,11 @@ module Google
309
331
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
310
332
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
311
333
 
312
- header_params = {
313
- "project_id" => request.project_id
314
- }
334
+ header_params = {}
335
+ if request.project_id
336
+ header_params["project_id"] = request.project_id
337
+ end
338
+
315
339
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
316
340
  metadata[:"x-goog-request-params"] ||= request_params_header
317
341
 
@@ -386,6 +410,28 @@ module Google
386
410
  #
387
411
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
388
412
  #
413
+ # @example Basic example
414
+ # require "google/cloud/datastore/admin/v1"
415
+ #
416
+ # # Create a client object. The client can be reused for multiple calls.
417
+ # client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
418
+ #
419
+ # # Create a request. To set request fields, pass in keyword arguments.
420
+ # request = Google::Cloud::Datastore::Admin::V1::ImportEntitiesRequest.new
421
+ #
422
+ # # Call the import_entities method.
423
+ # result = client.import_entities request
424
+ #
425
+ # # The returned object is of type Gapic::Operation. You can use this
426
+ # # object to check the status of an operation, cancel it, or wait
427
+ # # for results. Here is how to block until completion:
428
+ # result.wait_until_done! timeout: 60
429
+ # if result.response?
430
+ # p result.response
431
+ # else
432
+ # puts "Error!"
433
+ # end
434
+ #
389
435
  def import_entities request, options = nil
390
436
  raise ::ArgumentError, "request must be provided" if request.nil?
391
437
 
@@ -403,9 +449,11 @@ module Google
403
449
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
404
450
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
405
451
 
406
- header_params = {
407
- "project_id" => request.project_id
408
- }
452
+ header_params = {}
453
+ if request.project_id
454
+ header_params["project_id"] = request.project_id
455
+ end
456
+
409
457
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
410
458
  metadata[:"x-goog-request-params"] ||= request_params_header
411
459
 
@@ -471,6 +519,28 @@ module Google
471
519
  #
472
520
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
473
521
  #
522
+ # @example Basic example
523
+ # require "google/cloud/datastore/admin/v1"
524
+ #
525
+ # # Create a client object. The client can be reused for multiple calls.
526
+ # client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
527
+ #
528
+ # # Create a request. To set request fields, pass in keyword arguments.
529
+ # request = Google::Cloud::Datastore::Admin::V1::CreateIndexRequest.new
530
+ #
531
+ # # Call the create_index method.
532
+ # result = client.create_index request
533
+ #
534
+ # # The returned object is of type Gapic::Operation. You can use this
535
+ # # object to check the status of an operation, cancel it, or wait
536
+ # # for results. Here is how to block until completion:
537
+ # result.wait_until_done! timeout: 60
538
+ # if result.response?
539
+ # p result.response
540
+ # else
541
+ # puts "Error!"
542
+ # end
543
+ #
474
544
  def create_index request, options = nil
475
545
  raise ::ArgumentError, "request must be provided" if request.nil?
476
546
 
@@ -488,9 +558,11 @@ module Google
488
558
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
489
559
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
490
560
 
491
- header_params = {
492
- "project_id" => request.project_id
493
- }
561
+ header_params = {}
562
+ if request.project_id
563
+ header_params["project_id"] = request.project_id
564
+ end
565
+
494
566
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
495
567
  metadata[:"x-goog-request-params"] ||= request_params_header
496
568
 
@@ -551,6 +623,28 @@ module Google
551
623
  #
552
624
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
553
625
  #
626
+ # @example Basic example
627
+ # require "google/cloud/datastore/admin/v1"
628
+ #
629
+ # # Create a client object. The client can be reused for multiple calls.
630
+ # client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
631
+ #
632
+ # # Create a request. To set request fields, pass in keyword arguments.
633
+ # request = Google::Cloud::Datastore::Admin::V1::DeleteIndexRequest.new
634
+ #
635
+ # # Call the delete_index method.
636
+ # result = client.delete_index request
637
+ #
638
+ # # The returned object is of type Gapic::Operation. You can use this
639
+ # # object to check the status of an operation, cancel it, or wait
640
+ # # for results. Here is how to block until completion:
641
+ # result.wait_until_done! timeout: 60
642
+ # if result.response?
643
+ # p result.response
644
+ # else
645
+ # puts "Error!"
646
+ # end
647
+ #
554
648
  def delete_index request, options = nil
555
649
  raise ::ArgumentError, "request must be provided" if request.nil?
556
650
 
@@ -568,10 +662,14 @@ module Google
568
662
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
569
663
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
570
664
 
571
- header_params = {
572
- "project_id" => request.project_id,
573
- "index_id" => request.index_id
574
- }
665
+ header_params = {}
666
+ if request.project_id
667
+ header_params["project_id"] = request.project_id
668
+ end
669
+ if request.index_id
670
+ header_params["index_id"] = request.index_id
671
+ end
672
+
575
673
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
576
674
  metadata[:"x-goog-request-params"] ||= request_params_header
577
675
 
@@ -623,6 +721,21 @@ module Google
623
721
  #
624
722
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
625
723
  #
724
+ # @example Basic example
725
+ # require "google/cloud/datastore/admin/v1"
726
+ #
727
+ # # Create a client object. The client can be reused for multiple calls.
728
+ # client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
729
+ #
730
+ # # Create a request. To set request fields, pass in keyword arguments.
731
+ # request = Google::Cloud::Datastore::Admin::V1::GetIndexRequest.new
732
+ #
733
+ # # Call the get_index method.
734
+ # result = client.get_index request
735
+ #
736
+ # # The returned object is of type Google::Cloud::Datastore::Admin::V1::Index.
737
+ # p result
738
+ #
626
739
  def get_index request, options = nil
627
740
  raise ::ArgumentError, "request must be provided" if request.nil?
628
741
 
@@ -640,10 +753,14 @@ module Google
640
753
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
641
754
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
642
755
 
643
- header_params = {
644
- "project_id" => request.project_id,
645
- "index_id" => request.index_id
646
- }
756
+ header_params = {}
757
+ if request.project_id
758
+ header_params["project_id"] = request.project_id
759
+ end
760
+ if request.index_id
761
+ header_params["index_id"] = request.index_id
762
+ end
763
+
647
764
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
648
765
  metadata[:"x-goog-request-params"] ||= request_params_header
649
766
 
@@ -700,6 +817,27 @@ module Google
700
817
  #
701
818
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
702
819
  #
820
+ # @example Basic example
821
+ # require "google/cloud/datastore/admin/v1"
822
+ #
823
+ # # Create a client object. The client can be reused for multiple calls.
824
+ # client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
825
+ #
826
+ # # Create a request. To set request fields, pass in keyword arguments.
827
+ # request = Google::Cloud::Datastore::Admin::V1::ListIndexesRequest.new
828
+ #
829
+ # # Call the list_indexes method.
830
+ # result = client.list_indexes request
831
+ #
832
+ # # The returned object is of type Gapic::PagedEnumerable. You can
833
+ # # iterate over all elements by calling #each, and the enumerable
834
+ # # will lazily make API calls to fetch subsequent pages. Other
835
+ # # methods are also available for managing paging directly.
836
+ # result.each do |response|
837
+ # # Each element is of type ::Google::Cloud::Datastore::Admin::V1::Index.
838
+ # p response
839
+ # end
840
+ #
703
841
  def list_indexes request, options = nil
704
842
  raise ::ArgumentError, "request must be provided" if request.nil?
705
843
 
@@ -717,9 +855,11 @@ module Google
717
855
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
718
856
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
719
857
 
720
- header_params = {
721
- "project_id" => request.project_id
722
- }
858
+ header_params = {}
859
+ if request.project_id
860
+ header_params["project_id"] = request.project_id
861
+ end
862
+
723
863
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
724
864
  metadata[:"x-goog-request-params"] ||= request_params_header
725
865
 
@@ -144,6 +144,27 @@ module Google
144
144
  #
145
145
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
146
146
  #
147
+ # @example Basic example
148
+ # require "google/longrunning"
149
+ #
150
+ # # Create a client object. The client can be reused for multiple calls.
151
+ # client = Google::Longrunning::Operations::Client.new
152
+ #
153
+ # # Create a request. To set request fields, pass in keyword arguments.
154
+ # request = Google::Longrunning::ListOperationsRequest.new
155
+ #
156
+ # # Call the list_operations method.
157
+ # result = client.list_operations request
158
+ #
159
+ # # The returned object is of type Gapic::PagedEnumerable. You can
160
+ # # iterate over all elements by calling #each, and the enumerable
161
+ # # will lazily make API calls to fetch subsequent pages. Other
162
+ # # methods are also available for managing paging directly.
163
+ # result.each do |response|
164
+ # # Each element is of type ::Google::Longrunning::Operation.
165
+ # p response
166
+ # end
167
+ #
147
168
  def list_operations request, options = nil
148
169
  raise ::ArgumentError, "request must be provided" if request.nil?
149
170
 
@@ -161,9 +182,11 @@ module Google
161
182
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
162
183
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
163
184
 
164
- header_params = {
165
- "name" => request.name
166
- }
185
+ header_params = {}
186
+ if request.name
187
+ header_params["name"] = request.name
188
+ end
189
+
167
190
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
168
191
  metadata[:"x-goog-request-params"] ||= request_params_header
169
192
 
@@ -216,6 +239,28 @@ module Google
216
239
  #
217
240
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
241
  #
242
+ # @example Basic example
243
+ # require "google/longrunning"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Longrunning::Operations::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Longrunning::GetOperationRequest.new
250
+ #
251
+ # # Call the get_operation method.
252
+ # result = client.get_operation request
253
+ #
254
+ # # The returned object is of type Gapic::Operation. You can use this
255
+ # # object to check the status of an operation, cancel it, or wait
256
+ # # for results. Here is how to block until completion:
257
+ # result.wait_until_done! timeout: 60
258
+ # if result.response?
259
+ # p result.response
260
+ # else
261
+ # puts "Error!"
262
+ # end
263
+ #
219
264
  def get_operation request, options = nil
220
265
  raise ::ArgumentError, "request must be provided" if request.nil?
221
266
 
@@ -233,9 +278,11 @@ module Google
233
278
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
234
279
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
280
 
236
- header_params = {
237
- "name" => request.name
238
- }
281
+ header_params = {}
282
+ if request.name
283
+ header_params["name"] = request.name
284
+ end
285
+
239
286
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
240
287
  metadata[:"x-goog-request-params"] ||= request_params_header
241
288
 
@@ -288,6 +335,21 @@ module Google
288
335
  #
289
336
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
337
  #
338
+ # @example Basic example
339
+ # require "google/longrunning"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Longrunning::Operations::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Longrunning::DeleteOperationRequest.new
346
+ #
347
+ # # Call the delete_operation method.
348
+ # result = client.delete_operation request
349
+ #
350
+ # # The returned object is of type Google::Protobuf::Empty.
351
+ # p result
352
+ #
291
353
  def delete_operation request, options = nil
292
354
  raise ::ArgumentError, "request must be provided" if request.nil?
293
355
 
@@ -305,9 +367,11 @@ module Google
305
367
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
306
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
369
 
308
- header_params = {
309
- "name" => request.name
310
- }
370
+ header_params = {}
371
+ if request.name
372
+ header_params["name"] = request.name
373
+ end
374
+
311
375
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
376
  metadata[:"x-goog-request-params"] ||= request_params_header
313
377
 
@@ -365,6 +429,21 @@ module Google
365
429
  #
366
430
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
367
431
  #
432
+ # @example Basic example
433
+ # require "google/longrunning"
434
+ #
435
+ # # Create a client object. The client can be reused for multiple calls.
436
+ # client = Google::Longrunning::Operations::Client.new
437
+ #
438
+ # # Create a request. To set request fields, pass in keyword arguments.
439
+ # request = Google::Longrunning::CancelOperationRequest.new
440
+ #
441
+ # # Call the cancel_operation method.
442
+ # result = client.cancel_operation request
443
+ #
444
+ # # The returned object is of type Google::Protobuf::Empty.
445
+ # p result
446
+ #
368
447
  def cancel_operation request, options = nil
369
448
  raise ::ArgumentError, "request must be provided" if request.nil?
370
449
 
@@ -382,9 +461,11 @@ module Google
382
461
  gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
383
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
463
 
385
- header_params = {
386
- "name" => request.name
387
- }
464
+ header_params = {}
465
+ if request.name
466
+ header_params["name"] = request.name
467
+ end
468
+
388
469
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
389
470
  metadata[:"x-goog-request-params"] ||= request_params_header
390
471
 
@@ -445,6 +526,28 @@ module Google
445
526
  #
446
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
447
528
  #
529
+ # @example Basic example
530
+ # require "google/longrunning"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Longrunning::Operations::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Longrunning::WaitOperationRequest.new
537
+ #
538
+ # # Call the wait_operation method.
539
+ # result = client.wait_operation request
540
+ #
541
+ # # The returned object is of type Gapic::Operation. You can use this
542
+ # # object to check the status of an operation, cancel it, or wait
543
+ # # for results. Here is how to block until completion:
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "Error!"
549
+ # end
550
+ #
448
551
  def wait_operation request, options = nil
449
552
  raise ::ArgumentError, "request must be provided" if request.nil?
450
553
 
@@ -22,7 +22,7 @@ module Google
22
22
  module Datastore
23
23
  module Admin
24
24
  module V1
25
- VERSION = "0.4.4"
25
+ VERSION = "0.4.5"
26
26
  end
27
27
  end
28
28
  end
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/datastore/admin/v1/datastore_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'
9
7
  require 'google/datastore/admin/v1/index_pb'
10
8
  require 'google/longrunning/operations_pb'
11
9
  require 'google/protobuf/timestamp_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/datastore/admin/v1/datastore_admin.proto", :syntax => :proto3) do
14
14
  add_message "google.datastore.admin.v1.CommonMetadata" do
@@ -88,7 +88,7 @@ module Google
88
88
  # but are accessed via service google.longrunning.Operations.
89
89
  class Service
90
90
 
91
- include GRPC::GenericService
91
+ include ::GRPC::GenericService
92
92
 
93
93
  self.marshal_class_method = :encode
94
94
  self.unmarshal_class_method = :decode
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/datastore/admin/v1/index.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/datastore/admin/v1/index.proto", :syntax => :proto3) do
10
10
  add_message "google.datastore.admin.v1.Index" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-admin-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
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-30 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