jira_api_v2/models/
user_write_bean.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UserWriteBean {
16    /// The URL of the user.
17    #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
18    pub param_self: Option<String>,
19    /// The key for the user. When provided with `name`, overrides the value in `name` to set both `name` and `key`. This property is deprecated because of privacy changes. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
20    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
21    pub key: Option<String>,
22    /// The username for the user. This property is deprecated because of privacy changes. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    /// A password for the user. If a password is not set, a random password is generated.
26    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
27    pub password: Option<String>,
28    /// The email address for the user.
29    #[serde(rename = "emailAddress")]
30    pub email_address: String,
31    /// The display name for the user.
32    #[serde(rename = "displayName")]
33    pub display_name: String,
34    /// Deprecated, do not use.
35    #[serde(rename = "applicationKeys", skip_serializing_if = "Option::is_none")]
36    pub application_keys: Option<Vec<String>>,
37}
38
39impl UserWriteBean {
40    pub fn new(email_address: String, display_name: String) -> UserWriteBean {
41        UserWriteBean {
42            param_self: None,
43            key: None,
44            name: None,
45            password: None,
46            email_address,
47            display_name,
48            application_keys: None,
49        }
50    }
51}
52