/*
 * rivet-api-public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2.3.0-rc.11
 * Contact: developer@rivet.gg
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RunnerConfig {
    #[serde(rename = "normal")]
    pub normal: Box<models::RunnerConfigKindOneOfNormal>,
    #[serde(rename = "serverless")]
    pub serverless: Box<models::RunnerConfigKindOneOf1Serverless>,
    /// Deprecated.
    #[serde(rename = "drain_on_version_upgrade", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub drain_on_version_upgrade: Option<Option<bool>>,
    #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<Option<serde_json::Value>>,
}

impl RunnerConfig {
    pub fn new(normal: models::RunnerConfigKindOneOfNormal, serverless: models::RunnerConfigKindOneOf1Serverless) -> RunnerConfig {
        RunnerConfig {
            normal: Box::new(normal),
            serverless: Box::new(serverless),
            drain_on_version_upgrade: None,
            metadata: None,
        }
    }
}

