{-# 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.BatchGetAssetPropertyAggregatesSuccessEntry 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.AggregatedValue
import qualified Amazonka.Prelude as Prelude
data BatchGetAssetPropertyAggregatesSuccessEntry = BatchGetAssetPropertyAggregatesSuccessEntry'
{
BatchGetAssetPropertyAggregatesSuccessEntry -> Text
entryId :: Prelude.Text,
BatchGetAssetPropertyAggregatesSuccessEntry -> [AggregatedValue]
aggregatedValues :: [AggregatedValue]
}
deriving (BatchGetAssetPropertyAggregatesSuccessEntry
-> BatchGetAssetPropertyAggregatesSuccessEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetAssetPropertyAggregatesSuccessEntry
-> BatchGetAssetPropertyAggregatesSuccessEntry -> Bool
$c/= :: BatchGetAssetPropertyAggregatesSuccessEntry
-> BatchGetAssetPropertyAggregatesSuccessEntry -> Bool
== :: BatchGetAssetPropertyAggregatesSuccessEntry
-> BatchGetAssetPropertyAggregatesSuccessEntry -> Bool
$c== :: BatchGetAssetPropertyAggregatesSuccessEntry
-> BatchGetAssetPropertyAggregatesSuccessEntry -> Bool
Prelude.Eq, ReadPrec [BatchGetAssetPropertyAggregatesSuccessEntry]
ReadPrec BatchGetAssetPropertyAggregatesSuccessEntry
Int -> ReadS BatchGetAssetPropertyAggregatesSuccessEntry
ReadS [BatchGetAssetPropertyAggregatesSuccessEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetAssetPropertyAggregatesSuccessEntry]
$creadListPrec :: ReadPrec [BatchGetAssetPropertyAggregatesSuccessEntry]
readPrec :: ReadPrec BatchGetAssetPropertyAggregatesSuccessEntry
$creadPrec :: ReadPrec BatchGetAssetPropertyAggregatesSuccessEntry
readList :: ReadS [BatchGetAssetPropertyAggregatesSuccessEntry]
$creadList :: ReadS [BatchGetAssetPropertyAggregatesSuccessEntry]
readsPrec :: Int -> ReadS BatchGetAssetPropertyAggregatesSuccessEntry
$creadsPrec :: Int -> ReadS BatchGetAssetPropertyAggregatesSuccessEntry
Prelude.Read, Int -> BatchGetAssetPropertyAggregatesSuccessEntry -> ShowS
[BatchGetAssetPropertyAggregatesSuccessEntry] -> ShowS
BatchGetAssetPropertyAggregatesSuccessEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetAssetPropertyAggregatesSuccessEntry] -> ShowS
$cshowList :: [BatchGetAssetPropertyAggregatesSuccessEntry] -> ShowS
show :: BatchGetAssetPropertyAggregatesSuccessEntry -> String
$cshow :: BatchGetAssetPropertyAggregatesSuccessEntry -> String
showsPrec :: Int -> BatchGetAssetPropertyAggregatesSuccessEntry -> ShowS
$cshowsPrec :: Int -> BatchGetAssetPropertyAggregatesSuccessEntry -> ShowS
Prelude.Show, forall x.
Rep BatchGetAssetPropertyAggregatesSuccessEntry x
-> BatchGetAssetPropertyAggregatesSuccessEntry
forall x.
BatchGetAssetPropertyAggregatesSuccessEntry
-> Rep BatchGetAssetPropertyAggregatesSuccessEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetAssetPropertyAggregatesSuccessEntry x
-> BatchGetAssetPropertyAggregatesSuccessEntry
$cfrom :: forall x.
BatchGetAssetPropertyAggregatesSuccessEntry
-> Rep BatchGetAssetPropertyAggregatesSuccessEntry x
Prelude.Generic)
newBatchGetAssetPropertyAggregatesSuccessEntry ::
Prelude.Text ->
BatchGetAssetPropertyAggregatesSuccessEntry
newBatchGetAssetPropertyAggregatesSuccessEntry :: Text -> BatchGetAssetPropertyAggregatesSuccessEntry
newBatchGetAssetPropertyAggregatesSuccessEntry
Text
pEntryId_ =
BatchGetAssetPropertyAggregatesSuccessEntry'
{ $sel:entryId:BatchGetAssetPropertyAggregatesSuccessEntry' :: Text
entryId =
Text
pEntryId_,
$sel:aggregatedValues:BatchGetAssetPropertyAggregatesSuccessEntry' :: [AggregatedValue]
aggregatedValues =
forall a. Monoid a => a
Prelude.mempty
}
batchGetAssetPropertyAggregatesSuccessEntry_entryId :: Lens.Lens' BatchGetAssetPropertyAggregatesSuccessEntry Prelude.Text
batchGetAssetPropertyAggregatesSuccessEntry_entryId :: Lens' BatchGetAssetPropertyAggregatesSuccessEntry Text
batchGetAssetPropertyAggregatesSuccessEntry_entryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyAggregatesSuccessEntry' {Text
entryId :: Text
$sel:entryId:BatchGetAssetPropertyAggregatesSuccessEntry' :: BatchGetAssetPropertyAggregatesSuccessEntry -> Text
entryId} -> Text
entryId) (\s :: BatchGetAssetPropertyAggregatesSuccessEntry
s@BatchGetAssetPropertyAggregatesSuccessEntry' {} Text
a -> BatchGetAssetPropertyAggregatesSuccessEntry
s {$sel:entryId:BatchGetAssetPropertyAggregatesSuccessEntry' :: Text
entryId = Text
a} :: BatchGetAssetPropertyAggregatesSuccessEntry)
batchGetAssetPropertyAggregatesSuccessEntry_aggregatedValues :: Lens.Lens' BatchGetAssetPropertyAggregatesSuccessEntry [AggregatedValue]
batchGetAssetPropertyAggregatesSuccessEntry_aggregatedValues :: Lens' BatchGetAssetPropertyAggregatesSuccessEntry [AggregatedValue]
batchGetAssetPropertyAggregatesSuccessEntry_aggregatedValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyAggregatesSuccessEntry' {[AggregatedValue]
aggregatedValues :: [AggregatedValue]
$sel:aggregatedValues:BatchGetAssetPropertyAggregatesSuccessEntry' :: BatchGetAssetPropertyAggregatesSuccessEntry -> [AggregatedValue]
aggregatedValues} -> [AggregatedValue]
aggregatedValues) (\s :: BatchGetAssetPropertyAggregatesSuccessEntry
s@BatchGetAssetPropertyAggregatesSuccessEntry' {} [AggregatedValue]
a -> BatchGetAssetPropertyAggregatesSuccessEntry
s {$sel:aggregatedValues:BatchGetAssetPropertyAggregatesSuccessEntry' :: [AggregatedValue]
aggregatedValues = [AggregatedValue]
a} :: BatchGetAssetPropertyAggregatesSuccessEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Data.FromJSON
BatchGetAssetPropertyAggregatesSuccessEntry
where
parseJSON :: Value -> Parser BatchGetAssetPropertyAggregatesSuccessEntry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchGetAssetPropertyAggregatesSuccessEntry"
( \Object
x ->
Text
-> [AggregatedValue] -> BatchGetAssetPropertyAggregatesSuccessEntry
BatchGetAssetPropertyAggregatesSuccessEntry'
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
"entryId")
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
"aggregatedValues"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
BatchGetAssetPropertyAggregatesSuccessEntry
where
hashWithSalt :: Int -> BatchGetAssetPropertyAggregatesSuccessEntry -> Int
hashWithSalt
Int
_salt
BatchGetAssetPropertyAggregatesSuccessEntry' {[AggregatedValue]
Text
aggregatedValues :: [AggregatedValue]
entryId :: Text
$sel:aggregatedValues:BatchGetAssetPropertyAggregatesSuccessEntry' :: BatchGetAssetPropertyAggregatesSuccessEntry -> [AggregatedValue]
$sel:entryId:BatchGetAssetPropertyAggregatesSuccessEntry' :: BatchGetAssetPropertyAggregatesSuccessEntry -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
entryId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [AggregatedValue]
aggregatedValues
instance
Prelude.NFData
BatchGetAssetPropertyAggregatesSuccessEntry
where
rnf :: BatchGetAssetPropertyAggregatesSuccessEntry -> ()
rnf BatchGetAssetPropertyAggregatesSuccessEntry' {[AggregatedValue]
Text
aggregatedValues :: [AggregatedValue]
entryId :: Text
$sel:aggregatedValues:BatchGetAssetPropertyAggregatesSuccessEntry' :: BatchGetAssetPropertyAggregatesSuccessEntry -> [AggregatedValue]
$sel:entryId:BatchGetAssetPropertyAggregatesSuccessEntry' :: BatchGetAssetPropertyAggregatesSuccessEntry -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
entryId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AggregatedValue]
aggregatedValues