Skip to main content

clientapi_pbs/models/
config_access_create_openid_request.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ConfigAccessCreateOpenidRequest {
16
17    /// OpenID ACR List
18    #[serde(rename = "acr-values", skip_serializing_if = "Option::is_none")]
19    pub acr_values: Option<Box<models::PbsAcrValuesField>>,
20
21    /// Automatically create users if they do not exist.
22    #[serde(rename = "autocreate", skip_serializing_if = "Option::is_none")]
23    pub autocreate: Option<bool>,
24
25    /// OpenID Client ID
26    #[serde(rename = "client-id")]
27    pub client_id: String,
28
29    /// OpenID Client Key
30    #[serde(rename = "client-key", skip_serializing_if = "Option::is_none")]
31    pub client_key: Option<String>,
32
33    /// Comment.
34    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
35    pub comment: Option<String>,
36
37    /// True if you want this to be the default realm selected on login.
38    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
39    pub default: Option<bool>,
40
41    /// OpenID Issuer Url
42    #[serde(rename = "issuer-url")]
43    pub issuer_url: String,
44
45    /// OpenID Prompt
46    #[serde(rename = "prompt", skip_serializing_if = "Option::is_none")]
47    pub prompt: Option<String>,
48
49    /// Realm name.
50    #[serde(rename = "realm")]
51    pub realm: String,
52
53    /// OpenID Scope List
54    #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
55    pub scopes: Option<Box<models::PbsScopesField>>,
56
57    /// Use the value of this attribute/claim as unique user name. It is up to the identity provider to guarantee the uniqueness. The OpenID specification only guarantees that Subject ('sub') is unique. Also make sure that the user is not allowed to change that attribute by himself!
58    #[serde(rename = "username-claim", skip_serializing_if = "Option::is_none")]
59    pub username_claim: Option<String>,
60
61
62}
63
64impl ConfigAccessCreateOpenidRequest {
65    pub fn new(client_id: String, issuer_url: String, realm: String) -> ConfigAccessCreateOpenidRequest {
66        ConfigAccessCreateOpenidRequest {
67            
68            acr_values: None,
69            
70            autocreate: None,
71            
72            client_id,
73            
74            client_key: None,
75            
76            comment: None,
77            
78            default: None,
79            
80            issuer_url,
81            
82            prompt: None,
83            
84            realm,
85            
86            scopes: None,
87            
88            username_claim: None,
89            
90        }
91    }
92}
93
94