/*
 * Abaco API
 *
 * Abaco (Actor Based Containers) is an API and distributed computing platform funded by the National Science Foundation to provide Functions-as-a-service to the research computing community. Abaco leverages Docker containers and the Actor Model of Concurrent Computation to provide generic function primitives that are portable, composable and scalable.
 *
 * The version of the OpenAPI document: 1
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActorMount {
    /// Path within the actor container for the mount.
    #[serde(rename = "container_path", skip_serializing_if = "Option::is_none")]
    pub container_path: Option<String>,
    /// Path on the Abaco compute node for the mount.
    #[serde(rename = "host_path", skip_serializing_if = "Option::is_none")]
    pub host_path: Option<String>,
    /// Mode for the mount (ro for read-only, rw for read-write).
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<Mode>,
}

impl ActorMount {
    pub fn new() -> ActorMount {
        ActorMount {
            container_path: None,
            host_path: None,
            mode: None,
        }
    }
}
/// Mode for the mount (ro for read-only, rw for read-write).
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum Mode {
    #[serde(rename = "ro")]
    #[default]
    Ro,
    #[serde(rename = "rw")]
    Rw,
}
