{-# 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.DeleteDBClusterSnapshot
(
DeleteDBClusterSnapshot (..),
newDeleteDBClusterSnapshot,
deleteDBClusterSnapshot_dbClusterSnapshotIdentifier,
DeleteDBClusterSnapshotResponse (..),
newDeleteDBClusterSnapshotResponse,
deleteDBClusterSnapshotResponse_dbClusterSnapshot,
deleteDBClusterSnapshotResponse_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
data DeleteDBClusterSnapshot = DeleteDBClusterSnapshot'
{
DeleteDBClusterSnapshot -> Text
dbClusterSnapshotIdentifier :: Prelude.Text
}
deriving (DeleteDBClusterSnapshot -> DeleteDBClusterSnapshot -> Bool
(DeleteDBClusterSnapshot -> DeleteDBClusterSnapshot -> Bool)
-> (DeleteDBClusterSnapshot -> DeleteDBClusterSnapshot -> Bool)
-> Eq DeleteDBClusterSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDBClusterSnapshot -> DeleteDBClusterSnapshot -> Bool
$c/= :: DeleteDBClusterSnapshot -> DeleteDBClusterSnapshot -> Bool
== :: DeleteDBClusterSnapshot -> DeleteDBClusterSnapshot -> Bool
$c== :: DeleteDBClusterSnapshot -> DeleteDBClusterSnapshot -> Bool
Prelude.Eq, ReadPrec [DeleteDBClusterSnapshot]
ReadPrec DeleteDBClusterSnapshot
Int -> ReadS DeleteDBClusterSnapshot
ReadS [DeleteDBClusterSnapshot]
(Int -> ReadS DeleteDBClusterSnapshot)
-> ReadS [DeleteDBClusterSnapshot]
-> ReadPrec DeleteDBClusterSnapshot
-> ReadPrec [DeleteDBClusterSnapshot]
-> Read DeleteDBClusterSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDBClusterSnapshot]
$creadListPrec :: ReadPrec [DeleteDBClusterSnapshot]
readPrec :: ReadPrec DeleteDBClusterSnapshot
$creadPrec :: ReadPrec DeleteDBClusterSnapshot
readList :: ReadS [DeleteDBClusterSnapshot]
$creadList :: ReadS [DeleteDBClusterSnapshot]
readsPrec :: Int -> ReadS DeleteDBClusterSnapshot
$creadsPrec :: Int -> ReadS DeleteDBClusterSnapshot
Prelude.Read, Int -> DeleteDBClusterSnapshot -> ShowS
[DeleteDBClusterSnapshot] -> ShowS
DeleteDBClusterSnapshot -> String
(Int -> DeleteDBClusterSnapshot -> ShowS)
-> (DeleteDBClusterSnapshot -> String)
-> ([DeleteDBClusterSnapshot] -> ShowS)
-> Show DeleteDBClusterSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDBClusterSnapshot] -> ShowS
$cshowList :: [DeleteDBClusterSnapshot] -> ShowS
show :: DeleteDBClusterSnapshot -> String
$cshow :: DeleteDBClusterSnapshot -> String
showsPrec :: Int -> DeleteDBClusterSnapshot -> ShowS
$cshowsPrec :: Int -> DeleteDBClusterSnapshot -> ShowS
Prelude.Show, (forall x.
DeleteDBClusterSnapshot -> Rep DeleteDBClusterSnapshot x)
-> (forall x.
Rep DeleteDBClusterSnapshot x -> DeleteDBClusterSnapshot)
-> Generic DeleteDBClusterSnapshot
forall x. Rep DeleteDBClusterSnapshot x -> DeleteDBClusterSnapshot
forall x. DeleteDBClusterSnapshot -> Rep DeleteDBClusterSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDBClusterSnapshot x -> DeleteDBClusterSnapshot
$cfrom :: forall x. DeleteDBClusterSnapshot -> Rep DeleteDBClusterSnapshot x
Prelude.Generic)
newDeleteDBClusterSnapshot ::
Prelude.Text ->
DeleteDBClusterSnapshot
newDeleteDBClusterSnapshot :: Text -> DeleteDBClusterSnapshot
newDeleteDBClusterSnapshot
Text
pDBClusterSnapshotIdentifier_ =
DeleteDBClusterSnapshot' :: Text -> DeleteDBClusterSnapshot
DeleteDBClusterSnapshot'
{ $sel:dbClusterSnapshotIdentifier:DeleteDBClusterSnapshot' :: Text
dbClusterSnapshotIdentifier =
Text
pDBClusterSnapshotIdentifier_
}
deleteDBClusterSnapshot_dbClusterSnapshotIdentifier :: Lens.Lens' DeleteDBClusterSnapshot Prelude.Text
deleteDBClusterSnapshot_dbClusterSnapshotIdentifier :: (Text -> f Text)
-> DeleteDBClusterSnapshot -> f DeleteDBClusterSnapshot
deleteDBClusterSnapshot_dbClusterSnapshotIdentifier = (DeleteDBClusterSnapshot -> Text)
-> (DeleteDBClusterSnapshot -> Text -> DeleteDBClusterSnapshot)
-> Lens DeleteDBClusterSnapshot DeleteDBClusterSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterSnapshot' {Text
dbClusterSnapshotIdentifier :: Text
$sel:dbClusterSnapshotIdentifier:DeleteDBClusterSnapshot' :: DeleteDBClusterSnapshot -> Text
dbClusterSnapshotIdentifier} -> Text
dbClusterSnapshotIdentifier) (\s :: DeleteDBClusterSnapshot
s@DeleteDBClusterSnapshot' {} Text
a -> DeleteDBClusterSnapshot
s {$sel:dbClusterSnapshotIdentifier:DeleteDBClusterSnapshot' :: Text
dbClusterSnapshotIdentifier = Text
a} :: DeleteDBClusterSnapshot)
instance Core.AWSRequest DeleteDBClusterSnapshot where
type
AWSResponse DeleteDBClusterSnapshot =
DeleteDBClusterSnapshotResponse
request :: DeleteDBClusterSnapshot -> Request DeleteDBClusterSnapshot
request = Service
-> DeleteDBClusterSnapshot -> Request DeleteDBClusterSnapshot
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteDBClusterSnapshot
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDBClusterSnapshot)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteDBClusterSnapshot))
-> Logger
-> Service
-> Proxy DeleteDBClusterSnapshot
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDBClusterSnapshot)))
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
"DeleteDBClusterSnapshotResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DBClusterSnapshot -> Int -> DeleteDBClusterSnapshotResponse
DeleteDBClusterSnapshotResponse'
(Maybe DBClusterSnapshot -> Int -> DeleteDBClusterSnapshotResponse)
-> Either String (Maybe DBClusterSnapshot)
-> Either String (Int -> DeleteDBClusterSnapshotResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBClusterSnapshot)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterSnapshot")
Either String (Int -> DeleteDBClusterSnapshotResponse)
-> Either String Int
-> Either String DeleteDBClusterSnapshotResponse
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 DeleteDBClusterSnapshot
instance Prelude.NFData DeleteDBClusterSnapshot
instance Core.ToHeaders DeleteDBClusterSnapshot where
toHeaders :: DeleteDBClusterSnapshot -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteDBClusterSnapshot -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteDBClusterSnapshot where
toPath :: DeleteDBClusterSnapshot -> ByteString
toPath = ByteString -> DeleteDBClusterSnapshot -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteDBClusterSnapshot where
toQuery :: DeleteDBClusterSnapshot -> QueryString
toQuery DeleteDBClusterSnapshot' {Text
dbClusterSnapshotIdentifier :: Text
$sel:dbClusterSnapshotIdentifier:DeleteDBClusterSnapshot' :: DeleteDBClusterSnapshot -> 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
"DeleteDBClusterSnapshot" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"DBClusterSnapshotIdentifier"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterSnapshotIdentifier
]
data DeleteDBClusterSnapshotResponse = DeleteDBClusterSnapshotResponse'
{ DeleteDBClusterSnapshotResponse -> Maybe DBClusterSnapshot
dbClusterSnapshot :: Prelude.Maybe DBClusterSnapshot,
DeleteDBClusterSnapshotResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteDBClusterSnapshotResponse
-> DeleteDBClusterSnapshotResponse -> Bool
(DeleteDBClusterSnapshotResponse
-> DeleteDBClusterSnapshotResponse -> Bool)
-> (DeleteDBClusterSnapshotResponse
-> DeleteDBClusterSnapshotResponse -> Bool)
-> Eq DeleteDBClusterSnapshotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDBClusterSnapshotResponse
-> DeleteDBClusterSnapshotResponse -> Bool
$c/= :: DeleteDBClusterSnapshotResponse
-> DeleteDBClusterSnapshotResponse -> Bool
== :: DeleteDBClusterSnapshotResponse
-> DeleteDBClusterSnapshotResponse -> Bool
$c== :: DeleteDBClusterSnapshotResponse
-> DeleteDBClusterSnapshotResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDBClusterSnapshotResponse]
ReadPrec DeleteDBClusterSnapshotResponse
Int -> ReadS DeleteDBClusterSnapshotResponse
ReadS [DeleteDBClusterSnapshotResponse]
(Int -> ReadS DeleteDBClusterSnapshotResponse)
-> ReadS [DeleteDBClusterSnapshotResponse]
-> ReadPrec DeleteDBClusterSnapshotResponse
-> ReadPrec [DeleteDBClusterSnapshotResponse]
-> Read DeleteDBClusterSnapshotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDBClusterSnapshotResponse]
$creadListPrec :: ReadPrec [DeleteDBClusterSnapshotResponse]
readPrec :: ReadPrec DeleteDBClusterSnapshotResponse
$creadPrec :: ReadPrec DeleteDBClusterSnapshotResponse
readList :: ReadS [DeleteDBClusterSnapshotResponse]
$creadList :: ReadS [DeleteDBClusterSnapshotResponse]
readsPrec :: Int -> ReadS DeleteDBClusterSnapshotResponse
$creadsPrec :: Int -> ReadS DeleteDBClusterSnapshotResponse
Prelude.Read, Int -> DeleteDBClusterSnapshotResponse -> ShowS
[DeleteDBClusterSnapshotResponse] -> ShowS
DeleteDBClusterSnapshotResponse -> String
(Int -> DeleteDBClusterSnapshotResponse -> ShowS)
-> (DeleteDBClusterSnapshotResponse -> String)
-> ([DeleteDBClusterSnapshotResponse] -> ShowS)
-> Show DeleteDBClusterSnapshotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDBClusterSnapshotResponse] -> ShowS
$cshowList :: [DeleteDBClusterSnapshotResponse] -> ShowS
show :: DeleteDBClusterSnapshotResponse -> String
$cshow :: DeleteDBClusterSnapshotResponse -> String
showsPrec :: Int -> DeleteDBClusterSnapshotResponse -> ShowS
$cshowsPrec :: Int -> DeleteDBClusterSnapshotResponse -> ShowS
Prelude.Show, (forall x.
DeleteDBClusterSnapshotResponse
-> Rep DeleteDBClusterSnapshotResponse x)
-> (forall x.
Rep DeleteDBClusterSnapshotResponse x
-> DeleteDBClusterSnapshotResponse)
-> Generic DeleteDBClusterSnapshotResponse
forall x.
Rep DeleteDBClusterSnapshotResponse x
-> DeleteDBClusterSnapshotResponse
forall x.
DeleteDBClusterSnapshotResponse
-> Rep DeleteDBClusterSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDBClusterSnapshotResponse x
-> DeleteDBClusterSnapshotResponse
$cfrom :: forall x.
DeleteDBClusterSnapshotResponse
-> Rep DeleteDBClusterSnapshotResponse x
Prelude.Generic)
newDeleteDBClusterSnapshotResponse ::
Prelude.Int ->
DeleteDBClusterSnapshotResponse
newDeleteDBClusterSnapshotResponse :: Int -> DeleteDBClusterSnapshotResponse
newDeleteDBClusterSnapshotResponse Int
pHttpStatus_ =
DeleteDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot -> Int -> DeleteDBClusterSnapshotResponse
DeleteDBClusterSnapshotResponse'
{ $sel:dbClusterSnapshot:DeleteDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot
dbClusterSnapshot =
Maybe DBClusterSnapshot
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteDBClusterSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteDBClusterSnapshotResponse_dbClusterSnapshot :: Lens.Lens' DeleteDBClusterSnapshotResponse (Prelude.Maybe DBClusterSnapshot)
deleteDBClusterSnapshotResponse_dbClusterSnapshot :: (Maybe DBClusterSnapshot -> f (Maybe DBClusterSnapshot))
-> DeleteDBClusterSnapshotResponse
-> f DeleteDBClusterSnapshotResponse
deleteDBClusterSnapshotResponse_dbClusterSnapshot = (DeleteDBClusterSnapshotResponse -> Maybe DBClusterSnapshot)
-> (DeleteDBClusterSnapshotResponse
-> Maybe DBClusterSnapshot -> DeleteDBClusterSnapshotResponse)
-> Lens
DeleteDBClusterSnapshotResponse
DeleteDBClusterSnapshotResponse
(Maybe DBClusterSnapshot)
(Maybe DBClusterSnapshot)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterSnapshotResponse' {Maybe DBClusterSnapshot
dbClusterSnapshot :: Maybe DBClusterSnapshot
$sel:dbClusterSnapshot:DeleteDBClusterSnapshotResponse' :: DeleteDBClusterSnapshotResponse -> Maybe DBClusterSnapshot
dbClusterSnapshot} -> Maybe DBClusterSnapshot
dbClusterSnapshot) (\s :: DeleteDBClusterSnapshotResponse
s@DeleteDBClusterSnapshotResponse' {} Maybe DBClusterSnapshot
a -> DeleteDBClusterSnapshotResponse
s {$sel:dbClusterSnapshot:DeleteDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot
dbClusterSnapshot = Maybe DBClusterSnapshot
a} :: DeleteDBClusterSnapshotResponse)
deleteDBClusterSnapshotResponse_httpStatus :: Lens.Lens' DeleteDBClusterSnapshotResponse Prelude.Int
deleteDBClusterSnapshotResponse_httpStatus :: (Int -> f Int)
-> DeleteDBClusterSnapshotResponse
-> f DeleteDBClusterSnapshotResponse
deleteDBClusterSnapshotResponse_httpStatus = (DeleteDBClusterSnapshotResponse -> Int)
-> (DeleteDBClusterSnapshotResponse
-> Int -> DeleteDBClusterSnapshotResponse)
-> Lens
DeleteDBClusterSnapshotResponse
DeleteDBClusterSnapshotResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteDBClusterSnapshotResponse' :: DeleteDBClusterSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteDBClusterSnapshotResponse
s@DeleteDBClusterSnapshotResponse' {} Int
a -> DeleteDBClusterSnapshotResponse
s {$sel:httpStatus:DeleteDBClusterSnapshotResponse' :: Int
httpStatus = Int
a} :: DeleteDBClusterSnapshotResponse)
instance
Prelude.NFData
DeleteDBClusterSnapshotResponse