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