{-# 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.Backup.DescribeBackupVault
-- 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)
--
-- Returns metadata about a backup vault specified by its name.
module Amazonka.Backup.DescribeBackupVault
  ( -- * Creating a Request
    DescribeBackupVault (..),
    newDescribeBackupVault,

    -- * Request Lenses
    describeBackupVault_backupVaultName,

    -- * Destructuring the Response
    DescribeBackupVaultResponse (..),
    newDescribeBackupVaultResponse,

    -- * Response Lenses
    describeBackupVaultResponse_lockDate,
    describeBackupVaultResponse_maxRetentionDays,
    describeBackupVaultResponse_locked,
    describeBackupVaultResponse_creatorRequestId,
    describeBackupVaultResponse_numberOfRecoveryPoints,
    describeBackupVaultResponse_backupVaultArn,
    describeBackupVaultResponse_encryptionKeyArn,
    describeBackupVaultResponse_creationDate,
    describeBackupVaultResponse_backupVaultName,
    describeBackupVaultResponse_minRetentionDays,
    describeBackupVaultResponse_httpStatus,
  )
where

import Amazonka.Backup.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeBackupVault' smart constructor.
data DescribeBackupVault = DescribeBackupVault'
  { -- | The name of a logical container where backups are stored. Backup vaults
    -- are identified by names that are unique to the account used to create
    -- them and the Amazon Web Services Region where they are created. They
    -- consist of lowercase letters, numbers, and hyphens.
    DescribeBackupVault -> Text
backupVaultName :: Prelude.Text
  }
  deriving (DescribeBackupVault -> DescribeBackupVault -> Bool
(DescribeBackupVault -> DescribeBackupVault -> Bool)
-> (DescribeBackupVault -> DescribeBackupVault -> Bool)
-> Eq DescribeBackupVault
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBackupVault -> DescribeBackupVault -> Bool
$c/= :: DescribeBackupVault -> DescribeBackupVault -> Bool
== :: DescribeBackupVault -> DescribeBackupVault -> Bool
$c== :: DescribeBackupVault -> DescribeBackupVault -> Bool
Prelude.Eq, ReadPrec [DescribeBackupVault]
ReadPrec DescribeBackupVault
Int -> ReadS DescribeBackupVault
ReadS [DescribeBackupVault]
(Int -> ReadS DescribeBackupVault)
-> ReadS [DescribeBackupVault]
-> ReadPrec DescribeBackupVault
-> ReadPrec [DescribeBackupVault]
-> Read DescribeBackupVault
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBackupVault]
$creadListPrec :: ReadPrec [DescribeBackupVault]
readPrec :: ReadPrec DescribeBackupVault
$creadPrec :: ReadPrec DescribeBackupVault
readList :: ReadS [DescribeBackupVault]
$creadList :: ReadS [DescribeBackupVault]
readsPrec :: Int -> ReadS DescribeBackupVault
$creadsPrec :: Int -> ReadS DescribeBackupVault
Prelude.Read, Int -> DescribeBackupVault -> ShowS
[DescribeBackupVault] -> ShowS
DescribeBackupVault -> String
(Int -> DescribeBackupVault -> ShowS)
-> (DescribeBackupVault -> String)
-> ([DescribeBackupVault] -> ShowS)
-> Show DescribeBackupVault
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBackupVault] -> ShowS
$cshowList :: [DescribeBackupVault] -> ShowS
show :: DescribeBackupVault -> String
$cshow :: DescribeBackupVault -> String
showsPrec :: Int -> DescribeBackupVault -> ShowS
$cshowsPrec :: Int -> DescribeBackupVault -> ShowS
Prelude.Show, (forall x. DescribeBackupVault -> Rep DescribeBackupVault x)
-> (forall x. Rep DescribeBackupVault x -> DescribeBackupVault)
-> Generic DescribeBackupVault
forall x. Rep DescribeBackupVault x -> DescribeBackupVault
forall x. DescribeBackupVault -> Rep DescribeBackupVault x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeBackupVault x -> DescribeBackupVault
$cfrom :: forall x. DescribeBackupVault -> Rep DescribeBackupVault x
Prelude.Generic)

-- |
-- Create a value of 'DescribeBackupVault' 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:
--
-- 'backupVaultName', 'describeBackupVault_backupVaultName' - The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Amazon Web Services Region where they are created. They
-- consist of lowercase letters, numbers, and hyphens.
newDescribeBackupVault ::
  -- | 'backupVaultName'
  Prelude.Text ->
  DescribeBackupVault
newDescribeBackupVault :: Text -> DescribeBackupVault
newDescribeBackupVault Text
pBackupVaultName_ =
  DescribeBackupVault' :: Text -> DescribeBackupVault
DescribeBackupVault'
    { $sel:backupVaultName:DescribeBackupVault' :: Text
backupVaultName =
        Text
pBackupVaultName_
    }

-- | The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Amazon Web Services Region where they are created. They
-- consist of lowercase letters, numbers, and hyphens.
describeBackupVault_backupVaultName :: Lens.Lens' DescribeBackupVault Prelude.Text
describeBackupVault_backupVaultName :: (Text -> f Text) -> DescribeBackupVault -> f DescribeBackupVault
describeBackupVault_backupVaultName = (DescribeBackupVault -> Text)
-> (DescribeBackupVault -> Text -> DescribeBackupVault)
-> Lens DescribeBackupVault DescribeBackupVault Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVault' {Text
backupVaultName :: Text
$sel:backupVaultName:DescribeBackupVault' :: DescribeBackupVault -> Text
backupVaultName} -> Text
backupVaultName) (\s :: DescribeBackupVault
s@DescribeBackupVault' {} Text
a -> DescribeBackupVault
s {$sel:backupVaultName:DescribeBackupVault' :: Text
backupVaultName = Text
a} :: DescribeBackupVault)

instance Core.AWSRequest DescribeBackupVault where
  type
    AWSResponse DescribeBackupVault =
      DescribeBackupVaultResponse
  request :: DescribeBackupVault -> Request DescribeBackupVault
request = Service -> DescribeBackupVault -> Request DescribeBackupVault
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeBackupVault
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeBackupVault)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeBackupVault))
-> Logger
-> Service
-> Proxy DescribeBackupVault
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeBackupVault)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe Integer
-> Maybe Bool
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Integer
-> Int
-> DescribeBackupVaultResponse
DescribeBackupVaultResponse'
            (Maybe POSIX
 -> Maybe Integer
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Integer
 -> Int
 -> DescribeBackupVaultResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LockDate")
            Either
  String
  (Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> DescribeBackupVaultResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MaxRetentionDays")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> DescribeBackupVaultResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Locked")
            Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> DescribeBackupVaultResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatorRequestId")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> DescribeBackupVaultResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NumberOfRecoveryPoints")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> DescribeBackupVaultResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupVaultArn")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> DescribeBackupVaultResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EncryptionKeyArn")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> DescribeBackupVaultResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text -> Maybe Integer -> Int -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationDate")
            Either
  String
  (Maybe Text -> Maybe Integer -> Int -> DescribeBackupVaultResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Integer -> Int -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupVaultName")
            Either String (Maybe Integer -> Int -> DescribeBackupVaultResponse)
-> Either String (Maybe Integer)
-> Either String (Int -> DescribeBackupVaultResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MinRetentionDays")
            Either String (Int -> DescribeBackupVaultResponse)
-> Either String Int -> Either String DescribeBackupVaultResponse
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 DescribeBackupVault

instance Prelude.NFData DescribeBackupVault

instance Core.ToHeaders DescribeBackupVault where
  toHeaders :: DescribeBackupVault -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeBackupVault -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath DescribeBackupVault where
  toPath :: DescribeBackupVault -> ByteString
toPath DescribeBackupVault' {Text
backupVaultName :: Text
$sel:backupVaultName:DescribeBackupVault' :: DescribeBackupVault -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/backup-vaults/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
backupVaultName]

instance Core.ToQuery DescribeBackupVault where
  toQuery :: DescribeBackupVault -> QueryString
toQuery = QueryString -> DescribeBackupVault -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeBackupVaultResponse' smart constructor.
data DescribeBackupVaultResponse = DescribeBackupVaultResponse'
  { -- | The date and time when Backup Vault Lock configuration cannot be changed
    -- or deleted.
    --
    -- If you applied Vault Lock to your vault without specifying a lock date,
    -- you can change any of your Vault Lock settings, or delete Vault Lock
    -- from the vault entirely, at any time.
    --
    -- This value is in Unix format, Coordinated Universal Time (UTC), and
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    DescribeBackupVaultResponse -> Maybe POSIX
lockDate :: Prelude.Maybe Core.POSIX,
    -- | The Backup Vault Lock setting that specifies the maximum retention
    -- period that the vault retains its recovery points. If this parameter is
    -- not specified, Vault Lock does not enforce a maximum retention period on
    -- the recovery points in the vault (allowing indefinite storage).
    --
    -- If specified, any backup or copy job to the vault must have a lifecycle
    -- policy with a retention period equal to or shorter than the maximum
    -- retention period. If the job\'s retention period is longer than that
    -- maximum retention period, then the vault fails the backup or copy job,
    -- and you should either modify your lifecycle settings or use a different
    -- vault. Recovery points already stored in the vault prior to Vault Lock
    -- are not affected.
    DescribeBackupVaultResponse -> Maybe Integer
maxRetentionDays :: Prelude.Maybe Prelude.Integer,
    -- | A Boolean that indicates whether Backup Vault Lock is currently
    -- protecting the backup vault. @True@ means that Vault Lock causes delete
    -- or update operations on the recovery points stored in the vault to fail.
    DescribeBackupVaultResponse -> Maybe Bool
locked :: Prelude.Maybe Prelude.Bool,
    -- | A unique string that identifies the request and allows failed requests
    -- to be retried without the risk of running the operation twice.
    DescribeBackupVaultResponse -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
    -- | The number of recovery points that are stored in a backup vault.
    DescribeBackupVaultResponse -> Maybe Integer
numberOfRecoveryPoints :: Prelude.Maybe Prelude.Integer,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
    -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
    DescribeBackupVaultResponse -> Maybe Text
backupVaultArn :: Prelude.Maybe Prelude.Text,
    -- | The server-side encryption key that is used to protect your backups; for
    -- example,
    -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
    DescribeBackupVaultResponse -> Maybe Text
encryptionKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that a backup vault is created, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @CreationDate@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    DescribeBackupVaultResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The name of a logical container where backups are stored. Backup vaults
    -- are identified by names that are unique to the account used to create
    -- them and the Region where they are created. They consist of lowercase
    -- letters, numbers, and hyphens.
    DescribeBackupVaultResponse -> Maybe Text
backupVaultName :: Prelude.Maybe Prelude.Text,
    -- | The Backup Vault Lock setting that specifies the minimum retention
    -- period that the vault retains its recovery points. If this parameter is
    -- not specified, Vault Lock does not enforce a minimum retention period.
    --
    -- If specified, any backup or copy job to the vault must have a lifecycle
    -- policy with a retention period equal to or longer than the minimum
    -- retention period. If the job\'s retention period is shorter than that
    -- minimum retention period, then the vault fails the backup or copy job,
    -- and you should either modify your lifecycle settings or use a different
    -- vault. Recovery points already stored in the vault prior to Vault Lock
    -- are not affected.
    DescribeBackupVaultResponse -> Maybe Integer
minRetentionDays :: Prelude.Maybe Prelude.Integer,
    -- | The response's http status code.
    DescribeBackupVaultResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeBackupVaultResponse -> DescribeBackupVaultResponse -> Bool
(DescribeBackupVaultResponse
 -> DescribeBackupVaultResponse -> Bool)
-> (DescribeBackupVaultResponse
    -> DescribeBackupVaultResponse -> Bool)
-> Eq DescribeBackupVaultResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBackupVaultResponse -> DescribeBackupVaultResponse -> Bool
$c/= :: DescribeBackupVaultResponse -> DescribeBackupVaultResponse -> Bool
== :: DescribeBackupVaultResponse -> DescribeBackupVaultResponse -> Bool
$c== :: DescribeBackupVaultResponse -> DescribeBackupVaultResponse -> Bool
Prelude.Eq, ReadPrec [DescribeBackupVaultResponse]
ReadPrec DescribeBackupVaultResponse
Int -> ReadS DescribeBackupVaultResponse
ReadS [DescribeBackupVaultResponse]
(Int -> ReadS DescribeBackupVaultResponse)
-> ReadS [DescribeBackupVaultResponse]
-> ReadPrec DescribeBackupVaultResponse
-> ReadPrec [DescribeBackupVaultResponse]
-> Read DescribeBackupVaultResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBackupVaultResponse]
$creadListPrec :: ReadPrec [DescribeBackupVaultResponse]
readPrec :: ReadPrec DescribeBackupVaultResponse
$creadPrec :: ReadPrec DescribeBackupVaultResponse
readList :: ReadS [DescribeBackupVaultResponse]
$creadList :: ReadS [DescribeBackupVaultResponse]
readsPrec :: Int -> ReadS DescribeBackupVaultResponse
$creadsPrec :: Int -> ReadS DescribeBackupVaultResponse
Prelude.Read, Int -> DescribeBackupVaultResponse -> ShowS
[DescribeBackupVaultResponse] -> ShowS
DescribeBackupVaultResponse -> String
(Int -> DescribeBackupVaultResponse -> ShowS)
-> (DescribeBackupVaultResponse -> String)
-> ([DescribeBackupVaultResponse] -> ShowS)
-> Show DescribeBackupVaultResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBackupVaultResponse] -> ShowS
$cshowList :: [DescribeBackupVaultResponse] -> ShowS
show :: DescribeBackupVaultResponse -> String
$cshow :: DescribeBackupVaultResponse -> String
showsPrec :: Int -> DescribeBackupVaultResponse -> ShowS
$cshowsPrec :: Int -> DescribeBackupVaultResponse -> ShowS
Prelude.Show, (forall x.
 DescribeBackupVaultResponse -> Rep DescribeBackupVaultResponse x)
-> (forall x.
    Rep DescribeBackupVaultResponse x -> DescribeBackupVaultResponse)
-> Generic DescribeBackupVaultResponse
forall x.
Rep DescribeBackupVaultResponse x -> DescribeBackupVaultResponse
forall x.
DescribeBackupVaultResponse -> Rep DescribeBackupVaultResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeBackupVaultResponse x -> DescribeBackupVaultResponse
$cfrom :: forall x.
DescribeBackupVaultResponse -> Rep DescribeBackupVaultResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeBackupVaultResponse' 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:
--
-- 'lockDate', 'describeBackupVaultResponse_lockDate' - The date and time when Backup Vault Lock configuration cannot be changed
-- or deleted.
--
-- If you applied Vault Lock to your vault without specifying a lock date,
-- you can change any of your Vault Lock settings, or delete Vault Lock
-- from the vault entirely, at any time.
--
-- This value is in Unix format, Coordinated Universal Time (UTC), and
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'maxRetentionDays', 'describeBackupVaultResponse_maxRetentionDays' - The Backup Vault Lock setting that specifies the maximum retention
-- period that the vault retains its recovery points. If this parameter is
-- not specified, Vault Lock does not enforce a maximum retention period on
-- the recovery points in the vault (allowing indefinite storage).
--
-- If specified, any backup or copy job to the vault must have a lifecycle
-- policy with a retention period equal to or shorter than the maximum
-- retention period. If the job\'s retention period is longer than that
-- maximum retention period, then the vault fails the backup or copy job,
-- and you should either modify your lifecycle settings or use a different
-- vault. Recovery points already stored in the vault prior to Vault Lock
-- are not affected.
--
-- 'locked', 'describeBackupVaultResponse_locked' - A Boolean that indicates whether Backup Vault Lock is currently
-- protecting the backup vault. @True@ means that Vault Lock causes delete
-- or update operations on the recovery points stored in the vault to fail.
--
-- 'creatorRequestId', 'describeBackupVaultResponse_creatorRequestId' - A unique string that identifies the request and allows failed requests
-- to be retried without the risk of running the operation twice.
--
-- 'numberOfRecoveryPoints', 'describeBackupVaultResponse_numberOfRecoveryPoints' - The number of recovery points that are stored in a backup vault.
--
-- 'backupVaultArn', 'describeBackupVaultResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
--
-- 'encryptionKeyArn', 'describeBackupVaultResponse_encryptionKeyArn' - The server-side encryption key that is used to protect your backups; for
-- example,
-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
--
-- 'creationDate', 'describeBackupVaultResponse_creationDate' - The date and time that a backup vault is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'backupVaultName', 'describeBackupVaultResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Region where they are created. They consist of lowercase
-- letters, numbers, and hyphens.
--
-- 'minRetentionDays', 'describeBackupVaultResponse_minRetentionDays' - The Backup Vault Lock setting that specifies the minimum retention
-- period that the vault retains its recovery points. If this parameter is
-- not specified, Vault Lock does not enforce a minimum retention period.
--
-- If specified, any backup or copy job to the vault must have a lifecycle
-- policy with a retention period equal to or longer than the minimum
-- retention period. If the job\'s retention period is shorter than that
-- minimum retention period, then the vault fails the backup or copy job,
-- and you should either modify your lifecycle settings or use a different
-- vault. Recovery points already stored in the vault prior to Vault Lock
-- are not affected.
--
-- 'httpStatus', 'describeBackupVaultResponse_httpStatus' - The response's http status code.
newDescribeBackupVaultResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeBackupVaultResponse
newDescribeBackupVaultResponse :: Int -> DescribeBackupVaultResponse
newDescribeBackupVaultResponse Int
pHttpStatus_ =
  DescribeBackupVaultResponse' :: Maybe POSIX
-> Maybe Integer
-> Maybe Bool
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Integer
-> Int
-> DescribeBackupVaultResponse
DescribeBackupVaultResponse'
    { $sel:lockDate:DescribeBackupVaultResponse' :: Maybe POSIX
lockDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRetentionDays:DescribeBackupVaultResponse' :: Maybe Integer
maxRetentionDays = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:locked:DescribeBackupVaultResponse' :: Maybe Bool
locked = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:DescribeBackupVaultResponse' :: Maybe Text
creatorRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfRecoveryPoints:DescribeBackupVaultResponse' :: Maybe Integer
numberOfRecoveryPoints = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultArn:DescribeBackupVaultResponse' :: Maybe Text
backupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKeyArn:DescribeBackupVaultResponse' :: Maybe Text
encryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeBackupVaultResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:DescribeBackupVaultResponse' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:minRetentionDays:DescribeBackupVaultResponse' :: Maybe Integer
minRetentionDays = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeBackupVaultResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time when Backup Vault Lock configuration cannot be changed
-- or deleted.
--
-- If you applied Vault Lock to your vault without specifying a lock date,
-- you can change any of your Vault Lock settings, or delete Vault Lock
-- from the vault entirely, at any time.
--
-- This value is in Unix format, Coordinated Universal Time (UTC), and
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
describeBackupVaultResponse_lockDate :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.UTCTime)
describeBackupVaultResponse_lockDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_lockDate = (DescribeBackupVaultResponse -> Maybe POSIX)
-> (DescribeBackupVaultResponse
    -> Maybe POSIX -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe POSIX
lockDate :: Maybe POSIX
$sel:lockDate:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe POSIX
lockDate} -> Maybe POSIX
lockDate) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe POSIX
a -> DescribeBackupVaultResponse
s {$sel:lockDate:DescribeBackupVaultResponse' :: Maybe POSIX
lockDate = Maybe POSIX
a} :: DescribeBackupVaultResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupVaultResponse
-> f DescribeBackupVaultResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Backup Vault Lock setting that specifies the maximum retention
-- period that the vault retains its recovery points. If this parameter is
-- not specified, Vault Lock does not enforce a maximum retention period on
-- the recovery points in the vault (allowing indefinite storage).
--
-- If specified, any backup or copy job to the vault must have a lifecycle
-- policy with a retention period equal to or shorter than the maximum
-- retention period. If the job\'s retention period is longer than that
-- maximum retention period, then the vault fails the backup or copy job,
-- and you should either modify your lifecycle settings or use a different
-- vault. Recovery points already stored in the vault prior to Vault Lock
-- are not affected.
describeBackupVaultResponse_maxRetentionDays :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Integer)
describeBackupVaultResponse_maxRetentionDays :: (Maybe Integer -> f (Maybe Integer))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_maxRetentionDays = (DescribeBackupVaultResponse -> Maybe Integer)
-> (DescribeBackupVaultResponse
    -> Maybe Integer -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Integer
maxRetentionDays :: Maybe Integer
$sel:maxRetentionDays:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Integer
maxRetentionDays} -> Maybe Integer
maxRetentionDays) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Integer
a -> DescribeBackupVaultResponse
s {$sel:maxRetentionDays:DescribeBackupVaultResponse' :: Maybe Integer
maxRetentionDays = Maybe Integer
a} :: DescribeBackupVaultResponse)

-- | A Boolean that indicates whether Backup Vault Lock is currently
-- protecting the backup vault. @True@ means that Vault Lock causes delete
-- or update operations on the recovery points stored in the vault to fail.
describeBackupVaultResponse_locked :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Bool)
describeBackupVaultResponse_locked :: (Maybe Bool -> f (Maybe Bool))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_locked = (DescribeBackupVaultResponse -> Maybe Bool)
-> (DescribeBackupVaultResponse
    -> Maybe Bool -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Bool
locked :: Maybe Bool
$sel:locked:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Bool
locked} -> Maybe Bool
locked) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Bool
a -> DescribeBackupVaultResponse
s {$sel:locked:DescribeBackupVaultResponse' :: Maybe Bool
locked = Maybe Bool
a} :: DescribeBackupVaultResponse)

-- | A unique string that identifies the request and allows failed requests
-- to be retried without the risk of running the operation twice.
describeBackupVaultResponse_creatorRequestId :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)
describeBackupVaultResponse_creatorRequestId :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_creatorRequestId = (DescribeBackupVaultResponse -> Maybe Text)
-> (DescribeBackupVaultResponse
    -> Maybe Text -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Text
creatorRequestId :: Maybe Text
$sel:creatorRequestId:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
creatorRequestId} -> Maybe Text
creatorRequestId) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Text
a -> DescribeBackupVaultResponse
s {$sel:creatorRequestId:DescribeBackupVaultResponse' :: Maybe Text
creatorRequestId = Maybe Text
a} :: DescribeBackupVaultResponse)

-- | The number of recovery points that are stored in a backup vault.
describeBackupVaultResponse_numberOfRecoveryPoints :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Integer)
describeBackupVaultResponse_numberOfRecoveryPoints :: (Maybe Integer -> f (Maybe Integer))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_numberOfRecoveryPoints = (DescribeBackupVaultResponse -> Maybe Integer)
-> (DescribeBackupVaultResponse
    -> Maybe Integer -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Integer
numberOfRecoveryPoints :: Maybe Integer
$sel:numberOfRecoveryPoints:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Integer
numberOfRecoveryPoints} -> Maybe Integer
numberOfRecoveryPoints) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Integer
a -> DescribeBackupVaultResponse
s {$sel:numberOfRecoveryPoints:DescribeBackupVaultResponse' :: Maybe Integer
numberOfRecoveryPoints = Maybe Integer
a} :: DescribeBackupVaultResponse)

-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
describeBackupVaultResponse_backupVaultArn :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)
describeBackupVaultResponse_backupVaultArn :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_backupVaultArn = (DescribeBackupVaultResponse -> Maybe Text)
-> (DescribeBackupVaultResponse
    -> Maybe Text -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Text
backupVaultArn :: Maybe Text
$sel:backupVaultArn:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
backupVaultArn} -> Maybe Text
backupVaultArn) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Text
a -> DescribeBackupVaultResponse
s {$sel:backupVaultArn:DescribeBackupVaultResponse' :: Maybe Text
backupVaultArn = Maybe Text
a} :: DescribeBackupVaultResponse)

-- | The server-side encryption key that is used to protect your backups; for
-- example,
-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
describeBackupVaultResponse_encryptionKeyArn :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)
describeBackupVaultResponse_encryptionKeyArn :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_encryptionKeyArn = (DescribeBackupVaultResponse -> Maybe Text)
-> (DescribeBackupVaultResponse
    -> Maybe Text -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Text
encryptionKeyArn :: Maybe Text
$sel:encryptionKeyArn:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
encryptionKeyArn} -> Maybe Text
encryptionKeyArn) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Text
a -> DescribeBackupVaultResponse
s {$sel:encryptionKeyArn:DescribeBackupVaultResponse' :: Maybe Text
encryptionKeyArn = Maybe Text
a} :: DescribeBackupVaultResponse)

-- | The date and time that a backup vault is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
describeBackupVaultResponse_creationDate :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.UTCTime)
describeBackupVaultResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_creationDate = (DescribeBackupVaultResponse -> Maybe POSIX)
-> (DescribeBackupVaultResponse
    -> Maybe POSIX -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe POSIX
a -> DescribeBackupVaultResponse
s {$sel:creationDate:DescribeBackupVaultResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeBackupVaultResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupVaultResponse
-> f DescribeBackupVaultResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Region where they are created. They consist of lowercase
-- letters, numbers, and hyphens.
describeBackupVaultResponse_backupVaultName :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)
describeBackupVaultResponse_backupVaultName :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_backupVaultName = (DescribeBackupVaultResponse -> Maybe Text)
-> (DescribeBackupVaultResponse
    -> Maybe Text -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Text
backupVaultName :: Maybe Text
$sel:backupVaultName:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
backupVaultName} -> Maybe Text
backupVaultName) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Text
a -> DescribeBackupVaultResponse
s {$sel:backupVaultName:DescribeBackupVaultResponse' :: Maybe Text
backupVaultName = Maybe Text
a} :: DescribeBackupVaultResponse)

-- | The Backup Vault Lock setting that specifies the minimum retention
-- period that the vault retains its recovery points. If this parameter is
-- not specified, Vault Lock does not enforce a minimum retention period.
--
-- If specified, any backup or copy job to the vault must have a lifecycle
-- policy with a retention period equal to or longer than the minimum
-- retention period. If the job\'s retention period is shorter than that
-- minimum retention period, then the vault fails the backup or copy job,
-- and you should either modify your lifecycle settings or use a different
-- vault. Recovery points already stored in the vault prior to Vault Lock
-- are not affected.
describeBackupVaultResponse_minRetentionDays :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Integer)
describeBackupVaultResponse_minRetentionDays :: (Maybe Integer -> f (Maybe Integer))
-> DescribeBackupVaultResponse -> f DescribeBackupVaultResponse
describeBackupVaultResponse_minRetentionDays = (DescribeBackupVaultResponse -> Maybe Integer)
-> (DescribeBackupVaultResponse
    -> Maybe Integer -> DescribeBackupVaultResponse)
-> Lens
     DescribeBackupVaultResponse
     DescribeBackupVaultResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupVaultResponse' {Maybe Integer
minRetentionDays :: Maybe Integer
$sel:minRetentionDays:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Integer
minRetentionDays} -> Maybe Integer
minRetentionDays) (\s :: DescribeBackupVaultResponse
s@DescribeBackupVaultResponse' {} Maybe Integer
a -> DescribeBackupVaultResponse
s {$sel:minRetentionDays:DescribeBackupVaultResponse' :: Maybe Integer
minRetentionDays = Maybe Integer
a} :: DescribeBackupVaultResponse)

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

instance Prelude.NFData DescribeBackupVaultResponse