{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.BusinessOpeningHours where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Telegram.Bot.API.Internal.Utils
import Telegram.Bot.API.Types.BusinessOpeningHoursInterval
data BusinessOpeningHours = BusinessOpeningHours
{ BusinessOpeningHours -> Text
businessOpeningHoursTimeZoneName :: Text
, BusinessOpeningHours -> [BusinessOpeningHoursInterval]
businessOpeningHoursOpeningHours :: [BusinessOpeningHoursInterval]
}
deriving ((forall x. BusinessOpeningHours -> Rep BusinessOpeningHours x)
-> (forall x. Rep BusinessOpeningHours x -> BusinessOpeningHours)
-> Generic BusinessOpeningHours
forall x. Rep BusinessOpeningHours x -> BusinessOpeningHours
forall x. BusinessOpeningHours -> Rep BusinessOpeningHours x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. BusinessOpeningHours -> Rep BusinessOpeningHours x
from :: forall x. BusinessOpeningHours -> Rep BusinessOpeningHours x
$cto :: forall x. Rep BusinessOpeningHours x -> BusinessOpeningHours
to :: forall x. Rep BusinessOpeningHours x -> BusinessOpeningHours
Generic, Int -> BusinessOpeningHours -> ShowS
[BusinessOpeningHours] -> ShowS
BusinessOpeningHours -> String
(Int -> BusinessOpeningHours -> ShowS)
-> (BusinessOpeningHours -> String)
-> ([BusinessOpeningHours] -> ShowS)
-> Show BusinessOpeningHours
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BusinessOpeningHours -> ShowS
showsPrec :: Int -> BusinessOpeningHours -> ShowS
$cshow :: BusinessOpeningHours -> String
show :: BusinessOpeningHours -> String
$cshowList :: [BusinessOpeningHours] -> ShowS
showList :: [BusinessOpeningHours] -> ShowS
Show)
instance ToJSON BusinessOpeningHours where toJSON :: BusinessOpeningHours -> Value
toJSON = BusinessOpeningHours -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON BusinessOpeningHours where parseJSON :: Value -> Parser BusinessOpeningHours
parseJSON = Value -> Parser BusinessOpeningHours
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON