{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data RdsDbInstance = RdsDbInstance'
{
RdsDbInstance -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
dbInstanceIdentifier :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
dbPassword :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
dbUser :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Bool
missingOnRds :: Prelude.Maybe Prelude.Bool,
RdsDbInstance -> Maybe Text
rdsDbInstanceArn :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
RdsDbInstance -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text
}
deriving (RdsDbInstance -> RdsDbInstance -> Bool
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]
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
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. 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'
{ $sel:address:RdsDbInstance' :: Maybe Text
address = forall a. Maybe a
Prelude.Nothing,
$sel:dbInstanceIdentifier:RdsDbInstance' :: Maybe Text
dbInstanceIdentifier = forall a. Maybe a
Prelude.Nothing,
$sel:dbPassword:RdsDbInstance' :: Maybe Text
dbPassword = forall a. Maybe a
Prelude.Nothing,
$sel:dbUser:RdsDbInstance' :: Maybe Text
dbUser = forall a. Maybe a
Prelude.Nothing,
$sel:engine:RdsDbInstance' :: Maybe Text
engine = forall a. Maybe a
Prelude.Nothing,
$sel:missingOnRds:RdsDbInstance' :: Maybe Bool
missingOnRds = forall a. Maybe a
Prelude.Nothing,
$sel:rdsDbInstanceArn:RdsDbInstance' :: Maybe Text
rdsDbInstanceArn = forall a. Maybe a
Prelude.Nothing,
$sel:region:RdsDbInstance' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
$sel:stackId:RdsDbInstance' :: Maybe Text
stackId = forall a. Maybe a
Prelude.Nothing
}
rdsDbInstance_address :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_address :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_address = 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 :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_dbInstanceIdentifier = 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_dbPassword :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_dbPassword :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_dbPassword = 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)
rdsDbInstance_dbUser :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_dbUser :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_dbUser = 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_engine :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_engine :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_engine = 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_missingOnRds :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Bool)
rdsDbInstance_missingOnRds :: Lens' RdsDbInstance (Maybe Bool)
rdsDbInstance_missingOnRds = 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_rdsDbInstanceArn :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_rdsDbInstanceArn :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_rdsDbInstanceArn = 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_region :: Lens.Lens' RdsDbInstance (Prelude.Maybe Prelude.Text)
rdsDbInstance_region :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_region = 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 :: Lens' RdsDbInstance (Maybe Text)
rdsDbInstance_stackId = 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)
instance Data.FromJSON RdsDbInstance where
parseJSON :: Value -> Parser RdsDbInstance
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RdsDbInstance"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RdsDbInstance
RdsDbInstance'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Address")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DbInstanceIdentifier")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DbPassword")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DbUser")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Engine")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MissingOnRds")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RdsDbInstanceArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Region")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StackId")
)
instance Prelude.Hashable RdsDbInstance where
hashWithSalt :: Int -> RdsDbInstance -> Int
hashWithSalt Int
_salt RdsDbInstance' {Maybe Bool
Maybe Text
stackId :: Maybe Text
region :: Maybe Text
rdsDbInstanceArn :: Maybe Text
missingOnRds :: Maybe Bool
engine :: Maybe Text
dbUser :: Maybe Text
dbPassword :: Maybe Text
dbInstanceIdentifier :: Maybe Text
address :: Maybe Text
$sel:stackId:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:region:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:rdsDbInstanceArn:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:missingOnRds:RdsDbInstance' :: RdsDbInstance -> Maybe Bool
$sel:engine:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:dbUser:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:dbPassword:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:dbInstanceIdentifier:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:address:RdsDbInstance' :: RdsDbInstance -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
address
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbInstanceIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbPassword
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbUser
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engine
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
missingOnRds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rdsDbInstanceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackId
instance Prelude.NFData RdsDbInstance where
rnf :: RdsDbInstance -> ()
rnf RdsDbInstance' {Maybe Bool
Maybe Text
stackId :: Maybe Text
region :: Maybe Text
rdsDbInstanceArn :: Maybe Text
missingOnRds :: Maybe Bool
engine :: Maybe Text
dbUser :: Maybe Text
dbPassword :: Maybe Text
dbInstanceIdentifier :: Maybe Text
address :: Maybe Text
$sel:stackId:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:region:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:rdsDbInstanceArn:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:missingOnRds:RdsDbInstance' :: RdsDbInstance -> Maybe Bool
$sel:engine:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:dbUser:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:dbPassword:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:dbInstanceIdentifier:RdsDbInstance' :: RdsDbInstance -> Maybe Text
$sel:address:RdsDbInstance' :: RdsDbInstance -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
address
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbInstanceIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbPassword
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbUser
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engine
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
missingOnRds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rdsDbInstanceArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackId