{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.DAX.Types.SSEStatus
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SSEDescription = SSEDescription'
{
SSEDescription -> Maybe SSEStatus
status :: Prelude.Maybe SSEStatus
}
deriving (SSEDescription -> SSEDescription -> Bool
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]
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
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. 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' {$sel:status:SSEDescription' :: Maybe SSEStatus
status = forall a. Maybe a
Prelude.Nothing}
sSEDescription_status :: Lens.Lens' SSEDescription (Prelude.Maybe SSEStatus)
sSEDescription_status :: Lens' SSEDescription (Maybe SSEStatus)
sSEDescription_status = 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 Data.FromJSON SSEDescription where
parseJSON :: Value -> Parser SSEDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SSEDescription"
( \Object
x ->
Maybe SSEStatus -> SSEDescription
SSEDescription' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
)
instance Prelude.Hashable SSEDescription where
hashWithSalt :: Int -> SSEDescription -> Int
hashWithSalt Int
_salt SSEDescription' {Maybe SSEStatus
status :: Maybe SSEStatus
$sel:status:SSEDescription' :: SSEDescription -> Maybe SSEStatus
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SSEStatus
status
instance Prelude.NFData SSEDescription where
rnf :: SSEDescription -> ()
rnf SSEDescription' {Maybe SSEStatus
status :: Maybe SSEStatus
$sel:status:SSEDescription' :: SSEDescription -> Maybe SSEStatus
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe SSEStatus
status