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