//! This code was AUTOGENERATED using the Codama library.
use {
    crate::types::graphql::DexGraphQL, carbon_core::graphql::primitives::U64,
    juniper::GraphQLObject,
};

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "SwapEvent")]
pub struct SwapEventGraphQL {
    pub dex: DexGraphQL,
    pub amount_in: U64,
    pub amount_out: U64,
}

impl From<crate::types::SwapEvent> for SwapEventGraphQL {
    fn from(original: crate::types::SwapEvent) -> Self {
        Self {
            dex: original.dex.into(),
            amount_in: carbon_core::graphql::primitives::U64(original.amount_in),
            amount_out: carbon_core::graphql::primitives::U64(original.amount_out),
        }
    }
}
