Skip to main content

clientapi_pve/models/
qemu_set_user_password_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
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 QemuSetUserPasswordRequest {
16
17    /// set to 1 if the password has already been passed through crypt()
18    #[serde(rename = "crypted", skip_serializing_if = "Option::is_none")]
19    pub crypted: Option<models::PveBoolean>,
20
21    /// The new password.
22    #[serde(rename = "password")]
23    pub password: String,
24
25    /// The user to set the password for.
26    #[serde(rename = "username")]
27    pub username: String,
28
29
30}
31
32impl QemuSetUserPasswordRequest {
33    pub fn new(password: String, username: String) -> QemuSetUserPasswordRequest {
34        QemuSetUserPasswordRequest {
35            
36            crypted: None,
37            
38            password,
39            
40            username,
41            
42        }
43    }
44}
45
46