module TD.Query.CheckWalletBotBalance
  (CheckWalletBotBalance(..)
  ) where

import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I

-- | Returns information about balance of the current user in the bot https://t.me/walt; can be used only if getOption("can_use_ton_wallet"). Returns 'TD.Data.WalletBotBalance.WalletBotBalance'
data CheckWalletBotBalance
  = CheckWalletBotBalance
  deriving (CheckWalletBotBalance -> CheckWalletBotBalance -> Bool
(CheckWalletBotBalance -> CheckWalletBotBalance -> Bool)
-> (CheckWalletBotBalance -> CheckWalletBotBalance -> Bool)
-> Eq CheckWalletBotBalance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CheckWalletBotBalance -> CheckWalletBotBalance -> Bool
== :: CheckWalletBotBalance -> CheckWalletBotBalance -> Bool
$c/= :: CheckWalletBotBalance -> CheckWalletBotBalance -> Bool
/= :: CheckWalletBotBalance -> CheckWalletBotBalance -> Bool
Eq, Int -> CheckWalletBotBalance -> ShowS
[CheckWalletBotBalance] -> ShowS
CheckWalletBotBalance -> String
(Int -> CheckWalletBotBalance -> ShowS)
-> (CheckWalletBotBalance -> String)
-> ([CheckWalletBotBalance] -> ShowS)
-> Show CheckWalletBotBalance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CheckWalletBotBalance -> ShowS
showsPrec :: Int -> CheckWalletBotBalance -> ShowS
$cshow :: CheckWalletBotBalance -> String
show :: CheckWalletBotBalance -> String
$cshowList :: [CheckWalletBotBalance] -> ShowS
showList :: [CheckWalletBotBalance] -> ShowS
Show)

instance I.ShortShow CheckWalletBotBalance where
  shortShow :: CheckWalletBotBalance -> String
shortShow
    CheckWalletBotBalance
CheckWalletBotBalance
        = String
"CheckWalletBotBalance"

instance AT.ToJSON CheckWalletBotBalance where
  toJSON :: CheckWalletBotBalance -> Value
toJSON
    CheckWalletBotBalance
CheckWalletBotBalance
        = [Pair] -> Value
A.object
          [ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"checkWalletBotBalance"
          ]