Skip to main content

hanzo_client/models/
consumer.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 Consumer {
16    /// AckFloor is the highest contiguously acknowledged sequence pair.
17    #[serde(rename = "ack_floor", skip_serializing_if = "Option::is_none")]
18    pub ack_floor: Option<Box<models::Sequences>>,
19    /// Config is the consumer's configuration.
20    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
21    pub config: Option<Box<models::Durable>>,
22    /// Created is when the consumer was created.
23    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
24    pub created: Option<String>,
25    /// Delivered is the highest delivered sequence pair.
26    #[serde(rename = "delivered", skip_serializing_if = "Option::is_none")]
27    pub delivered: Option<Box<models::Sequences>>,
28    /// Name is the consumer name.
29    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31    /// AckPending is the number of delivered, not yet acknowledged messages.
32    #[serde(rename = "num_ack_pending", skip_serializing_if = "Option::is_none")]
33    pub num_ack_pending: Option<i32>,
34    /// Pending is the number of messages yet to be delivered.
35    #[serde(rename = "num_pending", skip_serializing_if = "Option::is_none")]
36    pub num_pending: Option<i32>,
37    /// Redelivered is the number of messages currently being redelivered.
38    #[serde(rename = "num_redelivered", skip_serializing_if = "Option::is_none")]
39    pub num_redelivered: Option<i32>,
40    /// Waiting is the number of pull requests waiting for messages.
41    #[serde(rename = "num_waiting", skip_serializing_if = "Option::is_none")]
42    pub num_waiting: Option<i32>,
43    /// Stream is the stream this consumer reads.
44    #[serde(rename = "stream_name", skip_serializing_if = "Option::is_none")]
45    pub stream_name: Option<String>,
46}
47
48impl Consumer {
49    pub fn new() -> Consumer {
50        Consumer {
51            ack_floor: None,
52            config: None,
53            created: None,
54            delivered: None,
55            name: None,
56            num_ack_pending: None,
57            num_pending: None,
58            num_redelivered: None,
59            num_waiting: None,
60            stream_name: None,
61        }
62    }
63}
64