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 Consumer {
    /// AckFloor is the highest contiguously acknowledged sequence pair.
    #[serde(rename = "ack_floor", skip_serializing_if = "Option::is_none")]
    pub ack_floor: Option<Box<models::Sequences>>,
    /// Config is the consumer's configuration.
    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
    pub config: Option<Box<models::Durable>>,
    /// Created is when the consumer was created.
    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
    pub created: Option<String>,
    /// Delivered is the highest delivered sequence pair.
    #[serde(rename = "delivered", skip_serializing_if = "Option::is_none")]
    pub delivered: Option<Box<models::Sequences>>,
    /// Name is the consumer name.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// AckPending is the number of delivered, not yet acknowledged messages.
    #[serde(rename = "num_ack_pending", skip_serializing_if = "Option::is_none")]
    pub num_ack_pending: Option<i32>,
    /// Pending is the number of messages yet to be delivered.
    #[serde(rename = "num_pending", skip_serializing_if = "Option::is_none")]
    pub num_pending: Option<i32>,
    /// Redelivered is the number of messages currently being redelivered.
    #[serde(rename = "num_redelivered", skip_serializing_if = "Option::is_none")]
    pub num_redelivered: Option<i32>,
    /// Waiting is the number of pull requests waiting for messages.
    #[serde(rename = "num_waiting", skip_serializing_if = "Option::is_none")]
    pub num_waiting: Option<i32>,
    /// Stream is the stream this consumer reads.
    #[serde(rename = "stream_name", skip_serializing_if = "Option::is_none")]
    pub stream_name: Option<String>,
}

impl Consumer {
    pub fn new() -> Consumer {
        Consumer {
            ack_floor: None,
            config: None,
            created: None,
            delivered: None,
            name: None,
            num_ack_pending: None,
            num_pending: None,
            num_redelivered: None,
            num_waiting: None,
            stream_name: None,
        }
    }
}