Skip to main content

bitwarden_api_api/models/
access_request_history_page_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/// AccessRequestHistoryPageResponseModel : One page of the approver history, newest request first,
16/// with what the filters can offer.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct AccessRequestHistoryPageResponseModel {
19    #[serde(
20        rename = "object",
21        alias = "Object",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub object: Option<String>,
25    #[serde(
26        rename = "data",
27        alias = "Data",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub data: Option<Vec<models::AccessRequestDetailsResponseModel>>,
31    /// How many rows match the filters, across all pages.
32    #[serde(
33        rename = "total",
34        alias = "Total",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub total: Option<i32>,
38    /// Everyone with a row in the history, whatever the filters, for the Requester filter.
39    #[serde(
40        rename = "requesters",
41        alias = "Requesters",
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub requesters: Option<Vec<models::AccessRequestHistoryRequesterResponseModel>>,
45    /// Every collection with a row in the history, whatever the filters. Collection names are
46    /// vault data, so the client names them itself.
47    #[serde(
48        rename = "collectionIds",
49        alias = "CollectionIds",
50        skip_serializing_if = "Option::is_none"
51    )]
52    pub collection_ids: Option<Vec<uuid::Uuid>>,
53}
54
55impl AccessRequestHistoryPageResponseModel {
56    /// One page of the approver history, newest request first, with what the filters can offer.
57    pub fn new() -> AccessRequestHistoryPageResponseModel {
58        AccessRequestHistoryPageResponseModel {
59            object: None,
60            data: None,
61            total: None,
62            requesters: None,
63            collection_ids: None,
64        }
65    }
66}