{-# 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.AWSHealth.Types.EventDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data EventDescription = EventDescription'
{
EventDescription -> Maybe Text
latestDescription :: Prelude.Maybe Prelude.Text
}
deriving (EventDescription -> EventDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventDescription -> EventDescription -> Bool
$c/= :: EventDescription -> EventDescription -> Bool
== :: EventDescription -> EventDescription -> Bool
$c== :: EventDescription -> EventDescription -> Bool
Prelude.Eq, ReadPrec [EventDescription]
ReadPrec EventDescription
Int -> ReadS EventDescription
ReadS [EventDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventDescription]
$creadListPrec :: ReadPrec [EventDescription]
readPrec :: ReadPrec EventDescription
$creadPrec :: ReadPrec EventDescription
readList :: ReadS [EventDescription]
$creadList :: ReadS [EventDescription]
readsPrec :: Int -> ReadS EventDescription
$creadsPrec :: Int -> ReadS EventDescription
Prelude.Read, Int -> EventDescription -> ShowS
[EventDescription] -> ShowS
EventDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventDescription] -> ShowS
$cshowList :: [EventDescription] -> ShowS
show :: EventDescription -> String
$cshow :: EventDescription -> String
showsPrec :: Int -> EventDescription -> ShowS
$cshowsPrec :: Int -> EventDescription -> ShowS
Prelude.Show, forall x. Rep EventDescription x -> EventDescription
forall x. EventDescription -> Rep EventDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventDescription x -> EventDescription
$cfrom :: forall x. EventDescription -> Rep EventDescription x
Prelude.Generic)
newEventDescription ::
EventDescription
newEventDescription :: EventDescription
newEventDescription =
EventDescription'
{ $sel:latestDescription:EventDescription' :: Maybe Text
latestDescription =
forall a. Maybe a
Prelude.Nothing
}
eventDescription_latestDescription :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_latestDescription :: Lens' EventDescription (Maybe Text)
eventDescription_latestDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDescription' {Maybe Text
latestDescription :: Maybe Text
$sel:latestDescription:EventDescription' :: EventDescription -> Maybe Text
latestDescription} -> Maybe Text
latestDescription) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:latestDescription:EventDescription' :: Maybe Text
latestDescription = Maybe Text
a} :: EventDescription)
instance Data.FromJSON EventDescription where
parseJSON :: Value -> Parser EventDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EventDescription"
( \Object
x ->
Maybe Text -> EventDescription
EventDescription'
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
"latestDescription")
)
instance Prelude.Hashable EventDescription where
hashWithSalt :: Int -> EventDescription -> Int
hashWithSalt Int
_salt EventDescription' {Maybe Text
latestDescription :: Maybe Text
$sel:latestDescription:EventDescription' :: EventDescription -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
latestDescription
instance Prelude.NFData EventDescription where
rnf :: EventDescription -> ()
rnf EventDescription' {Maybe Text
latestDescription :: Maybe Text
$sel:latestDescription:EventDescription' :: EventDescription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
latestDescription