/*
* 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
*/
/// WhenObject : 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 WhenObject {
#[serde(rename = "timeout")]
pub timeout: i64,
#[serde(rename = "timeout_continuation")]
pub timeout_continuation: Box<crate::models::ContractObject>,
#[serde(rename = "when")]
pub when: Vec<crate::models::CaseObject>,
}
impl WhenObject {
/// 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::ContractObject,
when: Vec<crate::models::CaseObject>,
) -> WhenObject {
WhenObject {
timeout,
timeout_continuation: Box::new(timeout_continuation),
when,
}
}
}