marlowe_client 0.0.5

HTTP client for the Marlowe Runtime REST API
Documentation
/*
 * Marlowe Runtime REST API
 *
 * REST API for Marlowe Runtime
 *
 * The version of the OpenAPI document: 0.0.5.1
 *
 * Generated by: https://openapi-generator.tech
 */

/// CreateTxBodyEnvelope : The \"type\" property of \"txBody\" must be \"TxBody BabbageEra\" or \"TxBody ConwayEra\"

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateTxBodyEnvelope {
    /// A reference to a transaction output with a transaction ID and index.
    #[serde(rename = "contractId")]
    pub contract_id: String,
    #[serde(rename = "safetyErrors", skip_serializing_if = "Option::is_none")]
    pub safety_errors: Option<Vec<crate::models::SafetyError>>,
    #[serde(rename = "txBody")]
    pub tx_body: Box<crate::models::TextEnvelope>,
}

impl CreateTxBodyEnvelope {
    /// The \"type\" property of \"txBody\" must be \"TxBody BabbageEra\" or \"TxBody ConwayEra\"
    pub fn new(contract_id: String, tx_body: crate::models::TextEnvelope) -> CreateTxBodyEnvelope {
        CreateTxBodyEnvelope {
            contract_id,
            safety_errors: None,
            tx_body: Box::new(tx_body),
        }
    }
}