{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data ClusterIamRole = ClusterIamRole'
{
ClusterIamRole -> Maybe Text
applyStatus :: Prelude.Maybe Prelude.Text,
ClusterIamRole -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text
}
deriving (ClusterIamRole -> ClusterIamRole -> Bool
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]
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
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. 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'
{ $sel:applyStatus:ClusterIamRole' :: Maybe Text
applyStatus = forall a. Maybe a
Prelude.Nothing,
$sel:iamRoleArn:ClusterIamRole' :: Maybe Text
iamRoleArn = forall a. Maybe a
Prelude.Nothing
}
clusterIamRole_applyStatus :: Lens.Lens' ClusterIamRole (Prelude.Maybe Prelude.Text)
clusterIamRole_applyStatus :: Lens' ClusterIamRole (Maybe Text)
clusterIamRole_applyStatus = 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)
clusterIamRole_iamRoleArn :: Lens.Lens' ClusterIamRole (Prelude.Maybe Prelude.Text)
clusterIamRole_iamRoleArn :: Lens' ClusterIamRole (Maybe Text)
clusterIamRole_iamRoleArn = 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)
instance Data.FromXML ClusterIamRole where
parseXML :: [Node] -> Either String ClusterIamRole
parseXML [Node]
x =
Maybe Text -> Maybe Text -> ClusterIamRole
ClusterIamRole'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ApplyStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"IamRoleArn")
instance Prelude.Hashable ClusterIamRole where
hashWithSalt :: Int -> ClusterIamRole -> Int
hashWithSalt Int
_salt ClusterIamRole' {Maybe Text
iamRoleArn :: Maybe Text
applyStatus :: Maybe Text
$sel:iamRoleArn:ClusterIamRole' :: ClusterIamRole -> Maybe Text
$sel:applyStatus:ClusterIamRole' :: ClusterIamRole -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
applyStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
iamRoleArn
instance Prelude.NFData ClusterIamRole where
rnf :: ClusterIamRole -> ()
rnf ClusterIamRole' {Maybe Text
iamRoleArn :: Maybe Text
applyStatus :: Maybe Text
$sel:iamRoleArn:ClusterIamRole' :: ClusterIamRole -> Maybe Text
$sel:applyStatus:ClusterIamRole' :: ClusterIamRole -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applyStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
iamRoleArn