Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
mock_bigtable_table_admin_connection.h
1// Copyright 2021 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/bigtable/admin/v2/bigtable_table_admin.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_MOCKS_MOCK_BIGTABLE_TABLE_ADMIN_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_MOCKS_MOCK_BIGTABLE_TABLE_ADMIN_CONNECTION_H
21
22#include "google/cloud/bigtable/admin/bigtable_table_admin_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
27namespace bigtable_admin_mocks {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `BigtableTableAdminConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `BigtableTableAdminClient`. To do
35 * so, construct an object of type `BigtableTableAdminClient` 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 GoogleTest.
40 * While the example showcases types from the BigQuery library, the underlying
41 * principles apply for any pair of `*Client` and `*Connection`.
42 *
43 * [bq-mock]: @cloud_cpp_docs_link{bigquery,bigquery-read-mock}
44 */
47 public:
48 MOCK_METHOD(Options, options, (), (override));
49
50 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::Table>, CreateTable,
51 (google::bigtable::admin::v2::CreateTableRequest const& request),
52 (override));
53
54 MOCK_METHOD(StreamRange<google::bigtable::admin::v2::Table>, ListTables,
55 (google::bigtable::admin::v2::ListTablesRequest request),
56 (override));
57
58 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::Table>, GetTable,
59 (google::bigtable::admin::v2::GetTableRequest const& request),
60 (override));
61
62 MOCK_METHOD(future<StatusOr<google::bigtable::admin::v2::Table>>, UpdateTable,
63 (google::bigtable::admin::v2::UpdateTableRequest const& request),
64 (override));
65
66 MOCK_METHOD(Status, DeleteTable,
67 (google::bigtable::admin::v2::DeleteTableRequest const& request),
68 (override));
69
70 MOCK_METHOD(
71 future<StatusOr<google::bigtable::admin::v2::Table>>, UndeleteTable,
72 (google::bigtable::admin::v2::UndeleteTableRequest const& request),
73 (override));
74
75 MOCK_METHOD(
76 StatusOr<google::bigtable::admin::v2::Table>, ModifyColumnFamilies,
77 (google::bigtable::admin::v2::ModifyColumnFamiliesRequest const& request),
78 (override));
79
80 MOCK_METHOD(Status, DropRowRange,
81 (google::bigtable::admin::v2::DropRowRangeRequest const& request),
82 (override));
83
84 MOCK_METHOD(
85 StatusOr<google::bigtable::admin::v2::GenerateConsistencyTokenResponse>,
86 GenerateConsistencyToken,
87 (google::bigtable::admin::v2::GenerateConsistencyTokenRequest const&
88 request),
89 (override));
90
91 MOCK_METHOD(
92 StatusOr<google::bigtable::admin::v2::CheckConsistencyResponse>,
93 CheckConsistency,
94 (google::bigtable::admin::v2::CheckConsistencyRequest const& request),
95 (override));
96
97 MOCK_METHOD(future<StatusOr<google::bigtable::admin::v2::Backup>>,
98 CreateBackup,
99 (google::bigtable::admin::v2::CreateBackupRequest const& request),
100 (override));
101
102 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::Backup>, GetBackup,
103 (google::bigtable::admin::v2::GetBackupRequest const& request),
104 (override));
105
106 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::Backup>, UpdateBackup,
107 (google::bigtable::admin::v2::UpdateBackupRequest const& request),
108 (override));
109
110 MOCK_METHOD(Status, DeleteBackup,
111 (google::bigtable::admin::v2::DeleteBackupRequest const& request),
112 (override));
113
114 MOCK_METHOD(StreamRange<google::bigtable::admin::v2::Backup>, ListBackups,
115 (google::bigtable::admin::v2::ListBackupsRequest request),
116 (override));
117
118 MOCK_METHOD(future<StatusOr<google::bigtable::admin::v2::Table>>,
119 RestoreTable,
120 (google::bigtable::admin::v2::RestoreTableRequest const& request),
121 (override));
122
123 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, GetIamPolicy,
124 (google::iam::v1::GetIamPolicyRequest const& request),
125 (override));
126
127 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, SetIamPolicy,
128 (google::iam::v1::SetIamPolicyRequest const& request),
129 (override));
130
131 MOCK_METHOD(StatusOr<google::iam::v1::TestIamPermissionsResponse>,
132 TestIamPermissions,
133 (google::iam::v1::TestIamPermissionsRequest const& request),
134 (override));
135
136 MOCK_METHOD(
137 future<StatusOr<google::bigtable::admin::v2::CheckConsistencyResponse>>,
138 AsyncCheckConsistency,
139 (google::bigtable::admin::v2::CheckConsistencyRequest const& request),
140 (override));
141};
142
143GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
144} // namespace bigtable_admin_mocks
145} // namespace cloud
146} // namespace google
147
148#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_MOCKS_MOCK_BIGTABLE_TABLE_ADMIN_CONNECTION_H
The BigtableTableAdminConnection object for BigtableTableAdminClient.
Definition: bigtable_table_admin_connection.h:64
A class to mock BigtableTableAdminConnection.
Definition: mock_bigtable_table_admin_connection.h:46
friend friend class future
Definition: mock_bigtable_instance_admin_connection.h:27
Definition: bigtable_instance_admin_client.h:35