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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "HashedAssetSchema")]
pub struct HashedAssetSchemaGraphQL {
    pub asset_hash: Vec<U8>,
    pub plugin_hashes: Vec<Vec<U8>>,
}

impl From<crate::types::HashedAssetSchema> for HashedAssetSchemaGraphQL {
    fn from(original: crate::types::HashedAssetSchema) -> Self {
        Self {
            asset_hash: original
                .asset_hash
                .into_iter()
                .map(carbon_core::graphql::primitives::U8)
                .collect(),
            plugin_hashes: original
                .plugin_hashes
                .into_iter()
                .map(|item| {
                    item.into_iter()
                        .map(carbon_core::graphql::primitives::U8)
                        .collect()
                })
                .collect(),
        }
    }
}
