Google Cloud IAM C++ Client 2.13.0
A C++ Client Library for Google Cloud IAM
Loading...
Searching...
No Matches
mock_iam_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/iam/admin/v1/iam.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_MOCKS_MOCK_IAM_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_MOCKS_MOCK_IAM_CONNECTION_H
21
22#include "google/cloud/iam/admin/v1/iam_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
27namespace iam_admin_v1_mocks {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `IAMConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `IAMClient`. To do so,
35 * construct an object of type `IAMClient` 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 */
46 public:
47 MOCK_METHOD(Options, options, (), (override));
48
49 MOCK_METHOD(StreamRange<google::iam::admin::v1::ServiceAccount>,
50 ListServiceAccounts,
51 (google::iam::admin::v1::ListServiceAccountsRequest request),
52 (override));
53
54 MOCK_METHOD(StatusOr<google::iam::admin::v1::ServiceAccount>,
55 GetServiceAccount,
56 (google::iam::admin::v1::GetServiceAccountRequest const& request),
57 (override));
58
59 MOCK_METHOD(
60 StatusOr<google::iam::admin::v1::ServiceAccount>, CreateServiceAccount,
61 (google::iam::admin::v1::CreateServiceAccountRequest const& request),
62 (override));
63
64 MOCK_METHOD(
65 StatusOr<google::iam::admin::v1::ServiceAccount>, PatchServiceAccount,
66 (google::iam::admin::v1::PatchServiceAccountRequest const& request),
67 (override));
68
69 MOCK_METHOD(
70 Status, DeleteServiceAccount,
71 (google::iam::admin::v1::DeleteServiceAccountRequest const& request),
72 (override));
73
74 MOCK_METHOD(
75 StatusOr<google::iam::admin::v1::UndeleteServiceAccountResponse>,
76 UndeleteServiceAccount,
77 (google::iam::admin::v1::UndeleteServiceAccountRequest const& request),
78 (override));
79
80 MOCK_METHOD(
81 Status, EnableServiceAccount,
82 (google::iam::admin::v1::EnableServiceAccountRequest const& request),
83 (override));
84
85 MOCK_METHOD(
86 Status, DisableServiceAccount,
87 (google::iam::admin::v1::DisableServiceAccountRequest const& request),
88 (override));
89
90 MOCK_METHOD(
91 StatusOr<google::iam::admin::v1::ListServiceAccountKeysResponse>,
92 ListServiceAccountKeys,
93 (google::iam::admin::v1::ListServiceAccountKeysRequest const& request),
94 (override));
95
96 MOCK_METHOD(
97 StatusOr<google::iam::admin::v1::ServiceAccountKey>, GetServiceAccountKey,
98 (google::iam::admin::v1::GetServiceAccountKeyRequest const& request),
99 (override));
100
101 MOCK_METHOD(
102 StatusOr<google::iam::admin::v1::ServiceAccountKey>,
103 CreateServiceAccountKey,
104 (google::iam::admin::v1::CreateServiceAccountKeyRequest const& request),
105 (override));
106
107 MOCK_METHOD(
108 StatusOr<google::iam::admin::v1::ServiceAccountKey>,
109 UploadServiceAccountKey,
110 (google::iam::admin::v1::UploadServiceAccountKeyRequest const& request),
111 (override));
112
113 MOCK_METHOD(
114 Status, DeleteServiceAccountKey,
115 (google::iam::admin::v1::DeleteServiceAccountKeyRequest const& request),
116 (override));
117
118 MOCK_METHOD(
119 Status, DisableServiceAccountKey,
120 (google::iam::admin::v1::DisableServiceAccountKeyRequest const& request),
121 (override));
122
123 MOCK_METHOD(
124 Status, EnableServiceAccountKey,
125 (google::iam::admin::v1::EnableServiceAccountKeyRequest const& request),
126 (override));
127
128 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, GetIamPolicy,
129 (google::iam::v1::GetIamPolicyRequest const& request),
130 (override));
131
132 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, SetIamPolicy,
133 (google::iam::v1::SetIamPolicyRequest const& request),
134 (override));
135
136 MOCK_METHOD(StatusOr<google::iam::v1::TestIamPermissionsResponse>,
137 TestIamPermissions,
138 (google::iam::v1::TestIamPermissionsRequest const& request),
139 (override));
140
141 MOCK_METHOD(StreamRange<google::iam::admin::v1::Role>, QueryGrantableRoles,
142 (google::iam::admin::v1::QueryGrantableRolesRequest request),
143 (override));
144
145 MOCK_METHOD(StreamRange<google::iam::admin::v1::Role>, ListRoles,
146 (google::iam::admin::v1::ListRolesRequest request), (override));
147
148 MOCK_METHOD(StatusOr<google::iam::admin::v1::Role>, GetRole,
149 (google::iam::admin::v1::GetRoleRequest const& request),
150 (override));
151
152 MOCK_METHOD(StatusOr<google::iam::admin::v1::Role>, CreateRole,
153 (google::iam::admin::v1::CreateRoleRequest const& request),
154 (override));
155
156 MOCK_METHOD(StatusOr<google::iam::admin::v1::Role>, UpdateRole,
157 (google::iam::admin::v1::UpdateRoleRequest const& request),
158 (override));
159
160 MOCK_METHOD(StatusOr<google::iam::admin::v1::Role>, DeleteRole,
161 (google::iam::admin::v1::DeleteRoleRequest const& request),
162 (override));
163
164 MOCK_METHOD(StatusOr<google::iam::admin::v1::Role>, UndeleteRole,
165 (google::iam::admin::v1::UndeleteRoleRequest const& request),
166 (override));
167
168 MOCK_METHOD(StreamRange<google::iam::admin::v1::Permission>,
169 QueryTestablePermissions,
170 (google::iam::admin::v1::QueryTestablePermissionsRequest request),
171 (override));
172
173 MOCK_METHOD(
174 StatusOr<google::iam::admin::v1::QueryAuditableServicesResponse>,
175 QueryAuditableServices,
176 (google::iam::admin::v1::QueryAuditableServicesRequest const& request),
177 (override));
178
179 MOCK_METHOD(StatusOr<google::iam::admin::v1::LintPolicyResponse>, LintPolicy,
180 (google::iam::admin::v1::LintPolicyRequest const& request),
181 (override));
182};
183
184GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
185} // namespace iam_admin_v1_mocks
186} // namespace cloud
187} // namespace google
188
189#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_MOCKS_MOCK_IAM_CONNECTION_H
The IAMConnection object for IAMClient.
Definition: iam_connection.h:60
A class to mock IAMConnection.
Definition: mock_iam_connection.h:45
Definition: mock_iam_connection.h:27
Definition: iam_client.h:33