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    /// Encrypted string containing secret Send data
60    #[serde(
61        rename = "data",
62        alias = "Data",
63        skip_serializing_if = "Option::is_none"
64    )]
65    pub data: Option<String>,
66    /// The date after which a send cannot be accessed. When this value is null, there is no
67    /// expiration date.
68    #[serde(
69        rename = "expirationDate",
70        alias = "ExpirationDate",
71        skip_serializing_if = "Option::is_none"
72    )]
73    pub expiration_date: Option<String>,
74    /// Indicates the person that created the send to the accessor.
75    #[serde(
76        rename = "creatorIdentifier",
77        alias = "CreatorIdentifier",
78        skip_serializing_if = "Option::is_none"
79    )]
80    pub creator_identifier: Option<String>,
81}
82
83impl SendAccessResponseModel {
84    /// A response issued to a Bitwarden client in response to access operations.
85    pub fn new() -> SendAccessResponseModel {
86        SendAccessResponseModel {
87            object: None,
88            id: None,
89            r#type: None,
90            auth_type: None,
91            name: None,
92            file: None,
93            text: None,
94            data: None,
95            expiration_date: None,
96            creator_identifier: None,
97        }
98    }
99}