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
 */

/// CreateTxEnvelope : The \"type\" property of \"tx\" must be \"Tx BabbageEra\" or \"Tx ConwayEra\"

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateTxEnvelope {
    /// 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 = "tx")]
    pub tx: Box<crate::models::TextEnvelope>,
}

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