Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
mock_bigtable_instance_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_instance_admin.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_MOCKS_MOCK_BIGTABLE_INSTANCE_ADMIN_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_MOCKS_MOCK_BIGTABLE_INSTANCE_ADMIN_CONNECTION_H
21
22#include "google/cloud/bigtable/admin/bigtable_instance_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 `BigtableInstanceAdminConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `BigtableInstanceAdminClient`. To do
35 * so, construct an object of type `BigtableInstanceAdminClient` with an
36 * instance of this class. Then use the Google Test framework functions to
37 * program the 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(
51 future<StatusOr<google::bigtable::admin::v2::Instance>>, CreateInstance,
52 (google::bigtable::admin::v2::CreateInstanceRequest const& request),
53 (override));
54
55 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::Instance>, GetInstance,
56 (google::bigtable::admin::v2::GetInstanceRequest const& request),
57 (override));
58
59 MOCK_METHOD(
60 StatusOr<google::bigtable::admin::v2::ListInstancesResponse>,
61 ListInstances,
62 (google::bigtable::admin::v2::ListInstancesRequest const& request),
63 (override));
64
65 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::Instance>, UpdateInstance,
66 (google::bigtable::admin::v2::Instance const& request),
67 (override));
68
69 MOCK_METHOD(future<StatusOr<google::bigtable::admin::v2::Instance>>,
70 PartialUpdateInstance,
71 (google::bigtable::admin::v2::PartialUpdateInstanceRequest const&
72 request),
73 (override));
74
75 MOCK_METHOD(
76 Status, DeleteInstance,
77 (google::bigtable::admin::v2::DeleteInstanceRequest const& request),
78 (override));
79
80 MOCK_METHOD(
81 future<StatusOr<google::bigtable::admin::v2::Cluster>>, CreateCluster,
82 (google::bigtable::admin::v2::CreateClusterRequest const& request),
83 (override));
84
85 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::Cluster>, GetCluster,
86 (google::bigtable::admin::v2::GetClusterRequest const& request),
87 (override));
88
89 MOCK_METHOD(StatusOr<google::bigtable::admin::v2::ListClustersResponse>,
90 ListClusters,
91 (google::bigtable::admin::v2::ListClustersRequest const& request),
92 (override));
93
94 MOCK_METHOD(future<StatusOr<google::bigtable::admin::v2::Cluster>>,
95 UpdateCluster,
96 (google::bigtable::admin::v2::Cluster const& request),
97 (override));
98
99 MOCK_METHOD(
100 future<StatusOr<google::bigtable::admin::v2::Cluster>>,
101 PartialUpdateCluster,
102 (google::bigtable::admin::v2::PartialUpdateClusterRequest const& request),
103 (override));
104
105 MOCK_METHOD(
106 Status, DeleteCluster,
107 (google::bigtable::admin::v2::DeleteClusterRequest const& request),
108 (override));
109
110 MOCK_METHOD(
111 StatusOr<google::bigtable::admin::v2::AppProfile>, CreateAppProfile,
112 (google::bigtable::admin::v2::CreateAppProfileRequest const& request),
113 (override));
114
115 MOCK_METHOD(
116 StatusOr<google::bigtable::admin::v2::AppProfile>, GetAppProfile,
117 (google::bigtable::admin::v2::GetAppProfileRequest const& request),
118 (override));
119
120 MOCK_METHOD(StreamRange<google::bigtable::admin::v2::AppProfile>,
121 ListAppProfiles,
122 (google::bigtable::admin::v2::ListAppProfilesRequest request),
123 (override));
124
125 MOCK_METHOD(
126 future<StatusOr<google::bigtable::admin::v2::AppProfile>>,
127 UpdateAppProfile,
128 (google::bigtable::admin::v2::UpdateAppProfileRequest const& request),
129 (override));
130
131 MOCK_METHOD(
132 Status, DeleteAppProfile,
133 (google::bigtable::admin::v2::DeleteAppProfileRequest const& request),
134 (override));
135
136 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, GetIamPolicy,
137 (google::iam::v1::GetIamPolicyRequest const& request),
138 (override));
139
140 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, SetIamPolicy,
141 (google::iam::v1::SetIamPolicyRequest const& request),
142 (override));
143
144 MOCK_METHOD(StatusOr<google::iam::v1::TestIamPermissionsResponse>,
145 TestIamPermissions,
146 (google::iam::v1::TestIamPermissionsRequest const& request),
147 (override));
148
149 MOCK_METHOD(StreamRange<google::bigtable::admin::v2::HotTablet>,
150 ListHotTablets,
151 (google::bigtable::admin::v2::ListHotTabletsRequest request),
152 (override));
153};
154
155GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
156} // namespace bigtable_admin_mocks
157} // namespace cloud
158} // namespace google
159
160#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_MOCKS_MOCK_BIGTABLE_INSTANCE_ADMIN_CONNECTION_H
The BigtableInstanceAdminConnection object for BigtableInstanceAdminClient.
Definition: bigtable_instance_admin_connection.h:65
A class to mock BigtableInstanceAdminConnection.
Definition: mock_bigtable_instance_admin_connection.h:46
friend friend class future
Definition: mock_bigtable_instance_admin_connection.h:27
Definition: bigtable_instance_admin_client.h:35