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