/*
 * 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 ConsoleConfig {
    #[serde(rename = "file", skip_serializing_if = "Option::is_none")]
    pub file: Option<String>,
    #[serde(rename = "socket", skip_serializing_if = "Option::is_none")]
    pub socket: Option<String>,
    #[serde(rename = "mode")]
    pub mode: models::ConsoleMode,
    #[serde(rename = "iommu", skip_serializing_if = "Option::is_none")]
    pub iommu: Option<bool>,
}

impl ConsoleConfig {
    pub fn new(mode: models::ConsoleMode) -> ConsoleConfig {
        ConsoleConfig {
            file: None,
            socket: None,
            mode,
            iommu: None,
        }
    }
}
