fastcomments_sdk/client/src/models/
aggregation_response.rs

1/*
2 * fastcomments
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::client::models;
12use serde::{Deserialize, Serialize};
13
14/// AggregationResponse : The API response returns the aggregated data along with simple stats
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AggregationResponse {
17    #[serde(rename = "status")]
18    pub status: models::ApiStatus,
19    #[serde(rename = "data")]
20    pub data: Vec<models::AggregationItem>,
21    #[serde(rename = "stats", skip_serializing_if = "Option::is_none")]
22    pub stats: Option<Box<models::AggregationResponseStats>>,
23}
24
25impl AggregationResponse {
26    /// The API response returns the aggregated data along with simple stats
27    pub fn new(status: models::ApiStatus, data: Vec<models::AggregationItem>) -> AggregationResponse {
28        AggregationResponse {
29            status,
30            data,
31            stats: None,
32        }
33    }
34}
35