{-# 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.Kendra.Types.BatchPutDocumentResponseFailedDocument where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Kendra.Types.ErrorCode
import qualified Amazonka.Prelude as Prelude
data BatchPutDocumentResponseFailedDocument = BatchPutDocumentResponseFailedDocument'
{
BatchPutDocumentResponseFailedDocument -> Maybe ErrorCode
errorCode :: Prelude.Maybe ErrorCode,
BatchPutDocumentResponseFailedDocument -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
BatchPutDocumentResponseFailedDocument -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (BatchPutDocumentResponseFailedDocument
-> BatchPutDocumentResponseFailedDocument -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchPutDocumentResponseFailedDocument
-> BatchPutDocumentResponseFailedDocument -> Bool
$c/= :: BatchPutDocumentResponseFailedDocument
-> BatchPutDocumentResponseFailedDocument -> Bool
== :: BatchPutDocumentResponseFailedDocument
-> BatchPutDocumentResponseFailedDocument -> Bool
$c== :: BatchPutDocumentResponseFailedDocument
-> BatchPutDocumentResponseFailedDocument -> Bool
Prelude.Eq, ReadPrec [BatchPutDocumentResponseFailedDocument]
ReadPrec BatchPutDocumentResponseFailedDocument
Int -> ReadS BatchPutDocumentResponseFailedDocument
ReadS [BatchPutDocumentResponseFailedDocument]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchPutDocumentResponseFailedDocument]
$creadListPrec :: ReadPrec [BatchPutDocumentResponseFailedDocument]
readPrec :: ReadPrec BatchPutDocumentResponseFailedDocument
$creadPrec :: ReadPrec BatchPutDocumentResponseFailedDocument
readList :: ReadS [BatchPutDocumentResponseFailedDocument]
$creadList :: ReadS [BatchPutDocumentResponseFailedDocument]
readsPrec :: Int -> ReadS BatchPutDocumentResponseFailedDocument
$creadsPrec :: Int -> ReadS BatchPutDocumentResponseFailedDocument
Prelude.Read, Int -> BatchPutDocumentResponseFailedDocument -> ShowS
[BatchPutDocumentResponseFailedDocument] -> ShowS
BatchPutDocumentResponseFailedDocument -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchPutDocumentResponseFailedDocument] -> ShowS
$cshowList :: [BatchPutDocumentResponseFailedDocument] -> ShowS
show :: BatchPutDocumentResponseFailedDocument -> String
$cshow :: BatchPutDocumentResponseFailedDocument -> String
showsPrec :: Int -> BatchPutDocumentResponseFailedDocument -> ShowS
$cshowsPrec :: Int -> BatchPutDocumentResponseFailedDocument -> ShowS
Prelude.Show, forall x.
Rep BatchPutDocumentResponseFailedDocument x
-> BatchPutDocumentResponseFailedDocument
forall x.
BatchPutDocumentResponseFailedDocument
-> Rep BatchPutDocumentResponseFailedDocument x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchPutDocumentResponseFailedDocument x
-> BatchPutDocumentResponseFailedDocument
$cfrom :: forall x.
BatchPutDocumentResponseFailedDocument
-> Rep BatchPutDocumentResponseFailedDocument x
Prelude.Generic)
newBatchPutDocumentResponseFailedDocument ::
BatchPutDocumentResponseFailedDocument
newBatchPutDocumentResponseFailedDocument :: BatchPutDocumentResponseFailedDocument
newBatchPutDocumentResponseFailedDocument =
BatchPutDocumentResponseFailedDocument'
{ $sel:errorCode:BatchPutDocumentResponseFailedDocument' :: Maybe ErrorCode
errorCode =
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:BatchPutDocumentResponseFailedDocument' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:id:BatchPutDocumentResponseFailedDocument' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing
}
batchPutDocumentResponseFailedDocument_errorCode :: Lens.Lens' BatchPutDocumentResponseFailedDocument (Prelude.Maybe ErrorCode)
batchPutDocumentResponseFailedDocument_errorCode :: Lens' BatchPutDocumentResponseFailedDocument (Maybe ErrorCode)
batchPutDocumentResponseFailedDocument_errorCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutDocumentResponseFailedDocument' {Maybe ErrorCode
errorCode :: Maybe ErrorCode
$sel:errorCode:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe ErrorCode
errorCode} -> Maybe ErrorCode
errorCode) (\s :: BatchPutDocumentResponseFailedDocument
s@BatchPutDocumentResponseFailedDocument' {} Maybe ErrorCode
a -> BatchPutDocumentResponseFailedDocument
s {$sel:errorCode:BatchPutDocumentResponseFailedDocument' :: Maybe ErrorCode
errorCode = Maybe ErrorCode
a} :: BatchPutDocumentResponseFailedDocument)
batchPutDocumentResponseFailedDocument_errorMessage :: Lens.Lens' BatchPutDocumentResponseFailedDocument (Prelude.Maybe Prelude.Text)
batchPutDocumentResponseFailedDocument_errorMessage :: Lens' BatchPutDocumentResponseFailedDocument (Maybe Text)
batchPutDocumentResponseFailedDocument_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutDocumentResponseFailedDocument' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BatchPutDocumentResponseFailedDocument
s@BatchPutDocumentResponseFailedDocument' {} Maybe Text
a -> BatchPutDocumentResponseFailedDocument
s {$sel:errorMessage:BatchPutDocumentResponseFailedDocument' :: Maybe Text
errorMessage = Maybe Text
a} :: BatchPutDocumentResponseFailedDocument)
batchPutDocumentResponseFailedDocument_id :: Lens.Lens' BatchPutDocumentResponseFailedDocument (Prelude.Maybe Prelude.Text)
batchPutDocumentResponseFailedDocument_id :: Lens' BatchPutDocumentResponseFailedDocument (Maybe Text)
batchPutDocumentResponseFailedDocument_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutDocumentResponseFailedDocument' {Maybe Text
id :: Maybe Text
$sel:id:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe Text
id} -> Maybe Text
id) (\s :: BatchPutDocumentResponseFailedDocument
s@BatchPutDocumentResponseFailedDocument' {} Maybe Text
a -> BatchPutDocumentResponseFailedDocument
s {$sel:id:BatchPutDocumentResponseFailedDocument' :: Maybe Text
id = Maybe Text
a} :: BatchPutDocumentResponseFailedDocument)
instance
Data.FromJSON
BatchPutDocumentResponseFailedDocument
where
parseJSON :: Value -> Parser BatchPutDocumentResponseFailedDocument
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchPutDocumentResponseFailedDocument"
( \Object
x ->
Maybe ErrorCode
-> Maybe Text
-> Maybe Text
-> BatchPutDocumentResponseFailedDocument
BatchPutDocumentResponseFailedDocument'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
)
instance
Prelude.Hashable
BatchPutDocumentResponseFailedDocument
where
hashWithSalt :: Int -> BatchPutDocumentResponseFailedDocument -> Int
hashWithSalt
Int
_salt
BatchPutDocumentResponseFailedDocument' {Maybe Text
Maybe ErrorCode
id :: Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe ErrorCode
$sel:id:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe Text
$sel:errorMessage:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe Text
$sel:errorCode:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe ErrorCode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ErrorCode
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
instance
Prelude.NFData
BatchPutDocumentResponseFailedDocument
where
rnf :: BatchPutDocumentResponseFailedDocument -> ()
rnf BatchPutDocumentResponseFailedDocument' {Maybe Text
Maybe ErrorCode
id :: Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe ErrorCode
$sel:id:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe Text
$sel:errorMessage:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe Text
$sel:errorCode:BatchPutDocumentResponseFailedDocument' :: BatchPutDocumentResponseFailedDocument -> Maybe ErrorCode
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ErrorCode
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id