Google Cloud Spanner C++ Client 2.13.0
A C++ Client Library for Google Cloud Spanner
Loading...
Searching...
No Matches
mock_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/spanner/admin/instance/v1/spanner_instance_admin.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_MOCKS_MOCK_INSTANCE_ADMIN_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_MOCKS_MOCK_INSTANCE_ADMIN_CONNECTION_H
21
22#include "google/cloud/spanner/admin/instance_admin_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
27namespace spanner_admin_mocks {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `InstanceAdminConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `InstanceAdminClient`. To do so,
35 * construct an object of type `InstanceAdminClient` with an instance of this
36 * class. Then use the Google Test framework functions to program the behavior
37 * 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(StreamRange<google::spanner::admin::instance::v1::InstanceConfig>,
51 ListInstanceConfigs,
52 (google::spanner::admin::instance::v1::ListInstanceConfigsRequest
53 request),
54 (override));
55
56 MOCK_METHOD(
57 StatusOr<google::spanner::admin::instance::v1::InstanceConfig>,
58 GetInstanceConfig,
59 (google::spanner::admin::instance::v1::GetInstanceConfigRequest const&
60 request),
61 (override));
62
63 MOCK_METHOD(
64 future<StatusOr<google::spanner::admin::instance::v1::InstanceConfig>>,
65 CreateInstanceConfig,
66 (google::spanner::admin::instance::v1::CreateInstanceConfigRequest const&
67 request),
68 (override));
69
70 MOCK_METHOD(
71 future<StatusOr<google::spanner::admin::instance::v1::InstanceConfig>>,
72 UpdateInstanceConfig,
73 (google::spanner::admin::instance::v1::UpdateInstanceConfigRequest const&
74 request),
75 (override));
76
77 MOCK_METHOD(
78 Status, DeleteInstanceConfig,
79 (google::spanner::admin::instance::v1::DeleteInstanceConfigRequest const&
80 request),
81 (override));
82
83 MOCK_METHOD(
84 StreamRange<google::longrunning::Operation>, ListInstanceConfigOperations,
85 (google::spanner::admin::instance::v1::ListInstanceConfigOperationsRequest
86 request),
87 (override));
88
89 MOCK_METHOD(
90 StreamRange<google::spanner::admin::instance::v1::Instance>,
91 ListInstances,
92 (google::spanner::admin::instance::v1::ListInstancesRequest request),
93 (override));
94
95 MOCK_METHOD(
96 StatusOr<google::spanner::admin::instance::v1::Instance>, GetInstance,
97 (google::spanner::admin::instance::v1::GetInstanceRequest const& request),
98 (override));
99
100 MOCK_METHOD(
101 future<StatusOr<google::spanner::admin::instance::v1::Instance>>,
102 CreateInstance,
103 (google::spanner::admin::instance::v1::CreateInstanceRequest const&
104 request),
105 (override));
106
107 MOCK_METHOD(
108 future<StatusOr<google::spanner::admin::instance::v1::Instance>>,
109 UpdateInstance,
110 (google::spanner::admin::instance::v1::UpdateInstanceRequest const&
111 request),
112 (override));
113
114 MOCK_METHOD(
115 Status, DeleteInstance,
116 (google::spanner::admin::instance::v1::DeleteInstanceRequest const&
117 request),
118 (override));
119
120 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, SetIamPolicy,
121 (google::iam::v1::SetIamPolicyRequest const& request),
122 (override));
123
124 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, GetIamPolicy,
125 (google::iam::v1::GetIamPolicyRequest const& request),
126 (override));
127
128 MOCK_METHOD(StatusOr<google::iam::v1::TestIamPermissionsResponse>,
129 TestIamPermissions,
130 (google::iam::v1::TestIamPermissionsRequest const& request),
131 (override));
132};
133
134GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
135} // namespace spanner_admin_mocks
136} // namespace cloud
137} // namespace google
138
139#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_MOCKS_MOCK_INSTANCE_ADMIN_CONNECTION_H
friend friend class future
The InstanceAdminConnection object for InstanceAdminClient.
Definition: instance_admin_connection.h:64
A class to mock InstanceAdminConnection.
Definition: mock_instance_admin_connection.h:46
Definition: mock_database_admin_connection.h:27
Definition: database_admin_client.h:34