jira_v3_openapi 1.5.0

Jira Cloud platform REST API lib (OpenAPI document version: 1001.0.0-SNAPSHOT-37416ade0f89f7cb291510843b8a4bbd682b33a1)
Documentation
/*
 * The Jira Cloud platform REST API
 *
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT-37416ade0f89f7cb291510843b8a4bbd682b33a1
 * Contact: ecosystem@atlassian.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// UserPickerUser : A user found in a search.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserPickerUser {
    /// The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    /// The user account type. Can take the following values:   *  `atlassian` regular Atlassian user account  *  `app` system account used for Connect applications and OAuth to represent external systems  *  `customer` Jira Service Desk account representing an external service desk
    #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")]
    pub account_type: Option<AccountType>,
    /// The avatar URL of the user.
    #[serde(rename = "avatarUrl", skip_serializing_if = "Option::is_none")]
    pub avatar_url: Option<String>,
    /// The display name of the user. Depending on the user’s privacy setting, this may be returned as null.
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    /// The display name, email address, and key of the user with the matched query string highlighted with the HTML bold tag.
    #[serde(rename = "html", skip_serializing_if = "Option::is_none")]
    pub html: Option<String>,
    /// This property is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    /// This property is no longer available . See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

impl UserPickerUser {
    /// A user found in a search.
    pub fn new() -> UserPickerUser {
        UserPickerUser {
            account_id: None,
            account_type: None,
            avatar_url: None,
            display_name: None,
            html: None,
            key: None,
            name: None,
        }
    }
}
/// The user account type. Can take the following values:   *  `atlassian` regular Atlassian user account  *  `app` system account used for Connect applications and OAuth to represent external systems  *  `customer` Jira Service Desk account representing an external service desk
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccountType {
    #[serde(rename = "atlassian")]
    Atlassian,
    #[serde(rename = "app")]
    App,
    #[serde(rename = "customer")]
    Customer,
    #[serde(rename = "unknown")]
    Unknown,
}

impl Default for AccountType {
    fn default() -> AccountType {
        Self::Atlassian
    }
}