bitwarden_api_api/models/
policy_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PolicyResponseModel {
17    #[serde(
18        rename = "object",
19        alias = "Object",
20        skip_serializing_if = "Option::is_none"
21    )]
22    pub object: Option<String>,
23    #[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<uuid::Uuid>,
25    #[serde(
26        rename = "organizationId",
27        alias = "OrganizationId",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub organization_id: Option<uuid::Uuid>,
31    #[serde(
32        rename = "type",
33        alias = "R#type",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub r#type: Option<models::PolicyType>,
37    #[serde(
38        rename = "data",
39        alias = "Data",
40        skip_serializing_if = "Option::is_none"
41    )]
42    pub data: Option<std::collections::HashMap<String, serde_json::Value>>,
43    #[serde(
44        rename = "enabled",
45        alias = "Enabled",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub enabled: Option<bool>,
49}
50
51impl PolicyResponseModel {
52    pub fn new() -> PolicyResponseModel {
53        PolicyResponseModel {
54            object: None,
55            id: None,
56            organization_id: None,
57            r#type: None,
58            data: None,
59            enabled: None,
60        }
61    }
62}