{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.RDS.ImportInstallationMedia
(
ImportInstallationMedia (..),
newImportInstallationMedia,
importInstallationMedia_customAvailabilityZoneId,
importInstallationMedia_engine,
importInstallationMedia_engineVersion,
importInstallationMedia_engineInstallationMediaPath,
importInstallationMedia_oSInstallationMediaPath,
InstallationMedia (..),
newInstallationMedia,
installationMedia_engineVersion,
installationMedia_status,
installationMedia_installationMediaId,
installationMedia_engineInstallationMediaPath,
installationMedia_engine,
installationMedia_oSInstallationMediaPath,
installationMedia_customAvailabilityZoneId,
installationMedia_failureCause,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ImportInstallationMedia = ImportInstallationMedia'
{
ImportInstallationMedia -> Text
customAvailabilityZoneId :: Prelude.Text,
ImportInstallationMedia -> Text
engine :: Prelude.Text,
ImportInstallationMedia -> Text
engineVersion :: Prelude.Text,
ImportInstallationMedia -> Text
engineInstallationMediaPath :: Prelude.Text,
ImportInstallationMedia -> Text
oSInstallationMediaPath :: Prelude.Text
}
deriving (ImportInstallationMedia -> ImportInstallationMedia -> Bool
(ImportInstallationMedia -> ImportInstallationMedia -> Bool)
-> (ImportInstallationMedia -> ImportInstallationMedia -> Bool)
-> Eq ImportInstallationMedia
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportInstallationMedia -> ImportInstallationMedia -> Bool
$c/= :: ImportInstallationMedia -> ImportInstallationMedia -> Bool
== :: ImportInstallationMedia -> ImportInstallationMedia -> Bool
$c== :: ImportInstallationMedia -> ImportInstallationMedia -> Bool
Prelude.Eq, ReadPrec [ImportInstallationMedia]
ReadPrec ImportInstallationMedia
Int -> ReadS ImportInstallationMedia
ReadS [ImportInstallationMedia]
(Int -> ReadS ImportInstallationMedia)
-> ReadS [ImportInstallationMedia]
-> ReadPrec ImportInstallationMedia
-> ReadPrec [ImportInstallationMedia]
-> Read ImportInstallationMedia
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportInstallationMedia]
$creadListPrec :: ReadPrec [ImportInstallationMedia]
readPrec :: ReadPrec ImportInstallationMedia
$creadPrec :: ReadPrec ImportInstallationMedia
readList :: ReadS [ImportInstallationMedia]
$creadList :: ReadS [ImportInstallationMedia]
readsPrec :: Int -> ReadS ImportInstallationMedia
$creadsPrec :: Int -> ReadS ImportInstallationMedia
Prelude.Read, Int -> ImportInstallationMedia -> ShowS
[ImportInstallationMedia] -> ShowS
ImportInstallationMedia -> String
(Int -> ImportInstallationMedia -> ShowS)
-> (ImportInstallationMedia -> String)
-> ([ImportInstallationMedia] -> ShowS)
-> Show ImportInstallationMedia
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportInstallationMedia] -> ShowS
$cshowList :: [ImportInstallationMedia] -> ShowS
show :: ImportInstallationMedia -> String
$cshow :: ImportInstallationMedia -> String
showsPrec :: Int -> ImportInstallationMedia -> ShowS
$cshowsPrec :: Int -> ImportInstallationMedia -> ShowS
Prelude.Show, (forall x.
ImportInstallationMedia -> Rep ImportInstallationMedia x)
-> (forall x.
Rep ImportInstallationMedia x -> ImportInstallationMedia)
-> Generic ImportInstallationMedia
forall x. Rep ImportInstallationMedia x -> ImportInstallationMedia
forall x. ImportInstallationMedia -> Rep ImportInstallationMedia x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportInstallationMedia x -> ImportInstallationMedia
$cfrom :: forall x. ImportInstallationMedia -> Rep ImportInstallationMedia x
Prelude.Generic)
newImportInstallationMedia ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ImportInstallationMedia
newImportInstallationMedia :: Text -> Text -> Text -> Text -> Text -> ImportInstallationMedia
newImportInstallationMedia
Text
pCustomAvailabilityZoneId_
Text
pEngine_
Text
pEngineVersion_
Text
pEngineInstallationMediaPath_
Text
pOSInstallationMediaPath_ =
ImportInstallationMedia' :: Text -> Text -> Text -> Text -> Text -> ImportInstallationMedia
ImportInstallationMedia'
{ $sel:customAvailabilityZoneId:ImportInstallationMedia' :: Text
customAvailabilityZoneId =
Text
pCustomAvailabilityZoneId_,
$sel:engine:ImportInstallationMedia' :: Text
engine = Text
pEngine_,
$sel:engineVersion:ImportInstallationMedia' :: Text
engineVersion = Text
pEngineVersion_,
$sel:engineInstallationMediaPath:ImportInstallationMedia' :: Text
engineInstallationMediaPath =
Text
pEngineInstallationMediaPath_,
$sel:oSInstallationMediaPath:ImportInstallationMedia' :: Text
oSInstallationMediaPath =
Text
pOSInstallationMediaPath_
}
importInstallationMedia_customAvailabilityZoneId :: Lens.Lens' ImportInstallationMedia Prelude.Text
importInstallationMedia_customAvailabilityZoneId :: (Text -> f Text)
-> ImportInstallationMedia -> f ImportInstallationMedia
importInstallationMedia_customAvailabilityZoneId = (ImportInstallationMedia -> Text)
-> (ImportInstallationMedia -> Text -> ImportInstallationMedia)
-> Lens ImportInstallationMedia ImportInstallationMedia Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportInstallationMedia' {Text
customAvailabilityZoneId :: Text
$sel:customAvailabilityZoneId:ImportInstallationMedia' :: ImportInstallationMedia -> Text
customAvailabilityZoneId} -> Text
customAvailabilityZoneId) (\s :: ImportInstallationMedia
s@ImportInstallationMedia' {} Text
a -> ImportInstallationMedia
s {$sel:customAvailabilityZoneId:ImportInstallationMedia' :: Text
customAvailabilityZoneId = Text
a} :: ImportInstallationMedia)
importInstallationMedia_engine :: Lens.Lens' ImportInstallationMedia Prelude.Text
importInstallationMedia_engine :: (Text -> f Text)
-> ImportInstallationMedia -> f ImportInstallationMedia
importInstallationMedia_engine = (ImportInstallationMedia -> Text)
-> (ImportInstallationMedia -> Text -> ImportInstallationMedia)
-> Lens ImportInstallationMedia ImportInstallationMedia Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportInstallationMedia' {Text
engine :: Text
$sel:engine:ImportInstallationMedia' :: ImportInstallationMedia -> Text
engine} -> Text
engine) (\s :: ImportInstallationMedia
s@ImportInstallationMedia' {} Text
a -> ImportInstallationMedia
s {$sel:engine:ImportInstallationMedia' :: Text
engine = Text
a} :: ImportInstallationMedia)
importInstallationMedia_engineVersion :: Lens.Lens' ImportInstallationMedia Prelude.Text
importInstallationMedia_engineVersion :: (Text -> f Text)
-> ImportInstallationMedia -> f ImportInstallationMedia
importInstallationMedia_engineVersion = (ImportInstallationMedia -> Text)
-> (ImportInstallationMedia -> Text -> ImportInstallationMedia)
-> Lens ImportInstallationMedia ImportInstallationMedia Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportInstallationMedia' {Text
engineVersion :: Text
$sel:engineVersion:ImportInstallationMedia' :: ImportInstallationMedia -> Text
engineVersion} -> Text
engineVersion) (\s :: ImportInstallationMedia
s@ImportInstallationMedia' {} Text
a -> ImportInstallationMedia
s {$sel:engineVersion:ImportInstallationMedia' :: Text
engineVersion = Text
a} :: ImportInstallationMedia)
importInstallationMedia_engineInstallationMediaPath :: Lens.Lens' ImportInstallationMedia Prelude.Text
importInstallationMedia_engineInstallationMediaPath :: (Text -> f Text)
-> ImportInstallationMedia -> f ImportInstallationMedia
importInstallationMedia_engineInstallationMediaPath = (ImportInstallationMedia -> Text)
-> (ImportInstallationMedia -> Text -> ImportInstallationMedia)
-> Lens ImportInstallationMedia ImportInstallationMedia Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportInstallationMedia' {Text
engineInstallationMediaPath :: Text
$sel:engineInstallationMediaPath:ImportInstallationMedia' :: ImportInstallationMedia -> Text
engineInstallationMediaPath} -> Text
engineInstallationMediaPath) (\s :: ImportInstallationMedia
s@ImportInstallationMedia' {} Text
a -> ImportInstallationMedia
s {$sel:engineInstallationMediaPath:ImportInstallationMedia' :: Text
engineInstallationMediaPath = Text
a} :: ImportInstallationMedia)
importInstallationMedia_oSInstallationMediaPath :: Lens.Lens' ImportInstallationMedia Prelude.Text
importInstallationMedia_oSInstallationMediaPath :: (Text -> f Text)
-> ImportInstallationMedia -> f ImportInstallationMedia
importInstallationMedia_oSInstallationMediaPath = (ImportInstallationMedia -> Text)
-> (ImportInstallationMedia -> Text -> ImportInstallationMedia)
-> Lens ImportInstallationMedia ImportInstallationMedia Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportInstallationMedia' {Text
oSInstallationMediaPath :: Text
$sel:oSInstallationMediaPath:ImportInstallationMedia' :: ImportInstallationMedia -> Text
oSInstallationMediaPath} -> Text
oSInstallationMediaPath) (\s :: ImportInstallationMedia
s@ImportInstallationMedia' {} Text
a -> ImportInstallationMedia
s {$sel:oSInstallationMediaPath:ImportInstallationMedia' :: Text
oSInstallationMediaPath = Text
a} :: ImportInstallationMedia)
instance Core.AWSRequest ImportInstallationMedia where
type
AWSResponse ImportInstallationMedia =
InstallationMedia
request :: ImportInstallationMedia -> Request ImportInstallationMedia
request = Service
-> ImportInstallationMedia -> Request ImportInstallationMedia
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ImportInstallationMedia
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ImportInstallationMedia)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ImportInstallationMedia))
-> Logger
-> Service
-> Proxy ImportInstallationMedia
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ImportInstallationMedia)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"ImportInstallationMediaResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String InstallationMedia
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable ImportInstallationMedia
instance Prelude.NFData ImportInstallationMedia
instance Core.ToHeaders ImportInstallationMedia where
toHeaders :: ImportInstallationMedia -> ResponseHeaders
toHeaders = ResponseHeaders -> ImportInstallationMedia -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ImportInstallationMedia where
toPath :: ImportInstallationMedia -> ByteString
toPath = ByteString -> ImportInstallationMedia -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ImportInstallationMedia where
toQuery :: ImportInstallationMedia -> QueryString
toQuery ImportInstallationMedia' {Text
oSInstallationMediaPath :: Text
engineInstallationMediaPath :: Text
engineVersion :: Text
engine :: Text
customAvailabilityZoneId :: Text
$sel:oSInstallationMediaPath:ImportInstallationMedia' :: ImportInstallationMedia -> Text
$sel:engineInstallationMediaPath:ImportInstallationMedia' :: ImportInstallationMedia -> Text
$sel:engineVersion:ImportInstallationMedia' :: ImportInstallationMedia -> Text
$sel:engine:ImportInstallationMedia' :: ImportInstallationMedia -> Text
$sel:customAvailabilityZoneId:ImportInstallationMedia' :: ImportInstallationMedia -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ImportInstallationMedia" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"CustomAvailabilityZoneId"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
customAvailabilityZoneId,
ByteString
"Engine" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
engine,
ByteString
"EngineVersion" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
engineVersion,
ByteString
"EngineInstallationMediaPath"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
engineInstallationMediaPath,
ByteString
"OSInstallationMediaPath"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
oSInstallationMediaPath
]