{-# 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.SecurityHub.Types.AwsS3AccountPublicAccessBlockDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsS3AccountPublicAccessBlockDetails = AwsS3AccountPublicAccessBlockDetails'
{
AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
ignorePublicAcls :: Prelude.Maybe Prelude.Bool,
AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
blockPublicAcls :: Prelude.Maybe Prelude.Bool,
AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
restrictPublicBuckets :: Prelude.Maybe Prelude.Bool,
AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
blockPublicPolicy :: Prelude.Maybe Prelude.Bool
}
deriving (AwsS3AccountPublicAccessBlockDetails
-> AwsS3AccountPublicAccessBlockDetails -> Bool
(AwsS3AccountPublicAccessBlockDetails
-> AwsS3AccountPublicAccessBlockDetails -> Bool)
-> (AwsS3AccountPublicAccessBlockDetails
-> AwsS3AccountPublicAccessBlockDetails -> Bool)
-> Eq AwsS3AccountPublicAccessBlockDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsS3AccountPublicAccessBlockDetails
-> AwsS3AccountPublicAccessBlockDetails -> Bool
$c/= :: AwsS3AccountPublicAccessBlockDetails
-> AwsS3AccountPublicAccessBlockDetails -> Bool
== :: AwsS3AccountPublicAccessBlockDetails
-> AwsS3AccountPublicAccessBlockDetails -> Bool
$c== :: AwsS3AccountPublicAccessBlockDetails
-> AwsS3AccountPublicAccessBlockDetails -> Bool
Prelude.Eq, ReadPrec [AwsS3AccountPublicAccessBlockDetails]
ReadPrec AwsS3AccountPublicAccessBlockDetails
Int -> ReadS AwsS3AccountPublicAccessBlockDetails
ReadS [AwsS3AccountPublicAccessBlockDetails]
(Int -> ReadS AwsS3AccountPublicAccessBlockDetails)
-> ReadS [AwsS3AccountPublicAccessBlockDetails]
-> ReadPrec AwsS3AccountPublicAccessBlockDetails
-> ReadPrec [AwsS3AccountPublicAccessBlockDetails]
-> Read AwsS3AccountPublicAccessBlockDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsS3AccountPublicAccessBlockDetails]
$creadListPrec :: ReadPrec [AwsS3AccountPublicAccessBlockDetails]
readPrec :: ReadPrec AwsS3AccountPublicAccessBlockDetails
$creadPrec :: ReadPrec AwsS3AccountPublicAccessBlockDetails
readList :: ReadS [AwsS3AccountPublicAccessBlockDetails]
$creadList :: ReadS [AwsS3AccountPublicAccessBlockDetails]
readsPrec :: Int -> ReadS AwsS3AccountPublicAccessBlockDetails
$creadsPrec :: Int -> ReadS AwsS3AccountPublicAccessBlockDetails
Prelude.Read, Int -> AwsS3AccountPublicAccessBlockDetails -> ShowS
[AwsS3AccountPublicAccessBlockDetails] -> ShowS
AwsS3AccountPublicAccessBlockDetails -> String
(Int -> AwsS3AccountPublicAccessBlockDetails -> ShowS)
-> (AwsS3AccountPublicAccessBlockDetails -> String)
-> ([AwsS3AccountPublicAccessBlockDetails] -> ShowS)
-> Show AwsS3AccountPublicAccessBlockDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsS3AccountPublicAccessBlockDetails] -> ShowS
$cshowList :: [AwsS3AccountPublicAccessBlockDetails] -> ShowS
show :: AwsS3AccountPublicAccessBlockDetails -> String
$cshow :: AwsS3AccountPublicAccessBlockDetails -> String
showsPrec :: Int -> AwsS3AccountPublicAccessBlockDetails -> ShowS
$cshowsPrec :: Int -> AwsS3AccountPublicAccessBlockDetails -> ShowS
Prelude.Show, (forall x.
AwsS3AccountPublicAccessBlockDetails
-> Rep AwsS3AccountPublicAccessBlockDetails x)
-> (forall x.
Rep AwsS3AccountPublicAccessBlockDetails x
-> AwsS3AccountPublicAccessBlockDetails)
-> Generic AwsS3AccountPublicAccessBlockDetails
forall x.
Rep AwsS3AccountPublicAccessBlockDetails x
-> AwsS3AccountPublicAccessBlockDetails
forall x.
AwsS3AccountPublicAccessBlockDetails
-> Rep AwsS3AccountPublicAccessBlockDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsS3AccountPublicAccessBlockDetails x
-> AwsS3AccountPublicAccessBlockDetails
$cfrom :: forall x.
AwsS3AccountPublicAccessBlockDetails
-> Rep AwsS3AccountPublicAccessBlockDetails x
Prelude.Generic)
newAwsS3AccountPublicAccessBlockDetails ::
AwsS3AccountPublicAccessBlockDetails
newAwsS3AccountPublicAccessBlockDetails :: AwsS3AccountPublicAccessBlockDetails
newAwsS3AccountPublicAccessBlockDetails =
AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> AwsS3AccountPublicAccessBlockDetails
AwsS3AccountPublicAccessBlockDetails'
{ $sel:ignorePublicAcls:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
ignorePublicAcls =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:blockPublicAcls:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
blockPublicAcls = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:restrictPublicBuckets:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
restrictPublicBuckets =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:blockPublicPolicy:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
blockPublicPolicy = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
awsS3AccountPublicAccessBlockDetails_ignorePublicAcls :: Lens.Lens' AwsS3AccountPublicAccessBlockDetails (Prelude.Maybe Prelude.Bool)
awsS3AccountPublicAccessBlockDetails_ignorePublicAcls :: (Maybe Bool -> f (Maybe Bool))
-> AwsS3AccountPublicAccessBlockDetails
-> f AwsS3AccountPublicAccessBlockDetails
awsS3AccountPublicAccessBlockDetails_ignorePublicAcls = (AwsS3AccountPublicAccessBlockDetails -> Maybe Bool)
-> (AwsS3AccountPublicAccessBlockDetails
-> Maybe Bool -> AwsS3AccountPublicAccessBlockDetails)
-> Lens
AwsS3AccountPublicAccessBlockDetails
AwsS3AccountPublicAccessBlockDetails
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3AccountPublicAccessBlockDetails' {Maybe Bool
ignorePublicAcls :: Maybe Bool
$sel:ignorePublicAcls:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
ignorePublicAcls} -> Maybe Bool
ignorePublicAcls) (\s :: AwsS3AccountPublicAccessBlockDetails
s@AwsS3AccountPublicAccessBlockDetails' {} Maybe Bool
a -> AwsS3AccountPublicAccessBlockDetails
s {$sel:ignorePublicAcls:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
ignorePublicAcls = Maybe Bool
a} :: AwsS3AccountPublicAccessBlockDetails)
awsS3AccountPublicAccessBlockDetails_blockPublicAcls :: Lens.Lens' AwsS3AccountPublicAccessBlockDetails (Prelude.Maybe Prelude.Bool)
awsS3AccountPublicAccessBlockDetails_blockPublicAcls :: (Maybe Bool -> f (Maybe Bool))
-> AwsS3AccountPublicAccessBlockDetails
-> f AwsS3AccountPublicAccessBlockDetails
awsS3AccountPublicAccessBlockDetails_blockPublicAcls = (AwsS3AccountPublicAccessBlockDetails -> Maybe Bool)
-> (AwsS3AccountPublicAccessBlockDetails
-> Maybe Bool -> AwsS3AccountPublicAccessBlockDetails)
-> Lens
AwsS3AccountPublicAccessBlockDetails
AwsS3AccountPublicAccessBlockDetails
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3AccountPublicAccessBlockDetails' {Maybe Bool
blockPublicAcls :: Maybe Bool
$sel:blockPublicAcls:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
blockPublicAcls} -> Maybe Bool
blockPublicAcls) (\s :: AwsS3AccountPublicAccessBlockDetails
s@AwsS3AccountPublicAccessBlockDetails' {} Maybe Bool
a -> AwsS3AccountPublicAccessBlockDetails
s {$sel:blockPublicAcls:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
blockPublicAcls = Maybe Bool
a} :: AwsS3AccountPublicAccessBlockDetails)
awsS3AccountPublicAccessBlockDetails_restrictPublicBuckets :: Lens.Lens' AwsS3AccountPublicAccessBlockDetails (Prelude.Maybe Prelude.Bool)
awsS3AccountPublicAccessBlockDetails_restrictPublicBuckets :: (Maybe Bool -> f (Maybe Bool))
-> AwsS3AccountPublicAccessBlockDetails
-> f AwsS3AccountPublicAccessBlockDetails
awsS3AccountPublicAccessBlockDetails_restrictPublicBuckets = (AwsS3AccountPublicAccessBlockDetails -> Maybe Bool)
-> (AwsS3AccountPublicAccessBlockDetails
-> Maybe Bool -> AwsS3AccountPublicAccessBlockDetails)
-> Lens
AwsS3AccountPublicAccessBlockDetails
AwsS3AccountPublicAccessBlockDetails
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3AccountPublicAccessBlockDetails' {Maybe Bool
restrictPublicBuckets :: Maybe Bool
$sel:restrictPublicBuckets:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
restrictPublicBuckets} -> Maybe Bool
restrictPublicBuckets) (\s :: AwsS3AccountPublicAccessBlockDetails
s@AwsS3AccountPublicAccessBlockDetails' {} Maybe Bool
a -> AwsS3AccountPublicAccessBlockDetails
s {$sel:restrictPublicBuckets:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
restrictPublicBuckets = Maybe Bool
a} :: AwsS3AccountPublicAccessBlockDetails)
awsS3AccountPublicAccessBlockDetails_blockPublicPolicy :: Lens.Lens' AwsS3AccountPublicAccessBlockDetails (Prelude.Maybe Prelude.Bool)
awsS3AccountPublicAccessBlockDetails_blockPublicPolicy :: (Maybe Bool -> f (Maybe Bool))
-> AwsS3AccountPublicAccessBlockDetails
-> f AwsS3AccountPublicAccessBlockDetails
awsS3AccountPublicAccessBlockDetails_blockPublicPolicy = (AwsS3AccountPublicAccessBlockDetails -> Maybe Bool)
-> (AwsS3AccountPublicAccessBlockDetails
-> Maybe Bool -> AwsS3AccountPublicAccessBlockDetails)
-> Lens
AwsS3AccountPublicAccessBlockDetails
AwsS3AccountPublicAccessBlockDetails
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3AccountPublicAccessBlockDetails' {Maybe Bool
blockPublicPolicy :: Maybe Bool
$sel:blockPublicPolicy:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
blockPublicPolicy} -> Maybe Bool
blockPublicPolicy) (\s :: AwsS3AccountPublicAccessBlockDetails
s@AwsS3AccountPublicAccessBlockDetails' {} Maybe Bool
a -> AwsS3AccountPublicAccessBlockDetails
s {$sel:blockPublicPolicy:AwsS3AccountPublicAccessBlockDetails' :: Maybe Bool
blockPublicPolicy = Maybe Bool
a} :: AwsS3AccountPublicAccessBlockDetails)
instance
Core.FromJSON
AwsS3AccountPublicAccessBlockDetails
where
parseJSON :: Value -> Parser AwsS3AccountPublicAccessBlockDetails
parseJSON =
String
-> (Object -> Parser AwsS3AccountPublicAccessBlockDetails)
-> Value
-> Parser AwsS3AccountPublicAccessBlockDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsS3AccountPublicAccessBlockDetails"
( \Object
x ->
Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> AwsS3AccountPublicAccessBlockDetails
AwsS3AccountPublicAccessBlockDetails'
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> AwsS3AccountPublicAccessBlockDetails)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> AwsS3AccountPublicAccessBlockDetails)
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
-> AwsS3AccountPublicAccessBlockDetails)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool -> Maybe Bool -> AwsS3AccountPublicAccessBlockDetails)
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 -> AwsS3AccountPublicAccessBlockDetails)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> AwsS3AccountPublicAccessBlockDetails)
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 -> AwsS3AccountPublicAccessBlockDetails)
-> Parser (Maybe Bool)
-> Parser AwsS3AccountPublicAccessBlockDetails
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
AwsS3AccountPublicAccessBlockDetails
instance
Prelude.NFData
AwsS3AccountPublicAccessBlockDetails
instance
Core.ToJSON
AwsS3AccountPublicAccessBlockDetails
where
toJSON :: AwsS3AccountPublicAccessBlockDetails -> Value
toJSON AwsS3AccountPublicAccessBlockDetails' {Maybe Bool
blockPublicPolicy :: Maybe Bool
restrictPublicBuckets :: Maybe Bool
blockPublicAcls :: Maybe Bool
ignorePublicAcls :: Maybe Bool
$sel:blockPublicPolicy:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
$sel:restrictPublicBuckets:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
$sel:blockPublicAcls:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
$sel:ignorePublicAcls:AwsS3AccountPublicAccessBlockDetails' :: AwsS3AccountPublicAccessBlockDetails -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"IgnorePublicAcls" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
ignorePublicAcls,
(Text
"BlockPublicAcls" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
blockPublicAcls,
(Text
"RestrictPublicBuckets" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
restrictPublicBuckets,
(Text
"BlockPublicPolicy" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
blockPublicPolicy
]
)