/*
 * Cloud Hypervisor API
 *
 * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
 *
 * The version of the OpenAPI document: 0.3.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RestoreConfig {
    #[serde(rename = "source_url")]
    pub source_url: String,
    #[serde(rename = "prefault", skip_serializing_if = "Option::is_none")]
    pub prefault: Option<bool>,
    #[serde(
        rename = "memory_restore_mode",
        skip_serializing_if = "Option::is_none"
    )]
    pub memory_restore_mode: Option<models::MemoryRestoreMode>,
    #[serde(rename = "resume", skip_serializing_if = "Option::is_none")]
    pub resume: Option<bool>,
}

impl RestoreConfig {
    pub fn new(source_url: String) -> RestoreConfig {
        RestoreConfig {
            source_url,
            prefault: None,
            memory_restore_mode: None,
            resume: None,
        }
    }
}
