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