/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListWorkflowVersions200ResponseVersionsInner {
    /// Monotonically increasing version number
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<i32>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// User id that authored this version
    #[serde(rename = "createdBy", skip_serializing_if = "Option::is_none")]
    pub created_by: Option<String>,
    /// Denormalized email so the history UI can render without a join
    #[serde(rename = "createdByEmail", skip_serializing_if = "Option::is_none")]
    pub created_by_email: Option<String>,
    /// When non-null, this snapshot was created by restoring that version
    #[serde(
        rename = "restoredFromVersion",
        skip_serializing_if = "Option::is_none"
    )]
    pub restored_from_version: Option<i32>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

impl ListWorkflowVersions200ResponseVersionsInner {
    pub fn new() -> ListWorkflowVersions200ResponseVersionsInner {
        ListWorkflowVersions200ResponseVersionsInner {
            version: None,
            name: None,
            description: None,
            created_by: None,
            created_by_email: None,
            restored_from_version: None,
            created_at: None,
        }
    }
}
