jira_api_v2/models/
avatar.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/// Avatar : Details of an avatar.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Avatar {
17    /// The ID of the avatar.
18    #[serde(rename = "id")]
19    pub id: String,
20    /// The owner of the avatar. For a system avatar the owner is null (and nothing is returned). For non-system avatars this is the appropriate identifier, such as the ID for a project or the account ID for a user.
21    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
22    pub owner: Option<String>,
23    /// Whether the avatar is a system avatar.
24    #[serde(rename = "isSystemAvatar", skip_serializing_if = "Option::is_none")]
25    pub is_system_avatar: Option<bool>,
26    /// Whether the avatar is used in Jira. For example, shown as a project's avatar.
27    #[serde(rename = "isSelected", skip_serializing_if = "Option::is_none")]
28    pub is_selected: Option<bool>,
29    /// Whether the avatar can be deleted.
30    #[serde(rename = "isDeletable", skip_serializing_if = "Option::is_none")]
31    pub is_deletable: Option<bool>,
32    /// The file name of the avatar icon. Returned for system avatars.
33    #[serde(rename = "fileName", skip_serializing_if = "Option::is_none")]
34    pub file_name: Option<String>,
35    /// The list of avatar icon URLs.
36    #[serde(rename = "urls", skip_serializing_if = "Option::is_none")]
37    pub urls: Option<std::collections::HashMap<String, String>>,
38}
39
40impl Avatar {
41    /// Details of an avatar.
42    pub fn new(id: String) -> Avatar {
43        Avatar {
44            id,
45            owner: None,
46            is_system_avatar: None,
47            is_selected: None,
48            is_deletable: None,
49            file_name: None,
50            urls: None,
51        }
52    }
53}
54