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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "IncreaseLiquidityEvent")]
pub struct IncreaseLiquidityEventGraphQL {
    pub position_nft_mint: Pubkey,
    pub liquidity: U128,
    pub amount0: U64,
    pub amount1: U64,
    pub amount0_transfer_fee: U64,
    pub amount1_transfer_fee: U64,
}

impl From<crate::types::IncreaseLiquidityEvent> for IncreaseLiquidityEventGraphQL {
    fn from(original: crate::types::IncreaseLiquidityEvent) -> Self {
        Self {
            position_nft_mint: carbon_core::graphql::primitives::Pubkey(original.position_nft_mint),
            liquidity: carbon_core::graphql::primitives::U128(original.liquidity),
            amount0: carbon_core::graphql::primitives::U64(original.amount0),
            amount1: carbon_core::graphql::primitives::U64(original.amount1),
            amount0_transfer_fee: carbon_core::graphql::primitives::U64(
                original.amount0_transfer_fee,
            ),
            amount1_transfer_fee: carbon_core::graphql::primitives::U64(
                original.amount1_transfer_fee,
            ),
        }
    }
}
