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