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 BusPublish {
    /// Data is the payload, carried verbatim as UTF-8 text (typically JSON). Binary payloads belong on the NATS port.
    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
    pub data: Option<String>,
    /// Headers are optional message headers, one value per name. A Nats-Msg-Id header is JetStream's deduplication key: a repeat within the stream's dedup window is acknowledged as duplicate rather than stored twice.
    #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
    pub headers: Option<std::collections::HashMap<String, String>>,
    /// Subject is the subject to publish to, in the org's own namespace — e.g. orders.created. No wildcards.
    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
    pub subject: Option<String>,
}

impl BusPublish {
    pub fn new() -> BusPublish {
        BusPublish {
            data: None,
            headers: None,
            subject: None,
        }
    }
}