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