{-# 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.Glacier.DeleteVault
(
DeleteVault (..),
newDeleteVault,
deleteVault_accountId,
deleteVault_vaultName,
DeleteVaultResponse (..),
newDeleteVaultResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glacier.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteVault = DeleteVault'
{
DeleteVault -> Text
accountId :: Prelude.Text,
DeleteVault -> Text
vaultName :: Prelude.Text
}
deriving (DeleteVault -> DeleteVault -> Bool
(DeleteVault -> DeleteVault -> Bool)
-> (DeleteVault -> DeleteVault -> Bool) -> Eq DeleteVault
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVault -> DeleteVault -> Bool
$c/= :: DeleteVault -> DeleteVault -> Bool
== :: DeleteVault -> DeleteVault -> Bool
$c== :: DeleteVault -> DeleteVault -> Bool
Prelude.Eq, ReadPrec [DeleteVault]
ReadPrec DeleteVault
Int -> ReadS DeleteVault
ReadS [DeleteVault]
(Int -> ReadS DeleteVault)
-> ReadS [DeleteVault]
-> ReadPrec DeleteVault
-> ReadPrec [DeleteVault]
-> Read DeleteVault
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVault]
$creadListPrec :: ReadPrec [DeleteVault]
readPrec :: ReadPrec DeleteVault
$creadPrec :: ReadPrec DeleteVault
readList :: ReadS [DeleteVault]
$creadList :: ReadS [DeleteVault]
readsPrec :: Int -> ReadS DeleteVault
$creadsPrec :: Int -> ReadS DeleteVault
Prelude.Read, Int -> DeleteVault -> ShowS
[DeleteVault] -> ShowS
DeleteVault -> String
(Int -> DeleteVault -> ShowS)
-> (DeleteVault -> String)
-> ([DeleteVault] -> ShowS)
-> Show DeleteVault
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVault] -> ShowS
$cshowList :: [DeleteVault] -> ShowS
show :: DeleteVault -> String
$cshow :: DeleteVault -> String
showsPrec :: Int -> DeleteVault -> ShowS
$cshowsPrec :: Int -> DeleteVault -> ShowS
Prelude.Show, (forall x. DeleteVault -> Rep DeleteVault x)
-> (forall x. Rep DeleteVault x -> DeleteVault)
-> Generic DeleteVault
forall x. Rep DeleteVault x -> DeleteVault
forall x. DeleteVault -> Rep DeleteVault x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteVault x -> DeleteVault
$cfrom :: forall x. DeleteVault -> Rep DeleteVault x
Prelude.Generic)
newDeleteVault ::
Prelude.Text ->
Prelude.Text ->
DeleteVault
newDeleteVault :: Text -> Text -> DeleteVault
newDeleteVault Text
pAccountId_ Text
pVaultName_ =
DeleteVault' :: Text -> Text -> DeleteVault
DeleteVault'
{ $sel:accountId:DeleteVault' :: Text
accountId = Text
pAccountId_,
$sel:vaultName:DeleteVault' :: Text
vaultName = Text
pVaultName_
}
deleteVault_accountId :: Lens.Lens' DeleteVault Prelude.Text
deleteVault_accountId :: (Text -> f Text) -> DeleteVault -> f DeleteVault
deleteVault_accountId = (DeleteVault -> Text)
-> (DeleteVault -> Text -> DeleteVault)
-> Lens DeleteVault DeleteVault Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVault' {Text
accountId :: Text
$sel:accountId:DeleteVault' :: DeleteVault -> Text
accountId} -> Text
accountId) (\s :: DeleteVault
s@DeleteVault' {} Text
a -> DeleteVault
s {$sel:accountId:DeleteVault' :: Text
accountId = Text
a} :: DeleteVault)
deleteVault_vaultName :: Lens.Lens' DeleteVault Prelude.Text
deleteVault_vaultName :: (Text -> f Text) -> DeleteVault -> f DeleteVault
deleteVault_vaultName = (DeleteVault -> Text)
-> (DeleteVault -> Text -> DeleteVault)
-> Lens DeleteVault DeleteVault Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVault' {Text
vaultName :: Text
$sel:vaultName:DeleteVault' :: DeleteVault -> Text
vaultName} -> Text
vaultName) (\s :: DeleteVault
s@DeleteVault' {} Text
a -> DeleteVault
s {$sel:vaultName:DeleteVault' :: Text
vaultName = Text
a} :: DeleteVault)
instance Core.AWSRequest DeleteVault where
type AWSResponse DeleteVault = DeleteVaultResponse
request :: DeleteVault -> Request DeleteVault
request =
ByteString -> Request DeleteVault -> Request DeleteVault
forall a. ByteString -> Request a -> Request a
Request.glacierVersionHeader (Service -> ByteString
Core._serviceVersion Service
defaultService)
(Request DeleteVault -> Request DeleteVault)
-> (DeleteVault -> Request DeleteVault)
-> DeleteVault
-> Request DeleteVault
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> DeleteVault -> Request DeleteVault
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteVault
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteVault)))
response = AWSResponse DeleteVault
-> Logger
-> Service
-> Proxy DeleteVault
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteVault)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteVault
DeleteVaultResponse
DeleteVaultResponse'
instance Prelude.Hashable DeleteVault
instance Prelude.NFData DeleteVault
instance Core.ToHeaders DeleteVault where
toHeaders :: DeleteVault -> [Header]
toHeaders = [Header] -> DeleteVault -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteVault where
toPath :: DeleteVault -> ByteString
toPath DeleteVault' {Text
vaultName :: Text
accountId :: Text
$sel:vaultName:DeleteVault' :: DeleteVault -> Text
$sel:accountId:DeleteVault' :: DeleteVault -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
accountId,
ByteString
"/vaults/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
vaultName
]
instance Core.ToQuery DeleteVault where
toQuery :: DeleteVault -> QueryString
toQuery = QueryString -> DeleteVault -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteVaultResponse = DeleteVaultResponse'
{
}
deriving (DeleteVaultResponse -> DeleteVaultResponse -> Bool
(DeleteVaultResponse -> DeleteVaultResponse -> Bool)
-> (DeleteVaultResponse -> DeleteVaultResponse -> Bool)
-> Eq DeleteVaultResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVaultResponse -> DeleteVaultResponse -> Bool
$c/= :: DeleteVaultResponse -> DeleteVaultResponse -> Bool
== :: DeleteVaultResponse -> DeleteVaultResponse -> Bool
$c== :: DeleteVaultResponse -> DeleteVaultResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVaultResponse]
ReadPrec DeleteVaultResponse
Int -> ReadS DeleteVaultResponse
ReadS [DeleteVaultResponse]
(Int -> ReadS DeleteVaultResponse)
-> ReadS [DeleteVaultResponse]
-> ReadPrec DeleteVaultResponse
-> ReadPrec [DeleteVaultResponse]
-> Read DeleteVaultResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVaultResponse]
$creadListPrec :: ReadPrec [DeleteVaultResponse]
readPrec :: ReadPrec DeleteVaultResponse
$creadPrec :: ReadPrec DeleteVaultResponse
readList :: ReadS [DeleteVaultResponse]
$creadList :: ReadS [DeleteVaultResponse]
readsPrec :: Int -> ReadS DeleteVaultResponse
$creadsPrec :: Int -> ReadS DeleteVaultResponse
Prelude.Read, Int -> DeleteVaultResponse -> ShowS
[DeleteVaultResponse] -> ShowS
DeleteVaultResponse -> String
(Int -> DeleteVaultResponse -> ShowS)
-> (DeleteVaultResponse -> String)
-> ([DeleteVaultResponse] -> ShowS)
-> Show DeleteVaultResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVaultResponse] -> ShowS
$cshowList :: [DeleteVaultResponse] -> ShowS
show :: DeleteVaultResponse -> String
$cshow :: DeleteVaultResponse -> String
showsPrec :: Int -> DeleteVaultResponse -> ShowS
$cshowsPrec :: Int -> DeleteVaultResponse -> ShowS
Prelude.Show, (forall x. DeleteVaultResponse -> Rep DeleteVaultResponse x)
-> (forall x. Rep DeleteVaultResponse x -> DeleteVaultResponse)
-> Generic DeleteVaultResponse
forall x. Rep DeleteVaultResponse x -> DeleteVaultResponse
forall x. DeleteVaultResponse -> Rep DeleteVaultResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteVaultResponse x -> DeleteVaultResponse
$cfrom :: forall x. DeleteVaultResponse -> Rep DeleteVaultResponse x
Prelude.Generic)
newDeleteVaultResponse ::
DeleteVaultResponse
newDeleteVaultResponse :: DeleteVaultResponse
newDeleteVaultResponse = DeleteVaultResponse
DeleteVaultResponse'
instance Prelude.NFData DeleteVaultResponse