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