{-# 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.IAM.Types.AttachedPermissionsBoundary where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.PermissionsBoundaryAttachmentType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AttachedPermissionsBoundary = AttachedPermissionsBoundary'
{
AttachedPermissionsBoundary
-> Maybe PermissionsBoundaryAttachmentType
permissionsBoundaryType :: Prelude.Maybe PermissionsBoundaryAttachmentType,
AttachedPermissionsBoundary -> Maybe Text
permissionsBoundaryArn :: Prelude.Maybe Prelude.Text
}
deriving (AttachedPermissionsBoundary -> AttachedPermissionsBoundary -> Bool
(AttachedPermissionsBoundary
-> AttachedPermissionsBoundary -> Bool)
-> (AttachedPermissionsBoundary
-> AttachedPermissionsBoundary -> Bool)
-> Eq AttachedPermissionsBoundary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachedPermissionsBoundary -> AttachedPermissionsBoundary -> Bool
$c/= :: AttachedPermissionsBoundary -> AttachedPermissionsBoundary -> Bool
== :: AttachedPermissionsBoundary -> AttachedPermissionsBoundary -> Bool
$c== :: AttachedPermissionsBoundary -> AttachedPermissionsBoundary -> Bool
Prelude.Eq, ReadPrec [AttachedPermissionsBoundary]
ReadPrec AttachedPermissionsBoundary
Int -> ReadS AttachedPermissionsBoundary
ReadS [AttachedPermissionsBoundary]
(Int -> ReadS AttachedPermissionsBoundary)
-> ReadS [AttachedPermissionsBoundary]
-> ReadPrec AttachedPermissionsBoundary
-> ReadPrec [AttachedPermissionsBoundary]
-> Read AttachedPermissionsBoundary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachedPermissionsBoundary]
$creadListPrec :: ReadPrec [AttachedPermissionsBoundary]
readPrec :: ReadPrec AttachedPermissionsBoundary
$creadPrec :: ReadPrec AttachedPermissionsBoundary
readList :: ReadS [AttachedPermissionsBoundary]
$creadList :: ReadS [AttachedPermissionsBoundary]
readsPrec :: Int -> ReadS AttachedPermissionsBoundary
$creadsPrec :: Int -> ReadS AttachedPermissionsBoundary
Prelude.Read, Int -> AttachedPermissionsBoundary -> ShowS
[AttachedPermissionsBoundary] -> ShowS
AttachedPermissionsBoundary -> String
(Int -> AttachedPermissionsBoundary -> ShowS)
-> (AttachedPermissionsBoundary -> String)
-> ([AttachedPermissionsBoundary] -> ShowS)
-> Show AttachedPermissionsBoundary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachedPermissionsBoundary] -> ShowS
$cshowList :: [AttachedPermissionsBoundary] -> ShowS
show :: AttachedPermissionsBoundary -> String
$cshow :: AttachedPermissionsBoundary -> String
showsPrec :: Int -> AttachedPermissionsBoundary -> ShowS
$cshowsPrec :: Int -> AttachedPermissionsBoundary -> ShowS
Prelude.Show, (forall x.
AttachedPermissionsBoundary -> Rep AttachedPermissionsBoundary x)
-> (forall x.
Rep AttachedPermissionsBoundary x -> AttachedPermissionsBoundary)
-> Generic AttachedPermissionsBoundary
forall x.
Rep AttachedPermissionsBoundary x -> AttachedPermissionsBoundary
forall x.
AttachedPermissionsBoundary -> Rep AttachedPermissionsBoundary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AttachedPermissionsBoundary x -> AttachedPermissionsBoundary
$cfrom :: forall x.
AttachedPermissionsBoundary -> Rep AttachedPermissionsBoundary x
Prelude.Generic)
newAttachedPermissionsBoundary ::
AttachedPermissionsBoundary
newAttachedPermissionsBoundary :: AttachedPermissionsBoundary
newAttachedPermissionsBoundary =
AttachedPermissionsBoundary' :: Maybe PermissionsBoundaryAttachmentType
-> Maybe Text -> AttachedPermissionsBoundary
AttachedPermissionsBoundary'
{ $sel:permissionsBoundaryType:AttachedPermissionsBoundary' :: Maybe PermissionsBoundaryAttachmentType
permissionsBoundaryType =
Maybe PermissionsBoundaryAttachmentType
forall a. Maybe a
Prelude.Nothing,
$sel:permissionsBoundaryArn:AttachedPermissionsBoundary' :: Maybe Text
permissionsBoundaryArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
attachedPermissionsBoundary_permissionsBoundaryType :: Lens.Lens' AttachedPermissionsBoundary (Prelude.Maybe PermissionsBoundaryAttachmentType)
attachedPermissionsBoundary_permissionsBoundaryType :: (Maybe PermissionsBoundaryAttachmentType
-> f (Maybe PermissionsBoundaryAttachmentType))
-> AttachedPermissionsBoundary -> f AttachedPermissionsBoundary
attachedPermissionsBoundary_permissionsBoundaryType = (AttachedPermissionsBoundary
-> Maybe PermissionsBoundaryAttachmentType)
-> (AttachedPermissionsBoundary
-> Maybe PermissionsBoundaryAttachmentType
-> AttachedPermissionsBoundary)
-> Lens
AttachedPermissionsBoundary
AttachedPermissionsBoundary
(Maybe PermissionsBoundaryAttachmentType)
(Maybe PermissionsBoundaryAttachmentType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachedPermissionsBoundary' {Maybe PermissionsBoundaryAttachmentType
permissionsBoundaryType :: Maybe PermissionsBoundaryAttachmentType
$sel:permissionsBoundaryType:AttachedPermissionsBoundary' :: AttachedPermissionsBoundary
-> Maybe PermissionsBoundaryAttachmentType
permissionsBoundaryType} -> Maybe PermissionsBoundaryAttachmentType
permissionsBoundaryType) (\s :: AttachedPermissionsBoundary
s@AttachedPermissionsBoundary' {} Maybe PermissionsBoundaryAttachmentType
a -> AttachedPermissionsBoundary
s {$sel:permissionsBoundaryType:AttachedPermissionsBoundary' :: Maybe PermissionsBoundaryAttachmentType
permissionsBoundaryType = Maybe PermissionsBoundaryAttachmentType
a} :: AttachedPermissionsBoundary)
attachedPermissionsBoundary_permissionsBoundaryArn :: Lens.Lens' AttachedPermissionsBoundary (Prelude.Maybe Prelude.Text)
attachedPermissionsBoundary_permissionsBoundaryArn :: (Maybe Text -> f (Maybe Text))
-> AttachedPermissionsBoundary -> f AttachedPermissionsBoundary
attachedPermissionsBoundary_permissionsBoundaryArn = (AttachedPermissionsBoundary -> Maybe Text)
-> (AttachedPermissionsBoundary
-> Maybe Text -> AttachedPermissionsBoundary)
-> Lens
AttachedPermissionsBoundary
AttachedPermissionsBoundary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachedPermissionsBoundary' {Maybe Text
permissionsBoundaryArn :: Maybe Text
$sel:permissionsBoundaryArn:AttachedPermissionsBoundary' :: AttachedPermissionsBoundary -> Maybe Text
permissionsBoundaryArn} -> Maybe Text
permissionsBoundaryArn) (\s :: AttachedPermissionsBoundary
s@AttachedPermissionsBoundary' {} Maybe Text
a -> AttachedPermissionsBoundary
s {$sel:permissionsBoundaryArn:AttachedPermissionsBoundary' :: Maybe Text
permissionsBoundaryArn = Maybe Text
a} :: AttachedPermissionsBoundary)
instance Core.FromXML AttachedPermissionsBoundary where
parseXML :: [Node] -> Either String AttachedPermissionsBoundary
parseXML [Node]
x =
Maybe PermissionsBoundaryAttachmentType
-> Maybe Text -> AttachedPermissionsBoundary
AttachedPermissionsBoundary'
(Maybe PermissionsBoundaryAttachmentType
-> Maybe Text -> AttachedPermissionsBoundary)
-> Either String (Maybe PermissionsBoundaryAttachmentType)
-> Either String (Maybe Text -> AttachedPermissionsBoundary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe PermissionsBoundaryAttachmentType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PermissionsBoundaryType")
Either String (Maybe Text -> AttachedPermissionsBoundary)
-> Either String (Maybe Text)
-> Either String AttachedPermissionsBoundary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PermissionsBoundaryArn")
instance Prelude.Hashable AttachedPermissionsBoundary
instance Prelude.NFData AttachedPermissionsBoundary