/*
 * Ethereal Exchange API
 *
 * Ethereal HTTP API for real-time trading, order management, and market data access.
 *
 * The version of the OpenAPI document: 0.1.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PageOfOrderDtos {
    /// Whether there are more objects to paginate through
    #[serde(rename = "hasNext")]
    pub has_next: bool,
    /// Pointer to the next page in pagination dataset
    #[serde(rename = "nextCursor", skip_serializing_if = "Option::is_none")]
    pub next_cursor: Option<String>,
    /// Array of order objects
    #[serde(rename = "data")]
    pub data: Vec<models::OrderDto>,
}

impl PageOfOrderDtos {
    pub fn new(has_next: bool, data: Vec<models::OrderDto>) -> PageOfOrderDtos {
        PageOfOrderDtos {
            has_next,
            next_cursor: None,
            data,
        }
    }
}
