{-# 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.Lightsail.UpdateRelationalDatabase
(
UpdateRelationalDatabase (..),
newUpdateRelationalDatabase,
updateRelationalDatabase_masterUserPassword,
updateRelationalDatabase_publiclyAccessible,
updateRelationalDatabase_enableBackupRetention,
updateRelationalDatabase_preferredMaintenanceWindow,
updateRelationalDatabase_caCertificateIdentifier,
updateRelationalDatabase_preferredBackupWindow,
updateRelationalDatabase_applyImmediately,
updateRelationalDatabase_rotateMasterUserPassword,
updateRelationalDatabase_disableBackupRetention,
updateRelationalDatabase_relationalDatabaseName,
UpdateRelationalDatabaseResponse (..),
newUpdateRelationalDatabaseResponse,
updateRelationalDatabaseResponse_operations,
updateRelationalDatabaseResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateRelationalDatabase = UpdateRelationalDatabase'
{
UpdateRelationalDatabase -> Maybe (Sensitive Text)
masterUserPassword :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateRelationalDatabase -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
UpdateRelationalDatabase -> Maybe Bool
enableBackupRetention :: Prelude.Maybe Prelude.Bool,
UpdateRelationalDatabase -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
UpdateRelationalDatabase -> Maybe Text
caCertificateIdentifier :: Prelude.Maybe Prelude.Text,
UpdateRelationalDatabase -> Maybe Text
preferredBackupWindow :: Prelude.Maybe Prelude.Text,
UpdateRelationalDatabase -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
UpdateRelationalDatabase -> Maybe Bool
rotateMasterUserPassword :: Prelude.Maybe Prelude.Bool,
UpdateRelationalDatabase -> Maybe Bool
disableBackupRetention :: Prelude.Maybe Prelude.Bool,
UpdateRelationalDatabase -> Text
relationalDatabaseName :: Prelude.Text
}
deriving (UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
(UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool)
-> (UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool)
-> Eq UpdateRelationalDatabase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
$c/= :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
== :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
$c== :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
Prelude.Eq, Int -> UpdateRelationalDatabase -> ShowS
[UpdateRelationalDatabase] -> ShowS
UpdateRelationalDatabase -> String
(Int -> UpdateRelationalDatabase -> ShowS)
-> (UpdateRelationalDatabase -> String)
-> ([UpdateRelationalDatabase] -> ShowS)
-> Show UpdateRelationalDatabase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRelationalDatabase] -> ShowS
$cshowList :: [UpdateRelationalDatabase] -> ShowS
show :: UpdateRelationalDatabase -> String
$cshow :: UpdateRelationalDatabase -> String
showsPrec :: Int -> UpdateRelationalDatabase -> ShowS
$cshowsPrec :: Int -> UpdateRelationalDatabase -> ShowS
Prelude.Show, (forall x.
UpdateRelationalDatabase -> Rep UpdateRelationalDatabase x)
-> (forall x.
Rep UpdateRelationalDatabase x -> UpdateRelationalDatabase)
-> Generic UpdateRelationalDatabase
forall x.
Rep UpdateRelationalDatabase x -> UpdateRelationalDatabase
forall x.
UpdateRelationalDatabase -> Rep UpdateRelationalDatabase x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRelationalDatabase x -> UpdateRelationalDatabase
$cfrom :: forall x.
UpdateRelationalDatabase -> Rep UpdateRelationalDatabase x
Prelude.Generic)
newUpdateRelationalDatabase ::
Prelude.Text ->
UpdateRelationalDatabase
newUpdateRelationalDatabase :: Text -> UpdateRelationalDatabase
newUpdateRelationalDatabase Text
pRelationalDatabaseName_ =
UpdateRelationalDatabase' :: Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Text
-> UpdateRelationalDatabase
UpdateRelationalDatabase'
{ $sel:masterUserPassword:UpdateRelationalDatabase' :: Maybe (Sensitive Text)
masterUserPassword =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:publiclyAccessible:UpdateRelationalDatabase' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:enableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
enableBackupRetention = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:caCertificateIdentifier:UpdateRelationalDatabase' :: Maybe Text
caCertificateIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:preferredBackupWindow:UpdateRelationalDatabase' :: Maybe Text
preferredBackupWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applyImmediately:UpdateRelationalDatabase' :: Maybe Bool
applyImmediately = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: Maybe Bool
rotateMasterUserPassword = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:disableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
disableBackupRetention = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:relationalDatabaseName:UpdateRelationalDatabase' :: Text
relationalDatabaseName = Text
pRelationalDatabaseName_
}
updateRelationalDatabase_masterUserPassword :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_masterUserPassword :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_masterUserPassword = (UpdateRelationalDatabase -> Maybe (Sensitive Text))
-> (UpdateRelationalDatabase
-> Maybe (Sensitive Text) -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe (Sensitive Text)
masterUserPassword :: Maybe (Sensitive Text)
$sel:masterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe (Sensitive Text)
masterUserPassword} -> Maybe (Sensitive Text)
masterUserPassword) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe (Sensitive Text)
a -> UpdateRelationalDatabase
s {$sel:masterUserPassword:UpdateRelationalDatabase' :: Maybe (Sensitive Text)
masterUserPassword = Maybe (Sensitive Text)
a} :: UpdateRelationalDatabase) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase
-> f UpdateRelationalDatabase
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
updateRelationalDatabase_publiclyAccessible :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_publiclyAccessible = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
-> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:publiclyAccessible:UpdateRelationalDatabase' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_enableBackupRetention :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_enableBackupRetention :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_enableBackupRetention = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
-> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
enableBackupRetention :: Maybe Bool
$sel:enableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
enableBackupRetention} -> Maybe Bool
enableBackupRetention) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:enableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
enableBackupRetention = Maybe Bool
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_preferredMaintenanceWindow :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_preferredMaintenanceWindow = (UpdateRelationalDatabase -> Maybe Text)
-> (UpdateRelationalDatabase
-> Maybe Text -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Text
a -> UpdateRelationalDatabase
s {$sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_caCertificateIdentifier :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_caCertificateIdentifier :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_caCertificateIdentifier = (UpdateRelationalDatabase -> Maybe Text)
-> (UpdateRelationalDatabase
-> Maybe Text -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Text
caCertificateIdentifier :: Maybe Text
$sel:caCertificateIdentifier:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
caCertificateIdentifier} -> Maybe Text
caCertificateIdentifier) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Text
a -> UpdateRelationalDatabase
s {$sel:caCertificateIdentifier:UpdateRelationalDatabase' :: Maybe Text
caCertificateIdentifier = Maybe Text
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_preferredBackupWindow :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_preferredBackupWindow :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_preferredBackupWindow = (UpdateRelationalDatabase -> Maybe Text)
-> (UpdateRelationalDatabase
-> Maybe Text -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Text
preferredBackupWindow :: Maybe Text
$sel:preferredBackupWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
preferredBackupWindow} -> Maybe Text
preferredBackupWindow) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Text
a -> UpdateRelationalDatabase
s {$sel:preferredBackupWindow:UpdateRelationalDatabase' :: Maybe Text
preferredBackupWindow = Maybe Text
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_applyImmediately :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_applyImmediately = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
-> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:applyImmediately:UpdateRelationalDatabase' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_rotateMasterUserPassword :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_rotateMasterUserPassword :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_rotateMasterUserPassword = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
-> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
rotateMasterUserPassword :: Maybe Bool
$sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
rotateMasterUserPassword} -> Maybe Bool
rotateMasterUserPassword) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: Maybe Bool
rotateMasterUserPassword = Maybe Bool
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_disableBackupRetention :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_disableBackupRetention :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_disableBackupRetention = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
-> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
UpdateRelationalDatabase
UpdateRelationalDatabase
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
disableBackupRetention :: Maybe Bool
$sel:disableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
disableBackupRetention} -> Maybe Bool
disableBackupRetention) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:disableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
disableBackupRetention = Maybe Bool
a} :: UpdateRelationalDatabase)
updateRelationalDatabase_relationalDatabaseName :: Lens.Lens' UpdateRelationalDatabase Prelude.Text
updateRelationalDatabase_relationalDatabaseName :: (Text -> f Text)
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_relationalDatabaseName = (UpdateRelationalDatabase -> Text)
-> (UpdateRelationalDatabase -> Text -> UpdateRelationalDatabase)
-> Lens UpdateRelationalDatabase UpdateRelationalDatabase Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Text
relationalDatabaseName :: Text
$sel:relationalDatabaseName:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Text
relationalDatabaseName} -> Text
relationalDatabaseName) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Text
a -> UpdateRelationalDatabase
s {$sel:relationalDatabaseName:UpdateRelationalDatabase' :: Text
relationalDatabaseName = Text
a} :: UpdateRelationalDatabase)
instance Core.AWSRequest UpdateRelationalDatabase where
type
AWSResponse UpdateRelationalDatabase =
UpdateRelationalDatabaseResponse
request :: UpdateRelationalDatabase -> Request UpdateRelationalDatabase
request = Service
-> UpdateRelationalDatabase -> Request UpdateRelationalDatabase
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateRelationalDatabase
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateRelationalDatabase)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateRelationalDatabase))
-> Logger
-> Service
-> Proxy UpdateRelationalDatabase
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateRelationalDatabase)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [Operation] -> Int -> UpdateRelationalDatabaseResponse
UpdateRelationalDatabaseResponse'
(Maybe [Operation] -> Int -> UpdateRelationalDatabaseResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> UpdateRelationalDatabaseResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Operation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operations" Either String (Maybe (Maybe [Operation]))
-> Maybe [Operation] -> Either String (Maybe [Operation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Operation]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> UpdateRelationalDatabaseResponse)
-> Either String Int
-> Either String UpdateRelationalDatabaseResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateRelationalDatabase
instance Prelude.NFData UpdateRelationalDatabase
instance Core.ToHeaders UpdateRelationalDatabase where
toHeaders :: UpdateRelationalDatabase -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateRelationalDatabase -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.UpdateRelationalDatabase" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateRelationalDatabase where
toJSON :: UpdateRelationalDatabase -> Value
toJSON UpdateRelationalDatabase' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Text
relationalDatabaseName :: Text
disableBackupRetention :: Maybe Bool
rotateMasterUserPassword :: Maybe Bool
applyImmediately :: Maybe Bool
preferredBackupWindow :: Maybe Text
caCertificateIdentifier :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
enableBackupRetention :: Maybe Bool
publiclyAccessible :: Maybe Bool
masterUserPassword :: Maybe (Sensitive Text)
$sel:relationalDatabaseName:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Text
$sel:disableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:applyImmediately:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:preferredBackupWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
$sel:caCertificateIdentifier:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
$sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
$sel:enableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:publiclyAccessible:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:masterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"masterUserPassword" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
masterUserPassword,
(Text
"publiclyAccessible" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
publiclyAccessible,
(Text
"enableBackupRetention" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableBackupRetention,
(Text
"preferredMaintenanceWindow" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preferredMaintenanceWindow,
(Text
"caCertificateIdentifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
caCertificateIdentifier,
(Text
"preferredBackupWindow" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preferredBackupWindow,
(Text
"applyImmediately" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
applyImmediately,
(Text
"rotateMasterUserPassword" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
rotateMasterUserPassword,
(Text
"disableBackupRetention" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableBackupRetention,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"relationalDatabaseName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
relationalDatabaseName
)
]
)
instance Core.ToPath UpdateRelationalDatabase where
toPath :: UpdateRelationalDatabase -> ByteString
toPath = ByteString -> UpdateRelationalDatabase -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateRelationalDatabase where
toQuery :: UpdateRelationalDatabase -> QueryString
toQuery = QueryString -> UpdateRelationalDatabase -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateRelationalDatabaseResponse = UpdateRelationalDatabaseResponse'
{
UpdateRelationalDatabaseResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
UpdateRelationalDatabaseResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
(UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool)
-> (UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool)
-> Eq UpdateRelationalDatabaseResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
$c/= :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
== :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
$c== :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRelationalDatabaseResponse]
ReadPrec UpdateRelationalDatabaseResponse
Int -> ReadS UpdateRelationalDatabaseResponse
ReadS [UpdateRelationalDatabaseResponse]
(Int -> ReadS UpdateRelationalDatabaseResponse)
-> ReadS [UpdateRelationalDatabaseResponse]
-> ReadPrec UpdateRelationalDatabaseResponse
-> ReadPrec [UpdateRelationalDatabaseResponse]
-> Read UpdateRelationalDatabaseResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRelationalDatabaseResponse]
$creadListPrec :: ReadPrec [UpdateRelationalDatabaseResponse]
readPrec :: ReadPrec UpdateRelationalDatabaseResponse
$creadPrec :: ReadPrec UpdateRelationalDatabaseResponse
readList :: ReadS [UpdateRelationalDatabaseResponse]
$creadList :: ReadS [UpdateRelationalDatabaseResponse]
readsPrec :: Int -> ReadS UpdateRelationalDatabaseResponse
$creadsPrec :: Int -> ReadS UpdateRelationalDatabaseResponse
Prelude.Read, Int -> UpdateRelationalDatabaseResponse -> ShowS
[UpdateRelationalDatabaseResponse] -> ShowS
UpdateRelationalDatabaseResponse -> String
(Int -> UpdateRelationalDatabaseResponse -> ShowS)
-> (UpdateRelationalDatabaseResponse -> String)
-> ([UpdateRelationalDatabaseResponse] -> ShowS)
-> Show UpdateRelationalDatabaseResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRelationalDatabaseResponse] -> ShowS
$cshowList :: [UpdateRelationalDatabaseResponse] -> ShowS
show :: UpdateRelationalDatabaseResponse -> String
$cshow :: UpdateRelationalDatabaseResponse -> String
showsPrec :: Int -> UpdateRelationalDatabaseResponse -> ShowS
$cshowsPrec :: Int -> UpdateRelationalDatabaseResponse -> ShowS
Prelude.Show, (forall x.
UpdateRelationalDatabaseResponse
-> Rep UpdateRelationalDatabaseResponse x)
-> (forall x.
Rep UpdateRelationalDatabaseResponse x
-> UpdateRelationalDatabaseResponse)
-> Generic UpdateRelationalDatabaseResponse
forall x.
Rep UpdateRelationalDatabaseResponse x
-> UpdateRelationalDatabaseResponse
forall x.
UpdateRelationalDatabaseResponse
-> Rep UpdateRelationalDatabaseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRelationalDatabaseResponse x
-> UpdateRelationalDatabaseResponse
$cfrom :: forall x.
UpdateRelationalDatabaseResponse
-> Rep UpdateRelationalDatabaseResponse x
Prelude.Generic)
newUpdateRelationalDatabaseResponse ::
Prelude.Int ->
UpdateRelationalDatabaseResponse
newUpdateRelationalDatabaseResponse :: Int -> UpdateRelationalDatabaseResponse
newUpdateRelationalDatabaseResponse Int
pHttpStatus_ =
UpdateRelationalDatabaseResponse' :: Maybe [Operation] -> Int -> UpdateRelationalDatabaseResponse
UpdateRelationalDatabaseResponse'
{ $sel:operations:UpdateRelationalDatabaseResponse' :: Maybe [Operation]
operations =
Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateRelationalDatabaseResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateRelationalDatabaseResponse_operations :: Lens.Lens' UpdateRelationalDatabaseResponse (Prelude.Maybe [Operation])
updateRelationalDatabaseResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateRelationalDatabaseResponse
-> f UpdateRelationalDatabaseResponse
updateRelationalDatabaseResponse_operations = (UpdateRelationalDatabaseResponse -> Maybe [Operation])
-> (UpdateRelationalDatabaseResponse
-> Maybe [Operation] -> UpdateRelationalDatabaseResponse)
-> Lens
UpdateRelationalDatabaseResponse
UpdateRelationalDatabaseResponse
(Maybe [Operation])
(Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabaseResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:UpdateRelationalDatabaseResponse' :: UpdateRelationalDatabaseResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: UpdateRelationalDatabaseResponse
s@UpdateRelationalDatabaseResponse' {} Maybe [Operation]
a -> UpdateRelationalDatabaseResponse
s {$sel:operations:UpdateRelationalDatabaseResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: UpdateRelationalDatabaseResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateRelationalDatabaseResponse
-> f UpdateRelationalDatabaseResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
-> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateRelationalDatabaseResponse
-> f UpdateRelationalDatabaseResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Operation] [Operation] [Operation] [Operation]
-> Iso
(Maybe [Operation])
(Maybe [Operation])
(Maybe [Operation])
(Maybe [Operation])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Operation] [Operation] [Operation] [Operation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateRelationalDatabaseResponse_httpStatus :: Lens.Lens' UpdateRelationalDatabaseResponse Prelude.Int
updateRelationalDatabaseResponse_httpStatus :: (Int -> f Int)
-> UpdateRelationalDatabaseResponse
-> f UpdateRelationalDatabaseResponse
updateRelationalDatabaseResponse_httpStatus = (UpdateRelationalDatabaseResponse -> Int)
-> (UpdateRelationalDatabaseResponse
-> Int -> UpdateRelationalDatabaseResponse)
-> Lens
UpdateRelationalDatabaseResponse
UpdateRelationalDatabaseResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabaseResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateRelationalDatabaseResponse' :: UpdateRelationalDatabaseResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateRelationalDatabaseResponse
s@UpdateRelationalDatabaseResponse' {} Int
a -> UpdateRelationalDatabaseResponse
s {$sel:httpStatus:UpdateRelationalDatabaseResponse' :: Int
httpStatus = Int
a} :: UpdateRelationalDatabaseResponse)
instance
Prelude.NFData
UpdateRelationalDatabaseResponse