{-# 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.Omics.Types.ReadSetBatchError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ReadSetBatchError = ReadSetBatchError'
{
ReadSetBatchError -> Text
code :: Prelude.Text,
ReadSetBatchError -> Text
id :: Prelude.Text,
ReadSetBatchError -> Text
message :: Prelude.Text
}
deriving (ReadSetBatchError -> ReadSetBatchError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReadSetBatchError -> ReadSetBatchError -> Bool
$c/= :: ReadSetBatchError -> ReadSetBatchError -> Bool
== :: ReadSetBatchError -> ReadSetBatchError -> Bool
$c== :: ReadSetBatchError -> ReadSetBatchError -> Bool
Prelude.Eq, ReadPrec [ReadSetBatchError]
ReadPrec ReadSetBatchError
Int -> ReadS ReadSetBatchError
ReadS [ReadSetBatchError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReadSetBatchError]
$creadListPrec :: ReadPrec [ReadSetBatchError]
readPrec :: ReadPrec ReadSetBatchError
$creadPrec :: ReadPrec ReadSetBatchError
readList :: ReadS [ReadSetBatchError]
$creadList :: ReadS [ReadSetBatchError]
readsPrec :: Int -> ReadS ReadSetBatchError
$creadsPrec :: Int -> ReadS ReadSetBatchError
Prelude.Read, Int -> ReadSetBatchError -> ShowS
[ReadSetBatchError] -> ShowS
ReadSetBatchError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReadSetBatchError] -> ShowS
$cshowList :: [ReadSetBatchError] -> ShowS
show :: ReadSetBatchError -> String
$cshow :: ReadSetBatchError -> String
showsPrec :: Int -> ReadSetBatchError -> ShowS
$cshowsPrec :: Int -> ReadSetBatchError -> ShowS
Prelude.Show, forall x. Rep ReadSetBatchError x -> ReadSetBatchError
forall x. ReadSetBatchError -> Rep ReadSetBatchError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReadSetBatchError x -> ReadSetBatchError
$cfrom :: forall x. ReadSetBatchError -> Rep ReadSetBatchError x
Prelude.Generic)
newReadSetBatchError ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ReadSetBatchError
newReadSetBatchError :: Text -> Text -> Text -> ReadSetBatchError
newReadSetBatchError Text
pCode_ Text
pId_ Text
pMessage_ =
ReadSetBatchError'
{ $sel:code:ReadSetBatchError' :: Text
code = Text
pCode_,
$sel:id:ReadSetBatchError' :: Text
id = Text
pId_,
$sel:message:ReadSetBatchError' :: Text
message = Text
pMessage_
}
readSetBatchError_code :: Lens.Lens' ReadSetBatchError Prelude.Text
readSetBatchError_code :: Lens' ReadSetBatchError Text
readSetBatchError_code = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReadSetBatchError' {Text
code :: Text
$sel:code:ReadSetBatchError' :: ReadSetBatchError -> Text
code} -> Text
code) (\s :: ReadSetBatchError
s@ReadSetBatchError' {} Text
a -> ReadSetBatchError
s {$sel:code:ReadSetBatchError' :: Text
code = Text
a} :: ReadSetBatchError)
readSetBatchError_id :: Lens.Lens' ReadSetBatchError Prelude.Text
readSetBatchError_id :: Lens' ReadSetBatchError Text
readSetBatchError_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReadSetBatchError' {Text
id :: Text
$sel:id:ReadSetBatchError' :: ReadSetBatchError -> Text
id} -> Text
id) (\s :: ReadSetBatchError
s@ReadSetBatchError' {} Text
a -> ReadSetBatchError
s {$sel:id:ReadSetBatchError' :: Text
id = Text
a} :: ReadSetBatchError)
readSetBatchError_message :: Lens.Lens' ReadSetBatchError Prelude.Text
readSetBatchError_message :: Lens' ReadSetBatchError Text
readSetBatchError_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReadSetBatchError' {Text
message :: Text
$sel:message:ReadSetBatchError' :: ReadSetBatchError -> Text
message} -> Text
message) (\s :: ReadSetBatchError
s@ReadSetBatchError' {} Text
a -> ReadSetBatchError
s {$sel:message:ReadSetBatchError' :: Text
message = Text
a} :: ReadSetBatchError)
instance Data.FromJSON ReadSetBatchError where
parseJSON :: Value -> Parser ReadSetBatchError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReadSetBatchError"
( \Object
x ->
Text -> Text -> Text -> ReadSetBatchError
ReadSetBatchError'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"code")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"message")
)
instance Prelude.Hashable ReadSetBatchError where
hashWithSalt :: Int -> ReadSetBatchError -> Int
hashWithSalt Int
_salt ReadSetBatchError' {Text
message :: Text
id :: Text
code :: Text
$sel:message:ReadSetBatchError' :: ReadSetBatchError -> Text
$sel:id:ReadSetBatchError' :: ReadSetBatchError -> Text
$sel:code:ReadSetBatchError' :: ReadSetBatchError -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
code
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
message
instance Prelude.NFData ReadSetBatchError where
rnf :: ReadSetBatchError -> ()
rnf ReadSetBatchError' {Text
message :: Text
id :: Text
code :: Text
$sel:message:ReadSetBatchError' :: ReadSetBatchError -> Text
$sel:id:ReadSetBatchError' :: ReadSetBatchError -> Text
$sel:code:ReadSetBatchError' :: ReadSetBatchError -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
code
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
message