bitwarden_api_api/models/
permissions.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
/*
 * 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 Permissions {
    #[serde(rename = "accessEventLogs", skip_serializing_if = "Option::is_none")]
    pub access_event_logs: Option<bool>,
    #[serde(rename = "accessImportExport", skip_serializing_if = "Option::is_none")]
    pub access_import_export: Option<bool>,
    #[serde(rename = "accessReports", skip_serializing_if = "Option::is_none")]
    pub access_reports: Option<bool>,
    #[serde(
        rename = "createNewCollections",
        skip_serializing_if = "Option::is_none"
    )]
    pub create_new_collections: Option<bool>,
    #[serde(rename = "editAnyCollection", skip_serializing_if = "Option::is_none")]
    pub edit_any_collection: Option<bool>,
    #[serde(
        rename = "deleteAnyCollection",
        skip_serializing_if = "Option::is_none"
    )]
    pub delete_any_collection: Option<bool>,
    #[serde(rename = "manageGroups", skip_serializing_if = "Option::is_none")]
    pub manage_groups: Option<bool>,
    #[serde(rename = "managePolicies", skip_serializing_if = "Option::is_none")]
    pub manage_policies: Option<bool>,
    #[serde(rename = "manageSso", skip_serializing_if = "Option::is_none")]
    pub manage_sso: Option<bool>,
    #[serde(rename = "manageUsers", skip_serializing_if = "Option::is_none")]
    pub manage_users: Option<bool>,
    #[serde(
        rename = "manageResetPassword",
        skip_serializing_if = "Option::is_none"
    )]
    pub manage_reset_password: Option<bool>,
    #[serde(rename = "manageScim", skip_serializing_if = "Option::is_none")]
    pub manage_scim: Option<bool>,
}

impl Permissions {
    pub fn new() -> Permissions {
        Permissions {
            access_event_logs: None,
            access_import_export: None,
            access_reports: None,
            create_new_collections: None,
            edit_any_collection: None,
            delete_any_collection: None,
            manage_groups: None,
            manage_policies: None,
            manage_sso: None,
            manage_users: None,
            manage_reset_password: None,
            manage_scim: None,
        }
    }
}