Google Cloud BigQuery C++ Client 2.11.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
migration_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/migration/v2/migration_service.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MIGRATION_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MIGRATION_CLIENT_H
21
22#include "google/cloud/bigquery/migration/v2/migration_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 <map>
29#include <memory>
30
31namespace google {
32namespace cloud {
33namespace bigquery_migration_v2 {
34GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
35
36///
37/// Service to handle EDW migrations.
38///
39/// @par Equality
40///
41/// Instances of this class created via copy-construction or copy-assignment
42/// always compare equal. Instances created with equal
43/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare
44/// equal share the same underlying resources.
45///
46/// @par Performance
47///
48/// Creating a new instance of this class is a relatively expensive operation,
49/// new objects establish new connections to the service. In contrast,
50/// copy-construction, move-construction, and the corresponding assignment
51/// operations are relatively efficient as the copies share all underlying
52/// resources.
53///
54/// @par Thread Safety
55///
56/// Concurrent access to different instances of this class, even if they compare
57/// equal, is guaranteed to work. Two or more threads operating on the same
58/// instance of this class is not guaranteed to work. Since copy-construction
59/// and move-construction is a relatively efficient operation, consider using
60/// such a copy when using this class from multiple threads.
61///
63 public:
65 std::shared_ptr<MigrationServiceConnection> connection,
66 Options opts = {});
68
69 ///@{
70 /// @name Copy and move support
75 ///@}
76
77 ///@{
78 /// @name Equality
79 friend bool operator==(MigrationServiceClient const& a,
80 MigrationServiceClient const& b) {
81 return a.connection_ == b.connection_;
82 }
83 friend bool operator!=(MigrationServiceClient const& a,
84 MigrationServiceClient const& b) {
85 return !(a == b);
86 }
87 ///@}
88
89 // clang-format off
90 ///
91 /// Creates a migration workflow.
92 ///
93 /// @param parent Required. The name of the project to which this migration workflow belongs.
94 /// Example: `projects/foo/locations/bar`
95 /// @param migration_workflow Required. The migration workflow to create.
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.migration.v2.MigrationWorkflow])
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.migration.v2.CreateMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L110}
111 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L36}
112 ///
113 // clang-format on
114 StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>
116 std::string const& parent,
117 google::cloud::bigquery::migration::v2::MigrationWorkflow const&
118 migration_workflow,
119 Options opts = {});
120
121 // clang-format off
122 ///
123 /// Creates a migration workflow.
124 ///
125 /// @param request Unary RPCs, such as the one wrapped by this
126 /// function, receive a single `request` proto message which includes all
127 /// the inputs for the RPC. In this case, the proto message is a
128 /// [google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest].
129 /// Proto messages are converted to C++ classes by Protobuf, using the
130 /// [Protobuf mapping rules].
131 /// @param opts Optional. Override the class-level options, such as retry and
132 /// backoff policies.
133 /// @return the result of the RPC. The response message type
134 /// ([google.cloud.bigquery.migration.v2.MigrationWorkflow])
135 /// is mapped to a C++ class using the [Protobuf mapping rules].
136 /// If the request fails, the [`StatusOr`] contains the error details.
137 ///
138 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
139 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
140 /// [Long Running Operation]: https://google.aip.dev/151
141 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
142 /// [`future`]: @ref google::cloud::future
143 /// [`StatusOr`]: @ref google::cloud::StatusOr
144 /// [`Status`]: @ref google::cloud::Status
145 /// [google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L110}
146 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L36}
147 ///
148 // clang-format on
149 StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>
151 CreateMigrationWorkflowRequest const& request,
152 Options opts = {});
153
154 // clang-format off
155 ///
156 /// Gets a previously created migration workflow.
157 ///
158 /// @param name Required. The unique identifier for the migration workflow.
159 /// Example: `projects/123/locations/us/workflows/1234`
160 /// @param opts Optional. Override the class-level options, such as retry and
161 /// backoff policies.
162 /// @return the result of the RPC. The response message type
163 /// ([google.cloud.bigquery.migration.v2.MigrationWorkflow])
164 /// is mapped to a C++ class using the [Protobuf mapping rules].
165 /// If the request fails, the [`StatusOr`] contains the error details.
166 ///
167 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
168 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
169 /// [Long Running Operation]: https://google.aip.dev/151
170 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
171 /// [`future`]: @ref google::cloud::future
172 /// [`StatusOr`]: @ref google::cloud::StatusOr
173 /// [`Status`]: @ref google::cloud::Status
174 /// [google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L126}
175 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L36}
176 ///
177 // clang-format on
178 StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>
179 GetMigrationWorkflow(std::string const& name, Options opts = {});
180
181 // clang-format off
182 ///
183 /// Gets a previously created migration workflow.
184 ///
185 /// @param request Unary RPCs, such as the one wrapped by this
186 /// function, receive a single `request` proto message which includes all
187 /// the inputs for the RPC. In this case, the proto message is a
188 /// [google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest].
189 /// Proto messages are converted to C++ classes by Protobuf, using the
190 /// [Protobuf mapping rules].
191 /// @param opts Optional. Override the class-level options, such as retry and
192 /// backoff policies.
193 /// @return the result of the RPC. The response message type
194 /// ([google.cloud.bigquery.migration.v2.MigrationWorkflow])
195 /// is mapped to a C++ class using the [Protobuf mapping rules].
196 /// If the request fails, the [`StatusOr`] contains the error details.
197 ///
198 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
199 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
200 /// [Long Running Operation]: https://google.aip.dev/151
201 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
202 /// [`future`]: @ref google::cloud::future
203 /// [`StatusOr`]: @ref google::cloud::StatusOr
204 /// [`Status`]: @ref google::cloud::Status
205 /// [google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L126}
206 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L36}
207 ///
208 // clang-format on
209 StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>
211 google::cloud::bigquery::migration::v2::GetMigrationWorkflowRequest const&
212 request,
213 Options opts = {});
214
215 // clang-format off
216 ///
217 /// Lists previously created migration workflow.
218 ///
219 /// @param parent Required. The project and location of the migration workflows to list.
220 /// Example: `projects/123/locations/us`
221 /// @param opts Optional. Override the class-level options, such as retry and
222 /// backoff policies.
223 /// @return a [StreamRange](@ref google::cloud::StreamRange)
224 /// to iterate of the results. See the documentation of this type for
225 /// details. In brief, this class has `begin()` and `end()` member
226 /// functions returning a iterator class meeting the
227 /// [input iterator requirements]. The value type for this iterator is a
228 /// [`StatusOr`] as the iteration may fail even after some values are
229 /// retrieved successfully, for example, if there is a network disconnect.
230 /// An empty set of results does not indicate an error, it indicates
231 /// that there are no resources meeting the request criteria.
232 /// On a successful iteration the `StatusOr<T>` contains elements of type
233 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow], or rather,
234 /// the C++ class generated by Protobuf from that type. Please consult the
235 /// Protobuf documentation for details on the [Protobuf mapping rules].
236 ///
237 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
238 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
239 /// [Long Running Operation]: https://google.aip.dev/151
240 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
241 /// [`future`]: @ref google::cloud::future
242 /// [`StatusOr`]: @ref google::cloud::StatusOr
243 /// [`Status`]: @ref google::cloud::Status
244 /// [google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L141}
245 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L36}
246 ///
247 // clang-format on
248 StreamRange<google::cloud::bigquery::migration::v2::MigrationWorkflow>
249 ListMigrationWorkflows(std::string const& parent, Options opts = {});
250
251 // clang-format off
252 ///
253 /// Lists previously created migration workflow.
254 ///
255 /// @param request Unary RPCs, such as the one wrapped by this
256 /// function, receive a single `request` proto message which includes all
257 /// the inputs for the RPC. In this case, the proto message is a
258 /// [google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest].
259 /// Proto messages are converted to C++ classes by Protobuf, using the
260 /// [Protobuf mapping rules].
261 /// @param opts Optional. Override the class-level options, such as retry and
262 /// backoff policies.
263 /// @return a [StreamRange](@ref google::cloud::StreamRange)
264 /// to iterate of the results. See the documentation of this type for
265 /// details. In brief, this class has `begin()` and `end()` member
266 /// functions returning a iterator class meeting the
267 /// [input iterator requirements]. The value type for this iterator is a
268 /// [`StatusOr`] as the iteration may fail even after some values are
269 /// retrieved successfully, for example, if there is a network disconnect.
270 /// An empty set of results does not indicate an error, it indicates
271 /// that there are no resources meeting the request criteria.
272 /// On a successful iteration the `StatusOr<T>` contains elements of type
273 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow], or rather,
274 /// the C++ class generated by Protobuf from that type. Please consult the
275 /// Protobuf documentation for details on the [Protobuf mapping rules].
276 ///
277 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
278 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
279 /// [Long Running Operation]: https://google.aip.dev/151
280 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
281 /// [`future`]: @ref google::cloud::future
282 /// [`StatusOr`]: @ref google::cloud::StatusOr
283 /// [`Status`]: @ref google::cloud::Status
284 /// [google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L141}
285 /// [google.cloud.bigquery.migration.v2.MigrationWorkflow]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L36}
286 ///
287 // clang-format on
288 StreamRange<google::cloud::bigquery::migration::v2::MigrationWorkflow>
290 google::cloud::bigquery::migration::v2::ListMigrationWorkflowsRequest
291 request,
292 Options opts = {});
293
294 // clang-format off
295 ///
296 /// Deletes a migration workflow by name.
297 ///
298 /// @param name Required. The unique identifier for the migration workflow.
299 /// Example: `projects/123/locations/us/workflows/1234`
300 /// @param opts Optional. Override the class-level options, such as retry and
301 /// backoff policies.
302 /// @return a [`Status`] object. If the request failed, the
303 /// status contains the details of the failure.
304 ///
305 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
306 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
307 /// [Long Running Operation]: https://google.aip.dev/151
308 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
309 /// [`future`]: @ref google::cloud::future
310 /// [`StatusOr`]: @ref google::cloud::StatusOr
311 /// [`Status`]: @ref google::cloud::Status
312 /// [google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L177}
313 ///
314 // clang-format on
315 Status DeleteMigrationWorkflow(std::string const& name, Options opts = {});
316
317 // clang-format off
318 ///
319 /// Deletes a migration workflow by name.
320 ///
321 /// @param request Unary RPCs, such as the one wrapped by this
322 /// function, receive a single `request` proto message which includes all
323 /// the inputs for the RPC. In this case, the proto message is a
324 /// [google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest].
325 /// Proto messages are converted to C++ classes by Protobuf, using the
326 /// [Protobuf mapping rules].
327 /// @param opts Optional. Override the class-level options, such as retry and
328 /// backoff policies.
329 /// @return a [`Status`] object. If the request failed, the
330 /// status contains the details of the failure.
331 ///
332 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
333 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
334 /// [Long Running Operation]: https://google.aip.dev/151
335 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
336 /// [`future`]: @ref google::cloud::future
337 /// [`StatusOr`]: @ref google::cloud::StatusOr
338 /// [`Status`]: @ref google::cloud::Status
339 /// [google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L177}
340 ///
341 // clang-format on
343 google::cloud::bigquery::migration::v2::
344 DeleteMigrationWorkflowRequest const& request,
345 Options opts = {});
346
347 // clang-format off
348 ///
349 /// Starts a previously created migration workflow. I.e., the state transitions
350 /// from DRAFT to RUNNING. This is a no-op if the state is already RUNNING.
351 /// An error will be signaled if the state is anything other than DRAFT or
352 /// RUNNING.
353 ///
354 /// @param name Required. The unique identifier for the migration workflow.
355 /// Example: `projects/123/locations/us/workflows/1234`
356 /// @param opts Optional. Override the class-level options, such as retry and
357 /// backoff policies.
358 /// @return a [`Status`] object. If the request failed, the
359 /// status contains the details of the failure.
360 ///
361 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
362 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
363 /// [Long Running Operation]: https://google.aip.dev/151
364 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
365 /// [`future`]: @ref google::cloud::future
366 /// [`StatusOr`]: @ref google::cloud::StatusOr
367 /// [`Status`]: @ref google::cloud::Status
368 /// [google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L189}
369 ///
370 // clang-format on
371 Status StartMigrationWorkflow(std::string const& name, Options opts = {});
372
373 // clang-format off
374 ///
375 /// Starts a previously created migration workflow. I.e., the state transitions
376 /// from DRAFT to RUNNING. This is a no-op if the state is already RUNNING.
377 /// An error will be signaled if the state is anything other than DRAFT or
378 /// RUNNING.
379 ///
380 /// @param request Unary RPCs, such as the one wrapped by this
381 /// function, receive a single `request` proto message which includes all
382 /// the inputs for the RPC. In this case, the proto message is a
383 /// [google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest].
384 /// Proto messages are converted to C++ classes by Protobuf, using the
385 /// [Protobuf mapping rules].
386 /// @param opts Optional. Override the class-level options, such as retry and
387 /// backoff policies.
388 /// @return a [`Status`] object. If the request failed, the
389 /// status contains the details of the failure.
390 ///
391 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
392 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
393 /// [Long Running Operation]: https://google.aip.dev/151
394 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
395 /// [`future`]: @ref google::cloud::future
396 /// [`StatusOr`]: @ref google::cloud::StatusOr
397 /// [`Status`]: @ref google::cloud::Status
398 /// [google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L189}
399 ///
400 // clang-format on
402 google::cloud::bigquery::migration::v2::
403 StartMigrationWorkflowRequest const& request,
404 Options opts = {});
405
406 // clang-format off
407 ///
408 /// Gets a previously created migration subtask.
409 ///
410 /// @param name Required. The unique identifier for the migration subtask.
411 /// Example: `projects/123/locations/us/workflows/1234/subtasks/543`
412 /// @param opts Optional. Override the class-level options, such as retry and
413 /// backoff policies.
414 /// @return the result of the RPC. The response message type
415 /// ([google.cloud.bigquery.migration.v2.MigrationSubtask])
416 /// is mapped to a C++ class using the [Protobuf mapping rules].
417 /// If the request fails, the [`StatusOr`] contains the error details.
418 ///
419 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
420 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
421 /// [Long Running Operation]: https://google.aip.dev/151
422 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
423 /// [`future`]: @ref google::cloud::future
424 /// [`StatusOr`]: @ref google::cloud::StatusOr
425 /// [`Status`]: @ref google::cloud::Status
426 /// [google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L201}
427 /// [google.cloud.bigquery.migration.v2.MigrationSubtask]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L160}
428 ///
429 // clang-format on
430 StatusOr<google::cloud::bigquery::migration::v2::MigrationSubtask>
431 GetMigrationSubtask(std::string const& name, Options opts = {});
432
433 // clang-format off
434 ///
435 /// Gets a previously created migration subtask.
436 ///
437 /// @param request Unary RPCs, such as the one wrapped by this
438 /// function, receive a single `request` proto message which includes all
439 /// the inputs for the RPC. In this case, the proto message is a
440 /// [google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest].
441 /// Proto messages are converted to C++ classes by Protobuf, using the
442 /// [Protobuf mapping rules].
443 /// @param opts Optional. Override the class-level options, such as retry and
444 /// backoff policies.
445 /// @return the result of the RPC. The response message type
446 /// ([google.cloud.bigquery.migration.v2.MigrationSubtask])
447 /// is mapped to a C++ class using the [Protobuf mapping rules].
448 /// If the request fails, the [`StatusOr`] contains the error details.
449 ///
450 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
451 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
452 /// [Long Running Operation]: https://google.aip.dev/151
453 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
454 /// [`future`]: @ref google::cloud::future
455 /// [`StatusOr`]: @ref google::cloud::StatusOr
456 /// [`Status`]: @ref google::cloud::Status
457 /// [google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L201}
458 /// [google.cloud.bigquery.migration.v2.MigrationSubtask]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L160}
459 ///
460 // clang-format on
461 StatusOr<google::cloud::bigquery::migration::v2::MigrationSubtask>
463 google::cloud::bigquery::migration::v2::GetMigrationSubtaskRequest const&
464 request,
465 Options opts = {});
466
467 // clang-format off
468 ///
469 /// Lists previously created migration subtasks.
470 ///
471 /// @param parent Required. The migration task of the subtasks to list.
472 /// Example: `projects/123/locations/us/workflows/1234`
473 /// @param opts Optional. Override the class-level options, such as retry and
474 /// backoff policies.
475 /// @return a [StreamRange](@ref google::cloud::StreamRange)
476 /// to iterate of the results. See the documentation of this type for
477 /// details. In brief, this class has `begin()` and `end()` member
478 /// functions returning a iterator class meeting the
479 /// [input iterator requirements]. The value type for this iterator is a
480 /// [`StatusOr`] as the iteration may fail even after some values are
481 /// retrieved successfully, for example, if there is a network disconnect.
482 /// An empty set of results does not indicate an error, it indicates
483 /// that there are no resources meeting the request criteria.
484 /// On a successful iteration the `StatusOr<T>` contains elements of type
485 /// [google.cloud.bigquery.migration.v2.MigrationSubtask], or rather,
486 /// the C++ class generated by Protobuf from that type. Please consult the
487 /// Protobuf documentation for details on the [Protobuf mapping rules].
488 ///
489 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
490 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
491 /// [Long Running Operation]: https://google.aip.dev/151
492 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
493 /// [`future`]: @ref google::cloud::future
494 /// [`StatusOr`]: @ref google::cloud::StatusOr
495 /// [`Status`]: @ref google::cloud::Status
496 /// [google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L217}
497 /// [google.cloud.bigquery.migration.v2.MigrationSubtask]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L160}
498 ///
499 // clang-format on
500 StreamRange<google::cloud::bigquery::migration::v2::MigrationSubtask>
501 ListMigrationSubtasks(std::string const& parent, Options opts = {});
502
503 // clang-format off
504 ///
505 /// Lists previously created migration subtasks.
506 ///
507 /// @param request Unary RPCs, such as the one wrapped by this
508 /// function, receive a single `request` proto message which includes all
509 /// the inputs for the RPC. In this case, the proto message is a
510 /// [google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest].
511 /// Proto messages are converted to C++ classes by Protobuf, using the
512 /// [Protobuf mapping rules].
513 /// @param opts Optional. Override the class-level options, such as retry and
514 /// backoff policies.
515 /// @return a [StreamRange](@ref google::cloud::StreamRange)
516 /// to iterate of the results. See the documentation of this type for
517 /// details. In brief, this class has `begin()` and `end()` member
518 /// functions returning a iterator class meeting the
519 /// [input iterator requirements]. The value type for this iterator is a
520 /// [`StatusOr`] as the iteration may fail even after some values are
521 /// retrieved successfully, for example, if there is a network disconnect.
522 /// An empty set of results does not indicate an error, it indicates
523 /// that there are no resources meeting the request criteria.
524 /// On a successful iteration the `StatusOr<T>` contains elements of type
525 /// [google.cloud.bigquery.migration.v2.MigrationSubtask], or rather,
526 /// the C++ class generated by Protobuf from that type. Please consult the
527 /// Protobuf documentation for details on the [Protobuf mapping rules].
528 ///
529 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
530 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
531 /// [Long Running Operation]: https://google.aip.dev/151
532 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
533 /// [`future`]: @ref google::cloud::future
534 /// [`StatusOr`]: @ref google::cloud::StatusOr
535 /// [`Status`]: @ref google::cloud::Status
536 /// [google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_service.proto#L217}
537 /// [google.cloud.bigquery.migration.v2.MigrationSubtask]: @googleapis_reference_link{google/cloud/bigquery/migration/v2/migration_entities.proto#L160}
538 ///
539 // clang-format on
540 StreamRange<google::cloud::bigquery::migration::v2::MigrationSubtask>
542 google::cloud::bigquery::migration::v2::ListMigrationSubtasksRequest
543 request,
544 Options opts = {});
545
546 private:
547 std::shared_ptr<MigrationServiceConnection> connection_;
548 Options options_;
549};
550
551GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
552} // namespace bigquery_migration_v2
553} // namespace cloud
554} // namespace google
555
556#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MIGRATION_CLIENT_H
Service to handle EDW migrations.
Definition: migration_client.h:62
Status DeleteMigrationWorkflow(google::cloud::bigquery::migration::v2::DeleteMigrationWorkflowRequest const &request, Options opts={})
Deletes a migration workflow by name.
StatusOr< google::cloud::bigquery::migration::v2::MigrationWorkflow > CreateMigrationWorkflow(google::cloud::bigquery::migration::v2::CreateMigrationWorkflowRequest const &request, Options opts={})
Creates a migration workflow.
StatusOr< google::cloud::bigquery::migration::v2::MigrationWorkflow > GetMigrationWorkflow(std::string const &name, Options opts={})
Gets a previously created migration workflow.
StreamRange< google::cloud::bigquery::migration::v2::MigrationSubtask > ListMigrationSubtasks(std::string const &parent, Options opts={})
Lists previously created migration subtasks.
StreamRange< google::cloud::bigquery::migration::v2::MigrationSubtask > ListMigrationSubtasks(google::cloud::bigquery::migration::v2::ListMigrationSubtasksRequest request, Options opts={})
Lists previously created migration subtasks.
MigrationServiceClient & operator=(MigrationServiceClient const &)=default
StatusOr< google::cloud::bigquery::migration::v2::MigrationSubtask > GetMigrationSubtask(google::cloud::bigquery::migration::v2::GetMigrationSubtaskRequest const &request, Options opts={})
Gets a previously created migration subtask.
StreamRange< google::cloud::bigquery::migration::v2::MigrationWorkflow > ListMigrationWorkflows(google::cloud::bigquery::migration::v2::ListMigrationWorkflowsRequest request, Options opts={})
Lists previously created migration workflow.
StatusOr< google::cloud::bigquery::migration::v2::MigrationWorkflow > GetMigrationWorkflow(google::cloud::bigquery::migration::v2::GetMigrationWorkflowRequest const &request, Options opts={})
Gets a previously created migration workflow.
StreamRange< google::cloud::bigquery::migration::v2::MigrationWorkflow > ListMigrationWorkflows(std::string const &parent, Options opts={})
Lists previously created migration workflow.
StatusOr< google::cloud::bigquery::migration::v2::MigrationSubtask > GetMigrationSubtask(std::string const &name, Options opts={})
Gets a previously created migration subtask.
Status DeleteMigrationWorkflow(std::string const &name, Options opts={})
Deletes a migration workflow by name.
Status StartMigrationWorkflow(std::string const &name, Options opts={})
Starts a previously created migration workflow.
StatusOr< google::cloud::bigquery::migration::v2::MigrationWorkflow > CreateMigrationWorkflow(std::string const &parent, google::cloud::bigquery::migration::v2::MigrationWorkflow const &migration_workflow, Options opts={})
Creates a migration workflow.
friend bool operator!=(MigrationServiceClient const &a, MigrationServiceClient const &b)
Definition: migration_client.h:83
MigrationServiceClient(MigrationServiceClient &&)=default
MigrationServiceClient & operator=(MigrationServiceClient &&)=default
MigrationServiceClient(std::shared_ptr< MigrationServiceConnection > connection, Options opts={})
Status StartMigrationWorkflow(google::cloud::bigquery::migration::v2::StartMigrationWorkflowRequest const &request, Options opts={})
Starts a previously created migration workflow.
MigrationServiceClient(MigrationServiceClient const &)=default
friend bool operator==(MigrationServiceClient const &a, MigrationServiceClient const &b)
Definition: migration_client.h:79
The MigrationServiceConnection object for MigrationServiceClient.
Definition: migration_connection.h:62
Definition: migration_client.h:33
Definition: analytics_hub_client.h:30