Google Cloud BigQuery C++ Client  2.5.0
A C++ Client Library for Google Cloud BigQuery
mock_data_transfer_connection.h
Go to the documentation of this file.
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_MOCKS_MOCK_DATA_TRANSFER_CONNECTION_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_TRANSFER_CONNECTION_H
21 
22 #include "google/cloud/bigquery/data_transfer_connection.h"
23 #include <gmock/gmock.h>
24 
25 namespace google {
26 namespace cloud {
27 namespace bigquery_mocks {
29 
30 /**
31  * A class to mock `DataTransferServiceConnection`.
32  *
33  * Application developers may want to test their code with simulated responses,
34  * including errors, from an object of type `DataTransferServiceClient`. To do
35  * so, construct an object of type `DataTransferServiceClient` with an instance
36  * of this class. Then use the Google Test framework functions to program the
37  * behavior of this mock.
38  *
39  * @see [This example][bq-mock] for how to test your application with
40  * GoogleTest. While the example showcases types from the BigQuery library, the
41  * underlying principles apply for any pair of `*Client` and `*Connection`.
42  *
43  * [bq-mock]: @googleapis_dev_link{bigquery,bigquery-read-mock.html}
44  */
47  public:
48  MOCK_METHOD(Options, options, (), (override));
49 
50  MOCK_METHOD(
51  StatusOr<google::cloud::bigquery::datatransfer::v1::DataSource>,
52  GetDataSource,
53  (google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const&
54  request),
55  (override));
56 
57  MOCK_METHOD(
58  StreamRange<google::cloud::bigquery::datatransfer::v1::DataSource>,
59  ListDataSources,
60  (google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest
61  request),
62  (override));
63 
64  MOCK_METHOD(
65  StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>,
66  CreateTransferConfig,
67  (google::cloud::bigquery::datatransfer::v1::
68  CreateTransferConfigRequest const& request),
69  (override));
70 
71  MOCK_METHOD(
72  StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>,
73  UpdateTransferConfig,
74  (google::cloud::bigquery::datatransfer::v1::
75  UpdateTransferConfigRequest const& request),
76  (override));
77 
78  MOCK_METHOD(Status, DeleteTransferConfig,
79  (google::cloud::bigquery::datatransfer::v1::
80  DeleteTransferConfigRequest const& request),
81  (override));
82 
83  MOCK_METHOD(
84  StatusOr<google::cloud::bigquery::datatransfer::v1::TransferConfig>,
85  GetTransferConfig,
86  (google::cloud::bigquery::datatransfer::v1::
87  GetTransferConfigRequest const& request),
88  (override));
89 
90  MOCK_METHOD(
91  StreamRange<google::cloud::bigquery::datatransfer::v1::TransferConfig>,
92  ListTransferConfigs,
93  (google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest
94  request),
95  (override));
96 
97  MOCK_METHOD(StatusOr<google::cloud::bigquery::datatransfer::v1::
98  ScheduleTransferRunsResponse>,
99  ScheduleTransferRuns,
100  (google::cloud::bigquery::datatransfer::v1::
101  ScheduleTransferRunsRequest const& request),
102  (override));
103 
104  MOCK_METHOD(StatusOr<google::cloud::bigquery::datatransfer::v1::
105  StartManualTransferRunsResponse>,
106  StartManualTransferRuns,
107  (google::cloud::bigquery::datatransfer::v1::
108  StartManualTransferRunsRequest const& request),
109  (override));
110 
111  MOCK_METHOD(
112  StatusOr<google::cloud::bigquery::datatransfer::v1::TransferRun>,
113  GetTransferRun,
114  (google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const&
115  request),
116  (override));
117 
118  MOCK_METHOD(Status, DeleteTransferRun,
119  (google::cloud::bigquery::datatransfer::v1::
120  DeleteTransferRunRequest const& request),
121  (override));
122 
123  MOCK_METHOD(
124  StreamRange<google::cloud::bigquery::datatransfer::v1::TransferRun>,
125  ListTransferRuns,
126  (google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest
127  request),
128  (override));
129 
130  MOCK_METHOD(
131  StreamRange<google::cloud::bigquery::datatransfer::v1::TransferMessage>,
132  ListTransferLogs,
133  (google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest
134  request),
135  (override));
136 
137  MOCK_METHOD(
138  StatusOr<
139  google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse>,
140  CheckValidCreds,
141  (google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const&
142  request),
143  (override));
144 
145  MOCK_METHOD(Status, EnrollDataSources,
146  (google::cloud::bigquery::datatransfer::v1::
147  EnrollDataSourcesRequest const& request),
148  (override));
149 };
150 
152 } // namespace bigquery_mocks
153 } // namespace cloud
154 } // namespace google
155 
156 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_TRANSFER_CONNECTION_H