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
/*
* Pipedrive API v1
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReceiveMessageRequestAttachmentsInner {
/// The ID of the attachment
#[serde(rename = "id")]
pub id: String,
/// The mime-type of the attachment
#[serde(rename = "type")]
pub r#type: String,
/// The name of the attachment
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// The size of the attachment
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<f32>,
/// A URL to the file
#[serde(rename = "url")]
pub url: String,
/// A URL to a preview picture of the file
#[serde(rename = "preview_url", skip_serializing_if = "Option::is_none")]
pub preview_url: Option<String>,
/// If true, it will use the getMessageById endpoint for fetching updated attachment's urls. Find out more [here](https://pipedrive.readme.io/docs/implementing-messaging-app-extension)
#[serde(rename = "link_expires", skip_serializing_if = "Option::is_none")]
pub link_expires: Option<bool>,
}
impl ReceiveMessageRequestAttachmentsInner {
pub fn new(id: String, r#type: String, url: String) -> ReceiveMessageRequestAttachmentsInner {
ReceiveMessageRequestAttachmentsInner {
id,
r#type,
name: None,
size: None,
url,
preview_url: None,
link_expires: None,
}
}
}