//------------------------------------------------------------------------------
// <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 Bajun.Network.NET.RestService.Generated.Storage;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;


namespace Bajun.Network.NET.RestService.Generated.Controller
{
    
    
    /// <summary>
    /// DmpQueueController controller to access storages.
    /// </summary>
    [ApiController()]
    [Route("[controller]")]
    public sealed class DmpQueueController : ControllerBase
    {
        
        private IDmpQueueStorage _dmpQueueStorage;
        
        /// <summary>
        /// DmpQueueController constructor.
        /// </summary>
        public DmpQueueController(IDmpQueueStorage dmpQueueStorage)
        {
            _dmpQueueStorage = dmpQueueStorage;
        }
        
        /// <summary>
        /// >> Configuration
        ///  The configuration.
        /// </summary>
        [HttpGet("Configuration")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.cumulus_pallet_dmp_queue.ConfigData), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.DmpQueueStorage), "ConfigurationParams")]
        public IActionResult GetConfiguration()
        {
            return this.Ok(_dmpQueueStorage.GetConfiguration());
        }
        
        /// <summary>
        /// >> PageIndex
        ///  The page index.
        /// </summary>
        [HttpGet("PageIndex")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.cumulus_pallet_dmp_queue.PageIndexData), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.DmpQueueStorage), "PageIndexParams")]
        public IActionResult GetPageIndex()
        {
            return this.Ok(_dmpQueueStorage.GetPageIndex());
        }
        
        /// <summary>
        /// >> Pages
        ///  The queue pages.
        /// </summary>
        [HttpGet("Pages")]
        [ProducesResponseType(typeof(Ajuna.NetApi.Model.Types.Base.BaseVec<Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U32, Ajuna.NetApi.Model.Types.Base.BaseVec<Ajuna.NetApi.Model.Types.Primitive.U8>>>), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.DmpQueueStorage), "PagesParams", typeof(Ajuna.NetApi.Model.Types.Primitive.U32))]
        public IActionResult GetPages(string key)
        {
            return this.Ok(_dmpQueueStorage.GetPages(key));
        }
        
        /// <summary>
        /// >> Overweight
        ///  The overweight messages.
        /// </summary>
        [HttpGet("Overweight")]
        [ProducesResponseType(typeof(Ajuna.NetApi.Model.Types.Base.BaseTuple<Ajuna.NetApi.Model.Types.Primitive.U32, Ajuna.NetApi.Model.Types.Base.BaseVec<Ajuna.NetApi.Model.Types.Primitive.U8>>), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.DmpQueueStorage), "OverweightParams", typeof(Ajuna.NetApi.Model.Types.Primitive.U64))]
        public IActionResult GetOverweight(string key)
        {
            return this.Ok(_dmpQueueStorage.GetOverweight(key));
        }
    }
}
