use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProviderRequest {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "authentication_flow", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub authentication_flow: Option<Option<uuid::Uuid>>,
#[serde(rename = "authorization_flow")]
pub authorization_flow: uuid::Uuid,
#[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
pub property_mappings: Option<Vec<uuid::Uuid>>,
}
impl ProviderRequest {
pub fn new(name: String, authorization_flow: uuid::Uuid) -> ProviderRequest {
ProviderRequest {
name,
authentication_flow: None,
authorization_flow,
property_mappings: None,
}
}
}