{-# 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.ObjectCountByEncryptionType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ObjectCountByEncryptionType = ObjectCountByEncryptionType'
{
ObjectCountByEncryptionType -> Maybe Integer
unknown :: Prelude.Maybe Prelude.Integer,
ObjectCountByEncryptionType -> Maybe Integer
s3Managed :: Prelude.Maybe Prelude.Integer,
ObjectCountByEncryptionType -> Maybe Integer
unencrypted :: Prelude.Maybe Prelude.Integer,
ObjectCountByEncryptionType -> Maybe Integer
kmsManaged :: Prelude.Maybe Prelude.Integer,
ObjectCountByEncryptionType -> Maybe Integer
customerManaged :: Prelude.Maybe Prelude.Integer
}
deriving (ObjectCountByEncryptionType -> ObjectCountByEncryptionType -> Bool
(ObjectCountByEncryptionType
-> ObjectCountByEncryptionType -> Bool)
-> (ObjectCountByEncryptionType
-> ObjectCountByEncryptionType -> Bool)
-> Eq ObjectCountByEncryptionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ObjectCountByEncryptionType -> ObjectCountByEncryptionType -> Bool
$c/= :: ObjectCountByEncryptionType -> ObjectCountByEncryptionType -> Bool
== :: ObjectCountByEncryptionType -> ObjectCountByEncryptionType -> Bool
$c== :: ObjectCountByEncryptionType -> ObjectCountByEncryptionType -> Bool
Prelude.Eq, ReadPrec [ObjectCountByEncryptionType]
ReadPrec ObjectCountByEncryptionType
Int -> ReadS ObjectCountByEncryptionType
ReadS [ObjectCountByEncryptionType]
(Int -> ReadS ObjectCountByEncryptionType)
-> ReadS [ObjectCountByEncryptionType]
-> ReadPrec ObjectCountByEncryptionType
-> ReadPrec [ObjectCountByEncryptionType]
-> Read ObjectCountByEncryptionType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ObjectCountByEncryptionType]
$creadListPrec :: ReadPrec [ObjectCountByEncryptionType]
readPrec :: ReadPrec ObjectCountByEncryptionType
$creadPrec :: ReadPrec ObjectCountByEncryptionType
readList :: ReadS [ObjectCountByEncryptionType]
$creadList :: ReadS [ObjectCountByEncryptionType]
readsPrec :: Int -> ReadS ObjectCountByEncryptionType
$creadsPrec :: Int -> ReadS ObjectCountByEncryptionType
Prelude.Read, Int -> ObjectCountByEncryptionType -> ShowS
[ObjectCountByEncryptionType] -> ShowS
ObjectCountByEncryptionType -> String
(Int -> ObjectCountByEncryptionType -> ShowS)
-> (ObjectCountByEncryptionType -> String)
-> ([ObjectCountByEncryptionType] -> ShowS)
-> Show ObjectCountByEncryptionType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ObjectCountByEncryptionType] -> ShowS
$cshowList :: [ObjectCountByEncryptionType] -> ShowS
show :: ObjectCountByEncryptionType -> String
$cshow :: ObjectCountByEncryptionType -> String
showsPrec :: Int -> ObjectCountByEncryptionType -> ShowS
$cshowsPrec :: Int -> ObjectCountByEncryptionType -> ShowS
Prelude.Show, (forall x.
ObjectCountByEncryptionType -> Rep ObjectCountByEncryptionType x)
-> (forall x.
Rep ObjectCountByEncryptionType x -> ObjectCountByEncryptionType)
-> Generic ObjectCountByEncryptionType
forall x.
Rep ObjectCountByEncryptionType x -> ObjectCountByEncryptionType
forall x.
ObjectCountByEncryptionType -> Rep ObjectCountByEncryptionType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ObjectCountByEncryptionType x -> ObjectCountByEncryptionType
$cfrom :: forall x.
ObjectCountByEncryptionType -> Rep ObjectCountByEncryptionType x
Prelude.Generic)
newObjectCountByEncryptionType ::
ObjectCountByEncryptionType
newObjectCountByEncryptionType :: ObjectCountByEncryptionType
newObjectCountByEncryptionType =
ObjectCountByEncryptionType' :: Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> ObjectCountByEncryptionType
ObjectCountByEncryptionType'
{ $sel:unknown:ObjectCountByEncryptionType' :: Maybe Integer
unknown =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:s3Managed:ObjectCountByEncryptionType' :: Maybe Integer
s3Managed = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:unencrypted:ObjectCountByEncryptionType' :: Maybe Integer
unencrypted = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:kmsManaged:ObjectCountByEncryptionType' :: Maybe Integer
kmsManaged = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:customerManaged:ObjectCountByEncryptionType' :: Maybe Integer
customerManaged = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
objectCountByEncryptionType_unknown :: Lens.Lens' ObjectCountByEncryptionType (Prelude.Maybe Prelude.Integer)
objectCountByEncryptionType_unknown :: (Maybe Integer -> f (Maybe Integer))
-> ObjectCountByEncryptionType -> f ObjectCountByEncryptionType
objectCountByEncryptionType_unknown = (ObjectCountByEncryptionType -> Maybe Integer)
-> (ObjectCountByEncryptionType
-> Maybe Integer -> ObjectCountByEncryptionType)
-> Lens
ObjectCountByEncryptionType
ObjectCountByEncryptionType
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ObjectCountByEncryptionType' {Maybe Integer
unknown :: Maybe Integer
$sel:unknown:ObjectCountByEncryptionType' :: ObjectCountByEncryptionType -> Maybe Integer
unknown} -> Maybe Integer
unknown) (\s :: ObjectCountByEncryptionType
s@ObjectCountByEncryptionType' {} Maybe Integer
a -> ObjectCountByEncryptionType
s {$sel:unknown:ObjectCountByEncryptionType' :: Maybe Integer
unknown = Maybe Integer
a} :: ObjectCountByEncryptionType)
objectCountByEncryptionType_s3Managed :: Lens.Lens' ObjectCountByEncryptionType (Prelude.Maybe Prelude.Integer)
objectCountByEncryptionType_s3Managed :: (Maybe Integer -> f (Maybe Integer))
-> ObjectCountByEncryptionType -> f ObjectCountByEncryptionType
objectCountByEncryptionType_s3Managed = (ObjectCountByEncryptionType -> Maybe Integer)
-> (ObjectCountByEncryptionType
-> Maybe Integer -> ObjectCountByEncryptionType)
-> Lens
ObjectCountByEncryptionType
ObjectCountByEncryptionType
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ObjectCountByEncryptionType' {Maybe Integer
s3Managed :: Maybe Integer
$sel:s3Managed:ObjectCountByEncryptionType' :: ObjectCountByEncryptionType -> Maybe Integer
s3Managed} -> Maybe Integer
s3Managed) (\s :: ObjectCountByEncryptionType
s@ObjectCountByEncryptionType' {} Maybe Integer
a -> ObjectCountByEncryptionType
s {$sel:s3Managed:ObjectCountByEncryptionType' :: Maybe Integer
s3Managed = Maybe Integer
a} :: ObjectCountByEncryptionType)
objectCountByEncryptionType_unencrypted :: Lens.Lens' ObjectCountByEncryptionType (Prelude.Maybe Prelude.Integer)
objectCountByEncryptionType_unencrypted :: (Maybe Integer -> f (Maybe Integer))
-> ObjectCountByEncryptionType -> f ObjectCountByEncryptionType
objectCountByEncryptionType_unencrypted = (ObjectCountByEncryptionType -> Maybe Integer)
-> (ObjectCountByEncryptionType
-> Maybe Integer -> ObjectCountByEncryptionType)
-> Lens
ObjectCountByEncryptionType
ObjectCountByEncryptionType
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ObjectCountByEncryptionType' {Maybe Integer
unencrypted :: Maybe Integer
$sel:unencrypted:ObjectCountByEncryptionType' :: ObjectCountByEncryptionType -> Maybe Integer
unencrypted} -> Maybe Integer
unencrypted) (\s :: ObjectCountByEncryptionType
s@ObjectCountByEncryptionType' {} Maybe Integer
a -> ObjectCountByEncryptionType
s {$sel:unencrypted:ObjectCountByEncryptionType' :: Maybe Integer
unencrypted = Maybe Integer
a} :: ObjectCountByEncryptionType)
objectCountByEncryptionType_kmsManaged :: Lens.Lens' ObjectCountByEncryptionType (Prelude.Maybe Prelude.Integer)
objectCountByEncryptionType_kmsManaged :: (Maybe Integer -> f (Maybe Integer))
-> ObjectCountByEncryptionType -> f ObjectCountByEncryptionType
objectCountByEncryptionType_kmsManaged = (ObjectCountByEncryptionType -> Maybe Integer)
-> (ObjectCountByEncryptionType
-> Maybe Integer -> ObjectCountByEncryptionType)
-> Lens
ObjectCountByEncryptionType
ObjectCountByEncryptionType
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ObjectCountByEncryptionType' {Maybe Integer
kmsManaged :: Maybe Integer
$sel:kmsManaged:ObjectCountByEncryptionType' :: ObjectCountByEncryptionType -> Maybe Integer
kmsManaged} -> Maybe Integer
kmsManaged) (\s :: ObjectCountByEncryptionType
s@ObjectCountByEncryptionType' {} Maybe Integer
a -> ObjectCountByEncryptionType
s {$sel:kmsManaged:ObjectCountByEncryptionType' :: Maybe Integer
kmsManaged = Maybe Integer
a} :: ObjectCountByEncryptionType)
objectCountByEncryptionType_customerManaged :: Lens.Lens' ObjectCountByEncryptionType (Prelude.Maybe Prelude.Integer)
objectCountByEncryptionType_customerManaged :: (Maybe Integer -> f (Maybe Integer))
-> ObjectCountByEncryptionType -> f ObjectCountByEncryptionType
objectCountByEncryptionType_customerManaged = (ObjectCountByEncryptionType -> Maybe Integer)
-> (ObjectCountByEncryptionType
-> Maybe Integer -> ObjectCountByEncryptionType)
-> Lens
ObjectCountByEncryptionType
ObjectCountByEncryptionType
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ObjectCountByEncryptionType' {Maybe Integer
customerManaged :: Maybe Integer
$sel:customerManaged:ObjectCountByEncryptionType' :: ObjectCountByEncryptionType -> Maybe Integer
customerManaged} -> Maybe Integer
customerManaged) (\s :: ObjectCountByEncryptionType
s@ObjectCountByEncryptionType' {} Maybe Integer
a -> ObjectCountByEncryptionType
s {$sel:customerManaged:ObjectCountByEncryptionType' :: Maybe Integer
customerManaged = Maybe Integer
a} :: ObjectCountByEncryptionType)
instance Core.FromJSON ObjectCountByEncryptionType where
parseJSON :: Value -> Parser ObjectCountByEncryptionType
parseJSON =
String
-> (Object -> Parser ObjectCountByEncryptionType)
-> Value
-> Parser ObjectCountByEncryptionType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ObjectCountByEncryptionType"
( \Object
x ->
Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> ObjectCountByEncryptionType
ObjectCountByEncryptionType'
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> ObjectCountByEncryptionType)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> ObjectCountByEncryptionType)
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
"unknown")
Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> ObjectCountByEncryptionType)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> ObjectCountByEncryptionType)
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
"s3Managed")
Parser
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> ObjectCountByEncryptionType)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer -> Maybe Integer -> ObjectCountByEncryptionType)
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
"unencrypted")
Parser
(Maybe Integer -> Maybe Integer -> ObjectCountByEncryptionType)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> ObjectCountByEncryptionType)
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
"kmsManaged")
Parser (Maybe Integer -> ObjectCountByEncryptionType)
-> Parser (Maybe Integer) -> Parser ObjectCountByEncryptionType
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
"customerManaged")
)
instance Prelude.Hashable ObjectCountByEncryptionType
instance Prelude.NFData ObjectCountByEncryptionType