{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_backupVaultArn,
    describeBackupVaultResponse_backupVaultName,
    describeBackupVaultResponse_creationDate,
    describeBackupVaultResponse_creatorRequestId,
    describeBackupVaultResponse_encryptionKeyArn,
    describeBackupVaultResponse_lockDate,
    describeBackupVaultResponse_locked,
    describeBackupVaultResponse_maxRetentionDays,
    describeBackupVaultResponse_minRetentionDays,
    describeBackupVaultResponse_numberOfRecoveryPoints,
    describeBackupVaultResponse_httpStatus,
  )
where

import Amazonka.Backup.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
    { $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 :: Lens' DescribeBackupVault Text
describeBackupVault_backupVaultName = 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 :: (Service -> Service)
-> DescribeBackupVault -> Request DescribeBackupVault
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeBackupVault
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeBackupVault)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Int
-> DescribeBackupVaultResponse
DescribeBackupVaultResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"BackupVaultArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"BackupVaultName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatorRequestId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"EncryptionKeyArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LockDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Locked")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MaxRetentionDays")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MinRetentionDays")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NumberOfRecoveryPoints")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeBackupVault where
  hashWithSalt :: Int -> DescribeBackupVault -> Int
hashWithSalt Int
_salt DescribeBackupVault' {Text
backupVaultName :: Text
$sel:backupVaultName:DescribeBackupVault' :: DescribeBackupVault -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
backupVaultName

instance Prelude.NFData DescribeBackupVault where
  rnf :: DescribeBackupVault -> ()
rnf DescribeBackupVault' {Text
backupVaultName :: Text
$sel:backupVaultName:DescribeBackupVault' :: DescribeBackupVault -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
backupVaultName

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

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

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

-- | /See:/ 'newDescribeBackupVaultResponse' smart constructor.
data DescribeBackupVaultResponse = DescribeBackupVaultResponse'
  { -- | 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 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 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 Data.POSIX,
    -- | 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 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 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 Data.POSIX,
    -- | 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,
    -- | 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,
    -- | 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 number of recovery points that are stored in a backup vault.
    DescribeBackupVaultResponse -> Maybe Integer
numberOfRecoveryPoints :: Prelude.Maybe Prelude.Integer,
    -- | The response's http status code.
    DescribeBackupVaultResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeBackupVaultResponse -> DescribeBackupVaultResponse -> Bool
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]
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
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.
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:
--
-- '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@.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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@.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'numberOfRecoveryPoints', 'describeBackupVaultResponse_numberOfRecoveryPoints' - The number of recovery points that are stored in a backup vault.
--
-- 'httpStatus', 'describeBackupVaultResponse_httpStatus' - The response's http status code.
newDescribeBackupVaultResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeBackupVaultResponse
newDescribeBackupVaultResponse :: Int -> DescribeBackupVaultResponse
newDescribeBackupVaultResponse Int
pHttpStatus_ =
  DescribeBackupVaultResponse'
    { $sel:backupVaultArn:DescribeBackupVaultResponse' :: Maybe Text
backupVaultArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:DescribeBackupVaultResponse' :: Maybe Text
backupVaultName = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeBackupVaultResponse' :: Maybe POSIX
creationDate = forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:DescribeBackupVaultResponse' :: Maybe Text
creatorRequestId = forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKeyArn:DescribeBackupVaultResponse' :: Maybe Text
encryptionKeyArn = forall a. Maybe a
Prelude.Nothing,
      $sel:lockDate:DescribeBackupVaultResponse' :: Maybe POSIX
lockDate = forall a. Maybe a
Prelude.Nothing,
      $sel:locked:DescribeBackupVaultResponse' :: Maybe Bool
locked = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRetentionDays:DescribeBackupVaultResponse' :: Maybe Integer
maxRetentionDays = forall a. Maybe a
Prelude.Nothing,
      $sel:minRetentionDays:DescribeBackupVaultResponse' :: Maybe Integer
minRetentionDays = forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfRecoveryPoints:DescribeBackupVaultResponse' :: Maybe Integer
numberOfRecoveryPoints = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeBackupVaultResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: Lens' DescribeBackupVaultResponse (Maybe Text)
describeBackupVaultResponse_backupVaultArn = 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 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 :: Lens' DescribeBackupVaultResponse (Maybe Text)
describeBackupVaultResponse_backupVaultName = 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 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 :: Lens' DescribeBackupVaultResponse (Maybe UTCTime)
describeBackupVaultResponse_creationDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | 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 :: Lens' DescribeBackupVaultResponse (Maybe Text)
describeBackupVaultResponse_creatorRequestId = 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 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 :: Lens' DescribeBackupVaultResponse (Maybe Text)
describeBackupVaultResponse_encryptionKeyArn = 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 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 :: Lens' DescribeBackupVaultResponse (Maybe UTCTime)
describeBackupVaultResponse_lockDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | 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 :: Lens' DescribeBackupVaultResponse (Maybe Bool)
describeBackupVaultResponse_locked = 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)

-- | 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 :: Lens' DescribeBackupVaultResponse (Maybe Integer)
describeBackupVaultResponse_maxRetentionDays = 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)

-- | 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 :: Lens' DescribeBackupVaultResponse (Maybe Integer)
describeBackupVaultResponse_minRetentionDays = 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 number of recovery points that are stored in a backup vault.
describeBackupVaultResponse_numberOfRecoveryPoints :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Integer)
describeBackupVaultResponse_numberOfRecoveryPoints :: Lens' DescribeBackupVaultResponse (Maybe Integer)
describeBackupVaultResponse_numberOfRecoveryPoints = 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)

-- | The response's http status code.
describeBackupVaultResponse_httpStatus :: Lens.Lens' DescribeBackupVaultResponse Prelude.Int
describeBackupVaultResponse_httpStatus :: Lens' DescribeBackupVaultResponse Int
describeBackupVaultResponse_httpStatus = 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 where
  rnf :: DescribeBackupVaultResponse -> ()
rnf DescribeBackupVaultResponse' {Int
Maybe Bool
Maybe Integer
Maybe Text
Maybe POSIX
httpStatus :: Int
numberOfRecoveryPoints :: Maybe Integer
minRetentionDays :: Maybe Integer
maxRetentionDays :: Maybe Integer
locked :: Maybe Bool
lockDate :: Maybe POSIX
encryptionKeyArn :: Maybe Text
creatorRequestId :: Maybe Text
creationDate :: Maybe POSIX
backupVaultName :: Maybe Text
backupVaultArn :: Maybe Text
$sel:httpStatus:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Int
$sel:numberOfRecoveryPoints:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Integer
$sel:minRetentionDays:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Integer
$sel:maxRetentionDays:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Integer
$sel:locked:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Bool
$sel:lockDate:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe POSIX
$sel:encryptionKeyArn:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
$sel:creatorRequestId:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
$sel:creationDate:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe POSIX
$sel:backupVaultName:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
$sel:backupVaultArn:DescribeBackupVaultResponse' :: DescribeBackupVaultResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
backupVaultArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
backupVaultName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creatorRequestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
encryptionKeyArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lockDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
locked
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
maxRetentionDays
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
minRetentionDays
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
numberOfRecoveryPoints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus