hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct State {
    /// Bytes is the total stored size.
    #[serde(rename = "bytes", skip_serializing_if = "Option::is_none")]
    pub bytes: Option<i32>,
    /// Consumers is the number of consumers attached to this stream.
    #[serde(rename = "consumer_count", skip_serializing_if = "Option::is_none")]
    pub consumer_count: Option<i32>,
    /// FirstSeq is the sequence of the first stored message.
    #[serde(rename = "first_seq", skip_serializing_if = "Option::is_none")]
    pub first_seq: Option<i32>,
    /// FirstTS is the timestamp of the first stored message.
    #[serde(rename = "first_ts", skip_serializing_if = "Option::is_none")]
    pub first_ts: Option<String>,
    /// LastSeq is the sequence of the last stored message.
    #[serde(rename = "last_seq", skip_serializing_if = "Option::is_none")]
    pub last_seq: Option<i32>,
    /// LastTS is the timestamp of the last stored message.
    #[serde(rename = "last_ts", skip_serializing_if = "Option::is_none")]
    pub last_ts: Option<String>,
    /// Messages is the number of messages currently stored.
    #[serde(rename = "messages", skip_serializing_if = "Option::is_none")]
    pub messages: Option<i32>,
    /// Deleted is the number of deleted messages (sequence gaps).
    #[serde(rename = "num_deleted", skip_serializing_if = "Option::is_none")]
    pub num_deleted: Option<i32>,
    /// Subjects is the number of distinct subjects stored.
    #[serde(rename = "num_subjects", skip_serializing_if = "Option::is_none")]
    pub num_subjects: Option<i32>,
}

impl State {
    pub fn new() -> State {
        State {
            bytes: None,
            consumer_count: None,
            first_seq: None,
            first_ts: None,
            last_seq: None,
            last_ts: None,
            messages: None,
            num_deleted: None,
            num_subjects: None,
        }
    }
}