//------------------------------------------------------------------------------
// <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>
//------------------------------------------------------------------------------

namespace Bajun.Network.NET.RestClient.Generated.Clients
{
   using System;
   using System.Threading.Tasks;
   using System.Net.Http;
   using Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto;
   using Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_nft_staking.pallet;
   using Bajun.Network.NET.NetApiExt.Generated.Model.pallet_ajuna_nft_staking.contracts;
   using Ajuna.NetApi.Model.Types.Primitive;
   using Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec;
   using Bajun.Network.NET.RestClient.Generated.Interfaces;
   
   public sealed class NftStakeControllerClient : BaseClient, INftStakeControllerClient
   {
      private HttpClient _httpClient;
      private BaseSubscriptionClient _subscriptionClient;
      public NftStakeControllerClient(HttpClient httpClient, BaseSubscriptionClient subscriptionClient)
      {
         _httpClient = httpClient;
         _subscriptionClient = subscriptionClient;
      }
      public async Task<AccountId32> GetOrganizer()
      {
         return await SendRequestAsync<AccountId32>(_httpClient, "nftstake/organizer");
      }
      public async Task<bool> SubscribeOrganizer()
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.Organizer");
      }
      public async Task<EnumPalletLockedState> GetLockedState()
      {
         return await SendRequestAsync<EnumPalletLockedState>(_httpClient, "nftstake/lockedstate");
      }
      public async Task<bool> SubscribeLockedState()
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.LockedState");
      }
      public async Task<StakingContract> GetActiveContracts(U128 key)
      {
         return await SendRequestAsync<StakingContract>(_httpClient, "nftstake/activecontracts", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ActiveContractsParams(key));
      }
      public async Task<bool> SubscribeActiveContracts(U128 key)
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.ActiveContracts", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ActiveContractsParams(key));
      }
      public async Task<AccountId32> GetContractOwners(U128 key)
      {
         return await SendRequestAsync<AccountId32>(_httpClient, "nftstake/contractowners", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ContractOwnersParams(key));
      }
      public async Task<bool> SubscribeContractOwners(U128 key)
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.ContractOwners", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ContractOwnersParams(key));
      }
      public async Task<U32> GetContractDurations(U128 key)
      {
         return await SendRequestAsync<U32>(_httpClient, "nftstake/contractdurations", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ContractDurationsParams(key));
      }
      public async Task<bool> SubscribeContractDurations(U128 key)
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.ContractDurations", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ContractDurationsParams(key));
      }
      public async Task<BoundedVecT12> GetContractStakedAssets(U128 key)
      {
         return await SendRequestAsync<BoundedVecT12>(_httpClient, "nftstake/contractstakedassets", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ContractStakedAssetsParams(key));
      }
      public async Task<bool> SubscribeContractStakedAssets(U128 key)
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.ContractStakedAssets", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStakeStorage.ContractStakedAssetsParams(key));
      }
      public async Task<AccountId32> GetTreasuryAccount()
      {
         return await SendRequestAsync<AccountId32>(_httpClient, "nftstake/treasuryaccount");
      }
      public async Task<bool> SubscribeTreasuryAccount()
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.TreasuryAccount");
      }
      public async Task<U32> GetContractCollectionId()
      {
         return await SendRequestAsync<U32>(_httpClient, "nftstake/contractcollectionid");
      }
      public async Task<bool> SubscribeContractCollectionId()
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.ContractCollectionId");
      }
      public async Task<U128> GetNextContractId()
      {
         return await SendRequestAsync<U128>(_httpClient, "nftstake/nextcontractid");
      }
      public async Task<bool> SubscribeNextContractId()
      {
         return await _subscriptionClient.SubscribeAsync("NftStake.NextContractId");
      }
   }
}
