// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowTable {
    pub id: String,
    pub name: String,
    pub filename: String,
    /// Project that owns this table. Null only on legacy rows that predate the project backfill.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub project_id: Option<String>,
    /// Defaults to ``.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub source_file_id: Option<String>,
    /// Defaults to ``.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub snapshot_file_id: Option<String>,
    pub row_count: i64,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub columns: Option<Vec<WorkflowTableColumn>>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub sample_rows: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
    /// Defaults to `{}`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub uploaded_by_user_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub created_at: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub updated_at: Option<String>,
}
impl WorkflowTable {
    /// Construct a new `WorkflowTable` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        name: impl Into<String>,
        filename: impl Into<String>,
        row_count: i64,
    ) -> Self {
        Self {
            id: id.into(),
            name: name.into(),
            filename: filename.into(),
            project_id: Default::default(),
            source_file_id: Default::default(),
            snapshot_file_id: Default::default(),
            row_count,
            columns: Default::default(),
            sample_rows: Default::default(),
            metadata: Default::default(),
            uploaded_by_user_id: Default::default(),
            created_at: Default::default(),
            updated_at: Default::default(),
        }
    }
}
