{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Web.Telegram.Types.Internal.User
( User (..),
)
where
import Data.Aeson
import Data.Text (Text)
import Deriving.Aeson
import Servant.API
import Web.Telegram.Types.Internal.Utils
data User
= User
{
userId :: Integer,
isBot :: Bool,
firstName :: Text,
lastName :: Maybe Text,
username :: Maybe Text,
languageCode :: Maybe Text,
canJoinGroups :: Maybe Bool,
canReadAllGroupMessages :: Maybe Bool,
supportsInlineQueries :: Maybe Bool
}
deriving (Show, Eq, Generic, Default)
deriving
(FromJSON, ToJSON)
via PrefixedSnake' "user" User
deriving (ToHttpApiData) via Serialize User