{-# 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.IoTAnalytics.Types.DatastoreStatistics where
import qualified Amazonka.Core as Core
import Amazonka.IoTAnalytics.Types.EstimatedResourceSize
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatastoreStatistics = DatastoreStatistics'
{
DatastoreStatistics -> Maybe EstimatedResourceSize
size :: Prelude.Maybe EstimatedResourceSize
}
deriving (DatastoreStatistics -> DatastoreStatistics -> Bool
(DatastoreStatistics -> DatastoreStatistics -> Bool)
-> (DatastoreStatistics -> DatastoreStatistics -> Bool)
-> Eq DatastoreStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatastoreStatistics -> DatastoreStatistics -> Bool
$c/= :: DatastoreStatistics -> DatastoreStatistics -> Bool
== :: DatastoreStatistics -> DatastoreStatistics -> Bool
$c== :: DatastoreStatistics -> DatastoreStatistics -> Bool
Prelude.Eq, ReadPrec [DatastoreStatistics]
ReadPrec DatastoreStatistics
Int -> ReadS DatastoreStatistics
ReadS [DatastoreStatistics]
(Int -> ReadS DatastoreStatistics)
-> ReadS [DatastoreStatistics]
-> ReadPrec DatastoreStatistics
-> ReadPrec [DatastoreStatistics]
-> Read DatastoreStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatastoreStatistics]
$creadListPrec :: ReadPrec [DatastoreStatistics]
readPrec :: ReadPrec DatastoreStatistics
$creadPrec :: ReadPrec DatastoreStatistics
readList :: ReadS [DatastoreStatistics]
$creadList :: ReadS [DatastoreStatistics]
readsPrec :: Int -> ReadS DatastoreStatistics
$creadsPrec :: Int -> ReadS DatastoreStatistics
Prelude.Read, Int -> DatastoreStatistics -> ShowS
[DatastoreStatistics] -> ShowS
DatastoreStatistics -> String
(Int -> DatastoreStatistics -> ShowS)
-> (DatastoreStatistics -> String)
-> ([DatastoreStatistics] -> ShowS)
-> Show DatastoreStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatastoreStatistics] -> ShowS
$cshowList :: [DatastoreStatistics] -> ShowS
show :: DatastoreStatistics -> String
$cshow :: DatastoreStatistics -> String
showsPrec :: Int -> DatastoreStatistics -> ShowS
$cshowsPrec :: Int -> DatastoreStatistics -> ShowS
Prelude.Show, (forall x. DatastoreStatistics -> Rep DatastoreStatistics x)
-> (forall x. Rep DatastoreStatistics x -> DatastoreStatistics)
-> Generic DatastoreStatistics
forall x. Rep DatastoreStatistics x -> DatastoreStatistics
forall x. DatastoreStatistics -> Rep DatastoreStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatastoreStatistics x -> DatastoreStatistics
$cfrom :: forall x. DatastoreStatistics -> Rep DatastoreStatistics x
Prelude.Generic)
newDatastoreStatistics ::
DatastoreStatistics
newDatastoreStatistics :: DatastoreStatistics
newDatastoreStatistics =
DatastoreStatistics' :: Maybe EstimatedResourceSize -> DatastoreStatistics
DatastoreStatistics' {$sel:size:DatastoreStatistics' :: Maybe EstimatedResourceSize
size = Maybe EstimatedResourceSize
forall a. Maybe a
Prelude.Nothing}
datastoreStatistics_size :: Lens.Lens' DatastoreStatistics (Prelude.Maybe EstimatedResourceSize)
datastoreStatistics_size :: (Maybe EstimatedResourceSize -> f (Maybe EstimatedResourceSize))
-> DatastoreStatistics -> f DatastoreStatistics
datastoreStatistics_size = (DatastoreStatistics -> Maybe EstimatedResourceSize)
-> (DatastoreStatistics
-> Maybe EstimatedResourceSize -> DatastoreStatistics)
-> Lens
DatastoreStatistics
DatastoreStatistics
(Maybe EstimatedResourceSize)
(Maybe EstimatedResourceSize)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreStatistics' {Maybe EstimatedResourceSize
size :: Maybe EstimatedResourceSize
$sel:size:DatastoreStatistics' :: DatastoreStatistics -> Maybe EstimatedResourceSize
size} -> Maybe EstimatedResourceSize
size) (\s :: DatastoreStatistics
s@DatastoreStatistics' {} Maybe EstimatedResourceSize
a -> DatastoreStatistics
s {$sel:size:DatastoreStatistics' :: Maybe EstimatedResourceSize
size = Maybe EstimatedResourceSize
a} :: DatastoreStatistics)
instance Core.FromJSON DatastoreStatistics where
parseJSON :: Value -> Parser DatastoreStatistics
parseJSON =
String
-> (Object -> Parser DatastoreStatistics)
-> Value
-> Parser DatastoreStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DatastoreStatistics"
( \Object
x ->
Maybe EstimatedResourceSize -> DatastoreStatistics
DatastoreStatistics' (Maybe EstimatedResourceSize -> DatastoreStatistics)
-> Parser (Maybe EstimatedResourceSize)
-> Parser DatastoreStatistics
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EstimatedResourceSize)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"size")
)
instance Prelude.Hashable DatastoreStatistics
instance Prelude.NFData DatastoreStatistics