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

/// When : Wait for an action to be performed and apply the matching contract when it does. Apply the timeout contract if no actions have been performed in the timeout period.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct When {
    #[serde(rename = "timeout")]
    pub timeout: i64,
    #[serde(rename = "timeout_continuation")]
    pub timeout_continuation: Box<crate::models::Contract>,
    #[serde(rename = "when")]
    pub when: Vec<crate::models::Case>,
}

impl When {
    /// Wait for an action to be performed and apply the matching contract when it does. Apply the timeout contract if no actions have been performed in the timeout period.
    pub fn new(
        timeout: i64,
        timeout_continuation: crate::models::Contract,
        when: Vec<crate::models::Case>,
    ) -> When {
        When {
            timeout,
            timeout_continuation: Box::new(timeout_continuation),
            when,
        }
    }
}