jira_api_v2/models/
attachment_metadata.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/// AttachmentMetadata : Metadata for an issue attachment.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AttachmentMetadata {
17    /// The ID of the attachment.
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<i64>,
20    /// The URL of the attachment metadata details.
21    #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
22    pub param_self: Option<String>,
23    /// The name of the attachment file.
24    #[serde(rename = "filename", skip_serializing_if = "Option::is_none")]
25    pub filename: Option<String>,
26    /// Details of the user who attached the file.
27    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
28    pub author: Option<Box<models::User>>,
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    /// Additional properties of the attachment.
39    #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
40    pub properties: Option<std::collections::HashMap<String, serde_json::Value>>,
41    /// The URL of the attachment.
42    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
43    pub content: Option<String>,
44    /// The URL of a thumbnail representing the attachment.
45    #[serde(rename = "thumbnail", skip_serializing_if = "Option::is_none")]
46    pub thumbnail: Option<String>,
47}
48
49impl AttachmentMetadata {
50    /// Metadata for an issue attachment.
51    pub fn new() -> AttachmentMetadata {
52        AttachmentMetadata {
53            id: None,
54            param_self: None,
55            filename: None,
56            author: None,
57            created: None,
58            size: None,
59            mime_type: None,
60            properties: None,
61            content: None,
62            thumbnail: None,
63        }
64    }
65}
66