module TD.Data.PageBlockHorizontalAlignment
(PageBlockHorizontalAlignment(..)) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data PageBlockHorizontalAlignment
= PageBlockHorizontalAlignmentLeft
| PageBlockHorizontalAlignmentCenter
| PageBlockHorizontalAlignmentRight
deriving (PageBlockHorizontalAlignment
-> PageBlockHorizontalAlignment -> Bool
(PageBlockHorizontalAlignment
-> PageBlockHorizontalAlignment -> Bool)
-> (PageBlockHorizontalAlignment
-> PageBlockHorizontalAlignment -> Bool)
-> Eq PageBlockHorizontalAlignment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PageBlockHorizontalAlignment
-> PageBlockHorizontalAlignment -> Bool
== :: PageBlockHorizontalAlignment
-> PageBlockHorizontalAlignment -> Bool
$c/= :: PageBlockHorizontalAlignment
-> PageBlockHorizontalAlignment -> Bool
/= :: PageBlockHorizontalAlignment
-> PageBlockHorizontalAlignment -> Bool
Eq, Int -> PageBlockHorizontalAlignment -> ShowS
[PageBlockHorizontalAlignment] -> ShowS
PageBlockHorizontalAlignment -> String
(Int -> PageBlockHorizontalAlignment -> ShowS)
-> (PageBlockHorizontalAlignment -> String)
-> ([PageBlockHorizontalAlignment] -> ShowS)
-> Show PageBlockHorizontalAlignment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PageBlockHorizontalAlignment -> ShowS
showsPrec :: Int -> PageBlockHorizontalAlignment -> ShowS
$cshow :: PageBlockHorizontalAlignment -> String
show :: PageBlockHorizontalAlignment -> String
$cshowList :: [PageBlockHorizontalAlignment] -> ShowS
showList :: [PageBlockHorizontalAlignment] -> ShowS
Show)
instance I.ShortShow PageBlockHorizontalAlignment where
shortShow :: PageBlockHorizontalAlignment -> String
shortShow PageBlockHorizontalAlignment
PageBlockHorizontalAlignmentLeft
= String
"PageBlockHorizontalAlignmentLeft"
shortShow PageBlockHorizontalAlignment
PageBlockHorizontalAlignmentCenter
= String
"PageBlockHorizontalAlignmentCenter"
shortShow PageBlockHorizontalAlignment
PageBlockHorizontalAlignmentRight
= String
"PageBlockHorizontalAlignmentRight"
instance AT.FromJSON PageBlockHorizontalAlignment where
parseJSON :: Value -> Parser PageBlockHorizontalAlignment
parseJSON (AT.Object Object
obj) = do
String
t <- Object
obj Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: Key
"@type" :: AT.Parser String
case String
t of
String
"pageBlockHorizontalAlignmentLeft" -> PageBlockHorizontalAlignment -> Parser PageBlockHorizontalAlignment
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PageBlockHorizontalAlignment
PageBlockHorizontalAlignmentLeft
String
"pageBlockHorizontalAlignmentCenter" -> PageBlockHorizontalAlignment -> Parser PageBlockHorizontalAlignment
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PageBlockHorizontalAlignment
PageBlockHorizontalAlignmentCenter
String
"pageBlockHorizontalAlignmentRight" -> PageBlockHorizontalAlignment -> Parser PageBlockHorizontalAlignment
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PageBlockHorizontalAlignment
PageBlockHorizontalAlignmentRight
String
_ -> Parser PageBlockHorizontalAlignment
forall a. Monoid a => a
mempty
parseJSON Value
_ = Parser PageBlockHorizontalAlignment
forall a. Monoid a => a
mempty