Google Cloud BigQuery C++ Client 2.10.1
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
data_transfer_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/datatransfer/v1/datatransfer.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CONNECTION_H
21
22#include "google/cloud/bigquery/datatransfer/v1/data_transfer_connection_idempotency_policy.h"
23#include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_retry_traits.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/datatransfer/v1/datatransfer.pb.h>
30#include <memory>
31
32namespace google {
33namespace cloud {
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
36
37using DataTransferServiceRetryPolicy =
38 ::google::cloud::internal::TraitBasedRetryPolicy<
39 bigquery_datatransfer_v1_internal::DataTransferServiceRetryTraits>;
40
41using DataTransferServiceLimitedTimeRetryPolicy =
42 ::google::cloud::internal::LimitedTimeRetryPolicy<
43 bigquery_datatransfer_v1_internal::DataTransferServiceRetryTraits>;
44
45using DataTransferServiceLimitedErrorCountRetryPolicy =
46 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47 bigquery_datatransfer_v1_internal::DataTransferServiceRetryTraits>;
48
49/**
50 * The `DataTransferServiceConnection` object for `DataTransferServiceClient`.
51 *
52 * This interface defines virtual methods for each of the user-facing overload
53 * sets in `DataTransferServiceClient`. This allows users to inject custom
54 * behavior (e.g., with a Google Mock object) when writing tests that use
55 * objects of type `DataTransferServiceClient`.
56 *
57 * To create a concrete instance, see `MakeDataTransferServiceConnection()`.
58 *
59 * For mocking, see
60 * `bigquery_datatransfer_v1_mocks::MockDataTransferServiceConnection`.
61 */
63 public:
64 virtual ~DataTransferServiceConnection() = 0;
65
66 virtual Options options() { return Options{}; }
67
68 virtual StatusOr<google::cloud::bigquery::datatransfer::v1::DataSource>
70 google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const&
71 request);
72
73 virtual StreamRange<google::cloud::bigquery::datatransfer::v1::DataSource>
75 google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest
76 request);
77
78 virtual StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
79 CreateTransferConfig(google::cloud::bigquery::datatransfer::v1::
80 CreateTransferConfigRequest const& request);
81
82 virtual StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
83 UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::
84 UpdateTransferConfigRequest const& request);
85
87 google::cloud::bigquery::datatransfer::v1::
88 DeleteTransferConfigRequest const& request);
89
90 virtual StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>
92 google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest const&
93 request);
94
95 virtual StreamRange<google::cloud::bigquery::datatransfer::v1::TransferConfig>
97 google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest
98 request);
99
100 virtual StatusOr<
101 google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse>
102 ScheduleTransferRuns(google::cloud::bigquery::datatransfer::v1::
103 ScheduleTransferRunsRequest const& request);
104
105 virtual StatusOr<google::cloud::bigquery::datatransfer::v1::
106 StartManualTransferRunsResponse>
107 StartManualTransferRuns(google::cloud::bigquery::datatransfer::v1::
108 StartManualTransferRunsRequest const& request);
109
110 virtual StatusOr<google::cloud::bigquery::datatransfer::v1::TransferRun>
112 google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const&
113 request);
114
116 google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest const&
117 request);
118
119 virtual StreamRange<google::cloud::bigquery::datatransfer::v1::TransferRun>
121 google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest
122 request);
123
124 virtual StreamRange<
125 google::cloud::bigquery::datatransfer::v1::TransferMessage>
127 google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest
128 request);
129
130 virtual StatusOr<
131 google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse>
133 google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const&
134 request);
135
137 google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest const&
138 request);
139};
140
141/**
142 * A factory function to construct an object of type
143 * `DataTransferServiceConnection`.
144 *
145 * The returned connection object should not be used directly; instead it
146 * should be passed as an argument to the constructor of
147 * DataTransferServiceClient.
148 *
149 * The optional @p options argument may be used to configure aspects of the
150 * returned `DataTransferServiceConnection`. Expected options are any of the
151 * types in the following option lists:
152 *
153 * - `google::cloud::CommonOptionList`
154 * - `google::cloud::GrpcOptionList`
155 * - `google::cloud::UnifiedCredentialsOptionList`
156 * -
157 * `google::cloud::bigquery_datatransfer_v1::DataTransferServicePolicyOptionList`
158 *
159 * @note Unexpected options will be ignored. To log unexpected options instead,
160 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
161 *
162 * @param options (optional) Configure the `DataTransferServiceConnection`
163 * created by this function.
164 */
165std::shared_ptr<DataTransferServiceConnection>
167
168GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
169} // namespace bigquery_datatransfer_v1
170} // namespace cloud
171} // namespace google
172
173#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CONNECTION_H
The DataTransferServiceConnection object for DataTransferServiceClient.
Definition: data_transfer_connection.h:62
virtual Options options()
Definition: data_transfer_connection.h:66
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::DataSource > GetDataSource(google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const &request)
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsResponse > StartManualTransferRuns(google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsRequest const &request)
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > GetTransferConfig(google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest const &request)
virtual StreamRange< google::cloud::bigquery::datatransfer::v1::TransferConfig > ListTransferConfigs(google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest request)
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::UpdateTransferConfigRequest const &request)
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > CreateTransferConfig(google::cloud::bigquery::datatransfer::v1::CreateTransferConfigRequest const &request)
virtual Status EnrollDataSources(google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest const &request)
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::TransferRun > GetTransferRun(google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const &request)
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse > CheckValidCreds(google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const &request)
virtual StreamRange< google::cloud::bigquery::datatransfer::v1::TransferRun > ListTransferRuns(google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest request)
virtual StreamRange< google::cloud::bigquery::datatransfer::v1::TransferMessage > ListTransferLogs(google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest request)
virtual Status DeleteTransferRun(google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest const &request)
virtual Status DeleteTransferConfig(google::cloud::bigquery::datatransfer::v1::DeleteTransferConfigRequest const &request)
virtual StreamRange< google::cloud::bigquery::datatransfer::v1::DataSource > ListDataSources(google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest request)
virtual StatusOr< google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse > ScheduleTransferRuns(google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsRequest const &request)
Definition: data_transfer_client.h:32
std::shared_ptr< DataTransferServiceConnection > MakeDataTransferServiceConnection(Options options={})
A factory function to construct an object of type DataTransferServiceConnection.
Definition: analytics_hub_client.h:30