google-apis-bigquerydatatransfer_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
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
+ # http://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
+ module Google
16
+ module Apis
17
+ module BigquerydatatransferV1
18
+ # Version of the google-apis-bigquerydatatransfer_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20200801"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,403 @@
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
+ # http://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
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module BigquerydatatransferV1
24
+
25
+ class CheckValidCredsRequest
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class CheckValidCredsResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class DataSource
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class DataSourceParameter
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class EmailPreferences
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Empty
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class ListDataSourcesResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class ListLocationsResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ListTransferConfigsResponse
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ListTransferLogsResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class ListTransferRunsResponse
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Location
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ScheduleOptions
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ScheduleTransferRunsRequest
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class ScheduleTransferRunsResponse
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class StartManualTransferRunsRequest
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class StartManualTransferRunsResponse
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class Status
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class TimeRange
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class TransferConfig
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class TransferMessage
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class TransferRun
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class CheckValidCredsRequest
158
+ # @private
159
+ class Representation < Google::Apis::Core::JsonRepresentation
160
+ end
161
+ end
162
+
163
+ class CheckValidCredsResponse
164
+ # @private
165
+ class Representation < Google::Apis::Core::JsonRepresentation
166
+ property :has_valid_creds, as: 'hasValidCreds'
167
+ end
168
+ end
169
+
170
+ class DataSource
171
+ # @private
172
+ class Representation < Google::Apis::Core::JsonRepresentation
173
+ property :authorization_type, as: 'authorizationType'
174
+ property :client_id, as: 'clientId'
175
+ property :data_refresh_type, as: 'dataRefreshType'
176
+ property :data_source_id, as: 'dataSourceId'
177
+ property :default_data_refresh_window_days, as: 'defaultDataRefreshWindowDays'
178
+ property :default_schedule, as: 'defaultSchedule'
179
+ property :description, as: 'description'
180
+ property :display_name, as: 'displayName'
181
+ property :help_url, as: 'helpUrl'
182
+ property :manual_runs_disabled, as: 'manualRunsDisabled'
183
+ property :minimum_schedule_interval, as: 'minimumScheduleInterval'
184
+ property :name, as: 'name'
185
+ collection :parameters, as: 'parameters', class: Google::Apis::BigquerydatatransferV1::DataSourceParameter, decorator: Google::Apis::BigquerydatatransferV1::DataSourceParameter::Representation
186
+
187
+ collection :scopes, as: 'scopes'
188
+ property :supports_custom_schedule, as: 'supportsCustomSchedule'
189
+ property :supports_multiple_transfers, as: 'supportsMultipleTransfers'
190
+ property :transfer_type, as: 'transferType'
191
+ property :update_deadline_seconds, as: 'updateDeadlineSeconds'
192
+ end
193
+ end
194
+
195
+ class DataSourceParameter
196
+ # @private
197
+ class Representation < Google::Apis::Core::JsonRepresentation
198
+ collection :allowed_values, as: 'allowedValues'
199
+ property :deprecated, as: 'deprecated'
200
+ property :description, as: 'description'
201
+ property :display_name, as: 'displayName'
202
+ collection :fields, as: 'fields', class: Google::Apis::BigquerydatatransferV1::DataSourceParameter, decorator: Google::Apis::BigquerydatatransferV1::DataSourceParameter::Representation
203
+
204
+ property :immutable, as: 'immutable'
205
+ property :max_value, as: 'maxValue'
206
+ property :min_value, as: 'minValue'
207
+ property :param_id, as: 'paramId'
208
+ property :recurse, as: 'recurse'
209
+ property :repeated, as: 'repeated'
210
+ property :required, as: 'required'
211
+ property :type, as: 'type'
212
+ property :validation_description, as: 'validationDescription'
213
+ property :validation_help_url, as: 'validationHelpUrl'
214
+ property :validation_regex, as: 'validationRegex'
215
+ end
216
+ end
217
+
218
+ class EmailPreferences
219
+ # @private
220
+ class Representation < Google::Apis::Core::JsonRepresentation
221
+ property :enable_failure_email, as: 'enableFailureEmail'
222
+ end
223
+ end
224
+
225
+ class Empty
226
+ # @private
227
+ class Representation < Google::Apis::Core::JsonRepresentation
228
+ end
229
+ end
230
+
231
+ class ListDataSourcesResponse
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ collection :data_sources, as: 'dataSources', class: Google::Apis::BigquerydatatransferV1::DataSource, decorator: Google::Apis::BigquerydatatransferV1::DataSource::Representation
235
+
236
+ property :next_page_token, as: 'nextPageToken'
237
+ end
238
+ end
239
+
240
+ class ListLocationsResponse
241
+ # @private
242
+ class Representation < Google::Apis::Core::JsonRepresentation
243
+ collection :locations, as: 'locations', class: Google::Apis::BigquerydatatransferV1::Location, decorator: Google::Apis::BigquerydatatransferV1::Location::Representation
244
+
245
+ property :next_page_token, as: 'nextPageToken'
246
+ end
247
+ end
248
+
249
+ class ListTransferConfigsResponse
250
+ # @private
251
+ class Representation < Google::Apis::Core::JsonRepresentation
252
+ property :next_page_token, as: 'nextPageToken'
253
+ collection :transfer_configs, as: 'transferConfigs', class: Google::Apis::BigquerydatatransferV1::TransferConfig, decorator: Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
254
+
255
+ end
256
+ end
257
+
258
+ class ListTransferLogsResponse
259
+ # @private
260
+ class Representation < Google::Apis::Core::JsonRepresentation
261
+ property :next_page_token, as: 'nextPageToken'
262
+ collection :transfer_messages, as: 'transferMessages', class: Google::Apis::BigquerydatatransferV1::TransferMessage, decorator: Google::Apis::BigquerydatatransferV1::TransferMessage::Representation
263
+
264
+ end
265
+ end
266
+
267
+ class ListTransferRunsResponse
268
+ # @private
269
+ class Representation < Google::Apis::Core::JsonRepresentation
270
+ property :next_page_token, as: 'nextPageToken'
271
+ collection :transfer_runs, as: 'transferRuns', class: Google::Apis::BigquerydatatransferV1::TransferRun, decorator: Google::Apis::BigquerydatatransferV1::TransferRun::Representation
272
+
273
+ end
274
+ end
275
+
276
+ class Location
277
+ # @private
278
+ class Representation < Google::Apis::Core::JsonRepresentation
279
+ property :display_name, as: 'displayName'
280
+ hash :labels, as: 'labels'
281
+ property :location_id, as: 'locationId'
282
+ hash :metadata, as: 'metadata'
283
+ property :name, as: 'name'
284
+ end
285
+ end
286
+
287
+ class ScheduleOptions
288
+ # @private
289
+ class Representation < Google::Apis::Core::JsonRepresentation
290
+ property :disable_auto_scheduling, as: 'disableAutoScheduling'
291
+ property :end_time, as: 'endTime'
292
+ property :start_time, as: 'startTime'
293
+ end
294
+ end
295
+
296
+ class ScheduleTransferRunsRequest
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ property :end_time, as: 'endTime'
300
+ property :start_time, as: 'startTime'
301
+ end
302
+ end
303
+
304
+ class ScheduleTransferRunsResponse
305
+ # @private
306
+ class Representation < Google::Apis::Core::JsonRepresentation
307
+ collection :runs, as: 'runs', class: Google::Apis::BigquerydatatransferV1::TransferRun, decorator: Google::Apis::BigquerydatatransferV1::TransferRun::Representation
308
+
309
+ end
310
+ end
311
+
312
+ class StartManualTransferRunsRequest
313
+ # @private
314
+ class Representation < Google::Apis::Core::JsonRepresentation
315
+ property :requested_run_time, as: 'requestedRunTime'
316
+ property :requested_time_range, as: 'requestedTimeRange', class: Google::Apis::BigquerydatatransferV1::TimeRange, decorator: Google::Apis::BigquerydatatransferV1::TimeRange::Representation
317
+
318
+ end
319
+ end
320
+
321
+ class StartManualTransferRunsResponse
322
+ # @private
323
+ class Representation < Google::Apis::Core::JsonRepresentation
324
+ collection :runs, as: 'runs', class: Google::Apis::BigquerydatatransferV1::TransferRun, decorator: Google::Apis::BigquerydatatransferV1::TransferRun::Representation
325
+
326
+ end
327
+ end
328
+
329
+ class Status
330
+ # @private
331
+ class Representation < Google::Apis::Core::JsonRepresentation
332
+ property :code, as: 'code'
333
+ collection :details, as: 'details'
334
+ property :message, as: 'message'
335
+ end
336
+ end
337
+
338
+ class TimeRange
339
+ # @private
340
+ class Representation < Google::Apis::Core::JsonRepresentation
341
+ property :end_time, as: 'endTime'
342
+ property :start_time, as: 'startTime'
343
+ end
344
+ end
345
+
346
+ class TransferConfig
347
+ # @private
348
+ class Representation < Google::Apis::Core::JsonRepresentation
349
+ property :data_refresh_window_days, as: 'dataRefreshWindowDays'
350
+ property :data_source_id, as: 'dataSourceId'
351
+ property :dataset_region, as: 'datasetRegion'
352
+ property :destination_dataset_id, as: 'destinationDatasetId'
353
+ property :disabled, as: 'disabled'
354
+ property :display_name, as: 'displayName'
355
+ property :email_preferences, as: 'emailPreferences', class: Google::Apis::BigquerydatatransferV1::EmailPreferences, decorator: Google::Apis::BigquerydatatransferV1::EmailPreferences::Representation
356
+
357
+ property :name, as: 'name'
358
+ property :next_run_time, as: 'nextRunTime'
359
+ property :notification_pubsub_topic, as: 'notificationPubsubTopic'
360
+ hash :params, as: 'params'
361
+ property :schedule, as: 'schedule'
362
+ property :schedule_options, as: 'scheduleOptions', class: Google::Apis::BigquerydatatransferV1::ScheduleOptions, decorator: Google::Apis::BigquerydatatransferV1::ScheduleOptions::Representation
363
+
364
+ property :state, as: 'state'
365
+ property :update_time, as: 'updateTime'
366
+ property :user_id, :numeric_string => true, as: 'userId'
367
+ end
368
+ end
369
+
370
+ class TransferMessage
371
+ # @private
372
+ class Representation < Google::Apis::Core::JsonRepresentation
373
+ property :message_text, as: 'messageText'
374
+ property :message_time, as: 'messageTime'
375
+ property :severity, as: 'severity'
376
+ end
377
+ end
378
+
379
+ class TransferRun
380
+ # @private
381
+ class Representation < Google::Apis::Core::JsonRepresentation
382
+ property :data_source_id, as: 'dataSourceId'
383
+ property :destination_dataset_id, as: 'destinationDatasetId'
384
+ property :email_preferences, as: 'emailPreferences', class: Google::Apis::BigquerydatatransferV1::EmailPreferences, decorator: Google::Apis::BigquerydatatransferV1::EmailPreferences::Representation
385
+
386
+ property :end_time, as: 'endTime'
387
+ property :error_status, as: 'errorStatus', class: Google::Apis::BigquerydatatransferV1::Status, decorator: Google::Apis::BigquerydatatransferV1::Status::Representation
388
+
389
+ property :name, as: 'name'
390
+ property :notification_pubsub_topic, as: 'notificationPubsubTopic'
391
+ hash :params, as: 'params'
392
+ property :run_time, as: 'runTime'
393
+ property :schedule, as: 'schedule'
394
+ property :schedule_time, as: 'scheduleTime'
395
+ property :start_time, as: 'startTime'
396
+ property :state, as: 'state'
397
+ property :update_time, as: 'updateTime'
398
+ property :user_id, :numeric_string => true, as: 'userId'
399
+ end
400
+ end
401
+ end
402
+ end
403
+ end
@@ -0,0 +1,1303 @@
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
+ # http://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
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module BigquerydatatransferV1
23
+ # BigQuery Data Transfer API
24
+ #
25
+ # Schedule queries or transfer external data from SaaS applications to Google
26
+ # BigQuery on a regular basis.
27
+ #
28
+ # @example
29
+ # require 'google/apis/bigquerydatatransfer_v1'
30
+ #
31
+ # Bigquerydatatransfer = Google::Apis::BigquerydatatransferV1 # Alias the module
32
+ # service = Bigquerydatatransfer::BigQueryDataTransferService.new
33
+ #
34
+ # @see https://cloud.google.com/bigquery/
35
+ class BigQueryDataTransferService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://bigquerydatatransfer.googleapis.com/', '',
48
+ client_name: 'google-apis-bigquerydatatransfer_v1',
49
+ client_version: Google::Apis::BigquerydatatransferV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Returns true if valid credentials exist for the given data source and
54
+ # requesting user. Some data sources doesn't support service account, so we need
55
+ # to talk to them on behalf of the end user. This API just checks whether we
56
+ # have OAuth token for the particular user, which is a pre-requisite before user
57
+ # can create a transfer config.
58
+ # @param [String] name
59
+ # Required. The data source in the form: `projects/`project_id`/dataSources/`
60
+ # data_source_id`` or `projects/`project_id`/locations/`location_id`/dataSources/
61
+ # `data_source_id``.
62
+ # @param [Google::Apis::BigquerydatatransferV1::CheckValidCredsRequest] check_valid_creds_request_object
63
+ # @param [String] fields
64
+ # Selector specifying which fields to include in a partial response.
65
+ # @param [String] quota_user
66
+ # Available to use for quota purposes for server-side applications. Can be any
67
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
68
+ # @param [Google::Apis::RequestOptions] options
69
+ # Request-specific options
70
+ #
71
+ # @yield [result, err] Result & error if block supplied
72
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse] parsed result object
73
+ # @yieldparam err [StandardError] error object if request failed
74
+ #
75
+ # @return [Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse]
76
+ #
77
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
80
+ def check_project_data_source_valid_creds(name, check_valid_creds_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
81
+ command = make_simple_command(:post, 'v1/{+name}:checkValidCreds', options)
82
+ command.request_representation = Google::Apis::BigquerydatatransferV1::CheckValidCredsRequest::Representation
83
+ command.request_object = check_valid_creds_request_object
84
+ command.response_representation = Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse::Representation
85
+ command.response_class = Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse
86
+ command.params['name'] = name unless name.nil?
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Retrieves a supported data source and returns its settings, which can be used
93
+ # for UI rendering.
94
+ # @param [String] name
95
+ # Required. The field will contain name of the resource requested, for example: `
96
+ # projects/`project_id`/dataSources/`data_source_id`` or `projects/`project_id`/
97
+ # locations/`location_id`/dataSources/`data_source_id``
98
+ # @param [String] fields
99
+ # Selector specifying which fields to include in a partial response.
100
+ # @param [String] quota_user
101
+ # Available to use for quota purposes for server-side applications. Can be any
102
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
103
+ # @param [Google::Apis::RequestOptions] options
104
+ # Request-specific options
105
+ #
106
+ # @yield [result, err] Result & error if block supplied
107
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::DataSource] parsed result object
108
+ # @yieldparam err [StandardError] error object if request failed
109
+ #
110
+ # @return [Google::Apis::BigquerydatatransferV1::DataSource]
111
+ #
112
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
113
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
114
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
115
+ def get_project_data_source(name, fields: nil, quota_user: nil, options: nil, &block)
116
+ command = make_simple_command(:get, 'v1/{+name}', options)
117
+ command.response_representation = Google::Apis::BigquerydatatransferV1::DataSource::Representation
118
+ command.response_class = Google::Apis::BigquerydatatransferV1::DataSource
119
+ command.params['name'] = name unless name.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Lists supported data sources and returns their settings, which can be used for
126
+ # UI rendering.
127
+ # @param [String] parent
128
+ # Required. The BigQuery project id for which data sources should be returned.
129
+ # Must be in the form: `projects/`project_id`` or `projects/`project_id`/
130
+ # locations/`location_id`
131
+ # @param [Fixnum] page_size
132
+ # Page size. The default page size is the maximum value of 1000 results.
133
+ # @param [String] page_token
134
+ # Pagination token, which can be used to request a specific page of `
135
+ # ListDataSourcesRequest` list results. For multiple-page results, `
136
+ # ListDataSourcesResponse` outputs a `next_page` token, which can be used as the
137
+ # `page_token` value to request the next page of list results.
138
+ # @param [String] fields
139
+ # Selector specifying which fields to include in a partial response.
140
+ # @param [String] quota_user
141
+ # Available to use for quota purposes for server-side applications. Can be any
142
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
143
+ # @param [Google::Apis::RequestOptions] options
144
+ # Request-specific options
145
+ #
146
+ # @yield [result, err] Result & error if block supplied
147
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse] parsed result object
148
+ # @yieldparam err [StandardError] error object if request failed
149
+ #
150
+ # @return [Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse]
151
+ #
152
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
153
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
154
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
155
+ def list_project_data_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
156
+ command = make_simple_command(:get, 'v1/{+parent}/dataSources', options)
157
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse::Representation
158
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse
159
+ command.params['parent'] = parent unless parent.nil?
160
+ command.query['pageSize'] = page_size unless page_size.nil?
161
+ command.query['pageToken'] = page_token unless page_token.nil?
162
+ command.query['fields'] = fields unless fields.nil?
163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
164
+ execute_or_queue_command(command, &block)
165
+ end
166
+
167
+ # Gets information about a location.
168
+ # @param [String] name
169
+ # Resource name for the location.
170
+ # @param [String] fields
171
+ # Selector specifying which fields to include in a partial response.
172
+ # @param [String] quota_user
173
+ # Available to use for quota purposes for server-side applications. Can be any
174
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
175
+ # @param [Google::Apis::RequestOptions] options
176
+ # Request-specific options
177
+ #
178
+ # @yield [result, err] Result & error if block supplied
179
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::Location] parsed result object
180
+ # @yieldparam err [StandardError] error object if request failed
181
+ #
182
+ # @return [Google::Apis::BigquerydatatransferV1::Location]
183
+ #
184
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
185
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
186
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
187
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
188
+ command = make_simple_command(:get, 'v1/{+name}', options)
189
+ command.response_representation = Google::Apis::BigquerydatatransferV1::Location::Representation
190
+ command.response_class = Google::Apis::BigquerydatatransferV1::Location
191
+ command.params['name'] = name unless name.nil?
192
+ command.query['fields'] = fields unless fields.nil?
193
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
194
+ execute_or_queue_command(command, &block)
195
+ end
196
+
197
+ # Lists information about the supported locations for this service.
198
+ # @param [String] name
199
+ # The resource that owns the locations collection, if applicable.
200
+ # @param [String] filter
201
+ # The standard list filter.
202
+ # @param [Fixnum] page_size
203
+ # The standard list page size.
204
+ # @param [String] page_token
205
+ # The standard list page token.
206
+ # @param [String] fields
207
+ # Selector specifying which fields to include in a partial response.
208
+ # @param [String] quota_user
209
+ # Available to use for quota purposes for server-side applications. Can be any
210
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
211
+ # @param [Google::Apis::RequestOptions] options
212
+ # Request-specific options
213
+ #
214
+ # @yield [result, err] Result & error if block supplied
215
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListLocationsResponse] parsed result object
216
+ # @yieldparam err [StandardError] error object if request failed
217
+ #
218
+ # @return [Google::Apis::BigquerydatatransferV1::ListLocationsResponse]
219
+ #
220
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
221
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
222
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
223
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
224
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
225
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListLocationsResponse::Representation
226
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListLocationsResponse
227
+ command.params['name'] = name unless name.nil?
228
+ command.query['filter'] = filter unless filter.nil?
229
+ command.query['pageSize'] = page_size unless page_size.nil?
230
+ command.query['pageToken'] = page_token unless page_token.nil?
231
+ command.query['fields'] = fields unless fields.nil?
232
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
233
+ execute_or_queue_command(command, &block)
234
+ end
235
+
236
+ # Returns true if valid credentials exist for the given data source and
237
+ # requesting user. Some data sources doesn't support service account, so we need
238
+ # to talk to them on behalf of the end user. This API just checks whether we
239
+ # have OAuth token for the particular user, which is a pre-requisite before user
240
+ # can create a transfer config.
241
+ # @param [String] name
242
+ # Required. The data source in the form: `projects/`project_id`/dataSources/`
243
+ # data_source_id`` or `projects/`project_id`/locations/`location_id`/dataSources/
244
+ # `data_source_id``.
245
+ # @param [Google::Apis::BigquerydatatransferV1::CheckValidCredsRequest] check_valid_creds_request_object
246
+ # @param [String] fields
247
+ # Selector specifying which fields to include in a partial response.
248
+ # @param [String] quota_user
249
+ # Available to use for quota purposes for server-side applications. Can be any
250
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
251
+ # @param [Google::Apis::RequestOptions] options
252
+ # Request-specific options
253
+ #
254
+ # @yield [result, err] Result & error if block supplied
255
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse] parsed result object
256
+ # @yieldparam err [StandardError] error object if request failed
257
+ #
258
+ # @return [Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse]
259
+ #
260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
263
+ def check_project_location_data_source_valid_creds(name, check_valid_creds_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
264
+ command = make_simple_command(:post, 'v1/{+name}:checkValidCreds', options)
265
+ command.request_representation = Google::Apis::BigquerydatatransferV1::CheckValidCredsRequest::Representation
266
+ command.request_object = check_valid_creds_request_object
267
+ command.response_representation = Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse::Representation
268
+ command.response_class = Google::Apis::BigquerydatatransferV1::CheckValidCredsResponse
269
+ command.params['name'] = name unless name.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ execute_or_queue_command(command, &block)
273
+ end
274
+
275
+ # Retrieves a supported data source and returns its settings, which can be used
276
+ # for UI rendering.
277
+ # @param [String] name
278
+ # Required. The field will contain name of the resource requested, for example: `
279
+ # projects/`project_id`/dataSources/`data_source_id`` or `projects/`project_id`/
280
+ # locations/`location_id`/dataSources/`data_source_id``
281
+ # @param [String] fields
282
+ # Selector specifying which fields to include in a partial response.
283
+ # @param [String] quota_user
284
+ # Available to use for quota purposes for server-side applications. Can be any
285
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
286
+ # @param [Google::Apis::RequestOptions] options
287
+ # Request-specific options
288
+ #
289
+ # @yield [result, err] Result & error if block supplied
290
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::DataSource] parsed result object
291
+ # @yieldparam err [StandardError] error object if request failed
292
+ #
293
+ # @return [Google::Apis::BigquerydatatransferV1::DataSource]
294
+ #
295
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
296
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
297
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
298
+ def get_project_location_data_source(name, fields: nil, quota_user: nil, options: nil, &block)
299
+ command = make_simple_command(:get, 'v1/{+name}', options)
300
+ command.response_representation = Google::Apis::BigquerydatatransferV1::DataSource::Representation
301
+ command.response_class = Google::Apis::BigquerydatatransferV1::DataSource
302
+ command.params['name'] = name unless name.nil?
303
+ command.query['fields'] = fields unless fields.nil?
304
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
305
+ execute_or_queue_command(command, &block)
306
+ end
307
+
308
+ # Lists supported data sources and returns their settings, which can be used for
309
+ # UI rendering.
310
+ # @param [String] parent
311
+ # Required. The BigQuery project id for which data sources should be returned.
312
+ # Must be in the form: `projects/`project_id`` or `projects/`project_id`/
313
+ # locations/`location_id`
314
+ # @param [Fixnum] page_size
315
+ # Page size. The default page size is the maximum value of 1000 results.
316
+ # @param [String] page_token
317
+ # Pagination token, which can be used to request a specific page of `
318
+ # ListDataSourcesRequest` list results. For multiple-page results, `
319
+ # ListDataSourcesResponse` outputs a `next_page` token, which can be used as the
320
+ # `page_token` value to request the next page of list results.
321
+ # @param [String] fields
322
+ # Selector specifying which fields to include in a partial response.
323
+ # @param [String] quota_user
324
+ # Available to use for quota purposes for server-side applications. Can be any
325
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
326
+ # @param [Google::Apis::RequestOptions] options
327
+ # Request-specific options
328
+ #
329
+ # @yield [result, err] Result & error if block supplied
330
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse] parsed result object
331
+ # @yieldparam err [StandardError] error object if request failed
332
+ #
333
+ # @return [Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse]
334
+ #
335
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
336
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
337
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
338
+ def list_project_location_data_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
339
+ command = make_simple_command(:get, 'v1/{+parent}/dataSources', options)
340
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse::Representation
341
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListDataSourcesResponse
342
+ command.params['parent'] = parent unless parent.nil?
343
+ command.query['pageSize'] = page_size unless page_size.nil?
344
+ command.query['pageToken'] = page_token unless page_token.nil?
345
+ command.query['fields'] = fields unless fields.nil?
346
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
347
+ execute_or_queue_command(command, &block)
348
+ end
349
+
350
+ # Creates a new data transfer configuration.
351
+ # @param [String] parent
352
+ # Required. The BigQuery project id where the transfer configuration should be
353
+ # created. Must be in the format projects/`project_id`/locations/`location_id`
354
+ # or projects/`project_id`. If specified location and location of the
355
+ # destination bigquery dataset do not match - the request will fail.
356
+ # @param [Google::Apis::BigquerydatatransferV1::TransferConfig] transfer_config_object
357
+ # @param [String] authorization_code
358
+ # Optional OAuth2 authorization code to use with this transfer configuration.
359
+ # This is required if new credentials are needed, as indicated by `
360
+ # CheckValidCreds`. In order to obtain authorization_code, please make a request
361
+ # to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&
362
+ # redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for
363
+ # the given data source returned by ListDataSources method. * data_source_scopes
364
+ # are the scopes returned by ListDataSources method. * redirect_uri is an
365
+ # optional parameter. If not specified, then authorization code is posted to the
366
+ # opener of authorization flow window. Otherwise it will be sent to the redirect
367
+ # uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization
368
+ # code should be returned in the title bar of the browser, with the page text
369
+ # prompting the user to copy the code and paste it in the application.
370
+ # @param [String] service_account_name
371
+ # Optional service account name. If this field is set, transfer config will be
372
+ # created with this service account credentials. It requires that requesting
373
+ # user calling this API has permissions to act as this service account.
374
+ # @param [String] version_info
375
+ # Optional version info. If users want to find a very recent access token, that
376
+ # is, immediately after approving access, users have to set the version_info
377
+ # claim in the token request. To obtain the version_info, users must use the "
378
+ # none+gsession" response type. which be return a version_info back in the
379
+ # authorization response which be be put in a JWT claim in the token request.
380
+ # @param [String] fields
381
+ # Selector specifying which fields to include in a partial response.
382
+ # @param [String] quota_user
383
+ # Available to use for quota purposes for server-side applications. Can be any
384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
385
+ # @param [Google::Apis::RequestOptions] options
386
+ # Request-specific options
387
+ #
388
+ # @yield [result, err] Result & error if block supplied
389
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferConfig] parsed result object
390
+ # @yieldparam err [StandardError] error object if request failed
391
+ #
392
+ # @return [Google::Apis::BigquerydatatransferV1::TransferConfig]
393
+ #
394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
397
+ def create_project_location_transfer_config(parent, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block)
398
+ command = make_simple_command(:post, 'v1/{+parent}/transferConfigs', options)
399
+ command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
400
+ command.request_object = transfer_config_object
401
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
402
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig
403
+ command.params['parent'] = parent unless parent.nil?
404
+ command.query['authorizationCode'] = authorization_code unless authorization_code.nil?
405
+ command.query['serviceAccountName'] = service_account_name unless service_account_name.nil?
406
+ command.query['versionInfo'] = version_info unless version_info.nil?
407
+ command.query['fields'] = fields unless fields.nil?
408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
409
+ execute_or_queue_command(command, &block)
410
+ end
411
+
412
+ # Deletes a data transfer configuration, including any associated transfer runs
413
+ # and logs.
414
+ # @param [String] name
415
+ # Required. The field will contain name of the resource requested, for example: `
416
+ # projects/`project_id`/transferConfigs/`config_id`` or `projects/`project_id`/
417
+ # locations/`location_id`/transferConfigs/`config_id``
418
+ # @param [String] fields
419
+ # Selector specifying which fields to include in a partial response.
420
+ # @param [String] quota_user
421
+ # Available to use for quota purposes for server-side applications. Can be any
422
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
423
+ # @param [Google::Apis::RequestOptions] options
424
+ # Request-specific options
425
+ #
426
+ # @yield [result, err] Result & error if block supplied
427
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::Empty] parsed result object
428
+ # @yieldparam err [StandardError] error object if request failed
429
+ #
430
+ # @return [Google::Apis::BigquerydatatransferV1::Empty]
431
+ #
432
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
433
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
434
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
435
+ def delete_project_location_transfer_config(name, fields: nil, quota_user: nil, options: nil, &block)
436
+ command = make_simple_command(:delete, 'v1/{+name}', options)
437
+ command.response_representation = Google::Apis::BigquerydatatransferV1::Empty::Representation
438
+ command.response_class = Google::Apis::BigquerydatatransferV1::Empty
439
+ command.params['name'] = name unless name.nil?
440
+ command.query['fields'] = fields unless fields.nil?
441
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
442
+ execute_or_queue_command(command, &block)
443
+ end
444
+
445
+ # Returns information about a data transfer config.
446
+ # @param [String] name
447
+ # Required. The field will contain name of the resource requested, for example: `
448
+ # projects/`project_id`/transferConfigs/`config_id`` or `projects/`project_id`/
449
+ # locations/`location_id`/transferConfigs/`config_id``
450
+ # @param [String] fields
451
+ # Selector specifying which fields to include in a partial response.
452
+ # @param [String] quota_user
453
+ # Available to use for quota purposes for server-side applications. Can be any
454
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
455
+ # @param [Google::Apis::RequestOptions] options
456
+ # Request-specific options
457
+ #
458
+ # @yield [result, err] Result & error if block supplied
459
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferConfig] parsed result object
460
+ # @yieldparam err [StandardError] error object if request failed
461
+ #
462
+ # @return [Google::Apis::BigquerydatatransferV1::TransferConfig]
463
+ #
464
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
465
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
466
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
467
+ def get_project_location_transfer_config(name, fields: nil, quota_user: nil, options: nil, &block)
468
+ command = make_simple_command(:get, 'v1/{+name}', options)
469
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
470
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig
471
+ command.params['name'] = name unless name.nil?
472
+ command.query['fields'] = fields unless fields.nil?
473
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
474
+ execute_or_queue_command(command, &block)
475
+ end
476
+
477
+ # Returns information about all data transfers in the project.
478
+ # @param [String] parent
479
+ # Required. The BigQuery project id for which data sources should be returned: `
480
+ # projects/`project_id`` or `projects/`project_id`/locations/`location_id``
481
+ # @param [Array<String>, String] data_source_ids
482
+ # When specified, only configurations of requested data sources are returned.
483
+ # @param [Fixnum] page_size
484
+ # Page size. The default page size is the maximum value of 1000 results.
485
+ # @param [String] page_token
486
+ # Pagination token, which can be used to request a specific page of `
487
+ # ListTransfersRequest` list results. For multiple-page results, `
488
+ # ListTransfersResponse` outputs a `next_page` token, which can be used as the `
489
+ # page_token` value to request the next page of list results.
490
+ # @param [String] fields
491
+ # Selector specifying which fields to include in a partial response.
492
+ # @param [String] quota_user
493
+ # Available to use for quota purposes for server-side applications. Can be any
494
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
495
+ # @param [Google::Apis::RequestOptions] options
496
+ # Request-specific options
497
+ #
498
+ # @yield [result, err] Result & error if block supplied
499
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse] parsed result object
500
+ # @yieldparam err [StandardError] error object if request failed
501
+ #
502
+ # @return [Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse]
503
+ #
504
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
505
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
506
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
507
+ def list_project_location_transfer_configs(parent, data_source_ids: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
508
+ command = make_simple_command(:get, 'v1/{+parent}/transferConfigs', options)
509
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse::Representation
510
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse
511
+ command.params['parent'] = parent unless parent.nil?
512
+ command.query['dataSourceIds'] = data_source_ids unless data_source_ids.nil?
513
+ command.query['pageSize'] = page_size unless page_size.nil?
514
+ command.query['pageToken'] = page_token unless page_token.nil?
515
+ command.query['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Updates a data transfer configuration. All fields must be set, even if they
521
+ # are not updated.
522
+ # @param [String] name
523
+ # The resource name of the transfer config. Transfer config names have the form
524
+ # of `projects/`project_id`/locations/`region`/transferConfigs/`config_id``. The
525
+ # name is automatically generated based on the config_id specified in
526
+ # CreateTransferConfigRequest along with project_id and region. If config_id is
527
+ # not provided, usually a uuid, even though it is not guaranteed or required,
528
+ # will be generated for config_id.
529
+ # @param [Google::Apis::BigquerydatatransferV1::TransferConfig] transfer_config_object
530
+ # @param [String] authorization_code
531
+ # Optional OAuth2 authorization code to use with this transfer configuration. If
532
+ # it is provided, the transfer configuration will be associated with the
533
+ # authorizing user. In order to obtain authorization_code, please make a request
534
+ # to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&
535
+ # redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for
536
+ # the given data source returned by ListDataSources method. * data_source_scopes
537
+ # are the scopes returned by ListDataSources method. * redirect_uri is an
538
+ # optional parameter. If not specified, then authorization code is posted to the
539
+ # opener of authorization flow window. Otherwise it will be sent to the redirect
540
+ # uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization
541
+ # code should be returned in the title bar of the browser, with the page text
542
+ # prompting the user to copy the code and paste it in the application.
543
+ # @param [String] service_account_name
544
+ # Optional service account name. If this field is set and "service_account_name"
545
+ # is set in update_mask, transfer config will be updated to use this service
546
+ # account credentials. It requires that requesting user calling this API has
547
+ # permissions to act as this service account.
548
+ # @param [String] update_mask
549
+ # Required. Required list of fields to be updated in this request.
550
+ # @param [String] version_info
551
+ # Optional version info. If users want to find a very recent access token, that
552
+ # is, immediately after approving access, users have to set the version_info
553
+ # claim in the token request. To obtain the version_info, users must use the "
554
+ # none+gsession" response type. which be return a version_info back in the
555
+ # authorization response which be be put in a JWT claim in the token request.
556
+ # @param [String] fields
557
+ # Selector specifying which fields to include in a partial response.
558
+ # @param [String] quota_user
559
+ # Available to use for quota purposes for server-side applications. Can be any
560
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
561
+ # @param [Google::Apis::RequestOptions] options
562
+ # Request-specific options
563
+ #
564
+ # @yield [result, err] Result & error if block supplied
565
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferConfig] parsed result object
566
+ # @yieldparam err [StandardError] error object if request failed
567
+ #
568
+ # @return [Google::Apis::BigquerydatatransferV1::TransferConfig]
569
+ #
570
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
571
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
572
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
573
+ def patch_project_location_transfer_config(name, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, update_mask: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block)
574
+ command = make_simple_command(:patch, 'v1/{+name}', options)
575
+ command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
576
+ command.request_object = transfer_config_object
577
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
578
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig
579
+ command.params['name'] = name unless name.nil?
580
+ command.query['authorizationCode'] = authorization_code unless authorization_code.nil?
581
+ command.query['serviceAccountName'] = service_account_name unless service_account_name.nil?
582
+ command.query['updateMask'] = update_mask unless update_mask.nil?
583
+ command.query['versionInfo'] = version_info unless version_info.nil?
584
+ command.query['fields'] = fields unless fields.nil?
585
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
586
+ execute_or_queue_command(command, &block)
587
+ end
588
+
589
+ # Creates transfer runs for a time range [start_time, end_time]. For each date -
590
+ # or whatever granularity the data source supports - in the range, one transfer
591
+ # run is created. Note that runs are created per UTC time in the time range.
592
+ # DEPRECATED: use StartManualTransferRuns instead.
593
+ # @param [String] parent
594
+ # Required. Transfer configuration name in the form: `projects/`project_id`/
595
+ # transferConfigs/`config_id`` or `projects/`project_id`/locations/`location_id`/
596
+ # transferConfigs/`config_id``.
597
+ # @param [Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsRequest] schedule_transfer_runs_request_object
598
+ # @param [String] fields
599
+ # Selector specifying which fields to include in a partial response.
600
+ # @param [String] quota_user
601
+ # Available to use for quota purposes for server-side applications. Can be any
602
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
603
+ # @param [Google::Apis::RequestOptions] options
604
+ # Request-specific options
605
+ #
606
+ # @yield [result, err] Result & error if block supplied
607
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse] parsed result object
608
+ # @yieldparam err [StandardError] error object if request failed
609
+ #
610
+ # @return [Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse]
611
+ #
612
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
613
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
614
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
615
+ def schedule_project_location_transfer_config_runs(parent, schedule_transfer_runs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
616
+ command = make_simple_command(:post, 'v1/{+parent}:scheduleRuns', options)
617
+ command.request_representation = Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsRequest::Representation
618
+ command.request_object = schedule_transfer_runs_request_object
619
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse::Representation
620
+ command.response_class = Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse
621
+ command.params['parent'] = parent unless parent.nil?
622
+ command.query['fields'] = fields unless fields.nil?
623
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
624
+ execute_or_queue_command(command, &block)
625
+ end
626
+
627
+ # Start manual transfer runs to be executed now with schedule_time equal to
628
+ # current time. The transfer runs can be created for a time range where the
629
+ # run_time is between start_time (inclusive) and end_time (exclusive), or for a
630
+ # specific run_time.
631
+ # @param [String] parent
632
+ # Transfer configuration name in the form: `projects/`project_id`/
633
+ # transferConfigs/`config_id`` or `projects/`project_id`/locations/`location_id`/
634
+ # transferConfigs/`config_id``.
635
+ # @param [Google::Apis::BigquerydatatransferV1::StartManualTransferRunsRequest] start_manual_transfer_runs_request_object
636
+ # @param [String] fields
637
+ # Selector specifying which fields to include in a partial response.
638
+ # @param [String] quota_user
639
+ # Available to use for quota purposes for server-side applications. Can be any
640
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
641
+ # @param [Google::Apis::RequestOptions] options
642
+ # Request-specific options
643
+ #
644
+ # @yield [result, err] Result & error if block supplied
645
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse] parsed result object
646
+ # @yieldparam err [StandardError] error object if request failed
647
+ #
648
+ # @return [Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse]
649
+ #
650
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
651
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
652
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
653
+ def start_project_location_transfer_config_manual_runs(parent, start_manual_transfer_runs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
654
+ command = make_simple_command(:post, 'v1/{+parent}:startManualRuns', options)
655
+ command.request_representation = Google::Apis::BigquerydatatransferV1::StartManualTransferRunsRequest::Representation
656
+ command.request_object = start_manual_transfer_runs_request_object
657
+ command.response_representation = Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse::Representation
658
+ command.response_class = Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse
659
+ command.params['parent'] = parent unless parent.nil?
660
+ command.query['fields'] = fields unless fields.nil?
661
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
662
+ execute_or_queue_command(command, &block)
663
+ end
664
+
665
+ # Deletes the specified transfer run.
666
+ # @param [String] name
667
+ # Required. The field will contain name of the resource requested, for example: `
668
+ # projects/`project_id`/transferConfigs/`config_id`/runs/`run_id`` or `projects/`
669
+ # project_id`/locations/`location_id`/transferConfigs/`config_id`/runs/`run_id``
670
+ # @param [String] fields
671
+ # Selector specifying which fields to include in a partial response.
672
+ # @param [String] quota_user
673
+ # Available to use for quota purposes for server-side applications. Can be any
674
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
675
+ # @param [Google::Apis::RequestOptions] options
676
+ # Request-specific options
677
+ #
678
+ # @yield [result, err] Result & error if block supplied
679
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::Empty] parsed result object
680
+ # @yieldparam err [StandardError] error object if request failed
681
+ #
682
+ # @return [Google::Apis::BigquerydatatransferV1::Empty]
683
+ #
684
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
685
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
686
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
687
+ def delete_project_location_transfer_config_run(name, fields: nil, quota_user: nil, options: nil, &block)
688
+ command = make_simple_command(:delete, 'v1/{+name}', options)
689
+ command.response_representation = Google::Apis::BigquerydatatransferV1::Empty::Representation
690
+ command.response_class = Google::Apis::BigquerydatatransferV1::Empty
691
+ command.params['name'] = name unless name.nil?
692
+ command.query['fields'] = fields unless fields.nil?
693
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
694
+ execute_or_queue_command(command, &block)
695
+ end
696
+
697
+ # Returns information about the particular transfer run.
698
+ # @param [String] name
699
+ # Required. The field will contain name of the resource requested, for example: `
700
+ # projects/`project_id`/transferConfigs/`config_id`/runs/`run_id`` or `projects/`
701
+ # project_id`/locations/`location_id`/transferConfigs/`config_id`/runs/`run_id``
702
+ # @param [String] fields
703
+ # Selector specifying which fields to include in a partial response.
704
+ # @param [String] quota_user
705
+ # Available to use for quota purposes for server-side applications. Can be any
706
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
707
+ # @param [Google::Apis::RequestOptions] options
708
+ # Request-specific options
709
+ #
710
+ # @yield [result, err] Result & error if block supplied
711
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferRun] parsed result object
712
+ # @yieldparam err [StandardError] error object if request failed
713
+ #
714
+ # @return [Google::Apis::BigquerydatatransferV1::TransferRun]
715
+ #
716
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
717
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
718
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
719
+ def get_project_location_transfer_config_run(name, fields: nil, quota_user: nil, options: nil, &block)
720
+ command = make_simple_command(:get, 'v1/{+name}', options)
721
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferRun::Representation
722
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferRun
723
+ command.params['name'] = name unless name.nil?
724
+ command.query['fields'] = fields unless fields.nil?
725
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
726
+ execute_or_queue_command(command, &block)
727
+ end
728
+
729
+ # Returns information about running and completed jobs.
730
+ # @param [String] parent
731
+ # Required. Name of transfer configuration for which transfer runs should be
732
+ # retrieved. Format of transfer configuration resource name is: `projects/`
733
+ # project_id`/transferConfigs/`config_id`` or `projects/`project_id`/locations/`
734
+ # location_id`/transferConfigs/`config_id``.
735
+ # @param [Fixnum] page_size
736
+ # Page size. The default page size is the maximum value of 1000 results.
737
+ # @param [String] page_token
738
+ # Pagination token, which can be used to request a specific page of `
739
+ # ListTransferRunsRequest` list results. For multiple-page results, `
740
+ # ListTransferRunsResponse` outputs a `next_page` token, which can be used as
741
+ # the `page_token` value to request the next page of list results.
742
+ # @param [String] run_attempt
743
+ # Indicates how run attempts are to be pulled.
744
+ # @param [Array<String>, String] states
745
+ # When specified, only transfer runs with requested states are returned.
746
+ # @param [String] fields
747
+ # Selector specifying which fields to include in a partial response.
748
+ # @param [String] quota_user
749
+ # Available to use for quota purposes for server-side applications. Can be any
750
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
751
+ # @param [Google::Apis::RequestOptions] options
752
+ # Request-specific options
753
+ #
754
+ # @yield [result, err] Result & error if block supplied
755
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse] parsed result object
756
+ # @yieldparam err [StandardError] error object if request failed
757
+ #
758
+ # @return [Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse]
759
+ #
760
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
761
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
762
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
763
+ def list_project_location_transfer_config_runs(parent, page_size: nil, page_token: nil, run_attempt: nil, states: nil, fields: nil, quota_user: nil, options: nil, &block)
764
+ command = make_simple_command(:get, 'v1/{+parent}/runs', options)
765
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse::Representation
766
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse
767
+ command.params['parent'] = parent unless parent.nil?
768
+ command.query['pageSize'] = page_size unless page_size.nil?
769
+ command.query['pageToken'] = page_token unless page_token.nil?
770
+ command.query['runAttempt'] = run_attempt unless run_attempt.nil?
771
+ command.query['states'] = states unless states.nil?
772
+ command.query['fields'] = fields unless fields.nil?
773
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
774
+ execute_or_queue_command(command, &block)
775
+ end
776
+
777
+ # Returns user facing log messages for the data transfer run.
778
+ # @param [String] parent
779
+ # Required. Transfer run name in the form: `projects/`project_id`/
780
+ # transferConfigs/`config_id`/runs/`run_id`` or `projects/`project_id`/locations/
781
+ # `location_id`/transferConfigs/`config_id`/runs/`run_id``
782
+ # @param [Array<String>, String] message_types
783
+ # Message types to return. If not populated - INFO, WARNING and ERROR messages
784
+ # are returned.
785
+ # @param [Fixnum] page_size
786
+ # Page size. The default page size is the maximum value of 1000 results.
787
+ # @param [String] page_token
788
+ # Pagination token, which can be used to request a specific page of `
789
+ # ListTransferLogsRequest` list results. For multiple-page results, `
790
+ # ListTransferLogsResponse` outputs a `next_page` token, which can be used as
791
+ # the `page_token` value to request the next page of list results.
792
+ # @param [String] fields
793
+ # Selector specifying which fields to include in a partial response.
794
+ # @param [String] quota_user
795
+ # Available to use for quota purposes for server-side applications. Can be any
796
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
797
+ # @param [Google::Apis::RequestOptions] options
798
+ # Request-specific options
799
+ #
800
+ # @yield [result, err] Result & error if block supplied
801
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse] parsed result object
802
+ # @yieldparam err [StandardError] error object if request failed
803
+ #
804
+ # @return [Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse]
805
+ #
806
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
807
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
808
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
809
+ def list_project_location_transfer_config_run_transfer_logs(parent, message_types: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
810
+ command = make_simple_command(:get, 'v1/{+parent}/transferLogs', options)
811
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse::Representation
812
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse
813
+ command.params['parent'] = parent unless parent.nil?
814
+ command.query['messageTypes'] = message_types unless message_types.nil?
815
+ command.query['pageSize'] = page_size unless page_size.nil?
816
+ command.query['pageToken'] = page_token unless page_token.nil?
817
+ command.query['fields'] = fields unless fields.nil?
818
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
819
+ execute_or_queue_command(command, &block)
820
+ end
821
+
822
+ # Creates a new data transfer configuration.
823
+ # @param [String] parent
824
+ # Required. The BigQuery project id where the transfer configuration should be
825
+ # created. Must be in the format projects/`project_id`/locations/`location_id`
826
+ # or projects/`project_id`. If specified location and location of the
827
+ # destination bigquery dataset do not match - the request will fail.
828
+ # @param [Google::Apis::BigquerydatatransferV1::TransferConfig] transfer_config_object
829
+ # @param [String] authorization_code
830
+ # Optional OAuth2 authorization code to use with this transfer configuration.
831
+ # This is required if new credentials are needed, as indicated by `
832
+ # CheckValidCreds`. In order to obtain authorization_code, please make a request
833
+ # to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&
834
+ # redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for
835
+ # the given data source returned by ListDataSources method. * data_source_scopes
836
+ # are the scopes returned by ListDataSources method. * redirect_uri is an
837
+ # optional parameter. If not specified, then authorization code is posted to the
838
+ # opener of authorization flow window. Otherwise it will be sent to the redirect
839
+ # uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization
840
+ # code should be returned in the title bar of the browser, with the page text
841
+ # prompting the user to copy the code and paste it in the application.
842
+ # @param [String] service_account_name
843
+ # Optional service account name. If this field is set, transfer config will be
844
+ # created with this service account credentials. It requires that requesting
845
+ # user calling this API has permissions to act as this service account.
846
+ # @param [String] version_info
847
+ # Optional version info. If users want to find a very recent access token, that
848
+ # is, immediately after approving access, users have to set the version_info
849
+ # claim in the token request. To obtain the version_info, users must use the "
850
+ # none+gsession" response type. which be return a version_info back in the
851
+ # authorization response which be be put in a JWT claim in the token request.
852
+ # @param [String] fields
853
+ # Selector specifying which fields to include in a partial response.
854
+ # @param [String] quota_user
855
+ # Available to use for quota purposes for server-side applications. Can be any
856
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
857
+ # @param [Google::Apis::RequestOptions] options
858
+ # Request-specific options
859
+ #
860
+ # @yield [result, err] Result & error if block supplied
861
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferConfig] parsed result object
862
+ # @yieldparam err [StandardError] error object if request failed
863
+ #
864
+ # @return [Google::Apis::BigquerydatatransferV1::TransferConfig]
865
+ #
866
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
867
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
868
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
869
+ def create_project_transfer_config(parent, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block)
870
+ command = make_simple_command(:post, 'v1/{+parent}/transferConfigs', options)
871
+ command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
872
+ command.request_object = transfer_config_object
873
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
874
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig
875
+ command.params['parent'] = parent unless parent.nil?
876
+ command.query['authorizationCode'] = authorization_code unless authorization_code.nil?
877
+ command.query['serviceAccountName'] = service_account_name unless service_account_name.nil?
878
+ command.query['versionInfo'] = version_info unless version_info.nil?
879
+ command.query['fields'] = fields unless fields.nil?
880
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
881
+ execute_or_queue_command(command, &block)
882
+ end
883
+
884
+ # Deletes a data transfer configuration, including any associated transfer runs
885
+ # and logs.
886
+ # @param [String] name
887
+ # Required. The field will contain name of the resource requested, for example: `
888
+ # projects/`project_id`/transferConfigs/`config_id`` or `projects/`project_id`/
889
+ # locations/`location_id`/transferConfigs/`config_id``
890
+ # @param [String] fields
891
+ # Selector specifying which fields to include in a partial response.
892
+ # @param [String] quota_user
893
+ # Available to use for quota purposes for server-side applications. Can be any
894
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
895
+ # @param [Google::Apis::RequestOptions] options
896
+ # Request-specific options
897
+ #
898
+ # @yield [result, err] Result & error if block supplied
899
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::Empty] parsed result object
900
+ # @yieldparam err [StandardError] error object if request failed
901
+ #
902
+ # @return [Google::Apis::BigquerydatatransferV1::Empty]
903
+ #
904
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
905
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
906
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
907
+ def delete_project_transfer_config(name, fields: nil, quota_user: nil, options: nil, &block)
908
+ command = make_simple_command(:delete, 'v1/{+name}', options)
909
+ command.response_representation = Google::Apis::BigquerydatatransferV1::Empty::Representation
910
+ command.response_class = Google::Apis::BigquerydatatransferV1::Empty
911
+ command.params['name'] = name unless name.nil?
912
+ command.query['fields'] = fields unless fields.nil?
913
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
914
+ execute_or_queue_command(command, &block)
915
+ end
916
+
917
+ # Returns information about a data transfer config.
918
+ # @param [String] name
919
+ # Required. The field will contain name of the resource requested, for example: `
920
+ # projects/`project_id`/transferConfigs/`config_id`` or `projects/`project_id`/
921
+ # locations/`location_id`/transferConfigs/`config_id``
922
+ # @param [String] fields
923
+ # Selector specifying which fields to include in a partial response.
924
+ # @param [String] quota_user
925
+ # Available to use for quota purposes for server-side applications. Can be any
926
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
927
+ # @param [Google::Apis::RequestOptions] options
928
+ # Request-specific options
929
+ #
930
+ # @yield [result, err] Result & error if block supplied
931
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferConfig] parsed result object
932
+ # @yieldparam err [StandardError] error object if request failed
933
+ #
934
+ # @return [Google::Apis::BigquerydatatransferV1::TransferConfig]
935
+ #
936
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
937
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
938
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
939
+ def get_project_transfer_config(name, fields: nil, quota_user: nil, options: nil, &block)
940
+ command = make_simple_command(:get, 'v1/{+name}', options)
941
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
942
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig
943
+ command.params['name'] = name unless name.nil?
944
+ command.query['fields'] = fields unless fields.nil?
945
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
946
+ execute_or_queue_command(command, &block)
947
+ end
948
+
949
+ # Returns information about all data transfers in the project.
950
+ # @param [String] parent
951
+ # Required. The BigQuery project id for which data sources should be returned: `
952
+ # projects/`project_id`` or `projects/`project_id`/locations/`location_id``
953
+ # @param [Array<String>, String] data_source_ids
954
+ # When specified, only configurations of requested data sources are returned.
955
+ # @param [Fixnum] page_size
956
+ # Page size. The default page size is the maximum value of 1000 results.
957
+ # @param [String] page_token
958
+ # Pagination token, which can be used to request a specific page of `
959
+ # ListTransfersRequest` list results. For multiple-page results, `
960
+ # ListTransfersResponse` outputs a `next_page` token, which can be used as the `
961
+ # page_token` value to request the next page of list results.
962
+ # @param [String] fields
963
+ # Selector specifying which fields to include in a partial response.
964
+ # @param [String] quota_user
965
+ # Available to use for quota purposes for server-side applications. Can be any
966
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
967
+ # @param [Google::Apis::RequestOptions] options
968
+ # Request-specific options
969
+ #
970
+ # @yield [result, err] Result & error if block supplied
971
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse] parsed result object
972
+ # @yieldparam err [StandardError] error object if request failed
973
+ #
974
+ # @return [Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse]
975
+ #
976
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
977
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
978
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
979
+ def list_project_transfer_configs(parent, data_source_ids: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
980
+ command = make_simple_command(:get, 'v1/{+parent}/transferConfigs', options)
981
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse::Representation
982
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListTransferConfigsResponse
983
+ command.params['parent'] = parent unless parent.nil?
984
+ command.query['dataSourceIds'] = data_source_ids unless data_source_ids.nil?
985
+ command.query['pageSize'] = page_size unless page_size.nil?
986
+ command.query['pageToken'] = page_token unless page_token.nil?
987
+ command.query['fields'] = fields unless fields.nil?
988
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
989
+ execute_or_queue_command(command, &block)
990
+ end
991
+
992
+ # Updates a data transfer configuration. All fields must be set, even if they
993
+ # are not updated.
994
+ # @param [String] name
995
+ # The resource name of the transfer config. Transfer config names have the form
996
+ # of `projects/`project_id`/locations/`region`/transferConfigs/`config_id``. The
997
+ # name is automatically generated based on the config_id specified in
998
+ # CreateTransferConfigRequest along with project_id and region. If config_id is
999
+ # not provided, usually a uuid, even though it is not guaranteed or required,
1000
+ # will be generated for config_id.
1001
+ # @param [Google::Apis::BigquerydatatransferV1::TransferConfig] transfer_config_object
1002
+ # @param [String] authorization_code
1003
+ # Optional OAuth2 authorization code to use with this transfer configuration. If
1004
+ # it is provided, the transfer configuration will be associated with the
1005
+ # authorizing user. In order to obtain authorization_code, please make a request
1006
+ # to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&
1007
+ # redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for
1008
+ # the given data source returned by ListDataSources method. * data_source_scopes
1009
+ # are the scopes returned by ListDataSources method. * redirect_uri is an
1010
+ # optional parameter. If not specified, then authorization code is posted to the
1011
+ # opener of authorization flow window. Otherwise it will be sent to the redirect
1012
+ # uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization
1013
+ # code should be returned in the title bar of the browser, with the page text
1014
+ # prompting the user to copy the code and paste it in the application.
1015
+ # @param [String] service_account_name
1016
+ # Optional service account name. If this field is set and "service_account_name"
1017
+ # is set in update_mask, transfer config will be updated to use this service
1018
+ # account credentials. It requires that requesting user calling this API has
1019
+ # permissions to act as this service account.
1020
+ # @param [String] update_mask
1021
+ # Required. Required list of fields to be updated in this request.
1022
+ # @param [String] version_info
1023
+ # Optional version info. If users want to find a very recent access token, that
1024
+ # is, immediately after approving access, users have to set the version_info
1025
+ # claim in the token request. To obtain the version_info, users must use the "
1026
+ # none+gsession" response type. which be return a version_info back in the
1027
+ # authorization response which be be put in a JWT claim in the token request.
1028
+ # @param [String] fields
1029
+ # Selector specifying which fields to include in a partial response.
1030
+ # @param [String] quota_user
1031
+ # Available to use for quota purposes for server-side applications. Can be any
1032
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1033
+ # @param [Google::Apis::RequestOptions] options
1034
+ # Request-specific options
1035
+ #
1036
+ # @yield [result, err] Result & error if block supplied
1037
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferConfig] parsed result object
1038
+ # @yieldparam err [StandardError] error object if request failed
1039
+ #
1040
+ # @return [Google::Apis::BigquerydatatransferV1::TransferConfig]
1041
+ #
1042
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1043
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1044
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1045
+ def patch_project_transfer_config(name, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, update_mask: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block)
1046
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1047
+ command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
1048
+ command.request_object = transfer_config_object
1049
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation
1050
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig
1051
+ command.params['name'] = name unless name.nil?
1052
+ command.query['authorizationCode'] = authorization_code unless authorization_code.nil?
1053
+ command.query['serviceAccountName'] = service_account_name unless service_account_name.nil?
1054
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1055
+ command.query['versionInfo'] = version_info unless version_info.nil?
1056
+ command.query['fields'] = fields unless fields.nil?
1057
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1058
+ execute_or_queue_command(command, &block)
1059
+ end
1060
+
1061
+ # Creates transfer runs for a time range [start_time, end_time]. For each date -
1062
+ # or whatever granularity the data source supports - in the range, one transfer
1063
+ # run is created. Note that runs are created per UTC time in the time range.
1064
+ # DEPRECATED: use StartManualTransferRuns instead.
1065
+ # @param [String] parent
1066
+ # Required. Transfer configuration name in the form: `projects/`project_id`/
1067
+ # transferConfigs/`config_id`` or `projects/`project_id`/locations/`location_id`/
1068
+ # transferConfigs/`config_id``.
1069
+ # @param [Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsRequest] schedule_transfer_runs_request_object
1070
+ # @param [String] fields
1071
+ # Selector specifying which fields to include in a partial response.
1072
+ # @param [String] quota_user
1073
+ # Available to use for quota purposes for server-side applications. Can be any
1074
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1075
+ # @param [Google::Apis::RequestOptions] options
1076
+ # Request-specific options
1077
+ #
1078
+ # @yield [result, err] Result & error if block supplied
1079
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse] parsed result object
1080
+ # @yieldparam err [StandardError] error object if request failed
1081
+ #
1082
+ # @return [Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse]
1083
+ #
1084
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1085
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1086
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1087
+ def schedule_project_transfer_config_runs(parent, schedule_transfer_runs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1088
+ command = make_simple_command(:post, 'v1/{+parent}:scheduleRuns', options)
1089
+ command.request_representation = Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsRequest::Representation
1090
+ command.request_object = schedule_transfer_runs_request_object
1091
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse::Representation
1092
+ command.response_class = Google::Apis::BigquerydatatransferV1::ScheduleTransferRunsResponse
1093
+ command.params['parent'] = parent unless parent.nil?
1094
+ command.query['fields'] = fields unless fields.nil?
1095
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1096
+ execute_or_queue_command(command, &block)
1097
+ end
1098
+
1099
+ # Start manual transfer runs to be executed now with schedule_time equal to
1100
+ # current time. The transfer runs can be created for a time range where the
1101
+ # run_time is between start_time (inclusive) and end_time (exclusive), or for a
1102
+ # specific run_time.
1103
+ # @param [String] parent
1104
+ # Transfer configuration name in the form: `projects/`project_id`/
1105
+ # transferConfigs/`config_id`` or `projects/`project_id`/locations/`location_id`/
1106
+ # transferConfigs/`config_id``.
1107
+ # @param [Google::Apis::BigquerydatatransferV1::StartManualTransferRunsRequest] start_manual_transfer_runs_request_object
1108
+ # @param [String] fields
1109
+ # Selector specifying which fields to include in a partial response.
1110
+ # @param [String] quota_user
1111
+ # Available to use for quota purposes for server-side applications. Can be any
1112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1113
+ # @param [Google::Apis::RequestOptions] options
1114
+ # Request-specific options
1115
+ #
1116
+ # @yield [result, err] Result & error if block supplied
1117
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse] parsed result object
1118
+ # @yieldparam err [StandardError] error object if request failed
1119
+ #
1120
+ # @return [Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse]
1121
+ #
1122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1125
+ def start_project_transfer_config_manual_runs(parent, start_manual_transfer_runs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1126
+ command = make_simple_command(:post, 'v1/{+parent}:startManualRuns', options)
1127
+ command.request_representation = Google::Apis::BigquerydatatransferV1::StartManualTransferRunsRequest::Representation
1128
+ command.request_object = start_manual_transfer_runs_request_object
1129
+ command.response_representation = Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse::Representation
1130
+ command.response_class = Google::Apis::BigquerydatatransferV1::StartManualTransferRunsResponse
1131
+ command.params['parent'] = parent unless parent.nil?
1132
+ command.query['fields'] = fields unless fields.nil?
1133
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1134
+ execute_or_queue_command(command, &block)
1135
+ end
1136
+
1137
+ # Deletes the specified transfer run.
1138
+ # @param [String] name
1139
+ # Required. The field will contain name of the resource requested, for example: `
1140
+ # projects/`project_id`/transferConfigs/`config_id`/runs/`run_id`` or `projects/`
1141
+ # project_id`/locations/`location_id`/transferConfigs/`config_id`/runs/`run_id``
1142
+ # @param [String] fields
1143
+ # Selector specifying which fields to include in a partial response.
1144
+ # @param [String] quota_user
1145
+ # Available to use for quota purposes for server-side applications. Can be any
1146
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1147
+ # @param [Google::Apis::RequestOptions] options
1148
+ # Request-specific options
1149
+ #
1150
+ # @yield [result, err] Result & error if block supplied
1151
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::Empty] parsed result object
1152
+ # @yieldparam err [StandardError] error object if request failed
1153
+ #
1154
+ # @return [Google::Apis::BigquerydatatransferV1::Empty]
1155
+ #
1156
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1157
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1158
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1159
+ def delete_project_transfer_config_run(name, fields: nil, quota_user: nil, options: nil, &block)
1160
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1161
+ command.response_representation = Google::Apis::BigquerydatatransferV1::Empty::Representation
1162
+ command.response_class = Google::Apis::BigquerydatatransferV1::Empty
1163
+ command.params['name'] = name unless name.nil?
1164
+ command.query['fields'] = fields unless fields.nil?
1165
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1166
+ execute_or_queue_command(command, &block)
1167
+ end
1168
+
1169
+ # Returns information about the particular transfer run.
1170
+ # @param [String] name
1171
+ # Required. The field will contain name of the resource requested, for example: `
1172
+ # projects/`project_id`/transferConfigs/`config_id`/runs/`run_id`` or `projects/`
1173
+ # project_id`/locations/`location_id`/transferConfigs/`config_id`/runs/`run_id``
1174
+ # @param [String] fields
1175
+ # Selector specifying which fields to include in a partial response.
1176
+ # @param [String] quota_user
1177
+ # Available to use for quota purposes for server-side applications. Can be any
1178
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1179
+ # @param [Google::Apis::RequestOptions] options
1180
+ # Request-specific options
1181
+ #
1182
+ # @yield [result, err] Result & error if block supplied
1183
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::TransferRun] parsed result object
1184
+ # @yieldparam err [StandardError] error object if request failed
1185
+ #
1186
+ # @return [Google::Apis::BigquerydatatransferV1::TransferRun]
1187
+ #
1188
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1189
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1190
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1191
+ def get_project_transfer_config_run(name, fields: nil, quota_user: nil, options: nil, &block)
1192
+ command = make_simple_command(:get, 'v1/{+name}', options)
1193
+ command.response_representation = Google::Apis::BigquerydatatransferV1::TransferRun::Representation
1194
+ command.response_class = Google::Apis::BigquerydatatransferV1::TransferRun
1195
+ command.params['name'] = name unless name.nil?
1196
+ command.query['fields'] = fields unless fields.nil?
1197
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1198
+ execute_or_queue_command(command, &block)
1199
+ end
1200
+
1201
+ # Returns information about running and completed jobs.
1202
+ # @param [String] parent
1203
+ # Required. Name of transfer configuration for which transfer runs should be
1204
+ # retrieved. Format of transfer configuration resource name is: `projects/`
1205
+ # project_id`/transferConfigs/`config_id`` or `projects/`project_id`/locations/`
1206
+ # location_id`/transferConfigs/`config_id``.
1207
+ # @param [Fixnum] page_size
1208
+ # Page size. The default page size is the maximum value of 1000 results.
1209
+ # @param [String] page_token
1210
+ # Pagination token, which can be used to request a specific page of `
1211
+ # ListTransferRunsRequest` list results. For multiple-page results, `
1212
+ # ListTransferRunsResponse` outputs a `next_page` token, which can be used as
1213
+ # the `page_token` value to request the next page of list results.
1214
+ # @param [String] run_attempt
1215
+ # Indicates how run attempts are to be pulled.
1216
+ # @param [Array<String>, String] states
1217
+ # When specified, only transfer runs with requested states are returned.
1218
+ # @param [String] fields
1219
+ # Selector specifying which fields to include in a partial response.
1220
+ # @param [String] quota_user
1221
+ # Available to use for quota purposes for server-side applications. Can be any
1222
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1223
+ # @param [Google::Apis::RequestOptions] options
1224
+ # Request-specific options
1225
+ #
1226
+ # @yield [result, err] Result & error if block supplied
1227
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse] parsed result object
1228
+ # @yieldparam err [StandardError] error object if request failed
1229
+ #
1230
+ # @return [Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse]
1231
+ #
1232
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1233
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1234
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1235
+ def list_project_transfer_config_runs(parent, page_size: nil, page_token: nil, run_attempt: nil, states: nil, fields: nil, quota_user: nil, options: nil, &block)
1236
+ command = make_simple_command(:get, 'v1/{+parent}/runs', options)
1237
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse::Representation
1238
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListTransferRunsResponse
1239
+ command.params['parent'] = parent unless parent.nil?
1240
+ command.query['pageSize'] = page_size unless page_size.nil?
1241
+ command.query['pageToken'] = page_token unless page_token.nil?
1242
+ command.query['runAttempt'] = run_attempt unless run_attempt.nil?
1243
+ command.query['states'] = states unless states.nil?
1244
+ command.query['fields'] = fields unless fields.nil?
1245
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1246
+ execute_or_queue_command(command, &block)
1247
+ end
1248
+
1249
+ # Returns user facing log messages for the data transfer run.
1250
+ # @param [String] parent
1251
+ # Required. Transfer run name in the form: `projects/`project_id`/
1252
+ # transferConfigs/`config_id`/runs/`run_id`` or `projects/`project_id`/locations/
1253
+ # `location_id`/transferConfigs/`config_id`/runs/`run_id``
1254
+ # @param [Array<String>, String] message_types
1255
+ # Message types to return. If not populated - INFO, WARNING and ERROR messages
1256
+ # are returned.
1257
+ # @param [Fixnum] page_size
1258
+ # Page size. The default page size is the maximum value of 1000 results.
1259
+ # @param [String] page_token
1260
+ # Pagination token, which can be used to request a specific page of `
1261
+ # ListTransferLogsRequest` list results. For multiple-page results, `
1262
+ # ListTransferLogsResponse` outputs a `next_page` token, which can be used as
1263
+ # the `page_token` value to request the next page of list results.
1264
+ # @param [String] fields
1265
+ # Selector specifying which fields to include in a partial response.
1266
+ # @param [String] quota_user
1267
+ # Available to use for quota purposes for server-side applications. Can be any
1268
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1269
+ # @param [Google::Apis::RequestOptions] options
1270
+ # Request-specific options
1271
+ #
1272
+ # @yield [result, err] Result & error if block supplied
1273
+ # @yieldparam result [Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse] parsed result object
1274
+ # @yieldparam err [StandardError] error object if request failed
1275
+ #
1276
+ # @return [Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse]
1277
+ #
1278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1281
+ def list_project_transfer_config_run_transfer_logs(parent, message_types: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1282
+ command = make_simple_command(:get, 'v1/{+parent}/transferLogs', options)
1283
+ command.response_representation = Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse::Representation
1284
+ command.response_class = Google::Apis::BigquerydatatransferV1::ListTransferLogsResponse
1285
+ command.params['parent'] = parent unless parent.nil?
1286
+ command.query['messageTypes'] = message_types unless message_types.nil?
1287
+ command.query['pageSize'] = page_size unless page_size.nil?
1288
+ command.query['pageToken'] = page_token unless page_token.nil?
1289
+ command.query['fields'] = fields unless fields.nil?
1290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1291
+ execute_or_queue_command(command, &block)
1292
+ end
1293
+
1294
+ protected
1295
+
1296
+ def apply_command_defaults(command)
1297
+ command.query['key'] = key unless key.nil?
1298
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1299
+ end
1300
+ end
1301
+ end
1302
+ end
1303
+ end