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