/*
* 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 CollabPayload {
/// Content maps a document field to its ProseMirror markup JSON.
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<std::collections::HashMap<String, String>>,
/// Source is the blob ref a getContent reads the snapshot from. Absent means there is no snapshot to read, which answers empty content.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// Updates carries, per field, a base64 Y.js state update encoding the SAME markup — the front computes it (markupToYDoc → encodeStateAsUpdate) so a createContent seeds the live-editing lane's update log, not just the snapshot blob. Without it a dialog-created description is invisible in the collaborative editor, which replays the ydoc log, never the snapshot.
#[serde(rename = "updates", skip_serializing_if = "Option::is_none")]
pub updates: Option<std::collections::HashMap<String, String>>,
}
impl CollabPayload {
pub fn new() -> CollabPayload {
CollabPayload {
content: None,
source: None,
updates: None,
}
}
}