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