// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Public handle payload exposed by workflow step APIs.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PublicHandlePayload {
    /// Type of payload
    #[serde(rename = "type")]
    pub type_: PublicHandlePayloadType,
    /// For file handles: document reference
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub document: Option<FileRef>,
    /// For JSON handles: structured data
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub data: Option<serde_json::Value>,
}
impl PublicHandlePayload {
    /// Construct a new `PublicHandlePayload` with the required fields set.
    #[allow(deprecated)]
    pub fn new(type_: PublicHandlePayloadType) -> Self {
        Self {
            type_,
            document: Default::default(),
            data: Default::default(),
        }
    }
}
