//------------------------------------------------------------------------------
// <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.Attributes;
using Ajuna.NetApi.Model.Types.Base;
using Ajuna.NetApi.Model.Types.Metadata.V14;
using System.Collections.Generic;


namespace Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_awesome_avatars.types.config
{
    
    
    /// <summary>
    /// >> 111 - Composite[pallet_ajuna_awesome_avatars.types.config.MintConfig]
    /// </summary>
    [AjunaNodeType(TypeDefEnum.Composite)]
    public sealed class MintConfig : BaseType
    {
        
        /// <summary>
        /// >> open
        /// </summary>
        private Ajuna.NetApi.Model.Types.Primitive.Bool _open;
        
        /// <summary>
        /// >> fees
        /// </summary>
        private Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_awesome_avatars.types.config.MintFees _fees;
        
        /// <summary>
        /// >> cooldown
        /// </summary>
        private Ajuna.NetApi.Model.Types.Primitive.U32 _cooldown;
        
        /// <summary>
        /// >> free_mint_fee_multiplier
        /// </summary>
        private Ajuna.NetApi.Model.Types.Primitive.U16 _freeMintFeeMultiplier;
        
        public Ajuna.NetApi.Model.Types.Primitive.Bool Open
        {
            get
            {
                return this._open;
            }
            set
            {
                this._open = value;
            }
        }
        
        public Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_awesome_avatars.types.config.MintFees Fees
        {
            get
            {
                return this._fees;
            }
            set
            {
                this._fees = value;
            }
        }
        
        public Ajuna.NetApi.Model.Types.Primitive.U32 Cooldown
        {
            get
            {
                return this._cooldown;
            }
            set
            {
                this._cooldown = value;
            }
        }
        
        public Ajuna.NetApi.Model.Types.Primitive.U16 FreeMintFeeMultiplier
        {
            get
            {
                return this._freeMintFeeMultiplier;
            }
            set
            {
                this._freeMintFeeMultiplier = value;
            }
        }
        
        public override string TypeName()
        {
            return "MintConfig";
        }
        
        public override byte[] Encode()
        {
            var result = new List<byte>();
            result.AddRange(Open.Encode());
            result.AddRange(Fees.Encode());
            result.AddRange(Cooldown.Encode());
            result.AddRange(FreeMintFeeMultiplier.Encode());
            return result.ToArray();
        }
        
        public override void Decode(byte[] byteArray, ref int p)
        {
            var start = p;
            Open = new Ajuna.NetApi.Model.Types.Primitive.Bool();
            Open.Decode(byteArray, ref p);
            Fees = new Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_awesome_avatars.types.config.MintFees();
            Fees.Decode(byteArray, ref p);
            Cooldown = new Ajuna.NetApi.Model.Types.Primitive.U32();
            Cooldown.Decode(byteArray, ref p);
            FreeMintFeeMultiplier = new Ajuna.NetApi.Model.Types.Primitive.U16();
            FreeMintFeeMultiplier.Decode(byteArray, ref p);
            TypeSize = p - start;
        }
    }
}
