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