{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.UserChatBoosts where

import Data.Aeson (FromJSON (..), ToJSON (..))
import GHC.Generics (Generic)

import Telegram.Bot.API.Internal.Utils
import Telegram.Bot.API.Types.ChatBoost

-- ** 'UserChatBoosts'

-- | This object represents a list of boosts added to a chat by a user.
newtype UserChatBoosts = UserChatBoosts
  { UserChatBoosts -> [ChatBoost]
userChatBoostsBosts :: [ChatBoost]
  }
  deriving ((forall x. UserChatBoosts -> Rep UserChatBoosts x)
-> (forall x. Rep UserChatBoosts x -> UserChatBoosts)
-> Generic UserChatBoosts
forall x. Rep UserChatBoosts x -> UserChatBoosts
forall x. UserChatBoosts -> Rep UserChatBoosts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. UserChatBoosts -> Rep UserChatBoosts x
from :: forall x. UserChatBoosts -> Rep UserChatBoosts x
$cto :: forall x. Rep UserChatBoosts x -> UserChatBoosts
to :: forall x. Rep UserChatBoosts x -> UserChatBoosts
Generic, Int -> UserChatBoosts -> ShowS
[UserChatBoosts] -> ShowS
UserChatBoosts -> String
(Int -> UserChatBoosts -> ShowS)
-> (UserChatBoosts -> String)
-> ([UserChatBoosts] -> ShowS)
-> Show UserChatBoosts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserChatBoosts -> ShowS
showsPrec :: Int -> UserChatBoosts -> ShowS
$cshow :: UserChatBoosts -> String
show :: UserChatBoosts -> String
$cshowList :: [UserChatBoosts] -> ShowS
showList :: [UserChatBoosts] -> ShowS
Show)

instance ToJSON   UserChatBoosts where toJSON :: UserChatBoosts -> Value
toJSON = UserChatBoosts -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON UserChatBoosts where parseJSON :: Value -> Parser UserChatBoosts
parseJSON = Value -> Parser UserChatBoosts
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON