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