dtz-core 2.3.6

a generated client for the DTZ Core API
Documentation
/*
 * DTZ Core Api
 *
 * a generated client for the DTZ Core API
 *
 * Contact: jens@apimeister.com
 * Generated by: https://openapi-generator.tech
 */

#[allow(unused_imports)]
use crate::models;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PullTaskFromQueueRequest {
    /// declares the node id
    #[serde(rename = "nodeId")]
    pub node_id: String,
    /// declares the instance id
    #[serde(rename = "instanceId", skip_serializing_if = "Option::is_none")]
    pub instance_id: Option<String>,
    /// declares the cpu capacity of the node
    #[serde(rename = "cpuCapacity")]
    pub cpu_capacity: i64,
    /// declares the memory capacity of the node
    #[serde(rename = "memCapacity")]
    pub mem_capacity: i64,
    /// declares if the node is running in eco mode
    #[serde(rename = "ecoMode")]
    pub eco_mode: bool,
}

impl PullTaskFromQueueRequest {
    pub fn new(node_id: String, cpu_capacity: i64, mem_capacity: i64, eco_mode: bool) -> PullTaskFromQueueRequest {
        PullTaskFromQueueRequest {
            node_id,
            instance_id: None,
            cpu_capacity,
            mem_capacity,
            eco_mode,
        }
    }
}