mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-12 05:41:32 +00:00
maintenance: derive Copy for maintenance type and make maintenance mode fields public
Because it is a public api type. Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
81904b652c
commit
7767c7cfd5
@ -33,7 +33,7 @@ pub enum Operation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[api]
|
#[api]
|
||||||
#[derive(Deserialize, Serialize, PartialEq, Eq)]
|
#[derive(Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
/// Maintenance type.
|
/// Maintenance type.
|
||||||
pub enum MaintenanceType {
|
pub enum MaintenanceType {
|
||||||
@ -69,11 +69,11 @@ serde_plain::derive_fromstr_from_deserialize!(MaintenanceType);
|
|||||||
pub struct MaintenanceMode {
|
pub struct MaintenanceMode {
|
||||||
/// Type of maintenance ("read-only" or "offline").
|
/// Type of maintenance ("read-only" or "offline").
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
ty: MaintenanceType,
|
pub ty: MaintenanceType,
|
||||||
|
|
||||||
/// Reason for maintenance.
|
/// Reason for maintenance.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
message: Option<String>,
|
pub message: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MaintenanceMode {
|
impl MaintenanceMode {
|
||||||
|
Loading…
Reference in New Issue
Block a user