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