Google Cloud BigQuery C++ Client 2.11.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
migration_connection.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_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MIGRATION_CONNECTION_H
21
22#include "google/cloud/bigquery/migration/v2/internal/migration_retry_traits.h"
23#include "google/cloud/bigquery/migration/v2/migration_connection_idempotency_policy.h"
24#include "google/cloud/backoff_policy.h"
25#include "google/cloud/options.h"
26#include "google/cloud/status_or.h"
27#include "google/cloud/stream_range.h"
28#include "google/cloud/version.h"
29#include <google/cloud/bigquery/migration/v2/migration_service.pb.h>
30#include <memory>
31
32namespace google {
33namespace cloud {
34namespace bigquery_migration_v2 {
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
36
37using MigrationServiceRetryPolicy =
38 ::google::cloud::internal::TraitBasedRetryPolicy<
39 bigquery_migration_v2_internal::MigrationServiceRetryTraits>;
40
41using MigrationServiceLimitedTimeRetryPolicy =
42 ::google::cloud::internal::LimitedTimeRetryPolicy<
43 bigquery_migration_v2_internal::MigrationServiceRetryTraits>;
44
45using MigrationServiceLimitedErrorCountRetryPolicy =
46 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47 bigquery_migration_v2_internal::MigrationServiceRetryTraits>;
48
49/**
50 * The `MigrationServiceConnection` object for `MigrationServiceClient`.
51 *
52 * This interface defines virtual methods for each of the user-facing overload
53 * sets in `MigrationServiceClient`. This allows users to inject custom behavior
54 * (e.g., with a Google Mock object) when writing tests that use objects of type
55 * `MigrationServiceClient`.
56 *
57 * To create a concrete instance, see `MakeMigrationServiceConnection()`.
58 *
59 * For mocking, see
60 * `bigquery_migration_v2_mocks::MockMigrationServiceConnection`.
61 */
63 public:
64 virtual ~MigrationServiceConnection() = 0;
65
66 virtual Options options() { return Options{}; }
67
68 virtual StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>
70 CreateMigrationWorkflowRequest const& request);
71
72 virtual StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>
74 google::cloud::bigquery::migration::v2::GetMigrationWorkflowRequest const&
75 request);
76
77 virtual StreamRange<google::cloud::bigquery::migration::v2::MigrationWorkflow>
79 google::cloud::bigquery::migration::v2::ListMigrationWorkflowsRequest
80 request);
81
83 google::cloud::bigquery::migration::v2::
84 DeleteMigrationWorkflowRequest const& request);
85
87 google::cloud::bigquery::migration::v2::
88 StartMigrationWorkflowRequest const& request);
89
90 virtual StatusOr<google::cloud::bigquery::migration::v2::MigrationSubtask>
92 google::cloud::bigquery::migration::v2::GetMigrationSubtaskRequest const&
93 request);
94
95 virtual StreamRange<google::cloud::bigquery::migration::v2::MigrationSubtask>
97 google::cloud::bigquery::migration::v2::ListMigrationSubtasksRequest
98 request);
99};
100
101/**
102 * A factory function to construct an object of type
103 * `MigrationServiceConnection`.
104 *
105 * The returned connection object should not be used directly; instead it
106 * should be passed as an argument to the constructor of MigrationServiceClient.
107 *
108 * The optional @p options argument may be used to configure aspects of the
109 * returned `MigrationServiceConnection`. Expected options are any of the types
110 * in the following option lists:
111 *
112 * - `google::cloud::CommonOptionList`
113 * - `google::cloud::GrpcOptionList`
114 * - `google::cloud::UnifiedCredentialsOptionList`
115 * - `google::cloud::bigquery_migration_v2::MigrationServicePolicyOptionList`
116 *
117 * @note Unexpected options will be ignored. To log unexpected options instead,
118 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
119 *
120 * @param options (optional) Configure the `MigrationServiceConnection` created
121 * by this function.
122 */
124 Options options = {});
125
126GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
127} // namespace bigquery_migration_v2
128} // namespace cloud
129} // namespace google
130
131#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MIGRATION_CONNECTION_H
The MigrationServiceConnection object for MigrationServiceClient.
Definition: migration_connection.h:62
virtual StreamRange< google::cloud::bigquery::migration::v2::MigrationSubtask > ListMigrationSubtasks(google::cloud::bigquery::migration::v2::ListMigrationSubtasksRequest request)
virtual StatusOr< google::cloud::bigquery::migration::v2::MigrationWorkflow > GetMigrationWorkflow(google::cloud::bigquery::migration::v2::GetMigrationWorkflowRequest const &request)
virtual StreamRange< google::cloud::bigquery::migration::v2::MigrationWorkflow > ListMigrationWorkflows(google::cloud::bigquery::migration::v2::ListMigrationWorkflowsRequest request)
virtual StatusOr< google::cloud::bigquery::migration::v2::MigrationSubtask > GetMigrationSubtask(google::cloud::bigquery::migration::v2::GetMigrationSubtaskRequest const &request)
virtual StatusOr< google::cloud::bigquery::migration::v2::MigrationWorkflow > CreateMigrationWorkflow(google::cloud::bigquery::migration::v2::CreateMigrationWorkflowRequest const &request)
virtual Status StartMigrationWorkflow(google::cloud::bigquery::migration::v2::StartMigrationWorkflowRequest const &request)
virtual Status DeleteMigrationWorkflow(google::cloud::bigquery::migration::v2::DeleteMigrationWorkflowRequest const &request)
virtual Options options()
Definition: migration_connection.h:66
Definition: migration_client.h:33
std::shared_ptr< MigrationServiceConnection > MakeMigrationServiceConnection(Options options={})
A factory function to construct an object of type MigrationServiceConnection.
Definition: analytics_hub_client.h:30