{-# 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.PutTargetsResultEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data PutTargetsResultEntry = PutTargetsResultEntry'
{
PutTargetsResultEntry -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
PutTargetsResultEntry -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
PutTargetsResultEntry -> Maybe Text
targetId :: Prelude.Maybe Prelude.Text
}
deriving (PutTargetsResultEntry -> PutTargetsResultEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutTargetsResultEntry -> PutTargetsResultEntry -> Bool
$c/= :: PutTargetsResultEntry -> PutTargetsResultEntry -> Bool
== :: PutTargetsResultEntry -> PutTargetsResultEntry -> Bool
$c== :: PutTargetsResultEntry -> PutTargetsResultEntry -> Bool
Prelude.Eq, ReadPrec [PutTargetsResultEntry]
ReadPrec PutTargetsResultEntry
Int -> ReadS PutTargetsResultEntry
ReadS [PutTargetsResultEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutTargetsResultEntry]
$creadListPrec :: ReadPrec [PutTargetsResultEntry]
readPrec :: ReadPrec PutTargetsResultEntry
$creadPrec :: ReadPrec PutTargetsResultEntry
readList :: ReadS [PutTargetsResultEntry]
$creadList :: ReadS [PutTargetsResultEntry]
readsPrec :: Int -> ReadS PutTargetsResultEntry
$creadsPrec :: Int -> ReadS PutTargetsResultEntry
Prelude.Read, Int -> PutTargetsResultEntry -> ShowS
[PutTargetsResultEntry] -> ShowS
PutTargetsResultEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutTargetsResultEntry] -> ShowS
$cshowList :: [PutTargetsResultEntry] -> ShowS
show :: PutTargetsResultEntry -> String
$cshow :: PutTargetsResultEntry -> String
showsPrec :: Int -> PutTargetsResultEntry -> ShowS
$cshowsPrec :: Int -> PutTargetsResultEntry -> ShowS
Prelude.Show, forall x. Rep PutTargetsResultEntry x -> PutTargetsResultEntry
forall x. PutTargetsResultEntry -> Rep PutTargetsResultEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutTargetsResultEntry x -> PutTargetsResultEntry
$cfrom :: forall x. PutTargetsResultEntry -> Rep PutTargetsResultEntry x
Prelude.Generic)
newPutTargetsResultEntry ::
PutTargetsResultEntry
newPutTargetsResultEntry :: PutTargetsResultEntry
newPutTargetsResultEntry =
PutTargetsResultEntry'
{ $sel:errorCode:PutTargetsResultEntry' :: Maybe Text
errorCode = forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:PutTargetsResultEntry' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:targetId:PutTargetsResultEntry' :: Maybe Text
targetId = forall a. Maybe a
Prelude.Nothing
}
putTargetsResultEntry_errorCode :: Lens.Lens' PutTargetsResultEntry (Prelude.Maybe Prelude.Text)
putTargetsResultEntry_errorCode :: Lens' PutTargetsResultEntry (Maybe Text)
putTargetsResultEntry_errorCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutTargetsResultEntry' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: PutTargetsResultEntry
s@PutTargetsResultEntry' {} Maybe Text
a -> PutTargetsResultEntry
s {$sel:errorCode:PutTargetsResultEntry' :: Maybe Text
errorCode = Maybe Text
a} :: PutTargetsResultEntry)
putTargetsResultEntry_errorMessage :: Lens.Lens' PutTargetsResultEntry (Prelude.Maybe Prelude.Text)
putTargetsResultEntry_errorMessage :: Lens' PutTargetsResultEntry (Maybe Text)
putTargetsResultEntry_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutTargetsResultEntry' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: PutTargetsResultEntry
s@PutTargetsResultEntry' {} Maybe Text
a -> PutTargetsResultEntry
s {$sel:errorMessage:PutTargetsResultEntry' :: Maybe Text
errorMessage = Maybe Text
a} :: PutTargetsResultEntry)
putTargetsResultEntry_targetId :: Lens.Lens' PutTargetsResultEntry (Prelude.Maybe Prelude.Text)
putTargetsResultEntry_targetId :: Lens' PutTargetsResultEntry (Maybe Text)
putTargetsResultEntry_targetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutTargetsResultEntry' {Maybe Text
targetId :: Maybe Text
$sel:targetId:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
targetId} -> Maybe Text
targetId) (\s :: PutTargetsResultEntry
s@PutTargetsResultEntry' {} Maybe Text
a -> PutTargetsResultEntry
s {$sel:targetId:PutTargetsResultEntry' :: Maybe Text
targetId = Maybe Text
a} :: PutTargetsResultEntry)
instance Data.FromJSON PutTargetsResultEntry where
parseJSON :: Value -> Parser PutTargetsResultEntry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PutTargetsResultEntry"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> PutTargetsResultEntry
PutTargetsResultEntry'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TargetId")
)
instance Prelude.Hashable PutTargetsResultEntry where
hashWithSalt :: Int -> PutTargetsResultEntry -> Int
hashWithSalt Int
_salt PutTargetsResultEntry' {Maybe Text
targetId :: Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:targetId:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
$sel:errorMessage:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
$sel:errorCode:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetId
instance Prelude.NFData PutTargetsResultEntry where
rnf :: PutTargetsResultEntry -> ()
rnf PutTargetsResultEntry' {Maybe Text
targetId :: Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:targetId:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
$sel:errorMessage:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
$sel:errorCode:PutTargetsResultEntry' :: PutTargetsResultEntry -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetId