use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SingleOnchainDepositSourceTriggerInput {
#[serde(rename = "Type")]
pub r#type: Type,
#[serde(rename = "Conditions")]
pub conditions: Vec<models::OnchainDepositSourceTriggerConditionInput>,
#[serde(rename = "SourceAddress")]
pub source_address: String,
#[serde(rename = "Expiry")]
pub expiry: String,
#[serde(rename = "Nonce")]
pub nonce: String,
}
impl SingleOnchainDepositSourceTriggerInput {
pub fn new(
r#type: Type,
conditions: Vec<models::OnchainDepositSourceTriggerConditionInput>,
source_address: String,
expiry: String,
nonce: String,
) -> SingleOnchainDepositSourceTriggerInput {
SingleOnchainDepositSourceTriggerInput {
r#type,
conditions,
source_address,
expiry,
nonce,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "SingleOnchainDepositSourceTriggerInput")]
SingleOnchainDepositSourceTriggerInput,
}
impl Default for Type {
fn default() -> Type {
Self::SingleOnchainDepositSourceTriggerInput
}
}