{-# 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.InstallationMedia where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.InstallationMediaFailureCause
data InstallationMedia = InstallationMedia'
{
InstallationMedia -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
InstallationMedia -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
InstallationMedia -> Maybe Text
installationMediaId :: Prelude.Maybe Prelude.Text,
InstallationMedia -> Maybe Text
engineInstallationMediaPath :: Prelude.Maybe Prelude.Text,
InstallationMedia -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
InstallationMedia -> Maybe Text
oSInstallationMediaPath :: Prelude.Maybe Prelude.Text,
InstallationMedia -> Maybe Text
customAvailabilityZoneId :: Prelude.Maybe Prelude.Text,
InstallationMedia -> Maybe InstallationMediaFailureCause
failureCause :: Prelude.Maybe InstallationMediaFailureCause
}
deriving (InstallationMedia -> InstallationMedia -> Bool
(InstallationMedia -> InstallationMedia -> Bool)
-> (InstallationMedia -> InstallationMedia -> Bool)
-> Eq InstallationMedia
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstallationMedia -> InstallationMedia -> Bool
$c/= :: InstallationMedia -> InstallationMedia -> Bool
== :: InstallationMedia -> InstallationMedia -> Bool
$c== :: InstallationMedia -> InstallationMedia -> Bool
Prelude.Eq, ReadPrec [InstallationMedia]
ReadPrec InstallationMedia
Int -> ReadS InstallationMedia
ReadS [InstallationMedia]
(Int -> ReadS InstallationMedia)
-> ReadS [InstallationMedia]
-> ReadPrec InstallationMedia
-> ReadPrec [InstallationMedia]
-> Read InstallationMedia
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstallationMedia]
$creadListPrec :: ReadPrec [InstallationMedia]
readPrec :: ReadPrec InstallationMedia
$creadPrec :: ReadPrec InstallationMedia
readList :: ReadS [InstallationMedia]
$creadList :: ReadS [InstallationMedia]
readsPrec :: Int -> ReadS InstallationMedia
$creadsPrec :: Int -> ReadS InstallationMedia
Prelude.Read, Int -> InstallationMedia -> ShowS
[InstallationMedia] -> ShowS
InstallationMedia -> String
(Int -> InstallationMedia -> ShowS)
-> (InstallationMedia -> String)
-> ([InstallationMedia] -> ShowS)
-> Show InstallationMedia
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstallationMedia] -> ShowS
$cshowList :: [InstallationMedia] -> ShowS
show :: InstallationMedia -> String
$cshow :: InstallationMedia -> String
showsPrec :: Int -> InstallationMedia -> ShowS
$cshowsPrec :: Int -> InstallationMedia -> ShowS
Prelude.Show, (forall x. InstallationMedia -> Rep InstallationMedia x)
-> (forall x. Rep InstallationMedia x -> InstallationMedia)
-> Generic InstallationMedia
forall x. Rep InstallationMedia x -> InstallationMedia
forall x. InstallationMedia -> Rep InstallationMedia x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstallationMedia x -> InstallationMedia
$cfrom :: forall x. InstallationMedia -> Rep InstallationMedia x
Prelude.Generic)
newInstallationMedia ::
InstallationMedia
newInstallationMedia :: InstallationMedia
newInstallationMedia =
InstallationMedia' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia
InstallationMedia'
{ $sel:engineVersion:InstallationMedia' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:InstallationMedia' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:installationMediaId:InstallationMedia' :: Maybe Text
installationMediaId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engineInstallationMediaPath:InstallationMedia' :: Maybe Text
engineInstallationMediaPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engine:InstallationMedia' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:oSInstallationMediaPath:InstallationMedia' :: Maybe Text
oSInstallationMediaPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customAvailabilityZoneId:InstallationMedia' :: Maybe Text
customAvailabilityZoneId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:failureCause:InstallationMedia' :: Maybe InstallationMediaFailureCause
failureCause = Maybe InstallationMediaFailureCause
forall a. Maybe a
Prelude.Nothing
}
installationMedia_engineVersion :: Lens.Lens' InstallationMedia (Prelude.Maybe Prelude.Text)
installationMedia_engineVersion :: (Maybe Text -> f (Maybe Text))
-> InstallationMedia -> f InstallationMedia
installationMedia_engineVersion = (InstallationMedia -> Maybe Text)
-> (InstallationMedia -> Maybe Text -> InstallationMedia)
-> Lens
InstallationMedia InstallationMedia (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:InstallationMedia' :: InstallationMedia -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe Text
a -> InstallationMedia
s {$sel:engineVersion:InstallationMedia' :: Maybe Text
engineVersion = Maybe Text
a} :: InstallationMedia)
installationMedia_status :: Lens.Lens' InstallationMedia (Prelude.Maybe Prelude.Text)
installationMedia_status :: (Maybe Text -> f (Maybe Text))
-> InstallationMedia -> f InstallationMedia
installationMedia_status = (InstallationMedia -> Maybe Text)
-> (InstallationMedia -> Maybe Text -> InstallationMedia)
-> Lens
InstallationMedia InstallationMedia (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe Text
status :: Maybe Text
$sel:status:InstallationMedia' :: InstallationMedia -> Maybe Text
status} -> Maybe Text
status) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe Text
a -> InstallationMedia
s {$sel:status:InstallationMedia' :: Maybe Text
status = Maybe Text
a} :: InstallationMedia)
installationMedia_installationMediaId :: Lens.Lens' InstallationMedia (Prelude.Maybe Prelude.Text)
installationMedia_installationMediaId :: (Maybe Text -> f (Maybe Text))
-> InstallationMedia -> f InstallationMedia
installationMedia_installationMediaId = (InstallationMedia -> Maybe Text)
-> (InstallationMedia -> Maybe Text -> InstallationMedia)
-> Lens
InstallationMedia InstallationMedia (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe Text
installationMediaId :: Maybe Text
$sel:installationMediaId:InstallationMedia' :: InstallationMedia -> Maybe Text
installationMediaId} -> Maybe Text
installationMediaId) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe Text
a -> InstallationMedia
s {$sel:installationMediaId:InstallationMedia' :: Maybe Text
installationMediaId = Maybe Text
a} :: InstallationMedia)
installationMedia_engineInstallationMediaPath :: Lens.Lens' InstallationMedia (Prelude.Maybe Prelude.Text)
installationMedia_engineInstallationMediaPath :: (Maybe Text -> f (Maybe Text))
-> InstallationMedia -> f InstallationMedia
installationMedia_engineInstallationMediaPath = (InstallationMedia -> Maybe Text)
-> (InstallationMedia -> Maybe Text -> InstallationMedia)
-> Lens
InstallationMedia InstallationMedia (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe Text
engineInstallationMediaPath :: Maybe Text
$sel:engineInstallationMediaPath:InstallationMedia' :: InstallationMedia -> Maybe Text
engineInstallationMediaPath} -> Maybe Text
engineInstallationMediaPath) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe Text
a -> InstallationMedia
s {$sel:engineInstallationMediaPath:InstallationMedia' :: Maybe Text
engineInstallationMediaPath = Maybe Text
a} :: InstallationMedia)
installationMedia_engine :: Lens.Lens' InstallationMedia (Prelude.Maybe Prelude.Text)
installationMedia_engine :: (Maybe Text -> f (Maybe Text))
-> InstallationMedia -> f InstallationMedia
installationMedia_engine = (InstallationMedia -> Maybe Text)
-> (InstallationMedia -> Maybe Text -> InstallationMedia)
-> Lens
InstallationMedia InstallationMedia (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe Text
engine :: Maybe Text
$sel:engine:InstallationMedia' :: InstallationMedia -> Maybe Text
engine} -> Maybe Text
engine) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe Text
a -> InstallationMedia
s {$sel:engine:InstallationMedia' :: Maybe Text
engine = Maybe Text
a} :: InstallationMedia)
installationMedia_oSInstallationMediaPath :: Lens.Lens' InstallationMedia (Prelude.Maybe Prelude.Text)
installationMedia_oSInstallationMediaPath :: (Maybe Text -> f (Maybe Text))
-> InstallationMedia -> f InstallationMedia
installationMedia_oSInstallationMediaPath = (InstallationMedia -> Maybe Text)
-> (InstallationMedia -> Maybe Text -> InstallationMedia)
-> Lens
InstallationMedia InstallationMedia (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe Text
oSInstallationMediaPath :: Maybe Text
$sel:oSInstallationMediaPath:InstallationMedia' :: InstallationMedia -> Maybe Text
oSInstallationMediaPath} -> Maybe Text
oSInstallationMediaPath) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe Text
a -> InstallationMedia
s {$sel:oSInstallationMediaPath:InstallationMedia' :: Maybe Text
oSInstallationMediaPath = Maybe Text
a} :: InstallationMedia)
installationMedia_customAvailabilityZoneId :: Lens.Lens' InstallationMedia (Prelude.Maybe Prelude.Text)
installationMedia_customAvailabilityZoneId :: (Maybe Text -> f (Maybe Text))
-> InstallationMedia -> f InstallationMedia
installationMedia_customAvailabilityZoneId = (InstallationMedia -> Maybe Text)
-> (InstallationMedia -> Maybe Text -> InstallationMedia)
-> Lens
InstallationMedia InstallationMedia (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe Text
customAvailabilityZoneId :: Maybe Text
$sel:customAvailabilityZoneId:InstallationMedia' :: InstallationMedia -> Maybe Text
customAvailabilityZoneId} -> Maybe Text
customAvailabilityZoneId) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe Text
a -> InstallationMedia
s {$sel:customAvailabilityZoneId:InstallationMedia' :: Maybe Text
customAvailabilityZoneId = Maybe Text
a} :: InstallationMedia)
installationMedia_failureCause :: Lens.Lens' InstallationMedia (Prelude.Maybe InstallationMediaFailureCause)
installationMedia_failureCause :: (Maybe InstallationMediaFailureCause
-> f (Maybe InstallationMediaFailureCause))
-> InstallationMedia -> f InstallationMedia
installationMedia_failureCause = (InstallationMedia -> Maybe InstallationMediaFailureCause)
-> (InstallationMedia
-> Maybe InstallationMediaFailureCause -> InstallationMedia)
-> Lens
InstallationMedia
InstallationMedia
(Maybe InstallationMediaFailureCause)
(Maybe InstallationMediaFailureCause)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstallationMedia' {Maybe InstallationMediaFailureCause
failureCause :: Maybe InstallationMediaFailureCause
$sel:failureCause:InstallationMedia' :: InstallationMedia -> Maybe InstallationMediaFailureCause
failureCause} -> Maybe InstallationMediaFailureCause
failureCause) (\s :: InstallationMedia
s@InstallationMedia' {} Maybe InstallationMediaFailureCause
a -> InstallationMedia
s {$sel:failureCause:InstallationMedia' :: Maybe InstallationMediaFailureCause
failureCause = Maybe InstallationMediaFailureCause
a} :: InstallationMedia)
instance Core.FromXML InstallationMedia where
parseXML :: [Node] -> Either String InstallationMedia
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia
InstallationMedia'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
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
"EngineVersion")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
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
"Status")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
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
"InstallationMediaId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
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
"EngineInstallationMediaPath")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
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
"Engine")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe InstallationMediaFailureCause
-> InstallationMedia)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe InstallationMediaFailureCause -> InstallationMedia)
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
"OSInstallationMediaPath")
Either
String
(Maybe Text
-> Maybe InstallationMediaFailureCause -> InstallationMedia)
-> Either String (Maybe Text)
-> Either
String (Maybe InstallationMediaFailureCause -> InstallationMedia)
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
"CustomAvailabilityZoneId")
Either
String (Maybe InstallationMediaFailureCause -> InstallationMedia)
-> Either String (Maybe InstallationMediaFailureCause)
-> Either String InstallationMedia
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node]
-> Text -> Either String (Maybe InstallationMediaFailureCause)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"FailureCause")
instance Prelude.Hashable InstallationMedia
instance Prelude.NFData InstallationMedia