pipedrive-rs 0.1.0

Rust PipedriveClient
Documentation
/*
 * 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,
        }
    }
}