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