Skip to main content

bitwarden_api_api/models/
send_access_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/// SendAccessResponseModel : A response issued to a Bitwarden client in response to access
16/// operations.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct SendAccessResponseModel {
19    #[serde(
20        rename = "object",
21        alias = "Object",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub object: Option<String>,
25    /// Identifies the send in a send URL
26    #[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
27    pub id: Option<String>,
28    #[serde(
29        rename = "type",
30        alias = "R#type",
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub r#type: Option<models::SendType>,
34    #[serde(
35        rename = "authType",
36        alias = "AuthType",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub auth_type: Option<models::AuthType>,
40    /// Label for the send. This is only visible to the owner of the send.
41    #[serde(
42        rename = "name",
43        alias = "Name",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub name: Option<String>,
47    #[serde(
48        rename = "file",
49        alias = "File",
50        skip_serializing_if = "Option::is_none"
51    )]
52    pub file: Option<Box<models::SendFileModel>>,
53    #[serde(
54        rename = "text",
55        alias = "Text",
56        skip_serializing_if = "Option::is_none"
57    )]
58    pub text: Option<Box<models::SendTextModel>>,
59    #[serde(
60        rename = "data",
61        alias = "Data",
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub data: Option<Box<models::SendDataModel>>,
65    /// The date after which a send cannot be accessed. When this value is null, there is no
66    /// expiration date.
67    #[serde(
68        rename = "expirationDate",
69        alias = "ExpirationDate",
70        skip_serializing_if = "Option::is_none"
71    )]
72    pub expiration_date: Option<String>,
73    /// Indicates the person that created the send to the accessor.
74    #[serde(
75        rename = "creatorIdentifier",
76        alias = "CreatorIdentifier",
77        skip_serializing_if = "Option::is_none"
78    )]
79    pub creator_identifier: Option<String>,
80}
81
82impl SendAccessResponseModel {
83    /// A response issued to a Bitwarden client in response to access operations.
84    pub fn new() -> SendAccessResponseModel {
85        SendAccessResponseModel {
86            object: None,
87            id: None,
88            r#type: None,
89            auth_type: None,
90            name: None,
91            file: None,
92            text: None,
93            data: None,
94            expiration_date: None,
95            creator_identifier: None,
96        }
97    }
98}