/*
 * 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 NewActorNonce {
    /// The permission level associated with the nonce.
    #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
    pub level: Option<Level>,
    /// Max uses for the nonce; set to -1 for unlimited uses.
    #[serde(rename = "max_uses", skip_serializing_if = "Option::is_none")]
    pub max_uses: Option<i32>,
}

impl NewActorNonce {
    pub fn new() -> NewActorNonce {
        NewActorNonce {
            level: None,
            max_uses: None,
        }
    }
}
/// The permission level associated with the nonce.
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum Level {
    #[serde(rename = "READ")]
    #[default]
    Read,
    #[serde(rename = "WRITE")]
    Write,
    #[serde(rename = "EXECUTE")]
    Execute,
}
