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