module Web.Scim.Schema.User.Photo where
import Data.Aeson
import Data.Text (Text)
import GHC.Generics
import Web.Scim.Schema.Common
data Photo = Photo
{ Photo -> Maybe Text
typ :: Maybe Text,
Photo -> Maybe URI
value :: Maybe URI
}
deriving (Int -> Photo -> ShowS
[Photo] -> ShowS
Photo -> String
(Int -> Photo -> ShowS)
-> (Photo -> String) -> ([Photo] -> ShowS) -> Show Photo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Photo] -> ShowS
$cshowList :: [Photo] -> ShowS
show :: Photo -> String
$cshow :: Photo -> String
showsPrec :: Int -> Photo -> ShowS
$cshowsPrec :: Int -> Photo -> ShowS
Show, Photo -> Photo -> Bool
(Photo -> Photo -> Bool) -> (Photo -> Photo -> Bool) -> Eq Photo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Photo -> Photo -> Bool
$c/= :: Photo -> Photo -> Bool
== :: Photo -> Photo -> Bool
$c== :: Photo -> Photo -> Bool
Eq, (forall x. Photo -> Rep Photo x)
-> (forall x. Rep Photo x -> Photo) -> Generic Photo
forall x. Rep Photo x -> Photo
forall x. Photo -> Rep Photo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Photo x -> Photo
$cfrom :: forall x. Photo -> Rep Photo x
Generic)
instance FromJSON Photo where
parseJSON :: Value -> Parser Photo
parseJSON = Options -> Value -> Parser Photo
forall a.
(Generic a, GFromJSON Zero (Rep a)) =>
Options -> Value -> Parser a
genericParseJSON Options
parseOptions (Value -> Parser Photo)
-> (Value -> Value) -> Value -> Parser Photo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Value -> Value
jsonLower
instance ToJSON Photo where
toJSON :: Photo -> Value
toJSON = Options -> Photo -> Value
forall a.
(Generic a, GToJSON Value Zero (Rep a)) =>
Options -> a -> Value
genericToJSON Options
serializeOptions