1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* 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,
}
}
}