{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.ResponseParameters where
import Data.Aeson (FromJSON (..), ToJSON (..))
import GHC.Generics (Generic)
import Telegram.Bot.API.Types.Common
import Telegram.Bot.API.Internal.Utils
data ResponseParameters = ResponseParameters
{ ResponseParameters -> Maybe ChatId
responseParametersMigrateToChatId :: Maybe ChatId
, ResponseParameters -> Maybe Seconds
responseParametersRetryAfter :: Maybe Seconds
}
deriving (Int -> ResponseParameters -> ShowS
[ResponseParameters] -> ShowS
ResponseParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResponseParameters] -> ShowS
$cshowList :: [ResponseParameters] -> ShowS
show :: ResponseParameters -> String
$cshow :: ResponseParameters -> String
showsPrec :: Int -> ResponseParameters -> ShowS
$cshowsPrec :: Int -> ResponseParameters -> ShowS
Show, forall x. Rep ResponseParameters x -> ResponseParameters
forall x. ResponseParameters -> Rep ResponseParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResponseParameters x -> ResponseParameters
$cfrom :: forall x. ResponseParameters -> Rep ResponseParameters x
Generic)
instance ToJSON ResponseParameters where toJSON :: ResponseParameters -> Value
toJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON ResponseParameters where parseJSON :: Value -> Parser ResponseParameters
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON