{-# 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.OpsWorks.Types.RdsDbInstance where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RdsDbInstance = RdsDbInstance'
{
RdsDbInstance -> Maybe Text
rdsDbInstanceArn :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
dbUser :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Bool
missingOnRds :: Prelude.Maybe Prelude.Bool,
RdsDbInstance -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
dbInstanceIdentifier :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
dbPassword :: Prelude.Maybe Prelude.Text
}
deriving (RdsDbInstance -> RdsDbInstance -> Bool
(RdsDbInstance -> RdsDbInstance -> Bool)
-> (RdsDbInstance -> RdsDbInstance -> Bool) -> Eq RdsDbInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RdsDbInstance -> RdsDbInstance -> Bool
$c/= :: RdsDbInstance -> RdsDbInstance -> Bool
== :: RdsDbInstance -> RdsDbInstance -> Bool
$c== :: RdsDbInstance -> RdsDbInstance -> Bool
Prelude.Eq, ReadPrec [RdsDbInstance]
ReadPrec RdsDbInstance
Int -> ReadS RdsDbInstance
ReadS [RdsDbInstance]
(Int -> ReadS RdsDbInstance)
-> ReadS [RdsDbInstance]
-> ReadPrec RdsDbInstance
-> ReadPrec [RdsDbInstance]
-> Read RdsDbInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RdsDbInstance]
$creadListPrec :: ReadPrec [RdsDbInstance]
readPrec :: ReadPrec RdsDbInstance
$creadPrec :: ReadPrec RdsDbInstance
readList :: ReadS [RdsDbInstance]
$creadList :: ReadS [RdsDbInstance]
readsPrec :: Int -> ReadS RdsDbInstance
$creadsPrec :: Int -> ReadS RdsDbInstance
Prelude.Read, Int -> RdsDbInstance -> ShowS
[RdsDbInstance] -> ShowS
RdsDbInstance -> String
(Int -> RdsDbInstance -> ShowS)
-> (RdsDbInstance -> String)
-> ([RdsDbInstance] -> ShowS)
-> Show RdsDbInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RdsDbInstance] -> ShowS
$cshowList :: [RdsDbInstance] -> ShowS
show :: RdsDbInstance -> String
$cshow :: RdsDbInstance -> String
showsPrec :: Int -> RdsDbInstance -> ShowS
$cshowsPrec :: Int -> RdsDbInstance -> ShowS
Prelude.Show, (forall x. RdsDbInstance -> Rep RdsDbInstance x)
-> (forall x. Rep RdsDbInstance x -> RdsDbInstance)
-> Generic RdsDbInstance
forall x. Rep RdsDbInstance x -> RdsDbInstance
forall x. RdsDbInstance -> Rep RdsDbInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RdsDbInstance x -> RdsDbInstance
$cfrom :: forall x. RdsDbInstance -> Rep RdsDbInstance x
Prelude.Generic)
newRdsDbInstance ::
RdsDbInstance
newRdsDbInstance :: RdsDbInstance
newRdsDbInstance =
RdsDbInstance' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance
RdsDbInstance'
{ $sel:rdsDbInstanceArn:RdsDbInstance' :: Maybe Text
rdsDbInstanceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbUser:RdsDbInstance' :: Maybe Text
dbUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:missingOnRds:RdsDbInstance' :: Maybe Bool
missingOnRds = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:engine:RdsDbInstance' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:address:RdsDbInstance' :: Maybe Text
address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbInstanceIdentifier:RdsDbInstance' :: Maybe Text
dbInstanceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:region:RdsDbInstance' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stackId:RdsDbInstance' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbPassword:RdsDbInstance' :: Maybe Text
dbPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
rdsDbInstance_rdsDbInstanceArn :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_rdsDbInstanceArn :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_rdsDbInstanceArn = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
rdsDbInstanceArn :: Maybe Text
$sel:rdsDbInstanceArn:RdsDbInstance' :: RdsDbInstance -> Maybe Text
rdsDbInstanceArn} -> Maybe Text
rdsDbInstanceArn) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:rdsDbInstanceArn:RdsDbInstance' :: Maybe Text
rdsDbInstanceArn = Maybe Text
a} :: RdsDbInstance)
rdsDbInstance_dbUser :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_dbUser :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_dbUser = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
dbUser :: Maybe Text
$sel:dbUser:RdsDbInstance' :: RdsDbInstance -> Maybe Text
dbUser} -> Maybe Text
dbUser) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:dbUser:RdsDbInstance' :: Maybe Text
dbUser = Maybe Text
a} :: RdsDbInstance)
rdsDbInstance_missingOnRds :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Bool)
rdsDbInstance_missingOnRds :: (Maybe Bool -> f (Maybe Bool)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_missingOnRds = (RdsDbInstance -> Maybe Bool)
-> (RdsDbInstance -> Maybe Bool -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Bool
missingOnRds :: Maybe Bool
$sel:missingOnRds:RdsDbInstance' :: RdsDbInstance -> Maybe Bool
missingOnRds} -> Maybe Bool
missingOnRds) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Bool
a -> RdsDbInstance
s {$sel:missingOnRds:RdsDbInstance' :: Maybe Bool
missingOnRds = Maybe Bool
a} :: RdsDbInstance)
rdsDbInstance_engine :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_engine :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_engine = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
engine :: Maybe Text
$sel:engine:RdsDbInstance' :: RdsDbInstance -> Maybe Text
engine} -> Maybe Text
engine) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:engine:RdsDbInstance' :: Maybe Text
engine = Maybe Text
a} :: RdsDbInstance)
rdsDbInstance_address :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_address :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_address = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
address :: Maybe Text
$sel:address:RdsDbInstance' :: RdsDbInstance -> Maybe Text
address} -> Maybe Text
address) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:address:RdsDbInstance' :: Maybe Text
address = Maybe Text
a} :: RdsDbInstance)
rdsDbInstance_dbInstanceIdentifier :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_dbInstanceIdentifier :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_dbInstanceIdentifier = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
dbInstanceIdentifier :: Maybe Text
$sel:dbInstanceIdentifier:RdsDbInstance' :: RdsDbInstance -> Maybe Text
dbInstanceIdentifier} -> Maybe Text
dbInstanceIdentifier) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:dbInstanceIdentifier:RdsDbInstance' :: Maybe Text
dbInstanceIdentifier = Maybe Text
a} :: RdsDbInstance)
rdsDbInstance_region :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_region :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_region = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
region :: Maybe Text
$sel:region:RdsDbInstance' :: RdsDbInstance -> Maybe Text
region} -> Maybe Text
region) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:region:RdsDbInstance' :: Maybe Text
region = Maybe Text
a} :: RdsDbInstance)
rdsDbInstance_stackId :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_stackId :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_stackId = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
stackId :: Maybe Text
$sel:stackId:RdsDbInstance' :: RdsDbInstance -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:stackId:RdsDbInstance' :: Maybe Text
stackId = Maybe Text
a} :: RdsDbInstance)
rdsDbInstance_dbPassword :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_dbPassword :: (Maybe Text -> f (Maybe Text)) -> RdsDbInstance -> f RdsDbInstance
rdsDbInstance_dbPassword = (RdsDbInstance -> Maybe Text)
-> (RdsDbInstance -> Maybe Text -> RdsDbInstance)
-> Lens RdsDbInstance RdsDbInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbInstance' {Maybe Text
dbPassword :: Maybe Text
$sel:dbPassword:RdsDbInstance' :: RdsDbInstance -> Maybe Text
dbPassword} -> Maybe Text
dbPassword) (\s :: RdsDbInstance
s@RdsDbInstance' {} Maybe Text
a -> RdsDbInstance
s {$sel:dbPassword:RdsDbInstance' :: Maybe Text
dbPassword = Maybe Text
a} :: RdsDbInstance)
instance Core.FromJSON RdsDbInstance where
parseJSON :: Value -> Parser RdsDbInstance
parseJSON =
String
-> (Object -> Parser RdsDbInstance)
-> Value
-> Parser RdsDbInstance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RdsDbInstance"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance
RdsDbInstance'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RdsDbInstanceArn")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DbUser")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MissingOnRds")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Engine")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> RdsDbInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Address")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> RdsDbInstance)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> RdsDbInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DbInstanceIdentifier")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> RdsDbInstance)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RdsDbInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Region")
Parser (Maybe Text -> Maybe Text -> RdsDbInstance)
-> Parser (Maybe Text) -> Parser (Maybe Text -> RdsDbInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StackId")
Parser (Maybe Text -> RdsDbInstance)
-> Parser (Maybe Text) -> Parser RdsDbInstance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DbPassword")
)
instance Prelude.Hashable RdsDbInstance
instance Prelude.NFData RdsDbInstance