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