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 Config {
    /// MaxAge caps message age, e.g. \"24h\" or \"7d\"; \"0\" (default) is unlimited.
    #[serde(rename = "max_age", skip_serializing_if = "Option::is_none")]
    pub max_age: Option<String>,
    /// MaxBytes caps the stream's total stored bytes; -1 (default) is unlimited.
    #[serde(rename = "max_bytes", skip_serializing_if = "Option::is_none")]
    pub max_bytes: Option<i32>,
    /// MaxMsgSize caps one message's size in bytes; -1 (default) is the broker's limit.
    #[serde(rename = "max_msg_size", skip_serializing_if = "Option::is_none")]
    pub max_msg_size: Option<i32>,
    /// MaxMsgs caps the number of stored messages; -1 (default) is unlimited.
    #[serde(rename = "max_msgs", skip_serializing_if = "Option::is_none")]
    pub max_msgs: Option<i32>,
    /// Name is the stream name, unique within the org (alphanumeric, hyphens, underscores).
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Replicas is the number of stream replicas (1–5); this plane runs 1.
    #[serde(rename = "num_replicas", skip_serializing_if = "Option::is_none")]
    pub num_replicas: Option<i32>,
    /// Retention is the retention policy: limits (default), interest, or workqueue.
    #[serde(rename = "retention", skip_serializing_if = "Option::is_none")]
    pub retention: Option<String>,
    /// Storage is the storage backend: file (default) or memory.
    #[serde(rename = "storage", skip_serializing_if = "Option::is_none")]
    pub storage: Option<String>,
    /// Subjects are the org-relative subjects bound to this stream (wildcards supported). Default: the stream name.
    #[serde(rename = "subjects", skip_serializing_if = "Option::is_none")]
    pub subjects: Option<Vec<String>>,
}

impl Config {
    pub fn new() -> Config {
        Config {
            max_age: None,
            max_bytes: None,
            max_msg_size: None,
            max_msgs: None,
            name: None,
            num_replicas: None,
            retention: None,
            storage: None,
            subjects: None,
        }
    }
}