proxmox_api/generated/access/
openid.rs1pub mod auth_url;
2pub mod login;
3#[derive(Debug, Clone)]
4pub struct OpenidClient<T> {
5 client: T,
6 path: String,
7}
8impl<T> OpenidClient<T>
9where
10 T: crate::client::Client,
11{
12 pub fn new(client: T, parent_path: &str) -> Self {
13 Self {
14 client,
15 path: format!("{}{}", parent_path, "/openid"),
16 }
17 }
18}
19impl<T> OpenidClient<T>
20where
21 T: crate::client::Client,
22{
23 #[doc = "Directory index."]
24 #[doc = ""]
25 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
26 let path = self.path.to_string();
27 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
28 Ok(optional_vec.unwrap_or_default())
29 }
30}
31impl GetOutputItems {
32 pub fn new(subdir: String) -> Self {
33 Self {
34 subdir,
35 additional_properties: ::std::default::Default::default(),
36 }
37 }
38}
39#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
40pub struct GetOutputItems {
41 pub subdir: String,
42 #[serde(
43 flatten,
44 default,
45 skip_serializing_if = "::std::collections::HashMap::is_empty"
46 )]
47 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
48}
49impl<T> OpenidClient<T>
50where
51 T: crate::client::Client,
52{
53 pub fn auth_url(&self) -> auth_url::AuthUrlClient<T> {
54 auth_url::AuthUrlClient::<T>::new(self.client.clone(), &self.path)
55 }
56}
57impl<T> OpenidClient<T>
58where
59 T: crate::client::Client,
60{
61 pub fn login(&self) -> login::LoginClient<T> {
62 login::LoginClient::<T>::new(self.client.clone(), &self.path)
63 }
64}