{-# 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. LabeledPrice -> Rep LabeledPrice x)
-> (forall x. Rep LabeledPrice x -> LabeledPrice)
-> Generic LabeledPrice
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
$cfrom :: forall x. LabeledPrice -> Rep LabeledPrice x
from :: forall x. LabeledPrice -> Rep LabeledPrice x
$cto :: forall x. Rep LabeledPrice x -> LabeledPrice
to :: forall x. Rep LabeledPrice x -> LabeledPrice
Generic, Int -> LabeledPrice -> ShowS
[LabeledPrice] -> ShowS
LabeledPrice -> String
(Int -> LabeledPrice -> ShowS)
-> (LabeledPrice -> String)
-> ([LabeledPrice] -> ShowS)
-> Show LabeledPrice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LabeledPrice -> ShowS
showsPrec :: Int -> LabeledPrice -> ShowS
$cshow :: LabeledPrice -> String
show :: LabeledPrice -> String
$cshowList :: [LabeledPrice] -> ShowS
showList :: [LabeledPrice] -> ShowS
Show)
instance ToJSON LabeledPrice where toJSON :: LabeledPrice -> Value
toJSON = LabeledPrice -> Value
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 = Value -> Parser LabeledPrice
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON