Google Cloud BigQuery C++ Client 2.10.1
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
data_transfer_client.h
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Generated by the Codegen C++ plugin.
16// If you make any local changes, they will be lost.
17// source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CLIENT_H
21
22#include "google/cloud/bigquery/datatransfer/v1/data_transfer_connection.h"
23#include "google/cloud/future.h"
24#include "google/cloud/options.h"
25#include "google/cloud/polling_policy.h"
26#include "google/cloud/status_or.h"
27#include "google/cloud/version.h"
28#include <memory>
29
30namespace google {
31namespace cloud {
33GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
34
35///
36/// This API allows users to manage their data transfers into BigQuery.
37///
38/// @par Equality
39///
40/// Instances of this class created via copy-construction or copy-assignment
41/// always compare equal. Instances created with equal
42/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare
43/// equal share the same underlying resources.
44///
45/// @par Performance
46///
47/// Creating a new instance of this class is a relatively expensive operation,
48/// new objects establish new connections to the service. In contrast,
49/// copy-construction, move-construction, and the corresponding assignment
50/// operations are relatively efficient as the copies share all underlying
51/// resources.
52///
53/// @par Thread Safety
54///
55/// Concurrent access to different instances of this class, even if they compare
56/// equal, is guaranteed to work. Two or more threads operating on the same
57/// instance of this class is not guaranteed to work. Since copy-construction
58/// and move-construction is a relatively efficient operation, consider using
59/// such a copy when using this class from multiple threads.
60///
62 public:
64 std::shared_ptr<DataTransferServiceConnection> connection,
65 Options opts = {});
67
68 ///@{
69 /// @name Copy and move support
72 default;
75 ///@}
76
77 ///@{
78 /// @name Equality
79 friend bool operator==(DataTransferServiceClient const& a,
81 return a.connection_ == b.connection_;
82 }
83 friend bool operator!=(DataTransferServiceClient const& a,
85 return !(a == b);
86 }
87 ///@}
88
89 ///
90 /// Retrieves a supported data source and returns its settings.
91 ///
92 /// @param name Required. The field will contain name of the resource
93 /// requested, for
94 /// example: `projects/{project_id}/dataSources/{data_source_id}` or
95 /// `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
96 /// @param opts Optional. Override the class-level options, such as retry and
97 /// backoff policies.
98 /// @return
99 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::DataSource,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
100 ///
101 /// [google.cloud.bigquery.datatransfer.v1.DataSource]:
102 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
103 /// [google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest]:
104 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L430}
105 ///
106 StatusOr<google::cloud::bigquery::datatransfer::v1::DataSource> GetDataSource(
107 std::string const& name, Options opts = {});
108
109 ///
110 /// Retrieves a supported data source and returns its settings.
111 ///
112 /// @param request
113 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L430}
114 /// @param opts Optional. Override the class-level options, such as retry and
115 /// backoff policies.
116 /// @return
117 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::DataSource,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
118 ///
119 /// [google.cloud.bigquery.datatransfer.v1.DataSource]:
120 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
121 /// [google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest]:
122 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L430}
123 ///
124 StatusOr<google::cloud::bigquery::datatransfer::v1::DataSource> GetDataSource(
125 google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const&
126 request,
127 Options opts = {});
128
129 ///
130 /// Lists supported data sources and returns their settings.
131 ///
132 /// @param parent Required. The BigQuery project id for which data sources
133 /// should be
134 /// returned. Must be in the form: `projects/{project_id}` or
135 /// `projects/{project_id}/locations/{location_id}`
136 /// @param opts Optional. Override the class-level options, such as retry and
137 /// backoff policies.
138 /// @return
139 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::DataSource,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
140 ///
141 /// [google.cloud.bigquery.datatransfer.v1.DataSource]:
142 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
143 /// [google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest]:
144 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L443}
145 ///
146 StreamRange<google::cloud::bigquery::datatransfer::v1::DataSource>
147 ListDataSources(std::string const& parent, Options opts = {});
148
149 ///
150 /// Lists supported data sources and returns their settings.
151 ///
152 /// @param request
153 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L443}
154 /// @param opts Optional. Override the class-level options, such as retry and
155 /// backoff policies.
156 /// @return
157 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::DataSource,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
158 ///
159 /// [google.cloud.bigquery.datatransfer.v1.DataSource]:
160 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
161 /// [google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest]:
162 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L443}
163 ///
164 StreamRange<google::cloud::bigquery::datatransfer::v1::DataSource>
166 google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest request,
167 Options opts = {});
168
169 ///
170 /// Creates a new data transfer configuration.
171 ///
172 /// @param parent Required. The BigQuery project id where the transfer
173 /// configuration should
174 /// be created. Must be in the format
175 /// projects/{project_id}/locations/{location_id} or projects/{project_id}.
176 /// If specified location and location of the destination bigquery dataset do
177 /// not match - the request will fail.
178 /// @param transfer_config Required. Data transfer configuration to create.
179 /// @param opts Optional. Override the class-level options, such as retry and
180 /// backoff policies.
181 /// @return
182 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
183 ///
184 /// [google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest]:
185 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L483}
186 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
187 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
188 ///
189 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
191 std::string const& parent,
192 google::cloud::bigquery::datatransfer::v1::TransferConfig const&
193 transfer_config,
194 Options opts = {});
195
196 ///
197 /// Creates a new data transfer configuration.
198 ///
199 /// @param request
200 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::CreateTransferConfigRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L483}
201 /// @param opts Optional. Override the class-level options, such as retry and
202 /// backoff policies.
203 /// @return
204 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
205 ///
206 /// [google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest]:
207 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L483}
208 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
209 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
210 ///
211 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
212 CreateTransferConfig(google::cloud::bigquery::datatransfer::v1::
213 CreateTransferConfigRequest const& request,
214 Options opts = {});
215
216 ///
217 /// Updates a data transfer configuration.
218 /// All fields must be set, even if they are not updated.
219 ///
220 /// @param transfer_config Required. Data transfer configuration to create.
221 /// @param update_mask Required. Required list of fields to be updated in
222 /// this request.
223 /// @param opts Optional. Override the class-level options, such as retry and
224 /// backoff policies.
225 /// @return
226 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
227 ///
228 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
229 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
230 /// [google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest]:
231 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L545}
232 ///
233 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
235 google::cloud::bigquery::datatransfer::v1::TransferConfig const&
236 transfer_config,
237 google::protobuf::FieldMask const& update_mask, Options opts = {});
238
239 ///
240 /// Updates a data transfer configuration.
241 /// All fields must be set, even if they are not updated.
242 ///
243 /// @param request
244 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::UpdateTransferConfigRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L545}
245 /// @param opts Optional. Override the class-level options, such as retry and
246 /// backoff policies.
247 /// @return
248 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
249 ///
250 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
251 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
252 /// [google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest]:
253 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L545}
254 ///
255 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
256 UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::
257 UpdateTransferConfigRequest const& request,
258 Options opts = {});
259
260 ///
261 /// Deletes a data transfer configuration, including any associated transfer
262 /// runs and logs.
263 ///
264 /// @param name Required. The field will contain name of the resource
265 /// requested, for
266 /// example: `projects/{project_id}/transferConfigs/{config_id}` or
267 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
268 /// @param opts Optional. Override the class-level options, such as retry and
269 /// backoff policies.
270 ///
271 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest]:
272 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L612}
273 ///
274 Status DeleteTransferConfig(std::string const& name, Options opts = {});
275
276 ///
277 /// Deletes a data transfer configuration, including any associated transfer
278 /// runs and logs.
279 ///
280 /// @param request
281 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::DeleteTransferConfigRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L612}
282 /// @param opts Optional. Override the class-level options, such as retry and
283 /// backoff policies.
284 ///
285 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest]:
286 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L612}
287 ///
288 Status DeleteTransferConfig(google::cloud::bigquery::datatransfer::v1::
289 DeleteTransferConfigRequest const& request,
290 Options opts = {});
291
292 ///
293 /// Returns information about a data transfer config.
294 ///
295 /// @param name Required. The field will contain name of the resource
296 /// requested, for
297 /// example: `projects/{project_id}/transferConfigs/{config_id}` or
298 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
299 /// @param opts Optional. Override the class-level options, such as retry and
300 /// backoff policies.
301 /// @return
302 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
303 ///
304 /// [google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest]:
305 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L598}
306 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
307 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
308 ///
309 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
310 GetTransferConfig(std::string const& name, Options opts = {});
311
312 ///
313 /// Returns information about a data transfer config.
314 ///
315 /// @param request
316 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L598}
317 /// @param opts Optional. Override the class-level options, such as retry and
318 /// backoff policies.
319 /// @return
320 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
321 ///
322 /// [google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest]:
323 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L598}
324 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
325 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
326 ///
327 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
329 google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest const&
330 request,
331 Options opts = {});
332
333 ///
334 /// Returns information about all transfer configs owned by a project in the
335 /// specified location.
336 ///
337 /// @param parent Required. The BigQuery project id for which transfer
338 /// configs
339 /// should be returned: `projects/{project_id}` or
340 /// `projects/{project_id}/locations/{location_id}`
341 /// @param opts Optional. Override the class-level options, such as retry and
342 /// backoff policies.
343 /// @return
344 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
345 ///
346 /// [google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest]:
347 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L653}
348 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
349 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
350 ///
351 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferConfig>
352 ListTransferConfigs(std::string const& parent, Options opts = {});
353
354 ///
355 /// Returns information about all transfer configs owned by a project in the
356 /// specified location.
357 ///
358 /// @param request
359 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L653}
360 /// @param opts Optional. Override the class-level options, such as retry and
361 /// backoff policies.
362 /// @return
363 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferConfig,google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
364 ///
365 /// [google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest]:
366 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L653}
367 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]:
368 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
369 ///
370 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferConfig>
372 google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest
373 request,
374 Options opts = {});
375
376 ///
377 /// Creates transfer runs for a time range [start_time, end_time].
378 /// For each date - or whatever granularity the data source supports - in the
379 /// range, one transfer run is created.
380 /// Note that runs are created per UTC time in the time range.
381 /// DEPRECATED: use StartManualTransferRuns instead.
382 ///
383 /// @param parent Required. Transfer configuration name in the form:
384 /// `projects/{project_id}/transferConfigs/{config_id}` or
385 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
386 /// @param start_time Required. Start time of the range of transfer runs. For
387 /// example,
388 /// `"2017-05-25T00:00:00+00:00"`.
389 /// @param end_time Required. End time of the range of transfer runs. For
390 /// example,
391 /// `"2017-05-30T00:00:00+00:00"`.
392 /// @param opts Optional. Override the class-level options, such as retry and
393 /// backoff policies.
394 /// @return
395 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L831}
396 ///
397 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest]:
398 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L808}
399 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse]:
400 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L831}
401 ///
402 StatusOr<
403 google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse>
404 ScheduleTransferRuns(std::string const& parent,
405 google::protobuf::Timestamp const& start_time,
406 google::protobuf::Timestamp const& end_time,
407 Options opts = {});
408
409 ///
410 /// Creates transfer runs for a time range [start_time, end_time].
411 /// For each date - or whatever granularity the data source supports - in the
412 /// range, one transfer run is created.
413 /// Note that runs are created per UTC time in the time range.
414 /// DEPRECATED: use StartManualTransferRuns instead.
415 ///
416 /// @param request
417 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L808}
418 /// @param opts Optional. Override the class-level options, such as retry and
419 /// backoff policies.
420 /// @return
421 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L831}
422 ///
423 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest]:
424 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L808}
425 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse]:
426 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L831}
427 ///
428 StatusOr<
429 google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse>
430 ScheduleTransferRuns(google::cloud::bigquery::datatransfer::v1::
431 ScheduleTransferRunsRequest const& request,
432 Options opts = {});
433
434 ///
435 /// Start manual transfer runs to be executed now with schedule_time equal to
436 /// current time. The transfer runs can be created for a time range where the
437 /// run_time is between start_time (inclusive) and end_time (exclusive), or
438 /// for a specific run_time.
439 ///
440 /// @param request
441 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L837}
442 /// @param opts Optional. Override the class-level options, such as retry and
443 /// backoff policies.
444 /// @return
445 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsResponse,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L874}
446 ///
447 /// [google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest]:
448 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L837}
449 /// [google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse]:
450 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L874}
451 ///
452 StatusOr<google::cloud::bigquery::datatransfer::v1::
453 StartManualTransferRunsResponse>
454 StartManualTransferRuns(google::cloud::bigquery::datatransfer::v1::
455 StartManualTransferRunsRequest const& request,
456 Options opts = {});
457
458 ///
459 /// Returns information about the particular transfer run.
460 ///
461 /// @param name Required. The field will contain name of the resource
462 /// requested, for
463 /// example:
464 /// `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
465 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
466 /// @param opts Optional. Override the class-level options, such as retry and
467 /// backoff policies.
468 /// @return
469 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferRun,google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
470 ///
471 /// [google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest]:
472 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L625}
473 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]:
474 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
475 ///
476 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferRun>
477 GetTransferRun(std::string const& name, Options opts = {});
478
479 ///
480 /// Returns information about the particular transfer run.
481 ///
482 /// @param request
483 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L625}
484 /// @param opts Optional. Override the class-level options, such as retry and
485 /// backoff policies.
486 /// @return
487 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferRun,google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
488 ///
489 /// [google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest]:
490 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L625}
491 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]:
492 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
493 ///
494 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferRun>
496 google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const&
497 request,
498 Options opts = {});
499
500 ///
501 /// Deletes the specified transfer run.
502 ///
503 /// @param name Required. The field will contain name of the resource
504 /// requested, for
505 /// example:
506 /// `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
507 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
508 /// @param opts Optional. Override the class-level options, such as retry and
509 /// backoff policies.
510 ///
511 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest]:
512 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L639}
513 ///
514 Status DeleteTransferRun(std::string const& name, Options opts = {});
515
516 ///
517 /// Deletes the specified transfer run.
518 ///
519 /// @param request
520 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L639}
521 /// @param opts Optional. Override the class-level options, such as retry and
522 /// backoff policies.
523 ///
524 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest]:
525 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L639}
526 ///
528 google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest const&
529 request,
530 Options opts = {});
531
532 ///
533 /// Returns information about running and completed transfer runs.
534 ///
535 /// @param parent Required. Name of transfer configuration for which transfer
536 /// runs should be
537 /// retrieved. Format of transfer configuration resource name is:
538 /// `projects/{project_id}/transferConfigs/{config_id}` or
539 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
540 /// @param opts Optional. Override the class-level options, such as retry and
541 /// backoff policies.
542 /// @return
543 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferRun,google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
544 ///
545 /// [google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest]:
546 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L692}
547 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]:
548 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
549 ///
550 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferRun>
551 ListTransferRuns(std::string const& parent, Options opts = {});
552
553 ///
554 /// Returns information about running and completed transfer runs.
555 ///
556 /// @param request
557 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L692}
558 /// @param opts Optional. Override the class-level options, such as retry and
559 /// backoff policies.
560 /// @return
561 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferRun,google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
562 ///
563 /// [google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest]:
564 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L692}
565 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]:
566 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
567 ///
568 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferRun>
570 google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest
571 request,
572 Options opts = {});
573
574 ///
575 /// Returns log messages for the transfer run.
576 ///
577 /// @param parent Required. Transfer run name in the form:
578 /// `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
579 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
580 /// @param opts Optional. Override the class-level options, such as retry and
581 /// backoff policies.
582 /// @return
583 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferMessage,google/cloud/bigquery/datatransfer/v1/transfer.proto#L296}
584 ///
585 /// [google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest]:
586 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L744}
587 /// [google.cloud.bigquery.datatransfer.v1.TransferMessage]:
588 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L296}
589 ///
590 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferMessage>
591 ListTransferLogs(std::string const& parent, Options opts = {});
592
593 ///
594 /// Returns log messages for the transfer run.
595 ///
596 /// @param request
597 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L744}
598 /// @param opts Optional. Override the class-level options, such as retry and
599 /// backoff policies.
600 /// @return
601 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::TransferMessage,google/cloud/bigquery/datatransfer/v1/transfer.proto#L296}
602 ///
603 /// [google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest]:
604 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L744}
605 /// [google.cloud.bigquery.datatransfer.v1.TransferMessage]:
606 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L296}
607 ///
608 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferMessage>
610 google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest
611 request,
612 Options opts = {});
613
614 ///
615 /// Returns true if valid credentials exist for the given data source and
616 /// requesting user.
617 ///
618 /// @param name Required. The data source in the form:
619 /// `projects/{project_id}/dataSources/{data_source_id}` or
620 /// `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
621 /// @param opts Optional. Override the class-level options, such as retry and
622 /// backoff policies.
623 /// @return
624 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L802}
625 ///
626 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest]:
627 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L789}
628 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse]:
629 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L802}
630 ///
631 StatusOr<google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse>
632 CheckValidCreds(std::string const& name, Options opts = {});
633
634 ///
635 /// Returns true if valid credentials exist for the given data source and
636 /// requesting user.
637 ///
638 /// @param request
639 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L789}
640 /// @param opts Optional. Override the class-level options, such as retry and
641 /// backoff policies.
642 /// @return
643 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L802}
644 ///
645 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest]:
646 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L789}
647 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse]:
648 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L802}
649 ///
650 StatusOr<google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse>
652 google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const&
653 request,
654 Options opts = {});
655
656 ///
657 /// Enroll data sources in a user project. This allows users to create
658 /// transfer configurations for these data sources. They will also appear in
659 /// the ListDataSources RPC and as such, will appear in the [BigQuery
660 /// UI](https://console.cloud.google.com/bigquery), and the documents can be
661 /// found in the public guide for [BigQuery Web
662 /// UI](https://cloud.google.com/bigquery/bigquery-web-ui) and [Data Transfer
663 /// Service](https://cloud.google.com/bigquery/docs/working-with-transfers).
664 ///
665 /// @param request
666 /// @googleapis_link{google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest,google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L881}
667 /// @param opts Optional. Override the class-level options, such as retry and
668 /// backoff policies.
669 ///
670 /// [google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest]:
671 /// @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L881}
672 ///
674 google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest const&
675 request,
676 Options opts = {});
677
678 private:
679 std::shared_ptr<DataTransferServiceConnection> connection_;
680 Options options_;
681};
682
683GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
684} // namespace bigquery_datatransfer_v1
685} // namespace cloud
686} // namespace google
687
688#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CLIENT_H
This API allows users to manage their data transfers into BigQuery.
Definition: data_transfer_client.h:61
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferConfig > ListTransferConfigs(google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest request, Options opts={})
Returns information about all transfer configs owned by a project in the specified location.
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferConfig > ListTransferConfigs(std::string const &parent, Options opts={})
Returns information about all transfer configs owned by a project in the specified location.
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferRun > ListTransferRuns(google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest request, Options opts={})
Returns information about running and completed transfer runs.
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferRun > GetTransferRun(std::string const &name, Options opts={})
Returns information about the particular transfer run.
StatusOr< google::cloud::bigquery::datatransfer::v1::DataSource > GetDataSource(std::string const &name, Options opts={})
Retrieves a supported data source and returns its settings.
StatusOr< google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsResponse > StartManualTransferRuns(google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsRequest const &request, Options opts={})
Start manual transfer runs to be executed now with schedule_time equal to current time.
friend bool operator!=(DataTransferServiceClient const &a, DataTransferServiceClient const &b)
Definition: data_transfer_client.h:83
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferRun > GetTransferRun(google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const &request, Options opts={})
Returns information about the particular transfer run.
StatusOr< google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse > ScheduleTransferRuns(std::string const &parent, google::protobuf::Timestamp const &start_time, google::protobuf::Timestamp const &end_time, Options opts={})
Creates transfer runs for a time range [start_time, end_time].
DataTransferServiceClient & operator=(DataTransferServiceClient &&)=default
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::TransferConfig const &transfer_config, google::protobuf::FieldMask const &update_mask, Options opts={})
Updates a data transfer configuration.
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > CreateTransferConfig(std::string const &parent, google::cloud::bigquery::datatransfer::v1::TransferConfig const &transfer_config, Options opts={})
Creates a new data transfer configuration.
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferRun > ListTransferRuns(std::string const &parent, Options opts={})
Returns information about running and completed transfer runs.
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > GetTransferConfig(std::string const &name, Options opts={})
Returns information about a data transfer config.
Status EnrollDataSources(google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest const &request, Options opts={})
Enroll data sources in a user project.
DataTransferServiceClient(DataTransferServiceClient const &)=default
friend bool operator==(DataTransferServiceClient const &a, DataTransferServiceClient const &b)
Definition: data_transfer_client.h:79
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferMessage > ListTransferLogs(google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest request, Options opts={})
Returns log messages for the transfer run.
StreamRange< google::cloud::bigquery::datatransfer::v1::DataSource > ListDataSources(std::string const &parent, Options opts={})
Lists supported data sources and returns their settings.
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > CreateTransferConfig(google::cloud::bigquery::datatransfer::v1::CreateTransferConfigRequest const &request, Options opts={})
Creates a new data transfer configuration.
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::UpdateTransferConfigRequest const &request, Options opts={})
Updates a data transfer configuration.
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > GetTransferConfig(google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest const &request, Options opts={})
Returns information about a data transfer config.
Status DeleteTransferRun(std::string const &name, Options opts={})
Deletes the specified transfer run.
DataTransferServiceClient & operator=(DataTransferServiceClient const &)=default
StreamRange< google::cloud::bigquery::datatransfer::v1::DataSource > ListDataSources(google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest request, Options opts={})
Lists supported data sources and returns their settings.
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferMessage > ListTransferLogs(std::string const &parent, Options opts={})
Returns log messages for the transfer run.
Status DeleteTransferConfig(google::cloud::bigquery::datatransfer::v1::DeleteTransferConfigRequest const &request, Options opts={})
Deletes a data transfer configuration, including any associated transfer runs and logs.
StatusOr< google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse > CheckValidCreds(google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const &request, Options opts={})
Returns true if valid credentials exist for the given data source and requesting user.
DataTransferServiceClient(DataTransferServiceClient &&)=default
StatusOr< google::cloud::bigquery::datatransfer::v1::DataSource > GetDataSource(google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const &request, Options opts={})
Retrieves a supported data source and returns its settings.
StatusOr< google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse > CheckValidCreds(std::string const &name, Options opts={})
Returns true if valid credentials exist for the given data source and requesting user.
StatusOr< google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse > ScheduleTransferRuns(google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsRequest const &request, Options opts={})
Creates transfer runs for a time range [start_time, end_time].
Status DeleteTransferConfig(std::string const &name, Options opts={})
Deletes a data transfer configuration, including any associated transfer runs and logs.
Status DeleteTransferRun(google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest const &request, Options opts={})
Deletes the specified transfer run.
DataTransferServiceClient(std::shared_ptr< DataTransferServiceConnection > connection, Options opts={})
The DataTransferServiceConnection object for DataTransferServiceClient.
Definition: data_transfer_connection.h:62
Definition: data_transfer_client.h:32
Definition: analytics_hub_client.h:30