//! This code was AUTOGENERATED using the codama library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun codama to update it.
//!
//! <https://github.com/codama-idl/codama>
//!

use crate::generated::types::MetaplexCollection;
use crate::generated::types::MetaplexCollectionDetails;
use crate::generated::types::MetaplexData;
use crate::generated::types::MetaplexProgrammableConfig;
use crate::generated::types::MetaplexTokenStandard;
use crate::generated::types::MetaplexUses;
use borsh::BorshDeserialize;
use borsh::BorshSerialize;
use solana_pubkey::Pubkey;

#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MetaplexMetadata {
    pub discriminator: u8,
    #[cfg_attr(
        feature = "serde",
        serde(with = "serde_with::As::<serde_with::DisplayFromStr>")
    )]
    pub update_authority: Pubkey,
    #[cfg_attr(
        feature = "serde",
        serde(with = "serde_with::As::<serde_with::DisplayFromStr>")
    )]
    pub mint: Pubkey,
    pub data: MetaplexData,
    pub primary_sale_happened: bool,
    pub mutable: bool,
    pub edition_nonce: Option<u8>,
    pub token_standard: Option<MetaplexTokenStandard>,
    pub collection: Option<MetaplexCollection>,
    pub uses: Option<MetaplexUses>,
    pub collection_details: Option<MetaplexCollectionDetails>,
    pub programmable_config: Option<MetaplexProgrammableConfig>,
}
