//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using Ajuna.NetApi.Model.Types.Base;
using Ajuna.ServiceLayer.Attributes;
using Ajuna.ServiceLayer.Storage;
using System.Collections.Generic;
using System.Threading.Tasks;


namespace Bajun.Network.NET.RestService.Generated.Storage
{
    
    
    /// <summary>
    /// INftStorage interface definition.
    /// </summary>
    public interface INftStorage : IStorage
    {
        
        /// <summary>
        /// >> Collection
        ///  Details of a collection.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionDetails GetCollection(string key);
        
        /// <summary>
        /// >> OwnershipAcceptance
        ///  The collection, if any, of which an account is willing to take ownership.
        /// </summary>
        Ajuna.NetApi.Model.Types.Primitive.U32 GetOwnershipAcceptance(string key);
        
        /// <summary>
        /// >> Account
        ///  The items held by any given account; set out this way so that items owned by a single
        ///  account can be enumerated.
        /// </summary>
        Ajuna.NetApi.Model.Types.Base.BaseTuple GetAccount(string key);
        
        /// <summary>
        /// >> CollectionAccount
        ///  The collections owned by any given account; set out this way so that collections owned by
        ///  a single account can be enumerated.
        /// </summary>
        Ajuna.NetApi.Model.Types.Base.BaseTuple GetCollectionAccount(string key);
        
        /// <summary>
        /// >> CollectionRoleOf
        ///  The items in existence and their ownership details.
        ///  Stores collection roles as per account.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.BitFlagsT3 GetCollectionRoleOf(string key);
        
        /// <summary>
        /// >> Item
        ///  The items in existence and their ownership details.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemDetails GetItem(string key);
        
        /// <summary>
        /// >> CollectionMetadataOf
        ///  Metadata of a collection.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionMetadata GetCollectionMetadataOf(string key);
        
        /// <summary>
        /// >> ItemMetadataOf
        ///  Metadata of an item.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemMetadata GetItemMetadataOf(string key);
        
        /// <summary>
        /// >> Attribute
        ///  Attributes of a collection.
        /// </summary>
        Ajuna.NetApi.Model.Types.Base.BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec.BoundedVecT7, Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.AttributeDeposit> GetAttribute(string key);
        
        /// <summary>
        /// >> ItemPriceOf
        ///  A price of an item.
        /// </summary>
        Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U128, Ajuna.NetApi.Model.Types.Base.BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>> GetItemPriceOf(string key);
        
        /// <summary>
        /// >> ItemAttributesApprovalsOf
        ///  Item attribute approvals.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_btree_set.BoundedBTreeSetT2 GetItemAttributesApprovalsOf(string key);
        
        /// <summary>
        /// >> NextCollectionId
        ///  Stores the `CollectionId` that is going to be used for the next collection.
        ///  This gets incremented whenever a new collection is created.
        /// </summary>
        Ajuna.NetApi.Model.Types.Primitive.U32 GetNextCollectionId();
        
        /// <summary>
        /// >> PendingSwapOf
        ///  Handles all the pending swaps.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.PendingSwap GetPendingSwapOf(string key);
        
        /// <summary>
        /// >> CollectionConfigOf
        ///  Config of a collection.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionConfig GetCollectionConfigOf(string key);
        
        /// <summary>
        /// >> ItemConfigOf
        ///  Config of an item.
        /// </summary>
        Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemConfig GetItemConfigOf(string key);
    }
    
    /// <summary>
    /// NftStorage class definition.
    /// </summary>
    public sealed class NftStorage : INftStorage
    {
        
        /// <summary>
        /// _collectionTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionDetails> _collectionTypedStorage;
        
        /// <summary>
        /// _ownershipAcceptanceTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Ajuna.NetApi.Model.Types.Primitive.U32> _ownershipAcceptanceTypedStorage;
        
        /// <summary>
        /// _accountTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple> _accountTypedStorage;
        
        /// <summary>
        /// _collectionAccountTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple> _collectionAccountTypedStorage;
        
        /// <summary>
        /// _collectionRoleOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.BitFlagsT3> _collectionRoleOfTypedStorage;
        
        /// <summary>
        /// _itemTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemDetails> _itemTypedStorage;
        
        /// <summary>
        /// _collectionMetadataOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionMetadata> _collectionMetadataOfTypedStorage;
        
        /// <summary>
        /// _itemMetadataOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemMetadata> _itemMetadataOfTypedStorage;
        
        /// <summary>
        /// _attributeTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec.BoundedVecT7, Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.AttributeDeposit>> _attributeTypedStorage;
        
        /// <summary>
        /// _itemPriceOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U128, Ajuna.NetApi.Model.Types.Base.BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>>> _itemPriceOfTypedStorage;
        
        /// <summary>
        /// _itemAttributesApprovalsOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_btree_set.BoundedBTreeSetT2> _itemAttributesApprovalsOfTypedStorage;
        
        /// <summary>
        /// _nextCollectionIdTypedStorage typed storage field
        /// </summary>
        private TypedStorage<Ajuna.NetApi.Model.Types.Primitive.U32> _nextCollectionIdTypedStorage;
        
        /// <summary>
        /// _pendingSwapOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.PendingSwap> _pendingSwapOfTypedStorage;
        
        /// <summary>
        /// _collectionConfigOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionConfig> _collectionConfigOfTypedStorage;
        
        /// <summary>
        /// _itemConfigOfTypedStorage typed storage field
        /// </summary>
        private TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemConfig> _itemConfigOfTypedStorage;
        
        /// <summary>
        /// NftStorage constructor.
        /// </summary>
        public NftStorage(IStorageDataProvider storageDataProvider, List<IStorageChangeDelegate> storageChangeDelegates)
        {
            this.CollectionTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionDetails>("Nft.Collection", storageDataProvider, storageChangeDelegates);
            this.OwnershipAcceptanceTypedStorage = new TypedMapStorage<Ajuna.NetApi.Model.Types.Primitive.U32>("Nft.OwnershipAcceptance", storageDataProvider, storageChangeDelegates);
            this.AccountTypedStorage = new TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple>("Nft.Account", storageDataProvider, storageChangeDelegates);
            this.CollectionAccountTypedStorage = new TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple>("Nft.CollectionAccount", storageDataProvider, storageChangeDelegates);
            this.CollectionRoleOfTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.BitFlagsT3>("Nft.CollectionRoleOf", storageDataProvider, storageChangeDelegates);
            this.ItemTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemDetails>("Nft.Item", storageDataProvider, storageChangeDelegates);
            this.CollectionMetadataOfTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionMetadata>("Nft.CollectionMetadataOf", storageDataProvider, storageChangeDelegates);
            this.ItemMetadataOfTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemMetadata>("Nft.ItemMetadataOf", storageDataProvider, storageChangeDelegates);
            this.AttributeTypedStorage = new TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec.BoundedVecT7, Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.AttributeDeposit>>("Nft.Attribute", storageDataProvider, storageChangeDelegates);
            this.ItemPriceOfTypedStorage = new TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U128, Ajuna.NetApi.Model.Types.Base.BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>>>("Nft.ItemPriceOf", storageDataProvider, storageChangeDelegates);
            this.ItemAttributesApprovalsOfTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_btree_set.BoundedBTreeSetT2>("Nft.ItemAttributesApprovalsOf", storageDataProvider, storageChangeDelegates);
            this.NextCollectionIdTypedStorage = new TypedStorage<Ajuna.NetApi.Model.Types.Primitive.U32>("Nft.NextCollectionId", storageDataProvider, storageChangeDelegates);
            this.PendingSwapOfTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.PendingSwap>("Nft.PendingSwapOf", storageDataProvider, storageChangeDelegates);
            this.CollectionConfigOfTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionConfig>("Nft.CollectionConfigOf", storageDataProvider, storageChangeDelegates);
            this.ItemConfigOfTypedStorage = new TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemConfig>("Nft.ItemConfigOf", storageDataProvider, storageChangeDelegates);
        }
        
        /// <summary>
        /// _collectionTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionDetails> CollectionTypedStorage
        {
            get
            {
                return _collectionTypedStorage;
            }
            set
            {
                _collectionTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _ownershipAcceptanceTypedStorage property
        /// </summary>
        public TypedMapStorage<Ajuna.NetApi.Model.Types.Primitive.U32> OwnershipAcceptanceTypedStorage
        {
            get
            {
                return _ownershipAcceptanceTypedStorage;
            }
            set
            {
                _ownershipAcceptanceTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _accountTypedStorage property
        /// </summary>
        public TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple> AccountTypedStorage
        {
            get
            {
                return _accountTypedStorage;
            }
            set
            {
                _accountTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _collectionAccountTypedStorage property
        /// </summary>
        public TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple> CollectionAccountTypedStorage
        {
            get
            {
                return _collectionAccountTypedStorage;
            }
            set
            {
                _collectionAccountTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _collectionRoleOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.BitFlagsT3> CollectionRoleOfTypedStorage
        {
            get
            {
                return _collectionRoleOfTypedStorage;
            }
            set
            {
                _collectionRoleOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _itemTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemDetails> ItemTypedStorage
        {
            get
            {
                return _itemTypedStorage;
            }
            set
            {
                _itemTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _collectionMetadataOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionMetadata> CollectionMetadataOfTypedStorage
        {
            get
            {
                return _collectionMetadataOfTypedStorage;
            }
            set
            {
                _collectionMetadataOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _itemMetadataOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemMetadata> ItemMetadataOfTypedStorage
        {
            get
            {
                return _itemMetadataOfTypedStorage;
            }
            set
            {
                _itemMetadataOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _attributeTypedStorage property
        /// </summary>
        public TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec.BoundedVecT7, Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.AttributeDeposit>> AttributeTypedStorage
        {
            get
            {
                return _attributeTypedStorage;
            }
            set
            {
                _attributeTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _itemPriceOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U128, Ajuna.NetApi.Model.Types.Base.BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>>> ItemPriceOfTypedStorage
        {
            get
            {
                return _itemPriceOfTypedStorage;
            }
            set
            {
                _itemPriceOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _itemAttributesApprovalsOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_btree_set.BoundedBTreeSetT2> ItemAttributesApprovalsOfTypedStorage
        {
            get
            {
                return _itemAttributesApprovalsOfTypedStorage;
            }
            set
            {
                _itemAttributesApprovalsOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _nextCollectionIdTypedStorage property
        /// </summary>
        public TypedStorage<Ajuna.NetApi.Model.Types.Primitive.U32> NextCollectionIdTypedStorage
        {
            get
            {
                return _nextCollectionIdTypedStorage;
            }
            set
            {
                _nextCollectionIdTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _pendingSwapOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.PendingSwap> PendingSwapOfTypedStorage
        {
            get
            {
                return _pendingSwapOfTypedStorage;
            }
            set
            {
                _pendingSwapOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _collectionConfigOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionConfig> CollectionConfigOfTypedStorage
        {
            get
            {
                return _collectionConfigOfTypedStorage;
            }
            set
            {
                _collectionConfigOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// _itemConfigOfTypedStorage property
        /// </summary>
        public TypedMapStorage<Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemConfig> ItemConfigOfTypedStorage
        {
            get
            {
                return _itemConfigOfTypedStorage;
            }
            set
            {
                _itemConfigOfTypedStorage = value;
            }
        }
        
        /// <summary>
        /// Connects to all storages and initializes the change subscription handling.
        /// </summary>
        public async Task InitializeAsync(Ajuna.ServiceLayer.Storage.IStorageDataProvider dataProvider)
        {
            await CollectionTypedStorage.InitializeAsync("Nft", "Collection");
            await OwnershipAcceptanceTypedStorage.InitializeAsync("Nft", "OwnershipAcceptance");
            await AccountTypedStorage.InitializeAsync("Nft", "Account");
            await CollectionAccountTypedStorage.InitializeAsync("Nft", "CollectionAccount");
            await CollectionRoleOfTypedStorage.InitializeAsync("Nft", "CollectionRoleOf");
            await ItemTypedStorage.InitializeAsync("Nft", "Item");
            await CollectionMetadataOfTypedStorage.InitializeAsync("Nft", "CollectionMetadataOf");
            await ItemMetadataOfTypedStorage.InitializeAsync("Nft", "ItemMetadataOf");
            await AttributeTypedStorage.InitializeAsync("Nft", "Attribute");
            await ItemPriceOfTypedStorage.InitializeAsync("Nft", "ItemPriceOf");
            await ItemAttributesApprovalsOfTypedStorage.InitializeAsync("Nft", "ItemAttributesApprovalsOf");
            await NextCollectionIdTypedStorage.InitializeAsync("Nft", "NextCollectionId");
            await PendingSwapOfTypedStorage.InitializeAsync("Nft", "PendingSwapOf");
            await CollectionConfigOfTypedStorage.InitializeAsync("Nft", "CollectionConfigOf");
            await ItemConfigOfTypedStorage.InitializeAsync("Nft", "ItemConfigOf");
        }
        
        /// <summary>
        /// Implements any storage change for Nft.Collection
        /// </summary>
        [StorageChange("Nft", "Collection")]
        public void OnUpdateCollection(string key, string data)
        {
            CollectionTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> Collection
        ///  Details of a collection.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionDetails GetCollection(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (CollectionTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionDetails result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.OwnershipAcceptance
        /// </summary>
        [StorageChange("Nft", "OwnershipAcceptance")]
        public void OnUpdateOwnershipAcceptance(string key, string data)
        {
            OwnershipAcceptanceTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> OwnershipAcceptance
        ///  The collection, if any, of which an account is willing to take ownership.
        /// </summary>
        public Ajuna.NetApi.Model.Types.Primitive.U32 GetOwnershipAcceptance(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (OwnershipAcceptanceTypedStorage.Dictionary.TryGetValue(key, out Ajuna.NetApi.Model.Types.Primitive.U32 result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.Account
        /// </summary>
        [StorageChange("Nft", "Account")]
        public void OnUpdateAccount(string key, string data)
        {
            AccountTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> Account
        ///  The items held by any given account; set out this way so that items owned by a single
        ///  account can be enumerated.
        /// </summary>
        public Ajuna.NetApi.Model.Types.Base.BaseTuple GetAccount(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (AccountTypedStorage.Dictionary.TryGetValue(key, out Ajuna.NetApi.Model.Types.Base.BaseTuple result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.CollectionAccount
        /// </summary>
        [StorageChange("Nft", "CollectionAccount")]
        public void OnUpdateCollectionAccount(string key, string data)
        {
            CollectionAccountTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> CollectionAccount
        ///  The collections owned by any given account; set out this way so that collections owned by
        ///  a single account can be enumerated.
        /// </summary>
        public Ajuna.NetApi.Model.Types.Base.BaseTuple GetCollectionAccount(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (CollectionAccountTypedStorage.Dictionary.TryGetValue(key, out Ajuna.NetApi.Model.Types.Base.BaseTuple result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.CollectionRoleOf
        /// </summary>
        [StorageChange("Nft", "CollectionRoleOf")]
        public void OnUpdateCollectionRoleOf(string key, string data)
        {
            CollectionRoleOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> CollectionRoleOf
        ///  The items in existence and their ownership details.
        ///  Stores collection roles as per account.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.BitFlagsT3 GetCollectionRoleOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (CollectionRoleOfTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.BitFlagsT3 result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.Item
        /// </summary>
        [StorageChange("Nft", "Item")]
        public void OnUpdateItem(string key, string data)
        {
            ItemTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> Item
        ///  The items in existence and their ownership details.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemDetails GetItem(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (ItemTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemDetails result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.CollectionMetadataOf
        /// </summary>
        [StorageChange("Nft", "CollectionMetadataOf")]
        public void OnUpdateCollectionMetadataOf(string key, string data)
        {
            CollectionMetadataOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> CollectionMetadataOf
        ///  Metadata of a collection.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionMetadata GetCollectionMetadataOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (CollectionMetadataOfTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionMetadata result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.ItemMetadataOf
        /// </summary>
        [StorageChange("Nft", "ItemMetadataOf")]
        public void OnUpdateItemMetadataOf(string key, string data)
        {
            ItemMetadataOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> ItemMetadataOf
        ///  Metadata of an item.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemMetadata GetItemMetadataOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (ItemMetadataOfTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemMetadata result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.Attribute
        /// </summary>
        [StorageChange("Nft", "Attribute")]
        public void OnUpdateAttribute(string key, string data)
        {
            AttributeTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> Attribute
        ///  Attributes of a collection.
        /// </summary>
        public Ajuna.NetApi.Model.Types.Base.BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec.BoundedVecT7, Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.AttributeDeposit> GetAttribute(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (AttributeTypedStorage.Dictionary.TryGetValue(key, out Ajuna.NetApi.Model.Types.Base.BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec.BoundedVecT7, Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.AttributeDeposit> result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.ItemPriceOf
        /// </summary>
        [StorageChange("Nft", "ItemPriceOf")]
        public void OnUpdateItemPriceOf(string key, string data)
        {
            ItemPriceOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> ItemPriceOf
        ///  A price of an item.
        /// </summary>
        public Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U128, Ajuna.NetApi.Model.Types.Base.BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>> GetItemPriceOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (ItemPriceOfTypedStorage.Dictionary.TryGetValue(key, out Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U128, Ajuna.NetApi.Model.Types.Base.BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>> result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.ItemAttributesApprovalsOf
        /// </summary>
        [StorageChange("Nft", "ItemAttributesApprovalsOf")]
        public void OnUpdateItemAttributesApprovalsOf(string key, string data)
        {
            ItemAttributesApprovalsOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> ItemAttributesApprovalsOf
        ///  Item attribute approvals.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_btree_set.BoundedBTreeSetT2 GetItemAttributesApprovalsOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (ItemAttributesApprovalsOfTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_btree_set.BoundedBTreeSetT2 result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.NextCollectionId
        /// </summary>
        [StorageChange("Nft", "NextCollectionId")]
        public void OnUpdateNextCollectionId(string data)
        {
            NextCollectionIdTypedStorage.Update(data);
        }
        
        /// <summary>
        /// >> NextCollectionId
        ///  Stores the `CollectionId` that is going to be used for the next collection.
        ///  This gets incremented whenever a new collection is created.
        /// </summary>
        public Ajuna.NetApi.Model.Types.Primitive.U32 GetNextCollectionId()
        {
            return NextCollectionIdTypedStorage.Get();
        }
        
        /// <summary>
        /// Implements any storage change for Nft.PendingSwapOf
        /// </summary>
        [StorageChange("Nft", "PendingSwapOf")]
        public void OnUpdatePendingSwapOf(string key, string data)
        {
            PendingSwapOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> PendingSwapOf
        ///  Handles all the pending swaps.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.PendingSwap GetPendingSwapOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (PendingSwapOfTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.PendingSwap result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.CollectionConfigOf
        /// </summary>
        [StorageChange("Nft", "CollectionConfigOf")]
        public void OnUpdateCollectionConfigOf(string key, string data)
        {
            CollectionConfigOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> CollectionConfigOf
        ///  Config of a collection.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionConfig GetCollectionConfigOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (CollectionConfigOfTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.CollectionConfig result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
        
        /// <summary>
        /// Implements any storage change for Nft.ItemConfigOf
        /// </summary>
        [StorageChange("Nft", "ItemConfigOf")]
        public void OnUpdateItemConfigOf(string key, string data)
        {
            ItemConfigOfTypedStorage.Update(key, data);
        }
        
        /// <summary>
        /// >> ItemConfigOf
        ///  Config of an item.
        /// </summary>
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemConfig GetItemConfigOf(string key)
        {
            if ((key == null))
            {
                return null;
            }
            if (ItemConfigOfTypedStorage.Dictionary.TryGetValue(key, out Bajun.Network.NET.NetApiExt.Generated.Model.pallet_nfts.types.ItemConfig result))
            {
                return result;
            }
            else
            {
                return null;
            }
        }
    }
}
