bitwarden_api_api/models/access_audit_item_response_model.rs
1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15/// AccessAuditItemResponseModel : One subject the access-audit trail names within a range, for the
16/// Item filter: either a credential or an access rule. Cipher names are vault data, so the client
17/// resolves them itself.
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct AccessAuditItemResponseModel {
20 #[serde(
21 rename = "object",
22 alias = "Object",
23 skip_serializing_if = "Option::is_none"
24 )]
25 pub object: Option<String>,
26 /// The subject cipher. Null on a rule item.
27 #[serde(
28 rename = "cipherId",
29 alias = "CipherId",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub cipher_id: Option<uuid::Uuid>,
33 /// The collection the cipher was most recently accessed through. Null on a rule item, or where
34 /// the events named no collection.
35 #[serde(
36 rename = "collectionId",
37 alias = "CollectionId",
38 skip_serializing_if = "Option::is_none"
39 )]
40 pub collection_id: Option<uuid::Uuid>,
41 /// The subject access rule. Null on a cipher item.
42 #[serde(
43 rename = "ruleId",
44 alias = "RuleId",
45 skip_serializing_if = "Option::is_none"
46 )]
47 pub rule_id: Option<uuid::Uuid>,
48 /// The rule's most recently recorded name. Null on a cipher item.
49 #[serde(
50 rename = "ruleName",
51 alias = "RuleName",
52 skip_serializing_if = "Option::is_none"
53 )]
54 pub rule_name: Option<String>,
55}
56
57impl AccessAuditItemResponseModel {
58 /// One subject the access-audit trail names within a range, for the Item filter: either a
59 /// credential or an access rule. Cipher names are vault data, so the client resolves them
60 /// itself.
61 pub fn new() -> AccessAuditItemResponseModel {
62 AccessAuditItemResponseModel {
63 object: None,
64 cipher_id: None,
65 collection_id: None,
66 rule_id: None,
67 rule_name: None,
68 }
69 }
70}