/*
 * 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};

/// ListSavedQueryVersionsResponse : Response body for GET /v1/queries/{id}/versions
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListSavedQueryVersionsResponse {
    #[serde(rename = "count")]
    pub count: i32,
    #[serde(rename = "has_more")]
    pub has_more: bool,
    #[serde(rename = "limit")]
    pub limit: i32,
    #[serde(rename = "offset")]
    pub offset: i32,
    #[serde(rename = "saved_query_id")]
    pub saved_query_id: String,
    #[serde(rename = "versions")]
    pub versions: Vec<models::SavedQueryVersionInfo>,
}

impl ListSavedQueryVersionsResponse {
    /// Response body for GET /v1/queries/{id}/versions
    pub fn new(
        count: i32,
        has_more: bool,
        limit: i32,
        offset: i32,
        saved_query_id: String,
        versions: Vec<models::SavedQueryVersionInfo>,
    ) -> ListSavedQueryVersionsResponse {
        ListSavedQueryVersionsResponse {
            count,
            has_more,
            limit,
            offset,
            saved_query_id,
            versions,
        }
    }
}
