{-# 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.RDS.Types.DBClusterRole where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DBClusterRole = DBClusterRole'
{
DBClusterRole -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
DBClusterRole -> Maybe Text
featureName :: Prelude.Maybe Prelude.Text,
DBClusterRole -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
}
deriving (DBClusterRole -> DBClusterRole -> Bool
(DBClusterRole -> DBClusterRole -> Bool)
-> (DBClusterRole -> DBClusterRole -> Bool) -> Eq DBClusterRole
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterRole -> DBClusterRole -> Bool
$c/= :: DBClusterRole -> DBClusterRole -> Bool
== :: DBClusterRole -> DBClusterRole -> Bool
$c== :: DBClusterRole -> DBClusterRole -> Bool
Prelude.Eq, ReadPrec [DBClusterRole]
ReadPrec DBClusterRole
Int -> ReadS DBClusterRole
ReadS [DBClusterRole]
(Int -> ReadS DBClusterRole)
-> ReadS [DBClusterRole]
-> ReadPrec DBClusterRole
-> ReadPrec [DBClusterRole]
-> Read DBClusterRole
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterRole]
$creadListPrec :: ReadPrec [DBClusterRole]
readPrec :: ReadPrec DBClusterRole
$creadPrec :: ReadPrec DBClusterRole
readList :: ReadS [DBClusterRole]
$creadList :: ReadS [DBClusterRole]
readsPrec :: Int -> ReadS DBClusterRole
$creadsPrec :: Int -> ReadS DBClusterRole
Prelude.Read, Int -> DBClusterRole -> ShowS
[DBClusterRole] -> ShowS
DBClusterRole -> String
(Int -> DBClusterRole -> ShowS)
-> (DBClusterRole -> String)
-> ([DBClusterRole] -> ShowS)
-> Show DBClusterRole
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterRole] -> ShowS
$cshowList :: [DBClusterRole] -> ShowS
show :: DBClusterRole -> String
$cshow :: DBClusterRole -> String
showsPrec :: Int -> DBClusterRole -> ShowS
$cshowsPrec :: Int -> DBClusterRole -> ShowS
Prelude.Show, (forall x. DBClusterRole -> Rep DBClusterRole x)
-> (forall x. Rep DBClusterRole x -> DBClusterRole)
-> Generic DBClusterRole
forall x. Rep DBClusterRole x -> DBClusterRole
forall x. DBClusterRole -> Rep DBClusterRole x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBClusterRole x -> DBClusterRole
$cfrom :: forall x. DBClusterRole -> Rep DBClusterRole x
Prelude.Generic)
newDBClusterRole ::
DBClusterRole
newDBClusterRole :: DBClusterRole
newDBClusterRole =
DBClusterRole' :: Maybe Text -> Maybe Text -> Maybe Text -> DBClusterRole
DBClusterRole'
{ $sel:status:DBClusterRole' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:featureName:DBClusterRole' :: Maybe Text
featureName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:DBClusterRole' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dbClusterRole_status :: Lens.Lens' DBClusterRole (Prelude.Maybe Prelude.Text)
dbClusterRole_status :: (Maybe Text -> f (Maybe Text)) -> DBClusterRole -> f DBClusterRole
dbClusterRole_status = (DBClusterRole -> Maybe Text)
-> (DBClusterRole -> Maybe Text -> DBClusterRole)
-> Lens DBClusterRole DBClusterRole (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterRole' {Maybe Text
status :: Maybe Text
$sel:status:DBClusterRole' :: DBClusterRole -> Maybe Text
status} -> Maybe Text
status) (\s :: DBClusterRole
s@DBClusterRole' {} Maybe Text
a -> DBClusterRole
s {$sel:status:DBClusterRole' :: Maybe Text
status = Maybe Text
a} :: DBClusterRole)
dbClusterRole_featureName :: Lens.Lens' DBClusterRole (Prelude.Maybe Prelude.Text)
dbClusterRole_featureName :: (Maybe Text -> f (Maybe Text)) -> DBClusterRole -> f DBClusterRole
dbClusterRole_featureName = (DBClusterRole -> Maybe Text)
-> (DBClusterRole -> Maybe Text -> DBClusterRole)
-> Lens DBClusterRole DBClusterRole (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterRole' {Maybe Text
featureName :: Maybe Text
$sel:featureName:DBClusterRole' :: DBClusterRole -> Maybe Text
featureName} -> Maybe Text
featureName) (\s :: DBClusterRole
s@DBClusterRole' {} Maybe Text
a -> DBClusterRole
s {$sel:featureName:DBClusterRole' :: Maybe Text
featureName = Maybe Text
a} :: DBClusterRole)
dbClusterRole_roleArn :: Lens.Lens' DBClusterRole (Prelude.Maybe Prelude.Text)
dbClusterRole_roleArn :: (Maybe Text -> f (Maybe Text)) -> DBClusterRole -> f DBClusterRole
dbClusterRole_roleArn = (DBClusterRole -> Maybe Text)
-> (DBClusterRole -> Maybe Text -> DBClusterRole)
-> Lens DBClusterRole DBClusterRole (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterRole' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DBClusterRole' :: DBClusterRole -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DBClusterRole
s@DBClusterRole' {} Maybe Text
a -> DBClusterRole
s {$sel:roleArn:DBClusterRole' :: Maybe Text
roleArn = Maybe Text
a} :: DBClusterRole)
instance Core.FromXML DBClusterRole where
parseXML :: [Node] -> Either String DBClusterRole
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> DBClusterRole
DBClusterRole'
(Maybe Text -> Maybe Text -> Maybe Text -> DBClusterRole)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> DBClusterRole)
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
"Status")
Either String (Maybe Text -> Maybe Text -> DBClusterRole)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> DBClusterRole)
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
"FeatureName")
Either String (Maybe Text -> DBClusterRole)
-> Either String (Maybe Text) -> Either String DBClusterRole
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
"RoleArn")
instance Prelude.Hashable DBClusterRole
instance Prelude.NFData DBClusterRole