1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* The Jira Cloud platform REST API
*
* Jira Cloud platform REST API documentation
*
* The version of the OpenAPI document: 1001.0.0-SNAPSHOT
* Contact: ecosystem@atlassian.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserWriteBean {
/// The URL of the user.
#[serde(rename = "self", skip_serializing_if = "Option::is_none")]
pub param_self: Option<String>,
/// 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.
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// 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.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// A password for the user. If a password is not set, a random password is generated.
#[serde(rename = "password", skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
/// The email address for the user.
#[serde(rename = "emailAddress")]
pub email_address: String,
/// The display name for the user.
#[serde(rename = "displayName")]
pub display_name: String,
/// Deprecated, do not use.
#[serde(rename = "applicationKeys", skip_serializing_if = "Option::is_none")]
pub application_keys: Option<Vec<String>>,
}
impl UserWriteBean {
pub fn new(email_address: String, display_name: String) -> UserWriteBean {
UserWriteBean {
param_self: None,
key: None,
name: None,
password: None,
email_address,
display_name,
application_keys: None,
}
}
}