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
61
62
63
64
65
66
67
68
/*
* 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 Durable {
/// Ack is the acknowledgment policy: explicit (default), all, or none.
#[serde(rename = "ack_policy", skip_serializing_if = "Option::is_none")]
pub ack_policy: Option<String>,
/// AckWait is how long the broker waits for an ack before redelivering, e.g. \"30s\" (default).
#[serde(rename = "ack_wait", skip_serializing_if = "Option::is_none")]
pub ack_wait: Option<String>,
/// Deliver is where delivery starts: all (default), last, new, by_start_sequence, by_start_time, or last_per_subject.
#[serde(rename = "deliver_policy", skip_serializing_if = "Option::is_none")]
pub deliver_policy: Option<String>,
/// Description says what this consumer is for.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Name is the durable consumer name (alphanumeric, hyphens, underscores).
#[serde(rename = "durable_name", skip_serializing_if = "Option::is_none")]
pub durable_name: Option<String>,
/// Filter delivers only messages on this org-relative subject (wildcards supported).
#[serde(rename = "filter_subject", skip_serializing_if = "Option::is_none")]
pub filter_subject: Option<String>,
/// MaxAckPending caps unacknowledged messages in flight (default 1000).
#[serde(rename = "max_ack_pending", skip_serializing_if = "Option::is_none")]
pub max_ack_pending: Option<i32>,
/// MaxDeliver caps delivery attempts per message; -1 (default) is unlimited.
#[serde(rename = "max_deliver", skip_serializing_if = "Option::is_none")]
pub max_deliver: Option<i32>,
/// StartSeq is the starting sequence for deliver_policy by_start_sequence.
#[serde(rename = "opt_start_seq", skip_serializing_if = "Option::is_none")]
pub opt_start_seq: Option<i32>,
/// StartTime is the starting instant for deliver_policy by_start_time.
#[serde(rename = "opt_start_time", skip_serializing_if = "Option::is_none")]
pub opt_start_time: Option<String>,
/// Replay is the replay pacing: instant (default) or original.
#[serde(rename = "replay_policy", skip_serializing_if = "Option::is_none")]
pub replay_policy: Option<String>,
}
impl Durable {
pub fn new() -> Durable {
Durable {
ack_policy: None,
ack_wait: None,
deliver_policy: None,
description: None,
durable_name: None,
filter_subject: None,
max_ack_pending: None,
max_deliver: None,
opt_start_seq: None,
opt_start_time: None,
replay_policy: None,
}
}
}