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 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,
        }
    }
}