{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DAX.Types.SSEDescription where
import qualified Amazonka.Core as Core
import Amazonka.DAX.Types.SSEStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SSEDescription = SSEDescription'
{
SSEDescription -> Maybe SSEStatus
status :: Prelude.Maybe SSEStatus
}
deriving (SSEDescription -> SSEDescription -> Bool
(SSEDescription -> SSEDescription -> Bool)
-> (SSEDescription -> SSEDescription -> Bool) -> Eq SSEDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SSEDescription -> SSEDescription -> Bool
$c/= :: SSEDescription -> SSEDescription -> Bool
== :: SSEDescription -> SSEDescription -> Bool
$c== :: SSEDescription -> SSEDescription -> Bool
Prelude.Eq, ReadPrec [SSEDescription]
ReadPrec SSEDescription
Int -> ReadS SSEDescription
ReadS [SSEDescription]
(Int -> ReadS SSEDescription)
-> ReadS [SSEDescription]
-> ReadPrec SSEDescription
-> ReadPrec [SSEDescription]
-> Read SSEDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SSEDescription]
$creadListPrec :: ReadPrec [SSEDescription]
readPrec :: ReadPrec SSEDescription
$creadPrec :: ReadPrec SSEDescription
readList :: ReadS [SSEDescription]
$creadList :: ReadS [SSEDescription]
readsPrec :: Int -> ReadS SSEDescription
$creadsPrec :: Int -> ReadS SSEDescription
Prelude.Read, Int -> SSEDescription -> ShowS
[SSEDescription] -> ShowS
SSEDescription -> String
(Int -> SSEDescription -> ShowS)
-> (SSEDescription -> String)
-> ([SSEDescription] -> ShowS)
-> Show SSEDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SSEDescription] -> ShowS
$cshowList :: [SSEDescription] -> ShowS
show :: SSEDescription -> String
$cshow :: SSEDescription -> String
showsPrec :: Int -> SSEDescription -> ShowS
$cshowsPrec :: Int -> SSEDescription -> ShowS
Prelude.Show, (forall x. SSEDescription -> Rep SSEDescription x)
-> (forall x. Rep SSEDescription x -> SSEDescription)
-> Generic SSEDescription
forall x. Rep SSEDescription x -> SSEDescription
forall x. SSEDescription -> Rep SSEDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SSEDescription x -> SSEDescription
$cfrom :: forall x. SSEDescription -> Rep SSEDescription x
Prelude.Generic)
newSSEDescription ::
SSEDescription
newSSEDescription :: SSEDescription
newSSEDescription =
SSEDescription' :: Maybe SSEStatus -> SSEDescription
SSEDescription' {$sel:status:SSEDescription' :: Maybe SSEStatus
status = Maybe SSEStatus
forall a. Maybe a
Prelude.Nothing}
sSEDescription_status :: Lens.Lens' SSEDescription (Prelude.Maybe SSEStatus)
sSEDescription_status :: (Maybe SSEStatus -> f (Maybe SSEStatus))
-> SSEDescription -> f SSEDescription
sSEDescription_status = (SSEDescription -> Maybe SSEStatus)
-> (SSEDescription -> Maybe SSEStatus -> SSEDescription)
-> Lens
SSEDescription SSEDescription (Maybe SSEStatus) (Maybe SSEStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSEDescription' {Maybe SSEStatus
status :: Maybe SSEStatus
$sel:status:SSEDescription' :: SSEDescription -> Maybe SSEStatus
status} -> Maybe SSEStatus
status) (\s :: SSEDescription
s@SSEDescription' {} Maybe SSEStatus
a -> SSEDescription
s {$sel:status:SSEDescription' :: Maybe SSEStatus
status = Maybe SSEStatus
a} :: SSEDescription)
instance Core.FromJSON SSEDescription where
parseJSON :: Value -> Parser SSEDescription
parseJSON =
String
-> (Object -> Parser SSEDescription)
-> Value
-> Parser SSEDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SSEDescription"
( \Object
x ->
Maybe SSEStatus -> SSEDescription
SSEDescription' (Maybe SSEStatus -> SSEDescription)
-> Parser (Maybe SSEStatus) -> Parser SSEDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SSEStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
)
instance Prelude.Hashable SSEDescription
instance Prelude.NFData SSEDescription