//------------------------------------------------------------------------------
// <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 Ajuna.NetApi.Model.Types.Base;
   using Bajun.Network.NET.NetApiExt.Generated.Model.cumulus_pallet_xcmp_queue;
   using Ajuna.NetApi.Model.Types.Primitive;
   using Bajun.Network.NET.NetApiExt.Generated.Model.polkadot_parachain.primitives;
   using Bajun.Network.NET.RestClient.Generated.Interfaces;
   
   public sealed class XcmpQueueControllerClient : BaseClient, IXcmpQueueControllerClient
   {
      private HttpClient _httpClient;
      private BaseSubscriptionClient _subscriptionClient;
      public XcmpQueueControllerClient(HttpClient httpClient, BaseSubscriptionClient subscriptionClient)
      {
         _httpClient = httpClient;
         _subscriptionClient = subscriptionClient;
      }
      public async Task<BaseVec<InboundChannelDetails>> GetInboundXcmpStatus()
      {
         return await SendRequestAsync<BaseVec<InboundChannelDetails>>(_httpClient, "xcmpqueue/inboundxcmpstatus");
      }
      public async Task<bool> SubscribeInboundXcmpStatus()
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.InboundXcmpStatus");
      }
      public async Task<BaseVec<U8>> GetInboundXcmpMessages(BaseTuple<Id, U32> key)
      {
         return await SendRequestAsync<BaseVec<U8>>(_httpClient, "xcmpqueue/inboundxcmpmessages", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.InboundXcmpMessagesParams(key));
      }
      public async Task<bool> SubscribeInboundXcmpMessages(BaseTuple<Id, U32> key)
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.InboundXcmpMessages", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.InboundXcmpMessagesParams(key));
      }
      public async Task<BaseVec<OutboundChannelDetails>> GetOutboundXcmpStatus()
      {
         return await SendRequestAsync<BaseVec<OutboundChannelDetails>>(_httpClient, "xcmpqueue/outboundxcmpstatus");
      }
      public async Task<bool> SubscribeOutboundXcmpStatus()
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.OutboundXcmpStatus");
      }
      public async Task<BaseVec<U8>> GetOutboundXcmpMessages(BaseTuple<Id, U16> key)
      {
         return await SendRequestAsync<BaseVec<U8>>(_httpClient, "xcmpqueue/outboundxcmpmessages", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.OutboundXcmpMessagesParams(key));
      }
      public async Task<bool> SubscribeOutboundXcmpMessages(BaseTuple<Id, U16> key)
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.OutboundXcmpMessages", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.OutboundXcmpMessagesParams(key));
      }
      public async Task<BaseVec<U8>> GetSignalMessages(Id key)
      {
         return await SendRequestAsync<BaseVec<U8>>(_httpClient, "xcmpqueue/signalmessages", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.SignalMessagesParams(key));
      }
      public async Task<bool> SubscribeSignalMessages(Id key)
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.SignalMessages", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.SignalMessagesParams(key));
      }
      public async Task<QueueConfigData> GetQueueConfig()
      {
         return await SendRequestAsync<QueueConfigData>(_httpClient, "xcmpqueue/queueconfig");
      }
      public async Task<bool> SubscribeQueueConfig()
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.QueueConfig");
      }
      public async Task<BaseTuple<Id, U32, BaseVec<U8>>> GetOverweight(U64 key)
      {
         return await SendRequestAsync<BaseTuple<Id, U32, BaseVec<U8>>>(_httpClient, "xcmpqueue/overweight", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.OverweightParams(key));
      }
      public async Task<bool> SubscribeOverweight(U64 key)
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.Overweight", Bajun.Network.NET.NetApiExt.Generated.Storage.XcmpQueueStorage.OverweightParams(key));
      }
      public async Task<U64> GetOverweightCount()
      {
         return await SendRequestAsync<U64>(_httpClient, "xcmpqueue/overweightcount");
      }
      public async Task<bool> SubscribeOverweightCount()
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.OverweightCount");
      }
      public async Task<Bool> GetQueueSuspended()
      {
         return await SendRequestAsync<Bool>(_httpClient, "xcmpqueue/queuesuspended");
      }
      public async Task<bool> SubscribeQueueSuspended()
      {
         return await _subscriptionClient.SubscribeAsync("XcmpQueue.QueueSuspended");
      }
   }
}
