//------------------------------------------------------------------------------
// <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.pallet_nfts.types;
   using Ajuna.NetApi.Model.Types.Primitive;
   using Ajuna.NetApi.Model.Types.Base;
   using Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_vec;
   using Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.bounded.bounded_btree_set;
   using Bajun.Network.NET.RestClient.Generated.Interfaces;
   
   public sealed class NftControllerClient : BaseClient, INftControllerClient
   {
      private HttpClient _httpClient;
      private BaseSubscriptionClient _subscriptionClient;
      public NftControllerClient(HttpClient httpClient, BaseSubscriptionClient subscriptionClient)
      {
         _httpClient = httpClient;
         _subscriptionClient = subscriptionClient;
      }
      public async Task<CollectionDetails> GetCollection(U32 key)
      {
         return await SendRequestAsync<CollectionDetails>(_httpClient, "nft/collection", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionParams(key));
      }
      public async Task<bool> SubscribeCollection(U32 key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.Collection", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionParams(key));
      }
      public async Task<U32> GetOwnershipAcceptance(Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32 key)
      {
         return await SendRequestAsync<U32>(_httpClient, "nft/ownershipacceptance", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.OwnershipAcceptanceParams(key));
      }
      public async Task<bool> SubscribeOwnershipAcceptance(Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32 key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.OwnershipAcceptance", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.OwnershipAcceptanceParams(key));
      }
      public async Task<BaseTuple> GetAccount(BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32, U32, U128> key)
      {
         return await SendRequestAsync<BaseTuple>(_httpClient, "nft/account", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.AccountParams(key));
      }
      public async Task<bool> SubscribeAccount(BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32, U32, U128> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.Account", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.AccountParams(key));
      }
      public async Task<BaseTuple> GetCollectionAccount(BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32, U32> key)
      {
         return await SendRequestAsync<BaseTuple>(_httpClient, "nft/collectionaccount", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionAccountParams(key));
      }
      public async Task<bool> SubscribeCollectionAccount(BaseTuple<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32, U32> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.CollectionAccount", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionAccountParams(key));
      }
      public async Task<BitFlagsT3> GetCollectionRoleOf(BaseTuple<U32, Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32> key)
      {
         return await SendRequestAsync<BitFlagsT3>(_httpClient, "nft/collectionroleof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionRoleOfParams(key));
      }
      public async Task<bool> SubscribeCollectionRoleOf(BaseTuple<U32, Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.CollectionRoleOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionRoleOfParams(key));
      }
      public async Task<ItemDetails> GetItem(BaseTuple<U32, U128> key)
      {
         return await SendRequestAsync<ItemDetails>(_httpClient, "nft/item", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemParams(key));
      }
      public async Task<bool> SubscribeItem(BaseTuple<U32, U128> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.Item", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemParams(key));
      }
      public async Task<CollectionMetadata> GetCollectionMetadataOf(U32 key)
      {
         return await SendRequestAsync<CollectionMetadata>(_httpClient, "nft/collectionmetadataof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionMetadataOfParams(key));
      }
      public async Task<bool> SubscribeCollectionMetadataOf(U32 key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.CollectionMetadataOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionMetadataOfParams(key));
      }
      public async Task<ItemMetadata> GetItemMetadataOf(BaseTuple<U32, U128> key)
      {
         return await SendRequestAsync<ItemMetadata>(_httpClient, "nft/itemmetadataof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemMetadataOfParams(key));
      }
      public async Task<bool> SubscribeItemMetadataOf(BaseTuple<U32, U128> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.ItemMetadataOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemMetadataOfParams(key));
      }
      public async Task<BaseTuple<BoundedVecT7, AttributeDeposit>> GetAttribute(BaseTuple<U32, BaseOpt<U128>, Bajun.Network.NET.NetApiExt.Generated.Model.frame_support.traits.tokens.misc.EnumAttributeNamespace, BoundedVecT6> key)
      {
         return await SendRequestAsync<BaseTuple<BoundedVecT7, AttributeDeposit>>(_httpClient, "nft/attribute", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.AttributeParams(key));
      }
      public async Task<bool> SubscribeAttribute(BaseTuple<U32, BaseOpt<U128>, Bajun.Network.NET.NetApiExt.Generated.Model.frame_support.traits.tokens.misc.EnumAttributeNamespace, BoundedVecT6> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.Attribute", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.AttributeParams(key));
      }
      public async Task<BaseTuple<U128, BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>>> GetItemPriceOf(BaseTuple<U32, U128> key)
      {
         return await SendRequestAsync<BaseTuple<U128, BaseOpt<Bajun.Network.NET.NetApiExt.Generated.Model.sp_core.crypto.AccountId32>>>(_httpClient, "nft/itempriceof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemPriceOfParams(key));
      }
      public async Task<bool> SubscribeItemPriceOf(BaseTuple<U32, U128> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.ItemPriceOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemPriceOfParams(key));
      }
      public async Task<BoundedBTreeSetT2> GetItemAttributesApprovalsOf(BaseTuple<U32, U128> key)
      {
         return await SendRequestAsync<BoundedBTreeSetT2>(_httpClient, "nft/itemattributesapprovalsof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemAttributesApprovalsOfParams(key));
      }
      public async Task<bool> SubscribeItemAttributesApprovalsOf(BaseTuple<U32, U128> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.ItemAttributesApprovalsOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemAttributesApprovalsOfParams(key));
      }
      public async Task<U32> GetNextCollectionId()
      {
         return await SendRequestAsync<U32>(_httpClient, "nft/nextcollectionid");
      }
      public async Task<bool> SubscribeNextCollectionId()
      {
         return await _subscriptionClient.SubscribeAsync("Nft.NextCollectionId");
      }
      public async Task<PendingSwap> GetPendingSwapOf(BaseTuple<U32, U128> key)
      {
         return await SendRequestAsync<PendingSwap>(_httpClient, "nft/pendingswapof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.PendingSwapOfParams(key));
      }
      public async Task<bool> SubscribePendingSwapOf(BaseTuple<U32, U128> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.PendingSwapOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.PendingSwapOfParams(key));
      }
      public async Task<CollectionConfig> GetCollectionConfigOf(U32 key)
      {
         return await SendRequestAsync<CollectionConfig>(_httpClient, "nft/collectionconfigof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionConfigOfParams(key));
      }
      public async Task<bool> SubscribeCollectionConfigOf(U32 key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.CollectionConfigOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.CollectionConfigOfParams(key));
      }
      public async Task<ItemConfig> GetItemConfigOf(BaseTuple<U32, U128> key)
      {
         return await SendRequestAsync<ItemConfig>(_httpClient, "nft/itemconfigof", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemConfigOfParams(key));
      }
      public async Task<bool> SubscribeItemConfigOf(BaseTuple<U32, U128> key)
      {
         return await _subscriptionClient.SubscribeAsync("Nft.ItemConfigOf", Bajun.Network.NET.NetApiExt.Generated.Storage.NftStorage.ItemConfigOfParams(key));
      }
   }
}
