Skip to main content

hanzo_client/models/
state.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct State {
16    /// Bytes is the total stored size.
17    #[serde(rename = "bytes", skip_serializing_if = "Option::is_none")]
18    pub bytes: Option<i32>,
19    /// Consumers is the number of consumers attached to this stream.
20    #[serde(rename = "consumer_count", skip_serializing_if = "Option::is_none")]
21    pub consumer_count: Option<i32>,
22    /// FirstSeq is the sequence of the first stored message.
23    #[serde(rename = "first_seq", skip_serializing_if = "Option::is_none")]
24    pub first_seq: Option<i32>,
25    /// FirstTS is the timestamp of the first stored message.
26    #[serde(rename = "first_ts", skip_serializing_if = "Option::is_none")]
27    pub first_ts: Option<String>,
28    /// LastSeq is the sequence of the last stored message.
29    #[serde(rename = "last_seq", skip_serializing_if = "Option::is_none")]
30    pub last_seq: Option<i32>,
31    /// LastTS is the timestamp of the last stored message.
32    #[serde(rename = "last_ts", skip_serializing_if = "Option::is_none")]
33    pub last_ts: Option<String>,
34    /// Messages is the number of messages currently stored.
35    #[serde(rename = "messages", skip_serializing_if = "Option::is_none")]
36    pub messages: Option<i32>,
37    /// Deleted is the number of deleted messages (sequence gaps).
38    #[serde(rename = "num_deleted", skip_serializing_if = "Option::is_none")]
39    pub num_deleted: Option<i32>,
40    /// Subjects is the number of distinct subjects stored.
41    #[serde(rename = "num_subjects", skip_serializing_if = "Option::is_none")]
42    pub num_subjects: Option<i32>,
43}
44
45impl State {
46    pub fn new() -> State {
47        State {
48            bytes: None,
49            consumer_count: None,
50            first_seq: None,
51            first_ts: None,
52            last_seq: None,
53            last_ts: None,
54            messages: None,
55            num_deleted: None,
56            num_subjects: None,
57        }
58    }
59}
60