/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetInboxResponseTime200ResponseHistogramInner {
    /// Human label (0-1m, 1-5m, 5-15m, 15-60m, 1-4h, 4-24h, 1d+)
    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
    pub bucket: Option<String>,
    #[serde(rename = "lowerSeconds", skip_serializing_if = "Option::is_none")]
    pub lower_seconds: Option<i32>,
    /// null on the open-ended last bucket
    #[serde(
        rename = "upperSeconds",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub upper_seconds: Option<Option<i32>>,
    #[serde(rename = "count", skip_serializing_if = "Option::is_none")]
    pub count: Option<i32>,
}

impl GetInboxResponseTime200ResponseHistogramInner {
    pub fn new() -> GetInboxResponseTime200ResponseHistogramInner {
        GetInboxResponseTime200ResponseHistogramInner {
            bucket: None,
            lower_seconds: None,
            upper_seconds: None,
            count: None,
        }
    }
}
