/*
 * Tapis Systems API
 *
 * The Tapis Systems API provides for management of Tapis Systems including permissions, credentials and Scheduler Profiles.
 *
 * The version of the OpenAPI document: 26Q1.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 LogicalQueue {
    #[serde(rename = "name")]
    pub name: String,
    /// Optional more verbose description.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "hpcQueueName")]
    pub hpc_queue_name: String,
    #[serde(rename = "maxJobs", skip_serializing_if = "Option::is_none")]
    pub max_jobs: Option<i32>,
    #[serde(rename = "maxJobsPerUser", skip_serializing_if = "Option::is_none")]
    pub max_jobs_per_user: Option<i32>,
    #[serde(rename = "minNodeCount", skip_serializing_if = "Option::is_none")]
    pub min_node_count: Option<i32>,
    #[serde(rename = "maxNodeCount", skip_serializing_if = "Option::is_none")]
    pub max_node_count: Option<i32>,
    #[serde(rename = "minCoresPerNode", skip_serializing_if = "Option::is_none")]
    pub min_cores_per_node: Option<i32>,
    #[serde(rename = "maxCoresPerNode", skip_serializing_if = "Option::is_none")]
    pub max_cores_per_node: Option<i32>,
    #[serde(rename = "minMemoryMB", skip_serializing_if = "Option::is_none")]
    pub min_memory_mb: Option<i32>,
    #[serde(rename = "maxMemoryMB", skip_serializing_if = "Option::is_none")]
    pub max_memory_mb: Option<i32>,
    #[serde(rename = "minMinutes", skip_serializing_if = "Option::is_none")]
    pub min_minutes: Option<i32>,
    #[serde(rename = "maxMinutes", skip_serializing_if = "Option::is_none")]
    pub max_minutes: Option<i32>,
    #[serde(rename = "schedulerOptions", skip_serializing_if = "Option::is_none")]
    pub scheduler_options: Option<Vec<models::SysArgSpec>>,
}

impl LogicalQueue {
    pub fn new(name: String, hpc_queue_name: String) -> LogicalQueue {
        LogicalQueue {
            name,
            description: None,
            hpc_queue_name,
            max_jobs: None,
            max_jobs_per_user: None,
            min_node_count: None,
            max_node_count: None,
            min_cores_per_node: None,
            max_cores_per_node: None,
            min_memory_mb: None,
            max_memory_mb: None,
            min_minutes: None,
            max_minutes: None,
            scheduler_options: None,
        }
    }
}
