{-# 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.EventDetailsErrorItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EventDetailsErrorItem = EventDetailsErrorItem'
{
EventDetailsErrorItem -> Maybe Text
eventArn :: Prelude.Maybe Prelude.Text,
EventDetailsErrorItem -> Maybe Text
errorName :: Prelude.Maybe Prelude.Text,
EventDetailsErrorItem -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (EventDetailsErrorItem -> EventDetailsErrorItem -> Bool
(EventDetailsErrorItem -> EventDetailsErrorItem -> Bool)
-> (EventDetailsErrorItem -> EventDetailsErrorItem -> Bool)
-> Eq EventDetailsErrorItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventDetailsErrorItem -> EventDetailsErrorItem -> Bool
$c/= :: EventDetailsErrorItem -> EventDetailsErrorItem -> Bool
== :: EventDetailsErrorItem -> EventDetailsErrorItem -> Bool
$c== :: EventDetailsErrorItem -> EventDetailsErrorItem -> Bool
Prelude.Eq, ReadPrec [EventDetailsErrorItem]
ReadPrec EventDetailsErrorItem
Int -> ReadS EventDetailsErrorItem
ReadS [EventDetailsErrorItem]
(Int -> ReadS EventDetailsErrorItem)
-> ReadS [EventDetailsErrorItem]
-> ReadPrec EventDetailsErrorItem
-> ReadPrec [EventDetailsErrorItem]
-> Read EventDetailsErrorItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventDetailsErrorItem]
$creadListPrec :: ReadPrec [EventDetailsErrorItem]
readPrec :: ReadPrec EventDetailsErrorItem
$creadPrec :: ReadPrec EventDetailsErrorItem
readList :: ReadS [EventDetailsErrorItem]
$creadList :: ReadS [EventDetailsErrorItem]
readsPrec :: Int -> ReadS EventDetailsErrorItem
$creadsPrec :: Int -> ReadS EventDetailsErrorItem
Prelude.Read, Int -> EventDetailsErrorItem -> ShowS
[EventDetailsErrorItem] -> ShowS
EventDetailsErrorItem -> String
(Int -> EventDetailsErrorItem -> ShowS)
-> (EventDetailsErrorItem -> String)
-> ([EventDetailsErrorItem] -> ShowS)
-> Show EventDetailsErrorItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventDetailsErrorItem] -> ShowS
$cshowList :: [EventDetailsErrorItem] -> ShowS
show :: EventDetailsErrorItem -> String
$cshow :: EventDetailsErrorItem -> String
showsPrec :: Int -> EventDetailsErrorItem -> ShowS
$cshowsPrec :: Int -> EventDetailsErrorItem -> ShowS
Prelude.Show, (forall x. EventDetailsErrorItem -> Rep EventDetailsErrorItem x)
-> (forall x. Rep EventDetailsErrorItem x -> EventDetailsErrorItem)
-> Generic EventDetailsErrorItem
forall x. Rep EventDetailsErrorItem x -> EventDetailsErrorItem
forall x. EventDetailsErrorItem -> Rep EventDetailsErrorItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventDetailsErrorItem x -> EventDetailsErrorItem
$cfrom :: forall x. EventDetailsErrorItem -> Rep EventDetailsErrorItem x
Prelude.Generic)
newEventDetailsErrorItem ::
EventDetailsErrorItem
newEventDetailsErrorItem :: EventDetailsErrorItem
newEventDetailsErrorItem =
EventDetailsErrorItem' :: Maybe Text -> Maybe Text -> Maybe Text -> EventDetailsErrorItem
EventDetailsErrorItem'
{ $sel:eventArn:EventDetailsErrorItem' :: Maybe Text
eventArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorName:EventDetailsErrorItem' :: Maybe Text
errorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:EventDetailsErrorItem' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eventDetailsErrorItem_eventArn :: Lens.Lens' EventDetailsErrorItem (Prelude.Maybe Prelude.Text)
eventDetailsErrorItem_eventArn :: (Maybe Text -> f (Maybe Text))
-> EventDetailsErrorItem -> f EventDetailsErrorItem
eventDetailsErrorItem_eventArn = (EventDetailsErrorItem -> Maybe Text)
-> (EventDetailsErrorItem -> Maybe Text -> EventDetailsErrorItem)
-> Lens
EventDetailsErrorItem
EventDetailsErrorItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDetailsErrorItem' {Maybe Text
eventArn :: Maybe Text
$sel:eventArn:EventDetailsErrorItem' :: EventDetailsErrorItem -> Maybe Text
eventArn} -> Maybe Text
eventArn) (\s :: EventDetailsErrorItem
s@EventDetailsErrorItem' {} Maybe Text
a -> EventDetailsErrorItem
s {$sel:eventArn:EventDetailsErrorItem' :: Maybe Text
eventArn = Maybe Text
a} :: EventDetailsErrorItem)
eventDetailsErrorItem_errorName :: Lens.Lens' EventDetailsErrorItem (Prelude.Maybe Prelude.Text)
eventDetailsErrorItem_errorName :: (Maybe Text -> f (Maybe Text))
-> EventDetailsErrorItem -> f EventDetailsErrorItem
eventDetailsErrorItem_errorName = (EventDetailsErrorItem -> Maybe Text)
-> (EventDetailsErrorItem -> Maybe Text -> EventDetailsErrorItem)
-> Lens
EventDetailsErrorItem
EventDetailsErrorItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDetailsErrorItem' {Maybe Text
errorName :: Maybe Text
$sel:errorName:EventDetailsErrorItem' :: EventDetailsErrorItem -> Maybe Text
errorName} -> Maybe Text
errorName) (\s :: EventDetailsErrorItem
s@EventDetailsErrorItem' {} Maybe Text
a -> EventDetailsErrorItem
s {$sel:errorName:EventDetailsErrorItem' :: Maybe Text
errorName = Maybe Text
a} :: EventDetailsErrorItem)
eventDetailsErrorItem_errorMessage :: Lens.Lens' EventDetailsErrorItem (Prelude.Maybe Prelude.Text)
eventDetailsErrorItem_errorMessage :: (Maybe Text -> f (Maybe Text))
-> EventDetailsErrorItem -> f EventDetailsErrorItem
eventDetailsErrorItem_errorMessage = (EventDetailsErrorItem -> Maybe Text)
-> (EventDetailsErrorItem -> Maybe Text -> EventDetailsErrorItem)
-> Lens
EventDetailsErrorItem
EventDetailsErrorItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDetailsErrorItem' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:EventDetailsErrorItem' :: EventDetailsErrorItem -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: EventDetailsErrorItem
s@EventDetailsErrorItem' {} Maybe Text
a -> EventDetailsErrorItem
s {$sel:errorMessage:EventDetailsErrorItem' :: Maybe Text
errorMessage = Maybe Text
a} :: EventDetailsErrorItem)
instance Core.FromJSON EventDetailsErrorItem where
parseJSON :: Value -> Parser EventDetailsErrorItem
parseJSON =
String
-> (Object -> Parser EventDetailsErrorItem)
-> Value
-> Parser EventDetailsErrorItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EventDetailsErrorItem"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> EventDetailsErrorItem
EventDetailsErrorItem'
(Maybe Text -> Maybe Text -> Maybe Text -> EventDetailsErrorItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EventDetailsErrorItem)
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
"eventArn")
Parser (Maybe Text -> Maybe Text -> EventDetailsErrorItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> EventDetailsErrorItem)
forall (f :: * -> *) a b. Applicative f => 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
"errorName")
Parser (Maybe Text -> EventDetailsErrorItem)
-> Parser (Maybe Text) -> Parser EventDetailsErrorItem
forall (f :: * -> *) a b. Applicative f => 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
"errorMessage")
)
instance Prelude.Hashable EventDetailsErrorItem
instance Prelude.NFData EventDetailsErrorItem