jira_api_v2/models/
attachment.rs

1/*
2 * The Jira Cloud platform REST API
3 *
4 * Jira Cloud platform REST API documentation
5 *
6 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
7 * Contact: ecosystem@atlassian.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Attachment : Details about an attachment.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Attachment {
17    /// The URL of the attachment details response.
18    #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
19    pub param_self: Option<String>,
20    /// The ID of the attachment.
21    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
22    pub id: Option<String>,
23    /// The file name of the attachment.
24    #[serde(rename = "filename", skip_serializing_if = "Option::is_none")]
25    pub filename: Option<String>,
26    /// Details of the user who added the attachment.
27    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
28    pub author: Option<Box<models::UserDetails>>,
29    /// The datetime the attachment was created.
30    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
31    pub created: Option<String>,
32    /// The size of the attachment.
33    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
34    pub size: Option<i64>,
35    /// The MIME type of the attachment.
36    #[serde(rename = "mimeType", skip_serializing_if = "Option::is_none")]
37    pub mime_type: Option<String>,
38    /// The content of the attachment.
39    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
40    pub content: Option<String>,
41    /// The URL of a thumbnail representing the attachment.
42    #[serde(rename = "thumbnail", skip_serializing_if = "Option::is_none")]
43    pub thumbnail: Option<String>,
44}
45
46impl Attachment {
47    /// Details about an attachment.
48    pub fn new() -> Attachment {
49        Attachment {
50            param_self: None,
51            id: None,
52            filename: None,
53            author: None,
54            created: None,
55            size: None,
56            mime_type: None,
57            content: None,
58            thumbnail: None,
59        }
60    }
61}
62