/*
 * Pulsar Admin REST API
 *
 * This provides the REST API for admin operations
 *
 * The version of the OpenAPI document: v2
 * 
 * Generated by: https://openapi-generator.tech
 */



#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ConsumerStats {
    #[serde(rename = "msgRateOut", skip_serializing_if = "Option::is_none")]
    pub msg_rate_out: Option<f64>,
    #[serde(rename = "msgThroughputOut", skip_serializing_if = "Option::is_none")]
    pub msg_throughput_out: Option<f64>,
    #[serde(rename = "msgRateRedeliver", skip_serializing_if = "Option::is_none")]
    pub msg_rate_redeliver: Option<f64>,
    #[serde(rename = "consumerName", skip_serializing_if = "Option::is_none")]
    pub consumer_name: Option<String>,
    #[serde(rename = "availablePermits", skip_serializing_if = "Option::is_none")]
    pub available_permits: Option<i32>,
    #[serde(rename = "unackedMessages", skip_serializing_if = "Option::is_none")]
    pub unacked_messages: Option<i32>,
    #[serde(rename = "blockedConsumerOnUnackedMsgs", skip_serializing_if = "Option::is_none")]
    pub blocked_consumer_on_unacked_msgs: Option<bool>,
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<::std::collections::HashMap<String, String>>,
    #[serde(rename = "connectedSince", skip_serializing_if = "Option::is_none")]
    pub connected_since: Option<String>,
    #[serde(rename = "clientVersion", skip_serializing_if = "Option::is_none")]
    pub client_version: Option<String>,
    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
    pub address: Option<String>,
}

impl ConsumerStats {
    pub fn new() -> ConsumerStats {
        ConsumerStats {
            msg_rate_out: None,
            msg_throughput_out: None,
            msg_rate_redeliver: None,
            consumer_name: None,
            available_permits: None,
            unacked_messages: None,
            blocked_consumer_on_unacked_msgs: None,
            metadata: None,
            connected_since: None,
            client_version: None,
            address: None,
        }
    }
}


