module TD.Query.GetStorageStatisticsFast
  (GetStorageStatisticsFast(..)
  ) where

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

-- | Quickly returns approximate storage usage statistics. Can be called before authorization. Returns 'TD.Data.StorageStatisticsFast.StorageStatisticsFast'
data GetStorageStatisticsFast
  = GetStorageStatisticsFast
  deriving (GetStorageStatisticsFast -> GetStorageStatisticsFast -> Bool
(GetStorageStatisticsFast -> GetStorageStatisticsFast -> Bool)
-> (GetStorageStatisticsFast -> GetStorageStatisticsFast -> Bool)
-> Eq GetStorageStatisticsFast
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetStorageStatisticsFast -> GetStorageStatisticsFast -> Bool
== :: GetStorageStatisticsFast -> GetStorageStatisticsFast -> Bool
$c/= :: GetStorageStatisticsFast -> GetStorageStatisticsFast -> Bool
/= :: GetStorageStatisticsFast -> GetStorageStatisticsFast -> Bool
Eq, Int -> GetStorageStatisticsFast -> ShowS
[GetStorageStatisticsFast] -> ShowS
GetStorageStatisticsFast -> String
(Int -> GetStorageStatisticsFast -> ShowS)
-> (GetStorageStatisticsFast -> String)
-> ([GetStorageStatisticsFast] -> ShowS)
-> Show GetStorageStatisticsFast
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetStorageStatisticsFast -> ShowS
showsPrec :: Int -> GetStorageStatisticsFast -> ShowS
$cshow :: GetStorageStatisticsFast -> String
show :: GetStorageStatisticsFast -> String
$cshowList :: [GetStorageStatisticsFast] -> ShowS
showList :: [GetStorageStatisticsFast] -> ShowS
Show)

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

instance AT.ToJSON GetStorageStatisticsFast where
  toJSON :: GetStorageStatisticsFast -> Value
toJSON
    GetStorageStatisticsFast
GetStorageStatisticsFast
        = [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
"getStorageStatisticsFast"
          ]