jira_api_v2/models/
dashboard_details.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/// DashboardDetails : Details of a dashboard.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DashboardDetails {
17    /// The name of the dashboard.
18    #[serde(rename = "name")]
19    pub name: String,
20    /// The description of the dashboard.
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    /// The details of any share permissions for the dashboard.
24    #[serde(rename = "sharePermissions")]
25    pub share_permissions: Vec<models::SharePermission>,
26}
27
28impl DashboardDetails {
29    /// Details of a dashboard.
30    pub fn new(name: String, share_permissions: Vec<models::SharePermission>) -> DashboardDetails {
31        DashboardDetails {
32            name,
33            description: None,
34            share_permissions,
35        }
36    }
37}
38