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