{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.BackupVaultListMember
-- 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)
module Amazonka.Backup.Types.BackupVaultListMember where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains metadata about a backup vault.
--
-- /See:/ 'newBackupVaultListMember' smart constructor.
data BackupVaultListMember = BackupVaultListMember'
  { -- | The date and time when Backup Vault Lock configuration becomes
    -- immutable, meaning it cannot be changed or deleted.
    --
    -- If you applied Vault Lock to your vault without specifying a lock date,
    -- you can change 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.
    BackupVaultListMember -> 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.
    BackupVaultListMember -> Maybe Integer
maxRetentionDays :: Prelude.Maybe Prelude.Integer,
    -- | A Boolean value that indicates whether Backup Vault Lock applies to the
    -- selected backup vault. If @true@, Vault Lock prevents delete and update
    -- operations on the recovery points in the selected vault.
    BackupVaultListMember -> 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.
    BackupVaultListMember -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
    -- | The number of recovery points that are stored in a backup vault.
    BackupVaultListMember -> 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@.
    BackupVaultListMember -> 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@.
    BackupVaultListMember -> Maybe Text
encryptionKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time a resource backup 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.
    BackupVaultListMember -> 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 Amazon Web Services Region where they are created. They
    -- consist of lowercase letters, numbers, and hyphens.
    BackupVaultListMember -> 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.
    BackupVaultListMember -> Maybe Integer
minRetentionDays :: Prelude.Maybe Prelude.Integer
  }
  deriving (BackupVaultListMember -> BackupVaultListMember -> Bool
(BackupVaultListMember -> BackupVaultListMember -> Bool)
-> (BackupVaultListMember -> BackupVaultListMember -> Bool)
-> Eq BackupVaultListMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackupVaultListMember -> BackupVaultListMember -> Bool
$c/= :: BackupVaultListMember -> BackupVaultListMember -> Bool
== :: BackupVaultListMember -> BackupVaultListMember -> Bool
$c== :: BackupVaultListMember -> BackupVaultListMember -> Bool
Prelude.Eq, ReadPrec [BackupVaultListMember]
ReadPrec BackupVaultListMember
Int -> ReadS BackupVaultListMember
ReadS [BackupVaultListMember]
(Int -> ReadS BackupVaultListMember)
-> ReadS [BackupVaultListMember]
-> ReadPrec BackupVaultListMember
-> ReadPrec [BackupVaultListMember]
-> Read BackupVaultListMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BackupVaultListMember]
$creadListPrec :: ReadPrec [BackupVaultListMember]
readPrec :: ReadPrec BackupVaultListMember
$creadPrec :: ReadPrec BackupVaultListMember
readList :: ReadS [BackupVaultListMember]
$creadList :: ReadS [BackupVaultListMember]
readsPrec :: Int -> ReadS BackupVaultListMember
$creadsPrec :: Int -> ReadS BackupVaultListMember
Prelude.Read, Int -> BackupVaultListMember -> ShowS
[BackupVaultListMember] -> ShowS
BackupVaultListMember -> String
(Int -> BackupVaultListMember -> ShowS)
-> (BackupVaultListMember -> String)
-> ([BackupVaultListMember] -> ShowS)
-> Show BackupVaultListMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BackupVaultListMember] -> ShowS
$cshowList :: [BackupVaultListMember] -> ShowS
show :: BackupVaultListMember -> String
$cshow :: BackupVaultListMember -> String
showsPrec :: Int -> BackupVaultListMember -> ShowS
$cshowsPrec :: Int -> BackupVaultListMember -> ShowS
Prelude.Show, (forall x. BackupVaultListMember -> Rep BackupVaultListMember x)
-> (forall x. Rep BackupVaultListMember x -> BackupVaultListMember)
-> Generic BackupVaultListMember
forall x. Rep BackupVaultListMember x -> BackupVaultListMember
forall x. BackupVaultListMember -> Rep BackupVaultListMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BackupVaultListMember x -> BackupVaultListMember
$cfrom :: forall x. BackupVaultListMember -> Rep BackupVaultListMember x
Prelude.Generic)

-- |
-- Create a value of 'BackupVaultListMember' 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', 'backupVaultListMember_lockDate' - The date and time when Backup Vault Lock configuration becomes
-- immutable, meaning it cannot be changed or deleted.
--
-- If you applied Vault Lock to your vault without specifying a lock date,
-- you can change 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', 'backupVaultListMember_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', 'backupVaultListMember_locked' - A Boolean value that indicates whether Backup Vault Lock applies to the
-- selected backup vault. If @true@, Vault Lock prevents delete and update
-- operations on the recovery points in the selected vault.
--
-- 'creatorRequestId', 'backupVaultListMember_creatorRequestId' - A unique string that identifies the request and allows failed requests
-- to be retried without the risk of running the operation twice.
--
-- 'numberOfRecoveryPoints', 'backupVaultListMember_numberOfRecoveryPoints' - The number of recovery points that are stored in a backup vault.
--
-- 'backupVaultArn', 'backupVaultListMember_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
--
-- 'encryptionKeyArn', 'backupVaultListMember_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', 'backupVaultListMember_creationDate' - The date and time a resource backup 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', 'backupVaultListMember_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.
--
-- 'minRetentionDays', 'backupVaultListMember_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.
newBackupVaultListMember ::
  BackupVaultListMember
newBackupVaultListMember :: BackupVaultListMember
newBackupVaultListMember =
  BackupVaultListMember' :: Maybe POSIX
-> Maybe Integer
-> Maybe Bool
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Integer
-> BackupVaultListMember
BackupVaultListMember'
    { $sel:lockDate:BackupVaultListMember' :: Maybe POSIX
lockDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRetentionDays:BackupVaultListMember' :: Maybe Integer
maxRetentionDays = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:locked:BackupVaultListMember' :: Maybe Bool
locked = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:BackupVaultListMember' :: Maybe Text
creatorRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfRecoveryPoints:BackupVaultListMember' :: Maybe Integer
numberOfRecoveryPoints = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultArn:BackupVaultListMember' :: Maybe Text
backupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKeyArn:BackupVaultListMember' :: Maybe Text
encryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:BackupVaultListMember' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:BackupVaultListMember' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:minRetentionDays:BackupVaultListMember' :: Maybe Integer
minRetentionDays = Maybe Integer
forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time when Backup Vault Lock configuration becomes
-- immutable, meaning it cannot be changed or deleted.
--
-- If you applied Vault Lock to your vault without specifying a lock date,
-- you can change 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.
backupVaultListMember_lockDate :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.UTCTime)
backupVaultListMember_lockDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupVaultListMember -> f BackupVaultListMember
backupVaultListMember_lockDate = (BackupVaultListMember -> Maybe POSIX)
-> (BackupVaultListMember -> Maybe POSIX -> BackupVaultListMember)
-> Lens
     BackupVaultListMember
     BackupVaultListMember
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupVaultListMember' {Maybe POSIX
lockDate :: Maybe POSIX
$sel:lockDate:BackupVaultListMember' :: BackupVaultListMember -> Maybe POSIX
lockDate} -> Maybe POSIX
lockDate) (\s :: BackupVaultListMember
s@BackupVaultListMember' {} Maybe POSIX
a -> BackupVaultListMember
s {$sel:lockDate:BackupVaultListMember' :: Maybe POSIX
lockDate = Maybe POSIX
a} :: BackupVaultListMember) ((Maybe POSIX -> f (Maybe POSIX))
 -> BackupVaultListMember -> f BackupVaultListMember)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupVaultListMember
-> f BackupVaultListMember
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.
backupVaultListMember_maxRetentionDays :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Integer)
backupVaultListMember_maxRetentionDays :: (Maybe Integer -> f (Maybe Integer))
-> BackupVaultListMember -> f BackupVaultListMember
backupVaultListMember_maxRetentionDays = (BackupVaultListMember -> Maybe Integer)
-> (BackupVaultListMember
    -> Maybe Integer -> BackupVaultListMember)
-> Lens
     BackupVaultListMember
     BackupVaultListMember
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupVaultListMember' {Maybe Integer
maxRetentionDays :: Maybe Integer
$sel:maxRetentionDays:BackupVaultListMember' :: BackupVaultListMember -> Maybe Integer
maxRetentionDays} -> Maybe Integer
maxRetentionDays) (\s :: BackupVaultListMember
s@BackupVaultListMember' {} Maybe Integer
a -> BackupVaultListMember
s {$sel:maxRetentionDays:BackupVaultListMember' :: Maybe Integer
maxRetentionDays = Maybe Integer
a} :: BackupVaultListMember)

-- | A Boolean value that indicates whether Backup Vault Lock applies to the
-- selected backup vault. If @true@, Vault Lock prevents delete and update
-- operations on the recovery points in the selected vault.
backupVaultListMember_locked :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Bool)
backupVaultListMember_locked :: (Maybe Bool -> f (Maybe Bool))
-> BackupVaultListMember -> f BackupVaultListMember
backupVaultListMember_locked = (BackupVaultListMember -> Maybe Bool)
-> (BackupVaultListMember -> Maybe Bool -> BackupVaultListMember)
-> Lens
     BackupVaultListMember
     BackupVaultListMember
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupVaultListMember' {Maybe Bool
locked :: Maybe Bool
$sel:locked:BackupVaultListMember' :: BackupVaultListMember -> Maybe Bool
locked} -> Maybe Bool
locked) (\s :: BackupVaultListMember
s@BackupVaultListMember' {} Maybe Bool
a -> BackupVaultListMember
s {$sel:locked:BackupVaultListMember' :: Maybe Bool
locked = Maybe Bool
a} :: BackupVaultListMember)

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

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

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

-- | 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@.
backupVaultListMember_encryptionKeyArn :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Text)
backupVaultListMember_encryptionKeyArn :: (Maybe Text -> f (Maybe Text))
-> BackupVaultListMember -> f BackupVaultListMember
backupVaultListMember_encryptionKeyArn = (BackupVaultListMember -> Maybe Text)
-> (BackupVaultListMember -> Maybe Text -> BackupVaultListMember)
-> Lens
     BackupVaultListMember
     BackupVaultListMember
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupVaultListMember' {Maybe Text
encryptionKeyArn :: Maybe Text
$sel:encryptionKeyArn:BackupVaultListMember' :: BackupVaultListMember -> Maybe Text
encryptionKeyArn} -> Maybe Text
encryptionKeyArn) (\s :: BackupVaultListMember
s@BackupVaultListMember' {} Maybe Text
a -> BackupVaultListMember
s {$sel:encryptionKeyArn:BackupVaultListMember' :: Maybe Text
encryptionKeyArn = Maybe Text
a} :: BackupVaultListMember)

-- | The date and time a resource backup 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.
backupVaultListMember_creationDate :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.UTCTime)
backupVaultListMember_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupVaultListMember -> f BackupVaultListMember
backupVaultListMember_creationDate = (BackupVaultListMember -> Maybe POSIX)
-> (BackupVaultListMember -> Maybe POSIX -> BackupVaultListMember)
-> Lens
     BackupVaultListMember
     BackupVaultListMember
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupVaultListMember' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:BackupVaultListMember' :: BackupVaultListMember -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: BackupVaultListMember
s@BackupVaultListMember' {} Maybe POSIX
a -> BackupVaultListMember
s {$sel:creationDate:BackupVaultListMember' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: BackupVaultListMember) ((Maybe POSIX -> f (Maybe POSIX))
 -> BackupVaultListMember -> f BackupVaultListMember)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupVaultListMember
-> f BackupVaultListMember
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 Amazon Web Services Region where they are created. They
-- consist of lowercase letters, numbers, and hyphens.
backupVaultListMember_backupVaultName :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Text)
backupVaultListMember_backupVaultName :: (Maybe Text -> f (Maybe Text))
-> BackupVaultListMember -> f BackupVaultListMember
backupVaultListMember_backupVaultName = (BackupVaultListMember -> Maybe Text)
-> (BackupVaultListMember -> Maybe Text -> BackupVaultListMember)
-> Lens
     BackupVaultListMember
     BackupVaultListMember
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupVaultListMember' {Maybe Text
backupVaultName :: Maybe Text
$sel:backupVaultName:BackupVaultListMember' :: BackupVaultListMember -> Maybe Text
backupVaultName} -> Maybe Text
backupVaultName) (\s :: BackupVaultListMember
s@BackupVaultListMember' {} Maybe Text
a -> BackupVaultListMember
s {$sel:backupVaultName:BackupVaultListMember' :: Maybe Text
backupVaultName = Maybe Text
a} :: BackupVaultListMember)

-- | 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.
backupVaultListMember_minRetentionDays :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Integer)
backupVaultListMember_minRetentionDays :: (Maybe Integer -> f (Maybe Integer))
-> BackupVaultListMember -> f BackupVaultListMember
backupVaultListMember_minRetentionDays = (BackupVaultListMember -> Maybe Integer)
-> (BackupVaultListMember
    -> Maybe Integer -> BackupVaultListMember)
-> Lens
     BackupVaultListMember
     BackupVaultListMember
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupVaultListMember' {Maybe Integer
minRetentionDays :: Maybe Integer
$sel:minRetentionDays:BackupVaultListMember' :: BackupVaultListMember -> Maybe Integer
minRetentionDays} -> Maybe Integer
minRetentionDays) (\s :: BackupVaultListMember
s@BackupVaultListMember' {} Maybe Integer
a -> BackupVaultListMember
s {$sel:minRetentionDays:BackupVaultListMember' :: Maybe Integer
minRetentionDays = Maybe Integer
a} :: BackupVaultListMember)

instance Core.FromJSON BackupVaultListMember where
  parseJSON :: Value -> Parser BackupVaultListMember
parseJSON =
    String
-> (Object -> Parser BackupVaultListMember)
-> Value
-> Parser BackupVaultListMember
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BackupVaultListMember"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Integer
-> Maybe Bool
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Integer
-> BackupVaultListMember
BackupVaultListMember'
            (Maybe POSIX
 -> Maybe Integer
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Integer
 -> BackupVaultListMember)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> BackupVaultListMember)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LockDate")
            Parser
  (Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> BackupVaultListMember)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxRetentionDays")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> BackupVaultListMember)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Locked")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> BackupVaultListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatorRequestId")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> BackupVaultListMember)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfRecoveryPoints")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> BackupVaultListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupVaultArn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> BackupVaultListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text -> Maybe Integer -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EncryptionKeyArn")
            Parser
  (Maybe POSIX
   -> Maybe Text -> Maybe Integer -> BackupVaultListMember)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Integer -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDate")
            Parser (Maybe Text -> Maybe Integer -> BackupVaultListMember)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> BackupVaultListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupVaultName")
            Parser (Maybe Integer -> BackupVaultListMember)
-> Parser (Maybe Integer) -> Parser BackupVaultListMember
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MinRetentionDays")
      )

instance Prelude.Hashable BackupVaultListMember

instance Prelude.NFData BackupVaultListMember