authentik_rust/models/
domain_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// DomainRequest : Domain Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DomainRequest {
16    #[serde(rename = "domain")]
17    pub domain: String,
18    #[serde(rename = "is_primary", skip_serializing_if = "Option::is_none")]
19    pub is_primary: Option<bool>,
20    #[serde(rename = "tenant")]
21    pub tenant: uuid::Uuid,
22}
23
24impl DomainRequest {
25    /// Domain Serializer
26    pub fn new(domain: String, tenant: uuid::Uuid) -> DomainRequest {
27        DomainRequest {
28            domain,
29            is_primary: None,
30            tenant,
31        }
32    }
33}
34