async_openai/admin/
admin_.rs1use crate::{
2 config::Config, AdminAPIKeys, AuditLogs, Certificates, Client, Groups, Invites,
3 OrganizationDataRetentions, OrganizationSpendAlerts, OrganizationSpendLimit, Projects, Roles,
4 Usage, Users,
5};
6
7pub struct Admin<'c, C: Config> {
10 client: &'c Client<C>,
11}
12
13impl<'c, C: Config> Admin<'c, C> {
14 pub fn external_keys(&self) -> super::ExternalKeys<'_, C> {
16 super::ExternalKeys::new(self.client)
17 }
18 pub fn external_storage(&self) -> super::ExternalStorage<'_, C> {
20 super::ExternalStorage::new(self.client)
21 }
22 pub(crate) fn new(client: &'c Client<C>) -> Self {
23 Self { client }
24 }
25
26 pub fn api_keys(&self) -> AdminAPIKeys<'_, C> {
28 AdminAPIKeys::new(self.client)
29 }
30
31 pub fn invites(&self) -> Invites<'_, C> {
33 Invites::new(self.client)
34 }
35
36 pub fn users(&self) -> Users<'_, C> {
38 Users::new(self.client)
39 }
40
41 pub fn projects(&self) -> Projects<'_, C> {
43 Projects::new(self.client)
44 }
45
46 pub fn audit_logs(&self) -> AuditLogs<'_, C> {
48 AuditLogs::new(self.client)
49 }
50
51 pub fn certificates(&self) -> Certificates<'_, C> {
53 Certificates::new(self.client)
54 }
55
56 pub fn roles(&self) -> Roles<'_, C> {
58 Roles::new(self.client)
59 }
60
61 pub fn groups(&self) -> Groups<'_, C> {
63 Groups::new(self.client)
64 }
65
66 pub fn usage(&self) -> Usage<'_, C> {
68 Usage::new(self.client)
69 }
70
71 pub fn data_retention(&self) -> OrganizationDataRetentions<'_, C> {
73 OrganizationDataRetentions::new(self.client)
74 }
75
76 pub fn spend_alerts(&self) -> OrganizationSpendAlerts<'_, C> {
78 OrganizationSpendAlerts::new(self.client)
79 }
80
81 pub fn spend_limit(&self) -> OrganizationSpendLimit<'_, C> {
83 OrganizationSpendLimit::new(self.client)
84 }
85}