fusionauth_rust_client/models/
user_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.57.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// UserConsent : Models a User consent.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UserConsent {
17    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
18    pub data: Option<std::collections::HashMap<String, serde_json::Value>>,
19    #[serde(rename = "consent", skip_serializing_if = "Option::is_none")]
20    pub consent: Option<Box<models::Consent>>,
21    #[serde(rename = "consentId", skip_serializing_if = "Option::is_none")]
22    pub consent_id: Option<uuid::Uuid>,
23    #[serde(rename = "giverUserId", skip_serializing_if = "Option::is_none")]
24    pub giver_user_id: Option<uuid::Uuid>,
25    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
26    pub id: Option<uuid::Uuid>,
27    /// The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.
28    #[serde(rename = "insertInstant", skip_serializing_if = "Option::is_none")]
29    pub insert_instant: Option<i64>,
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 = "lastUpdateInstant", skip_serializing_if = "Option::is_none")]
32    pub last_update_instant: Option<i64>,
33    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
34    pub status: Option<models::ConsentStatus>,
35    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
36    pub user_id: Option<uuid::Uuid>,
37    #[serde(rename = "values", skip_serializing_if = "Option::is_none")]
38    pub values: Option<Vec<String>>,
39}
40
41impl UserConsent {
42    /// Models a User consent.
43    pub fn new() -> UserConsent {
44        UserConsent {
45            data: None,
46            consent: None,
47            consent_id: None,
48            giver_user_id: None,
49            id: None,
50            insert_instant: None,
51            last_update_instant: None,
52            status: None,
53            user_id: None,
54            values: None,
55        }
56    }
57}
58