nethsm_sdk_rs/models/
user_post_data.rs

1/*
2 * NetHSM
3 *
4 * All endpoints expect exactly the specified JSON. Additional properties will cause a Bad Request Error (400). All HTTP errors contain a JSON structure with an explanation of type string. All [base64](https://tools.ietf.org/html/rfc4648#section-4) encoded values are Big Endian.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: Nitrokey <info@nitrokey.com>
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct UserPostData {
13    #[serde(rename = "realName")]
14    pub real_name: String,
15    #[serde(rename = "role")]
16    pub role: crate::models::UserRole,
17    #[serde(rename = "passphrase")]
18    pub passphrase: String,
19}
20
21impl UserPostData {
22    pub fn new(
23        real_name: String,
24        role: crate::models::UserRole,
25        passphrase: String,
26    ) -> UserPostData {
27        UserPostData {
28            real_name,
29            role,
30            passphrase,
31        }
32    }
33}