fastcomments_sdk/client/src/models/
aggregation_response.rs1use crate::client::models;
12use serde::{Deserialize, Serialize};
13
14#[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 pub fn new(status: models::ApiStatus, data: Vec<models::AggregationItem>) -> AggregationResponse {
28 AggregationResponse {
29 status,
30 data,
31 stats: None,
32 }
33 }
34}
35