//! This code was AUTOGENERATED using the Codama library.
use {
    crate::types::graphql::{AuthorityGraphQL, ExternalPluginAdapterSchemaGraphQL},
    juniper::GraphQLObject,
};

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "LinkedAppDataInitInfo")]
pub struct LinkedAppDataInitInfoGraphQL {
    pub data_authority: AuthorityGraphQL,
    pub init_plugin_authority: Option<AuthorityGraphQL>,
    pub schema: Option<ExternalPluginAdapterSchemaGraphQL>,
}

impl From<crate::types::LinkedAppDataInitInfo> for LinkedAppDataInitInfoGraphQL {
    fn from(original: crate::types::LinkedAppDataInitInfo) -> Self {
        Self {
            data_authority: original.data_authority.into(),
            init_plugin_authority: original.init_plugin_authority.map(|v| v.into()),
            schema: original.schema.map(|v| v.into()),
        }
    }
}
