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