/*
 * 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 CreateLifecycleScriptRequest {
    #[serde(rename = "project")]
    pub project: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "content")]
    pub content: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
    pub scope: Option<models::PublicLifecycleScriptScope>,
}

impl CreateLifecycleScriptRequest {
    pub fn new(project: String, name: String, content: String) -> CreateLifecycleScriptRequest {
        CreateLifecycleScriptRequest {
            project,
            name,
            content,
            description: None,
            scope: None,
        }
    }
}
