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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "CreateV1Args")]
pub struct CreateV1ArgsGraphQL {
    pub data_state: DataStateGraphQL,
    pub name: String,
    pub uri: String,
    pub plugins: Option<Vec<PluginAuthorityPairGraphQL>>,
}

impl From<crate::types::CreateV1Args> for CreateV1ArgsGraphQL {
    fn from(original: crate::types::CreateV1Args) -> Self {
        Self {
            data_state: original.data_state.into(),
            name: original.name,
            uri: original.uri,
            plugins: original
                .plugins
                .map(|v| v.into_iter().map(|item| item.into()).collect()),
        }
    }
}
