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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*
* 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;
/// SendResponseModel : A response issued to a Bitwarden client in response to ownership operations.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SendResponseModel {
#[serde(
rename = "object",
alias = "Object",
skip_serializing_if = "Option::is_none"
)]
pub object: Option<String>,
/// Identifies the send to its owner
#[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
pub id: Option<uuid::Uuid>,
/// Identifies the send in a send URL
#[serde(
rename = "accessId",
alias = "AccessId",
skip_serializing_if = "Option::is_none"
)]
pub access_id: Option<String>,
#[serde(
rename = "type",
alias = "R#type",
skip_serializing_if = "Option::is_none"
)]
pub r#type: Option<models::SendType>,
#[serde(
rename = "authType",
alias = "AuthType",
skip_serializing_if = "Option::is_none"
)]
pub auth_type: Option<models::AuthType>,
/// Label for the send.
#[serde(
rename = "name",
alias = "Name",
skip_serializing_if = "Option::is_none"
)]
pub name: Option<String>,
/// Notes for the send. This is only visible to the owner of the send. This field is encrypted.
#[serde(
rename = "notes",
alias = "Notes",
skip_serializing_if = "Option::is_none"
)]
pub notes: Option<String>,
#[serde(
rename = "file",
alias = "File",
skip_serializing_if = "Option::is_none"
)]
pub file: Option<Box<models::SendFileModel>>,
#[serde(
rename = "text",
alias = "Text",
skip_serializing_if = "Option::is_none"
)]
pub text: Option<Box<models::SendTextModel>>,
/// A base64-encoded byte array containing the Send's encryption key. It's also provided to
/// send recipients in the Send's URL.
#[serde(rename = "key", alias = "Key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// The maximum number of times a send can be accessed before it expires. When this value is
/// null, there is no limit.
#[serde(
rename = "maxAccessCount",
alias = "MaxAccessCount",
skip_serializing_if = "Option::is_none"
)]
pub max_access_count: Option<i32>,
/// The number of times a send has been accessed since it was created.
#[serde(
rename = "accessCount",
alias = "AccessCount",
skip_serializing_if = "Option::is_none"
)]
pub access_count: Option<i32>,
/// Base64-encoded byte array of a password hash that grants access to the send. Mutually
/// exclusive with Bit.Api.Tools.Models.Response.SendResponseModel.Emails.
#[serde(
rename = "password",
alias = "Password",
skip_serializing_if = "Option::is_none"
)]
pub password: Option<String>,
/// Comma-separated list of emails that may access the send using OTP authentication. Mutually
/// exclusive with Bit.Api.Tools.Models.Response.SendResponseModel.Password.
#[serde(
rename = "emails",
alias = "Emails",
skip_serializing_if = "Option::is_none"
)]
pub emails: Option<String>,
/// When true, send access is disabled.
#[serde(
rename = "disabled",
alias = "Disabled",
skip_serializing_if = "Option::is_none"
)]
pub disabled: Option<bool>,
/// The last time this send's data changed.
#[serde(
rename = "revisionDate",
alias = "RevisionDate",
skip_serializing_if = "Option::is_none"
)]
pub revision_date: Option<String>,
/// The date after which a send cannot be accessed. When this value is null, there is no
/// expiration date.
#[serde(
rename = "expirationDate",
alias = "ExpirationDate",
skip_serializing_if = "Option::is_none"
)]
pub expiration_date: Option<String>,
/// The date after which a send may be automatically deleted from the server.
#[serde(
rename = "deletionDate",
alias = "DeletionDate",
skip_serializing_if = "Option::is_none"
)]
pub deletion_date: Option<String>,
/// When true send access hides the user's email address and displays a confirmation message
/// instead.
#[serde(
rename = "hideEmail",
alias = "HideEmail",
skip_serializing_if = "Option::is_none"
)]
pub hide_email: Option<bool>,
}
impl SendResponseModel {
/// A response issued to a Bitwarden client in response to ownership operations.
pub fn new() -> SendResponseModel {
SendResponseModel {
object: None,
id: None,
access_id: None,
r#type: None,
auth_type: None,
name: None,
notes: None,
file: None,
text: None,
key: None,
max_access_count: None,
access_count: None,
password: None,
emails: None,
disabled: None,
revision_date: None,
expiration_date: None,
deletion_date: None,
hide_email: None,
}
}
}