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