Google Cloud BigQuery C++ Client 2.11.0
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 // clang-format off
90 ///
91 /// Retrieves a supported data source and returns its settings.
92 ///
93 /// @param name Required. The field will contain name of the resource 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 the result of the RPC. The response message type
99 /// ([google.cloud.bigquery.datatransfer.v1.DataSource])
100 /// is mapped to a C++ class using the [Protobuf mapping rules].
101 /// If the request fails, the [`StatusOr`] contains the error details.
102 ///
103 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
104 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
105 /// [Long Running Operation]: https://google.aip.dev/151
106 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
107 /// [`future`]: @ref google::cloud::future
108 /// [`StatusOr`]: @ref google::cloud::StatusOr
109 /// [`Status`]: @ref google::cloud::Status
110 /// [google.cloud.bigquery.datatransfer.v1.DataSource]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
111 /// [google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L430}
112 ///
113 // clang-format on
114 StatusOr<google::cloud::bigquery::datatransfer::v1::DataSource> GetDataSource(
115 std::string const& name, Options opts = {});
116
117 // clang-format off
118 ///
119 /// Retrieves a supported data source and returns its settings.
120 ///
121 /// @param request Unary RPCs, such as the one wrapped by this
122 /// function, receive a single `request` proto message which includes all
123 /// the inputs for the RPC. In this case, the proto message is a
124 /// [google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest].
125 /// Proto messages are converted to C++ classes by Protobuf, using the
126 /// [Protobuf mapping rules].
127 /// @param opts Optional. Override the class-level options, such as retry and
128 /// backoff policies.
129 /// @return the result of the RPC. The response message type
130 /// ([google.cloud.bigquery.datatransfer.v1.DataSource])
131 /// is mapped to a C++ class using the [Protobuf mapping rules].
132 /// If the request fails, the [`StatusOr`] contains the error details.
133 ///
134 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
135 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
136 /// [Long Running Operation]: https://google.aip.dev/151
137 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
138 /// [`future`]: @ref google::cloud::future
139 /// [`StatusOr`]: @ref google::cloud::StatusOr
140 /// [`Status`]: @ref google::cloud::Status
141 /// [google.cloud.bigquery.datatransfer.v1.DataSource]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
142 /// [google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L430}
143 ///
144 // clang-format on
145 StatusOr<google::cloud::bigquery::datatransfer::v1::DataSource> GetDataSource(
146 google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const&
147 request,
148 Options opts = {});
149
150 // clang-format off
151 ///
152 /// Lists supported data sources and returns their settings.
153 ///
154 /// @param parent Required. The BigQuery project id for which data sources should be
155 /// returned. Must be in the form: `projects/{project_id}` or
156 /// `projects/{project_id}/locations/{location_id}`
157 /// @param opts Optional. Override the class-level options, such as retry and
158 /// backoff policies.
159 /// @return a [StreamRange](@ref google::cloud::StreamRange)
160 /// to iterate of the results. See the documentation of this type for
161 /// details. In brief, this class has `begin()` and `end()` member
162 /// functions returning a iterator class meeting the
163 /// [input iterator requirements]. The value type for this iterator is a
164 /// [`StatusOr`] as the iteration may fail even after some values are
165 /// retrieved successfully, for example, if there is a network disconnect.
166 /// An empty set of results does not indicate an error, it indicates
167 /// that there are no resources meeting the request criteria.
168 /// On a successful iteration the `StatusOr<T>` contains elements of type
169 /// [google.cloud.bigquery.datatransfer.v1.DataSource], or rather,
170 /// the C++ class generated by Protobuf from that type. Please consult the
171 /// Protobuf documentation for details on the [Protobuf mapping rules].
172 ///
173 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
174 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
175 /// [Long Running Operation]: https://google.aip.dev/151
176 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
177 /// [`future`]: @ref google::cloud::future
178 /// [`StatusOr`]: @ref google::cloud::StatusOr
179 /// [`Status`]: @ref google::cloud::Status
180 /// [google.cloud.bigquery.datatransfer.v1.DataSource]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
181 /// [google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L443}
182 ///
183 // clang-format on
184 StreamRange<google::cloud::bigquery::datatransfer::v1::DataSource>
185 ListDataSources(std::string const& parent, Options opts = {});
186
187 // clang-format off
188 ///
189 /// Lists supported data sources and returns their settings.
190 ///
191 /// @param request Unary RPCs, such as the one wrapped by this
192 /// function, receive a single `request` proto message which includes all
193 /// the inputs for the RPC. In this case, the proto message is a
194 /// [google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest].
195 /// Proto messages are converted to C++ classes by Protobuf, using the
196 /// [Protobuf mapping rules].
197 /// @param opts Optional. Override the class-level options, such as retry and
198 /// backoff policies.
199 /// @return a [StreamRange](@ref google::cloud::StreamRange)
200 /// to iterate of the results. See the documentation of this type for
201 /// details. In brief, this class has `begin()` and `end()` member
202 /// functions returning a iterator class meeting the
203 /// [input iterator requirements]. The value type for this iterator is a
204 /// [`StatusOr`] as the iteration may fail even after some values are
205 /// retrieved successfully, for example, if there is a network disconnect.
206 /// An empty set of results does not indicate an error, it indicates
207 /// that there are no resources meeting the request criteria.
208 /// On a successful iteration the `StatusOr<T>` contains elements of type
209 /// [google.cloud.bigquery.datatransfer.v1.DataSource], or rather,
210 /// the C++ class generated by Protobuf from that type. Please consult the
211 /// Protobuf documentation for details on the [Protobuf mapping rules].
212 ///
213 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
214 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
215 /// [Long Running Operation]: https://google.aip.dev/151
216 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
217 /// [`future`]: @ref google::cloud::future
218 /// [`StatusOr`]: @ref google::cloud::StatusOr
219 /// [`Status`]: @ref google::cloud::Status
220 /// [google.cloud.bigquery.datatransfer.v1.DataSource]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L320}
221 /// [google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L443}
222 ///
223 // clang-format on
224 StreamRange<google::cloud::bigquery::datatransfer::v1::DataSource>
226 google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest request,
227 Options opts = {});
228
229 // clang-format off
230 ///
231 /// Creates a new data transfer configuration.
232 ///
233 /// @param parent Required. The BigQuery project id where the transfer configuration should
234 /// be created. Must be in the format
235 /// projects/{project_id}/locations/{location_id} or projects/{project_id}. If
236 /// specified location and location of the destination bigquery dataset do not
237 /// match - the request will fail.
238 /// @param transfer_config Required. Data transfer configuration to create.
239 /// @param opts Optional. Override the class-level options, such as retry and
240 /// backoff policies.
241 /// @return the result of the RPC. The response message type
242 /// ([google.cloud.bigquery.datatransfer.v1.TransferConfig])
243 /// is mapped to a C++ class using the [Protobuf mapping rules].
244 /// If the request fails, the [`StatusOr`] contains the error details.
245 ///
246 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
247 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
248 /// [Long Running Operation]: https://google.aip.dev/151
249 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
250 /// [`future`]: @ref google::cloud::future
251 /// [`StatusOr`]: @ref google::cloud::StatusOr
252 /// [`Status`]: @ref google::cloud::Status
253 /// [google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L483}
254 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
255 ///
256 // clang-format on
257 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
259 std::string const& parent,
260 google::cloud::bigquery::datatransfer::v1::TransferConfig const&
261 transfer_config,
262 Options opts = {});
263
264 // clang-format off
265 ///
266 /// Creates a new data transfer configuration.
267 ///
268 /// @param request Unary RPCs, such as the one wrapped by this
269 /// function, receive a single `request` proto message which includes all
270 /// the inputs for the RPC. In this case, the proto message is a
271 /// [google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest].
272 /// Proto messages are converted to C++ classes by Protobuf, using the
273 /// [Protobuf mapping rules].
274 /// @param opts Optional. Override the class-level options, such as retry and
275 /// backoff policies.
276 /// @return the result of the RPC. The response message type
277 /// ([google.cloud.bigquery.datatransfer.v1.TransferConfig])
278 /// is mapped to a C++ class using the [Protobuf mapping rules].
279 /// If the request fails, the [`StatusOr`] contains the error details.
280 ///
281 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
282 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
283 /// [Long Running Operation]: https://google.aip.dev/151
284 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
285 /// [`future`]: @ref google::cloud::future
286 /// [`StatusOr`]: @ref google::cloud::StatusOr
287 /// [`Status`]: @ref google::cloud::Status
288 /// [google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L483}
289 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
290 ///
291 // clang-format on
292 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
293 CreateTransferConfig(google::cloud::bigquery::datatransfer::v1::
294 CreateTransferConfigRequest const& request,
295 Options opts = {});
296
297 // clang-format off
298 ///
299 /// Updates a data transfer configuration.
300 /// All fields must be set, even if they are not updated.
301 ///
302 /// @param transfer_config Required. Data transfer configuration to create.
303 /// @param update_mask Required. Required list of fields to be updated in this request.
304 /// @param opts Optional. Override the class-level options, such as retry and
305 /// backoff policies.
306 /// @return the result of the RPC. The response message type
307 /// ([google.cloud.bigquery.datatransfer.v1.TransferConfig])
308 /// is mapped to a C++ class using the [Protobuf mapping rules].
309 /// If the request fails, the [`StatusOr`] contains the error details.
310 ///
311 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
312 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
313 /// [Long Running Operation]: https://google.aip.dev/151
314 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
315 /// [`future`]: @ref google::cloud::future
316 /// [`StatusOr`]: @ref google::cloud::StatusOr
317 /// [`Status`]: @ref google::cloud::Status
318 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
319 /// [google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L545}
320 ///
321 // clang-format on
322 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
324 google::cloud::bigquery::datatransfer::v1::TransferConfig const&
325 transfer_config,
326 google::protobuf::FieldMask const& update_mask, Options opts = {});
327
328 // clang-format off
329 ///
330 /// Updates a data transfer configuration.
331 /// All fields must be set, even if they are not updated.
332 ///
333 /// @param request Unary RPCs, such as the one wrapped by this
334 /// function, receive a single `request` proto message which includes all
335 /// the inputs for the RPC. In this case, the proto message is a
336 /// [google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest].
337 /// Proto messages are converted to C++ classes by Protobuf, using the
338 /// [Protobuf mapping rules].
339 /// @param opts Optional. Override the class-level options, such as retry and
340 /// backoff policies.
341 /// @return the result of the RPC. The response message type
342 /// ([google.cloud.bigquery.datatransfer.v1.TransferConfig])
343 /// is mapped to a C++ class using the [Protobuf mapping rules].
344 /// If the request fails, the [`StatusOr`] contains the error details.
345 ///
346 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
347 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
348 /// [Long Running Operation]: https://google.aip.dev/151
349 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
350 /// [`future`]: @ref google::cloud::future
351 /// [`StatusOr`]: @ref google::cloud::StatusOr
352 /// [`Status`]: @ref google::cloud::Status
353 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
354 /// [google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L545}
355 ///
356 // clang-format on
357 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
358 UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::
359 UpdateTransferConfigRequest const& request,
360 Options opts = {});
361
362 // clang-format off
363 ///
364 /// Deletes a data transfer configuration, including any associated transfer
365 /// runs and logs.
366 ///
367 /// @param name Required. The field will contain name of the resource requested, for
368 /// example: `projects/{project_id}/transferConfigs/{config_id}` or
369 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
370 /// @param opts Optional. Override the class-level options, such as retry and
371 /// backoff policies.
372 /// @return a [`Status`] object. If the request failed, the
373 /// status contains the details of the failure.
374 ///
375 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
376 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
377 /// [Long Running Operation]: https://google.aip.dev/151
378 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
379 /// [`future`]: @ref google::cloud::future
380 /// [`StatusOr`]: @ref google::cloud::StatusOr
381 /// [`Status`]: @ref google::cloud::Status
382 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L612}
383 ///
384 // clang-format on
385 Status DeleteTransferConfig(std::string const& name, Options opts = {});
386
387 // clang-format off
388 ///
389 /// Deletes a data transfer configuration, including any associated transfer
390 /// runs and logs.
391 ///
392 /// @param request Unary RPCs, such as the one wrapped by this
393 /// function, receive a single `request` proto message which includes all
394 /// the inputs for the RPC. In this case, the proto message is a
395 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest].
396 /// Proto messages are converted to C++ classes by Protobuf, using the
397 /// [Protobuf mapping rules].
398 /// @param opts Optional. Override the class-level options, such as retry and
399 /// backoff policies.
400 /// @return a [`Status`] object. If the request failed, the
401 /// status contains the details of the failure.
402 ///
403 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
404 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
405 /// [Long Running Operation]: https://google.aip.dev/151
406 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
407 /// [`future`]: @ref google::cloud::future
408 /// [`StatusOr`]: @ref google::cloud::StatusOr
409 /// [`Status`]: @ref google::cloud::Status
410 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L612}
411 ///
412 // clang-format on
413 Status DeleteTransferConfig(google::cloud::bigquery::datatransfer::v1::
414 DeleteTransferConfigRequest const& request,
415 Options opts = {});
416
417 // clang-format off
418 ///
419 /// Returns information about a data transfer config.
420 ///
421 /// @param name Required. The field will contain name of the resource requested, for
422 /// example: `projects/{project_id}/transferConfigs/{config_id}` or
423 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
424 /// @param opts Optional. Override the class-level options, such as retry and
425 /// backoff policies.
426 /// @return the result of the RPC. The response message type
427 /// ([google.cloud.bigquery.datatransfer.v1.TransferConfig])
428 /// is mapped to a C++ class using the [Protobuf mapping rules].
429 /// If the request fails, the [`StatusOr`] contains the error details.
430 ///
431 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
432 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
433 /// [Long Running Operation]: https://google.aip.dev/151
434 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
435 /// [`future`]: @ref google::cloud::future
436 /// [`StatusOr`]: @ref google::cloud::StatusOr
437 /// [`Status`]: @ref google::cloud::Status
438 /// [google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L598}
439 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
440 ///
441 // clang-format on
442 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
443 GetTransferConfig(std::string const& name, Options opts = {});
444
445 // clang-format off
446 ///
447 /// Returns information about a data transfer config.
448 ///
449 /// @param request Unary RPCs, such as the one wrapped by this
450 /// function, receive a single `request` proto message which includes all
451 /// the inputs for the RPC. In this case, the proto message is a
452 /// [google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest].
453 /// Proto messages are converted to C++ classes by Protobuf, using the
454 /// [Protobuf mapping rules].
455 /// @param opts Optional. Override the class-level options, such as retry and
456 /// backoff policies.
457 /// @return the result of the RPC. The response message type
458 /// ([google.cloud.bigquery.datatransfer.v1.TransferConfig])
459 /// is mapped to a C++ class using the [Protobuf mapping rules].
460 /// If the request fails, the [`StatusOr`] contains the error details.
461 ///
462 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
463 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
464 /// [Long Running Operation]: https://google.aip.dev/151
465 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
466 /// [`future`]: @ref google::cloud::future
467 /// [`StatusOr`]: @ref google::cloud::StatusOr
468 /// [`Status`]: @ref google::cloud::Status
469 /// [google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L598}
470 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
471 ///
472 // clang-format on
473 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
475 google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest const&
476 request,
477 Options opts = {});
478
479 // clang-format off
480 ///
481 /// Returns information about all transfer configs owned by a project in the
482 /// specified location.
483 ///
484 /// @param parent Required. The BigQuery project id for which transfer configs
485 /// should be returned: `projects/{project_id}` or
486 /// `projects/{project_id}/locations/{location_id}`
487 /// @param opts Optional. Override the class-level options, such as retry and
488 /// backoff policies.
489 /// @return a [StreamRange](@ref google::cloud::StreamRange)
490 /// to iterate of the results. See the documentation of this type for
491 /// details. In brief, this class has `begin()` and `end()` member
492 /// functions returning a iterator class meeting the
493 /// [input iterator requirements]. The value type for this iterator is a
494 /// [`StatusOr`] as the iteration may fail even after some values are
495 /// retrieved successfully, for example, if there is a network disconnect.
496 /// An empty set of results does not indicate an error, it indicates
497 /// that there are no resources meeting the request criteria.
498 /// On a successful iteration the `StatusOr<T>` contains elements of type
499 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig], or rather,
500 /// the C++ class generated by Protobuf from that type. Please consult the
501 /// Protobuf documentation for details on the [Protobuf mapping rules].
502 ///
503 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
504 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
505 /// [Long Running Operation]: https://google.aip.dev/151
506 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
507 /// [`future`]: @ref google::cloud::future
508 /// [`StatusOr`]: @ref google::cloud::StatusOr
509 /// [`Status`]: @ref google::cloud::Status
510 /// [google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L653}
511 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
512 ///
513 // clang-format on
514 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferConfig>
515 ListTransferConfigs(std::string const& parent, Options opts = {});
516
517 // clang-format off
518 ///
519 /// Returns information about all transfer configs owned by a project in the
520 /// specified location.
521 ///
522 /// @param request Unary RPCs, such as the one wrapped by this
523 /// function, receive a single `request` proto message which includes all
524 /// the inputs for the RPC. In this case, the proto message is a
525 /// [google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest].
526 /// Proto messages are converted to C++ classes by Protobuf, using the
527 /// [Protobuf mapping rules].
528 /// @param opts Optional. Override the class-level options, such as retry and
529 /// backoff policies.
530 /// @return a [StreamRange](@ref google::cloud::StreamRange)
531 /// to iterate of the results. See the documentation of this type for
532 /// details. In brief, this class has `begin()` and `end()` member
533 /// functions returning a iterator class meeting the
534 /// [input iterator requirements]. The value type for this iterator is a
535 /// [`StatusOr`] as the iteration may fail even after some values are
536 /// retrieved successfully, for example, if there is a network disconnect.
537 /// An empty set of results does not indicate an error, it indicates
538 /// that there are no resources meeting the request criteria.
539 /// On a successful iteration the `StatusOr<T>` contains elements of type
540 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig], or rather,
541 /// the C++ class generated by Protobuf from that type. Please consult the
542 /// Protobuf documentation for details on the [Protobuf mapping rules].
543 ///
544 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
545 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
546 /// [Long Running Operation]: https://google.aip.dev/151
547 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
548 /// [`future`]: @ref google::cloud::future
549 /// [`StatusOr`]: @ref google::cloud::StatusOr
550 /// [`Status`]: @ref google::cloud::Status
551 /// [google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L653}
552 /// [google.cloud.bigquery.datatransfer.v1.TransferConfig]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L112}
553 ///
554 // clang-format on
555 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferConfig>
557 google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest
558 request,
559 Options opts = {});
560
561 // clang-format off
562 ///
563 /// Creates transfer runs for a time range [start_time, end_time].
564 /// For each date - or whatever granularity the data source supports - in the
565 /// range, one transfer run is created.
566 /// Note that runs are created per UTC time in the time range.
567 /// DEPRECATED: use StartManualTransferRuns instead.
568 ///
569 /// @param parent Required. Transfer configuration name in the form:
570 /// `projects/{project_id}/transferConfigs/{config_id}` or
571 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
572 /// @param start_time Required. Start time of the range of transfer runs. For example,
573 /// `"2017-05-25T00:00:00+00:00"`.
574 /// @param end_time Required. End time of the range of transfer runs. For example,
575 /// `"2017-05-30T00:00:00+00:00"`.
576 /// @param opts Optional. Override the class-level options, such as retry and
577 /// backoff policies.
578 /// @return the result of the RPC. The response message type
579 /// ([google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse])
580 /// is mapped to a C++ class using the [Protobuf mapping rules].
581 /// If the request fails, the [`StatusOr`] contains the error details.
582 ///
583 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
584 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
585 /// [Long Running Operation]: https://google.aip.dev/151
586 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
587 /// [`future`]: @ref google::cloud::future
588 /// [`StatusOr`]: @ref google::cloud::StatusOr
589 /// [`Status`]: @ref google::cloud::Status
590 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L808}
591 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L831}
592 ///
593 // clang-format on
594 StatusOr<
595 google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse>
596 ScheduleTransferRuns(std::string const& parent,
597 google::protobuf::Timestamp const& start_time,
598 google::protobuf::Timestamp const& end_time,
599 Options opts = {});
600
601 // clang-format off
602 ///
603 /// Creates transfer runs for a time range [start_time, end_time].
604 /// For each date - or whatever granularity the data source supports - in the
605 /// range, one transfer run is created.
606 /// Note that runs are created per UTC time in the time range.
607 /// DEPRECATED: use StartManualTransferRuns instead.
608 ///
609 /// @param request Unary RPCs, such as the one wrapped by this
610 /// function, receive a single `request` proto message which includes all
611 /// the inputs for the RPC. In this case, the proto message is a
612 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest].
613 /// Proto messages are converted to C++ classes by Protobuf, using the
614 /// [Protobuf mapping rules].
615 /// @param opts Optional. Override the class-level options, such as retry and
616 /// backoff policies.
617 /// @return the result of the RPC. The response message type
618 /// ([google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse])
619 /// is mapped to a C++ class using the [Protobuf mapping rules].
620 /// If the request fails, the [`StatusOr`] contains the error details.
621 ///
622 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
623 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
624 /// [Long Running Operation]: https://google.aip.dev/151
625 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
626 /// [`future`]: @ref google::cloud::future
627 /// [`StatusOr`]: @ref google::cloud::StatusOr
628 /// [`Status`]: @ref google::cloud::Status
629 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L808}
630 /// [google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L831}
631 ///
632 // clang-format on
633 StatusOr<
634 google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse>
635 ScheduleTransferRuns(google::cloud::bigquery::datatransfer::v1::
636 ScheduleTransferRunsRequest const& request,
637 Options opts = {});
638
639 // clang-format off
640 ///
641 /// Start manual transfer runs to be executed now with schedule_time equal to
642 /// current time. The transfer runs can be created for a time range where the
643 /// run_time is between start_time (inclusive) and end_time (exclusive), or for
644 /// a specific run_time.
645 ///
646 /// @param request Unary RPCs, such as the one wrapped by this
647 /// function, receive a single `request` proto message which includes all
648 /// the inputs for the RPC. In this case, the proto message is a
649 /// [google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest].
650 /// Proto messages are converted to C++ classes by Protobuf, using the
651 /// [Protobuf mapping rules].
652 /// @param opts Optional. Override the class-level options, such as retry and
653 /// backoff policies.
654 /// @return the result of the RPC. The response message type
655 /// ([google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse])
656 /// is mapped to a C++ class using the [Protobuf mapping rules].
657 /// If the request fails, the [`StatusOr`] contains the error details.
658 ///
659 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
660 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
661 /// [Long Running Operation]: https://google.aip.dev/151
662 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
663 /// [`future`]: @ref google::cloud::future
664 /// [`StatusOr`]: @ref google::cloud::StatusOr
665 /// [`Status`]: @ref google::cloud::Status
666 /// [google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L837}
667 /// [google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L874}
668 ///
669 // clang-format on
670 StatusOr<google::cloud::bigquery::datatransfer::v1::
671 StartManualTransferRunsResponse>
672 StartManualTransferRuns(google::cloud::bigquery::datatransfer::v1::
673 StartManualTransferRunsRequest const& request,
674 Options opts = {});
675
676 // clang-format off
677 ///
678 /// Returns information about the particular transfer run.
679 ///
680 /// @param name Required. The field will contain name of the resource requested, for
681 /// example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`
682 /// or
683 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
684 /// @param opts Optional. Override the class-level options, such as retry and
685 /// backoff policies.
686 /// @return the result of the RPC. The response message type
687 /// ([google.cloud.bigquery.datatransfer.v1.TransferRun])
688 /// is mapped to a C++ class using the [Protobuf mapping rules].
689 /// If the request fails, the [`StatusOr`] contains the error details.
690 ///
691 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
692 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
693 /// [Long Running Operation]: https://google.aip.dev/151
694 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
695 /// [`future`]: @ref google::cloud::future
696 /// [`StatusOr`]: @ref google::cloud::StatusOr
697 /// [`Status`]: @ref google::cloud::Status
698 /// [google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L625}
699 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
700 ///
701 // clang-format on
702 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferRun>
703 GetTransferRun(std::string const& name, Options opts = {});
704
705 // clang-format off
706 ///
707 /// Returns information about the particular transfer run.
708 ///
709 /// @param request Unary RPCs, such as the one wrapped by this
710 /// function, receive a single `request` proto message which includes all
711 /// the inputs for the RPC. In this case, the proto message is a
712 /// [google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest].
713 /// Proto messages are converted to C++ classes by Protobuf, using the
714 /// [Protobuf mapping rules].
715 /// @param opts Optional. Override the class-level options, such as retry and
716 /// backoff policies.
717 /// @return the result of the RPC. The response message type
718 /// ([google.cloud.bigquery.datatransfer.v1.TransferRun])
719 /// is mapped to a C++ class using the [Protobuf mapping rules].
720 /// If the request fails, the [`StatusOr`] contains the error details.
721 ///
722 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
723 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
724 /// [Long Running Operation]: https://google.aip.dev/151
725 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
726 /// [`future`]: @ref google::cloud::future
727 /// [`StatusOr`]: @ref google::cloud::StatusOr
728 /// [`Status`]: @ref google::cloud::Status
729 /// [google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L625}
730 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
731 ///
732 // clang-format on
733 StatusOr<google::cloud::bigquery::datatransfer::v1::TransferRun>
735 google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const&
736 request,
737 Options opts = {});
738
739 // clang-format off
740 ///
741 /// Deletes the specified transfer run.
742 ///
743 /// @param name Required. The field will contain name of the resource requested, for
744 /// example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`
745 /// or
746 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
747 /// @param opts Optional. Override the class-level options, such as retry and
748 /// backoff policies.
749 /// @return a [`Status`] object. If the request failed, the
750 /// status contains the details of the failure.
751 ///
752 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
753 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
754 /// [Long Running Operation]: https://google.aip.dev/151
755 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
756 /// [`future`]: @ref google::cloud::future
757 /// [`StatusOr`]: @ref google::cloud::StatusOr
758 /// [`Status`]: @ref google::cloud::Status
759 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L639}
760 ///
761 // clang-format on
762 Status DeleteTransferRun(std::string const& name, Options opts = {});
763
764 // clang-format off
765 ///
766 /// Deletes the specified transfer run.
767 ///
768 /// @param request Unary RPCs, such as the one wrapped by this
769 /// function, receive a single `request` proto message which includes all
770 /// the inputs for the RPC. In this case, the proto message is a
771 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest].
772 /// Proto messages are converted to C++ classes by Protobuf, using the
773 /// [Protobuf mapping rules].
774 /// @param opts Optional. Override the class-level options, such as retry and
775 /// backoff policies.
776 /// @return a [`Status`] object. If the request failed, the
777 /// status contains the details of the failure.
778 ///
779 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
780 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
781 /// [Long Running Operation]: https://google.aip.dev/151
782 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
783 /// [`future`]: @ref google::cloud::future
784 /// [`StatusOr`]: @ref google::cloud::StatusOr
785 /// [`Status`]: @ref google::cloud::Status
786 /// [google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L639}
787 ///
788 // clang-format on
790 google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest const&
791 request,
792 Options opts = {});
793
794 // clang-format off
795 ///
796 /// Returns information about running and completed transfer runs.
797 ///
798 /// @param parent Required. Name of transfer configuration for which transfer runs should be
799 /// retrieved. Format of transfer configuration resource name is:
800 /// `projects/{project_id}/transferConfigs/{config_id}` or
801 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
802 /// @param opts Optional. Override the class-level options, such as retry and
803 /// backoff policies.
804 /// @return a [StreamRange](@ref google::cloud::StreamRange)
805 /// to iterate of the results. See the documentation of this type for
806 /// details. In brief, this class has `begin()` and `end()` member
807 /// functions returning a iterator class meeting the
808 /// [input iterator requirements]. The value type for this iterator is a
809 /// [`StatusOr`] as the iteration may fail even after some values are
810 /// retrieved successfully, for example, if there is a network disconnect.
811 /// An empty set of results does not indicate an error, it indicates
812 /// that there are no resources meeting the request criteria.
813 /// On a successful iteration the `StatusOr<T>` contains elements of type
814 /// [google.cloud.bigquery.datatransfer.v1.TransferRun], or rather,
815 /// the C++ class generated by Protobuf from that type. Please consult the
816 /// Protobuf documentation for details on the [Protobuf mapping rules].
817 ///
818 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
819 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
820 /// [Long Running Operation]: https://google.aip.dev/151
821 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
822 /// [`future`]: @ref google::cloud::future
823 /// [`StatusOr`]: @ref google::cloud::StatusOr
824 /// [`Status`]: @ref google::cloud::Status
825 /// [google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L692}
826 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
827 ///
828 // clang-format on
829 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferRun>
830 ListTransferRuns(std::string const& parent, Options opts = {});
831
832 // clang-format off
833 ///
834 /// Returns information about running and completed transfer runs.
835 ///
836 /// @param request Unary RPCs, such as the one wrapped by this
837 /// function, receive a single `request` proto message which includes all
838 /// the inputs for the RPC. In this case, the proto message is a
839 /// [google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest].
840 /// Proto messages are converted to C++ classes by Protobuf, using the
841 /// [Protobuf mapping rules].
842 /// @param opts Optional. Override the class-level options, such as retry and
843 /// backoff policies.
844 /// @return a [StreamRange](@ref google::cloud::StreamRange)
845 /// to iterate of the results. See the documentation of this type for
846 /// details. In brief, this class has `begin()` and `end()` member
847 /// functions returning a iterator class meeting the
848 /// [input iterator requirements]. The value type for this iterator is a
849 /// [`StatusOr`] as the iteration may fail even after some values are
850 /// retrieved successfully, for example, if there is a network disconnect.
851 /// An empty set of results does not indicate an error, it indicates
852 /// that there are no resources meeting the request criteria.
853 /// On a successful iteration the `StatusOr<T>` contains elements of type
854 /// [google.cloud.bigquery.datatransfer.v1.TransferRun], or rather,
855 /// the C++ class generated by Protobuf from that type. Please consult the
856 /// Protobuf documentation for details on the [Protobuf mapping rules].
857 ///
858 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
859 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
860 /// [Long Running Operation]: https://google.aip.dev/151
861 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
862 /// [`future`]: @ref google::cloud::future
863 /// [`StatusOr`]: @ref google::cloud::StatusOr
864 /// [`Status`]: @ref google::cloud::Status
865 /// [google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L692}
866 /// [google.cloud.bigquery.datatransfer.v1.TransferRun]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L213}
867 ///
868 // clang-format on
869 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferRun>
871 google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest
872 request,
873 Options opts = {});
874
875 // clang-format off
876 ///
877 /// Returns log messages for the transfer run.
878 ///
879 /// @param parent Required. Transfer run name in the form:
880 /// `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
881 /// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
882 /// @param opts Optional. Override the class-level options, such as retry and
883 /// backoff policies.
884 /// @return a [StreamRange](@ref google::cloud::StreamRange)
885 /// to iterate of the results. See the documentation of this type for
886 /// details. In brief, this class has `begin()` and `end()` member
887 /// functions returning a iterator class meeting the
888 /// [input iterator requirements]. The value type for this iterator is a
889 /// [`StatusOr`] as the iteration may fail even after some values are
890 /// retrieved successfully, for example, if there is a network disconnect.
891 /// An empty set of results does not indicate an error, it indicates
892 /// that there are no resources meeting the request criteria.
893 /// On a successful iteration the `StatusOr<T>` contains elements of type
894 /// [google.cloud.bigquery.datatransfer.v1.TransferMessage], or rather,
895 /// the C++ class generated by Protobuf from that type. Please consult the
896 /// Protobuf documentation for details on the [Protobuf mapping rules].
897 ///
898 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
899 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
900 /// [Long Running Operation]: https://google.aip.dev/151
901 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
902 /// [`future`]: @ref google::cloud::future
903 /// [`StatusOr`]: @ref google::cloud::StatusOr
904 /// [`Status`]: @ref google::cloud::Status
905 /// [google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L744}
906 /// [google.cloud.bigquery.datatransfer.v1.TransferMessage]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L296}
907 ///
908 // clang-format on
909 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferMessage>
910 ListTransferLogs(std::string const& parent, Options opts = {});
911
912 // clang-format off
913 ///
914 /// Returns log messages for the transfer run.
915 ///
916 /// @param request Unary RPCs, such as the one wrapped by this
917 /// function, receive a single `request` proto message which includes all
918 /// the inputs for the RPC. In this case, the proto message is a
919 /// [google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest].
920 /// Proto messages are converted to C++ classes by Protobuf, using the
921 /// [Protobuf mapping rules].
922 /// @param opts Optional. Override the class-level options, such as retry and
923 /// backoff policies.
924 /// @return a [StreamRange](@ref google::cloud::StreamRange)
925 /// to iterate of the results. See the documentation of this type for
926 /// details. In brief, this class has `begin()` and `end()` member
927 /// functions returning a iterator class meeting the
928 /// [input iterator requirements]. The value type for this iterator is a
929 /// [`StatusOr`] as the iteration may fail even after some values are
930 /// retrieved successfully, for example, if there is a network disconnect.
931 /// An empty set of results does not indicate an error, it indicates
932 /// that there are no resources meeting the request criteria.
933 /// On a successful iteration the `StatusOr<T>` contains elements of type
934 /// [google.cloud.bigquery.datatransfer.v1.TransferMessage], or rather,
935 /// the C++ class generated by Protobuf from that type. Please consult the
936 /// Protobuf documentation for details on the [Protobuf mapping rules].
937 ///
938 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
939 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
940 /// [Long Running Operation]: https://google.aip.dev/151
941 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
942 /// [`future`]: @ref google::cloud::future
943 /// [`StatusOr`]: @ref google::cloud::StatusOr
944 /// [`Status`]: @ref google::cloud::Status
945 /// [google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L744}
946 /// [google.cloud.bigquery.datatransfer.v1.TransferMessage]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/transfer.proto#L296}
947 ///
948 // clang-format on
949 StreamRange<google::cloud::bigquery::datatransfer::v1::TransferMessage>
951 google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest
952 request,
953 Options opts = {});
954
955 // clang-format off
956 ///
957 /// Returns true if valid credentials exist for the given data source and
958 /// requesting user.
959 ///
960 /// @param name Required. The data source in the form:
961 /// `projects/{project_id}/dataSources/{data_source_id}` or
962 /// `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
963 /// @param opts Optional. Override the class-level options, such as retry and
964 /// backoff policies.
965 /// @return the result of the RPC. The response message type
966 /// ([google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse])
967 /// is mapped to a C++ class using the [Protobuf mapping rules].
968 /// If the request fails, the [`StatusOr`] contains the error details.
969 ///
970 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
971 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
972 /// [Long Running Operation]: https://google.aip.dev/151
973 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
974 /// [`future`]: @ref google::cloud::future
975 /// [`StatusOr`]: @ref google::cloud::StatusOr
976 /// [`Status`]: @ref google::cloud::Status
977 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L789}
978 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L802}
979 ///
980 // clang-format on
981 StatusOr<google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse>
982 CheckValidCreds(std::string const& name, Options opts = {});
983
984 // clang-format off
985 ///
986 /// Returns true if valid credentials exist for the given data source and
987 /// requesting user.
988 ///
989 /// @param request Unary RPCs, such as the one wrapped by this
990 /// function, receive a single `request` proto message which includes all
991 /// the inputs for the RPC. In this case, the proto message is a
992 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest].
993 /// Proto messages are converted to C++ classes by Protobuf, using the
994 /// [Protobuf mapping rules].
995 /// @param opts Optional. Override the class-level options, such as retry and
996 /// backoff policies.
997 /// @return the result of the RPC. The response message type
998 /// ([google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse])
999 /// is mapped to a C++ class using the [Protobuf mapping rules].
1000 /// If the request fails, the [`StatusOr`] contains the error details.
1001 ///
1002 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1003 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1004 /// [Long Running Operation]: https://google.aip.dev/151
1005 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1006 /// [`future`]: @ref google::cloud::future
1007 /// [`StatusOr`]: @ref google::cloud::StatusOr
1008 /// [`Status`]: @ref google::cloud::Status
1009 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L789}
1010 /// [google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L802}
1011 ///
1012 // clang-format on
1013 StatusOr<google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse>
1015 google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const&
1016 request,
1017 Options opts = {});
1018
1019 // clang-format off
1020 ///
1021 /// Enroll data sources in a user project. This allows users to create transfer
1022 /// configurations for these data sources. They will also appear in the
1023 /// ListDataSources RPC and as such, will appear in the
1024 /// [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents
1025 /// can be found in the public guide for
1026 /// [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and
1027 /// [Data Transfer
1028 /// Service](https://cloud.google.com/bigquery/docs/working-with-transfers).
1029 ///
1030 /// @param request Unary RPCs, such as the one wrapped by this
1031 /// function, receive a single `request` proto message which includes all
1032 /// the inputs for the RPC. In this case, the proto message is a
1033 /// [google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest].
1034 /// Proto messages are converted to C++ classes by Protobuf, using the
1035 /// [Protobuf mapping rules].
1036 /// @param opts Optional. Override the class-level options, such as retry and
1037 /// backoff policies.
1038 /// @return a [`Status`] object. If the request failed, the
1039 /// status contains the details of the failure.
1040 ///
1041 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1042 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1043 /// [Long Running Operation]: https://google.aip.dev/151
1044 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1045 /// [`future`]: @ref google::cloud::future
1046 /// [`StatusOr`]: @ref google::cloud::StatusOr
1047 /// [`Status`]: @ref google::cloud::Status
1048 /// [google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest]: @googleapis_reference_link{google/cloud/bigquery/datatransfer/v1/datatransfer.proto#L881}
1049 ///
1050 // clang-format on
1052 google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest const&
1053 request,
1054 Options opts = {});
1055
1056 private:
1057 std::shared_ptr<DataTransferServiceConnection> connection_;
1058 Options options_;
1059};
1060
1061GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
1062} // namespace bigquery_datatransfer_v1
1063} // namespace cloud
1064} // namespace google
1065
1066#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