Google Cloud IAM C++ Client  1.35.0
A C++ Client Library for Google Cloud IAM
iam_connection.h
Go to the documentation of this file.
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_IAM_CONNECTION_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_H
21 
22 #include "google/cloud/iam/iam_connection_idempotency_policy.h"
23 #include "google/cloud/iam/internal/iam_retry_traits.h"
24 #include "google/cloud/iam/internal/iam_stub.h"
25 #include "google/cloud/backoff_policy.h"
26 #include "google/cloud/options.h"
27 #include "google/cloud/status_or.h"
28 #include "google/cloud/stream_range.h"
29 #include "google/cloud/version.h"
30 #include <memory>
31 
32 namespace google {
33 namespace cloud {
34 namespace iam {
36 
37 using IAMRetryPolicy = ::google::cloud::internal::TraitBasedRetryPolicy<
38  iam_internal::IAMRetryTraits>;
39 
40 using IAMLimitedTimeRetryPolicy =
41  ::google::cloud::internal::LimitedTimeRetryPolicy<
42  iam_internal::IAMRetryTraits>;
43 
44 using IAMLimitedErrorCountRetryPolicy =
45  ::google::cloud::internal::LimitedErrorCountRetryPolicy<
46  iam_internal::IAMRetryTraits>;
47 
49  public:
50  virtual ~IAMConnection() = 0;
51 
52  virtual StreamRange<google::iam::admin::v1::ServiceAccount>
54  google::iam::admin::v1::ListServiceAccountsRequest request);
55 
56  virtual StatusOr<google::iam::admin::v1::ServiceAccount> GetServiceAccount(
57  google::iam::admin::v1::GetServiceAccountRequest const& request);
58 
59  virtual StatusOr<google::iam::admin::v1::ServiceAccount> CreateServiceAccount(
60  google::iam::admin::v1::CreateServiceAccountRequest const& request);
61 
62  virtual StatusOr<google::iam::admin::v1::ServiceAccount> PatchServiceAccount(
63  google::iam::admin::v1::PatchServiceAccountRequest const& request);
64 
66  google::iam::admin::v1::DeleteServiceAccountRequest const& request);
67 
68  virtual StatusOr<google::iam::admin::v1::UndeleteServiceAccountResponse>
70  google::iam::admin::v1::UndeleteServiceAccountRequest const& request);
71 
73  google::iam::admin::v1::EnableServiceAccountRequest const& request);
74 
76  google::iam::admin::v1::DisableServiceAccountRequest const& request);
77 
78  virtual StatusOr<google::iam::admin::v1::ListServiceAccountKeysResponse>
80  google::iam::admin::v1::ListServiceAccountKeysRequest const& request);
81 
82  virtual StatusOr<google::iam::admin::v1::ServiceAccountKey>
84  google::iam::admin::v1::GetServiceAccountKeyRequest const& request);
85 
86  virtual StatusOr<google::iam::admin::v1::ServiceAccountKey>
88  google::iam::admin::v1::CreateServiceAccountKeyRequest const& request);
89 
90  virtual StatusOr<google::iam::admin::v1::ServiceAccountKey>
92  google::iam::admin::v1::UploadServiceAccountKeyRequest const& request);
93 
95  google::iam::admin::v1::DeleteServiceAccountKeyRequest const& request);
96 
97  virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
98  google::iam::v1::GetIamPolicyRequest const& request);
99 
100  virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
101  google::iam::v1::SetIamPolicyRequest const& request);
102 
103  virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
104  TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const& request);
105 
106  virtual StreamRange<google::iam::admin::v1::Role> QueryGrantableRoles(
107  google::iam::admin::v1::QueryGrantableRolesRequest request);
108 
109  virtual StreamRange<google::iam::admin::v1::Role> ListRoles(
110  google::iam::admin::v1::ListRolesRequest request);
111 
112  virtual StatusOr<google::iam::admin::v1::Role> GetRole(
113  google::iam::admin::v1::GetRoleRequest const& request);
114 
115  virtual StatusOr<google::iam::admin::v1::Role> CreateRole(
116  google::iam::admin::v1::CreateRoleRequest const& request);
117 
118  virtual StatusOr<google::iam::admin::v1::Role> UpdateRole(
119  google::iam::admin::v1::UpdateRoleRequest const& request);
120 
121  virtual StatusOr<google::iam::admin::v1::Role> DeleteRole(
122  google::iam::admin::v1::DeleteRoleRequest const& request);
123 
124  virtual StatusOr<google::iam::admin::v1::Role> UndeleteRole(
125  google::iam::admin::v1::UndeleteRoleRequest const& request);
126 
127  virtual StreamRange<google::iam::admin::v1::Permission>
129  google::iam::admin::v1::QueryTestablePermissionsRequest request);
130 
131  virtual StatusOr<google::iam::admin::v1::QueryAuditableServicesResponse>
133  google::iam::admin::v1::QueryAuditableServicesRequest const& request);
134 
135  virtual StatusOr<google::iam::admin::v1::LintPolicyResponse> LintPolicy(
136  google::iam::admin::v1::LintPolicyRequest const& request);
137 };
138 
139 std::shared_ptr<IAMConnection> MakeIAMConnection(Options options = {});
140 
142 namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls)
143 } // namespace iam
144 } // namespace cloud
145 } // namespace google
146 
147 namespace google {
148 namespace cloud {
149 namespace iam_internal {
151 
152 std::shared_ptr<iam::IAMConnection> MakeIAMConnection(
153  std::shared_ptr<IAMStub> stub, Options options);
154 
156 namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls)
157 } // namespace iam_internal
158 } // namespace cloud
159 } // namespace google
160 
161 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_H