Skip to main content

hanzo_client/models/
durable.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Durable {
16    /// Ack is the acknowledgment policy: explicit (default), all, or none.
17    #[serde(rename = "ack_policy", skip_serializing_if = "Option::is_none")]
18    pub ack_policy: Option<String>,
19    /// AckWait is how long the broker waits for an ack before redelivering, e.g. \"30s\" (default).
20    #[serde(rename = "ack_wait", skip_serializing_if = "Option::is_none")]
21    pub ack_wait: Option<String>,
22    /// Deliver is where delivery starts: all (default), last, new, by_start_sequence, by_start_time, or last_per_subject.
23    #[serde(rename = "deliver_policy", skip_serializing_if = "Option::is_none")]
24    pub deliver_policy: Option<String>,
25    /// Description says what this consumer is for.
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    /// Name is the durable consumer name (alphanumeric, hyphens, underscores).
29    #[serde(rename = "durable_name", skip_serializing_if = "Option::is_none")]
30    pub durable_name: Option<String>,
31    /// Filter delivers only messages on this org-relative subject (wildcards supported).
32    #[serde(rename = "filter_subject", skip_serializing_if = "Option::is_none")]
33    pub filter_subject: Option<String>,
34    /// MaxAckPending caps unacknowledged messages in flight (default 1000).
35    #[serde(rename = "max_ack_pending", skip_serializing_if = "Option::is_none")]
36    pub max_ack_pending: Option<i32>,
37    /// MaxDeliver caps delivery attempts per message; -1 (default) is unlimited.
38    #[serde(rename = "max_deliver", skip_serializing_if = "Option::is_none")]
39    pub max_deliver: Option<i32>,
40    /// StartSeq is the starting sequence for deliver_policy by_start_sequence.
41    #[serde(rename = "opt_start_seq", skip_serializing_if = "Option::is_none")]
42    pub opt_start_seq: Option<i32>,
43    /// StartTime is the starting instant for deliver_policy by_start_time.
44    #[serde(rename = "opt_start_time", skip_serializing_if = "Option::is_none")]
45    pub opt_start_time: Option<String>,
46    /// Replay is the replay pacing: instant (default) or original.
47    #[serde(rename = "replay_policy", skip_serializing_if = "Option::is_none")]
48    pub replay_policy: Option<String>,
49}
50
51impl Durable {
52    pub fn new() -> Durable {
53        Durable {
54            ack_policy: None,
55            ack_wait: None,
56            deliver_policy: None,
57            description: None,
58            durable_name: None,
59            filter_subject: None,
60            max_ack_pending: None,
61            max_deliver: None,
62            opt_start_seq: None,
63            opt_start_time: None,
64            replay_policy: None,
65        }
66    }
67}
68