jira_api_v2/models/user_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/// UserDetails : User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions: * User record deleted from Atlassian: This occurs as the result of a right to be forgotten request. In this case, `displayName` provides an indication and other parameters have default values or are blank (for example, email is blank). * User record corrupted: This occurs as a results of events such as a server import and can only happen to deleted users. In this case, `accountId` returns *unknown* and all other parameters have fallback values. * User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have fallback values.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UserDetails {
17 /// The URL of the user.
18 #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
19 pub param_self: Option<String>,
20 /// 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.
21 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22 pub name: Option<String>,
23 /// 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.
24 #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
25 pub key: Option<String>,
26 /// The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
27 #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
28 pub account_id: Option<String>,
29 /// The email address of the user. Depending on the user’s privacy settings, this may be returned as null.
30 #[serde(rename = "emailAddress", skip_serializing_if = "Option::is_none")]
31 pub email_address: Option<String>,
32 /// The avatars of the user.
33 #[serde(rename = "avatarUrls", skip_serializing_if = "Option::is_none")]
34 pub avatar_urls: Option<Box<models::AvatarUrlsBean>>,
35 /// The display name of the user. Depending on the user’s privacy settings, this may return an alternative value.
36 #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
37 pub display_name: Option<String>,
38 /// Whether the user is active.
39 #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
40 pub active: Option<bool>,
41 /// The time zone specified in the user's profile. Depending on the user’s privacy settings, this may be returned as null.
42 #[serde(rename = "timeZone", skip_serializing_if = "Option::is_none")]
43 pub time_zone: Option<String>,
44 /// The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application user) or 'customer' (Jira Service Desk customer user)
45 #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")]
46 pub account_type: Option<String>,
47}
48
49impl UserDetails {
50 /// User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions: * User record deleted from Atlassian: This occurs as the result of a right to be forgotten request. In this case, `displayName` provides an indication and other parameters have default values or are blank (for example, email is blank). * User record corrupted: This occurs as a results of events such as a server import and can only happen to deleted users. In this case, `accountId` returns *unknown* and all other parameters have fallback values. * User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have fallback values.
51 pub fn new() -> UserDetails {
52 UserDetails {
53 param_self: None,
54 name: None,
55 key: None,
56 account_id: None,
57 email_address: None,
58 avatar_urls: None,
59 display_name: None,
60 active: None,
61 time_zone: None,
62 account_type: None,
63 }
64 }
65}
66