/*
 * Hotdata API
 *
 * Powerful data platform API for datasets, queries, and analytics.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: developers@hotdata.dev
 * Generated by: https://openapi-generator.tech
 */

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

/// ListResultsResponse : Response body for GET /results
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListResultsResponse {
    /// Number of results returned in this response
    #[serde(rename = "count")]
    pub count: i32,
    /// Whether there are more results available after this page
    #[serde(rename = "has_more")]
    pub has_more: bool,
    /// Limit used for this request
    #[serde(rename = "limit")]
    pub limit: i32,
    /// Pagination offset used for this request
    #[serde(rename = "offset")]
    pub offset: i32,
    #[serde(rename = "results")]
    pub results: Vec<models::ResultInfo>,
}

impl ListResultsResponse {
    /// Response body for GET /results
    pub fn new(
        count: i32,
        has_more: bool,
        limit: i32,
        offset: i32,
        results: Vec<models::ResultInfo>,
    ) -> ListResultsResponse {
        ListResultsResponse {
            count,
            has_more,
            limit,
            offset,
            results,
        }
    }
}
