use crate::host::model::HostStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize)]
pub struct UpdateHostRequest {
pub hostid: String,
pub status: HostStatus,
}
impl UpdateHostRequest {
pub fn disable_host(hostid: String) -> Self {
Self {
hostid,
status: HostStatus::Disabled,
}
}
}
#[derive(Deserialize, Debug)]
pub struct UpdateHostResponse {
#[serde(rename = "hostids")]
pub host_ids: Vec<String>,
}