proxmox_api/generated/
access.rs1pub mod acl;
2pub mod domains;
3pub mod groups;
4pub mod openid;
5pub mod password;
6pub mod permissions;
7pub mod roles;
8pub mod tfa;
9pub mod ticket;
10pub mod users;
11pub mod vncticket;
12#[derive(Debug, Clone)]
13pub struct AccessClient<T> {
14 client: T,
15 path: String,
16}
17impl<T> AccessClient<T>
18where
19 T: crate::client::Client,
20{
21 pub fn new(client: T) -> Self {
22 Self {
23 client,
24 path: "/access".to_string(),
25 }
26 }
27}
28impl<T> AccessClient<T>
29where
30 T: crate::client::Client,
31{
32 #[doc = "Directory index."]
33 #[doc = ""]
34 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
35 let path = self.path.to_string();
36 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
37 Ok(optional_vec.unwrap_or_default())
38 }
39}
40impl GetOutputItems {
41 pub fn new(subdir: String) -> Self {
42 Self {
43 subdir,
44 additional_properties: ::std::default::Default::default(),
45 }
46 }
47}
48#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
49pub struct GetOutputItems {
50 pub subdir: String,
51 #[serde(
52 flatten,
53 default,
54 skip_serializing_if = "::std::collections::HashMap::is_empty"
55 )]
56 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
57}
58impl<T> AccessClient<T>
59where
60 T: crate::client::Client,
61{
62 pub fn users(&self) -> users::UsersClient<T> {
63 users::UsersClient::<T>::new(self.client.clone(), &self.path)
64 }
65}
66impl<T> AccessClient<T>
67where
68 T: crate::client::Client,
69{
70 pub fn groups(&self) -> groups::GroupsClient<T> {
71 groups::GroupsClient::<T>::new(self.client.clone(), &self.path)
72 }
73}
74impl<T> AccessClient<T>
75where
76 T: crate::client::Client,
77{
78 pub fn roles(&self) -> roles::RolesClient<T> {
79 roles::RolesClient::<T>::new(self.client.clone(), &self.path)
80 }
81}
82impl<T> AccessClient<T>
83where
84 T: crate::client::Client,
85{
86 pub fn acl(&self) -> acl::AclClient<T> {
87 acl::AclClient::<T>::new(self.client.clone(), &self.path)
88 }
89}
90impl<T> AccessClient<T>
91where
92 T: crate::client::Client,
93{
94 pub fn domains(&self) -> domains::DomainsClient<T> {
95 domains::DomainsClient::<T>::new(self.client.clone(), &self.path)
96 }
97}
98impl<T> AccessClient<T>
99where
100 T: crate::client::Client,
101{
102 pub fn openid(&self) -> openid::OpenidClient<T> {
103 openid::OpenidClient::<T>::new(self.client.clone(), &self.path)
104 }
105}
106impl<T> AccessClient<T>
107where
108 T: crate::client::Client,
109{
110 pub fn tfa(&self) -> tfa::TfaClient<T> {
111 tfa::TfaClient::<T>::new(self.client.clone(), &self.path)
112 }
113}
114impl<T> AccessClient<T>
115where
116 T: crate::client::Client,
117{
118 pub fn ticket(&self) -> ticket::TicketClient<T> {
119 ticket::TicketClient::<T>::new(self.client.clone(), &self.path)
120 }
121}
122impl<T> AccessClient<T>
123where
124 T: crate::client::Client,
125{
126 pub fn vncticket(&self) -> vncticket::VncticketClient<T> {
127 vncticket::VncticketClient::<T>::new(self.client.clone(), &self.path)
128 }
129}
130impl<T> AccessClient<T>
131where
132 T: crate::client::Client,
133{
134 pub fn password(&self) -> password::PasswordClient<T> {
135 password::PasswordClient::<T>::new(self.client.clone(), &self.path)
136 }
137}
138impl<T> AccessClient<T>
139where
140 T: crate::client::Client,
141{
142 pub fn permissions(&self) -> permissions::PermissionsClient<T> {
143 permissions::PermissionsClient::<T>::new(self.client.clone(), &self.path)
144 }
145}