module Lifx.Internal.Product where
import Data.Text (Text)
import Data.Word (Word16, Word32)
import GHC.Generics (Generic)
data VendorInfo = VendorInfo
{ VendorInfo -> Word32
vid :: Word32
, VendorInfo -> Text
name :: Text
, VendorInfo -> Features
defaults :: Features
, VendorInfo -> [ProductInfo]
products :: [ProductInfo]
}
deriving (Int -> VendorInfo -> ShowS
[VendorInfo] -> ShowS
VendorInfo -> String
(Int -> VendorInfo -> ShowS)
-> (VendorInfo -> String)
-> ([VendorInfo] -> ShowS)
-> Show VendorInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VendorInfo -> ShowS
showsPrec :: Int -> VendorInfo -> ShowS
$cshow :: VendorInfo -> String
show :: VendorInfo -> String
$cshowList :: [VendorInfo] -> ShowS
showList :: [VendorInfo] -> ShowS
Show)
data ProductInfo = ProductInfo
{ ProductInfo -> Word32
pid :: Word32
, ProductInfo -> Text
name :: Text
, ProductInfo -> PartialFeatures
features :: PartialFeatures
, ProductInfo -> [Upgrade]
upgrades :: [Upgrade]
}
deriving (Int -> ProductInfo -> ShowS
[ProductInfo] -> ShowS
ProductInfo -> String
(Int -> ProductInfo -> ShowS)
-> (ProductInfo -> String)
-> ([ProductInfo] -> ShowS)
-> Show ProductInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProductInfo -> ShowS
showsPrec :: Int -> ProductInfo -> ShowS
$cshow :: ProductInfo -> String
show :: ProductInfo -> String
$cshowList :: [ProductInfo] -> ShowS
showList :: [ProductInfo] -> ShowS
Show)
data PartialFeatures = PartialFeatures
{ PartialFeatures -> Maybe Bool
hev :: Maybe Bool
, PartialFeatures -> Maybe Bool
color :: Maybe Bool
, PartialFeatures -> Maybe Bool
chain :: Maybe Bool
, PartialFeatures -> Maybe Bool
matrix :: Maybe Bool
, PartialFeatures -> Maybe Bool
relays :: Maybe Bool
, PartialFeatures -> Maybe Bool
buttons :: Maybe Bool
, PartialFeatures -> Maybe Bool
infrared :: Maybe Bool
, PartialFeatures -> Maybe Bool
multizone :: Maybe Bool
, PartialFeatures -> Maybe (Word16, Word16)
temperatureRange :: Maybe (Word16, Word16)
, PartialFeatures -> Maybe Bool
extendedMultizone :: Maybe Bool
}
deriving (Int -> PartialFeatures -> ShowS
[PartialFeatures] -> ShowS
PartialFeatures -> String
(Int -> PartialFeatures -> ShowS)
-> (PartialFeatures -> String)
-> ([PartialFeatures] -> ShowS)
-> Show PartialFeatures
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PartialFeatures -> ShowS
showsPrec :: Int -> PartialFeatures -> ShowS
$cshow :: PartialFeatures -> String
show :: PartialFeatures -> String
$cshowList :: [PartialFeatures] -> ShowS
showList :: [PartialFeatures] -> ShowS
Show)
data Features = Features
{ Features -> Bool
hev :: Bool
, Features -> Bool
color :: Bool
, Features -> Bool
chain :: Bool
, Features -> Bool
matrix :: Bool
, Features -> Bool
relays :: Bool
, Features -> Bool
buttons :: Bool
, Features -> Bool
infrared :: Bool
, Features -> Bool
multizone :: Bool
, Features -> Maybe (Word16, Word16)
temperatureRange :: Maybe (Word16, Word16)
, Features -> Bool
extendedMultizone :: Bool
}
deriving (Features -> Features -> Bool
(Features -> Features -> Bool)
-> (Features -> Features -> Bool) -> Eq Features
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Features -> Features -> Bool
== :: Features -> Features -> Bool
$c/= :: Features -> Features -> Bool
/= :: Features -> Features -> Bool
Eq, Eq Features
Eq Features =>
(Features -> Features -> Ordering)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Features)
-> (Features -> Features -> Features)
-> Ord Features
Features -> Features -> Bool
Features -> Features -> Ordering
Features -> Features -> Features
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Features -> Features -> Ordering
compare :: Features -> Features -> Ordering
$c< :: Features -> Features -> Bool
< :: Features -> Features -> Bool
$c<= :: Features -> Features -> Bool
<= :: Features -> Features -> Bool
$c> :: Features -> Features -> Bool
> :: Features -> Features -> Bool
$c>= :: Features -> Features -> Bool
>= :: Features -> Features -> Bool
$cmax :: Features -> Features -> Features
max :: Features -> Features -> Features
$cmin :: Features -> Features -> Features
min :: Features -> Features -> Features
Ord, Int -> Features -> ShowS
[Features] -> ShowS
Features -> String
(Int -> Features -> ShowS)
-> (Features -> String) -> ([Features] -> ShowS) -> Show Features
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Features -> ShowS
showsPrec :: Int -> Features -> ShowS
$cshow :: Features -> String
show :: Features -> String
$cshowList :: [Features] -> ShowS
showList :: [Features] -> ShowS
Show, (forall x. Features -> Rep Features x)
-> (forall x. Rep Features x -> Features) -> Generic Features
forall x. Rep Features x -> Features
forall x. Features -> Rep Features x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Features -> Rep Features x
from :: forall x. Features -> Rep Features x
$cto :: forall x. Rep Features x -> Features
to :: forall x. Rep Features x -> Features
Generic)
data Upgrade = Upgrade
{ Upgrade -> Word16
major :: Word16
, Upgrade -> Word16
minor :: Word16
, Upgrade -> PartialFeatures
features :: PartialFeatures
}
deriving (Int -> Upgrade -> ShowS
[Upgrade] -> ShowS
Upgrade -> String
(Int -> Upgrade -> ShowS)
-> (Upgrade -> String) -> ([Upgrade] -> ShowS) -> Show Upgrade
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Upgrade -> ShowS
showsPrec :: Int -> Upgrade -> ShowS
$cshow :: Upgrade -> String
show :: Upgrade -> String
$cshowList :: [Upgrade] -> ShowS
showList :: [Upgrade] -> ShowS
Show)