{-# 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.BatchUpdateDetectorErrorEntry 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 BatchUpdateDetectorErrorEntry = BatchUpdateDetectorErrorEntry'
{
BatchUpdateDetectorErrorEntry -> Maybe ErrorCode
errorCode :: Prelude.Maybe ErrorCode,
BatchUpdateDetectorErrorEntry -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
BatchUpdateDetectorErrorEntry -> Maybe Text
messageId :: Prelude.Maybe Prelude.Text
}
deriving (BatchUpdateDetectorErrorEntry
-> BatchUpdateDetectorErrorEntry -> Bool
(BatchUpdateDetectorErrorEntry
-> BatchUpdateDetectorErrorEntry -> Bool)
-> (BatchUpdateDetectorErrorEntry
-> BatchUpdateDetectorErrorEntry -> Bool)
-> Eq BatchUpdateDetectorErrorEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdateDetectorErrorEntry
-> BatchUpdateDetectorErrorEntry -> Bool
$c/= :: BatchUpdateDetectorErrorEntry
-> BatchUpdateDetectorErrorEntry -> Bool
== :: BatchUpdateDetectorErrorEntry
-> BatchUpdateDetectorErrorEntry -> Bool
$c== :: BatchUpdateDetectorErrorEntry
-> BatchUpdateDetectorErrorEntry -> Bool
Prelude.Eq, ReadPrec [BatchUpdateDetectorErrorEntry]
ReadPrec BatchUpdateDetectorErrorEntry
Int -> ReadS BatchUpdateDetectorErrorEntry
ReadS [BatchUpdateDetectorErrorEntry]
(Int -> ReadS BatchUpdateDetectorErrorEntry)
-> ReadS [BatchUpdateDetectorErrorEntry]
-> ReadPrec BatchUpdateDetectorErrorEntry
-> ReadPrec [BatchUpdateDetectorErrorEntry]
-> Read BatchUpdateDetectorErrorEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpdateDetectorErrorEntry]
$creadListPrec :: ReadPrec [BatchUpdateDetectorErrorEntry]
readPrec :: ReadPrec BatchUpdateDetectorErrorEntry
$creadPrec :: ReadPrec BatchUpdateDetectorErrorEntry
readList :: ReadS [BatchUpdateDetectorErrorEntry]
$creadList :: ReadS [BatchUpdateDetectorErrorEntry]
readsPrec :: Int -> ReadS BatchUpdateDetectorErrorEntry
$creadsPrec :: Int -> ReadS BatchUpdateDetectorErrorEntry
Prelude.Read, Int -> BatchUpdateDetectorErrorEntry -> ShowS
[BatchUpdateDetectorErrorEntry] -> ShowS
BatchUpdateDetectorErrorEntry -> String
(Int -> BatchUpdateDetectorErrorEntry -> ShowS)
-> (BatchUpdateDetectorErrorEntry -> String)
-> ([BatchUpdateDetectorErrorEntry] -> ShowS)
-> Show BatchUpdateDetectorErrorEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdateDetectorErrorEntry] -> ShowS
$cshowList :: [BatchUpdateDetectorErrorEntry] -> ShowS
show :: BatchUpdateDetectorErrorEntry -> String
$cshow :: BatchUpdateDetectorErrorEntry -> String
showsPrec :: Int -> BatchUpdateDetectorErrorEntry -> ShowS
$cshowsPrec :: Int -> BatchUpdateDetectorErrorEntry -> ShowS
Prelude.Show, (forall x.
BatchUpdateDetectorErrorEntry
-> Rep BatchUpdateDetectorErrorEntry x)
-> (forall x.
Rep BatchUpdateDetectorErrorEntry x
-> BatchUpdateDetectorErrorEntry)
-> Generic BatchUpdateDetectorErrorEntry
forall x.
Rep BatchUpdateDetectorErrorEntry x
-> BatchUpdateDetectorErrorEntry
forall x.
BatchUpdateDetectorErrorEntry
-> Rep BatchUpdateDetectorErrorEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchUpdateDetectorErrorEntry x
-> BatchUpdateDetectorErrorEntry
$cfrom :: forall x.
BatchUpdateDetectorErrorEntry
-> Rep BatchUpdateDetectorErrorEntry x
Prelude.Generic)
newBatchUpdateDetectorErrorEntry ::
BatchUpdateDetectorErrorEntry
newBatchUpdateDetectorErrorEntry :: BatchUpdateDetectorErrorEntry
newBatchUpdateDetectorErrorEntry =
BatchUpdateDetectorErrorEntry' :: Maybe ErrorCode
-> Maybe Text -> Maybe Text -> BatchUpdateDetectorErrorEntry
BatchUpdateDetectorErrorEntry'
{ $sel:errorCode:BatchUpdateDetectorErrorEntry' :: Maybe ErrorCode
errorCode =
Maybe ErrorCode
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:BatchUpdateDetectorErrorEntry' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:messageId:BatchUpdateDetectorErrorEntry' :: Maybe Text
messageId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
batchUpdateDetectorErrorEntry_errorCode :: Lens.Lens' BatchUpdateDetectorErrorEntry (Prelude.Maybe ErrorCode)
batchUpdateDetectorErrorEntry_errorCode :: (Maybe ErrorCode -> f (Maybe ErrorCode))
-> BatchUpdateDetectorErrorEntry -> f BatchUpdateDetectorErrorEntry
batchUpdateDetectorErrorEntry_errorCode = (BatchUpdateDetectorErrorEntry -> Maybe ErrorCode)
-> (BatchUpdateDetectorErrorEntry
-> Maybe ErrorCode -> BatchUpdateDetectorErrorEntry)
-> Lens
BatchUpdateDetectorErrorEntry
BatchUpdateDetectorErrorEntry
(Maybe ErrorCode)
(Maybe ErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDetectorErrorEntry' {Maybe ErrorCode
errorCode :: Maybe ErrorCode
$sel:errorCode:BatchUpdateDetectorErrorEntry' :: BatchUpdateDetectorErrorEntry -> Maybe ErrorCode
errorCode} -> Maybe ErrorCode
errorCode) (\s :: BatchUpdateDetectorErrorEntry
s@BatchUpdateDetectorErrorEntry' {} Maybe ErrorCode
a -> BatchUpdateDetectorErrorEntry
s {$sel:errorCode:BatchUpdateDetectorErrorEntry' :: Maybe ErrorCode
errorCode = Maybe ErrorCode
a} :: BatchUpdateDetectorErrorEntry)
batchUpdateDetectorErrorEntry_errorMessage :: Lens.Lens' BatchUpdateDetectorErrorEntry (Prelude.Maybe Prelude.Text)
batchUpdateDetectorErrorEntry_errorMessage :: (Maybe Text -> f (Maybe Text))
-> BatchUpdateDetectorErrorEntry -> f BatchUpdateDetectorErrorEntry
batchUpdateDetectorErrorEntry_errorMessage = (BatchUpdateDetectorErrorEntry -> Maybe Text)
-> (BatchUpdateDetectorErrorEntry
-> Maybe Text -> BatchUpdateDetectorErrorEntry)
-> Lens
BatchUpdateDetectorErrorEntry
BatchUpdateDetectorErrorEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDetectorErrorEntry' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BatchUpdateDetectorErrorEntry' :: BatchUpdateDetectorErrorEntry -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BatchUpdateDetectorErrorEntry
s@BatchUpdateDetectorErrorEntry' {} Maybe Text
a -> BatchUpdateDetectorErrorEntry
s {$sel:errorMessage:BatchUpdateDetectorErrorEntry' :: Maybe Text
errorMessage = Maybe Text
a} :: BatchUpdateDetectorErrorEntry)
batchUpdateDetectorErrorEntry_messageId :: Lens.Lens' BatchUpdateDetectorErrorEntry (Prelude.Maybe Prelude.Text)
batchUpdateDetectorErrorEntry_messageId :: (Maybe Text -> f (Maybe Text))
-> BatchUpdateDetectorErrorEntry -> f BatchUpdateDetectorErrorEntry
batchUpdateDetectorErrorEntry_messageId = (BatchUpdateDetectorErrorEntry -> Maybe Text)
-> (BatchUpdateDetectorErrorEntry
-> Maybe Text -> BatchUpdateDetectorErrorEntry)
-> Lens
BatchUpdateDetectorErrorEntry
BatchUpdateDetectorErrorEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDetectorErrorEntry' {Maybe Text
messageId :: Maybe Text
$sel:messageId:BatchUpdateDetectorErrorEntry' :: BatchUpdateDetectorErrorEntry -> Maybe Text
messageId} -> Maybe Text
messageId) (\s :: BatchUpdateDetectorErrorEntry
s@BatchUpdateDetectorErrorEntry' {} Maybe Text
a -> BatchUpdateDetectorErrorEntry
s {$sel:messageId:BatchUpdateDetectorErrorEntry' :: Maybe Text
messageId = Maybe Text
a} :: BatchUpdateDetectorErrorEntry)
instance Core.FromJSON BatchUpdateDetectorErrorEntry where
parseJSON :: Value -> Parser BatchUpdateDetectorErrorEntry
parseJSON =
String
-> (Object -> Parser BatchUpdateDetectorErrorEntry)
-> Value
-> Parser BatchUpdateDetectorErrorEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchUpdateDetectorErrorEntry"
( \Object
x ->
Maybe ErrorCode
-> Maybe Text -> Maybe Text -> BatchUpdateDetectorErrorEntry
BatchUpdateDetectorErrorEntry'
(Maybe ErrorCode
-> Maybe Text -> Maybe Text -> BatchUpdateDetectorErrorEntry)
-> Parser (Maybe ErrorCode)
-> Parser
(Maybe Text -> Maybe Text -> BatchUpdateDetectorErrorEntry)
forall (f :: * -> *) a b. Functor 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 -> Maybe Text -> BatchUpdateDetectorErrorEntry)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> BatchUpdateDetectorErrorEntry)
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 -> BatchUpdateDetectorErrorEntry)
-> Parser (Maybe Text) -> Parser BatchUpdateDetectorErrorEntry
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
"messageId")
)
instance
Prelude.Hashable
BatchUpdateDetectorErrorEntry
instance Prelude.NFData BatchUpdateDetectorErrorEntry