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