pipedrive_rs/models/
receive_message_request_attachments_inner.rs

1/*
2 * Pipedrive API v1
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReceiveMessageRequestAttachmentsInner {
16    /// The ID of the attachment
17    #[serde(rename = "id")]
18    pub id: String,
19    /// The mime-type of the attachment
20    #[serde(rename = "type")]
21    pub r#type: String,
22    /// The name of the attachment
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    /// The size of the attachment
26    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
27    pub size: Option<f32>,
28    /// A URL to the file
29    #[serde(rename = "url")]
30    pub url: String,
31    /// A URL to a preview picture of the file
32    #[serde(rename = "preview_url", skip_serializing_if = "Option::is_none")]
33    pub preview_url: Option<String>,
34    /// 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)
35    #[serde(rename = "link_expires", skip_serializing_if = "Option::is_none")]
36    pub link_expires: Option<bool>,
37}
38
39impl ReceiveMessageRequestAttachmentsInner {
40    pub fn new(id: String, r#type: String, url: String) -> ReceiveMessageRequestAttachmentsInner {
41        ReceiveMessageRequestAttachmentsInner {
42            id,
43            r#type,
44            name: None,
45            size: None,
46            url,
47            preview_url: None,
48            link_expires: None,
49        }
50    }
51}
52
53