use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateServerResponse {
#[serde(rename = "action")]
pub action: Box<models::Action>,
#[serde(rename = "next_actions")]
pub next_actions: Vec<models::Action>,
#[serde(rename = "root_password", deserialize_with = "Option::deserialize")]
pub root_password: Option<String>,
#[serde(rename = "server")]
pub server: Box<models::Server>,
}
impl CreateServerResponse {
pub fn new(
action: models::Action,
next_actions: Vec<models::Action>,
root_password: Option<String>,
server: models::Server,
) -> CreateServerResponse {
CreateServerResponse {
action: Box::new(action),
next_actions,
root_password,
server: Box::new(server),
}
}
}