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