{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EventDescription = EventDescription'
{
EventDescription -> Maybe Text
latestDescription :: Prelude.Maybe Prelude.Text
}
deriving (EventDescription -> EventDescription -> Bool
(EventDescription -> EventDescription -> Bool)
-> (EventDescription -> EventDescription -> Bool)
-> Eq EventDescription
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]
(Int -> ReadS EventDescription)
-> ReadS [EventDescription]
-> ReadPrec EventDescription
-> ReadPrec [EventDescription]
-> Read 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
(Int -> EventDescription -> ShowS)
-> (EventDescription -> String)
-> ([EventDescription] -> ShowS)
-> Show EventDescription
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. EventDescription -> Rep EventDescription x)
-> (forall x. Rep EventDescription x -> EventDescription)
-> Generic EventDescription
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' :: Maybe Text -> EventDescription
EventDescription'
{ $sel:latestDescription:EventDescription' :: Maybe Text
latestDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eventDescription_latestDescription :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_latestDescription :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_latestDescription = (EventDescription -> Maybe Text)
-> (EventDescription -> Maybe Text -> EventDescription)
-> Lens EventDescription EventDescription (Maybe Text) (Maybe Text)
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 Core.FromJSON EventDescription where
parseJSON :: Value -> Parser EventDescription
parseJSON =
String
-> (Object -> Parser EventDescription)
-> Value
-> Parser EventDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EventDescription"
( \Object
x ->
Maybe Text -> EventDescription
EventDescription'
(Maybe Text -> EventDescription)
-> Parser (Maybe Text) -> Parser EventDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"latestDescription")
)
instance Prelude.Hashable EventDescription
instance Prelude.NFData EventDescription