bitwarden_api_api/models/
event_response_model.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EventResponseModel {
    #[serde(rename = "object", skip_serializing_if = "Option::is_none")]
    pub object: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<models::EventType>,
    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<uuid::Uuid>,
    #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")]
    pub organization_id: Option<uuid::Uuid>,
    #[serde(rename = "providerId", skip_serializing_if = "Option::is_none")]
    pub provider_id: Option<uuid::Uuid>,
    #[serde(rename = "cipherId", skip_serializing_if = "Option::is_none")]
    pub cipher_id: Option<uuid::Uuid>,
    #[serde(rename = "collectionId", skip_serializing_if = "Option::is_none")]
    pub collection_id: Option<uuid::Uuid>,
    #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")]
    pub group_id: Option<uuid::Uuid>,
    #[serde(rename = "policyId", skip_serializing_if = "Option::is_none")]
    pub policy_id: Option<uuid::Uuid>,
    #[serde(rename = "organizationUserId", skip_serializing_if = "Option::is_none")]
    pub organization_user_id: Option<uuid::Uuid>,
    #[serde(rename = "providerUserId", skip_serializing_if = "Option::is_none")]
    pub provider_user_id: Option<uuid::Uuid>,
    #[serde(
        rename = "providerOrganizationId",
        skip_serializing_if = "Option::is_none"
    )]
    pub provider_organization_id: Option<uuid::Uuid>,
    #[serde(rename = "actingUserId", skip_serializing_if = "Option::is_none")]
    pub acting_user_id: Option<uuid::Uuid>,
    #[serde(rename = "installationId", skip_serializing_if = "Option::is_none")]
    pub installation_id: Option<uuid::Uuid>,
    #[serde(rename = "date", skip_serializing_if = "Option::is_none")]
    pub date: Option<String>,
    #[serde(rename = "deviceType", skip_serializing_if = "Option::is_none")]
    pub device_type: Option<models::DeviceType>,
    #[serde(rename = "ipAddress", skip_serializing_if = "Option::is_none")]
    pub ip_address: Option<String>,
    #[serde(rename = "systemUser", skip_serializing_if = "Option::is_none")]
    pub system_user: Option<models::EventSystemUser>,
    #[serde(rename = "domainName", skip_serializing_if = "Option::is_none")]
    pub domain_name: Option<String>,
    #[serde(rename = "secretId", skip_serializing_if = "Option::is_none")]
    pub secret_id: Option<uuid::Uuid>,
    #[serde(rename = "serviceAccountId", skip_serializing_if = "Option::is_none")]
    pub service_account_id: Option<uuid::Uuid>,
}

impl EventResponseModel {
    pub fn new() -> EventResponseModel {
        EventResponseModel {
            object: None,
            r#type: None,
            user_id: None,
            organization_id: None,
            provider_id: None,
            cipher_id: None,
            collection_id: None,
            group_id: None,
            policy_id: None,
            organization_user_id: None,
            provider_user_id: None,
            provider_organization_id: None,
            acting_user_id: None,
            installation_id: None,
            date: None,
            device_type: None,
            ip_address: None,
            system_user: None,
            domain_name: None,
            secret_id: None,
            service_account_id: None,
        }
    }
}