Skip to main content

hanzo_client/models/
bus_message.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 BusMessage {
16    /// Data is the payload as UTF-8 text.
17    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
18    pub data: Option<String>,
19    /// Headers are the message's headers, when it carries any.
20    #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
21    pub headers: Option<std::collections::HashMap<String, Vec<String>>>,
22    /// Seq is the message's stream sequence — fetched messages only.
23    #[serde(rename = "seq", skip_serializing_if = "Option::is_none")]
24    pub seq: Option<i32>,
25    /// Subject is the message's subject in the org's own namespace.
26    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
27    pub subject: Option<String>,
28    /// Time is when the stream stored the message, RFC3339 — fetched messages only.
29    #[serde(rename = "time", skip_serializing_if = "Option::is_none")]
30    pub time: Option<String>,
31}
32
33impl BusMessage {
34    pub fn new() -> BusMessage {
35        BusMessage {
36            data: None,
37            headers: None,
38            seq: None,
39            subject: None,
40            time: None,
41        }
42    }
43}
44