//------------------------------------------------------------------------------
// <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>
    /// NftStakeController controller to access storages.
    /// </summary>
    [ApiController()]
    [Route("[controller]")]
    public sealed class NftStakeController : ControllerBase
    {
        
        private INftStakeStorage _nftStakeStorage;
        
        /// <summary>
        /// NftStakeController constructor.
        /// </summary>
        public NftStakeController(INftStakeStorage nftStakeStorage)
        {
            _nftStakeStorage = nftStakeStorage;
        }
        
        /// <summary>
        /// >> Organizer
        /// </summary>
        [HttpGet("Organizer")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "OrganizerParams")]
        public IActionResult GetOrganizer()
        {
            return this.Ok(_nftStakeStorage.GetOrganizer());
        }
        
        /// <summary>
        /// >> LockedState
        /// </summary>
        [HttpGet("LockedState")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_nft_staking.pallet.EnumPalletLockedState), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "LockedStateParams")]
        public IActionResult GetLockedState()
        {
            return this.Ok(_nftStakeStorage.GetLockedState());
        }
        
        /// <summary>
        /// >> ActiveContracts
        /// </summary>
        [HttpGet("ActiveContracts")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_nft_staking.contracts.StakingContract), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "ActiveContractsParams", typeof(Ajuna.NetApi.Model.Types.Primitive.U128))]
        public IActionResult GetActiveContracts(string key)
        {
            return this.Ok(_nftStakeStorage.GetActiveContracts(key));
        }
        
        /// <summary>
        /// >> ContractOwners
        /// </summary>
        [HttpGet("ContractOwners")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "ContractOwnersParams", typeof(Ajuna.NetApi.Model.Types.Primitive.U128))]
        public IActionResult GetContractOwners(string key)
        {
            return this.Ok(_nftStakeStorage.GetContractOwners(key));
        }
        
        /// <summary>
        /// >> ContractDurations
        /// </summary>
        [HttpGet("ContractDurations")]
        [ProducesResponseType(typeof(Ajuna.NetApi.Model.Types.Primitive.U32), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "ContractDurationsParams", typeof(Ajuna.NetApi.Model.Types.Primitive.U128))]
        public IActionResult GetContractDurations(string key)
        {
            return this.Ok(_nftStakeStorage.GetContractDurations(key));
        }
        
        /// <summary>
        /// >> ContractStakedAssets
        /// </summary>
        [HttpGet("ContractStakedAssets")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec.BoundedVecT12), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "ContractStakedAssetsParams", typeof(Ajuna.NetApi.Model.Types.Primitive.U128))]
        public IActionResult GetContractStakedAssets(string key)
        {
            return this.Ok(_nftStakeStorage.GetContractStakedAssets(key));
        }
        
        /// <summary>
        /// >> TreasuryAccount
        /// </summary>
        [HttpGet("TreasuryAccount")]
        [ProducesResponseType(typeof(Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "TreasuryAccountParams")]
        public IActionResult GetTreasuryAccount()
        {
            return this.Ok(_nftStakeStorage.GetTreasuryAccount());
        }
        
        /// <summary>
        /// >> ContractCollectionId
        /// </summary>
        [HttpGet("ContractCollectionId")]
        [ProducesResponseType(typeof(Ajuna.NetApi.Model.Types.Primitive.U32), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "ContractCollectionIdParams")]
        public IActionResult GetContractCollectionId()
        {
            return this.Ok(_nftStakeStorage.GetContractCollectionId());
        }
        
        /// <summary>
        /// >> NextContractId
        /// </summary>
        [HttpGet("NextContractId")]
        [ProducesResponseType(typeof(Ajuna.NetApi.Model.Types.Primitive.U128), 200)]
        [StorageKeyBuilder(typeof(Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage), "NextContractIdParams")]
        public IActionResult GetNextContractId()
        {
            return this.Ok(_nftStakeStorage.GetNextContractId());
        }
    }
}
