jira_api_v2/models/
role_actor.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/// RoleActor : Details about a user assigned to a project role.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RoleActor {
17    /// The ID of the role actor.
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<i64>,
20    /// The display name of the role actor. For users, depending on the user’s privacy setting, this may return an alternative value for the user's name.
21    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
22    pub display_name: Option<String>,
23    /// The type of role actor.
24    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
25    pub r#type: Option<Type>,
26    /// This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
27    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
28    pub name: Option<String>,
29    /// The avatar of the role actor.
30    #[serde(rename = "avatarUrl", skip_serializing_if = "Option::is_none")]
31    pub avatar_url: Option<String>,
32    #[serde(rename = "actorUser", skip_serializing_if = "Option::is_none")]
33    pub actor_user: Option<Box<models::ProjectRoleUser>>,
34    #[serde(rename = "actorGroup", skip_serializing_if = "Option::is_none")]
35    pub actor_group: Option<Box<models::ProjectRoleGroup>>,
36}
37
38impl RoleActor {
39    /// Details about a user assigned to a project role.
40    pub fn new() -> RoleActor {
41        RoleActor {
42            id: None,
43            display_name: None,
44            r#type: None,
45            name: None,
46            avatar_url: None,
47            actor_user: None,
48            actor_group: None,
49        }
50    }
51}
52/// The type of role actor.
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum Type {
55    #[serde(rename = "atlassian-group-role-actor")]
56    AtlassianGroupRoleActor,
57    #[serde(rename = "atlassian-user-role-actor")]
58    AtlassianUserRoleActor,
59}
60
61impl Default for Type {
62    fn default() -> Type {
63        Self::AtlassianGroupRoleActor
64    }
65}
66