{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Glacier.InitiateVaultLock
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- This operation initiates the vault locking process by doing the
-- following:
--
-- -   Installing a vault lock policy on the specified vault.
--
-- -   Setting the lock state of vault lock to @InProgress@.
--
-- -   Returning a lock ID, which is used to complete the vault locking
--     process.
--
-- You can set one vault lock policy for each vault and this policy can be
-- up to 20 KB in size. For more information about vault lock policies, see
-- <https://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html Amazon Glacier Access Control with Vault Lock Policies>.
--
-- You must complete the vault locking process within 24 hours after the
-- vault lock enters the @InProgress@ state. After the 24 hour window ends,
-- the lock ID expires, the vault automatically exits the @InProgress@
-- state, and the vault lock policy is removed from the vault. You call
-- CompleteVaultLock to complete the vault locking process by setting the
-- state of the vault lock to @Locked@.
--
-- After a vault lock is in the @Locked@ state, you cannot initiate a new
-- vault lock for the vault.
--
-- You can abort the vault locking process by calling AbortVaultLock. You
-- can get the state of the vault lock by calling GetVaultLock. For more
-- information about the vault locking process,
-- <https://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html Amazon Glacier Vault Lock>.
--
-- If this operation is called when the vault lock is in the @InProgress@
-- state, the operation returns an @AccessDeniedException@ error. When the
-- vault lock is in the @InProgress@ state you must call AbortVaultLock
-- before you can initiate a new vault lock policy.
module Amazonka.Glacier.InitiateVaultLock
  ( -- * Creating a Request
    InitiateVaultLock (..),
    newInitiateVaultLock,

    -- * Request Lenses
    initiateVaultLock_policy,
    initiateVaultLock_accountId,
    initiateVaultLock_vaultName,

    -- * Destructuring the Response
    InitiateVaultLockResponse (..),
    newInitiateVaultLockResponse,

    -- * Response Lenses
    initiateVaultLockResponse_lockId,
    initiateVaultLockResponse_httpStatus,
  )
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

-- | The input values for @InitiateVaultLock@.
--
-- /See:/ 'newInitiateVaultLock' smart constructor.
data InitiateVaultLock = InitiateVaultLock'
  { -- | The vault lock policy as a JSON string, which uses \"\\\" as an escape
    -- character.
    InitiateVaultLock -> Maybe VaultLockPolicy
policy :: Prelude.Maybe VaultLockPolicy,
    -- | The @AccountId@ value is the AWS account ID. This value must match the
    -- AWS account ID associated with the credentials used to sign the request.
    -- You can either specify an AWS account ID or optionally a single \'@-@\'
    -- (hyphen), in which case Amazon Glacier uses the AWS account ID
    -- associated with the credentials used to sign the request. If you specify
    -- your account ID, do not include any hyphens (\'-\') in the ID.
    InitiateVaultLock -> Text
accountId :: Prelude.Text,
    -- | The name of the vault.
    InitiateVaultLock -> Text
vaultName :: Prelude.Text
  }
  deriving (InitiateVaultLock -> InitiateVaultLock -> Bool
(InitiateVaultLock -> InitiateVaultLock -> Bool)
-> (InitiateVaultLock -> InitiateVaultLock -> Bool)
-> Eq InitiateVaultLock
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InitiateVaultLock -> InitiateVaultLock -> Bool
$c/= :: InitiateVaultLock -> InitiateVaultLock -> Bool
== :: InitiateVaultLock -> InitiateVaultLock -> Bool
$c== :: InitiateVaultLock -> InitiateVaultLock -> Bool
Prelude.Eq, ReadPrec [InitiateVaultLock]
ReadPrec InitiateVaultLock
Int -> ReadS InitiateVaultLock
ReadS [InitiateVaultLock]
(Int -> ReadS InitiateVaultLock)
-> ReadS [InitiateVaultLock]
-> ReadPrec InitiateVaultLock
-> ReadPrec [InitiateVaultLock]
-> Read InitiateVaultLock
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InitiateVaultLock]
$creadListPrec :: ReadPrec [InitiateVaultLock]
readPrec :: ReadPrec InitiateVaultLock
$creadPrec :: ReadPrec InitiateVaultLock
readList :: ReadS [InitiateVaultLock]
$creadList :: ReadS [InitiateVaultLock]
readsPrec :: Int -> ReadS InitiateVaultLock
$creadsPrec :: Int -> ReadS InitiateVaultLock
Prelude.Read, Int -> InitiateVaultLock -> ShowS
[InitiateVaultLock] -> ShowS
InitiateVaultLock -> String
(Int -> InitiateVaultLock -> ShowS)
-> (InitiateVaultLock -> String)
-> ([InitiateVaultLock] -> ShowS)
-> Show InitiateVaultLock
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InitiateVaultLock] -> ShowS
$cshowList :: [InitiateVaultLock] -> ShowS
show :: InitiateVaultLock -> String
$cshow :: InitiateVaultLock -> String
showsPrec :: Int -> InitiateVaultLock -> ShowS
$cshowsPrec :: Int -> InitiateVaultLock -> ShowS
Prelude.Show, (forall x. InitiateVaultLock -> Rep InitiateVaultLock x)
-> (forall x. Rep InitiateVaultLock x -> InitiateVaultLock)
-> Generic InitiateVaultLock
forall x. Rep InitiateVaultLock x -> InitiateVaultLock
forall x. InitiateVaultLock -> Rep InitiateVaultLock x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InitiateVaultLock x -> InitiateVaultLock
$cfrom :: forall x. InitiateVaultLock -> Rep InitiateVaultLock x
Prelude.Generic)

-- |
-- Create a value of 'InitiateVaultLock' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'policy', 'initiateVaultLock_policy' - The vault lock policy as a JSON string, which uses \"\\\" as an escape
-- character.
--
-- 'accountId', 'initiateVaultLock_accountId' - The @AccountId@ value is the AWS account ID. This value must match the
-- AWS account ID associated with the credentials used to sign the request.
-- You can either specify an AWS account ID or optionally a single \'@-@\'
-- (hyphen), in which case Amazon Glacier uses the AWS account ID
-- associated with the credentials used to sign the request. If you specify
-- your account ID, do not include any hyphens (\'-\') in the ID.
--
-- 'vaultName', 'initiateVaultLock_vaultName' - The name of the vault.
newInitiateVaultLock ::
  -- | 'accountId'
  Prelude.Text ->
  -- | 'vaultName'
  Prelude.Text ->
  InitiateVaultLock
newInitiateVaultLock :: Text -> Text -> InitiateVaultLock
newInitiateVaultLock Text
pAccountId_ Text
pVaultName_ =
  InitiateVaultLock' :: Maybe VaultLockPolicy -> Text -> Text -> InitiateVaultLock
InitiateVaultLock'
    { $sel:policy:InitiateVaultLock' :: Maybe VaultLockPolicy
policy = Maybe VaultLockPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:InitiateVaultLock' :: Text
accountId = Text
pAccountId_,
      $sel:vaultName:InitiateVaultLock' :: Text
vaultName = Text
pVaultName_
    }

-- | The vault lock policy as a JSON string, which uses \"\\\" as an escape
-- character.
initiateVaultLock_policy :: Lens.Lens' InitiateVaultLock (Prelude.Maybe VaultLockPolicy)
initiateVaultLock_policy :: (Maybe VaultLockPolicy -> f (Maybe VaultLockPolicy))
-> InitiateVaultLock -> f InitiateVaultLock
initiateVaultLock_policy = (InitiateVaultLock -> Maybe VaultLockPolicy)
-> (InitiateVaultLock
    -> Maybe VaultLockPolicy -> InitiateVaultLock)
-> Lens
     InitiateVaultLock
     InitiateVaultLock
     (Maybe VaultLockPolicy)
     (Maybe VaultLockPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InitiateVaultLock' {Maybe VaultLockPolicy
policy :: Maybe VaultLockPolicy
$sel:policy:InitiateVaultLock' :: InitiateVaultLock -> Maybe VaultLockPolicy
policy} -> Maybe VaultLockPolicy
policy) (\s :: InitiateVaultLock
s@InitiateVaultLock' {} Maybe VaultLockPolicy
a -> InitiateVaultLock
s {$sel:policy:InitiateVaultLock' :: Maybe VaultLockPolicy
policy = Maybe VaultLockPolicy
a} :: InitiateVaultLock)

-- | The @AccountId@ value is the AWS account ID. This value must match the
-- AWS account ID associated with the credentials used to sign the request.
-- You can either specify an AWS account ID or optionally a single \'@-@\'
-- (hyphen), in which case Amazon Glacier uses the AWS account ID
-- associated with the credentials used to sign the request. If you specify
-- your account ID, do not include any hyphens (\'-\') in the ID.
initiateVaultLock_accountId :: Lens.Lens' InitiateVaultLock Prelude.Text
initiateVaultLock_accountId :: (Text -> f Text) -> InitiateVaultLock -> f InitiateVaultLock
initiateVaultLock_accountId = (InitiateVaultLock -> Text)
-> (InitiateVaultLock -> Text -> InitiateVaultLock)
-> Lens InitiateVaultLock InitiateVaultLock Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InitiateVaultLock' {Text
accountId :: Text
$sel:accountId:InitiateVaultLock' :: InitiateVaultLock -> Text
accountId} -> Text
accountId) (\s :: InitiateVaultLock
s@InitiateVaultLock' {} Text
a -> InitiateVaultLock
s {$sel:accountId:InitiateVaultLock' :: Text
accountId = Text
a} :: InitiateVaultLock)

-- | The name of the vault.
initiateVaultLock_vaultName :: Lens.Lens' InitiateVaultLock Prelude.Text
initiateVaultLock_vaultName :: (Text -> f Text) -> InitiateVaultLock -> f InitiateVaultLock
initiateVaultLock_vaultName = (InitiateVaultLock -> Text)
-> (InitiateVaultLock -> Text -> InitiateVaultLock)
-> Lens InitiateVaultLock InitiateVaultLock Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InitiateVaultLock' {Text
vaultName :: Text
$sel:vaultName:InitiateVaultLock' :: InitiateVaultLock -> Text
vaultName} -> Text
vaultName) (\s :: InitiateVaultLock
s@InitiateVaultLock' {} Text
a -> InitiateVaultLock
s {$sel:vaultName:InitiateVaultLock' :: Text
vaultName = Text
a} :: InitiateVaultLock)

instance Core.AWSRequest InitiateVaultLock where
  type
    AWSResponse InitiateVaultLock =
      InitiateVaultLockResponse
  request :: InitiateVaultLock -> Request InitiateVaultLock
request =
    ByteString
-> Request InitiateVaultLock -> Request InitiateVaultLock
forall a. ByteString -> Request a -> Request a
Request.glacierVersionHeader (Service -> ByteString
Core._serviceVersion Service
defaultService)
      (Request InitiateVaultLock -> Request InitiateVaultLock)
-> (InitiateVaultLock -> Request InitiateVaultLock)
-> InitiateVaultLock
-> Request InitiateVaultLock
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> InitiateVaultLock -> Request InitiateVaultLock
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy InitiateVaultLock
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse InitiateVaultLock)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse InitiateVaultLock))
-> Logger
-> Service
-> Proxy InitiateVaultLock
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse InitiateVaultLock)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Maybe Text -> Int -> InitiateVaultLockResponse
InitiateVaultLockResponse'
            (Maybe Text -> Int -> InitiateVaultLockResponse)
-> Either String (Maybe Text)
-> Either String (Int -> InitiateVaultLockResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lock-id")
            Either String (Int -> InitiateVaultLockResponse)
-> Either String Int -> Either String InitiateVaultLockResponse
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 InitiateVaultLock

instance Prelude.NFData InitiateVaultLock

instance Core.ToHeaders InitiateVaultLock where
  toHeaders :: InitiateVaultLock -> ResponseHeaders
toHeaders = ResponseHeaders -> InitiateVaultLock -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON InitiateVaultLock where
  toJSON :: InitiateVaultLock -> Value
toJSON InitiateVaultLock' {Maybe VaultLockPolicy
Text
vaultName :: Text
accountId :: Text
policy :: Maybe VaultLockPolicy
$sel:vaultName:InitiateVaultLock' :: InitiateVaultLock -> Text
$sel:accountId:InitiateVaultLock' :: InitiateVaultLock -> Text
$sel:policy:InitiateVaultLock' :: InitiateVaultLock -> Maybe VaultLockPolicy
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"policy" Text -> VaultLockPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VaultLockPolicy -> Pair) -> Maybe VaultLockPolicy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VaultLockPolicy
policy]
      )

instance Core.ToPath InitiateVaultLock where
  toPath :: InitiateVaultLock -> ByteString
toPath InitiateVaultLock' {Maybe VaultLockPolicy
Text
vaultName :: Text
accountId :: Text
policy :: Maybe VaultLockPolicy
$sel:vaultName:InitiateVaultLock' :: InitiateVaultLock -> Text
$sel:accountId:InitiateVaultLock' :: InitiateVaultLock -> Text
$sel:policy:InitiateVaultLock' :: InitiateVaultLock -> Maybe VaultLockPolicy
..} =
    [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 InitiateVaultLock where
  toQuery :: InitiateVaultLock -> QueryString
toQuery = QueryString -> InitiateVaultLock -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Contains the Amazon S3 Glacier response to your request.
--
-- /See:/ 'newInitiateVaultLockResponse' smart constructor.
data InitiateVaultLockResponse = InitiateVaultLockResponse'
  { -- | The lock ID, which is used to complete the vault locking process.
    InitiateVaultLockResponse -> Maybe Text
lockId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    InitiateVaultLockResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (InitiateVaultLockResponse -> InitiateVaultLockResponse -> Bool
(InitiateVaultLockResponse -> InitiateVaultLockResponse -> Bool)
-> (InitiateVaultLockResponse -> InitiateVaultLockResponse -> Bool)
-> Eq InitiateVaultLockResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InitiateVaultLockResponse -> InitiateVaultLockResponse -> Bool
$c/= :: InitiateVaultLockResponse -> InitiateVaultLockResponse -> Bool
== :: InitiateVaultLockResponse -> InitiateVaultLockResponse -> Bool
$c== :: InitiateVaultLockResponse -> InitiateVaultLockResponse -> Bool
Prelude.Eq, ReadPrec [InitiateVaultLockResponse]
ReadPrec InitiateVaultLockResponse
Int -> ReadS InitiateVaultLockResponse
ReadS [InitiateVaultLockResponse]
(Int -> ReadS InitiateVaultLockResponse)
-> ReadS [InitiateVaultLockResponse]
-> ReadPrec InitiateVaultLockResponse
-> ReadPrec [InitiateVaultLockResponse]
-> Read InitiateVaultLockResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InitiateVaultLockResponse]
$creadListPrec :: ReadPrec [InitiateVaultLockResponse]
readPrec :: ReadPrec InitiateVaultLockResponse
$creadPrec :: ReadPrec InitiateVaultLockResponse
readList :: ReadS [InitiateVaultLockResponse]
$creadList :: ReadS [InitiateVaultLockResponse]
readsPrec :: Int -> ReadS InitiateVaultLockResponse
$creadsPrec :: Int -> ReadS InitiateVaultLockResponse
Prelude.Read, Int -> InitiateVaultLockResponse -> ShowS
[InitiateVaultLockResponse] -> ShowS
InitiateVaultLockResponse -> String
(Int -> InitiateVaultLockResponse -> ShowS)
-> (InitiateVaultLockResponse -> String)
-> ([InitiateVaultLockResponse] -> ShowS)
-> Show InitiateVaultLockResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InitiateVaultLockResponse] -> ShowS
$cshowList :: [InitiateVaultLockResponse] -> ShowS
show :: InitiateVaultLockResponse -> String
$cshow :: InitiateVaultLockResponse -> String
showsPrec :: Int -> InitiateVaultLockResponse -> ShowS
$cshowsPrec :: Int -> InitiateVaultLockResponse -> ShowS
Prelude.Show, (forall x.
 InitiateVaultLockResponse -> Rep InitiateVaultLockResponse x)
-> (forall x.
    Rep InitiateVaultLockResponse x -> InitiateVaultLockResponse)
-> Generic InitiateVaultLockResponse
forall x.
Rep InitiateVaultLockResponse x -> InitiateVaultLockResponse
forall x.
InitiateVaultLockResponse -> Rep InitiateVaultLockResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InitiateVaultLockResponse x -> InitiateVaultLockResponse
$cfrom :: forall x.
InitiateVaultLockResponse -> Rep InitiateVaultLockResponse x
Prelude.Generic)

-- |
-- Create a value of 'InitiateVaultLockResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'lockId', 'initiateVaultLockResponse_lockId' - The lock ID, which is used to complete the vault locking process.
--
-- 'httpStatus', 'initiateVaultLockResponse_httpStatus' - The response's http status code.
newInitiateVaultLockResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  InitiateVaultLockResponse
newInitiateVaultLockResponse :: Int -> InitiateVaultLockResponse
newInitiateVaultLockResponse Int
pHttpStatus_ =
  InitiateVaultLockResponse' :: Maybe Text -> Int -> InitiateVaultLockResponse
InitiateVaultLockResponse'
    { $sel:lockId:InitiateVaultLockResponse' :: Maybe Text
lockId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:InitiateVaultLockResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The lock ID, which is used to complete the vault locking process.
initiateVaultLockResponse_lockId :: Lens.Lens' InitiateVaultLockResponse (Prelude.Maybe Prelude.Text)
initiateVaultLockResponse_lockId :: (Maybe Text -> f (Maybe Text))
-> InitiateVaultLockResponse -> f InitiateVaultLockResponse
initiateVaultLockResponse_lockId = (InitiateVaultLockResponse -> Maybe Text)
-> (InitiateVaultLockResponse
    -> Maybe Text -> InitiateVaultLockResponse)
-> Lens
     InitiateVaultLockResponse
     InitiateVaultLockResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InitiateVaultLockResponse' {Maybe Text
lockId :: Maybe Text
$sel:lockId:InitiateVaultLockResponse' :: InitiateVaultLockResponse -> Maybe Text
lockId} -> Maybe Text
lockId) (\s :: InitiateVaultLockResponse
s@InitiateVaultLockResponse' {} Maybe Text
a -> InitiateVaultLockResponse
s {$sel:lockId:InitiateVaultLockResponse' :: Maybe Text
lockId = Maybe Text
a} :: InitiateVaultLockResponse)

-- | The response's http status code.
initiateVaultLockResponse_httpStatus :: Lens.Lens' InitiateVaultLockResponse Prelude.Int
initiateVaultLockResponse_httpStatus :: (Int -> f Int)
-> InitiateVaultLockResponse -> f InitiateVaultLockResponse
initiateVaultLockResponse_httpStatus = (InitiateVaultLockResponse -> Int)
-> (InitiateVaultLockResponse -> Int -> InitiateVaultLockResponse)
-> Lens InitiateVaultLockResponse InitiateVaultLockResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InitiateVaultLockResponse' {Int
httpStatus :: Int
$sel:httpStatus:InitiateVaultLockResponse' :: InitiateVaultLockResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: InitiateVaultLockResponse
s@InitiateVaultLockResponse' {} Int
a -> InitiateVaultLockResponse
s {$sel:httpStatus:InitiateVaultLockResponse' :: Int
httpStatus = Int
a} :: InitiateVaultLockResponse)

instance Prelude.NFData InitiateVaultLockResponse