jira_api_v2/models/
project_role.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/// ProjectRole : Details about the roles in a project.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProjectRole {
17    /// The URL the project role details.
18    #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
19    pub param_self: Option<String>,
20    /// The name of the project role.
21    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22    pub name: Option<String>,
23    /// The ID of the project role.
24    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
25    pub id: Option<i64>,
26    /// The description of the project role.
27    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
28    pub description: Option<String>,
29    /// The list of users who act in this role.
30    #[serde(rename = "actors", skip_serializing_if = "Option::is_none")]
31    pub actors: Option<Vec<models::RoleActor>>,
32    /// The scope of the role. Indicated for roles associated with [next-gen projects](https://confluence.atlassian.com/x/loMyO).
33    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
34    pub scope: Option<models::Scope>,
35    /// The translated name of the project role.
36    #[serde(rename = "translatedName", skip_serializing_if = "Option::is_none")]
37    pub translated_name: Option<String>,
38    /// Whether the calling user is part of this role.
39    #[serde(rename = "currentUserRole", skip_serializing_if = "Option::is_none")]
40    pub current_user_role: Option<bool>,
41    /// Whether this role is the admin role for the project.
42    #[serde(rename = "admin", skip_serializing_if = "Option::is_none")]
43    pub admin: Option<bool>,
44    /// Whether the roles are configurable for this project.
45    #[serde(rename = "roleConfigurable", skip_serializing_if = "Option::is_none")]
46    pub role_configurable: Option<bool>,
47    /// Whether this role is the default role for the project
48    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
49    pub default: Option<bool>,
50}
51
52impl ProjectRole {
53    /// Details about the roles in a project.
54    pub fn new() -> ProjectRole {
55        ProjectRole {
56            param_self: None,
57            name: None,
58            id: None,
59            description: None,
60            actors: None,
61            scope: None,
62            translated_name: None,
63            current_user_role: None,
64            admin: None,
65            role_configurable: None,
66            default: None,
67        }
68    }
69}
70