{-# 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.BatchGetAssetPropertyAggregatesErrorInfo 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.BatchGetAssetPropertyAggregatesErrorCode
import qualified Amazonka.Prelude as Prelude
data BatchGetAssetPropertyAggregatesErrorInfo = BatchGetAssetPropertyAggregatesErrorInfo'
{
BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorCode
errorCode :: BatchGetAssetPropertyAggregatesErrorCode,
BatchGetAssetPropertyAggregatesErrorInfo -> POSIX
errorTimestamp :: Data.POSIX
}
deriving (BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorInfo -> Bool
$c/= :: BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorInfo -> Bool
== :: BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorInfo -> Bool
$c== :: BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorInfo -> Bool
Prelude.Eq, ReadPrec [BatchGetAssetPropertyAggregatesErrorInfo]
ReadPrec BatchGetAssetPropertyAggregatesErrorInfo
Int -> ReadS BatchGetAssetPropertyAggregatesErrorInfo
ReadS [BatchGetAssetPropertyAggregatesErrorInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetAssetPropertyAggregatesErrorInfo]
$creadListPrec :: ReadPrec [BatchGetAssetPropertyAggregatesErrorInfo]
readPrec :: ReadPrec BatchGetAssetPropertyAggregatesErrorInfo
$creadPrec :: ReadPrec BatchGetAssetPropertyAggregatesErrorInfo
readList :: ReadS [BatchGetAssetPropertyAggregatesErrorInfo]
$creadList :: ReadS [BatchGetAssetPropertyAggregatesErrorInfo]
readsPrec :: Int -> ReadS BatchGetAssetPropertyAggregatesErrorInfo
$creadsPrec :: Int -> ReadS BatchGetAssetPropertyAggregatesErrorInfo
Prelude.Read, Int -> BatchGetAssetPropertyAggregatesErrorInfo -> ShowS
[BatchGetAssetPropertyAggregatesErrorInfo] -> ShowS
BatchGetAssetPropertyAggregatesErrorInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetAssetPropertyAggregatesErrorInfo] -> ShowS
$cshowList :: [BatchGetAssetPropertyAggregatesErrorInfo] -> ShowS
show :: BatchGetAssetPropertyAggregatesErrorInfo -> String
$cshow :: BatchGetAssetPropertyAggregatesErrorInfo -> String
showsPrec :: Int -> BatchGetAssetPropertyAggregatesErrorInfo -> ShowS
$cshowsPrec :: Int -> BatchGetAssetPropertyAggregatesErrorInfo -> ShowS
Prelude.Show, forall x.
Rep BatchGetAssetPropertyAggregatesErrorInfo x
-> BatchGetAssetPropertyAggregatesErrorInfo
forall x.
BatchGetAssetPropertyAggregatesErrorInfo
-> Rep BatchGetAssetPropertyAggregatesErrorInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetAssetPropertyAggregatesErrorInfo x
-> BatchGetAssetPropertyAggregatesErrorInfo
$cfrom :: forall x.
BatchGetAssetPropertyAggregatesErrorInfo
-> Rep BatchGetAssetPropertyAggregatesErrorInfo x
Prelude.Generic)
newBatchGetAssetPropertyAggregatesErrorInfo ::
BatchGetAssetPropertyAggregatesErrorCode ->
Prelude.UTCTime ->
BatchGetAssetPropertyAggregatesErrorInfo
newBatchGetAssetPropertyAggregatesErrorInfo :: BatchGetAssetPropertyAggregatesErrorCode
-> UTCTime -> BatchGetAssetPropertyAggregatesErrorInfo
newBatchGetAssetPropertyAggregatesErrorInfo
BatchGetAssetPropertyAggregatesErrorCode
pErrorCode_
UTCTime
pErrorTimestamp_ =
BatchGetAssetPropertyAggregatesErrorInfo'
{ $sel:errorCode:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorCode
errorCode =
BatchGetAssetPropertyAggregatesErrorCode
pErrorCode_,
$sel:errorTimestamp:BatchGetAssetPropertyAggregatesErrorInfo' :: POSIX
errorTimestamp =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pErrorTimestamp_
}
batchGetAssetPropertyAggregatesErrorInfo_errorCode :: Lens.Lens' BatchGetAssetPropertyAggregatesErrorInfo BatchGetAssetPropertyAggregatesErrorCode
batchGetAssetPropertyAggregatesErrorInfo_errorCode :: Lens'
BatchGetAssetPropertyAggregatesErrorInfo
BatchGetAssetPropertyAggregatesErrorCode
batchGetAssetPropertyAggregatesErrorInfo_errorCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyAggregatesErrorInfo' {BatchGetAssetPropertyAggregatesErrorCode
errorCode :: BatchGetAssetPropertyAggregatesErrorCode
$sel:errorCode:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorCode
errorCode} -> BatchGetAssetPropertyAggregatesErrorCode
errorCode) (\s :: BatchGetAssetPropertyAggregatesErrorInfo
s@BatchGetAssetPropertyAggregatesErrorInfo' {} BatchGetAssetPropertyAggregatesErrorCode
a -> BatchGetAssetPropertyAggregatesErrorInfo
s {$sel:errorCode:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorCode
errorCode = BatchGetAssetPropertyAggregatesErrorCode
a} :: BatchGetAssetPropertyAggregatesErrorInfo)
batchGetAssetPropertyAggregatesErrorInfo_errorTimestamp :: Lens.Lens' BatchGetAssetPropertyAggregatesErrorInfo Prelude.UTCTime
batchGetAssetPropertyAggregatesErrorInfo_errorTimestamp :: Lens' BatchGetAssetPropertyAggregatesErrorInfo UTCTime
batchGetAssetPropertyAggregatesErrorInfo_errorTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyAggregatesErrorInfo' {POSIX
errorTimestamp :: POSIX
$sel:errorTimestamp:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorInfo -> POSIX
errorTimestamp} -> POSIX
errorTimestamp) (\s :: BatchGetAssetPropertyAggregatesErrorInfo
s@BatchGetAssetPropertyAggregatesErrorInfo' {} POSIX
a -> BatchGetAssetPropertyAggregatesErrorInfo
s {$sel:errorTimestamp:BatchGetAssetPropertyAggregatesErrorInfo' :: POSIX
errorTimestamp = POSIX
a} :: BatchGetAssetPropertyAggregatesErrorInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance
Data.FromJSON
BatchGetAssetPropertyAggregatesErrorInfo
where
parseJSON :: Value -> Parser BatchGetAssetPropertyAggregatesErrorInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchGetAssetPropertyAggregatesErrorInfo"
( \Object
x ->
BatchGetAssetPropertyAggregatesErrorCode
-> POSIX -> BatchGetAssetPropertyAggregatesErrorInfo
BatchGetAssetPropertyAggregatesErrorInfo'
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
"errorTimestamp")
)
instance
Prelude.Hashable
BatchGetAssetPropertyAggregatesErrorInfo
where
hashWithSalt :: Int -> BatchGetAssetPropertyAggregatesErrorInfo -> Int
hashWithSalt
Int
_salt
BatchGetAssetPropertyAggregatesErrorInfo' {POSIX
BatchGetAssetPropertyAggregatesErrorCode
errorTimestamp :: POSIX
errorCode :: BatchGetAssetPropertyAggregatesErrorCode
$sel:errorTimestamp:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorInfo -> POSIX
$sel:errorCode:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorCode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BatchGetAssetPropertyAggregatesErrorCode
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
errorTimestamp
instance
Prelude.NFData
BatchGetAssetPropertyAggregatesErrorInfo
where
rnf :: BatchGetAssetPropertyAggregatesErrorInfo -> ()
rnf BatchGetAssetPropertyAggregatesErrorInfo' {POSIX
BatchGetAssetPropertyAggregatesErrorCode
errorTimestamp :: POSIX
errorCode :: BatchGetAssetPropertyAggregatesErrorCode
$sel:errorTimestamp:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorInfo -> POSIX
$sel:errorCode:BatchGetAssetPropertyAggregatesErrorInfo' :: BatchGetAssetPropertyAggregatesErrorInfo
-> BatchGetAssetPropertyAggregatesErrorCode
..} =
forall a. NFData a => a -> ()
Prelude.rnf BatchGetAssetPropertyAggregatesErrorCode
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
errorTimestamp