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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "SwapCurve")]
pub struct SwapCurveGraphQL {
    pub curve_type: CurveTypeGraphQL,
    pub calculator: Vec<U8>,
}

impl From<crate::types::SwapCurve> for SwapCurveGraphQL {
    fn from(original: crate::types::SwapCurve) -> Self {
        Self {
            curve_type: original.curve_type.into(),
            calculator: original
                .calculator
                .into_iter()
                .map(carbon_core::graphql::primitives::U8)
                .collect(),
        }
    }
}
