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