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