{-# 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.IotTwinMaker.Types.BatchPutPropertyError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IotTwinMaker.Types.PropertyValueEntry
import qualified Amazonka.Prelude as Prelude
data BatchPutPropertyError = BatchPutPropertyError'
{
BatchPutPropertyError -> Text
errorCode :: Prelude.Text,
BatchPutPropertyError -> Text
errorMessage :: Prelude.Text,
BatchPutPropertyError -> PropertyValueEntry
entry :: PropertyValueEntry
}
deriving (BatchPutPropertyError -> BatchPutPropertyError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchPutPropertyError -> BatchPutPropertyError -> Bool
$c/= :: BatchPutPropertyError -> BatchPutPropertyError -> Bool
== :: BatchPutPropertyError -> BatchPutPropertyError -> Bool
$c== :: BatchPutPropertyError -> BatchPutPropertyError -> Bool
Prelude.Eq, ReadPrec [BatchPutPropertyError]
ReadPrec BatchPutPropertyError
Int -> ReadS BatchPutPropertyError
ReadS [BatchPutPropertyError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchPutPropertyError]
$creadListPrec :: ReadPrec [BatchPutPropertyError]
readPrec :: ReadPrec BatchPutPropertyError
$creadPrec :: ReadPrec BatchPutPropertyError
readList :: ReadS [BatchPutPropertyError]
$creadList :: ReadS [BatchPutPropertyError]
readsPrec :: Int -> ReadS BatchPutPropertyError
$creadsPrec :: Int -> ReadS BatchPutPropertyError
Prelude.Read, Int -> BatchPutPropertyError -> ShowS
[BatchPutPropertyError] -> ShowS
BatchPutPropertyError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchPutPropertyError] -> ShowS
$cshowList :: [BatchPutPropertyError] -> ShowS
show :: BatchPutPropertyError -> String
$cshow :: BatchPutPropertyError -> String
showsPrec :: Int -> BatchPutPropertyError -> ShowS
$cshowsPrec :: Int -> BatchPutPropertyError -> ShowS
Prelude.Show, forall x. Rep BatchPutPropertyError x -> BatchPutPropertyError
forall x. BatchPutPropertyError -> Rep BatchPutPropertyError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchPutPropertyError x -> BatchPutPropertyError
$cfrom :: forall x. BatchPutPropertyError -> Rep BatchPutPropertyError x
Prelude.Generic)
newBatchPutPropertyError ::
Prelude.Text ->
Prelude.Text ->
PropertyValueEntry ->
BatchPutPropertyError
newBatchPutPropertyError :: Text -> Text -> PropertyValueEntry -> BatchPutPropertyError
newBatchPutPropertyError
Text
pErrorCode_
Text
pErrorMessage_
PropertyValueEntry
pEntry_ =
BatchPutPropertyError'
{ $sel:errorCode:BatchPutPropertyError' :: Text
errorCode = Text
pErrorCode_,
$sel:errorMessage:BatchPutPropertyError' :: Text
errorMessage = Text
pErrorMessage_,
$sel:entry:BatchPutPropertyError' :: PropertyValueEntry
entry = PropertyValueEntry
pEntry_
}
batchPutPropertyError_errorCode :: Lens.Lens' BatchPutPropertyError Prelude.Text
batchPutPropertyError_errorCode :: Lens' BatchPutPropertyError Text
batchPutPropertyError_errorCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutPropertyError' {Text
errorCode :: Text
$sel:errorCode:BatchPutPropertyError' :: BatchPutPropertyError -> Text
errorCode} -> Text
errorCode) (\s :: BatchPutPropertyError
s@BatchPutPropertyError' {} Text
a -> BatchPutPropertyError
s {$sel:errorCode:BatchPutPropertyError' :: Text
errorCode = Text
a} :: BatchPutPropertyError)
batchPutPropertyError_errorMessage :: Lens.Lens' BatchPutPropertyError Prelude.Text
batchPutPropertyError_errorMessage :: Lens' BatchPutPropertyError Text
batchPutPropertyError_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutPropertyError' {Text
errorMessage :: Text
$sel:errorMessage:BatchPutPropertyError' :: BatchPutPropertyError -> Text
errorMessage} -> Text
errorMessage) (\s :: BatchPutPropertyError
s@BatchPutPropertyError' {} Text
a -> BatchPutPropertyError
s {$sel:errorMessage:BatchPutPropertyError' :: Text
errorMessage = Text
a} :: BatchPutPropertyError)
batchPutPropertyError_entry :: Lens.Lens' BatchPutPropertyError PropertyValueEntry
batchPutPropertyError_entry :: Lens' BatchPutPropertyError PropertyValueEntry
batchPutPropertyError_entry = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutPropertyError' {PropertyValueEntry
entry :: PropertyValueEntry
$sel:entry:BatchPutPropertyError' :: BatchPutPropertyError -> PropertyValueEntry
entry} -> PropertyValueEntry
entry) (\s :: BatchPutPropertyError
s@BatchPutPropertyError' {} PropertyValueEntry
a -> BatchPutPropertyError
s {$sel:entry:BatchPutPropertyError' :: PropertyValueEntry
entry = PropertyValueEntry
a} :: BatchPutPropertyError)
instance Data.FromJSON BatchPutPropertyError where
parseJSON :: Value -> Parser BatchPutPropertyError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchPutPropertyError"
( \Object
x ->
Text -> Text -> PropertyValueEntry -> BatchPutPropertyError
BatchPutPropertyError'
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
"errorCode")
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
"errorMessage")
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
"entry")
)
instance Prelude.Hashable BatchPutPropertyError where
hashWithSalt :: Int -> BatchPutPropertyError -> Int
hashWithSalt Int
_salt BatchPutPropertyError' {Text
PropertyValueEntry
entry :: PropertyValueEntry
errorMessage :: Text
errorCode :: Text
$sel:entry:BatchPutPropertyError' :: BatchPutPropertyError -> PropertyValueEntry
$sel:errorMessage:BatchPutPropertyError' :: BatchPutPropertyError -> Text
$sel:errorCode:BatchPutPropertyError' :: BatchPutPropertyError -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` PropertyValueEntry
entry
instance Prelude.NFData BatchPutPropertyError where
rnf :: BatchPutPropertyError -> ()
rnf BatchPutPropertyError' {Text
PropertyValueEntry
entry :: PropertyValueEntry
errorMessage :: Text
errorCode :: Text
$sel:entry:BatchPutPropertyError' :: BatchPutPropertyError -> PropertyValueEntry
$sel:errorMessage:BatchPutPropertyError' :: BatchPutPropertyError -> Text
$sel:errorCode:BatchPutPropertyError' :: BatchPutPropertyError -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf PropertyValueEntry
entry