google-cloud-bigquery-data_transfer 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -54
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +301 -0
  6. data/README.md +33 -45
  7. data/lib/{google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/datasource.rb → google-cloud-bigquery-data_transfer.rb} +5 -11
  8. data/lib/google/cloud/bigquery/data_transfer.rb +82 -140
  9. data/lib/google/cloud/bigquery/data_transfer/version.rb +6 -2
  10. metadata +85 -65
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/bigquery/data_transfer/credentials.rb +0 -33
  13. data/lib/google/cloud/bigquery/data_transfer/v1.rb +0 -173
  14. data/lib/google/cloud/bigquery/data_transfer/v1/credentials.rb +0 -43
  15. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_pb.rb +0 -190
  16. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service_client.rb +0 -1230
  17. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service_client_config.json +0 -96
  18. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_services_pb.rb +0 -87
  19. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/data_transfer/v1/data_transfer.rb +0 -500
  20. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/data_transfer/v1/transfer.rb +0 -217
  21. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +0 -570
  22. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/transfer.rb +0 -257
  23. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/any.rb +0 -131
  24. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/duration.rb +0 -91
  25. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/empty.rb +0 -29
  26. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/field_mask.rb +0 -222
  27. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/struct.rb +0 -74
  28. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/timestamp.rb +0 -113
  29. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/wrappers.rb +0 -26
  30. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/rpc/status.rb +0 -39
  31. data/lib/google/cloud/bigquery/data_transfer/v1/transfer_pb.rb +0 -83
  32. data/lib/google/cloud/bigquery/datatransfer/v1/datasource_pb.rb +0 -170
  33. data/lib/google/cloud/bigquery/datatransfer/v1/datasource_services_pb.rb +0 -103
  34. data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb +0 -217
  35. data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +0 -94
  36. data/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb +0 -104
@@ -1,190 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/cloud/bigquery/data_transfer/v1/transfer_pb'
9
- require 'google/protobuf/duration_pb'
10
- require 'google/protobuf/empty_pb'
11
- require 'google/protobuf/field_mask_pb'
12
- require 'google/protobuf/timestamp_pb'
13
- require 'google/protobuf/wrappers_pb'
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_message "google.cloud.bigquery.datatransfer.v1.DataSourceParameter" do
16
- optional :param_id, :string, 1
17
- optional :display_name, :string, 2
18
- optional :description, :string, 3
19
- optional :type, :enum, 4, "google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type"
20
- optional :required, :bool, 5
21
- optional :repeated, :bool, 6
22
- optional :validation_regex, :string, 7
23
- repeated :allowed_values, :string, 8
24
- optional :min_value, :message, 9, "google.protobuf.DoubleValue"
25
- optional :max_value, :message, 10, "google.protobuf.DoubleValue"
26
- repeated :fields, :message, 11, "google.cloud.bigquery.datatransfer.v1.DataSourceParameter"
27
- optional :validation_description, :string, 12
28
- optional :validation_help_url, :string, 13
29
- optional :immutable, :bool, 14
30
- optional :recurse, :bool, 15
31
- end
32
- add_enum "google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type" do
33
- value :TYPE_UNSPECIFIED, 0
34
- value :STRING, 1
35
- value :INTEGER, 2
36
- value :DOUBLE, 3
37
- value :BOOLEAN, 4
38
- value :RECORD, 5
39
- value :PLUS_PAGE, 6
40
- end
41
- add_message "google.cloud.bigquery.datatransfer.v1.DataSource" do
42
- optional :name, :string, 1
43
- optional :data_source_id, :string, 2
44
- optional :display_name, :string, 3
45
- optional :description, :string, 4
46
- optional :client_id, :string, 5
47
- repeated :scopes, :string, 6
48
- optional :transfer_type, :enum, 7, "google.cloud.bigquery.datatransfer.v1.TransferType"
49
- optional :supports_multiple_transfers, :bool, 8
50
- optional :update_deadline_seconds, :int32, 9
51
- optional :default_schedule, :string, 10
52
- optional :supports_custom_schedule, :bool, 11
53
- repeated :parameters, :message, 12, "google.cloud.bigquery.datatransfer.v1.DataSourceParameter"
54
- optional :help_url, :string, 13
55
- optional :authorization_type, :enum, 14, "google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType"
56
- optional :data_refresh_type, :enum, 15, "google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType"
57
- optional :default_data_refresh_window_days, :int32, 16
58
- optional :manual_runs_disabled, :bool, 17
59
- optional :minimum_schedule_interval, :message, 18, "google.protobuf.Duration"
60
- end
61
- add_enum "google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType" do
62
- value :AUTHORIZATION_TYPE_UNSPECIFIED, 0
63
- value :AUTHORIZATION_CODE, 1
64
- value :GOOGLE_PLUS_AUTHORIZATION_CODE, 2
65
- end
66
- add_enum "google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType" do
67
- value :DATA_REFRESH_TYPE_UNSPECIFIED, 0
68
- value :SLIDING_WINDOW, 1
69
- value :CUSTOM_SLIDING_WINDOW, 2
70
- end
71
- add_message "google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest" do
72
- optional :name, :string, 1
73
- end
74
- add_message "google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest" do
75
- optional :parent, :string, 1
76
- optional :page_token, :string, 3
77
- optional :page_size, :int32, 4
78
- end
79
- add_message "google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse" do
80
- repeated :data_sources, :message, 1, "google.cloud.bigquery.datatransfer.v1.DataSource"
81
- optional :next_page_token, :string, 2
82
- end
83
- add_message "google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest" do
84
- optional :parent, :string, 1
85
- optional :transfer_config, :message, 2, "google.cloud.bigquery.datatransfer.v1.TransferConfig"
86
- optional :authorization_code, :string, 3
87
- end
88
- add_message "google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest" do
89
- optional :transfer_config, :message, 1, "google.cloud.bigquery.datatransfer.v1.TransferConfig"
90
- optional :authorization_code, :string, 3
91
- optional :update_mask, :message, 4, "google.protobuf.FieldMask"
92
- end
93
- add_message "google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest" do
94
- optional :name, :string, 1
95
- end
96
- add_message "google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest" do
97
- optional :name, :string, 1
98
- end
99
- add_message "google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest" do
100
- optional :name, :string, 1
101
- end
102
- add_message "google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest" do
103
- optional :name, :string, 1
104
- end
105
- add_message "google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest" do
106
- optional :parent, :string, 1
107
- repeated :data_source_ids, :string, 2
108
- optional :page_token, :string, 3
109
- optional :page_size, :int32, 4
110
- end
111
- add_message "google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse" do
112
- repeated :transfer_configs, :message, 1, "google.cloud.bigquery.datatransfer.v1.TransferConfig"
113
- optional :next_page_token, :string, 2
114
- end
115
- add_message "google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest" do
116
- optional :parent, :string, 1
117
- repeated :states, :enum, 2, "google.cloud.bigquery.datatransfer.v1.TransferState"
118
- optional :page_token, :string, 3
119
- optional :page_size, :int32, 4
120
- optional :run_attempt, :enum, 5, "google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt"
121
- end
122
- add_enum "google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt" do
123
- value :RUN_ATTEMPT_UNSPECIFIED, 0
124
- value :LATEST, 1
125
- end
126
- add_message "google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse" do
127
- repeated :transfer_runs, :message, 1, "google.cloud.bigquery.datatransfer.v1.TransferRun"
128
- optional :next_page_token, :string, 2
129
- end
130
- add_message "google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest" do
131
- optional :parent, :string, 1
132
- optional :page_token, :string, 4
133
- optional :page_size, :int32, 5
134
- repeated :message_types, :enum, 6, "google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity"
135
- end
136
- add_message "google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse" do
137
- repeated :transfer_messages, :message, 1, "google.cloud.bigquery.datatransfer.v1.TransferMessage"
138
- optional :next_page_token, :string, 2
139
- end
140
- add_message "google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest" do
141
- optional :name, :string, 1
142
- end
143
- add_message "google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse" do
144
- optional :has_valid_creds, :bool, 1
145
- end
146
- add_message "google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest" do
147
- optional :parent, :string, 1
148
- optional :start_time, :message, 2, "google.protobuf.Timestamp"
149
- optional :end_time, :message, 3, "google.protobuf.Timestamp"
150
- end
151
- add_message "google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse" do
152
- repeated :runs, :message, 1, "google.cloud.bigquery.datatransfer.v1.TransferRun"
153
- end
154
- end
155
-
156
- module Google
157
- module Cloud
158
- module Bigquery
159
- module DataTransfer
160
- module V1
161
- DataSourceParameter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter").msgclass
162
- DataSourceParameter::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type").enummodule
163
- DataSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource").msgclass
164
- DataSource::AuthorizationType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType").enummodule
165
- DataSource::DataRefreshType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType").enummodule
166
- GetDataSourceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest").msgclass
167
- ListDataSourcesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest").msgclass
168
- ListDataSourcesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse").msgclass
169
- CreateTransferConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest").msgclass
170
- UpdateTransferConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest").msgclass
171
- GetTransferConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest").msgclass
172
- DeleteTransferConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest").msgclass
173
- GetTransferRunRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest").msgclass
174
- DeleteTransferRunRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest").msgclass
175
- ListTransferConfigsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest").msgclass
176
- ListTransferConfigsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse").msgclass
177
- ListTransferRunsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest").msgclass
178
- ListTransferRunsRequest::RunAttempt = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt").enummodule
179
- ListTransferRunsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse").msgclass
180
- ListTransferLogsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest").msgclass
181
- ListTransferLogsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse").msgclass
182
- CheckValidCredsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest").msgclass
183
- CheckValidCredsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse").msgclass
184
- ScheduleTransferRunsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest").msgclass
185
- ScheduleTransferRunsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse").msgclass
186
- end
187
- end
188
- end
189
- end
190
- end
@@ -1,1230 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- #
15
- # EDITING INSTRUCTIONS
16
- # This file was generated from the file
17
- # https://github.com/googleapis/googleapis/blob/master/google/cloud/bigquery/datatransfer/v1/datatransfer.proto,
18
- # and updates to that file get reflected here through a refresh process.
19
- # For the short term, the refresh process will only be runnable by Google
20
- # engineers.
21
-
22
-
23
- require "json"
24
- require "pathname"
25
-
26
- require "google/gax"
27
-
28
- require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb"
29
- require "google/cloud/bigquery/data_transfer/v1/credentials"
30
- require "google/cloud/bigquery/data_transfer/version"
31
-
32
- module Google
33
- module Cloud
34
- module Bigquery
35
- module DataTransfer
36
- module V1
37
- # The Google BigQuery Data Transfer Service API enables BigQuery users to
38
- # configure the transfer of their data from other Google Products into
39
- # BigQuery. This service contains methods that are end user exposed. It backs
40
- # up the frontend.
41
- #
42
- # @!attribute [r] data_transfer_service_stub
43
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Stub]
44
- class DataTransferServiceClient
45
- # @private
46
- attr_reader :data_transfer_service_stub
47
-
48
- # The default address of the service.
49
- SERVICE_ADDRESS = "bigquerydatatransfer.googleapis.com".freeze
50
-
51
- # The default port of the service.
52
- DEFAULT_SERVICE_PORT = 443
53
-
54
- # The default set of gRPC interceptors.
55
- GRPC_INTERCEPTORS = []
56
-
57
- DEFAULT_TIMEOUT = 30
58
-
59
- PAGE_DESCRIPTORS = {
60
- "list_data_sources" => Google::Gax::PageDescriptor.new(
61
- "page_token",
62
- "next_page_token",
63
- "data_sources"),
64
- "list_transfer_configs" => Google::Gax::PageDescriptor.new(
65
- "page_token",
66
- "next_page_token",
67
- "transfer_configs"),
68
- "list_transfer_runs" => Google::Gax::PageDescriptor.new(
69
- "page_token",
70
- "next_page_token",
71
- "transfer_runs"),
72
- "list_transfer_logs" => Google::Gax::PageDescriptor.new(
73
- "page_token",
74
- "next_page_token",
75
- "transfer_messages")
76
- }.freeze
77
-
78
- private_constant :PAGE_DESCRIPTORS
79
-
80
- # The scopes needed to make gRPC calls to all of the methods defined in
81
- # this service.
82
- ALL_SCOPES = [
83
- "https://www.googleapis.com/auth/cloud-platform"
84
- ].freeze
85
-
86
-
87
- DATA_SOURCE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
88
- "projects/{project}/dataSources/{data_source}"
89
- )
90
-
91
- private_constant :DATA_SOURCE_PATH_TEMPLATE
92
-
93
- LOCATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
94
- "projects/{project}/locations/{location}"
95
- )
96
-
97
- private_constant :LOCATION_PATH_TEMPLATE
98
-
99
- LOCATION_DATA_SOURCE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
100
- "projects/{project}/locations/{location}/dataSources/{data_source}"
101
- )
102
-
103
- private_constant :LOCATION_DATA_SOURCE_PATH_TEMPLATE
104
-
105
- LOCATION_RUN_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
106
- "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}"
107
- )
108
-
109
- private_constant :LOCATION_RUN_PATH_TEMPLATE
110
-
111
- LOCATION_TRANSFER_CONFIG_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
112
- "projects/{project}/locations/{location}/transferConfigs/{transfer_config}"
113
- )
114
-
115
- private_constant :LOCATION_TRANSFER_CONFIG_PATH_TEMPLATE
116
-
117
- PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
118
- "projects/{project}"
119
- )
120
-
121
- private_constant :PROJECT_PATH_TEMPLATE
122
-
123
- PROJECT_DATA_SOURCE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
124
- "projects/{project}/dataSources/{data_source}"
125
- )
126
-
127
- private_constant :PROJECT_DATA_SOURCE_PATH_TEMPLATE
128
-
129
- PROJECT_RUN_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
130
- "projects/{project}/transferConfigs/{transfer_config}/runs/{run}"
131
- )
132
-
133
- private_constant :PROJECT_RUN_PATH_TEMPLATE
134
-
135
- PROJECT_TRANSFER_CONFIG_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
136
- "projects/{project}/transferConfigs/{transfer_config}"
137
- )
138
-
139
- private_constant :PROJECT_TRANSFER_CONFIG_PATH_TEMPLATE
140
-
141
- RUN_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
142
- "projects/{project}/transferConfigs/{transfer_config}/runs/{run}"
143
- )
144
-
145
- private_constant :RUN_PATH_TEMPLATE
146
-
147
- TRANSFER_CONFIG_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
148
- "projects/{project}/transferConfigs/{transfer_config}"
149
- )
150
-
151
- private_constant :TRANSFER_CONFIG_PATH_TEMPLATE
152
-
153
- # Returns a fully-qualified data_source resource name string.
154
- # @param project [String]
155
- # @param data_source [String]
156
- # @return [String]
157
- def self.data_source_path project, data_source
158
- DATA_SOURCE_PATH_TEMPLATE.render(
159
- :"project" => project,
160
- :"data_source" => data_source
161
- )
162
- end
163
-
164
- # Returns a fully-qualified location resource name string.
165
- # @param project [String]
166
- # @param location [String]
167
- # @return [String]
168
- def self.location_path project, location
169
- LOCATION_PATH_TEMPLATE.render(
170
- :"project" => project,
171
- :"location" => location
172
- )
173
- end
174
-
175
- # Returns a fully-qualified location_data_source resource name string.
176
- # @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
177
- # This helper function will be deleted in the next major version.
178
- # @param project [String]
179
- # @param location [String]
180
- # @param data_source [String]
181
- # @return [String]
182
- def self.location_data_source_path project, location, data_source
183
- LOCATION_DATA_SOURCE_PATH_TEMPLATE.render(
184
- :"project" => project,
185
- :"location" => location,
186
- :"data_source" => data_source
187
- )
188
- end
189
-
190
- # Returns a fully-qualified location_run resource name string.
191
- # @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
192
- # This helper function will be deleted in the next major version.
193
- # @param project [String]
194
- # @param location [String]
195
- # @param transfer_config [String]
196
- # @param run [String]
197
- # @return [String]
198
- def self.location_run_path project, location, transfer_config, run
199
- LOCATION_RUN_PATH_TEMPLATE.render(
200
- :"project" => project,
201
- :"location" => location,
202
- :"transfer_config" => transfer_config,
203
- :"run" => run
204
- )
205
- end
206
-
207
- # Returns a fully-qualified location_transfer_config resource name string.
208
- # @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
209
- # This helper function will be deleted in the next major version.
210
- # @param project [String]
211
- # @param location [String]
212
- # @param transfer_config [String]
213
- # @return [String]
214
- def self.location_transfer_config_path project, location, transfer_config
215
- LOCATION_TRANSFER_CONFIG_PATH_TEMPLATE.render(
216
- :"project" => project,
217
- :"location" => location,
218
- :"transfer_config" => transfer_config
219
- )
220
- end
221
-
222
- # Returns a fully-qualified project resource name string.
223
- # @param project [String]
224
- # @return [String]
225
- def self.project_path project
226
- PROJECT_PATH_TEMPLATE.render(
227
- :"project" => project
228
- )
229
- end
230
-
231
- # Returns a fully-qualified project_data_source resource name string.
232
- # @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
233
- # This helper function will be deleted in the next major version.
234
- # @param project [String]
235
- # @param data_source [String]
236
- # @return [String]
237
- def self.project_data_source_path project, data_source
238
- PROJECT_DATA_SOURCE_PATH_TEMPLATE.render(
239
- :"project" => project,
240
- :"data_source" => data_source
241
- )
242
- end
243
-
244
- # Returns a fully-qualified project_run resource name string.
245
- # @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
246
- # This helper function will be deleted in the next major version.
247
- # @param project [String]
248
- # @param transfer_config [String]
249
- # @param run [String]
250
- # @return [String]
251
- def self.project_run_path project, transfer_config, run
252
- PROJECT_RUN_PATH_TEMPLATE.render(
253
- :"project" => project,
254
- :"transfer_config" => transfer_config,
255
- :"run" => run
256
- )
257
- end
258
-
259
- # Returns a fully-qualified project_transfer_config resource name string.
260
- # @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
261
- # This helper function will be deleted in the next major version.
262
- # @param project [String]
263
- # @param transfer_config [String]
264
- # @return [String]
265
- def self.project_transfer_config_path project, transfer_config
266
- PROJECT_TRANSFER_CONFIG_PATH_TEMPLATE.render(
267
- :"project" => project,
268
- :"transfer_config" => transfer_config
269
- )
270
- end
271
-
272
- # Returns a fully-qualified run resource name string.
273
- # @param project [String]
274
- # @param transfer_config [String]
275
- # @param run [String]
276
- # @return [String]
277
- def self.run_path project, transfer_config, run
278
- RUN_PATH_TEMPLATE.render(
279
- :"project" => project,
280
- :"transfer_config" => transfer_config,
281
- :"run" => run
282
- )
283
- end
284
-
285
- # Returns a fully-qualified transfer_config resource name string.
286
- # @param project [String]
287
- # @param transfer_config [String]
288
- # @return [String]
289
- def self.transfer_config_path project, transfer_config
290
- TRANSFER_CONFIG_PATH_TEMPLATE.render(
291
- :"project" => project,
292
- :"transfer_config" => transfer_config
293
- )
294
- end
295
-
296
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
297
- # Provides the means for authenticating requests made by the client. This parameter can
298
- # be many types.
299
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
300
- # authenticating requests made by this client.
301
- # A `String` will be treated as the path to the keyfile to be used for the construction of
302
- # credentials for this client.
303
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
304
- # credentials for this client.
305
- # A `GRPC::Core::Channel` will be used to make calls through.
306
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
307
- # should already be composed with a `GRPC::Core::CallCredentials` object.
308
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
309
- # metadata for requests, generally, to give OAuth credentials.
310
- # @param scopes [Array<String>]
311
- # The OAuth scopes for this service. This parameter is ignored if
312
- # an updater_proc is supplied.
313
- # @param client_config [Hash]
314
- # A Hash for call options for each method. See
315
- # Google::Gax#construct_settings for the structure of
316
- # this data. Falls back to the default config if not specified
317
- # or the specified config is missing data points.
318
- # @param timeout [Numeric]
319
- # The default timeout, in seconds, for calls made through this client.
320
- # @param metadata [Hash]
321
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
322
- # @param service_address [String]
323
- # Override for the service hostname, or `nil` to leave as the default.
324
- # @param service_port [Integer]
325
- # Override for the service port, or `nil` to leave as the default.
326
- # @param exception_transformer [Proc]
327
- # An optional proc that intercepts any exceptions raised during an API call to inject
328
- # custom error handling.
329
- def initialize \
330
- credentials: nil,
331
- scopes: ALL_SCOPES,
332
- client_config: {},
333
- timeout: DEFAULT_TIMEOUT,
334
- metadata: nil,
335
- service_address: nil,
336
- service_port: nil,
337
- exception_transformer: nil,
338
- lib_name: nil,
339
- lib_version: ""
340
- # These require statements are intentionally placed here to initialize
341
- # the gRPC module only when it's required.
342
- # See https://github.com/googleapis/toolkit/issues/446
343
- require "google/gax/grpc"
344
- require "google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb"
345
-
346
- credentials ||= Google::Cloud::Bigquery::DataTransfer::V1::Credentials.default
347
-
348
- if credentials.is_a?(String) || credentials.is_a?(Hash)
349
- updater_proc = Google::Cloud::Bigquery::DataTransfer::V1::Credentials.new(credentials).updater_proc
350
- end
351
- if credentials.is_a?(GRPC::Core::Channel)
352
- channel = credentials
353
- end
354
- if credentials.is_a?(GRPC::Core::ChannelCredentials)
355
- chan_creds = credentials
356
- end
357
- if credentials.is_a?(Proc)
358
- updater_proc = credentials
359
- end
360
- if credentials.is_a?(Google::Auth::Credentials)
361
- updater_proc = credentials.updater_proc
362
- end
363
-
364
- package_version = Google::Cloud::Bigquery::DataTransfer::VERSION
365
-
366
- google_api_client = "gl-ruby/#{RUBY_VERSION}"
367
- google_api_client << " #{lib_name}/#{lib_version}" if lib_name
368
- google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
369
- google_api_client << " grpc/#{GRPC::VERSION}"
370
- google_api_client.freeze
371
-
372
- headers = { :"x-goog-api-client" => google_api_client }
373
- if credentials.respond_to?(:quota_project_id) && credentials.quota_project_id
374
- headers[:"x-goog-user-project"] = credentials.quota_project_id
375
- end
376
- headers.merge!(metadata) unless metadata.nil?
377
- client_config_file = Pathname.new(__dir__).join(
378
- "data_transfer_service_client_config.json"
379
- )
380
- defaults = client_config_file.open do |f|
381
- Google::Gax.construct_settings(
382
- "google.cloud.bigquery.datatransfer.v1.DataTransferService",
383
- JSON.parse(f.read),
384
- client_config,
385
- Google::Gax::Grpc::STATUS_CODE_NAMES,
386
- timeout,
387
- page_descriptors: PAGE_DESCRIPTORS,
388
- errors: Google::Gax::Grpc::API_ERRORS,
389
- metadata: headers
390
- )
391
- end
392
-
393
- # Allow overriding the service path/port in subclasses.
394
- service_path = service_address || self.class::SERVICE_ADDRESS
395
- port = service_port || self.class::DEFAULT_SERVICE_PORT
396
- interceptors = self.class::GRPC_INTERCEPTORS
397
- @data_transfer_service_stub = Google::Gax::Grpc.create_stub(
398
- service_path,
399
- port,
400
- chan_creds: chan_creds,
401
- channel: channel,
402
- updater_proc: updater_proc,
403
- scopes: scopes,
404
- interceptors: interceptors,
405
- &Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Stub.method(:new)
406
- )
407
-
408
- @get_data_source = Google::Gax.create_api_call(
409
- @data_transfer_service_stub.method(:get_data_source),
410
- defaults["get_data_source"],
411
- exception_transformer: exception_transformer,
412
- params_extractor: proc do |request|
413
- {'name' => request.name}
414
- end
415
- )
416
- @list_data_sources = Google::Gax.create_api_call(
417
- @data_transfer_service_stub.method(:list_data_sources),
418
- defaults["list_data_sources"],
419
- exception_transformer: exception_transformer,
420
- params_extractor: proc do |request|
421
- {'parent' => request.parent}
422
- end
423
- )
424
- @create_transfer_config = Google::Gax.create_api_call(
425
- @data_transfer_service_stub.method(:create_transfer_config),
426
- defaults["create_transfer_config"],
427
- exception_transformer: exception_transformer,
428
- params_extractor: proc do |request|
429
- {'parent' => request.parent}
430
- end
431
- )
432
- @update_transfer_config = Google::Gax.create_api_call(
433
- @data_transfer_service_stub.method(:update_transfer_config),
434
- defaults["update_transfer_config"],
435
- exception_transformer: exception_transformer,
436
- params_extractor: proc do |request|
437
- {'transfer_config.name' => request.transfer_config.name}
438
- end
439
- )
440
- @delete_transfer_config = Google::Gax.create_api_call(
441
- @data_transfer_service_stub.method(:delete_transfer_config),
442
- defaults["delete_transfer_config"],
443
- exception_transformer: exception_transformer,
444
- params_extractor: proc do |request|
445
- {'name' => request.name}
446
- end
447
- )
448
- @get_transfer_config = Google::Gax.create_api_call(
449
- @data_transfer_service_stub.method(:get_transfer_config),
450
- defaults["get_transfer_config"],
451
- exception_transformer: exception_transformer,
452
- params_extractor: proc do |request|
453
- {'name' => request.name}
454
- end
455
- )
456
- @list_transfer_configs = Google::Gax.create_api_call(
457
- @data_transfer_service_stub.method(:list_transfer_configs),
458
- defaults["list_transfer_configs"],
459
- exception_transformer: exception_transformer,
460
- params_extractor: proc do |request|
461
- {'parent' => request.parent}
462
- end
463
- )
464
- @schedule_transfer_runs = Google::Gax.create_api_call(
465
- @data_transfer_service_stub.method(:schedule_transfer_runs),
466
- defaults["schedule_transfer_runs"],
467
- exception_transformer: exception_transformer,
468
- params_extractor: proc do |request|
469
- {'parent' => request.parent}
470
- end
471
- )
472
- @start_manual_transfer_runs = Google::Gax.create_api_call(
473
- @data_transfer_service_stub.method(:start_manual_transfer_runs),
474
- defaults["start_manual_transfer_runs"],
475
- exception_transformer: exception_transformer,
476
- params_extractor: proc do |request|
477
- {'parent' => request.parent}
478
- end
479
- )
480
- @get_transfer_run = Google::Gax.create_api_call(
481
- @data_transfer_service_stub.method(:get_transfer_run),
482
- defaults["get_transfer_run"],
483
- exception_transformer: exception_transformer,
484
- params_extractor: proc do |request|
485
- {'name' => request.name}
486
- end
487
- )
488
- @delete_transfer_run = Google::Gax.create_api_call(
489
- @data_transfer_service_stub.method(:delete_transfer_run),
490
- defaults["delete_transfer_run"],
491
- exception_transformer: exception_transformer,
492
- params_extractor: proc do |request|
493
- {'name' => request.name}
494
- end
495
- )
496
- @list_transfer_runs = Google::Gax.create_api_call(
497
- @data_transfer_service_stub.method(:list_transfer_runs),
498
- defaults["list_transfer_runs"],
499
- exception_transformer: exception_transformer,
500
- params_extractor: proc do |request|
501
- {'parent' => request.parent}
502
- end
503
- )
504
- @list_transfer_logs = Google::Gax.create_api_call(
505
- @data_transfer_service_stub.method(:list_transfer_logs),
506
- defaults["list_transfer_logs"],
507
- exception_transformer: exception_transformer,
508
- params_extractor: proc do |request|
509
- {'parent' => request.parent}
510
- end
511
- )
512
- @check_valid_creds = Google::Gax.create_api_call(
513
- @data_transfer_service_stub.method(:check_valid_creds),
514
- defaults["check_valid_creds"],
515
- exception_transformer: exception_transformer,
516
- params_extractor: proc do |request|
517
- {'name' => request.name}
518
- end
519
- )
520
- end
521
-
522
- # Service calls
523
-
524
- # Retrieves a supported data source and returns its settings,
525
- # which can be used for UI rendering.
526
- #
527
- # @param name [String]
528
- # Required. The field will contain name of the resource requested, for example:
529
- # `projects/{project_id}/dataSources/{data_source_id}` or
530
- # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
531
- # @param options [Google::Gax::CallOptions]
532
- # Overrides the default settings for this call, e.g, timeout,
533
- # retries, etc.
534
- # @yield [result, operation] Access the result along with the RPC operation
535
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::DataSource]
536
- # @yieldparam operation [GRPC::ActiveCall::Operation]
537
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSource]
538
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
539
- # @example
540
- # require "google/cloud/bigquery/data_transfer"
541
- #
542
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
543
- # formatted_name = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_data_source_path("[PROJECT]", "[DATA_SOURCE]")
544
- # response = data_transfer_client.get_data_source(formatted_name)
545
-
546
- def get_data_source \
547
- name,
548
- options: nil,
549
- &block
550
- req = {
551
- name: name
552
- }.delete_if { |_, v| v.nil? }
553
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest)
554
- @get_data_source.call(req, options, &block)
555
- end
556
-
557
- # Lists supported data sources and returns their settings,
558
- # which can be used for UI rendering.
559
- #
560
- # @param parent [String]
561
- # Required. The BigQuery project id for which data sources should be returned.
562
- # Must be in the form: `projects/{project_id}` or
563
- # `projects/{project_id}/locations/{location_id}
564
- # @param page_size [Integer]
565
- # The maximum number of resources contained in the underlying API
566
- # response. If page streaming is performed per-resource, this
567
- # parameter does not affect the return value. If page streaming is
568
- # performed per-page, this determines the maximum number of
569
- # resources in a page.
570
- # @param options [Google::Gax::CallOptions]
571
- # Overrides the default settings for this call, e.g, timeout,
572
- # retries, etc.
573
- # @yield [result, operation] Access the result along with the RPC operation
574
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::DataSource>]
575
- # @yieldparam operation [GRPC::ActiveCall::Operation]
576
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::DataSource>]
577
- # An enumerable of Google::Cloud::Bigquery::DataTransfer::V1::DataSource instances.
578
- # See Google::Gax::PagedEnumerable documentation for other
579
- # operations such as per-page iteration or access to the response
580
- # object.
581
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
582
- # @example
583
- # require "google/cloud/bigquery/data_transfer"
584
- #
585
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
586
- # formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_path("[PROJECT]")
587
- #
588
- # # Iterate over all results.
589
- # data_transfer_client.list_data_sources(formatted_parent).each do |element|
590
- # # Process element.
591
- # end
592
- #
593
- # # Or iterate over results one page at a time.
594
- # data_transfer_client.list_data_sources(formatted_parent).each_page do |page|
595
- # # Process each page at a time.
596
- # page.each do |element|
597
- # # Process element.
598
- # end
599
- # end
600
-
601
- def list_data_sources \
602
- parent,
603
- page_size: nil,
604
- options: nil,
605
- &block
606
- req = {
607
- parent: parent,
608
- page_size: page_size
609
- }.delete_if { |_, v| v.nil? }
610
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest)
611
- @list_data_sources.call(req, options, &block)
612
- end
613
-
614
- # Creates a new data transfer configuration.
615
- #
616
- # @param parent [String]
617
- # Required. The BigQuery project id where the transfer configuration should be created.
618
- # Must be in the format projects/\\{project_id}/locations/\\{location_id} or
619
- # projects/\\{project_id}. If specified location and location of the
620
- # destination bigquery dataset do not match - the request will fail.
621
- # @param transfer_config [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig | Hash]
622
- # Required. Data transfer configuration to create.
623
- # A hash of the same form as `Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig`
624
- # can also be provided.
625
- # @param authorization_code [String]
626
- # Optional OAuth2 authorization code to use with this transfer configuration.
627
- # This is required if new credentials are needed, as indicated by
628
- # `CheckValidCreds`.
629
- # In order to obtain authorization_code, please make a
630
- # request to
631
- # https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
632
- #
633
- # * client_id should be OAuth client_id of BigQuery DTS API for the given
634
- # data source returned by ListDataSources method.
635
- # * data_source_scopes are the scopes returned by ListDataSources method.
636
- # * redirect_uri is an optional parameter. If not specified, then
637
- # authorization code is posted to the opener of authorization flow window.
638
- # Otherwise it will be sent to the redirect uri. A special value of
639
- # urn:ietf:wg:oauth:2.0:oob means that authorization code should be
640
- # returned in the title bar of the browser, with the page text prompting
641
- # the user to copy the code and paste it in the application.
642
- # @param version_info [String]
643
- # Optional version info. If users want to find a very recent access token,
644
- # that is, immediately after approving access, users have to set the
645
- # version_info claim in the token request. To obtain the version_info, users
646
- # must use the "none+gsession" response type. which be return a
647
- # version_info back in the authorization response which be be put in a JWT
648
- # claim in the token request.
649
- # @param service_account_name [String]
650
- # Optional service account name. If this field is set, transfer config will
651
- # be created with this service account credentials. It requires that
652
- # requesting user calling this API has permissions to act as this service
653
- # account.
654
- # @param options [Google::Gax::CallOptions]
655
- # Overrides the default settings for this call, e.g, timeout,
656
- # retries, etc.
657
- # @yield [result, operation] Access the result along with the RPC operation
658
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
659
- # @yieldparam operation [GRPC::ActiveCall::Operation]
660
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
661
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
662
- # @example
663
- # require "google/cloud/bigquery/data_transfer"
664
- #
665
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
666
- # formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_path("[PROJECT]")
667
- #
668
- # # TODO: Initialize `transfer_config`:
669
- # transfer_config = {}
670
- # response = data_transfer_client.create_transfer_config(formatted_parent, transfer_config)
671
-
672
- def create_transfer_config \
673
- parent,
674
- transfer_config,
675
- authorization_code: nil,
676
- version_info: nil,
677
- service_account_name: nil,
678
- options: nil,
679
- &block
680
- req = {
681
- parent: parent,
682
- transfer_config: transfer_config,
683
- authorization_code: authorization_code,
684
- version_info: version_info,
685
- service_account_name: service_account_name
686
- }.delete_if { |_, v| v.nil? }
687
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest)
688
- @create_transfer_config.call(req, options, &block)
689
- end
690
-
691
- # Updates a data transfer configuration.
692
- # All fields must be set, even if they are not updated.
693
- #
694
- # @param transfer_config [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig | Hash]
695
- # Required. Data transfer configuration to create.
696
- # A hash of the same form as `Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig`
697
- # can also be provided.
698
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
699
- # Required. Required list of fields to be updated in this request.
700
- # A hash of the same form as `Google::Protobuf::FieldMask`
701
- # can also be provided.
702
- # @param authorization_code [String]
703
- # Optional OAuth2 authorization code to use with this transfer configuration.
704
- # If it is provided, the transfer configuration will be associated with the
705
- # authorizing user.
706
- # In order to obtain authorization_code, please make a
707
- # request to
708
- # https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
709
- #
710
- # * client_id should be OAuth client_id of BigQuery DTS API for the given
711
- # data source returned by ListDataSources method.
712
- # * data_source_scopes are the scopes returned by ListDataSources method.
713
- # * redirect_uri is an optional parameter. If not specified, then
714
- # authorization code is posted to the opener of authorization flow window.
715
- # Otherwise it will be sent to the redirect uri. A special value of
716
- # urn:ietf:wg:oauth:2.0:oob means that authorization code should be
717
- # returned in the title bar of the browser, with the page text prompting
718
- # the user to copy the code and paste it in the application.
719
- # @param version_info [String]
720
- # Optional version info. If users want to find a very recent access token,
721
- # that is, immediately after approving access, users have to set the
722
- # version_info claim in the token request. To obtain the version_info, users
723
- # must use the "none+gsession" response type. which be return a
724
- # version_info back in the authorization response which be be put in a JWT
725
- # claim in the token request.
726
- # @param service_account_name [String]
727
- # Optional service account name. If this field is set and
728
- # "service_account_name" is set in update_mask, transfer config will be
729
- # updated to use this service account credentials. It requires that
730
- # requesting user calling this API has permissions to act as this service
731
- # account.
732
- # @param options [Google::Gax::CallOptions]
733
- # Overrides the default settings for this call, e.g, timeout,
734
- # retries, etc.
735
- # @yield [result, operation] Access the result along with the RPC operation
736
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
737
- # @yieldparam operation [GRPC::ActiveCall::Operation]
738
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
739
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
740
- # @example
741
- # require "google/cloud/bigquery/data_transfer"
742
- #
743
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
744
- #
745
- # # TODO: Initialize `transfer_config`:
746
- # transfer_config = {}
747
- #
748
- # # TODO: Initialize `update_mask`:
749
- # update_mask = {}
750
- # response = data_transfer_client.update_transfer_config(transfer_config, update_mask)
751
-
752
- def update_transfer_config \
753
- transfer_config,
754
- update_mask,
755
- authorization_code: nil,
756
- version_info: nil,
757
- service_account_name: nil,
758
- options: nil,
759
- &block
760
- req = {
761
- transfer_config: transfer_config,
762
- update_mask: update_mask,
763
- authorization_code: authorization_code,
764
- version_info: version_info,
765
- service_account_name: service_account_name
766
- }.delete_if { |_, v| v.nil? }
767
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest)
768
- @update_transfer_config.call(req, options, &block)
769
- end
770
-
771
- # Deletes a data transfer configuration,
772
- # including any associated transfer runs and logs.
773
- #
774
- # @param name [String]
775
- # Required. The field will contain name of the resource requested, for example:
776
- # `projects/{project_id}/transferConfigs/{config_id}` or
777
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
778
- # @param options [Google::Gax::CallOptions]
779
- # Overrides the default settings for this call, e.g, timeout,
780
- # retries, etc.
781
- # @yield [result, operation] Access the result along with the RPC operation
782
- # @yieldparam result []
783
- # @yieldparam operation [GRPC::ActiveCall::Operation]
784
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
785
- # @example
786
- # require "google/cloud/bigquery/data_transfer"
787
- #
788
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
789
- # formatted_name = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_transfer_config_path("[PROJECT]", "[TRANSFER_CONFIG]")
790
- # data_transfer_client.delete_transfer_config(formatted_name)
791
-
792
- def delete_transfer_config \
793
- name,
794
- options: nil,
795
- &block
796
- req = {
797
- name: name
798
- }.delete_if { |_, v| v.nil? }
799
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest)
800
- @delete_transfer_config.call(req, options, &block)
801
- nil
802
- end
803
-
804
- # Returns information about a data transfer config.
805
- #
806
- # @param name [String]
807
- # Required. The field will contain name of the resource requested, for example:
808
- # `projects/{project_id}/transferConfigs/{config_id}` or
809
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
810
- # @param options [Google::Gax::CallOptions]
811
- # Overrides the default settings for this call, e.g, timeout,
812
- # retries, etc.
813
- # @yield [result, operation] Access the result along with the RPC operation
814
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
815
- # @yieldparam operation [GRPC::ActiveCall::Operation]
816
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
817
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
818
- # @example
819
- # require "google/cloud/bigquery/data_transfer"
820
- #
821
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
822
- # formatted_name = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_transfer_config_path("[PROJECT]", "[TRANSFER_CONFIG]")
823
- # response = data_transfer_client.get_transfer_config(formatted_name)
824
-
825
- def get_transfer_config \
826
- name,
827
- options: nil,
828
- &block
829
- req = {
830
- name: name
831
- }.delete_if { |_, v| v.nil? }
832
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest)
833
- @get_transfer_config.call(req, options, &block)
834
- end
835
-
836
- # Returns information about all data transfers in the project.
837
- #
838
- # @param parent [String]
839
- # Required. The BigQuery project id for which data sources
840
- # should be returned: `projects/{project_id}` or
841
- # `projects/{project_id}/locations/{location_id}`
842
- # @param data_source_ids [Array<String>]
843
- # When specified, only configurations of requested data sources are returned.
844
- # @param page_size [Integer]
845
- # The maximum number of resources contained in the underlying API
846
- # response. If page streaming is performed per-resource, this
847
- # parameter does not affect the return value. If page streaming is
848
- # performed per-page, this determines the maximum number of
849
- # resources in a page.
850
- # @param options [Google::Gax::CallOptions]
851
- # Overrides the default settings for this call, e.g, timeout,
852
- # retries, etc.
853
- # @yield [result, operation] Access the result along with the RPC operation
854
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>]
855
- # @yieldparam operation [GRPC::ActiveCall::Operation]
856
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>]
857
- # An enumerable of Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig instances.
858
- # See Google::Gax::PagedEnumerable documentation for other
859
- # operations such as per-page iteration or access to the response
860
- # object.
861
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
862
- # @example
863
- # require "google/cloud/bigquery/data_transfer"
864
- #
865
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
866
- # formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_path("[PROJECT]")
867
- #
868
- # # Iterate over all results.
869
- # data_transfer_client.list_transfer_configs(formatted_parent).each do |element|
870
- # # Process element.
871
- # end
872
- #
873
- # # Or iterate over results one page at a time.
874
- # data_transfer_client.list_transfer_configs(formatted_parent).each_page do |page|
875
- # # Process each page at a time.
876
- # page.each do |element|
877
- # # Process element.
878
- # end
879
- # end
880
-
881
- def list_transfer_configs \
882
- parent,
883
- data_source_ids: nil,
884
- page_size: nil,
885
- options: nil,
886
- &block
887
- req = {
888
- parent: parent,
889
- data_source_ids: data_source_ids,
890
- page_size: page_size
891
- }.delete_if { |_, v| v.nil? }
892
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest)
893
- @list_transfer_configs.call(req, options, &block)
894
- end
895
-
896
- # Creates transfer runs for a time range [start_time, end_time].
897
- # For each date - or whatever granularity the data source supports - in the
898
- # range, one transfer run is created.
899
- # Note that runs are created per UTC time in the time range.
900
- # DEPRECATED: use StartManualTransferRuns instead.
901
- #
902
- # @param parent [String]
903
- # Required. Transfer configuration name in the form:
904
- # `projects/{project_id}/transferConfigs/{config_id}` or
905
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
906
- # @param start_time [Google::Protobuf::Timestamp | Hash]
907
- # Required. Start time of the range of transfer runs. For example,
908
- # `"2017-05-25T00:00:00+00:00"`.
909
- # A hash of the same form as `Google::Protobuf::Timestamp`
910
- # can also be provided.
911
- # @param end_time [Google::Protobuf::Timestamp | Hash]
912
- # Required. End time of the range of transfer runs. For example,
913
- # `"2017-05-30T00:00:00+00:00"`.
914
- # A hash of the same form as `Google::Protobuf::Timestamp`
915
- # can also be provided.
916
- # @param options [Google::Gax::CallOptions]
917
- # Overrides the default settings for this call, e.g, timeout,
918
- # retries, etc.
919
- # @yield [result, operation] Access the result along with the RPC operation
920
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse]
921
- # @yieldparam operation [GRPC::ActiveCall::Operation]
922
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse]
923
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
924
- # @example
925
- # require "google/cloud/bigquery/data_transfer"
926
- #
927
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
928
- # formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_transfer_config_path("[PROJECT]", "[TRANSFER_CONFIG]")
929
- #
930
- # # TODO: Initialize `start_time`:
931
- # start_time = {}
932
- #
933
- # # TODO: Initialize `end_time`:
934
- # end_time = {}
935
- # response = data_transfer_client.schedule_transfer_runs(formatted_parent, start_time, end_time)
936
-
937
- def schedule_transfer_runs \
938
- parent,
939
- start_time,
940
- end_time,
941
- options: nil,
942
- &block
943
- req = {
944
- parent: parent,
945
- start_time: start_time,
946
- end_time: end_time
947
- }.delete_if { |_, v| v.nil? }
948
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest)
949
- @schedule_transfer_runs.call(req, options, &block)
950
- end
951
-
952
- # Start manual transfer runs to be executed now with schedule_time equal to
953
- # current time. The transfer runs can be created for a time range where the
954
- # run_time is between start_time (inclusive) and end_time (exclusive), or for
955
- # a specific run_time.
956
- #
957
- # @param parent [String]
958
- # Transfer configuration name in the form:
959
- # `projects/{project_id}/transferConfigs/{config_id}` or
960
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
961
- # @param requested_time_range [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange | Hash]
962
- # Time range for the transfer runs that should be started.
963
- # A hash of the same form as `Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange`
964
- # can also be provided.
965
- # @param requested_run_time [Google::Protobuf::Timestamp | Hash]
966
- # Specific run_time for a transfer run to be started. The
967
- # requested_run_time must not be in the future.
968
- # A hash of the same form as `Google::Protobuf::Timestamp`
969
- # can also be provided.
970
- # @param options [Google::Gax::CallOptions]
971
- # Overrides the default settings for this call, e.g, timeout,
972
- # retries, etc.
973
- # @yield [result, operation] Access the result along with the RPC operation
974
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse]
975
- # @yieldparam operation [GRPC::ActiveCall::Operation]
976
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse]
977
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
978
- # @example
979
- # require "google/cloud/bigquery/data_transfer"
980
- #
981
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
982
- # response = data_transfer_client.start_manual_transfer_runs
983
-
984
- def start_manual_transfer_runs \
985
- parent: nil,
986
- requested_time_range: nil,
987
- requested_run_time: nil,
988
- options: nil,
989
- &block
990
- req = {
991
- parent: parent,
992
- requested_time_range: requested_time_range,
993
- requested_run_time: requested_run_time
994
- }.delete_if { |_, v| v.nil? }
995
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest)
996
- @start_manual_transfer_runs.call(req, options, &block)
997
- end
998
-
999
- # Returns information about the particular transfer run.
1000
- #
1001
- # @param name [String]
1002
- # Required. The field will contain name of the resource requested, for example:
1003
- # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
1004
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
1005
- # @param options [Google::Gax::CallOptions]
1006
- # Overrides the default settings for this call, e.g, timeout,
1007
- # retries, etc.
1008
- # @yield [result, operation] Access the result along with the RPC operation
1009
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::TransferRun]
1010
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1011
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferRun]
1012
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
1013
- # @example
1014
- # require "google/cloud/bigquery/data_transfer"
1015
- #
1016
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
1017
- # formatted_name = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_run_path("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
1018
- # response = data_transfer_client.get_transfer_run(formatted_name)
1019
-
1020
- def get_transfer_run \
1021
- name,
1022
- options: nil,
1023
- &block
1024
- req = {
1025
- name: name
1026
- }.delete_if { |_, v| v.nil? }
1027
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest)
1028
- @get_transfer_run.call(req, options, &block)
1029
- end
1030
-
1031
- # Deletes the specified transfer run.
1032
- #
1033
- # @param name [String]
1034
- # Required. The field will contain name of the resource requested, for example:
1035
- # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
1036
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
1037
- # @param options [Google::Gax::CallOptions]
1038
- # Overrides the default settings for this call, e.g, timeout,
1039
- # retries, etc.
1040
- # @yield [result, operation] Access the result along with the RPC operation
1041
- # @yieldparam result []
1042
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1043
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
1044
- # @example
1045
- # require "google/cloud/bigquery/data_transfer"
1046
- #
1047
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
1048
- # formatted_name = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_run_path("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
1049
- # data_transfer_client.delete_transfer_run(formatted_name)
1050
-
1051
- def delete_transfer_run \
1052
- name,
1053
- options: nil,
1054
- &block
1055
- req = {
1056
- name: name
1057
- }.delete_if { |_, v| v.nil? }
1058
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest)
1059
- @delete_transfer_run.call(req, options, &block)
1060
- nil
1061
- end
1062
-
1063
- # Returns information about running and completed jobs.
1064
- #
1065
- # @param parent [String]
1066
- # Required. Name of transfer configuration for which transfer runs should be retrieved.
1067
- # Format of transfer configuration resource name is:
1068
- # `projects/{project_id}/transferConfigs/{config_id}` or
1069
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
1070
- # @param states [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferState>]
1071
- # When specified, only transfer runs with requested states are returned.
1072
- # @param page_size [Integer]
1073
- # The maximum number of resources contained in the underlying API
1074
- # response. If page streaming is performed per-resource, this
1075
- # parameter does not affect the return value. If page streaming is
1076
- # performed per-page, this determines the maximum number of
1077
- # resources in a page.
1078
- # @param run_attempt [Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt]
1079
- # Indicates how run attempts are to be pulled.
1080
- # @param options [Google::Gax::CallOptions]
1081
- # Overrides the default settings for this call, e.g, timeout,
1082
- # retries, etc.
1083
- # @yield [result, operation] Access the result along with the RPC operation
1084
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>]
1085
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1086
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>]
1087
- # An enumerable of Google::Cloud::Bigquery::DataTransfer::V1::TransferRun instances.
1088
- # See Google::Gax::PagedEnumerable documentation for other
1089
- # operations such as per-page iteration or access to the response
1090
- # object.
1091
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
1092
- # @example
1093
- # require "google/cloud/bigquery/data_transfer"
1094
- #
1095
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
1096
- # formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_transfer_config_path("[PROJECT]", "[TRANSFER_CONFIG]")
1097
- #
1098
- # # Iterate over all results.
1099
- # data_transfer_client.list_transfer_runs(formatted_parent).each do |element|
1100
- # # Process element.
1101
- # end
1102
- #
1103
- # # Or iterate over results one page at a time.
1104
- # data_transfer_client.list_transfer_runs(formatted_parent).each_page do |page|
1105
- # # Process each page at a time.
1106
- # page.each do |element|
1107
- # # Process element.
1108
- # end
1109
- # end
1110
-
1111
- def list_transfer_runs \
1112
- parent,
1113
- states: nil,
1114
- page_size: nil,
1115
- run_attempt: nil,
1116
- options: nil,
1117
- &block
1118
- req = {
1119
- parent: parent,
1120
- states: states,
1121
- page_size: page_size,
1122
- run_attempt: run_attempt
1123
- }.delete_if { |_, v| v.nil? }
1124
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest)
1125
- @list_transfer_runs.call(req, options, &block)
1126
- end
1127
-
1128
- # Returns user facing log messages for the data transfer run.
1129
- #
1130
- # @param parent [String]
1131
- # Required. Transfer run name in the form:
1132
- # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
1133
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
1134
- # @param page_size [Integer]
1135
- # The maximum number of resources contained in the underlying API
1136
- # response. If page streaming is performed per-resource, this
1137
- # parameter does not affect the return value. If page streaming is
1138
- # performed per-page, this determines the maximum number of
1139
- # resources in a page.
1140
- # @param message_types [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>]
1141
- # Message types to return. If not populated - INFO, WARNING and ERROR
1142
- # messages are returned.
1143
- # @param options [Google::Gax::CallOptions]
1144
- # Overrides the default settings for this call, e.g, timeout,
1145
- # retries, etc.
1146
- # @yield [result, operation] Access the result along with the RPC operation
1147
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>]
1148
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1149
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>]
1150
- # An enumerable of Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage instances.
1151
- # See Google::Gax::PagedEnumerable documentation for other
1152
- # operations such as per-page iteration or access to the response
1153
- # object.
1154
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
1155
- # @example
1156
- # require "google/cloud/bigquery/data_transfer"
1157
- #
1158
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
1159
- # formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_run_path("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
1160
- #
1161
- # # Iterate over all results.
1162
- # data_transfer_client.list_transfer_logs(formatted_parent).each do |element|
1163
- # # Process element.
1164
- # end
1165
- #
1166
- # # Or iterate over results one page at a time.
1167
- # data_transfer_client.list_transfer_logs(formatted_parent).each_page do |page|
1168
- # # Process each page at a time.
1169
- # page.each do |element|
1170
- # # Process element.
1171
- # end
1172
- # end
1173
-
1174
- def list_transfer_logs \
1175
- parent,
1176
- page_size: nil,
1177
- message_types: nil,
1178
- options: nil,
1179
- &block
1180
- req = {
1181
- parent: parent,
1182
- page_size: page_size,
1183
- message_types: message_types
1184
- }.delete_if { |_, v| v.nil? }
1185
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest)
1186
- @list_transfer_logs.call(req, options, &block)
1187
- end
1188
-
1189
- # Returns true if valid credentials exist for the given data source and
1190
- # requesting user.
1191
- # Some data sources doesn't support service account, so we need to talk to
1192
- # them on behalf of the end user. This API just checks whether we have OAuth
1193
- # token for the particular user, which is a pre-requisite before user can
1194
- # create a transfer config.
1195
- #
1196
- # @param name [String]
1197
- # Required. The data source in the form:
1198
- # `projects/{project_id}/dataSources/{data_source_id}` or
1199
- # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
1200
- # @param options [Google::Gax::CallOptions]
1201
- # Overrides the default settings for this call, e.g, timeout,
1202
- # retries, etc.
1203
- # @yield [result, operation] Access the result along with the RPC operation
1204
- # @yieldparam result [Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse]
1205
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1206
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse]
1207
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
1208
- # @example
1209
- # require "google/cloud/bigquery/data_transfer"
1210
- #
1211
- # data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
1212
- # formatted_name = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.project_data_source_path("[PROJECT]", "[DATA_SOURCE]")
1213
- # response = data_transfer_client.check_valid_creds(formatted_name)
1214
-
1215
- def check_valid_creds \
1216
- name,
1217
- options: nil,
1218
- &block
1219
- req = {
1220
- name: name
1221
- }.delete_if { |_, v| v.nil? }
1222
- req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest)
1223
- @check_valid_creds.call(req, options, &block)
1224
- end
1225
- end
1226
- end
1227
- end
1228
- end
1229
- end
1230
- end