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