{-# 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.Redshift.Types.ClusterIamRole where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data ClusterIamRole = ClusterIamRole'
{
ClusterIamRole -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
ClusterIamRole -> Maybe Text
applyStatus :: Prelude.Maybe Prelude.Text
}
deriving (ClusterIamRole -> ClusterIamRole -> Bool
(ClusterIamRole -> ClusterIamRole -> Bool)
-> (ClusterIamRole -> ClusterIamRole -> Bool) -> Eq ClusterIamRole
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterIamRole -> ClusterIamRole -> Bool
$c/= :: ClusterIamRole -> ClusterIamRole -> Bool
== :: ClusterIamRole -> ClusterIamRole -> Bool
$c== :: ClusterIamRole -> ClusterIamRole -> Bool
Prelude.Eq, ReadPrec [ClusterIamRole]
ReadPrec ClusterIamRole
Int -> ReadS ClusterIamRole
ReadS [ClusterIamRole]
(Int -> ReadS ClusterIamRole)
-> ReadS [ClusterIamRole]
-> ReadPrec ClusterIamRole
-> ReadPrec [ClusterIamRole]
-> Read ClusterIamRole
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterIamRole]
$creadListPrec :: ReadPrec [ClusterIamRole]
readPrec :: ReadPrec ClusterIamRole
$creadPrec :: ReadPrec ClusterIamRole
readList :: ReadS [ClusterIamRole]
$creadList :: ReadS [ClusterIamRole]
readsPrec :: Int -> ReadS ClusterIamRole
$creadsPrec :: Int -> ReadS ClusterIamRole
Prelude.Read, Int -> ClusterIamRole -> ShowS
[ClusterIamRole] -> ShowS
ClusterIamRole -> String
(Int -> ClusterIamRole -> ShowS)
-> (ClusterIamRole -> String)
-> ([ClusterIamRole] -> ShowS)
-> Show ClusterIamRole
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterIamRole] -> ShowS
$cshowList :: [ClusterIamRole] -> ShowS
show :: ClusterIamRole -> String
$cshow :: ClusterIamRole -> String
showsPrec :: Int -> ClusterIamRole -> ShowS
$cshowsPrec :: Int -> ClusterIamRole -> ShowS
Prelude.Show, (forall x. ClusterIamRole -> Rep ClusterIamRole x)
-> (forall x. Rep ClusterIamRole x -> ClusterIamRole)
-> Generic ClusterIamRole
forall x. Rep ClusterIamRole x -> ClusterIamRole
forall x. ClusterIamRole -> Rep ClusterIamRole x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterIamRole x -> ClusterIamRole
$cfrom :: forall x. ClusterIamRole -> Rep ClusterIamRole x
Prelude.Generic)
newClusterIamRole ::
ClusterIamRole
newClusterIamRole :: ClusterIamRole
newClusterIamRole =
ClusterIamRole' :: Maybe Text -> Maybe Text -> ClusterIamRole
ClusterIamRole'
{ $sel:iamRoleArn:ClusterIamRole' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applyStatus:ClusterIamRole' :: Maybe Text
applyStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
clusterIamRole_iamRoleArn :: Lens.Lens' ClusterIamRole (Prelude.Maybe Prelude.Text)
clusterIamRole_iamRoleArn :: (Maybe Text -> f (Maybe Text))
-> ClusterIamRole -> f ClusterIamRole
clusterIamRole_iamRoleArn = (ClusterIamRole -> Maybe Text)
-> (ClusterIamRole -> Maybe Text -> ClusterIamRole)
-> Lens ClusterIamRole ClusterIamRole (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterIamRole' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:ClusterIamRole' :: ClusterIamRole -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: ClusterIamRole
s@ClusterIamRole' {} Maybe Text
a -> ClusterIamRole
s {$sel:iamRoleArn:ClusterIamRole' :: Maybe Text
iamRoleArn = Maybe Text
a} :: ClusterIamRole)
clusterIamRole_applyStatus :: Lens.Lens' ClusterIamRole (Prelude.Maybe Prelude.Text)
clusterIamRole_applyStatus :: (Maybe Text -> f (Maybe Text))
-> ClusterIamRole -> f ClusterIamRole
clusterIamRole_applyStatus = (ClusterIamRole -> Maybe Text)
-> (ClusterIamRole -> Maybe Text -> ClusterIamRole)
-> Lens ClusterIamRole ClusterIamRole (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterIamRole' {Maybe Text
applyStatus :: Maybe Text
$sel:applyStatus:ClusterIamRole' :: ClusterIamRole -> Maybe Text
applyStatus} -> Maybe Text
applyStatus) (\s :: ClusterIamRole
s@ClusterIamRole' {} Maybe Text
a -> ClusterIamRole
s {$sel:applyStatus:ClusterIamRole' :: Maybe Text
applyStatus = Maybe Text
a} :: ClusterIamRole)
instance Core.FromXML ClusterIamRole where
parseXML :: [Node] -> Either String ClusterIamRole
parseXML [Node]
x =
Maybe Text -> Maybe Text -> ClusterIamRole
ClusterIamRole'
(Maybe Text -> Maybe Text -> ClusterIamRole)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> ClusterIamRole)
forall (f :: * -> *) a b. Functor 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
"IamRoleArn")
Either String (Maybe Text -> ClusterIamRole)
-> Either String (Maybe Text) -> Either String ClusterIamRole
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
"ApplyStatus")
instance Prelude.Hashable ClusterIamRole
instance Prelude.NFData ClusterIamRole