// 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 WorkflowTableRowsResponse {
    pub table_id: String,
    /// 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 rows: Option<Vec<WorkflowTableRow>>,
    pub row_count: i64,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub filtered_row_count: Option<i64>,
    /// Defaults to `0`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub offset: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub limit: Option<i64>,
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub has_more: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub next_cursor: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub previous_cursor: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub explain: Option<WorkflowTableExplain>,
}
impl WorkflowTableRowsResponse {
    /// Construct a new `WorkflowTableRowsResponse` with the required fields set.
    #[allow(deprecated)]
    pub fn new(table_id: impl Into<String>, row_count: i64) -> Self {
        Self {
            table_id: table_id.into(),
            columns: Default::default(),
            rows: Default::default(),
            row_count,
            filtered_row_count: Default::default(),
            offset: Default::default(),
            limit: Default::default(),
            has_more: Default::default(),
            next_cursor: Default::default(),
            previous_cursor: Default::default(),
            explain: Default::default(),
        }
    }
}
