fusionauth_rust_client/models/
consent.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.60.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Consent : Models a consent.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Consent {
17    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
18    pub data: Option<std::collections::HashMap<String, serde_json::Value>>,
19    #[serde(rename = "consentEmailTemplateId", skip_serializing_if = "Option::is_none")]
20    pub consent_email_template_id: Option<uuid::Uuid>,
21    /// Models a set of localized Integers that can be stored as JSON.
22    #[serde(rename = "countryMinimumAgeForSelfConsent", skip_serializing_if = "Option::is_none")]
23    pub country_minimum_age_for_self_consent: Option<serde_json::Value>,
24    #[serde(rename = "defaultMinimumAgeForSelfConsent", skip_serializing_if = "Option::is_none")]
25    pub default_minimum_age_for_self_consent: Option<i32>,
26    #[serde(rename = "emailPlus", skip_serializing_if = "Option::is_none")]
27    pub email_plus: Option<Box<models::EmailPlus>>,
28    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
29    pub id: Option<uuid::Uuid>,
30    /// The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.
31    #[serde(rename = "insertInstant", skip_serializing_if = "Option::is_none")]
32    pub insert_instant: Option<i64>,
33    /// The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.
34    #[serde(rename = "lastUpdateInstant", skip_serializing_if = "Option::is_none")]
35    pub last_update_instant: Option<i64>,
36    #[serde(rename = "multipleValuesAllowed", skip_serializing_if = "Option::is_none")]
37    pub multiple_values_allowed: Option<bool>,
38    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
39    pub name: Option<String>,
40    #[serde(rename = "values", skip_serializing_if = "Option::is_none")]
41    pub values: Option<Vec<String>>,
42}
43
44impl Consent {
45    /// Models a consent.
46    pub fn new() -> Consent {
47        Consent {
48            data: None,
49            consent_email_template_id: None,
50            country_minimum_age_for_self_consent: None,
51            default_minimum_age_for_self_consent: None,
52            email_plus: None,
53            id: None,
54            insert_instant: None,
55            last_update_instant: None,
56            multiple_values_allowed: None,
57            name: None,
58            values: None,
59        }
60    }
61}
62