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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "PluginAuthorityPair")]
pub struct PluginAuthorityPairGraphQL {
    pub plugin: PluginGraphQL,
    pub authority: Option<AuthorityGraphQL>,
}

impl From<crate::types::PluginAuthorityPair> for PluginAuthorityPairGraphQL {
    fn from(original: crate::types::PluginAuthorityPair) -> Self {
        Self {
            plugin: original.plugin.into(),
            authority: original.authority.map(|v| v.into()),
        }
    }
}
