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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "CollectProtocolFeeEvent")]
pub struct CollectProtocolFeeEventGraphQL {
    pub pool_state: Pubkey,
    pub recipient_token_account0: Pubkey,
    pub recipient_token_account1: Pubkey,
    pub amount0: U64,
    pub amount1: U64,
}

impl From<crate::types::CollectProtocolFeeEvent> for CollectProtocolFeeEventGraphQL {
    fn from(original: crate::types::CollectProtocolFeeEvent) -> Self {
        Self {
            pool_state: carbon_core::graphql::primitives::Pubkey(original.pool_state),
            recipient_token_account0: carbon_core::graphql::primitives::Pubkey(
                original.recipient_token_account0,
            ),
            recipient_token_account1: carbon_core::graphql::primitives::Pubkey(
                original.recipient_token_account1,
            ),
            amount0: carbon_core::graphql::primitives::U64(original.amount0),
            amount1: carbon_core::graphql::primitives::U64(original.amount1),
        }
    }
}
