google-cloud-metastore-v1beta 0.1.0 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/client.rb +457 -101
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/operations.rb +149 -37
- data/lib/google/cloud/metastore/v1beta/metastore_pb.rb +2 -2
- data/lib/google/cloud/metastore/v1beta/metastore_services_pb.rb +1 -1
- data/lib/google/cloud/metastore/v1beta/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/type/dayofweek.rb +9 -9
- metadata +13 -7
@@ -57,13 +57,12 @@ module Google
|
|
57
57
|
# See {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client::Configuration}
|
58
58
|
# for a description of the configuration fields.
|
59
59
|
#
|
60
|
-
#
|
60
|
+
# @example
|
61
61
|
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
# end
|
62
|
+
# # Modify the configuration for all DataprocMetastore clients
|
63
|
+
# ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.configure do |config|
|
64
|
+
# config.timeout = 10.0
|
65
|
+
# end
|
67
66
|
#
|
68
67
|
# @yield [config] Configure the Client client.
|
69
68
|
# @yieldparam config [Client::Configuration]
|
@@ -83,10 +82,7 @@ module Google
|
|
83
82
|
|
84
83
|
default_config.timeout = 60.0
|
85
84
|
default_config.retry_policy = {
|
86
|
-
initial_delay: 1.0,
|
87
|
-
max_delay: 10.0,
|
88
|
-
multiplier: 1.3,
|
89
|
-
retry_codes: [14]
|
85
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
90
86
|
}
|
91
87
|
|
92
88
|
default_config.rpcs.create_service.timeout = 60.0
|
@@ -136,19 +132,15 @@ module Google
|
|
136
132
|
##
|
137
133
|
# Create a new DataprocMetastore client object.
|
138
134
|
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
# To create a new DataprocMetastore client with the default
|
142
|
-
# configuration:
|
135
|
+
# @example
|
143
136
|
#
|
144
|
-
#
|
137
|
+
# # Create a client using the default configuration
|
138
|
+
# client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
145
139
|
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
# config.timeout = 10.0
|
151
|
-
# end
|
140
|
+
# # Create a client using a custom configuration
|
141
|
+
# client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new do |config|
|
142
|
+
# config.timeout = 10.0
|
143
|
+
# end
|
152
144
|
#
|
153
145
|
# @yield [config] Configure the DataprocMetastore client.
|
154
146
|
# @yieldparam config [Client::Configuration]
|
@@ -168,14 +160,13 @@ module Google
|
|
168
160
|
|
169
161
|
# Create credentials
|
170
162
|
credentials = @config.credentials
|
171
|
-
# Use self-signed JWT if the
|
163
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
172
164
|
# but only if the default endpoint does not have a region prefix.
|
173
|
-
enable_self_signed_jwt = @config.
|
174
|
-
@config.endpoint == Client.configure.endpoint &&
|
165
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
175
166
|
!@config.endpoint.split(".").first.include?("-")
|
176
167
|
credentials ||= Credentials.default scope: @config.scope,
|
177
168
|
enable_self_signed_jwt: enable_self_signed_jwt
|
178
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
169
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
179
170
|
credentials = Credentials.new credentials, scope: @config.scope
|
180
171
|
end
|
181
172
|
@quota_project_id = @config.quota_project
|
@@ -257,6 +248,27 @@ module Google
|
|
257
248
|
#
|
258
249
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
259
250
|
#
|
251
|
+
# @example Basic example
|
252
|
+
# require "google/cloud/metastore/v1beta"
|
253
|
+
#
|
254
|
+
# # Create a client object. The client can be reused for multiple calls.
|
255
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
256
|
+
#
|
257
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
258
|
+
# request = Google::Cloud::Metastore::V1beta::ListServicesRequest.new
|
259
|
+
#
|
260
|
+
# # Call the list_services method.
|
261
|
+
# result = client.list_services request
|
262
|
+
#
|
263
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
264
|
+
# # iterate over all elements by calling #each, and the enumerable
|
265
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
266
|
+
# # methods are also available for managing paging directly.
|
267
|
+
# result.each do |response|
|
268
|
+
# # Each element is of type ::Google::Cloud::Metastore::V1beta::Service.
|
269
|
+
# p response
|
270
|
+
# end
|
271
|
+
#
|
260
272
|
def list_services request, options = nil
|
261
273
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
262
274
|
|
@@ -274,16 +286,20 @@ module Google
|
|
274
286
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
275
287
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
276
288
|
|
277
|
-
header_params = {
|
278
|
-
|
279
|
-
|
289
|
+
header_params = {}
|
290
|
+
if request.parent
|
291
|
+
header_params["parent"] = request.parent
|
292
|
+
end
|
293
|
+
|
280
294
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
281
295
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
282
296
|
|
283
297
|
options.apply_defaults timeout: @config.rpcs.list_services.timeout,
|
284
298
|
metadata: metadata,
|
285
299
|
retry_policy: @config.rpcs.list_services.retry_policy
|
286
|
-
|
300
|
+
|
301
|
+
options.apply_defaults timeout: @config.timeout,
|
302
|
+
metadata: @config.metadata,
|
287
303
|
retry_policy: @config.retry_policy
|
288
304
|
|
289
305
|
@dataproc_metastore_stub.call_rpc :list_services, request, options: options do |response, operation|
|
@@ -327,6 +343,21 @@ module Google
|
|
327
343
|
#
|
328
344
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
329
345
|
#
|
346
|
+
# @example Basic example
|
347
|
+
# require "google/cloud/metastore/v1beta"
|
348
|
+
#
|
349
|
+
# # Create a client object. The client can be reused for multiple calls.
|
350
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
351
|
+
#
|
352
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
353
|
+
# request = Google::Cloud::Metastore::V1beta::GetServiceRequest.new
|
354
|
+
#
|
355
|
+
# # Call the get_service method.
|
356
|
+
# result = client.get_service request
|
357
|
+
#
|
358
|
+
# # The returned object is of type Google::Cloud::Metastore::V1beta::Service.
|
359
|
+
# p result
|
360
|
+
#
|
330
361
|
def get_service request, options = nil
|
331
362
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
332
363
|
|
@@ -344,16 +375,20 @@ module Google
|
|
344
375
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
345
376
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
346
377
|
|
347
|
-
header_params = {
|
348
|
-
|
349
|
-
|
378
|
+
header_params = {}
|
379
|
+
if request.name
|
380
|
+
header_params["name"] = request.name
|
381
|
+
end
|
382
|
+
|
350
383
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
351
384
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
352
385
|
|
353
386
|
options.apply_defaults timeout: @config.rpcs.get_service.timeout,
|
354
387
|
metadata: metadata,
|
355
388
|
retry_policy: @config.rpcs.get_service.retry_policy
|
356
|
-
|
389
|
+
|
390
|
+
options.apply_defaults timeout: @config.timeout,
|
391
|
+
metadata: @config.metadata,
|
357
392
|
retry_policy: @config.retry_policy
|
358
393
|
|
359
394
|
@dataproc_metastore_stub.call_rpc :get_service, request, options: options do |response, operation|
|
@@ -420,6 +455,28 @@ module Google
|
|
420
455
|
#
|
421
456
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
422
457
|
#
|
458
|
+
# @example Basic example
|
459
|
+
# require "google/cloud/metastore/v1beta"
|
460
|
+
#
|
461
|
+
# # Create a client object. The client can be reused for multiple calls.
|
462
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
463
|
+
#
|
464
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
465
|
+
# request = Google::Cloud::Metastore::V1beta::CreateServiceRequest.new
|
466
|
+
#
|
467
|
+
# # Call the create_service method.
|
468
|
+
# result = client.create_service request
|
469
|
+
#
|
470
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
471
|
+
# # object to check the status of an operation, cancel it, or wait
|
472
|
+
# # for results. Here is how to block until completion:
|
473
|
+
# result.wait_until_done! timeout: 60
|
474
|
+
# if result.response?
|
475
|
+
# p result.response
|
476
|
+
# else
|
477
|
+
# puts "Error!"
|
478
|
+
# end
|
479
|
+
#
|
423
480
|
def create_service request, options = nil
|
424
481
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
425
482
|
|
@@ -437,16 +494,20 @@ module Google
|
|
437
494
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
438
495
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
439
496
|
|
440
|
-
header_params = {
|
441
|
-
|
442
|
-
|
497
|
+
header_params = {}
|
498
|
+
if request.parent
|
499
|
+
header_params["parent"] = request.parent
|
500
|
+
end
|
501
|
+
|
443
502
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
444
503
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
445
504
|
|
446
505
|
options.apply_defaults timeout: @config.rpcs.create_service.timeout,
|
447
506
|
metadata: metadata,
|
448
507
|
retry_policy: @config.rpcs.create_service.retry_policy
|
449
|
-
|
508
|
+
|
509
|
+
options.apply_defaults timeout: @config.timeout,
|
510
|
+
metadata: @config.metadata,
|
450
511
|
retry_policy: @config.retry_policy
|
451
512
|
|
452
513
|
@dataproc_metastore_stub.call_rpc :create_service, request, options: options do |response, operation|
|
@@ -509,6 +570,28 @@ module Google
|
|
509
570
|
#
|
510
571
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
511
572
|
#
|
573
|
+
# @example Basic example
|
574
|
+
# require "google/cloud/metastore/v1beta"
|
575
|
+
#
|
576
|
+
# # Create a client object. The client can be reused for multiple calls.
|
577
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
578
|
+
#
|
579
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
580
|
+
# request = Google::Cloud::Metastore::V1beta::UpdateServiceRequest.new
|
581
|
+
#
|
582
|
+
# # Call the update_service method.
|
583
|
+
# result = client.update_service request
|
584
|
+
#
|
585
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
586
|
+
# # object to check the status of an operation, cancel it, or wait
|
587
|
+
# # for results. Here is how to block until completion:
|
588
|
+
# result.wait_until_done! timeout: 60
|
589
|
+
# if result.response?
|
590
|
+
# p result.response
|
591
|
+
# else
|
592
|
+
# puts "Error!"
|
593
|
+
# end
|
594
|
+
#
|
512
595
|
def update_service request, options = nil
|
513
596
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
514
597
|
|
@@ -526,16 +609,20 @@ module Google
|
|
526
609
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
527
610
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
528
611
|
|
529
|
-
header_params = {
|
530
|
-
|
531
|
-
|
612
|
+
header_params = {}
|
613
|
+
if request.service&.name
|
614
|
+
header_params["service.name"] = request.service.name
|
615
|
+
end
|
616
|
+
|
532
617
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
533
618
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
534
619
|
|
535
620
|
options.apply_defaults timeout: @config.rpcs.update_service.timeout,
|
536
621
|
metadata: metadata,
|
537
622
|
retry_policy: @config.rpcs.update_service.retry_policy
|
538
|
-
|
623
|
+
|
624
|
+
options.apply_defaults timeout: @config.timeout,
|
625
|
+
metadata: @config.metadata,
|
539
626
|
retry_policy: @config.retry_policy
|
540
627
|
|
541
628
|
@dataproc_metastore_stub.call_rpc :update_service, request, options: options do |response, operation|
|
@@ -592,6 +679,28 @@ module Google
|
|
592
679
|
#
|
593
680
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
594
681
|
#
|
682
|
+
# @example Basic example
|
683
|
+
# require "google/cloud/metastore/v1beta"
|
684
|
+
#
|
685
|
+
# # Create a client object. The client can be reused for multiple calls.
|
686
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
687
|
+
#
|
688
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
689
|
+
# request = Google::Cloud::Metastore::V1beta::DeleteServiceRequest.new
|
690
|
+
#
|
691
|
+
# # Call the delete_service method.
|
692
|
+
# result = client.delete_service request
|
693
|
+
#
|
694
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
695
|
+
# # object to check the status of an operation, cancel it, or wait
|
696
|
+
# # for results. Here is how to block until completion:
|
697
|
+
# result.wait_until_done! timeout: 60
|
698
|
+
# if result.response?
|
699
|
+
# p result.response
|
700
|
+
# else
|
701
|
+
# puts "Error!"
|
702
|
+
# end
|
703
|
+
#
|
595
704
|
def delete_service request, options = nil
|
596
705
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
597
706
|
|
@@ -609,16 +718,20 @@ module Google
|
|
609
718
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
610
719
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
611
720
|
|
612
|
-
header_params = {
|
613
|
-
|
614
|
-
|
721
|
+
header_params = {}
|
722
|
+
if request.name
|
723
|
+
header_params["name"] = request.name
|
724
|
+
end
|
725
|
+
|
615
726
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
616
727
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
617
728
|
|
618
729
|
options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
|
619
730
|
metadata: metadata,
|
620
731
|
retry_policy: @config.rpcs.delete_service.retry_policy
|
621
|
-
|
732
|
+
|
733
|
+
options.apply_defaults timeout: @config.timeout,
|
734
|
+
metadata: @config.metadata,
|
622
735
|
retry_policy: @config.retry_policy
|
623
736
|
|
624
737
|
@dataproc_metastore_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
@@ -682,6 +795,27 @@ module Google
|
|
682
795
|
#
|
683
796
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
684
797
|
#
|
798
|
+
# @example Basic example
|
799
|
+
# require "google/cloud/metastore/v1beta"
|
800
|
+
#
|
801
|
+
# # Create a client object. The client can be reused for multiple calls.
|
802
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
803
|
+
#
|
804
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
805
|
+
# request = Google::Cloud::Metastore::V1beta::ListMetadataImportsRequest.new
|
806
|
+
#
|
807
|
+
# # Call the list_metadata_imports method.
|
808
|
+
# result = client.list_metadata_imports request
|
809
|
+
#
|
810
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
811
|
+
# # iterate over all elements by calling #each, and the enumerable
|
812
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
813
|
+
# # methods are also available for managing paging directly.
|
814
|
+
# result.each do |response|
|
815
|
+
# # Each element is of type ::Google::Cloud::Metastore::V1beta::MetadataImport.
|
816
|
+
# p response
|
817
|
+
# end
|
818
|
+
#
|
685
819
|
def list_metadata_imports request, options = nil
|
686
820
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
687
821
|
|
@@ -699,16 +833,20 @@ module Google
|
|
699
833
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
700
834
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
701
835
|
|
702
|
-
header_params = {
|
703
|
-
|
704
|
-
|
836
|
+
header_params = {}
|
837
|
+
if request.parent
|
838
|
+
header_params["parent"] = request.parent
|
839
|
+
end
|
840
|
+
|
705
841
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
706
842
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
707
843
|
|
708
844
|
options.apply_defaults timeout: @config.rpcs.list_metadata_imports.timeout,
|
709
845
|
metadata: metadata,
|
710
846
|
retry_policy: @config.rpcs.list_metadata_imports.retry_policy
|
711
|
-
|
847
|
+
|
848
|
+
options.apply_defaults timeout: @config.timeout,
|
849
|
+
metadata: @config.metadata,
|
712
850
|
retry_policy: @config.retry_policy
|
713
851
|
|
714
852
|
@dataproc_metastore_stub.call_rpc :list_metadata_imports, request, options: options do |response, operation|
|
@@ -752,6 +890,21 @@ module Google
|
|
752
890
|
#
|
753
891
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
754
892
|
#
|
893
|
+
# @example Basic example
|
894
|
+
# require "google/cloud/metastore/v1beta"
|
895
|
+
#
|
896
|
+
# # Create a client object. The client can be reused for multiple calls.
|
897
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
898
|
+
#
|
899
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
900
|
+
# request = Google::Cloud::Metastore::V1beta::GetMetadataImportRequest.new
|
901
|
+
#
|
902
|
+
# # Call the get_metadata_import method.
|
903
|
+
# result = client.get_metadata_import request
|
904
|
+
#
|
905
|
+
# # The returned object is of type Google::Cloud::Metastore::V1beta::MetadataImport.
|
906
|
+
# p result
|
907
|
+
#
|
755
908
|
def get_metadata_import request, options = nil
|
756
909
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
757
910
|
|
@@ -769,16 +922,20 @@ module Google
|
|
769
922
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
770
923
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
771
924
|
|
772
|
-
header_params = {
|
773
|
-
|
774
|
-
|
925
|
+
header_params = {}
|
926
|
+
if request.name
|
927
|
+
header_params["name"] = request.name
|
928
|
+
end
|
929
|
+
|
775
930
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
776
931
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
777
932
|
|
778
933
|
options.apply_defaults timeout: @config.rpcs.get_metadata_import.timeout,
|
779
934
|
metadata: metadata,
|
780
935
|
retry_policy: @config.rpcs.get_metadata_import.retry_policy
|
781
|
-
|
936
|
+
|
937
|
+
options.apply_defaults timeout: @config.timeout,
|
938
|
+
metadata: @config.metadata,
|
782
939
|
retry_policy: @config.retry_policy
|
783
940
|
|
784
941
|
@dataproc_metastore_stub.call_rpc :get_metadata_import, request, options: options do |response, operation|
|
@@ -845,6 +1002,28 @@ module Google
|
|
845
1002
|
#
|
846
1003
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
847
1004
|
#
|
1005
|
+
# @example Basic example
|
1006
|
+
# require "google/cloud/metastore/v1beta"
|
1007
|
+
#
|
1008
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1009
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1010
|
+
#
|
1011
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1012
|
+
# request = Google::Cloud::Metastore::V1beta::CreateMetadataImportRequest.new
|
1013
|
+
#
|
1014
|
+
# # Call the create_metadata_import method.
|
1015
|
+
# result = client.create_metadata_import request
|
1016
|
+
#
|
1017
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1018
|
+
# # object to check the status of an operation, cancel it, or wait
|
1019
|
+
# # for results. Here is how to block until completion:
|
1020
|
+
# result.wait_until_done! timeout: 60
|
1021
|
+
# if result.response?
|
1022
|
+
# p result.response
|
1023
|
+
# else
|
1024
|
+
# puts "Error!"
|
1025
|
+
# end
|
1026
|
+
#
|
848
1027
|
def create_metadata_import request, options = nil
|
849
1028
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
850
1029
|
|
@@ -862,16 +1041,20 @@ module Google
|
|
862
1041
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
863
1042
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
864
1043
|
|
865
|
-
header_params = {
|
866
|
-
|
867
|
-
|
1044
|
+
header_params = {}
|
1045
|
+
if request.parent
|
1046
|
+
header_params["parent"] = request.parent
|
1047
|
+
end
|
1048
|
+
|
868
1049
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
869
1050
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
870
1051
|
|
871
1052
|
options.apply_defaults timeout: @config.rpcs.create_metadata_import.timeout,
|
872
1053
|
metadata: metadata,
|
873
1054
|
retry_policy: @config.rpcs.create_metadata_import.retry_policy
|
874
|
-
|
1055
|
+
|
1056
|
+
options.apply_defaults timeout: @config.timeout,
|
1057
|
+
metadata: @config.metadata,
|
875
1058
|
retry_policy: @config.retry_policy
|
876
1059
|
|
877
1060
|
@dataproc_metastore_stub.call_rpc :create_metadata_import, request, options: options do |response, operation|
|
@@ -935,6 +1118,28 @@ module Google
|
|
935
1118
|
#
|
936
1119
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
937
1120
|
#
|
1121
|
+
# @example Basic example
|
1122
|
+
# require "google/cloud/metastore/v1beta"
|
1123
|
+
#
|
1124
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1125
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1126
|
+
#
|
1127
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1128
|
+
# request = Google::Cloud::Metastore::V1beta::UpdateMetadataImportRequest.new
|
1129
|
+
#
|
1130
|
+
# # Call the update_metadata_import method.
|
1131
|
+
# result = client.update_metadata_import request
|
1132
|
+
#
|
1133
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1134
|
+
# # object to check the status of an operation, cancel it, or wait
|
1135
|
+
# # for results. Here is how to block until completion:
|
1136
|
+
# result.wait_until_done! timeout: 60
|
1137
|
+
# if result.response?
|
1138
|
+
# p result.response
|
1139
|
+
# else
|
1140
|
+
# puts "Error!"
|
1141
|
+
# end
|
1142
|
+
#
|
938
1143
|
def update_metadata_import request, options = nil
|
939
1144
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
940
1145
|
|
@@ -952,16 +1157,20 @@ module Google
|
|
952
1157
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
953
1158
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
954
1159
|
|
955
|
-
header_params = {
|
956
|
-
|
957
|
-
|
1160
|
+
header_params = {}
|
1161
|
+
if request.metadata_import&.name
|
1162
|
+
header_params["metadata_import.name"] = request.metadata_import.name
|
1163
|
+
end
|
1164
|
+
|
958
1165
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
959
1166
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
960
1167
|
|
961
1168
|
options.apply_defaults timeout: @config.rpcs.update_metadata_import.timeout,
|
962
1169
|
metadata: metadata,
|
963
1170
|
retry_policy: @config.rpcs.update_metadata_import.retry_policy
|
964
|
-
|
1171
|
+
|
1172
|
+
options.apply_defaults timeout: @config.timeout,
|
1173
|
+
metadata: @config.metadata,
|
965
1174
|
retry_policy: @config.retry_policy
|
966
1175
|
|
967
1176
|
@dataproc_metastore_stub.call_rpc :update_metadata_import, request, options: options do |response, operation|
|
@@ -1025,6 +1234,28 @@ module Google
|
|
1025
1234
|
#
|
1026
1235
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1027
1236
|
#
|
1237
|
+
# @example Basic example
|
1238
|
+
# require "google/cloud/metastore/v1beta"
|
1239
|
+
#
|
1240
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1241
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1242
|
+
#
|
1243
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1244
|
+
# request = Google::Cloud::Metastore::V1beta::ExportMetadataRequest.new
|
1245
|
+
#
|
1246
|
+
# # Call the export_metadata method.
|
1247
|
+
# result = client.export_metadata request
|
1248
|
+
#
|
1249
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1250
|
+
# # object to check the status of an operation, cancel it, or wait
|
1251
|
+
# # for results. Here is how to block until completion:
|
1252
|
+
# result.wait_until_done! timeout: 60
|
1253
|
+
# if result.response?
|
1254
|
+
# p result.response
|
1255
|
+
# else
|
1256
|
+
# puts "Error!"
|
1257
|
+
# end
|
1258
|
+
#
|
1028
1259
|
def export_metadata request, options = nil
|
1029
1260
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1030
1261
|
|
@@ -1042,16 +1273,20 @@ module Google
|
|
1042
1273
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1043
1274
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1044
1275
|
|
1045
|
-
header_params = {
|
1046
|
-
|
1047
|
-
|
1276
|
+
header_params = {}
|
1277
|
+
if request.service
|
1278
|
+
header_params["service"] = request.service
|
1279
|
+
end
|
1280
|
+
|
1048
1281
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1049
1282
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1050
1283
|
|
1051
1284
|
options.apply_defaults timeout: @config.rpcs.export_metadata.timeout,
|
1052
1285
|
metadata: metadata,
|
1053
1286
|
retry_policy: @config.rpcs.export_metadata.retry_policy
|
1054
|
-
|
1287
|
+
|
1288
|
+
options.apply_defaults timeout: @config.timeout,
|
1289
|
+
metadata: @config.metadata,
|
1055
1290
|
retry_policy: @config.retry_policy
|
1056
1291
|
|
1057
1292
|
@dataproc_metastore_stub.call_rpc :export_metadata, request, options: options do |response, operation|
|
@@ -1115,6 +1350,28 @@ module Google
|
|
1115
1350
|
#
|
1116
1351
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1117
1352
|
#
|
1353
|
+
# @example Basic example
|
1354
|
+
# require "google/cloud/metastore/v1beta"
|
1355
|
+
#
|
1356
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1357
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1358
|
+
#
|
1359
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1360
|
+
# request = Google::Cloud::Metastore::V1beta::RestoreServiceRequest.new
|
1361
|
+
#
|
1362
|
+
# # Call the restore_service method.
|
1363
|
+
# result = client.restore_service request
|
1364
|
+
#
|
1365
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1366
|
+
# # object to check the status of an operation, cancel it, or wait
|
1367
|
+
# # for results. Here is how to block until completion:
|
1368
|
+
# result.wait_until_done! timeout: 60
|
1369
|
+
# if result.response?
|
1370
|
+
# p result.response
|
1371
|
+
# else
|
1372
|
+
# puts "Error!"
|
1373
|
+
# end
|
1374
|
+
#
|
1118
1375
|
def restore_service request, options = nil
|
1119
1376
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1120
1377
|
|
@@ -1132,16 +1389,20 @@ module Google
|
|
1132
1389
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1133
1390
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1134
1391
|
|
1135
|
-
header_params = {
|
1136
|
-
|
1137
|
-
|
1392
|
+
header_params = {}
|
1393
|
+
if request.service
|
1394
|
+
header_params["service"] = request.service
|
1395
|
+
end
|
1396
|
+
|
1138
1397
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1139
1398
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1140
1399
|
|
1141
1400
|
options.apply_defaults timeout: @config.rpcs.restore_service.timeout,
|
1142
1401
|
metadata: metadata,
|
1143
1402
|
retry_policy: @config.rpcs.restore_service.retry_policy
|
1144
|
-
|
1403
|
+
|
1404
|
+
options.apply_defaults timeout: @config.timeout,
|
1405
|
+
metadata: @config.metadata,
|
1145
1406
|
retry_policy: @config.retry_policy
|
1146
1407
|
|
1147
1408
|
@dataproc_metastore_stub.call_rpc :restore_service, request, options: options do |response, operation|
|
@@ -1205,6 +1466,27 @@ module Google
|
|
1205
1466
|
#
|
1206
1467
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1207
1468
|
#
|
1469
|
+
# @example Basic example
|
1470
|
+
# require "google/cloud/metastore/v1beta"
|
1471
|
+
#
|
1472
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1473
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1474
|
+
#
|
1475
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1476
|
+
# request = Google::Cloud::Metastore::V1beta::ListBackupsRequest.new
|
1477
|
+
#
|
1478
|
+
# # Call the list_backups method.
|
1479
|
+
# result = client.list_backups request
|
1480
|
+
#
|
1481
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1482
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1483
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1484
|
+
# # methods are also available for managing paging directly.
|
1485
|
+
# result.each do |response|
|
1486
|
+
# # Each element is of type ::Google::Cloud::Metastore::V1beta::Backup.
|
1487
|
+
# p response
|
1488
|
+
# end
|
1489
|
+
#
|
1208
1490
|
def list_backups request, options = nil
|
1209
1491
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1210
1492
|
|
@@ -1222,16 +1504,20 @@ module Google
|
|
1222
1504
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1223
1505
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1224
1506
|
|
1225
|
-
header_params = {
|
1226
|
-
|
1227
|
-
|
1507
|
+
header_params = {}
|
1508
|
+
if request.parent
|
1509
|
+
header_params["parent"] = request.parent
|
1510
|
+
end
|
1511
|
+
|
1228
1512
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1229
1513
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1230
1514
|
|
1231
1515
|
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
1232
1516
|
metadata: metadata,
|
1233
1517
|
retry_policy: @config.rpcs.list_backups.retry_policy
|
1234
|
-
|
1518
|
+
|
1519
|
+
options.apply_defaults timeout: @config.timeout,
|
1520
|
+
metadata: @config.metadata,
|
1235
1521
|
retry_policy: @config.retry_policy
|
1236
1522
|
|
1237
1523
|
@dataproc_metastore_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
@@ -1275,6 +1561,21 @@ module Google
|
|
1275
1561
|
#
|
1276
1562
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1277
1563
|
#
|
1564
|
+
# @example Basic example
|
1565
|
+
# require "google/cloud/metastore/v1beta"
|
1566
|
+
#
|
1567
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1568
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1569
|
+
#
|
1570
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1571
|
+
# request = Google::Cloud::Metastore::V1beta::GetBackupRequest.new
|
1572
|
+
#
|
1573
|
+
# # Call the get_backup method.
|
1574
|
+
# result = client.get_backup request
|
1575
|
+
#
|
1576
|
+
# # The returned object is of type Google::Cloud::Metastore::V1beta::Backup.
|
1577
|
+
# p result
|
1578
|
+
#
|
1278
1579
|
def get_backup request, options = nil
|
1279
1580
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1280
1581
|
|
@@ -1292,16 +1593,20 @@ module Google
|
|
1292
1593
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1293
1594
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1294
1595
|
|
1295
|
-
header_params = {
|
1296
|
-
|
1297
|
-
|
1596
|
+
header_params = {}
|
1597
|
+
if request.name
|
1598
|
+
header_params["name"] = request.name
|
1599
|
+
end
|
1600
|
+
|
1298
1601
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1299
1602
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1300
1603
|
|
1301
1604
|
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
1302
1605
|
metadata: metadata,
|
1303
1606
|
retry_policy: @config.rpcs.get_backup.retry_policy
|
1304
|
-
|
1607
|
+
|
1608
|
+
options.apply_defaults timeout: @config.timeout,
|
1609
|
+
metadata: @config.metadata,
|
1305
1610
|
retry_policy: @config.retry_policy
|
1306
1611
|
|
1307
1612
|
@dataproc_metastore_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
@@ -1367,6 +1672,28 @@ module Google
|
|
1367
1672
|
#
|
1368
1673
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1369
1674
|
#
|
1675
|
+
# @example Basic example
|
1676
|
+
# require "google/cloud/metastore/v1beta"
|
1677
|
+
#
|
1678
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1679
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1680
|
+
#
|
1681
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1682
|
+
# request = Google::Cloud::Metastore::V1beta::CreateBackupRequest.new
|
1683
|
+
#
|
1684
|
+
# # Call the create_backup method.
|
1685
|
+
# result = client.create_backup request
|
1686
|
+
#
|
1687
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1688
|
+
# # object to check the status of an operation, cancel it, or wait
|
1689
|
+
# # for results. Here is how to block until completion:
|
1690
|
+
# result.wait_until_done! timeout: 60
|
1691
|
+
# if result.response?
|
1692
|
+
# p result.response
|
1693
|
+
# else
|
1694
|
+
# puts "Error!"
|
1695
|
+
# end
|
1696
|
+
#
|
1370
1697
|
def create_backup request, options = nil
|
1371
1698
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1372
1699
|
|
@@ -1384,16 +1711,20 @@ module Google
|
|
1384
1711
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1385
1712
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1386
1713
|
|
1387
|
-
header_params = {
|
1388
|
-
|
1389
|
-
|
1714
|
+
header_params = {}
|
1715
|
+
if request.parent
|
1716
|
+
header_params["parent"] = request.parent
|
1717
|
+
end
|
1718
|
+
|
1390
1719
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1391
1720
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1392
1721
|
|
1393
1722
|
options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
|
1394
1723
|
metadata: metadata,
|
1395
1724
|
retry_policy: @config.rpcs.create_backup.retry_policy
|
1396
|
-
|
1725
|
+
|
1726
|
+
options.apply_defaults timeout: @config.timeout,
|
1727
|
+
metadata: @config.metadata,
|
1397
1728
|
retry_policy: @config.retry_policy
|
1398
1729
|
|
1399
1730
|
@dataproc_metastore_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
@@ -1450,6 +1781,28 @@ module Google
|
|
1450
1781
|
#
|
1451
1782
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1452
1783
|
#
|
1784
|
+
# @example Basic example
|
1785
|
+
# require "google/cloud/metastore/v1beta"
|
1786
|
+
#
|
1787
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1788
|
+
# client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
|
1789
|
+
#
|
1790
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1791
|
+
# request = Google::Cloud::Metastore::V1beta::DeleteBackupRequest.new
|
1792
|
+
#
|
1793
|
+
# # Call the delete_backup method.
|
1794
|
+
# result = client.delete_backup request
|
1795
|
+
#
|
1796
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1797
|
+
# # object to check the status of an operation, cancel it, or wait
|
1798
|
+
# # for results. Here is how to block until completion:
|
1799
|
+
# result.wait_until_done! timeout: 60
|
1800
|
+
# if result.response?
|
1801
|
+
# p result.response
|
1802
|
+
# else
|
1803
|
+
# puts "Error!"
|
1804
|
+
# end
|
1805
|
+
#
|
1453
1806
|
def delete_backup request, options = nil
|
1454
1807
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1455
1808
|
|
@@ -1467,16 +1820,20 @@ module Google
|
|
1467
1820
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1468
1821
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1469
1822
|
|
1470
|
-
header_params = {
|
1471
|
-
|
1472
|
-
|
1823
|
+
header_params = {}
|
1824
|
+
if request.name
|
1825
|
+
header_params["name"] = request.name
|
1826
|
+
end
|
1827
|
+
|
1473
1828
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1474
1829
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1475
1830
|
|
1476
1831
|
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
1477
1832
|
metadata: metadata,
|
1478
1833
|
retry_policy: @config.rpcs.delete_backup.retry_policy
|
1479
|
-
|
1834
|
+
|
1835
|
+
options.apply_defaults timeout: @config.timeout,
|
1836
|
+
metadata: @config.metadata,
|
1480
1837
|
retry_policy: @config.retry_policy
|
1481
1838
|
|
1482
1839
|
@dataproc_metastore_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
@@ -1501,22 +1858,21 @@ module Google
|
|
1501
1858
|
# Configuration can be applied globally to all clients, or to a single client
|
1502
1859
|
# on construction.
|
1503
1860
|
#
|
1504
|
-
#
|
1505
|
-
#
|
1506
|
-
#
|
1507
|
-
# to 20 seconds,
|
1508
|
-
#
|
1509
|
-
#
|
1510
|
-
#
|
1511
|
-
#
|
1512
|
-
#
|
1513
|
-
#
|
1514
|
-
#
|
1515
|
-
#
|
1516
|
-
#
|
1517
|
-
#
|
1518
|
-
#
|
1519
|
-
# end
|
1861
|
+
# @example
|
1862
|
+
#
|
1863
|
+
# # Modify the global config, setting the timeout for
|
1864
|
+
# # list_services to 20 seconds,
|
1865
|
+
# # and all remaining timeouts to 10 seconds.
|
1866
|
+
# ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.configure do |config|
|
1867
|
+
# config.timeout = 10.0
|
1868
|
+
# config.rpcs.list_services.timeout = 20.0
|
1869
|
+
# end
|
1870
|
+
#
|
1871
|
+
# # Apply the above configuration only to a new client.
|
1872
|
+
# client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new do |config|
|
1873
|
+
# config.timeout = 10.0
|
1874
|
+
# config.rpcs.list_services.timeout = 20.0
|
1875
|
+
# end
|
1520
1876
|
#
|
1521
1877
|
# @!attribute [rw] endpoint
|
1522
1878
|
# The hostname or hostname:port of the service endpoint.
|