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