google-cloud-bigquery-data_transfer-v1 0.4.3 → 0.5.0
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 +7 -25
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb +414 -59
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb +1 -4
- data/lib/google/cloud/bigquery/data_transfer/v1/version.rb +1 -1
- data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb +7 -2
- data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +17 -18
- data/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb +8 -2
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +26 -21
- data/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb +42 -15
- metadata +3 -3
@@ -28,10 +28,7 @@ module Google
|
|
28
28
|
##
|
29
29
|
# Client for the DataTransferService service.
|
30
30
|
#
|
31
|
-
#
|
32
|
-
# configure the transfer of their data from other Google Products into
|
33
|
-
# BigQuery. This service contains methods that are end user exposed. It backs
|
34
|
-
# up the frontend.
|
31
|
+
# This API allows users to manage their data transfers into BigQuery.
|
35
32
|
#
|
36
33
|
class Client
|
37
34
|
include Paths
|
@@ -205,8 +202,7 @@ module Google
|
|
205
202
|
# Service calls
|
206
203
|
|
207
204
|
##
|
208
|
-
# Retrieves a supported data source and returns its settings
|
209
|
-
# which can be used for UI rendering.
|
205
|
+
# Retrieves a supported data source and returns its settings.
|
210
206
|
#
|
211
207
|
# @overload get_data_source(request, options = nil)
|
212
208
|
# Pass arguments to `get_data_source` via a request object, either of type
|
@@ -236,6 +232,21 @@ module Google
|
|
236
232
|
#
|
237
233
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
238
234
|
#
|
235
|
+
# @example Basic example
|
236
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
237
|
+
#
|
238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
239
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
240
|
+
#
|
241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
242
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new
|
243
|
+
#
|
244
|
+
# # Call the get_data_source method.
|
245
|
+
# result = client.get_data_source request
|
246
|
+
#
|
247
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource.
|
248
|
+
# p result
|
249
|
+
#
|
239
250
|
def get_data_source request, options = nil
|
240
251
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
241
252
|
|
@@ -253,9 +264,11 @@ module Google
|
|
253
264
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
254
265
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
255
266
|
|
256
|
-
header_params = {
|
257
|
-
|
258
|
-
|
267
|
+
header_params = {}
|
268
|
+
if request.name
|
269
|
+
header_params["name"] = request.name
|
270
|
+
end
|
271
|
+
|
259
272
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
260
273
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
261
274
|
|
@@ -276,8 +289,7 @@ module Google
|
|
276
289
|
end
|
277
290
|
|
278
291
|
##
|
279
|
-
# Lists supported data sources and returns their settings
|
280
|
-
# which can be used for UI rendering.
|
292
|
+
# Lists supported data sources and returns their settings.
|
281
293
|
#
|
282
294
|
# @overload list_data_sources(request, options = nil)
|
283
295
|
# Pass arguments to `list_data_sources` via a request object, either of type
|
@@ -315,6 +327,27 @@ module Google
|
|
315
327
|
#
|
316
328
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
317
329
|
#
|
330
|
+
# @example Basic example
|
331
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
332
|
+
#
|
333
|
+
# # Create a client object. The client can be reused for multiple calls.
|
334
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
335
|
+
#
|
336
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
337
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new
|
338
|
+
#
|
339
|
+
# # Call the list_data_sources method.
|
340
|
+
# result = client.list_data_sources request
|
341
|
+
#
|
342
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
343
|
+
# # iterate over all elements by calling #each, and the enumerable
|
344
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
345
|
+
# # methods are also available for managing paging directly.
|
346
|
+
# result.each do |response|
|
347
|
+
# # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.
|
348
|
+
# p response
|
349
|
+
# end
|
350
|
+
#
|
318
351
|
def list_data_sources request, options = nil
|
319
352
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
320
353
|
|
@@ -332,9 +365,11 @@ module Google
|
|
332
365
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
333
366
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
334
367
|
|
335
|
-
header_params = {
|
336
|
-
|
337
|
-
|
368
|
+
header_params = {}
|
369
|
+
if request.parent
|
370
|
+
header_params["parent"] = request.parent
|
371
|
+
end
|
372
|
+
|
338
373
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
339
374
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
340
375
|
|
@@ -418,6 +453,21 @@ module Google
|
|
418
453
|
#
|
419
454
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
420
455
|
#
|
456
|
+
# @example Basic example
|
457
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
458
|
+
#
|
459
|
+
# # Create a client object. The client can be reused for multiple calls.
|
460
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
461
|
+
#
|
462
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
463
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new
|
464
|
+
#
|
465
|
+
# # Call the create_transfer_config method.
|
466
|
+
# result = client.create_transfer_config request
|
467
|
+
#
|
468
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.
|
469
|
+
# p result
|
470
|
+
#
|
421
471
|
def create_transfer_config request, options = nil
|
422
472
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
423
473
|
|
@@ -435,9 +485,11 @@ module Google
|
|
435
485
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
436
486
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
437
487
|
|
438
|
-
header_params = {
|
439
|
-
|
440
|
-
|
488
|
+
header_params = {}
|
489
|
+
if request.parent
|
490
|
+
header_params["parent"] = request.parent
|
491
|
+
end
|
492
|
+
|
441
493
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
442
494
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
443
495
|
|
@@ -519,6 +571,21 @@ module Google
|
|
519
571
|
#
|
520
572
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
521
573
|
#
|
574
|
+
# @example Basic example
|
575
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
576
|
+
#
|
577
|
+
# # Create a client object. The client can be reused for multiple calls.
|
578
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
579
|
+
#
|
580
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
581
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new
|
582
|
+
#
|
583
|
+
# # Call the update_transfer_config method.
|
584
|
+
# result = client.update_transfer_config request
|
585
|
+
#
|
586
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.
|
587
|
+
# p result
|
588
|
+
#
|
522
589
|
def update_transfer_config request, options = nil
|
523
590
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
524
591
|
|
@@ -536,9 +603,11 @@ module Google
|
|
536
603
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
537
604
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
538
605
|
|
539
|
-
header_params = {
|
540
|
-
|
541
|
-
|
606
|
+
header_params = {}
|
607
|
+
if request.transfer_config&.name
|
608
|
+
header_params["transfer_config.name"] = request.transfer_config.name
|
609
|
+
end
|
610
|
+
|
542
611
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
543
612
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
544
613
|
|
@@ -559,8 +628,8 @@ module Google
|
|
559
628
|
end
|
560
629
|
|
561
630
|
##
|
562
|
-
# Deletes a data transfer configuration,
|
563
|
-
#
|
631
|
+
# Deletes a data transfer configuration, including any associated transfer
|
632
|
+
# runs and logs.
|
564
633
|
#
|
565
634
|
# @overload delete_transfer_config(request, options = nil)
|
566
635
|
# Pass arguments to `delete_transfer_config` via a request object, either of type
|
@@ -590,6 +659,21 @@ module Google
|
|
590
659
|
#
|
591
660
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
592
661
|
#
|
662
|
+
# @example Basic example
|
663
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
664
|
+
#
|
665
|
+
# # Create a client object. The client can be reused for multiple calls.
|
666
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
667
|
+
#
|
668
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
669
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new
|
670
|
+
#
|
671
|
+
# # Call the delete_transfer_config method.
|
672
|
+
# result = client.delete_transfer_config request
|
673
|
+
#
|
674
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
675
|
+
# p result
|
676
|
+
#
|
593
677
|
def delete_transfer_config request, options = nil
|
594
678
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
595
679
|
|
@@ -607,9 +691,11 @@ module Google
|
|
607
691
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
608
692
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
609
693
|
|
610
|
-
header_params = {
|
611
|
-
|
612
|
-
|
694
|
+
header_params = {}
|
695
|
+
if request.name
|
696
|
+
header_params["name"] = request.name
|
697
|
+
end
|
698
|
+
|
613
699
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
614
700
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
615
701
|
|
@@ -660,6 +746,21 @@ module Google
|
|
660
746
|
#
|
661
747
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
662
748
|
#
|
749
|
+
# @example Basic example
|
750
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
751
|
+
#
|
752
|
+
# # Create a client object. The client can be reused for multiple calls.
|
753
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
754
|
+
#
|
755
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
756
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new
|
757
|
+
#
|
758
|
+
# # Call the get_transfer_config method.
|
759
|
+
# result = client.get_transfer_config request
|
760
|
+
#
|
761
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.
|
762
|
+
# p result
|
763
|
+
#
|
663
764
|
def get_transfer_config request, options = nil
|
664
765
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
665
766
|
|
@@ -677,9 +778,11 @@ module Google
|
|
677
778
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
678
779
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
679
780
|
|
680
|
-
header_params = {
|
681
|
-
|
682
|
-
|
781
|
+
header_params = {}
|
782
|
+
if request.name
|
783
|
+
header_params["name"] = request.name
|
784
|
+
end
|
785
|
+
|
683
786
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
684
787
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
685
788
|
|
@@ -700,7 +803,8 @@ module Google
|
|
700
803
|
end
|
701
804
|
|
702
805
|
##
|
703
|
-
# Returns information about all
|
806
|
+
# Returns information about all transfer configs owned by a project in the
|
807
|
+
# specified location.
|
704
808
|
#
|
705
809
|
# @overload list_transfer_configs(request, options = nil)
|
706
810
|
# Pass arguments to `list_transfer_configs` via a request object, either of type
|
@@ -740,6 +844,27 @@ module Google
|
|
740
844
|
#
|
741
845
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
742
846
|
#
|
847
|
+
# @example Basic example
|
848
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
849
|
+
#
|
850
|
+
# # Create a client object. The client can be reused for multiple calls.
|
851
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
852
|
+
#
|
853
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
854
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new
|
855
|
+
#
|
856
|
+
# # Call the list_transfer_configs method.
|
857
|
+
# result = client.list_transfer_configs request
|
858
|
+
#
|
859
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
860
|
+
# # iterate over all elements by calling #each, and the enumerable
|
861
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
862
|
+
# # methods are also available for managing paging directly.
|
863
|
+
# result.each do |response|
|
864
|
+
# # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.
|
865
|
+
# p response
|
866
|
+
# end
|
867
|
+
#
|
743
868
|
def list_transfer_configs request, options = nil
|
744
869
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
745
870
|
|
@@ -757,9 +882,11 @@ module Google
|
|
757
882
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
758
883
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
759
884
|
|
760
|
-
header_params = {
|
761
|
-
|
762
|
-
|
885
|
+
header_params = {}
|
886
|
+
if request.parent
|
887
|
+
header_params["parent"] = request.parent
|
888
|
+
end
|
889
|
+
|
763
890
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
764
891
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
765
892
|
|
@@ -823,6 +950,21 @@ module Google
|
|
823
950
|
#
|
824
951
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
825
952
|
#
|
953
|
+
# @example Basic example
|
954
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
955
|
+
#
|
956
|
+
# # Create a client object. The client can be reused for multiple calls.
|
957
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
958
|
+
#
|
959
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
960
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new
|
961
|
+
#
|
962
|
+
# # Call the schedule_transfer_runs method.
|
963
|
+
# result = client.schedule_transfer_runs request
|
964
|
+
#
|
965
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.
|
966
|
+
# p result
|
967
|
+
#
|
826
968
|
def schedule_transfer_runs request, options = nil
|
827
969
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
828
970
|
|
@@ -840,9 +982,11 @@ module Google
|
|
840
982
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
841
983
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
842
984
|
|
843
|
-
header_params = {
|
844
|
-
|
845
|
-
|
985
|
+
header_params = {}
|
986
|
+
if request.parent
|
987
|
+
header_params["parent"] = request.parent
|
988
|
+
end
|
989
|
+
|
846
990
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
847
991
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
848
992
|
|
@@ -901,6 +1045,21 @@ module Google
|
|
901
1045
|
#
|
902
1046
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
903
1047
|
#
|
1048
|
+
# @example Basic example
|
1049
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
1050
|
+
#
|
1051
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1052
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
1053
|
+
#
|
1054
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1055
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new
|
1056
|
+
#
|
1057
|
+
# # Call the start_manual_transfer_runs method.
|
1058
|
+
# result = client.start_manual_transfer_runs request
|
1059
|
+
#
|
1060
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.
|
1061
|
+
# p result
|
1062
|
+
#
|
904
1063
|
def start_manual_transfer_runs request, options = nil
|
905
1064
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
906
1065
|
|
@@ -918,9 +1077,11 @@ module Google
|
|
918
1077
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
919
1078
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
920
1079
|
|
921
|
-
header_params = {
|
922
|
-
|
923
|
-
|
1080
|
+
header_params = {}
|
1081
|
+
if request.parent
|
1082
|
+
header_params["parent"] = request.parent
|
1083
|
+
end
|
1084
|
+
|
924
1085
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
925
1086
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
926
1087
|
|
@@ -971,6 +1132,21 @@ module Google
|
|
971
1132
|
#
|
972
1133
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
973
1134
|
#
|
1135
|
+
# @example Basic example
|
1136
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
1137
|
+
#
|
1138
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1139
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
1140
|
+
#
|
1141
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1142
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new
|
1143
|
+
#
|
1144
|
+
# # Call the get_transfer_run method.
|
1145
|
+
# result = client.get_transfer_run request
|
1146
|
+
#
|
1147
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.
|
1148
|
+
# p result
|
1149
|
+
#
|
974
1150
|
def get_transfer_run request, options = nil
|
975
1151
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
976
1152
|
|
@@ -988,9 +1164,11 @@ module Google
|
|
988
1164
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
989
1165
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
990
1166
|
|
991
|
-
header_params = {
|
992
|
-
|
993
|
-
|
1167
|
+
header_params = {}
|
1168
|
+
if request.name
|
1169
|
+
header_params["name"] = request.name
|
1170
|
+
end
|
1171
|
+
|
994
1172
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
995
1173
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
996
1174
|
|
@@ -1041,6 +1219,21 @@ module Google
|
|
1041
1219
|
#
|
1042
1220
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1043
1221
|
#
|
1222
|
+
# @example Basic example
|
1223
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
1224
|
+
#
|
1225
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1226
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
1227
|
+
#
|
1228
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1229
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new
|
1230
|
+
#
|
1231
|
+
# # Call the delete_transfer_run method.
|
1232
|
+
# result = client.delete_transfer_run request
|
1233
|
+
#
|
1234
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1235
|
+
# p result
|
1236
|
+
#
|
1044
1237
|
def delete_transfer_run request, options = nil
|
1045
1238
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1046
1239
|
|
@@ -1058,9 +1251,11 @@ module Google
|
|
1058
1251
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1059
1252
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1060
1253
|
|
1061
|
-
header_params = {
|
1062
|
-
|
1063
|
-
|
1254
|
+
header_params = {}
|
1255
|
+
if request.name
|
1256
|
+
header_params["name"] = request.name
|
1257
|
+
end
|
1258
|
+
|
1064
1259
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1065
1260
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1066
1261
|
|
@@ -1081,7 +1276,7 @@ module Google
|
|
1081
1276
|
end
|
1082
1277
|
|
1083
1278
|
##
|
1084
|
-
# Returns information about running and completed
|
1279
|
+
# Returns information about running and completed transfer runs.
|
1085
1280
|
#
|
1086
1281
|
# @overload list_transfer_runs(request, options = nil)
|
1087
1282
|
# Pass arguments to `list_transfer_runs` via a request object, either of type
|
@@ -1124,6 +1319,27 @@ module Google
|
|
1124
1319
|
#
|
1125
1320
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1126
1321
|
#
|
1322
|
+
# @example Basic example
|
1323
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
1324
|
+
#
|
1325
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1326
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
1327
|
+
#
|
1328
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1329
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new
|
1330
|
+
#
|
1331
|
+
# # Call the list_transfer_runs method.
|
1332
|
+
# result = client.list_transfer_runs request
|
1333
|
+
#
|
1334
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1335
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1336
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1337
|
+
# # methods are also available for managing paging directly.
|
1338
|
+
# result.each do |response|
|
1339
|
+
# # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.
|
1340
|
+
# p response
|
1341
|
+
# end
|
1342
|
+
#
|
1127
1343
|
def list_transfer_runs request, options = nil
|
1128
1344
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1129
1345
|
|
@@ -1141,9 +1357,11 @@ module Google
|
|
1141
1357
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1142
1358
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1143
1359
|
|
1144
|
-
header_params = {
|
1145
|
-
|
1146
|
-
|
1360
|
+
header_params = {}
|
1361
|
+
if request.parent
|
1362
|
+
header_params["parent"] = request.parent
|
1363
|
+
end
|
1364
|
+
|
1147
1365
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1148
1366
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1149
1367
|
|
@@ -1165,7 +1383,7 @@ module Google
|
|
1165
1383
|
end
|
1166
1384
|
|
1167
1385
|
##
|
1168
|
-
# Returns
|
1386
|
+
# Returns log messages for the transfer run.
|
1169
1387
|
#
|
1170
1388
|
# @overload list_transfer_logs(request, options = nil)
|
1171
1389
|
# Pass arguments to `list_transfer_logs` via a request object, either of type
|
@@ -1206,6 +1424,27 @@ module Google
|
|
1206
1424
|
#
|
1207
1425
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1208
1426
|
#
|
1427
|
+
# @example Basic example
|
1428
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
1429
|
+
#
|
1430
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1431
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
1432
|
+
#
|
1433
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1434
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new
|
1435
|
+
#
|
1436
|
+
# # Call the list_transfer_logs method.
|
1437
|
+
# result = client.list_transfer_logs request
|
1438
|
+
#
|
1439
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1440
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1441
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1442
|
+
# # methods are also available for managing paging directly.
|
1443
|
+
# result.each do |response|
|
1444
|
+
# # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage.
|
1445
|
+
# p response
|
1446
|
+
# end
|
1447
|
+
#
|
1209
1448
|
def list_transfer_logs request, options = nil
|
1210
1449
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1211
1450
|
|
@@ -1223,9 +1462,11 @@ module Google
|
|
1223
1462
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1224
1463
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1225
1464
|
|
1226
|
-
header_params = {
|
1227
|
-
|
1228
|
-
|
1465
|
+
header_params = {}
|
1466
|
+
if request.parent
|
1467
|
+
header_params["parent"] = request.parent
|
1468
|
+
end
|
1469
|
+
|
1229
1470
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1230
1471
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1231
1472
|
|
@@ -1249,10 +1490,6 @@ module Google
|
|
1249
1490
|
##
|
1250
1491
|
# Returns true if valid credentials exist for the given data source and
|
1251
1492
|
# requesting user.
|
1252
|
-
# Some data sources doesn't support service account, so we need to talk to
|
1253
|
-
# them on behalf of the end user. This API just checks whether we have OAuth
|
1254
|
-
# token for the particular user, which is a pre-requisite before user can
|
1255
|
-
# create a transfer config.
|
1256
1493
|
#
|
1257
1494
|
# @overload check_valid_creds(request, options = nil)
|
1258
1495
|
# Pass arguments to `check_valid_creds` via a request object, either of type
|
@@ -1282,6 +1519,21 @@ module Google
|
|
1282
1519
|
#
|
1283
1520
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1284
1521
|
#
|
1522
|
+
# @example Basic example
|
1523
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
1524
|
+
#
|
1525
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1526
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
1527
|
+
#
|
1528
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1529
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new
|
1530
|
+
#
|
1531
|
+
# # Call the check_valid_creds method.
|
1532
|
+
# result = client.check_valid_creds request
|
1533
|
+
#
|
1534
|
+
# # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.
|
1535
|
+
# p result
|
1536
|
+
#
|
1285
1537
|
def check_valid_creds request, options = nil
|
1286
1538
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1287
1539
|
|
@@ -1299,9 +1551,11 @@ module Google
|
|
1299
1551
|
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1300
1552
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1301
1553
|
|
1302
|
-
header_params = {
|
1303
|
-
|
1304
|
-
|
1554
|
+
header_params = {}
|
1555
|
+
if request.name
|
1556
|
+
header_params["name"] = request.name
|
1557
|
+
end
|
1558
|
+
|
1305
1559
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1306
1560
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1307
1561
|
|
@@ -1321,6 +1575,100 @@ module Google
|
|
1321
1575
|
raise ::Google::Cloud::Error.from_error(e)
|
1322
1576
|
end
|
1323
1577
|
|
1578
|
+
##
|
1579
|
+
# Enroll data sources in a user project. This allows users to create transfer
|
1580
|
+
# configurations for these data sources. They will also appear in the
|
1581
|
+
# ListDataSources RPC and as such, will appear in the BigQuery UI
|
1582
|
+
# 'https://bigquery.cloud.google.com' (and the documents can be found at
|
1583
|
+
# https://cloud.google.com/bigquery/bigquery-web-ui and
|
1584
|
+
# https://cloud.google.com/bigquery/docs/working-with-transfers).
|
1585
|
+
#
|
1586
|
+
# @overload enroll_data_sources(request, options = nil)
|
1587
|
+
# Pass arguments to `enroll_data_sources` via a request object, either of type
|
1588
|
+
# {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash.
|
1589
|
+
#
|
1590
|
+
# @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash]
|
1591
|
+
# A request object representing the call parameters. Required. To specify no
|
1592
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1593
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1594
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1595
|
+
#
|
1596
|
+
# @overload enroll_data_sources(name: nil, data_source_ids: nil)
|
1597
|
+
# Pass arguments to `enroll_data_sources` via keyword arguments. Note that at
|
1598
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1599
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1600
|
+
#
|
1601
|
+
# @param name [::String]
|
1602
|
+
# The name of the project resource in the form:
|
1603
|
+
# `projects/{project_id}`
|
1604
|
+
# @param data_source_ids [::Array<::String>]
|
1605
|
+
# Data sources that are enrolled. It is required to provide at least one
|
1606
|
+
# data source id.
|
1607
|
+
#
|
1608
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1609
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1610
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1611
|
+
#
|
1612
|
+
# @return [::Google::Protobuf::Empty]
|
1613
|
+
#
|
1614
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1615
|
+
#
|
1616
|
+
# @example Basic example
|
1617
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
1618
|
+
#
|
1619
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1620
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
1621
|
+
#
|
1622
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1623
|
+
# request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new
|
1624
|
+
#
|
1625
|
+
# # Call the enroll_data_sources method.
|
1626
|
+
# result = client.enroll_data_sources request
|
1627
|
+
#
|
1628
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1629
|
+
# p result
|
1630
|
+
#
|
1631
|
+
def enroll_data_sources request, options = nil
|
1632
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1633
|
+
|
1634
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest
|
1635
|
+
|
1636
|
+
# Converts hash and nil to an options object
|
1637
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1638
|
+
|
1639
|
+
# Customize the options with defaults
|
1640
|
+
metadata = @config.rpcs.enroll_data_sources.metadata.to_h
|
1641
|
+
|
1642
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1643
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1644
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1645
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1646
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1647
|
+
|
1648
|
+
header_params = {}
|
1649
|
+
if request.name
|
1650
|
+
header_params["name"] = request.name
|
1651
|
+
end
|
1652
|
+
|
1653
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1654
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1655
|
+
|
1656
|
+
options.apply_defaults timeout: @config.rpcs.enroll_data_sources.timeout,
|
1657
|
+
metadata: metadata,
|
1658
|
+
retry_policy: @config.rpcs.enroll_data_sources.retry_policy
|
1659
|
+
|
1660
|
+
options.apply_defaults timeout: @config.timeout,
|
1661
|
+
metadata: @config.metadata,
|
1662
|
+
retry_policy: @config.retry_policy
|
1663
|
+
|
1664
|
+
@data_transfer_service_stub.call_rpc :enroll_data_sources, request, options: options do |response, operation|
|
1665
|
+
yield response, operation if block_given?
|
1666
|
+
return response
|
1667
|
+
end
|
1668
|
+
rescue ::GRPC::BadStatus => e
|
1669
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1670
|
+
end
|
1671
|
+
|
1324
1672
|
##
|
1325
1673
|
# Configuration class for the DataTransferService API.
|
1326
1674
|
#
|
@@ -1526,6 +1874,11 @@ module Google
|
|
1526
1874
|
# @return [::Gapic::Config::Method]
|
1527
1875
|
#
|
1528
1876
|
attr_reader :check_valid_creds
|
1877
|
+
##
|
1878
|
+
# RPC-specific configuration for `enroll_data_sources`
|
1879
|
+
# @return [::Gapic::Config::Method]
|
1880
|
+
#
|
1881
|
+
attr_reader :enroll_data_sources
|
1529
1882
|
|
1530
1883
|
# @private
|
1531
1884
|
def initialize parent_rpcs = nil
|
@@ -1557,6 +1910,8 @@ module Google
|
|
1557
1910
|
@list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config
|
1558
1911
|
check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds
|
1559
1912
|
@check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config
|
1913
|
+
enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources
|
1914
|
+
@enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config
|
1560
1915
|
|
1561
1916
|
yield self if block_given?
|
1562
1917
|
end
|