{-# 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.DynamoDB.Types.BackupSummary
-- 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.DynamoDB.Types.BackupSummary where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.BackupStatus
import Amazonka.DynamoDB.Types.BackupType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains details for the backup.
--
-- /See:/ 'newBackupSummary' smart constructor.
data BackupSummary = BackupSummary'
  { -- | Time at which the automatic on-demand backup created by DynamoDB will
    -- expire. This @SYSTEM@ on-demand backup expires automatically 35 days
    -- after its creation.
    BackupSummary -> Maybe POSIX
backupExpiryDateTime :: Prelude.Maybe Core.POSIX,
    -- | ARN associated with the table.
    BackupSummary -> Maybe Text
tableArn :: Prelude.Maybe Prelude.Text,
    -- | Name of the specified backup.
    BackupSummary -> Maybe Text
backupName :: Prelude.Maybe Prelude.Text,
    -- | Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
    BackupSummary -> Maybe BackupStatus
backupStatus :: Prelude.Maybe BackupStatus,
    -- | Size of the backup in bytes.
    BackupSummary -> Maybe Natural
backupSizeBytes :: Prelude.Maybe Prelude.Natural,
    -- | ARN associated with the backup.
    BackupSummary -> Maybe Text
backupArn :: Prelude.Maybe Prelude.Text,
    -- | Unique identifier for the table.
    BackupSummary -> Maybe Text
tableId :: Prelude.Maybe Prelude.Text,
    -- | Time at which the backup was created.
    BackupSummary -> Maybe POSIX
backupCreationDateTime :: Prelude.Maybe Core.POSIX,
    -- | BackupType:
    --
    -- -   @USER@ - You create and manage these using the on-demand backup
    --     feature.
    --
    -- -   @SYSTEM@ - If you delete a table with point-in-time recovery
    --     enabled, a @SYSTEM@ backup is automatically created and is retained
    --     for 35 days (at no additional cost). System backups allow you to
    --     restore the deleted table to the state it was in just before the
    --     point of deletion.
    --
    -- -   @AWS_BACKUP@ - On-demand backup created by you from AWS Backup
    --     service.
    BackupSummary -> Maybe BackupType
backupType :: Prelude.Maybe BackupType,
    -- | Name of the table.
    BackupSummary -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text
  }
  deriving (BackupSummary -> BackupSummary -> Bool
(BackupSummary -> BackupSummary -> Bool)
-> (BackupSummary -> BackupSummary -> Bool) -> Eq BackupSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackupSummary -> BackupSummary -> Bool
$c/= :: BackupSummary -> BackupSummary -> Bool
== :: BackupSummary -> BackupSummary -> Bool
$c== :: BackupSummary -> BackupSummary -> Bool
Prelude.Eq, ReadPrec [BackupSummary]
ReadPrec BackupSummary
Int -> ReadS BackupSummary
ReadS [BackupSummary]
(Int -> ReadS BackupSummary)
-> ReadS [BackupSummary]
-> ReadPrec BackupSummary
-> ReadPrec [BackupSummary]
-> Read BackupSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BackupSummary]
$creadListPrec :: ReadPrec [BackupSummary]
readPrec :: ReadPrec BackupSummary
$creadPrec :: ReadPrec BackupSummary
readList :: ReadS [BackupSummary]
$creadList :: ReadS [BackupSummary]
readsPrec :: Int -> ReadS BackupSummary
$creadsPrec :: Int -> ReadS BackupSummary
Prelude.Read, Int -> BackupSummary -> ShowS
[BackupSummary] -> ShowS
BackupSummary -> String
(Int -> BackupSummary -> ShowS)
-> (BackupSummary -> String)
-> ([BackupSummary] -> ShowS)
-> Show BackupSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BackupSummary] -> ShowS
$cshowList :: [BackupSummary] -> ShowS
show :: BackupSummary -> String
$cshow :: BackupSummary -> String
showsPrec :: Int -> BackupSummary -> ShowS
$cshowsPrec :: Int -> BackupSummary -> ShowS
Prelude.Show, (forall x. BackupSummary -> Rep BackupSummary x)
-> (forall x. Rep BackupSummary x -> BackupSummary)
-> Generic BackupSummary
forall x. Rep BackupSummary x -> BackupSummary
forall x. BackupSummary -> Rep BackupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BackupSummary x -> BackupSummary
$cfrom :: forall x. BackupSummary -> Rep BackupSummary x
Prelude.Generic)

-- |
-- Create a value of 'BackupSummary' 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:
--
-- 'backupExpiryDateTime', 'backupSummary_backupExpiryDateTime' - Time at which the automatic on-demand backup created by DynamoDB will
-- expire. This @SYSTEM@ on-demand backup expires automatically 35 days
-- after its creation.
--
-- 'tableArn', 'backupSummary_tableArn' - ARN associated with the table.
--
-- 'backupName', 'backupSummary_backupName' - Name of the specified backup.
--
-- 'backupStatus', 'backupSummary_backupStatus' - Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
--
-- 'backupSizeBytes', 'backupSummary_backupSizeBytes' - Size of the backup in bytes.
--
-- 'backupArn', 'backupSummary_backupArn' - ARN associated with the backup.
--
-- 'tableId', 'backupSummary_tableId' - Unique identifier for the table.
--
-- 'backupCreationDateTime', 'backupSummary_backupCreationDateTime' - Time at which the backup was created.
--
-- 'backupType', 'backupSummary_backupType' - BackupType:
--
-- -   @USER@ - You create and manage these using the on-demand backup
--     feature.
--
-- -   @SYSTEM@ - If you delete a table with point-in-time recovery
--     enabled, a @SYSTEM@ backup is automatically created and is retained
--     for 35 days (at no additional cost). System backups allow you to
--     restore the deleted table to the state it was in just before the
--     point of deletion.
--
-- -   @AWS_BACKUP@ - On-demand backup created by you from AWS Backup
--     service.
--
-- 'tableName', 'backupSummary_tableName' - Name of the table.
newBackupSummary ::
  BackupSummary
newBackupSummary :: BackupSummary
newBackupSummary =
  BackupSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe BackupStatus
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupType
-> Maybe Text
-> BackupSummary
BackupSummary'
    { $sel:backupExpiryDateTime:BackupSummary' :: Maybe POSIX
backupExpiryDateTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:tableArn:BackupSummary' :: Maybe Text
tableArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupName:BackupSummary' :: Maybe Text
backupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupStatus:BackupSummary' :: Maybe BackupStatus
backupStatus = Maybe BackupStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:backupSizeBytes:BackupSummary' :: Maybe Natural
backupSizeBytes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:backupArn:BackupSummary' :: Maybe Text
backupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tableId:BackupSummary' :: Maybe Text
tableId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupCreationDateTime:BackupSummary' :: Maybe POSIX
backupCreationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backupType:BackupSummary' :: Maybe BackupType
backupType = Maybe BackupType
forall a. Maybe a
Prelude.Nothing,
      $sel:tableName:BackupSummary' :: Maybe Text
tableName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Time at which the automatic on-demand backup created by DynamoDB will
-- expire. This @SYSTEM@ on-demand backup expires automatically 35 days
-- after its creation.
backupSummary_backupExpiryDateTime :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.UTCTime)
backupSummary_backupExpiryDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupSummary -> f BackupSummary
backupSummary_backupExpiryDateTime = (BackupSummary -> Maybe POSIX)
-> (BackupSummary -> Maybe POSIX -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe POSIX
backupExpiryDateTime :: Maybe POSIX
$sel:backupExpiryDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
backupExpiryDateTime} -> Maybe POSIX
backupExpiryDateTime) (\s :: BackupSummary
s@BackupSummary' {} Maybe POSIX
a -> BackupSummary
s {$sel:backupExpiryDateTime:BackupSummary' :: Maybe POSIX
backupExpiryDateTime = Maybe POSIX
a} :: BackupSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> BackupSummary -> f BackupSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupSummary
-> f BackupSummary
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

-- | ARN associated with the table.
backupSummary_tableArn :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_tableArn :: (Maybe Text -> f (Maybe Text)) -> BackupSummary -> f BackupSummary
backupSummary_tableArn = (BackupSummary -> Maybe Text)
-> (BackupSummary -> Maybe Text -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
tableArn :: Maybe Text
$sel:tableArn:BackupSummary' :: BackupSummary -> Maybe Text
tableArn} -> Maybe Text
tableArn) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:tableArn:BackupSummary' :: Maybe Text
tableArn = Maybe Text
a} :: BackupSummary)

-- | Name of the specified backup.
backupSummary_backupName :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_backupName :: (Maybe Text -> f (Maybe Text)) -> BackupSummary -> f BackupSummary
backupSummary_backupName = (BackupSummary -> Maybe Text)
-> (BackupSummary -> Maybe Text -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
backupName :: Maybe Text
$sel:backupName:BackupSummary' :: BackupSummary -> Maybe Text
backupName} -> Maybe Text
backupName) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:backupName:BackupSummary' :: Maybe Text
backupName = Maybe Text
a} :: BackupSummary)

-- | Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
backupSummary_backupStatus :: Lens.Lens' BackupSummary (Prelude.Maybe BackupStatus)
backupSummary_backupStatus :: (Maybe BackupStatus -> f (Maybe BackupStatus))
-> BackupSummary -> f BackupSummary
backupSummary_backupStatus = (BackupSummary -> Maybe BackupStatus)
-> (BackupSummary -> Maybe BackupStatus -> BackupSummary)
-> Lens
     BackupSummary
     BackupSummary
     (Maybe BackupStatus)
     (Maybe BackupStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe BackupStatus
backupStatus :: Maybe BackupStatus
$sel:backupStatus:BackupSummary' :: BackupSummary -> Maybe BackupStatus
backupStatus} -> Maybe BackupStatus
backupStatus) (\s :: BackupSummary
s@BackupSummary' {} Maybe BackupStatus
a -> BackupSummary
s {$sel:backupStatus:BackupSummary' :: Maybe BackupStatus
backupStatus = Maybe BackupStatus
a} :: BackupSummary)

-- | Size of the backup in bytes.
backupSummary_backupSizeBytes :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Natural)
backupSummary_backupSizeBytes :: (Maybe Natural -> f (Maybe Natural))
-> BackupSummary -> f BackupSummary
backupSummary_backupSizeBytes = (BackupSummary -> Maybe Natural)
-> (BackupSummary -> Maybe Natural -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Natural
backupSizeBytes :: Maybe Natural
$sel:backupSizeBytes:BackupSummary' :: BackupSummary -> Maybe Natural
backupSizeBytes} -> Maybe Natural
backupSizeBytes) (\s :: BackupSummary
s@BackupSummary' {} Maybe Natural
a -> BackupSummary
s {$sel:backupSizeBytes:BackupSummary' :: Maybe Natural
backupSizeBytes = Maybe Natural
a} :: BackupSummary)

-- | ARN associated with the backup.
backupSummary_backupArn :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_backupArn :: (Maybe Text -> f (Maybe Text)) -> BackupSummary -> f BackupSummary
backupSummary_backupArn = (BackupSummary -> Maybe Text)
-> (BackupSummary -> Maybe Text -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
backupArn :: Maybe Text
$sel:backupArn:BackupSummary' :: BackupSummary -> Maybe Text
backupArn} -> Maybe Text
backupArn) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:backupArn:BackupSummary' :: Maybe Text
backupArn = Maybe Text
a} :: BackupSummary)

-- | Unique identifier for the table.
backupSummary_tableId :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_tableId :: (Maybe Text -> f (Maybe Text)) -> BackupSummary -> f BackupSummary
backupSummary_tableId = (BackupSummary -> Maybe Text)
-> (BackupSummary -> Maybe Text -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
tableId :: Maybe Text
$sel:tableId:BackupSummary' :: BackupSummary -> Maybe Text
tableId} -> Maybe Text
tableId) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:tableId:BackupSummary' :: Maybe Text
tableId = Maybe Text
a} :: BackupSummary)

-- | Time at which the backup was created.
backupSummary_backupCreationDateTime :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.UTCTime)
backupSummary_backupCreationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupSummary -> f BackupSummary
backupSummary_backupCreationDateTime = (BackupSummary -> Maybe POSIX)
-> (BackupSummary -> Maybe POSIX -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe POSIX
backupCreationDateTime :: Maybe POSIX
$sel:backupCreationDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
backupCreationDateTime} -> Maybe POSIX
backupCreationDateTime) (\s :: BackupSummary
s@BackupSummary' {} Maybe POSIX
a -> BackupSummary
s {$sel:backupCreationDateTime:BackupSummary' :: Maybe POSIX
backupCreationDateTime = Maybe POSIX
a} :: BackupSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> BackupSummary -> f BackupSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BackupSummary
-> f BackupSummary
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

-- | BackupType:
--
-- -   @USER@ - You create and manage these using the on-demand backup
--     feature.
--
-- -   @SYSTEM@ - If you delete a table with point-in-time recovery
--     enabled, a @SYSTEM@ backup is automatically created and is retained
--     for 35 days (at no additional cost). System backups allow you to
--     restore the deleted table to the state it was in just before the
--     point of deletion.
--
-- -   @AWS_BACKUP@ - On-demand backup created by you from AWS Backup
--     service.
backupSummary_backupType :: Lens.Lens' BackupSummary (Prelude.Maybe BackupType)
backupSummary_backupType :: (Maybe BackupType -> f (Maybe BackupType))
-> BackupSummary -> f BackupSummary
backupSummary_backupType = (BackupSummary -> Maybe BackupType)
-> (BackupSummary -> Maybe BackupType -> BackupSummary)
-> Lens
     BackupSummary BackupSummary (Maybe BackupType) (Maybe BackupType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe BackupType
backupType :: Maybe BackupType
$sel:backupType:BackupSummary' :: BackupSummary -> Maybe BackupType
backupType} -> Maybe BackupType
backupType) (\s :: BackupSummary
s@BackupSummary' {} Maybe BackupType
a -> BackupSummary
s {$sel:backupType:BackupSummary' :: Maybe BackupType
backupType = Maybe BackupType
a} :: BackupSummary)

-- | Name of the table.
backupSummary_tableName :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_tableName :: (Maybe Text -> f (Maybe Text)) -> BackupSummary -> f BackupSummary
backupSummary_tableName = (BackupSummary -> Maybe Text)
-> (BackupSummary -> Maybe Text -> BackupSummary)
-> Lens BackupSummary BackupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
tableName :: Maybe Text
$sel:tableName:BackupSummary' :: BackupSummary -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:tableName:BackupSummary' :: Maybe Text
tableName = Maybe Text
a} :: BackupSummary)

instance Core.FromJSON BackupSummary where
  parseJSON :: Value -> Parser BackupSummary
parseJSON =
    String
-> (Object -> Parser BackupSummary)
-> Value
-> Parser BackupSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BackupSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe BackupStatus
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupType
-> Maybe Text
-> BackupSummary
BackupSummary'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe BackupStatus
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe BackupType
 -> Maybe Text
 -> BackupSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe BackupStatus
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe BackupType
      -> Maybe Text
      -> BackupSummary)
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
"BackupExpiryDateTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe BackupStatus
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe BackupType
   -> Maybe Text
   -> BackupSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe BackupStatus
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe BackupType
      -> Maybe Text
      -> BackupSummary)
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
"TableArn")
            Parser
  (Maybe Text
   -> Maybe BackupStatus
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe BackupType
   -> Maybe Text
   -> BackupSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe BackupStatus
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe BackupType
      -> Maybe Text
      -> BackupSummary)
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
"BackupName")
            Parser
  (Maybe BackupStatus
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe BackupType
   -> Maybe Text
   -> BackupSummary)
-> Parser (Maybe BackupStatus)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe BackupType
      -> Maybe Text
      -> BackupSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BackupStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupStatus")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe BackupType
   -> Maybe Text
   -> BackupSummary)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe BackupType
      -> Maybe Text
      -> BackupSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupSizeBytes")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe BackupType
   -> Maybe Text
   -> BackupSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX -> Maybe BackupType -> Maybe Text -> BackupSummary)
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
"BackupArn")
            Parser
  (Maybe Text
   -> Maybe POSIX -> Maybe BackupType -> Maybe Text -> BackupSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX -> Maybe BackupType -> Maybe Text -> BackupSummary)
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
"TableId")
            Parser
  (Maybe POSIX -> Maybe BackupType -> Maybe Text -> BackupSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe BackupType -> Maybe Text -> BackupSummary)
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
"BackupCreationDateTime")
            Parser (Maybe BackupType -> Maybe Text -> BackupSummary)
-> Parser (Maybe BackupType)
-> Parser (Maybe Text -> BackupSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BackupType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupType")
            Parser (Maybe Text -> BackupSummary)
-> Parser (Maybe Text) -> Parser BackupSummary
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
"TableName")
      )

instance Prelude.Hashable BackupSummary

instance Prelude.NFData BackupSummary