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