module TD.Query.GetAccountTtl
  (GetAccountTtl(..)
  ) where

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

-- | Returns the period of inactivity after which the account of the current user will automatically be deleted. Returns 'TD.Data.AccountTtl.AccountTtl'
data GetAccountTtl
  = GetAccountTtl
  deriving (GetAccountTtl -> GetAccountTtl -> Bool
(GetAccountTtl -> GetAccountTtl -> Bool)
-> (GetAccountTtl -> GetAccountTtl -> Bool) -> Eq GetAccountTtl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetAccountTtl -> GetAccountTtl -> Bool
== :: GetAccountTtl -> GetAccountTtl -> Bool
$c/= :: GetAccountTtl -> GetAccountTtl -> Bool
/= :: GetAccountTtl -> GetAccountTtl -> Bool
Eq, Int -> GetAccountTtl -> ShowS
[GetAccountTtl] -> ShowS
GetAccountTtl -> String
(Int -> GetAccountTtl -> ShowS)
-> (GetAccountTtl -> String)
-> ([GetAccountTtl] -> ShowS)
-> Show GetAccountTtl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetAccountTtl -> ShowS
showsPrec :: Int -> GetAccountTtl -> ShowS
$cshow :: GetAccountTtl -> String
show :: GetAccountTtl -> String
$cshowList :: [GetAccountTtl] -> ShowS
showList :: [GetAccountTtl] -> ShowS
Show)

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

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