1use trellis_client::TrellisClientError;
4
5pub struct AuthClient<'a> {
7 inner: &'a trellis_client::TrellisClient,
8}
9
10impl<'a> AuthClient<'a> {
11 pub fn new(inner: &'a trellis_client::TrellisClient) -> Self {
13 Self { inner }
14 }
15
16 pub async fn auth_activate_workload(&self, input: &crate::types::AuthActivateWorkloadRequest) -> Result<crate::types::AuthActivateWorkloadResponse, TrellisClientError> {
18 self.inner.call::<crate::rpc::AuthActivateWorkloadRpc>(input).await
19 }
20
21 pub async fn auth_clear_login_portal_selection(&self, input: &crate::types::AuthClearLoginPortalSelectionRequest) -> Result<crate::types::AuthClearLoginPortalSelectionResponse, TrellisClientError> {
23 self.inner.call::<crate::rpc::AuthClearLoginPortalSelectionRpc>(input).await
24 }
25
26 pub async fn auth_clear_workload_portal_selection(&self, input: &crate::types::AuthClearWorkloadPortalSelectionRequest) -> Result<crate::types::AuthClearWorkloadPortalSelectionResponse, TrellisClientError> {
28 self.inner.call::<crate::rpc::AuthClearWorkloadPortalSelectionRpc>(input).await
29 }
30
31 pub async fn auth_create_portal(&self, input: &crate::types::AuthCreatePortalRequest) -> Result<crate::types::AuthCreatePortalResponse, TrellisClientError> {
33 self.inner.call::<crate::rpc::AuthCreatePortalRpc>(input).await
34 }
35
36 pub async fn auth_create_workload_profile(&self, input: &crate::types::AuthCreateWorkloadProfileRequest) -> Result<crate::types::AuthCreateWorkloadProfileResponse, TrellisClientError> {
38 self.inner.call::<crate::rpc::AuthCreateWorkloadProfileRpc>(input).await
39 }
40
41 pub async fn auth_decide_workload_activation_review(&self, input: &crate::types::AuthDecideWorkloadActivationReviewRequest) -> Result<crate::types::AuthDecideWorkloadActivationReviewResponse, TrellisClientError> {
43 self.inner.call::<crate::rpc::AuthDecideWorkloadActivationReviewRpc>(input).await
44 }
45
46 pub async fn auth_disable_portal(&self, input: &crate::types::AuthDisablePortalRequest) -> Result<crate::types::AuthDisablePortalResponse, TrellisClientError> {
48 self.inner.call::<crate::rpc::AuthDisablePortalRpc>(input).await
49 }
50
51 pub async fn auth_disable_workload_instance(&self, input: &crate::types::AuthDisableWorkloadInstanceRequest) -> Result<crate::types::AuthDisableWorkloadInstanceResponse, TrellisClientError> {
53 self.inner.call::<crate::rpc::AuthDisableWorkloadInstanceRpc>(input).await
54 }
55
56 pub async fn auth_disable_workload_profile(&self, input: &crate::types::AuthDisableWorkloadProfileRequest) -> Result<crate::types::AuthDisableWorkloadProfileResponse, TrellisClientError> {
58 self.inner.call::<crate::rpc::AuthDisableWorkloadProfileRpc>(input).await
59 }
60
61 pub async fn auth_get_installed_contract(&self, input: &crate::types::AuthGetInstalledContractRequest) -> Result<crate::types::AuthGetInstalledContractResponse, TrellisClientError> {
63 self.inner.call::<crate::rpc::AuthGetInstalledContractRpc>(input).await
64 }
65
66 pub async fn auth_get_login_portal_default(&self) -> Result<crate::types::AuthGetLoginPortalDefaultResponse, TrellisClientError> {
68 self.inner.call::<crate::rpc::AuthGetLoginPortalDefaultRpc>(&crate::rpc::Empty {}).await
69 }
70
71 pub async fn auth_get_workload_activation_status(&self, input: &crate::types::AuthGetWorkloadActivationStatusRequest) -> Result<crate::types::AuthGetWorkloadActivationStatusResponse, TrellisClientError> {
73 self.inner.call::<crate::rpc::AuthGetWorkloadActivationStatusRpc>(input).await
74 }
75
76 pub async fn auth_get_workload_connect_info(&self, input: &crate::types::AuthGetWorkloadConnectInfoRequest) -> Result<crate::types::AuthGetWorkloadConnectInfoResponse, TrellisClientError> {
78 self.inner.call::<crate::rpc::AuthGetWorkloadConnectInfoRpc>(input).await
79 }
80
81 pub async fn auth_get_workload_portal_default(&self) -> Result<crate::types::AuthGetWorkloadPortalDefaultResponse, TrellisClientError> {
83 self.inner.call::<crate::rpc::AuthGetWorkloadPortalDefaultRpc>(&crate::rpc::Empty {}).await
84 }
85
86 pub async fn auth_health(&self) -> Result<crate::types::AuthHealthResponse, TrellisClientError> {
88 self.inner.call::<crate::rpc::AuthHealthRpc>(&crate::rpc::Empty {}).await
89 }
90
91 pub async fn auth_install_service(&self, input: &crate::types::AuthInstallServiceRequest) -> Result<crate::types::AuthInstallServiceResponse, TrellisClientError> {
93 self.inner.call::<crate::rpc::AuthInstallServiceRpc>(input).await
94 }
95
96 pub async fn auth_kick_connection(&self, input: &crate::types::AuthKickConnectionRequest) -> Result<crate::types::AuthKickConnectionResponse, TrellisClientError> {
98 self.inner.call::<crate::rpc::AuthKickConnectionRpc>(input).await
99 }
100
101 pub async fn auth_list_approvals(&self, input: &crate::types::AuthListApprovalsRequest) -> Result<crate::types::AuthListApprovalsResponse, TrellisClientError> {
103 self.inner.call::<crate::rpc::AuthListApprovalsRpc>(input).await
104 }
105
106 pub async fn auth_list_connections(&self, input: &crate::types::AuthListConnectionsRequest) -> Result<crate::types::AuthListConnectionsResponse, TrellisClientError> {
108 self.inner.call::<crate::rpc::AuthListConnectionsRpc>(input).await
109 }
110
111 pub async fn auth_list_installed_contracts(&self, input: &crate::types::AuthListInstalledContractsRequest) -> Result<crate::types::AuthListInstalledContractsResponse, TrellisClientError> {
113 self.inner.call::<crate::rpc::AuthListInstalledContractsRpc>(input).await
114 }
115
116 pub async fn auth_list_login_portal_selections(&self) -> Result<crate::types::AuthListLoginPortalSelectionsResponse, TrellisClientError> {
118 self.inner.call::<crate::rpc::AuthListLoginPortalSelectionsRpc>(&crate::rpc::Empty {}).await
119 }
120
121 pub async fn auth_list_portals(&self) -> Result<crate::types::AuthListPortalsResponse, TrellisClientError> {
123 self.inner.call::<crate::rpc::AuthListPortalsRpc>(&crate::rpc::Empty {}).await
124 }
125
126 pub async fn auth_list_services(&self) -> Result<crate::types::AuthListServicesResponse, TrellisClientError> {
128 self.inner.call::<crate::rpc::AuthListServicesRpc>(&crate::rpc::Empty {}).await
129 }
130
131 pub async fn auth_list_sessions(&self, input: &crate::types::AuthListSessionsRequest) -> Result<crate::types::AuthListSessionsResponse, TrellisClientError> {
133 self.inner.call::<crate::rpc::AuthListSessionsRpc>(input).await
134 }
135
136 pub async fn auth_list_users(&self) -> Result<crate::types::AuthListUsersResponse, TrellisClientError> {
138 self.inner.call::<crate::rpc::AuthListUsersRpc>(&crate::rpc::Empty {}).await
139 }
140
141 pub async fn auth_list_workload_activation_reviews(&self, input: &crate::types::AuthListWorkloadActivationReviewsRequest) -> Result<crate::types::AuthListWorkloadActivationReviewsResponse, TrellisClientError> {
143 self.inner.call::<crate::rpc::AuthListWorkloadActivationReviewsRpc>(input).await
144 }
145
146 pub async fn auth_list_workload_activations(&self, input: &crate::types::AuthListWorkloadActivationsRequest) -> Result<crate::types::AuthListWorkloadActivationsResponse, TrellisClientError> {
148 self.inner.call::<crate::rpc::AuthListWorkloadActivationsRpc>(input).await
149 }
150
151 pub async fn auth_list_workload_instances(&self, input: &crate::types::AuthListWorkloadInstancesRequest) -> Result<crate::types::AuthListWorkloadInstancesResponse, TrellisClientError> {
153 self.inner.call::<crate::rpc::AuthListWorkloadInstancesRpc>(input).await
154 }
155
156 pub async fn auth_list_workload_portal_selections(&self) -> Result<crate::types::AuthListWorkloadPortalSelectionsResponse, TrellisClientError> {
158 self.inner.call::<crate::rpc::AuthListWorkloadPortalSelectionsRpc>(&crate::rpc::Empty {}).await
159 }
160
161 pub async fn auth_list_workload_profiles(&self, input: &crate::types::AuthListWorkloadProfilesRequest) -> Result<crate::types::AuthListWorkloadProfilesResponse, TrellisClientError> {
163 self.inner.call::<crate::rpc::AuthListWorkloadProfilesRpc>(input).await
164 }
165
166 pub async fn auth_logout(&self) -> Result<crate::types::AuthLogoutResponse, TrellisClientError> {
168 self.inner.call::<crate::rpc::AuthLogoutRpc>(&crate::rpc::Empty {}).await
169 }
170
171 pub async fn auth_me(&self) -> Result<crate::types::AuthMeResponse, TrellisClientError> {
173 self.inner.call::<crate::rpc::AuthMeRpc>(&crate::rpc::Empty {}).await
174 }
175
176 pub async fn auth_provision_workload_instance(&self, input: &crate::types::AuthProvisionWorkloadInstanceRequest) -> Result<crate::types::AuthProvisionWorkloadInstanceResponse, TrellisClientError> {
178 self.inner.call::<crate::rpc::AuthProvisionWorkloadInstanceRpc>(input).await
179 }
180
181 pub async fn auth_renew_binding_token(&self) -> Result<crate::types::AuthRenewBindingTokenResponse, TrellisClientError> {
183 self.inner.call::<crate::rpc::AuthRenewBindingTokenRpc>(&crate::rpc::Empty {}).await
184 }
185
186 pub async fn auth_revoke_approval(&self, input: &crate::types::AuthRevokeApprovalRequest) -> Result<crate::types::AuthRevokeApprovalResponse, TrellisClientError> {
188 self.inner.call::<crate::rpc::AuthRevokeApprovalRpc>(input).await
189 }
190
191 pub async fn auth_revoke_session(&self, input: &crate::types::AuthRevokeSessionRequest) -> Result<crate::types::AuthRevokeSessionResponse, TrellisClientError> {
193 self.inner.call::<crate::rpc::AuthRevokeSessionRpc>(input).await
194 }
195
196 pub async fn auth_revoke_workload_activation(&self, input: &crate::types::AuthRevokeWorkloadActivationRequest) -> Result<crate::types::AuthRevokeWorkloadActivationResponse, TrellisClientError> {
198 self.inner.call::<crate::rpc::AuthRevokeWorkloadActivationRpc>(input).await
199 }
200
201 pub async fn auth_set_login_portal_default(&self, input: &crate::types::AuthSetLoginPortalDefaultRequest) -> Result<crate::types::AuthSetLoginPortalDefaultResponse, TrellisClientError> {
203 self.inner.call::<crate::rpc::AuthSetLoginPortalDefaultRpc>(input).await
204 }
205
206 pub async fn auth_set_login_portal_selection(&self, input: &crate::types::AuthSetLoginPortalSelectionRequest) -> Result<crate::types::AuthSetLoginPortalSelectionResponse, TrellisClientError> {
208 self.inner.call::<crate::rpc::AuthSetLoginPortalSelectionRpc>(input).await
209 }
210
211 pub async fn auth_set_workload_portal_default(&self, input: &crate::types::AuthSetWorkloadPortalDefaultRequest) -> Result<crate::types::AuthSetWorkloadPortalDefaultResponse, TrellisClientError> {
213 self.inner.call::<crate::rpc::AuthSetWorkloadPortalDefaultRpc>(input).await
214 }
215
216 pub async fn auth_set_workload_portal_selection(&self, input: &crate::types::AuthSetWorkloadPortalSelectionRequest) -> Result<crate::types::AuthSetWorkloadPortalSelectionResponse, TrellisClientError> {
218 self.inner.call::<crate::rpc::AuthSetWorkloadPortalSelectionRpc>(input).await
219 }
220
221 pub async fn auth_update_user(&self, input: &crate::types::AuthUpdateUserRequest) -> Result<crate::types::AuthUpdateUserResponse, TrellisClientError> {
223 self.inner.call::<crate::rpc::AuthUpdateUserRpc>(input).await
224 }
225
226 pub async fn auth_upgrade_service_contract(&self, input: &crate::types::AuthUpgradeServiceContractRequest) -> Result<crate::types::AuthUpgradeServiceContractResponse, TrellisClientError> {
228 self.inner.call::<crate::rpc::AuthUpgradeServiceContractRpc>(input).await
229 }
230
231 pub async fn auth_validate_request(&self, input: &crate::types::AuthValidateRequestRequest) -> Result<crate::types::AuthValidateRequestResponse, TrellisClientError> {
233 self.inner.call::<crate::rpc::AuthValidateRequestRpc>(input).await
234 }
235
236 pub async fn publish_auth_connect(&self, event: &crate::types::AuthConnectEvent) -> Result<(), TrellisClientError> {
238 self.inner.publish::<crate::events::AuthConnectEventDescriptor>(event).await
239 }
240
241 pub async fn publish_auth_connection_kicked(&self, event: &crate::types::AuthConnectionKickedEvent) -> Result<(), TrellisClientError> {
243 self.inner.publish::<crate::events::AuthConnectionKickedEventDescriptor>(event).await
244 }
245
246 pub async fn publish_auth_disconnect(&self, event: &crate::types::AuthDisconnectEvent) -> Result<(), TrellisClientError> {
248 self.inner.publish::<crate::events::AuthDisconnectEventDescriptor>(event).await
249 }
250
251 pub async fn publish_auth_session_revoked(&self, event: &crate::types::AuthSessionRevokedEvent) -> Result<(), TrellisClientError> {
253 self.inner.publish::<crate::events::AuthSessionRevokedEventDescriptor>(event).await
254 }
255
256 pub async fn publish_auth_workload_activation_review_requested(&self, event: &crate::types::AuthWorkloadActivationReviewRequestedEvent) -> Result<(), TrellisClientError> {
258 self.inner.publish::<crate::events::AuthWorkloadActivationReviewRequestedEventDescriptor>(event).await
259 }
260
261}
262