Skip to main content

orvanta_api/models/
saml_config.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.0.0
7 * Contact: contact@orvanta.cloud
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 SamlConfig {
16    #[serde(rename = "configured")]
17    pub configured: bool,
18    #[serde(rename = "enabled")]
19    pub enabled: bool,
20    #[serde(rename = "idp_entity_id", skip_serializing_if = "Option::is_none")]
21    pub idp_entity_id: Option<String>,
22    #[serde(rename = "single_sign_on_service_url", skip_serializing_if = "Option::is_none")]
23    pub single_sign_on_service_url: Option<String>,
24    #[serde(rename = "name_id_format")]
25    pub name_id_format: String,
26    #[serde(rename = "sp_entity_id")]
27    pub sp_entity_id: String,
28    #[serde(rename = "acs_url")]
29    pub acs_url: String,
30    /// whether unsolicited (IdP-initiated) SAML responses are accepted. false is the default and the secure posture — see SamlConfigRequest.allow_idp_initiated.
31    #[serde(rename = "allow_idp_initiated")]
32    pub allow_idp_initiated: bool,
33}
34
35impl SamlConfig {
36    pub fn new(configured: bool, enabled: bool, name_id_format: String, sp_entity_id: String, acs_url: String, allow_idp_initiated: bool) -> SamlConfig {
37        SamlConfig {
38            configured,
39            enabled,
40            idp_entity_id: None,
41            single_sign_on_service_url: None,
42            name_id_format,
43            sp_entity_id,
44            acs_url,
45            allow_idp_initiated,
46        }
47    }
48}
49