{-# 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.AwsIamPermissionsBoundary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsIamPermissionsBoundary = AwsIamPermissionsBoundary'
{
AwsIamPermissionsBoundary -> Maybe Text
permissionsBoundaryType :: Prelude.Maybe Prelude.Text,
AwsIamPermissionsBoundary -> Maybe Text
permissionsBoundaryArn :: Prelude.Maybe Prelude.Text
}
deriving (AwsIamPermissionsBoundary -> AwsIamPermissionsBoundary -> Bool
(AwsIamPermissionsBoundary -> AwsIamPermissionsBoundary -> Bool)
-> (AwsIamPermissionsBoundary -> AwsIamPermissionsBoundary -> Bool)
-> Eq AwsIamPermissionsBoundary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsIamPermissionsBoundary -> AwsIamPermissionsBoundary -> Bool
$c/= :: AwsIamPermissionsBoundary -> AwsIamPermissionsBoundary -> Bool
== :: AwsIamPermissionsBoundary -> AwsIamPermissionsBoundary -> Bool
$c== :: AwsIamPermissionsBoundary -> AwsIamPermissionsBoundary -> Bool
Prelude.Eq, ReadPrec [AwsIamPermissionsBoundary]
ReadPrec AwsIamPermissionsBoundary
Int -> ReadS AwsIamPermissionsBoundary
ReadS [AwsIamPermissionsBoundary]
(Int -> ReadS AwsIamPermissionsBoundary)
-> ReadS [AwsIamPermissionsBoundary]
-> ReadPrec AwsIamPermissionsBoundary
-> ReadPrec [AwsIamPermissionsBoundary]
-> Read AwsIamPermissionsBoundary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsIamPermissionsBoundary]
$creadListPrec :: ReadPrec [AwsIamPermissionsBoundary]
readPrec :: ReadPrec AwsIamPermissionsBoundary
$creadPrec :: ReadPrec AwsIamPermissionsBoundary
readList :: ReadS [AwsIamPermissionsBoundary]
$creadList :: ReadS [AwsIamPermissionsBoundary]
readsPrec :: Int -> ReadS AwsIamPermissionsBoundary
$creadsPrec :: Int -> ReadS AwsIamPermissionsBoundary
Prelude.Read, Int -> AwsIamPermissionsBoundary -> ShowS
[AwsIamPermissionsBoundary] -> ShowS
AwsIamPermissionsBoundary -> String
(Int -> AwsIamPermissionsBoundary -> ShowS)
-> (AwsIamPermissionsBoundary -> String)
-> ([AwsIamPermissionsBoundary] -> ShowS)
-> Show AwsIamPermissionsBoundary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsIamPermissionsBoundary] -> ShowS
$cshowList :: [AwsIamPermissionsBoundary] -> ShowS
show :: AwsIamPermissionsBoundary -> String
$cshow :: AwsIamPermissionsBoundary -> String
showsPrec :: Int -> AwsIamPermissionsBoundary -> ShowS
$cshowsPrec :: Int -> AwsIamPermissionsBoundary -> ShowS
Prelude.Show, (forall x.
AwsIamPermissionsBoundary -> Rep AwsIamPermissionsBoundary x)
-> (forall x.
Rep AwsIamPermissionsBoundary x -> AwsIamPermissionsBoundary)
-> Generic AwsIamPermissionsBoundary
forall x.
Rep AwsIamPermissionsBoundary x -> AwsIamPermissionsBoundary
forall x.
AwsIamPermissionsBoundary -> Rep AwsIamPermissionsBoundary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsIamPermissionsBoundary x -> AwsIamPermissionsBoundary
$cfrom :: forall x.
AwsIamPermissionsBoundary -> Rep AwsIamPermissionsBoundary x
Prelude.Generic)
newAwsIamPermissionsBoundary ::
AwsIamPermissionsBoundary
newAwsIamPermissionsBoundary :: AwsIamPermissionsBoundary
newAwsIamPermissionsBoundary =
AwsIamPermissionsBoundary' :: Maybe Text -> Maybe Text -> AwsIamPermissionsBoundary
AwsIamPermissionsBoundary'
{ $sel:permissionsBoundaryType:AwsIamPermissionsBoundary' :: Maybe Text
permissionsBoundaryType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:permissionsBoundaryArn:AwsIamPermissionsBoundary' :: Maybe Text
permissionsBoundaryArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsIamPermissionsBoundary_permissionsBoundaryType :: Lens.Lens' AwsIamPermissionsBoundary (Prelude.Maybe Prelude.Text)
awsIamPermissionsBoundary_permissionsBoundaryType :: (Maybe Text -> f (Maybe Text))
-> AwsIamPermissionsBoundary -> f AwsIamPermissionsBoundary
awsIamPermissionsBoundary_permissionsBoundaryType = (AwsIamPermissionsBoundary -> Maybe Text)
-> (AwsIamPermissionsBoundary
-> Maybe Text -> AwsIamPermissionsBoundary)
-> Lens
AwsIamPermissionsBoundary
AwsIamPermissionsBoundary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamPermissionsBoundary' {Maybe Text
permissionsBoundaryType :: Maybe Text
$sel:permissionsBoundaryType:AwsIamPermissionsBoundary' :: AwsIamPermissionsBoundary -> Maybe Text
permissionsBoundaryType} -> Maybe Text
permissionsBoundaryType) (\s :: AwsIamPermissionsBoundary
s@AwsIamPermissionsBoundary' {} Maybe Text
a -> AwsIamPermissionsBoundary
s {$sel:permissionsBoundaryType:AwsIamPermissionsBoundary' :: Maybe Text
permissionsBoundaryType = Maybe Text
a} :: AwsIamPermissionsBoundary)
awsIamPermissionsBoundary_permissionsBoundaryArn :: Lens.Lens' AwsIamPermissionsBoundary (Prelude.Maybe Prelude.Text)
awsIamPermissionsBoundary_permissionsBoundaryArn :: (Maybe Text -> f (Maybe Text))
-> AwsIamPermissionsBoundary -> f AwsIamPermissionsBoundary
awsIamPermissionsBoundary_permissionsBoundaryArn = (AwsIamPermissionsBoundary -> Maybe Text)
-> (AwsIamPermissionsBoundary
-> Maybe Text -> AwsIamPermissionsBoundary)
-> Lens
AwsIamPermissionsBoundary
AwsIamPermissionsBoundary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamPermissionsBoundary' {Maybe Text
permissionsBoundaryArn :: Maybe Text
$sel:permissionsBoundaryArn:AwsIamPermissionsBoundary' :: AwsIamPermissionsBoundary -> Maybe Text
permissionsBoundaryArn} -> Maybe Text
permissionsBoundaryArn) (\s :: AwsIamPermissionsBoundary
s@AwsIamPermissionsBoundary' {} Maybe Text
a -> AwsIamPermissionsBoundary
s {$sel:permissionsBoundaryArn:AwsIamPermissionsBoundary' :: Maybe Text
permissionsBoundaryArn = Maybe Text
a} :: AwsIamPermissionsBoundary)
instance Core.FromJSON AwsIamPermissionsBoundary where
parseJSON :: Value -> Parser AwsIamPermissionsBoundary
parseJSON =
String
-> (Object -> Parser AwsIamPermissionsBoundary)
-> Value
-> Parser AwsIamPermissionsBoundary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsIamPermissionsBoundary"
( \Object
x ->
Maybe Text -> Maybe Text -> AwsIamPermissionsBoundary
AwsIamPermissionsBoundary'
(Maybe Text -> Maybe Text -> AwsIamPermissionsBoundary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsIamPermissionsBoundary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PermissionsBoundaryType")
Parser (Maybe Text -> AwsIamPermissionsBoundary)
-> Parser (Maybe Text) -> Parser AwsIamPermissionsBoundary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PermissionsBoundaryArn")
)
instance Prelude.Hashable AwsIamPermissionsBoundary
instance Prelude.NFData AwsIamPermissionsBoundary
instance Core.ToJSON AwsIamPermissionsBoundary where
toJSON :: AwsIamPermissionsBoundary -> Value
toJSON AwsIamPermissionsBoundary' {Maybe Text
permissionsBoundaryArn :: Maybe Text
permissionsBoundaryType :: Maybe Text
$sel:permissionsBoundaryArn:AwsIamPermissionsBoundary' :: AwsIamPermissionsBoundary -> Maybe Text
$sel:permissionsBoundaryType:AwsIamPermissionsBoundary' :: AwsIamPermissionsBoundary -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PermissionsBoundaryType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
permissionsBoundaryType,
(Text
"PermissionsBoundaryArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
permissionsBoundaryArn
]
)