{-# 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.BackupPlansListMember
-- 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.BackupPlansListMember where

import Amazonka.Backup.Types.AdvancedBackupSetting
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains metadata about a backup plan.
--
-- /See:/ 'newBackupPlansListMember' smart constructor.
data BackupPlansListMember = BackupPlansListMember'
  { -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at
    -- most 1,024 bytes long. Version IDs cannot be edited.
    BackupPlansListMember -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
    -- | The display name of a saved backup plan.
    BackupPlansListMember -> Maybe Text
backupPlanName :: Prelude.Maybe Prelude.Text,
    -- | Contains a list of @BackupOptions@ for a resource type.
    BackupPlansListMember -> Maybe [AdvancedBackupSetting]
advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],
    -- | Uniquely identifies a backup plan.
    BackupPlansListMember -> Maybe Text
backupPlanId :: Prelude.Maybe Prelude.Text,
    -- | A unique string that identifies the request and allows failed requests
    -- to be retried without the risk of running the operation twice.
    BackupPlansListMember -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;
    -- for example,
    -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.
    BackupPlansListMember -> Maybe Text
backupPlanArn :: Prelude.Maybe Prelude.Text,
    -- | The last time a job to back up resources was run with this rule. A date
    -- and time, in Unix format and Coordinated Universal Time (UTC). The value
    -- of @LastExecutionDate@ is accurate to milliseconds. For example, the
    -- value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087
    -- AM.
    BackupPlansListMember -> Maybe POSIX
lastExecutionDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time a resource backup plan 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.
    BackupPlansListMember -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time a backup plan is deleted, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @DeletionDate@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    BackupPlansListMember -> Maybe POSIX
deletionDate :: Prelude.Maybe Core.POSIX
  }
  deriving (BackupPlansListMember -> BackupPlansListMember -> Bool
(BackupPlansListMember -> BackupPlansListMember -> Bool)
-> (BackupPlansListMember -> BackupPlansListMember -> Bool)
-> Eq BackupPlansListMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackupPlansListMember -> BackupPlansListMember -> Bool
$c/= :: BackupPlansListMember -> BackupPlansListMember -> Bool
== :: BackupPlansListMember -> BackupPlansListMember -> Bool
$c== :: BackupPlansListMember -> BackupPlansListMember -> Bool
Prelude.Eq, ReadPrec [BackupPlansListMember]
ReadPrec BackupPlansListMember
Int -> ReadS BackupPlansListMember
ReadS [BackupPlansListMember]
(Int -> ReadS BackupPlansListMember)
-> ReadS [BackupPlansListMember]
-> ReadPrec BackupPlansListMember
-> ReadPrec [BackupPlansListMember]
-> Read BackupPlansListMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BackupPlansListMember]
$creadListPrec :: ReadPrec [BackupPlansListMember]
readPrec :: ReadPrec BackupPlansListMember
$creadPrec :: ReadPrec BackupPlansListMember
readList :: ReadS [BackupPlansListMember]
$creadList :: ReadS [BackupPlansListMember]
readsPrec :: Int -> ReadS BackupPlansListMember
$creadsPrec :: Int -> ReadS BackupPlansListMember
Prelude.Read, Int -> BackupPlansListMember -> ShowS
[BackupPlansListMember] -> ShowS
BackupPlansListMember -> String
(Int -> BackupPlansListMember -> ShowS)
-> (BackupPlansListMember -> String)
-> ([BackupPlansListMember] -> ShowS)
-> Show BackupPlansListMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BackupPlansListMember] -> ShowS
$cshowList :: [BackupPlansListMember] -> ShowS
show :: BackupPlansListMember -> String
$cshow :: BackupPlansListMember -> String
showsPrec :: Int -> BackupPlansListMember -> ShowS
$cshowsPrec :: Int -> BackupPlansListMember -> ShowS
Prelude.Show, (forall x. BackupPlansListMember -> Rep BackupPlansListMember x)
-> (forall x. Rep BackupPlansListMember x -> BackupPlansListMember)
-> Generic BackupPlansListMember
forall x. Rep BackupPlansListMember x -> BackupPlansListMember
forall x. BackupPlansListMember -> Rep BackupPlansListMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BackupPlansListMember x -> BackupPlansListMember
$cfrom :: forall x. BackupPlansListMember -> Rep BackupPlansListMember x
Prelude.Generic)

-- |
-- Create a value of 'BackupPlansListMember' 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:
--
-- 'versionId', 'backupPlansListMember_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at
-- most 1,024 bytes long. Version IDs cannot be edited.
--
-- 'backupPlanName', 'backupPlansListMember_backupPlanName' - The display name of a saved backup plan.
--
-- 'advancedBackupSettings', 'backupPlansListMember_advancedBackupSettings' - Contains a list of @BackupOptions@ for a resource type.
--
-- 'backupPlanId', 'backupPlansListMember_backupPlanId' - Uniquely identifies a backup plan.
--
-- 'creatorRequestId', 'backupPlansListMember_creatorRequestId' - A unique string that identifies the request and allows failed requests
-- to be retried without the risk of running the operation twice.
--
-- 'backupPlanArn', 'backupPlansListMember_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;
-- for example,
-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.
--
-- 'lastExecutionDate', 'backupPlansListMember_lastExecutionDate' - The last time a job to back up resources was run with this rule. A date
-- and time, in Unix format and Coordinated Universal Time (UTC). The value
-- of @LastExecutionDate@ is accurate to milliseconds. For example, the
-- value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087
-- AM.
--
-- 'creationDate', 'backupPlansListMember_creationDate' - The date and time a resource backup plan 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.
--
-- 'deletionDate', 'backupPlansListMember_deletionDate' - The date and time a backup plan is deleted, in Unix format and
-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
newBackupPlansListMember ::
  BackupPlansListMember
newBackupPlansListMember :: BackupPlansListMember
newBackupPlansListMember =
  BackupPlansListMember' :: Maybe Text
-> Maybe Text
-> Maybe [AdvancedBackupSetting]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> BackupPlansListMember
BackupPlansListMember'
    { $sel:versionId:BackupPlansListMember' :: Maybe Text
versionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlanName:BackupPlansListMember' :: Maybe Text
backupPlanName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:advancedBackupSettings:BackupPlansListMember' :: Maybe [AdvancedBackupSetting]
advancedBackupSettings = Maybe [AdvancedBackupSetting]
forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlanId:BackupPlansListMember' :: Maybe Text
backupPlanId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:BackupPlansListMember' :: Maybe Text
creatorRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlanArn:BackupPlansListMember' :: Maybe Text
backupPlanArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastExecutionDate:BackupPlansListMember' :: Maybe POSIX
lastExecutionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:BackupPlansListMember' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:deletionDate:BackupPlansListMember' :: Maybe POSIX
deletionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at
-- most 1,024 bytes long. Version IDs cannot be edited.
backupPlansListMember_versionId :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)
backupPlansListMember_versionId :: (Maybe Text -> f (Maybe Text))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_versionId = (BackupPlansListMember -> Maybe Text)
-> (BackupPlansListMember -> Maybe Text -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe Text
versionId :: Maybe Text
$sel:versionId:BackupPlansListMember' :: BackupPlansListMember -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe Text
a -> BackupPlansListMember
s {$sel:versionId:BackupPlansListMember' :: Maybe Text
versionId = Maybe Text
a} :: BackupPlansListMember)

-- | The display name of a saved backup plan.
backupPlansListMember_backupPlanName :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)
backupPlansListMember_backupPlanName :: (Maybe Text -> f (Maybe Text))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_backupPlanName = (BackupPlansListMember -> Maybe Text)
-> (BackupPlansListMember -> Maybe Text -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe Text
backupPlanName :: Maybe Text
$sel:backupPlanName:BackupPlansListMember' :: BackupPlansListMember -> Maybe Text
backupPlanName} -> Maybe Text
backupPlanName) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe Text
a -> BackupPlansListMember
s {$sel:backupPlanName:BackupPlansListMember' :: Maybe Text
backupPlanName = Maybe Text
a} :: BackupPlansListMember)

-- | Contains a list of @BackupOptions@ for a resource type.
backupPlansListMember_advancedBackupSettings :: Lens.Lens' BackupPlansListMember (Prelude.Maybe [AdvancedBackupSetting])
backupPlansListMember_advancedBackupSettings :: (Maybe [AdvancedBackupSetting]
 -> f (Maybe [AdvancedBackupSetting]))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_advancedBackupSettings = (BackupPlansListMember -> Maybe [AdvancedBackupSetting])
-> (BackupPlansListMember
    -> Maybe [AdvancedBackupSetting] -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe [AdvancedBackupSetting])
     (Maybe [AdvancedBackupSetting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe [AdvancedBackupSetting]
advancedBackupSettings :: Maybe [AdvancedBackupSetting]
$sel:advancedBackupSettings:BackupPlansListMember' :: BackupPlansListMember -> Maybe [AdvancedBackupSetting]
advancedBackupSettings} -> Maybe [AdvancedBackupSetting]
advancedBackupSettings) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe [AdvancedBackupSetting]
a -> BackupPlansListMember
s {$sel:advancedBackupSettings:BackupPlansListMember' :: Maybe [AdvancedBackupSetting]
advancedBackupSettings = Maybe [AdvancedBackupSetting]
a} :: BackupPlansListMember) ((Maybe [AdvancedBackupSetting]
  -> f (Maybe [AdvancedBackupSetting]))
 -> BackupPlansListMember -> f BackupPlansListMember)
-> ((Maybe [AdvancedBackupSetting]
     -> f (Maybe [AdvancedBackupSetting]))
    -> Maybe [AdvancedBackupSetting]
    -> f (Maybe [AdvancedBackupSetting]))
-> (Maybe [AdvancedBackupSetting]
    -> f (Maybe [AdvancedBackupSetting]))
-> BackupPlansListMember
-> f BackupPlansListMember
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AdvancedBackupSetting]
  [AdvancedBackupSetting]
  [AdvancedBackupSetting]
  [AdvancedBackupSetting]
-> Iso
     (Maybe [AdvancedBackupSetting])
     (Maybe [AdvancedBackupSetting])
     (Maybe [AdvancedBackupSetting])
     (Maybe [AdvancedBackupSetting])
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
  [AdvancedBackupSetting]
  [AdvancedBackupSetting]
  [AdvancedBackupSetting]
  [AdvancedBackupSetting]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Uniquely identifies a backup plan.
backupPlansListMember_backupPlanId :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)
backupPlansListMember_backupPlanId :: (Maybe Text -> f (Maybe Text))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_backupPlanId = (BackupPlansListMember -> Maybe Text)
-> (BackupPlansListMember -> Maybe Text -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe Text
backupPlanId :: Maybe Text
$sel:backupPlanId:BackupPlansListMember' :: BackupPlansListMember -> Maybe Text
backupPlanId} -> Maybe Text
backupPlanId) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe Text
a -> BackupPlansListMember
s {$sel:backupPlanId:BackupPlansListMember' :: Maybe Text
backupPlanId = Maybe Text
a} :: BackupPlansListMember)

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

-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;
-- for example,
-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.
backupPlansListMember_backupPlanArn :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)
backupPlansListMember_backupPlanArn :: (Maybe Text -> f (Maybe Text))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_backupPlanArn = (BackupPlansListMember -> Maybe Text)
-> (BackupPlansListMember -> Maybe Text -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe Text
backupPlanArn :: Maybe Text
$sel:backupPlanArn:BackupPlansListMember' :: BackupPlansListMember -> Maybe Text
backupPlanArn} -> Maybe Text
backupPlanArn) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe Text
a -> BackupPlansListMember
s {$sel:backupPlanArn:BackupPlansListMember' :: Maybe Text
backupPlanArn = Maybe Text
a} :: BackupPlansListMember)

-- | The last time a job to back up resources was run with this rule. A date
-- and time, in Unix format and Coordinated Universal Time (UTC). The value
-- of @LastExecutionDate@ is accurate to milliseconds. For example, the
-- value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087
-- AM.
backupPlansListMember_lastExecutionDate :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.UTCTime)
backupPlansListMember_lastExecutionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_lastExecutionDate = (BackupPlansListMember -> Maybe POSIX)
-> (BackupPlansListMember -> Maybe POSIX -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe POSIX
lastExecutionDate :: Maybe POSIX
$sel:lastExecutionDate:BackupPlansListMember' :: BackupPlansListMember -> Maybe POSIX
lastExecutionDate} -> Maybe POSIX
lastExecutionDate) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe POSIX
a -> BackupPlansListMember
s {$sel:lastExecutionDate:BackupPlansListMember' :: Maybe POSIX
lastExecutionDate = Maybe POSIX
a} :: BackupPlansListMember) ((Maybe POSIX -> f (Maybe POSIX))
 -> BackupPlansListMember -> f BackupPlansListMember)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupPlansListMember
-> f BackupPlansListMember
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 date and time a resource backup plan 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.
backupPlansListMember_creationDate :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.UTCTime)
backupPlansListMember_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_creationDate = (BackupPlansListMember -> Maybe POSIX)
-> (BackupPlansListMember -> Maybe POSIX -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:BackupPlansListMember' :: BackupPlansListMember -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe POSIX
a -> BackupPlansListMember
s {$sel:creationDate:BackupPlansListMember' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: BackupPlansListMember) ((Maybe POSIX -> f (Maybe POSIX))
 -> BackupPlansListMember -> f BackupPlansListMember)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupPlansListMember
-> f BackupPlansListMember
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 date and time a backup plan is deleted, in Unix format and
-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
backupPlansListMember_deletionDate :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.UTCTime)
backupPlansListMember_deletionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupPlansListMember -> f BackupPlansListMember
backupPlansListMember_deletionDate = (BackupPlansListMember -> Maybe POSIX)
-> (BackupPlansListMember -> Maybe POSIX -> BackupPlansListMember)
-> Lens
     BackupPlansListMember
     BackupPlansListMember
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupPlansListMember' {Maybe POSIX
deletionDate :: Maybe POSIX
$sel:deletionDate:BackupPlansListMember' :: BackupPlansListMember -> Maybe POSIX
deletionDate} -> Maybe POSIX
deletionDate) (\s :: BackupPlansListMember
s@BackupPlansListMember' {} Maybe POSIX
a -> BackupPlansListMember
s {$sel:deletionDate:BackupPlansListMember' :: Maybe POSIX
deletionDate = Maybe POSIX
a} :: BackupPlansListMember) ((Maybe POSIX -> f (Maybe POSIX))
 -> BackupPlansListMember -> f BackupPlansListMember)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupPlansListMember
-> f BackupPlansListMember
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

instance Core.FromJSON BackupPlansListMember where
  parseJSON :: Value -> Parser BackupPlansListMember
parseJSON =
    String
-> (Object -> Parser BackupPlansListMember)
-> Value
-> Parser BackupPlansListMember
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BackupPlansListMember"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [AdvancedBackupSetting]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> BackupPlansListMember
BackupPlansListMember'
            (Maybe Text
 -> Maybe Text
 -> Maybe [AdvancedBackupSetting]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> BackupPlansListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [AdvancedBackupSetting]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> BackupPlansListMember)
forall (f :: * -> *) a b. Functor 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
"VersionId")
            Parser
  (Maybe Text
   -> Maybe [AdvancedBackupSetting]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> BackupPlansListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe [AdvancedBackupSetting]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> BackupPlansListMember)
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
"BackupPlanName")
            Parser
  (Maybe [AdvancedBackupSetting]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> BackupPlansListMember)
-> Parser (Maybe [AdvancedBackupSetting])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> BackupPlansListMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [AdvancedBackupSetting]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AdvancedBackupSettings"
                            Parser (Maybe (Maybe [AdvancedBackupSetting]))
-> Maybe [AdvancedBackupSetting]
-> Parser (Maybe [AdvancedBackupSetting])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AdvancedBackupSetting]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> BackupPlansListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> BackupPlansListMember)
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
"BackupPlanId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> BackupPlansListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> BackupPlansListMember)
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 Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> BackupPlansListMember)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX -> Maybe POSIX -> BackupPlansListMember)
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
"BackupPlanArn")
            Parser
  (Maybe POSIX
   -> Maybe POSIX -> Maybe POSIX -> BackupPlansListMember)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Maybe POSIX -> BackupPlansListMember)
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
"LastExecutionDate")
            Parser (Maybe POSIX -> Maybe POSIX -> BackupPlansListMember)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> BackupPlansListMember)
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 POSIX -> BackupPlansListMember)
-> Parser (Maybe POSIX) -> Parser BackupPlansListMember
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
"DeletionDate")
      )

instance Prelude.Hashable BackupPlansListMember

instance Prelude.NFData BackupPlansListMember