fastcomments-sdk 2.0.0

Official FastComments Rust SDK (Typed API Client & Utilities)
Documentation
/*
 * fastcomments
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// AggregationResponse : The API response returns the aggregated data along with simple stats
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AggregationResponse {
    #[serde(rename = "status")]
    pub status: models::ApiStatus,
    #[serde(rename = "data")]
    pub data: Vec<models::AggregationItem>,
    #[serde(rename = "stats", skip_serializing_if = "Option::is_none")]
    pub stats: Option<Box<models::AggregationResponseStats>>,
}

impl AggregationResponse {
    /// The API response returns the aggregated data along with simple stats
    pub fn new(status: models::ApiStatus, data: Vec<models::AggregationItem>) -> AggregationResponse {
        AggregationResponse {
            status,
            data,
            stats: None,
        }
    }
}