{-# 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.QLDB.DeleteLedger
(
DeleteLedger (..),
newDeleteLedger,
deleteLedger_name,
DeleteLedgerResponse (..),
newDeleteLedgerResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QLDB.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteLedger = DeleteLedger'
{
DeleteLedger -> Text
name :: Prelude.Text
}
deriving (DeleteLedger -> DeleteLedger -> Bool
(DeleteLedger -> DeleteLedger -> Bool)
-> (DeleteLedger -> DeleteLedger -> Bool) -> Eq DeleteLedger
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLedger -> DeleteLedger -> Bool
$c/= :: DeleteLedger -> DeleteLedger -> Bool
== :: DeleteLedger -> DeleteLedger -> Bool
$c== :: DeleteLedger -> DeleteLedger -> Bool
Prelude.Eq, ReadPrec [DeleteLedger]
ReadPrec DeleteLedger
Int -> ReadS DeleteLedger
ReadS [DeleteLedger]
(Int -> ReadS DeleteLedger)
-> ReadS [DeleteLedger]
-> ReadPrec DeleteLedger
-> ReadPrec [DeleteLedger]
-> Read DeleteLedger
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLedger]
$creadListPrec :: ReadPrec [DeleteLedger]
readPrec :: ReadPrec DeleteLedger
$creadPrec :: ReadPrec DeleteLedger
readList :: ReadS [DeleteLedger]
$creadList :: ReadS [DeleteLedger]
readsPrec :: Int -> ReadS DeleteLedger
$creadsPrec :: Int -> ReadS DeleteLedger
Prelude.Read, Int -> DeleteLedger -> ShowS
[DeleteLedger] -> ShowS
DeleteLedger -> String
(Int -> DeleteLedger -> ShowS)
-> (DeleteLedger -> String)
-> ([DeleteLedger] -> ShowS)
-> Show DeleteLedger
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLedger] -> ShowS
$cshowList :: [DeleteLedger] -> ShowS
show :: DeleteLedger -> String
$cshow :: DeleteLedger -> String
showsPrec :: Int -> DeleteLedger -> ShowS
$cshowsPrec :: Int -> DeleteLedger -> ShowS
Prelude.Show, (forall x. DeleteLedger -> Rep DeleteLedger x)
-> (forall x. Rep DeleteLedger x -> DeleteLedger)
-> Generic DeleteLedger
forall x. Rep DeleteLedger x -> DeleteLedger
forall x. DeleteLedger -> Rep DeleteLedger x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteLedger x -> DeleteLedger
$cfrom :: forall x. DeleteLedger -> Rep DeleteLedger x
Prelude.Generic)
newDeleteLedger ::
Prelude.Text ->
DeleteLedger
newDeleteLedger :: Text -> DeleteLedger
newDeleteLedger Text
pName_ = DeleteLedger' :: Text -> DeleteLedger
DeleteLedger' {$sel:name:DeleteLedger' :: Text
name = Text
pName_}
deleteLedger_name :: Lens.Lens' DeleteLedger Prelude.Text
deleteLedger_name :: (Text -> f Text) -> DeleteLedger -> f DeleteLedger
deleteLedger_name = (DeleteLedger -> Text)
-> (DeleteLedger -> Text -> DeleteLedger)
-> Lens DeleteLedger DeleteLedger Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLedger' {Text
name :: Text
$sel:name:DeleteLedger' :: DeleteLedger -> Text
name} -> Text
name) (\s :: DeleteLedger
s@DeleteLedger' {} Text
a -> DeleteLedger
s {$sel:name:DeleteLedger' :: Text
name = Text
a} :: DeleteLedger)
instance Core.AWSRequest DeleteLedger where
type AWSResponse DeleteLedger = DeleteLedgerResponse
request :: DeleteLedger -> Request DeleteLedger
request = Service -> DeleteLedger -> Request DeleteLedger
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteLedger
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteLedger)))
response = AWSResponse DeleteLedger
-> Logger
-> Service
-> Proxy DeleteLedger
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteLedger)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteLedger
DeleteLedgerResponse
DeleteLedgerResponse'
instance Prelude.Hashable DeleteLedger
instance Prelude.NFData DeleteLedger
instance Core.ToHeaders DeleteLedger where
toHeaders :: DeleteLedger -> [Header]
toHeaders =
[Header] -> DeleteLedger -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteLedger where
toPath :: DeleteLedger -> ByteString
toPath DeleteLedger' {Text
name :: Text
$sel:name:DeleteLedger' :: DeleteLedger -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/ledgers/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]
instance Core.ToQuery DeleteLedger where
toQuery :: DeleteLedger -> QueryString
toQuery = QueryString -> DeleteLedger -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteLedgerResponse = DeleteLedgerResponse'
{
}
deriving (DeleteLedgerResponse -> DeleteLedgerResponse -> Bool
(DeleteLedgerResponse -> DeleteLedgerResponse -> Bool)
-> (DeleteLedgerResponse -> DeleteLedgerResponse -> Bool)
-> Eq DeleteLedgerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLedgerResponse -> DeleteLedgerResponse -> Bool
$c/= :: DeleteLedgerResponse -> DeleteLedgerResponse -> Bool
== :: DeleteLedgerResponse -> DeleteLedgerResponse -> Bool
$c== :: DeleteLedgerResponse -> DeleteLedgerResponse -> Bool
Prelude.Eq, ReadPrec [DeleteLedgerResponse]
ReadPrec DeleteLedgerResponse
Int -> ReadS DeleteLedgerResponse
ReadS [DeleteLedgerResponse]
(Int -> ReadS DeleteLedgerResponse)
-> ReadS [DeleteLedgerResponse]
-> ReadPrec DeleteLedgerResponse
-> ReadPrec [DeleteLedgerResponse]
-> Read DeleteLedgerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLedgerResponse]
$creadListPrec :: ReadPrec [DeleteLedgerResponse]
readPrec :: ReadPrec DeleteLedgerResponse
$creadPrec :: ReadPrec DeleteLedgerResponse
readList :: ReadS [DeleteLedgerResponse]
$creadList :: ReadS [DeleteLedgerResponse]
readsPrec :: Int -> ReadS DeleteLedgerResponse
$creadsPrec :: Int -> ReadS DeleteLedgerResponse
Prelude.Read, Int -> DeleteLedgerResponse -> ShowS
[DeleteLedgerResponse] -> ShowS
DeleteLedgerResponse -> String
(Int -> DeleteLedgerResponse -> ShowS)
-> (DeleteLedgerResponse -> String)
-> ([DeleteLedgerResponse] -> ShowS)
-> Show DeleteLedgerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLedgerResponse] -> ShowS
$cshowList :: [DeleteLedgerResponse] -> ShowS
show :: DeleteLedgerResponse -> String
$cshow :: DeleteLedgerResponse -> String
showsPrec :: Int -> DeleteLedgerResponse -> ShowS
$cshowsPrec :: Int -> DeleteLedgerResponse -> ShowS
Prelude.Show, (forall x. DeleteLedgerResponse -> Rep DeleteLedgerResponse x)
-> (forall x. Rep DeleteLedgerResponse x -> DeleteLedgerResponse)
-> Generic DeleteLedgerResponse
forall x. Rep DeleteLedgerResponse x -> DeleteLedgerResponse
forall x. DeleteLedgerResponse -> Rep DeleteLedgerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteLedgerResponse x -> DeleteLedgerResponse
$cfrom :: forall x. DeleteLedgerResponse -> Rep DeleteLedgerResponse x
Prelude.Generic)
newDeleteLedgerResponse ::
DeleteLedgerResponse
newDeleteLedgerResponse :: DeleteLedgerResponse
newDeleteLedgerResponse = DeleteLedgerResponse
DeleteLedgerResponse'
instance Prelude.NFData DeleteLedgerResponse