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