/*
 * Mithril
 *
 * Mithril Compute API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateBidRequest {
    #[serde(rename = "project")]
    pub project: String,
    #[serde(rename = "region")]
    pub region: String,
    #[serde(rename = "instance_type")]
    pub instance_type: String,
    #[serde(rename = "limit_price")]
    pub limit_price: String,
    #[serde(rename = "instance_quantity")]
    pub instance_quantity: i32,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "launch_specification")]
    pub launch_specification: Box<models::LaunchSpecificationModel>,
}

impl CreateBidRequest {
    pub fn new(
        project: String,
        region: String,
        instance_type: String,
        limit_price: String,
        instance_quantity: i32,
        name: String,
        launch_specification: models::LaunchSpecificationModel,
    ) -> CreateBidRequest {
        CreateBidRequest {
            project,
            region,
            instance_type,
            limit_price,
            instance_quantity,
            name,
            launch_specification: Box::new(launch_specification),
        }
    }
}
