google-cloud-metastore-v1 0.2.0 → 0.2.1

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: 392784d5b3f5dc4fccffe9cbbfd599e6a57afe1ea632be69ce58dcc997299f9b
4
- data.tar.gz: 8d00d1efbc2986bad4ab62e8a9b5700f29312d89fa93c62cdcafd055b20a0dc0
3
+ metadata.gz: 9a8efff30b3fa421629f7849ba8c6adfce6fd6c8f43379c29d841187fdd00f88
4
+ data.tar.gz: 59c15edad5b14031024d381175751dddb93aec7550baed5e9a17c94bc9f5556d
5
5
  SHA512:
6
- metadata.gz: 4b3c274ffdb0c7b14099b7002ddfcfe0f46ad6cafb840a313b55a3700820e4a3f02c71f9ca5ced8fe0c844965d681f7b554a233027d4ef0345b26c251c1af71b
7
- data.tar.gz: 4c469984519c40097dc03505d6e620762833825b933c7d059f08f313070c54d7515e9a00fe28d407fdfe69f47c0b855c389ed54b33215984bcf71fb3e1837eb7
6
+ metadata.gz: 873e920fb603bb1cb0257c54ea88894dc1f85366a428b9742567375fa985ed988fb856b5d4b42a10dfb5882a138363793c970886da90abd9596b36cb9e92667d
7
+ data.tar.gz: 7edc254a268a97a8b8b37c8f1480e93b4f48dd784dd8fdd6cb1fbb1324617ed2163a27839733618826cebca57e5239b325b61799bf8b97c4f484244746b6c96f
@@ -246,6 +246,27 @@ module Google
246
246
  #
247
247
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
248
248
  #
249
+ # @example Basic example
250
+ # require "google/cloud/metastore/v1"
251
+ #
252
+ # # Create a client object. The client can be reused for multiple calls.
253
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
254
+ #
255
+ # # Create a request. To set request fields, pass in keyword arguments.
256
+ # request = Google::Cloud::Metastore::V1::ListServicesRequest.new
257
+ #
258
+ # # Call the list_services method.
259
+ # result = client.list_services request
260
+ #
261
+ # # The returned object is of type Gapic::PagedEnumerable. You can
262
+ # # iterate over all elements by calling #each, and the enumerable
263
+ # # will lazily make API calls to fetch subsequent pages. Other
264
+ # # methods are also available for managing paging directly.
265
+ # result.each do |response|
266
+ # # Each element is of type ::Google::Cloud::Metastore::V1::Service.
267
+ # p response
268
+ # end
269
+ #
249
270
  def list_services request, options = nil
250
271
  raise ::ArgumentError, "request must be provided" if request.nil?
251
272
 
@@ -263,9 +284,11 @@ module Google
263
284
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
264
285
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
265
286
 
266
- header_params = {
267
- "parent" => request.parent
268
- }
287
+ header_params = {}
288
+ if request.parent
289
+ header_params["parent"] = request.parent
290
+ end
291
+
269
292
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
270
293
  metadata[:"x-goog-request-params"] ||= request_params_header
271
294
 
@@ -318,6 +341,21 @@ module Google
318
341
  #
319
342
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
320
343
  #
344
+ # @example Basic example
345
+ # require "google/cloud/metastore/v1"
346
+ #
347
+ # # Create a client object. The client can be reused for multiple calls.
348
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
349
+ #
350
+ # # Create a request. To set request fields, pass in keyword arguments.
351
+ # request = Google::Cloud::Metastore::V1::GetServiceRequest.new
352
+ #
353
+ # # Call the get_service method.
354
+ # result = client.get_service request
355
+ #
356
+ # # The returned object is of type Google::Cloud::Metastore::V1::Service.
357
+ # p result
358
+ #
321
359
  def get_service request, options = nil
322
360
  raise ::ArgumentError, "request must be provided" if request.nil?
323
361
 
@@ -335,9 +373,11 @@ module Google
335
373
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
336
374
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
337
375
 
338
- header_params = {
339
- "name" => request.name
340
- }
376
+ header_params = {}
377
+ if request.name
378
+ header_params["name"] = request.name
379
+ end
380
+
341
381
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
342
382
  metadata[:"x-goog-request-params"] ||= request_params_header
343
383
 
@@ -413,6 +453,28 @@ module Google
413
453
  #
414
454
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
415
455
  #
456
+ # @example Basic example
457
+ # require "google/cloud/metastore/v1"
458
+ #
459
+ # # Create a client object. The client can be reused for multiple calls.
460
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
461
+ #
462
+ # # Create a request. To set request fields, pass in keyword arguments.
463
+ # request = Google::Cloud::Metastore::V1::CreateServiceRequest.new
464
+ #
465
+ # # Call the create_service method.
466
+ # result = client.create_service request
467
+ #
468
+ # # The returned object is of type Gapic::Operation. You can use this
469
+ # # object to check the status of an operation, cancel it, or wait
470
+ # # for results. Here is how to block until completion:
471
+ # result.wait_until_done! timeout: 60
472
+ # if result.response?
473
+ # p result.response
474
+ # else
475
+ # puts "Error!"
476
+ # end
477
+ #
416
478
  def create_service request, options = nil
417
479
  raise ::ArgumentError, "request must be provided" if request.nil?
418
480
 
@@ -430,9 +492,11 @@ module Google
430
492
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
431
493
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
432
494
 
433
- header_params = {
434
- "parent" => request.parent
435
- }
495
+ header_params = {}
496
+ if request.parent
497
+ header_params["parent"] = request.parent
498
+ end
499
+
436
500
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
437
501
  metadata[:"x-goog-request-params"] ||= request_params_header
438
502
 
@@ -504,6 +568,28 @@ module Google
504
568
  #
505
569
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
506
570
  #
571
+ # @example Basic example
572
+ # require "google/cloud/metastore/v1"
573
+ #
574
+ # # Create a client object. The client can be reused for multiple calls.
575
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
576
+ #
577
+ # # Create a request. To set request fields, pass in keyword arguments.
578
+ # request = Google::Cloud::Metastore::V1::UpdateServiceRequest.new
579
+ #
580
+ # # Call the update_service method.
581
+ # result = client.update_service request
582
+ #
583
+ # # The returned object is of type Gapic::Operation. You can use this
584
+ # # object to check the status of an operation, cancel it, or wait
585
+ # # for results. Here is how to block until completion:
586
+ # result.wait_until_done! timeout: 60
587
+ # if result.response?
588
+ # p result.response
589
+ # else
590
+ # puts "Error!"
591
+ # end
592
+ #
507
593
  def update_service request, options = nil
508
594
  raise ::ArgumentError, "request must be provided" if request.nil?
509
595
 
@@ -521,9 +607,11 @@ module Google
521
607
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
522
608
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
523
609
 
524
- header_params = {
525
- "service.name" => request.service.name
526
- }
610
+ header_params = {}
611
+ if request.service&.name
612
+ header_params["service.name"] = request.service.name
613
+ end
614
+
527
615
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
528
616
  metadata[:"x-goog-request-params"] ||= request_params_header
529
617
 
@@ -589,6 +677,28 @@ module Google
589
677
  #
590
678
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
591
679
  #
680
+ # @example Basic example
681
+ # require "google/cloud/metastore/v1"
682
+ #
683
+ # # Create a client object. The client can be reused for multiple calls.
684
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
685
+ #
686
+ # # Create a request. To set request fields, pass in keyword arguments.
687
+ # request = Google::Cloud::Metastore::V1::DeleteServiceRequest.new
688
+ #
689
+ # # Call the delete_service method.
690
+ # result = client.delete_service request
691
+ #
692
+ # # The returned object is of type Gapic::Operation. You can use this
693
+ # # object to check the status of an operation, cancel it, or wait
694
+ # # for results. Here is how to block until completion:
695
+ # result.wait_until_done! timeout: 60
696
+ # if result.response?
697
+ # p result.response
698
+ # else
699
+ # puts "Error!"
700
+ # end
701
+ #
592
702
  def delete_service request, options = nil
593
703
  raise ::ArgumentError, "request must be provided" if request.nil?
594
704
 
@@ -606,9 +716,11 @@ module Google
606
716
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
607
717
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
608
718
 
609
- header_params = {
610
- "name" => request.name
611
- }
719
+ header_params = {}
720
+ if request.name
721
+ header_params["name"] = request.name
722
+ end
723
+
612
724
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
613
725
  metadata[:"x-goog-request-params"] ||= request_params_header
614
726
 
@@ -680,6 +792,27 @@ module Google
680
792
  #
681
793
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
682
794
  #
795
+ # @example Basic example
796
+ # require "google/cloud/metastore/v1"
797
+ #
798
+ # # Create a client object. The client can be reused for multiple calls.
799
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
800
+ #
801
+ # # Create a request. To set request fields, pass in keyword arguments.
802
+ # request = Google::Cloud::Metastore::V1::ListMetadataImportsRequest.new
803
+ #
804
+ # # Call the list_metadata_imports method.
805
+ # result = client.list_metadata_imports request
806
+ #
807
+ # # The returned object is of type Gapic::PagedEnumerable. You can
808
+ # # iterate over all elements by calling #each, and the enumerable
809
+ # # will lazily make API calls to fetch subsequent pages. Other
810
+ # # methods are also available for managing paging directly.
811
+ # result.each do |response|
812
+ # # Each element is of type ::Google::Cloud::Metastore::V1::MetadataImport.
813
+ # p response
814
+ # end
815
+ #
683
816
  def list_metadata_imports request, options = nil
684
817
  raise ::ArgumentError, "request must be provided" if request.nil?
685
818
 
@@ -697,9 +830,11 @@ module Google
697
830
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
698
831
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
699
832
 
700
- header_params = {
701
- "parent" => request.parent
702
- }
833
+ header_params = {}
834
+ if request.parent
835
+ header_params["parent"] = request.parent
836
+ end
837
+
703
838
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
704
839
  metadata[:"x-goog-request-params"] ||= request_params_header
705
840
 
@@ -752,6 +887,21 @@ module Google
752
887
  #
753
888
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
754
889
  #
890
+ # @example Basic example
891
+ # require "google/cloud/metastore/v1"
892
+ #
893
+ # # Create a client object. The client can be reused for multiple calls.
894
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
895
+ #
896
+ # # Create a request. To set request fields, pass in keyword arguments.
897
+ # request = Google::Cloud::Metastore::V1::GetMetadataImportRequest.new
898
+ #
899
+ # # Call the get_metadata_import method.
900
+ # result = client.get_metadata_import request
901
+ #
902
+ # # The returned object is of type Google::Cloud::Metastore::V1::MetadataImport.
903
+ # p result
904
+ #
755
905
  def get_metadata_import request, options = nil
756
906
  raise ::ArgumentError, "request must be provided" if request.nil?
757
907
 
@@ -769,9 +919,11 @@ module Google
769
919
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
770
920
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
771
921
 
772
- header_params = {
773
- "name" => request.name
774
- }
922
+ header_params = {}
923
+ if request.name
924
+ header_params["name"] = request.name
925
+ end
926
+
775
927
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
776
928
  metadata[:"x-goog-request-params"] ||= request_params_header
777
929
 
@@ -847,6 +999,28 @@ module Google
847
999
  #
848
1000
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
849
1001
  #
1002
+ # @example Basic example
1003
+ # require "google/cloud/metastore/v1"
1004
+ #
1005
+ # # Create a client object. The client can be reused for multiple calls.
1006
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1007
+ #
1008
+ # # Create a request. To set request fields, pass in keyword arguments.
1009
+ # request = Google::Cloud::Metastore::V1::CreateMetadataImportRequest.new
1010
+ #
1011
+ # # Call the create_metadata_import method.
1012
+ # result = client.create_metadata_import request
1013
+ #
1014
+ # # The returned object is of type Gapic::Operation. You can use this
1015
+ # # object to check the status of an operation, cancel it, or wait
1016
+ # # for results. Here is how to block until completion:
1017
+ # result.wait_until_done! timeout: 60
1018
+ # if result.response?
1019
+ # p result.response
1020
+ # else
1021
+ # puts "Error!"
1022
+ # end
1023
+ #
850
1024
  def create_metadata_import request, options = nil
851
1025
  raise ::ArgumentError, "request must be provided" if request.nil?
852
1026
 
@@ -864,9 +1038,11 @@ module Google
864
1038
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
865
1039
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
866
1040
 
867
- header_params = {
868
- "parent" => request.parent
869
- }
1041
+ header_params = {}
1042
+ if request.parent
1043
+ header_params["parent"] = request.parent
1044
+ end
1045
+
870
1046
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
871
1047
  metadata[:"x-goog-request-params"] ||= request_params_header
872
1048
 
@@ -939,6 +1115,28 @@ module Google
939
1115
  #
940
1116
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
941
1117
  #
1118
+ # @example Basic example
1119
+ # require "google/cloud/metastore/v1"
1120
+ #
1121
+ # # Create a client object. The client can be reused for multiple calls.
1122
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1123
+ #
1124
+ # # Create a request. To set request fields, pass in keyword arguments.
1125
+ # request = Google::Cloud::Metastore::V1::UpdateMetadataImportRequest.new
1126
+ #
1127
+ # # Call the update_metadata_import method.
1128
+ # result = client.update_metadata_import request
1129
+ #
1130
+ # # The returned object is of type Gapic::Operation. You can use this
1131
+ # # object to check the status of an operation, cancel it, or wait
1132
+ # # for results. Here is how to block until completion:
1133
+ # result.wait_until_done! timeout: 60
1134
+ # if result.response?
1135
+ # p result.response
1136
+ # else
1137
+ # puts "Error!"
1138
+ # end
1139
+ #
942
1140
  def update_metadata_import request, options = nil
943
1141
  raise ::ArgumentError, "request must be provided" if request.nil?
944
1142
 
@@ -956,9 +1154,11 @@ module Google
956
1154
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
957
1155
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
958
1156
 
959
- header_params = {
960
- "metadata_import.name" => request.metadata_import.name
961
- }
1157
+ header_params = {}
1158
+ if request.metadata_import&.name
1159
+ header_params["metadata_import.name"] = request.metadata_import.name
1160
+ end
1161
+
962
1162
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
963
1163
  metadata[:"x-goog-request-params"] ||= request_params_header
964
1164
 
@@ -1030,6 +1230,28 @@ module Google
1030
1230
  #
1031
1231
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1032
1232
  #
1233
+ # @example Basic example
1234
+ # require "google/cloud/metastore/v1"
1235
+ #
1236
+ # # Create a client object. The client can be reused for multiple calls.
1237
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1238
+ #
1239
+ # # Create a request. To set request fields, pass in keyword arguments.
1240
+ # request = Google::Cloud::Metastore::V1::ExportMetadataRequest.new
1241
+ #
1242
+ # # Call the export_metadata method.
1243
+ # result = client.export_metadata request
1244
+ #
1245
+ # # The returned object is of type Gapic::Operation. You can use this
1246
+ # # object to check the status of an operation, cancel it, or wait
1247
+ # # for results. Here is how to block until completion:
1248
+ # result.wait_until_done! timeout: 60
1249
+ # if result.response?
1250
+ # p result.response
1251
+ # else
1252
+ # puts "Error!"
1253
+ # end
1254
+ #
1033
1255
  def export_metadata request, options = nil
1034
1256
  raise ::ArgumentError, "request must be provided" if request.nil?
1035
1257
 
@@ -1047,9 +1269,11 @@ module Google
1047
1269
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
1048
1270
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1049
1271
 
1050
- header_params = {
1051
- "service" => request.service
1052
- }
1272
+ header_params = {}
1273
+ if request.service
1274
+ header_params["service"] = request.service
1275
+ end
1276
+
1053
1277
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1054
1278
  metadata[:"x-goog-request-params"] ||= request_params_header
1055
1279
 
@@ -1122,6 +1346,28 @@ module Google
1122
1346
  #
1123
1347
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1124
1348
  #
1349
+ # @example Basic example
1350
+ # require "google/cloud/metastore/v1"
1351
+ #
1352
+ # # Create a client object. The client can be reused for multiple calls.
1353
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1354
+ #
1355
+ # # Create a request. To set request fields, pass in keyword arguments.
1356
+ # request = Google::Cloud::Metastore::V1::RestoreServiceRequest.new
1357
+ #
1358
+ # # Call the restore_service method.
1359
+ # result = client.restore_service request
1360
+ #
1361
+ # # The returned object is of type Gapic::Operation. You can use this
1362
+ # # object to check the status of an operation, cancel it, or wait
1363
+ # # for results. Here is how to block until completion:
1364
+ # result.wait_until_done! timeout: 60
1365
+ # if result.response?
1366
+ # p result.response
1367
+ # else
1368
+ # puts "Error!"
1369
+ # end
1370
+ #
1125
1371
  def restore_service request, options = nil
1126
1372
  raise ::ArgumentError, "request must be provided" if request.nil?
1127
1373
 
@@ -1139,9 +1385,11 @@ module Google
1139
1385
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
1140
1386
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1141
1387
 
1142
- header_params = {
1143
- "service" => request.service
1144
- }
1388
+ header_params = {}
1389
+ if request.service
1390
+ header_params["service"] = request.service
1391
+ end
1392
+
1145
1393
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1146
1394
  metadata[:"x-goog-request-params"] ||= request_params_header
1147
1395
 
@@ -1213,6 +1461,27 @@ module Google
1213
1461
  #
1214
1462
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1215
1463
  #
1464
+ # @example Basic example
1465
+ # require "google/cloud/metastore/v1"
1466
+ #
1467
+ # # Create a client object. The client can be reused for multiple calls.
1468
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1469
+ #
1470
+ # # Create a request. To set request fields, pass in keyword arguments.
1471
+ # request = Google::Cloud::Metastore::V1::ListBackupsRequest.new
1472
+ #
1473
+ # # Call the list_backups method.
1474
+ # result = client.list_backups request
1475
+ #
1476
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1477
+ # # iterate over all elements by calling #each, and the enumerable
1478
+ # # will lazily make API calls to fetch subsequent pages. Other
1479
+ # # methods are also available for managing paging directly.
1480
+ # result.each do |response|
1481
+ # # Each element is of type ::Google::Cloud::Metastore::V1::Backup.
1482
+ # p response
1483
+ # end
1484
+ #
1216
1485
  def list_backups request, options = nil
1217
1486
  raise ::ArgumentError, "request must be provided" if request.nil?
1218
1487
 
@@ -1230,9 +1499,11 @@ module Google
1230
1499
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
1231
1500
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1232
1501
 
1233
- header_params = {
1234
- "parent" => request.parent
1235
- }
1502
+ header_params = {}
1503
+ if request.parent
1504
+ header_params["parent"] = request.parent
1505
+ end
1506
+
1236
1507
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1237
1508
  metadata[:"x-goog-request-params"] ||= request_params_header
1238
1509
 
@@ -1285,6 +1556,21 @@ module Google
1285
1556
  #
1286
1557
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1287
1558
  #
1559
+ # @example Basic example
1560
+ # require "google/cloud/metastore/v1"
1561
+ #
1562
+ # # Create a client object. The client can be reused for multiple calls.
1563
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1564
+ #
1565
+ # # Create a request. To set request fields, pass in keyword arguments.
1566
+ # request = Google::Cloud::Metastore::V1::GetBackupRequest.new
1567
+ #
1568
+ # # Call the get_backup method.
1569
+ # result = client.get_backup request
1570
+ #
1571
+ # # The returned object is of type Google::Cloud::Metastore::V1::Backup.
1572
+ # p result
1573
+ #
1288
1574
  def get_backup request, options = nil
1289
1575
  raise ::ArgumentError, "request must be provided" if request.nil?
1290
1576
 
@@ -1302,9 +1588,11 @@ module Google
1302
1588
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
1303
1589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1304
1590
 
1305
- header_params = {
1306
- "name" => request.name
1307
- }
1591
+ header_params = {}
1592
+ if request.name
1593
+ header_params["name"] = request.name
1594
+ end
1595
+
1308
1596
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1309
1597
  metadata[:"x-goog-request-params"] ||= request_params_header
1310
1598
 
@@ -1379,6 +1667,28 @@ module Google
1379
1667
  #
1380
1668
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1381
1669
  #
1670
+ # @example Basic example
1671
+ # require "google/cloud/metastore/v1"
1672
+ #
1673
+ # # Create a client object. The client can be reused for multiple calls.
1674
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1675
+ #
1676
+ # # Create a request. To set request fields, pass in keyword arguments.
1677
+ # request = Google::Cloud::Metastore::V1::CreateBackupRequest.new
1678
+ #
1679
+ # # Call the create_backup method.
1680
+ # result = client.create_backup request
1681
+ #
1682
+ # # The returned object is of type Gapic::Operation. You can use this
1683
+ # # object to check the status of an operation, cancel it, or wait
1684
+ # # for results. Here is how to block until completion:
1685
+ # result.wait_until_done! timeout: 60
1686
+ # if result.response?
1687
+ # p result.response
1688
+ # else
1689
+ # puts "Error!"
1690
+ # end
1691
+ #
1382
1692
  def create_backup request, options = nil
1383
1693
  raise ::ArgumentError, "request must be provided" if request.nil?
1384
1694
 
@@ -1396,9 +1706,11 @@ module Google
1396
1706
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
1397
1707
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1398
1708
 
1399
- header_params = {
1400
- "parent" => request.parent
1401
- }
1709
+ header_params = {}
1710
+ if request.parent
1711
+ header_params["parent"] = request.parent
1712
+ end
1713
+
1402
1714
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1403
1715
  metadata[:"x-goog-request-params"] ||= request_params_header
1404
1716
 
@@ -1464,6 +1776,28 @@ module Google
1464
1776
  #
1465
1777
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1466
1778
  #
1779
+ # @example Basic example
1780
+ # require "google/cloud/metastore/v1"
1781
+ #
1782
+ # # Create a client object. The client can be reused for multiple calls.
1783
+ # client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
1784
+ #
1785
+ # # Create a request. To set request fields, pass in keyword arguments.
1786
+ # request = Google::Cloud::Metastore::V1::DeleteBackupRequest.new
1787
+ #
1788
+ # # Call the delete_backup method.
1789
+ # result = client.delete_backup request
1790
+ #
1791
+ # # The returned object is of type Gapic::Operation. You can use this
1792
+ # # object to check the status of an operation, cancel it, or wait
1793
+ # # for results. Here is how to block until completion:
1794
+ # result.wait_until_done! timeout: 60
1795
+ # if result.response?
1796
+ # p result.response
1797
+ # else
1798
+ # puts "Error!"
1799
+ # end
1800
+ #
1467
1801
  def delete_backup request, options = nil
1468
1802
  raise ::ArgumentError, "request must be provided" if request.nil?
1469
1803
 
@@ -1481,9 +1815,11 @@ module Google
1481
1815
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
1482
1816
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1483
1817
 
1484
- header_params = {
1485
- "name" => request.name
1486
- }
1818
+ header_params = {}
1819
+ if request.name
1820
+ header_params["name"] = request.name
1821
+ end
1822
+
1487
1823
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1488
1824
  metadata[:"x-goog-request-params"] ||= request_params_header
1489
1825
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Metastore::V1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/metastore/v1/metastore.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'
@@ -12,6 +10,8 @@ require 'google/protobuf/field_mask_pb'
12
10
  require 'google/protobuf/timestamp_pb'
13
11
  require 'google/protobuf/wrappers_pb'
14
12
  require 'google/type/dayofweek_pb'
13
+ require 'google/protobuf'
14
+
15
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  add_file("google/cloud/metastore/v1/metastore.proto", :syntax => :proto3) do
17
17
  add_message "google.cloud.metastore.v1.Service" do
@@ -43,7 +43,7 @@ module Google
43
43
  # `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
44
44
  class Service
45
45
 
46
- include GRPC::GenericService
46
+ include ::GRPC::GenericService
47
47
 
48
48
  self.marshal_class_method = :encode
49
49
  self.unmarshal_class_method = :decode
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Metastore
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.2.1"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-metastore-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
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-19 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