{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.ModifyDBSnapshot
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a manual DB snapshot with a new engine version. The snapshot can
-- be encrypted or unencrypted, but not shared or public.
--
-- Amazon RDS supports upgrading DB snapshots for MySQL, Oracle, and
-- PostgreSQL.
module Amazonka.RDS.ModifyDBSnapshot
  ( -- * Creating a Request
    ModifyDBSnapshot (..),
    newModifyDBSnapshot,

    -- * Request Lenses
    modifyDBSnapshot_engineVersion,
    modifyDBSnapshot_optionGroupName,
    modifyDBSnapshot_dbSnapshotIdentifier,

    -- * Destructuring the Response
    ModifyDBSnapshotResponse (..),
    newModifyDBSnapshotResponse,

    -- * Response Lenses
    modifyDBSnapshotResponse_dbSnapshot,
    modifyDBSnapshotResponse_httpStatus,
  )
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

-- | /See:/ 'newModifyDBSnapshot' smart constructor.
data ModifyDBSnapshot = ModifyDBSnapshot'
  { -- | The engine version to upgrade the DB snapshot to.
    --
    -- The following are the database engines and engine versions that are
    -- available when you upgrade a DB snapshot.
    --
    -- __MySQL__
    --
    -- -   @5.5.46@ (supported for 5.1 DB snapshots)
    --
    -- __Oracle__
    --
    -- -   @12.1.0.2.v8@ (supported for 12.1.0.1 DB snapshots)
    --
    -- -   @11.2.0.4.v12@ (supported for 11.2.0.2 DB snapshots)
    --
    -- -   @11.2.0.4.v11@ (supported for 11.2.0.3 DB snapshots)
    --
    -- __PostgreSQL__
    --
    -- For the list of engine versions that are available for upgrading a DB
    -- snapshot, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion Upgrading the PostgreSQL DB Engine for Amazon RDS>.
    ModifyDBSnapshot -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The option group to identify with the upgraded DB snapshot.
    --
    -- You can specify this parameter when you upgrade an Oracle DB snapshot.
    -- The same option group considerations apply when upgrading a DB snapshot
    -- as when upgrading a DB instance. For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG Option group considerations>
    -- in the /Amazon RDS User Guide./
    ModifyDBSnapshot -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the DB snapshot to modify.
    ModifyDBSnapshot -> Text
dbSnapshotIdentifier :: Prelude.Text
  }
  deriving (ModifyDBSnapshot -> ModifyDBSnapshot -> Bool
(ModifyDBSnapshot -> ModifyDBSnapshot -> Bool)
-> (ModifyDBSnapshot -> ModifyDBSnapshot -> Bool)
-> Eq ModifyDBSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBSnapshot -> ModifyDBSnapshot -> Bool
$c/= :: ModifyDBSnapshot -> ModifyDBSnapshot -> Bool
== :: ModifyDBSnapshot -> ModifyDBSnapshot -> Bool
$c== :: ModifyDBSnapshot -> ModifyDBSnapshot -> Bool
Prelude.Eq, ReadPrec [ModifyDBSnapshot]
ReadPrec ModifyDBSnapshot
Int -> ReadS ModifyDBSnapshot
ReadS [ModifyDBSnapshot]
(Int -> ReadS ModifyDBSnapshot)
-> ReadS [ModifyDBSnapshot]
-> ReadPrec ModifyDBSnapshot
-> ReadPrec [ModifyDBSnapshot]
-> Read ModifyDBSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBSnapshot]
$creadListPrec :: ReadPrec [ModifyDBSnapshot]
readPrec :: ReadPrec ModifyDBSnapshot
$creadPrec :: ReadPrec ModifyDBSnapshot
readList :: ReadS [ModifyDBSnapshot]
$creadList :: ReadS [ModifyDBSnapshot]
readsPrec :: Int -> ReadS ModifyDBSnapshot
$creadsPrec :: Int -> ReadS ModifyDBSnapshot
Prelude.Read, Int -> ModifyDBSnapshot -> ShowS
[ModifyDBSnapshot] -> ShowS
ModifyDBSnapshot -> String
(Int -> ModifyDBSnapshot -> ShowS)
-> (ModifyDBSnapshot -> String)
-> ([ModifyDBSnapshot] -> ShowS)
-> Show ModifyDBSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBSnapshot] -> ShowS
$cshowList :: [ModifyDBSnapshot] -> ShowS
show :: ModifyDBSnapshot -> String
$cshow :: ModifyDBSnapshot -> String
showsPrec :: Int -> ModifyDBSnapshot -> ShowS
$cshowsPrec :: Int -> ModifyDBSnapshot -> ShowS
Prelude.Show, (forall x. ModifyDBSnapshot -> Rep ModifyDBSnapshot x)
-> (forall x. Rep ModifyDBSnapshot x -> ModifyDBSnapshot)
-> Generic ModifyDBSnapshot
forall x. Rep ModifyDBSnapshot x -> ModifyDBSnapshot
forall x. ModifyDBSnapshot -> Rep ModifyDBSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyDBSnapshot x -> ModifyDBSnapshot
$cfrom :: forall x. ModifyDBSnapshot -> Rep ModifyDBSnapshot x
Prelude.Generic)

-- |
-- Create a value of 'ModifyDBSnapshot' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'engineVersion', 'modifyDBSnapshot_engineVersion' - The engine version to upgrade the DB snapshot to.
--
-- The following are the database engines and engine versions that are
-- available when you upgrade a DB snapshot.
--
-- __MySQL__
--
-- -   @5.5.46@ (supported for 5.1 DB snapshots)
--
-- __Oracle__
--
-- -   @12.1.0.2.v8@ (supported for 12.1.0.1 DB snapshots)
--
-- -   @11.2.0.4.v12@ (supported for 11.2.0.2 DB snapshots)
--
-- -   @11.2.0.4.v11@ (supported for 11.2.0.3 DB snapshots)
--
-- __PostgreSQL__
--
-- For the list of engine versions that are available for upgrading a DB
-- snapshot, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion Upgrading the PostgreSQL DB Engine for Amazon RDS>.
--
-- 'optionGroupName', 'modifyDBSnapshot_optionGroupName' - The option group to identify with the upgraded DB snapshot.
--
-- You can specify this parameter when you upgrade an Oracle DB snapshot.
-- The same option group considerations apply when upgrading a DB snapshot
-- as when upgrading a DB instance. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG Option group considerations>
-- in the /Amazon RDS User Guide./
--
-- 'dbSnapshotIdentifier', 'modifyDBSnapshot_dbSnapshotIdentifier' - The identifier of the DB snapshot to modify.
newModifyDBSnapshot ::
  -- | 'dbSnapshotIdentifier'
  Prelude.Text ->
  ModifyDBSnapshot
newModifyDBSnapshot :: Text -> ModifyDBSnapshot
newModifyDBSnapshot Text
pDBSnapshotIdentifier_ =
  ModifyDBSnapshot' :: Maybe Text -> Maybe Text -> Text -> ModifyDBSnapshot
ModifyDBSnapshot'
    { $sel:engineVersion:ModifyDBSnapshot' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:optionGroupName:ModifyDBSnapshot' :: Maybe Text
optionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbSnapshotIdentifier:ModifyDBSnapshot' :: Text
dbSnapshotIdentifier = Text
pDBSnapshotIdentifier_
    }

-- | The engine version to upgrade the DB snapshot to.
--
-- The following are the database engines and engine versions that are
-- available when you upgrade a DB snapshot.
--
-- __MySQL__
--
-- -   @5.5.46@ (supported for 5.1 DB snapshots)
--
-- __Oracle__
--
-- -   @12.1.0.2.v8@ (supported for 12.1.0.1 DB snapshots)
--
-- -   @11.2.0.4.v12@ (supported for 11.2.0.2 DB snapshots)
--
-- -   @11.2.0.4.v11@ (supported for 11.2.0.3 DB snapshots)
--
-- __PostgreSQL__
--
-- For the list of engine versions that are available for upgrading a DB
-- snapshot, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion Upgrading the PostgreSQL DB Engine for Amazon RDS>.
modifyDBSnapshot_engineVersion :: Lens.Lens' ModifyDBSnapshot (Prelude.Maybe Prelude.Text)
modifyDBSnapshot_engineVersion :: (Maybe Text -> f (Maybe Text))
-> ModifyDBSnapshot -> f ModifyDBSnapshot
modifyDBSnapshot_engineVersion = (ModifyDBSnapshot -> Maybe Text)
-> (ModifyDBSnapshot -> Maybe Text -> ModifyDBSnapshot)
-> Lens ModifyDBSnapshot ModifyDBSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBSnapshot' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ModifyDBSnapshot' :: ModifyDBSnapshot -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ModifyDBSnapshot
s@ModifyDBSnapshot' {} Maybe Text
a -> ModifyDBSnapshot
s {$sel:engineVersion:ModifyDBSnapshot' :: Maybe Text
engineVersion = Maybe Text
a} :: ModifyDBSnapshot)

-- | The option group to identify with the upgraded DB snapshot.
--
-- You can specify this parameter when you upgrade an Oracle DB snapshot.
-- The same option group considerations apply when upgrading a DB snapshot
-- as when upgrading a DB instance. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG Option group considerations>
-- in the /Amazon RDS User Guide./
modifyDBSnapshot_optionGroupName :: Lens.Lens' ModifyDBSnapshot (Prelude.Maybe Prelude.Text)
modifyDBSnapshot_optionGroupName :: (Maybe Text -> f (Maybe Text))
-> ModifyDBSnapshot -> f ModifyDBSnapshot
modifyDBSnapshot_optionGroupName = (ModifyDBSnapshot -> Maybe Text)
-> (ModifyDBSnapshot -> Maybe Text -> ModifyDBSnapshot)
-> Lens ModifyDBSnapshot ModifyDBSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBSnapshot' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:ModifyDBSnapshot' :: ModifyDBSnapshot -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: ModifyDBSnapshot
s@ModifyDBSnapshot' {} Maybe Text
a -> ModifyDBSnapshot
s {$sel:optionGroupName:ModifyDBSnapshot' :: Maybe Text
optionGroupName = Maybe Text
a} :: ModifyDBSnapshot)

-- | The identifier of the DB snapshot to modify.
modifyDBSnapshot_dbSnapshotIdentifier :: Lens.Lens' ModifyDBSnapshot Prelude.Text
modifyDBSnapshot_dbSnapshotIdentifier :: (Text -> f Text) -> ModifyDBSnapshot -> f ModifyDBSnapshot
modifyDBSnapshot_dbSnapshotIdentifier = (ModifyDBSnapshot -> Text)
-> (ModifyDBSnapshot -> Text -> ModifyDBSnapshot)
-> Lens ModifyDBSnapshot ModifyDBSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBSnapshot' {Text
dbSnapshotIdentifier :: Text
$sel:dbSnapshotIdentifier:ModifyDBSnapshot' :: ModifyDBSnapshot -> Text
dbSnapshotIdentifier} -> Text
dbSnapshotIdentifier) (\s :: ModifyDBSnapshot
s@ModifyDBSnapshot' {} Text
a -> ModifyDBSnapshot
s {$sel:dbSnapshotIdentifier:ModifyDBSnapshot' :: Text
dbSnapshotIdentifier = Text
a} :: ModifyDBSnapshot)

instance Core.AWSRequest ModifyDBSnapshot where
  type
    AWSResponse ModifyDBSnapshot =
      ModifyDBSnapshotResponse
  request :: ModifyDBSnapshot -> Request ModifyDBSnapshot
request = Service -> ModifyDBSnapshot -> Request ModifyDBSnapshot
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyDBSnapshot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ModifyDBSnapshot)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyDBSnapshot))
-> Logger
-> Service
-> Proxy ModifyDBSnapshot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ModifyDBSnapshot)))
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
"ModifyDBSnapshotResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe DBSnapshot -> Int -> ModifyDBSnapshotResponse
ModifyDBSnapshotResponse'
            (Maybe DBSnapshot -> Int -> ModifyDBSnapshotResponse)
-> Either String (Maybe DBSnapshot)
-> Either String (Int -> ModifyDBSnapshotResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBSnapshot)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBSnapshot")
            Either String (Int -> ModifyDBSnapshotResponse)
-> Either String Int -> Either String ModifyDBSnapshotResponse
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 ModifyDBSnapshot

instance Prelude.NFData ModifyDBSnapshot

instance Core.ToHeaders ModifyDBSnapshot where
  toHeaders :: ModifyDBSnapshot -> ResponseHeaders
toHeaders = ResponseHeaders -> ModifyDBSnapshot -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ModifyDBSnapshot where
  toPath :: ModifyDBSnapshot -> ByteString
toPath = ByteString -> ModifyDBSnapshot -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ModifyDBSnapshot where
  toQuery :: ModifyDBSnapshot -> QueryString
toQuery ModifyDBSnapshot' {Maybe Text
Text
dbSnapshotIdentifier :: Text
optionGroupName :: Maybe Text
engineVersion :: Maybe Text
$sel:dbSnapshotIdentifier:ModifyDBSnapshot' :: ModifyDBSnapshot -> Text
$sel:optionGroupName:ModifyDBSnapshot' :: ModifyDBSnapshot -> Maybe Text
$sel:engineVersion:ModifyDBSnapshot' :: ModifyDBSnapshot -> Maybe 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
"ModifyDBSnapshot" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"EngineVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engineVersion,
        ByteString
"OptionGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
optionGroupName,
        ByteString
"DBSnapshotIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbSnapshotIdentifier
      ]

-- | /See:/ 'newModifyDBSnapshotResponse' smart constructor.
data ModifyDBSnapshotResponse = ModifyDBSnapshotResponse'
  { ModifyDBSnapshotResponse -> Maybe DBSnapshot
dbSnapshot :: Prelude.Maybe DBSnapshot,
    -- | The response's http status code.
    ModifyDBSnapshotResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyDBSnapshotResponse -> ModifyDBSnapshotResponse -> Bool
(ModifyDBSnapshotResponse -> ModifyDBSnapshotResponse -> Bool)
-> (ModifyDBSnapshotResponse -> ModifyDBSnapshotResponse -> Bool)
-> Eq ModifyDBSnapshotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBSnapshotResponse -> ModifyDBSnapshotResponse -> Bool
$c/= :: ModifyDBSnapshotResponse -> ModifyDBSnapshotResponse -> Bool
== :: ModifyDBSnapshotResponse -> ModifyDBSnapshotResponse -> Bool
$c== :: ModifyDBSnapshotResponse -> ModifyDBSnapshotResponse -> Bool
Prelude.Eq, ReadPrec [ModifyDBSnapshotResponse]
ReadPrec ModifyDBSnapshotResponse
Int -> ReadS ModifyDBSnapshotResponse
ReadS [ModifyDBSnapshotResponse]
(Int -> ReadS ModifyDBSnapshotResponse)
-> ReadS [ModifyDBSnapshotResponse]
-> ReadPrec ModifyDBSnapshotResponse
-> ReadPrec [ModifyDBSnapshotResponse]
-> Read ModifyDBSnapshotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBSnapshotResponse]
$creadListPrec :: ReadPrec [ModifyDBSnapshotResponse]
readPrec :: ReadPrec ModifyDBSnapshotResponse
$creadPrec :: ReadPrec ModifyDBSnapshotResponse
readList :: ReadS [ModifyDBSnapshotResponse]
$creadList :: ReadS [ModifyDBSnapshotResponse]
readsPrec :: Int -> ReadS ModifyDBSnapshotResponse
$creadsPrec :: Int -> ReadS ModifyDBSnapshotResponse
Prelude.Read, Int -> ModifyDBSnapshotResponse -> ShowS
[ModifyDBSnapshotResponse] -> ShowS
ModifyDBSnapshotResponse -> String
(Int -> ModifyDBSnapshotResponse -> ShowS)
-> (ModifyDBSnapshotResponse -> String)
-> ([ModifyDBSnapshotResponse] -> ShowS)
-> Show ModifyDBSnapshotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBSnapshotResponse] -> ShowS
$cshowList :: [ModifyDBSnapshotResponse] -> ShowS
show :: ModifyDBSnapshotResponse -> String
$cshow :: ModifyDBSnapshotResponse -> String
showsPrec :: Int -> ModifyDBSnapshotResponse -> ShowS
$cshowsPrec :: Int -> ModifyDBSnapshotResponse -> ShowS
Prelude.Show, (forall x.
 ModifyDBSnapshotResponse -> Rep ModifyDBSnapshotResponse x)
-> (forall x.
    Rep ModifyDBSnapshotResponse x -> ModifyDBSnapshotResponse)
-> Generic ModifyDBSnapshotResponse
forall x.
Rep ModifyDBSnapshotResponse x -> ModifyDBSnapshotResponse
forall x.
ModifyDBSnapshotResponse -> Rep ModifyDBSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyDBSnapshotResponse x -> ModifyDBSnapshotResponse
$cfrom :: forall x.
ModifyDBSnapshotResponse -> Rep ModifyDBSnapshotResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyDBSnapshotResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'dbSnapshot', 'modifyDBSnapshotResponse_dbSnapshot' - Undocumented member.
--
-- 'httpStatus', 'modifyDBSnapshotResponse_httpStatus' - The response's http status code.
newModifyDBSnapshotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyDBSnapshotResponse
newModifyDBSnapshotResponse :: Int -> ModifyDBSnapshotResponse
newModifyDBSnapshotResponse Int
pHttpStatus_ =
  ModifyDBSnapshotResponse' :: Maybe DBSnapshot -> Int -> ModifyDBSnapshotResponse
ModifyDBSnapshotResponse'
    { $sel:dbSnapshot:ModifyDBSnapshotResponse' :: Maybe DBSnapshot
dbSnapshot =
        Maybe DBSnapshot
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyDBSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
modifyDBSnapshotResponse_dbSnapshot :: Lens.Lens' ModifyDBSnapshotResponse (Prelude.Maybe DBSnapshot)
modifyDBSnapshotResponse_dbSnapshot :: (Maybe DBSnapshot -> f (Maybe DBSnapshot))
-> ModifyDBSnapshotResponse -> f ModifyDBSnapshotResponse
modifyDBSnapshotResponse_dbSnapshot = (ModifyDBSnapshotResponse -> Maybe DBSnapshot)
-> (ModifyDBSnapshotResponse
    -> Maybe DBSnapshot -> ModifyDBSnapshotResponse)
-> Lens
     ModifyDBSnapshotResponse
     ModifyDBSnapshotResponse
     (Maybe DBSnapshot)
     (Maybe DBSnapshot)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBSnapshotResponse' {Maybe DBSnapshot
dbSnapshot :: Maybe DBSnapshot
$sel:dbSnapshot:ModifyDBSnapshotResponse' :: ModifyDBSnapshotResponse -> Maybe DBSnapshot
dbSnapshot} -> Maybe DBSnapshot
dbSnapshot) (\s :: ModifyDBSnapshotResponse
s@ModifyDBSnapshotResponse' {} Maybe DBSnapshot
a -> ModifyDBSnapshotResponse
s {$sel:dbSnapshot:ModifyDBSnapshotResponse' :: Maybe DBSnapshot
dbSnapshot = Maybe DBSnapshot
a} :: ModifyDBSnapshotResponse)

-- | The response's http status code.
modifyDBSnapshotResponse_httpStatus :: Lens.Lens' ModifyDBSnapshotResponse Prelude.Int
modifyDBSnapshotResponse_httpStatus :: (Int -> f Int)
-> ModifyDBSnapshotResponse -> f ModifyDBSnapshotResponse
modifyDBSnapshotResponse_httpStatus = (ModifyDBSnapshotResponse -> Int)
-> (ModifyDBSnapshotResponse -> Int -> ModifyDBSnapshotResponse)
-> Lens ModifyDBSnapshotResponse ModifyDBSnapshotResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:ModifyDBSnapshotResponse' :: ModifyDBSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ModifyDBSnapshotResponse
s@ModifyDBSnapshotResponse' {} Int
a -> ModifyDBSnapshotResponse
s {$sel:httpStatus:ModifyDBSnapshotResponse' :: Int
httpStatus = Int
a} :: ModifyDBSnapshotResponse)

instance Prelude.NFData ModifyDBSnapshotResponse