{-# 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.ElasticBeanstalk.Types.EventDescription where
import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.Types.EventSeverity
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EventDescription = EventDescription'
{
EventDescription -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
EventDescription -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
EventDescription -> Maybe EventSeverity
severity :: Prelude.Maybe EventSeverity,
EventDescription -> Maybe Text
versionLabel :: Prelude.Maybe Prelude.Text,
EventDescription -> Maybe Text
platformArn :: Prelude.Maybe Prelude.Text,
EventDescription -> Maybe Text
environmentName :: Prelude.Maybe Prelude.Text,
EventDescription -> Maybe Text
applicationName :: Prelude.Maybe Prelude.Text,
EventDescription -> Maybe ISO8601
eventDate :: Prelude.Maybe Core.ISO8601,
EventDescription -> Maybe Text
message :: 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
-> Maybe Text
-> Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription
EventDescription'
{ $sel:requestId:EventDescription' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:templateName:EventDescription' :: Maybe Text
templateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:severity:EventDescription' :: Maybe EventSeverity
severity = Maybe EventSeverity
forall a. Maybe a
Prelude.Nothing,
$sel:versionLabel:EventDescription' :: Maybe Text
versionLabel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:platformArn:EventDescription' :: Maybe Text
platformArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:environmentName:EventDescription' :: Maybe Text
environmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:EventDescription' :: Maybe Text
applicationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventDate:EventDescription' :: Maybe ISO8601
eventDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:message:EventDescription' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eventDescription_requestId :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_requestId :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_requestId = (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
requestId :: Maybe Text
$sel:requestId:EventDescription' :: EventDescription -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:requestId:EventDescription' :: Maybe Text
requestId = Maybe Text
a} :: EventDescription)
eventDescription_templateName :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_templateName :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_templateName = (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
templateName :: Maybe Text
$sel:templateName:EventDescription' :: EventDescription -> Maybe Text
templateName} -> Maybe Text
templateName) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:templateName:EventDescription' :: Maybe Text
templateName = Maybe Text
a} :: EventDescription)
eventDescription_severity :: Lens.Lens' EventDescription (Prelude.Maybe EventSeverity)
eventDescription_severity :: (Maybe EventSeverity -> f (Maybe EventSeverity))
-> EventDescription -> f EventDescription
eventDescription_severity = (EventDescription -> Maybe EventSeverity)
-> (EventDescription -> Maybe EventSeverity -> EventDescription)
-> Lens
EventDescription
EventDescription
(Maybe EventSeverity)
(Maybe EventSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDescription' {Maybe EventSeverity
severity :: Maybe EventSeverity
$sel:severity:EventDescription' :: EventDescription -> Maybe EventSeverity
severity} -> Maybe EventSeverity
severity) (\s :: EventDescription
s@EventDescription' {} Maybe EventSeverity
a -> EventDescription
s {$sel:severity:EventDescription' :: Maybe EventSeverity
severity = Maybe EventSeverity
a} :: EventDescription)
eventDescription_versionLabel :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_versionLabel :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_versionLabel = (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
versionLabel :: Maybe Text
$sel:versionLabel:EventDescription' :: EventDescription -> Maybe Text
versionLabel} -> Maybe Text
versionLabel) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:versionLabel:EventDescription' :: Maybe Text
versionLabel = Maybe Text
a} :: EventDescription)
eventDescription_platformArn :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_platformArn :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_platformArn = (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
platformArn :: Maybe Text
$sel:platformArn:EventDescription' :: EventDescription -> Maybe Text
platformArn} -> Maybe Text
platformArn) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:platformArn:EventDescription' :: Maybe Text
platformArn = Maybe Text
a} :: EventDescription)
eventDescription_environmentName :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_environmentName :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_environmentName = (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
environmentName :: Maybe Text
$sel:environmentName:EventDescription' :: EventDescription -> Maybe Text
environmentName} -> Maybe Text
environmentName) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:environmentName:EventDescription' :: Maybe Text
environmentName = Maybe Text
a} :: EventDescription)
eventDescription_applicationName :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_applicationName :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_applicationName = (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
applicationName :: Maybe Text
$sel:applicationName:EventDescription' :: EventDescription -> Maybe Text
applicationName} -> Maybe Text
applicationName) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:applicationName:EventDescription' :: Maybe Text
applicationName = Maybe Text
a} :: EventDescription)
eventDescription_eventDate :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.UTCTime)
eventDescription_eventDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EventDescription -> f EventDescription
eventDescription_eventDate = (EventDescription -> Maybe ISO8601)
-> (EventDescription -> Maybe ISO8601 -> EventDescription)
-> Lens
EventDescription EventDescription (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDescription' {Maybe ISO8601
eventDate :: Maybe ISO8601
$sel:eventDate:EventDescription' :: EventDescription -> Maybe ISO8601
eventDate} -> Maybe ISO8601
eventDate) (\s :: EventDescription
s@EventDescription' {} Maybe ISO8601
a -> EventDescription
s {$sel:eventDate:EventDescription' :: Maybe ISO8601
eventDate = Maybe ISO8601
a} :: EventDescription) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> EventDescription -> f EventDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EventDescription
-> f EventDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
eventDescription_message :: Lens.Lens' EventDescription (Prelude.Maybe Prelude.Text)
eventDescription_message :: (Maybe Text -> f (Maybe Text))
-> EventDescription -> f EventDescription
eventDescription_message = (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
message :: Maybe Text
$sel:message:EventDescription' :: EventDescription -> Maybe Text
message} -> Maybe Text
message) (\s :: EventDescription
s@EventDescription' {} Maybe Text
a -> EventDescription
s {$sel:message:EventDescription' :: Maybe Text
message = Maybe Text
a} :: EventDescription)
instance Core.FromXML EventDescription where
parseXML :: [Node] -> Either String EventDescription
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription
EventDescription'
(Maybe Text
-> Maybe Text
-> Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RequestId")
Either
String
(Maybe Text
-> Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TemplateName")
Either
String
(Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
-> Either String (Maybe EventSeverity)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe EventSeverity)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Severity")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VersionLabel")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> EventDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe ISO8601 -> Maybe Text -> EventDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PlatformArn")
Either
String
(Maybe Text
-> Maybe Text -> Maybe ISO8601 -> Maybe Text -> EventDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe ISO8601 -> Maybe Text -> EventDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EnvironmentName")
Either
String
(Maybe Text -> Maybe ISO8601 -> Maybe Text -> EventDescription)
-> Either String (Maybe Text)
-> Either String (Maybe ISO8601 -> Maybe Text -> EventDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ApplicationName")
Either String (Maybe ISO8601 -> Maybe Text -> EventDescription)
-> Either String (Maybe ISO8601)
-> Either String (Maybe Text -> EventDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EventDate")
Either String (Maybe Text -> EventDescription)
-> Either String (Maybe Text) -> Either String EventDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Message")
instance Prelude.Hashable EventDescription
instance Prelude.NFData EventDescription