{-# 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.OpsWorksCM.Types.Backup
-- 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.OpsWorksCM.Types.Backup where

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

-- | Describes a single backup.
--
-- /See:/ 'newBackup' smart constructor.
data Backup = Backup'
  { -- | The engine version that is obtained from the server when the backup is
    -- created.
    Backup -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The service role ARN that is obtained from the server when the backup is
    -- created.
    Backup -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The status of a backup while in progress.
    Backup -> Maybe BackupStatus
status :: Prelude.Maybe BackupStatus,
    -- | The EC2 instance profile ARN that is obtained from the server when the
    -- backup is created. Because this value is stored, you are not required to
    -- provide the InstanceProfileArn again if you restore a backup.
    Backup -> Maybe Text
instanceProfileArn :: Prelude.Maybe Prelude.Text,
    -- | The security group IDs that are obtained from the server when the backup
    -- is created.
    Backup -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | An informational message about backup status.
    Backup -> Maybe Text
statusDescription :: Prelude.Maybe Prelude.Text,
    -- | The name of the server from which the backup was made.
    Backup -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | The subnet IDs that are obtained from the server when the backup is
    -- created.
    Backup -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The key pair that is obtained from the server when the backup is
    -- created.
    Backup -> Maybe Text
keyPair :: Prelude.Maybe Prelude.Text,
    -- | The time stamp when the backup was created in the database. Example:
    -- @2016-07-29T13:38:47.520Z@
    Backup -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The generated ID of the backup. Example:
    -- @myServerName-yyyyMMddHHmmssSSS@
    Backup -> Maybe Text
backupId :: Prelude.Maybe Prelude.Text,
    -- | The engine type that is obtained from the server when the backup is
    -- created.
    Backup -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | The instance type that is obtained from the server when the backup is
    -- created.
    Backup -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | The engine model that is obtained from the server when the backup is
    -- created.
    Backup -> Maybe Text
engineModel :: Prelude.Maybe Prelude.Text,
    -- | The preferred maintenance period that is obtained from the server when
    -- the backup is created.
    Backup -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The IAM user ARN of the requester for manual backups. This field is
    -- empty for automated backups.
    Backup -> Maybe Text
userArn :: Prelude.Maybe Prelude.Text,
    -- | The preferred backup period that is obtained from the server when the
    -- backup is created.
    Backup -> Maybe Text
preferredBackupWindow :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 URL of the backup\'s log file.
    Backup -> Maybe Text
s3LogUrl :: Prelude.Maybe Prelude.Text,
    -- | This field is deprecated and is no longer used.
    Backup -> Maybe Int
s3DataSize :: Prelude.Maybe Prelude.Int,
    -- | The ARN of the backup.
    Backup -> Maybe Text
backupArn :: Prelude.Maybe Prelude.Text,
    -- | This field is deprecated and is no longer used.
    Backup -> Maybe Text
s3DataUrl :: Prelude.Maybe Prelude.Text,
    -- | A user-provided description for a manual backup. This field is empty for
    -- automated backups.
    Backup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The backup type. Valid values are @automated@ or @manual@.
    Backup -> Maybe BackupType
backupType :: Prelude.Maybe BackupType,
    -- | The version of AWS OpsWorks CM-specific tools that is obtained from the
    -- server when the backup is created.
    Backup -> Maybe Text
toolsVersion :: Prelude.Maybe Prelude.Text
  }
  deriving (Backup -> Backup -> Bool
(Backup -> Backup -> Bool)
-> (Backup -> Backup -> Bool) -> Eq Backup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Backup -> Backup -> Bool
$c/= :: Backup -> Backup -> Bool
== :: Backup -> Backup -> Bool
$c== :: Backup -> Backup -> Bool
Prelude.Eq, ReadPrec [Backup]
ReadPrec Backup
Int -> ReadS Backup
ReadS [Backup]
(Int -> ReadS Backup)
-> ReadS [Backup]
-> ReadPrec Backup
-> ReadPrec [Backup]
-> Read Backup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Backup]
$creadListPrec :: ReadPrec [Backup]
readPrec :: ReadPrec Backup
$creadPrec :: ReadPrec Backup
readList :: ReadS [Backup]
$creadList :: ReadS [Backup]
readsPrec :: Int -> ReadS Backup
$creadsPrec :: Int -> ReadS Backup
Prelude.Read, Int -> Backup -> ShowS
[Backup] -> ShowS
Backup -> String
(Int -> Backup -> ShowS)
-> (Backup -> String) -> ([Backup] -> ShowS) -> Show Backup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Backup] -> ShowS
$cshowList :: [Backup] -> ShowS
show :: Backup -> String
$cshow :: Backup -> String
showsPrec :: Int -> Backup -> ShowS
$cshowsPrec :: Int -> Backup -> ShowS
Prelude.Show, (forall x. Backup -> Rep Backup x)
-> (forall x. Rep Backup x -> Backup) -> Generic Backup
forall x. Rep Backup x -> Backup
forall x. Backup -> Rep Backup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Backup x -> Backup
$cfrom :: forall x. Backup -> Rep Backup x
Prelude.Generic)

-- |
-- Create a value of 'Backup' 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:
--
-- 'engineVersion', 'backup_engineVersion' - The engine version that is obtained from the server when the backup is
-- created.
--
-- 'serviceRoleArn', 'backup_serviceRoleArn' - The service role ARN that is obtained from the server when the backup is
-- created.
--
-- 'status', 'backup_status' - The status of a backup while in progress.
--
-- 'instanceProfileArn', 'backup_instanceProfileArn' - The EC2 instance profile ARN that is obtained from the server when the
-- backup is created. Because this value is stored, you are not required to
-- provide the InstanceProfileArn again if you restore a backup.
--
-- 'securityGroupIds', 'backup_securityGroupIds' - The security group IDs that are obtained from the server when the backup
-- is created.
--
-- 'statusDescription', 'backup_statusDescription' - An informational message about backup status.
--
-- 'serverName', 'backup_serverName' - The name of the server from which the backup was made.
--
-- 'subnetIds', 'backup_subnetIds' - The subnet IDs that are obtained from the server when the backup is
-- created.
--
-- 'keyPair', 'backup_keyPair' - The key pair that is obtained from the server when the backup is
-- created.
--
-- 'createdAt', 'backup_createdAt' - The time stamp when the backup was created in the database. Example:
-- @2016-07-29T13:38:47.520Z@
--
-- 'backupId', 'backup_backupId' - The generated ID of the backup. Example:
-- @myServerName-yyyyMMddHHmmssSSS@
--
-- 'engine', 'backup_engine' - The engine type that is obtained from the server when the backup is
-- created.
--
-- 'instanceType', 'backup_instanceType' - The instance type that is obtained from the server when the backup is
-- created.
--
-- 'engineModel', 'backup_engineModel' - The engine model that is obtained from the server when the backup is
-- created.
--
-- 'preferredMaintenanceWindow', 'backup_preferredMaintenanceWindow' - The preferred maintenance period that is obtained from the server when
-- the backup is created.
--
-- 'userArn', 'backup_userArn' - The IAM user ARN of the requester for manual backups. This field is
-- empty for automated backups.
--
-- 'preferredBackupWindow', 'backup_preferredBackupWindow' - The preferred backup period that is obtained from the server when the
-- backup is created.
--
-- 's3LogUrl', 'backup_s3LogUrl' - The Amazon S3 URL of the backup\'s log file.
--
-- 's3DataSize', 'backup_s3DataSize' - This field is deprecated and is no longer used.
--
-- 'backupArn', 'backup_backupArn' - The ARN of the backup.
--
-- 's3DataUrl', 'backup_s3DataUrl' - This field is deprecated and is no longer used.
--
-- 'description', 'backup_description' - A user-provided description for a manual backup. This field is empty for
-- automated backups.
--
-- 'backupType', 'backup_backupType' - The backup type. Valid values are @automated@ or @manual@.
--
-- 'toolsVersion', 'backup_toolsVersion' - The version of AWS OpsWorks CM-specific tools that is obtained from the
-- server when the backup is created.
newBackup ::
  Backup
newBackup :: Backup
newBackup =
  Backup' :: Maybe Text
-> Maybe Text
-> Maybe BackupStatus
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe BackupType
-> Maybe Text
-> Backup
Backup'
    { $sel:engineVersion:Backup' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRoleArn:Backup' :: Maybe Text
serviceRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:Backup' :: Maybe BackupStatus
status = Maybe BackupStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceProfileArn:Backup' :: Maybe Text
instanceProfileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:Backup' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:statusDescription:Backup' :: Maybe Text
statusDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverName:Backup' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:Backup' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:keyPair:Backup' :: Maybe Text
keyPair = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Backup' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backupId:Backup' :: Maybe Text
backupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:Backup' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:Backup' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineModel:Backup' :: Maybe Text
engineModel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:Backup' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userArn:Backup' :: Maybe Text
userArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredBackupWindow:Backup' :: Maybe Text
preferredBackupWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3LogUrl:Backup' :: Maybe Text
s3LogUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3DataSize:Backup' :: Maybe Int
s3DataSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:backupArn:Backup' :: Maybe Text
backupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3DataUrl:Backup' :: Maybe Text
s3DataUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Backup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupType:Backup' :: Maybe BackupType
backupType = Maybe BackupType
forall a. Maybe a
Prelude.Nothing,
      $sel:toolsVersion:Backup' :: Maybe Text
toolsVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The engine version that is obtained from the server when the backup is
-- created.
backup_engineVersion :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_engineVersion :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_engineVersion = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:Backup' :: Backup -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:engineVersion:Backup' :: Maybe Text
engineVersion = Maybe Text
a} :: Backup)

-- | The service role ARN that is obtained from the server when the backup is
-- created.
backup_serviceRoleArn :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_serviceRoleArn :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_serviceRoleArn = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:Backup' :: Backup -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:serviceRoleArn:Backup' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: Backup)

-- | The status of a backup while in progress.
backup_status :: Lens.Lens' Backup (Prelude.Maybe BackupStatus)
backup_status :: (Maybe BackupStatus -> f (Maybe BackupStatus))
-> Backup -> f Backup
backup_status = (Backup -> Maybe BackupStatus)
-> (Backup -> Maybe BackupStatus -> Backup)
-> Lens Backup Backup (Maybe BackupStatus) (Maybe BackupStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe BackupStatus
status :: Maybe BackupStatus
$sel:status:Backup' :: Backup -> Maybe BackupStatus
status} -> Maybe BackupStatus
status) (\s :: Backup
s@Backup' {} Maybe BackupStatus
a -> Backup
s {$sel:status:Backup' :: Maybe BackupStatus
status = Maybe BackupStatus
a} :: Backup)

-- | The EC2 instance profile ARN that is obtained from the server when the
-- backup is created. Because this value is stored, you are not required to
-- provide the InstanceProfileArn again if you restore a backup.
backup_instanceProfileArn :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_instanceProfileArn :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_instanceProfileArn = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
instanceProfileArn :: Maybe Text
$sel:instanceProfileArn:Backup' :: Backup -> Maybe Text
instanceProfileArn} -> Maybe Text
instanceProfileArn) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:instanceProfileArn:Backup' :: Maybe Text
instanceProfileArn = Maybe Text
a} :: Backup)

-- | The security group IDs that are obtained from the server when the backup
-- is created.
backup_securityGroupIds :: Lens.Lens' Backup (Prelude.Maybe [Prelude.Text])
backup_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text])) -> Backup -> f Backup
backup_securityGroupIds = (Backup -> Maybe [Text])
-> (Backup -> Maybe [Text] -> Backup)
-> Lens Backup Backup (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:Backup' :: Backup -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: Backup
s@Backup' {} Maybe [Text]
a -> Backup
s {$sel:securityGroupIds:Backup' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: Backup) ((Maybe [Text] -> f (Maybe [Text])) -> Backup -> f Backup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Backup
-> f Backup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An informational message about backup status.
backup_statusDescription :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_statusDescription :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_statusDescription = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
statusDescription :: Maybe Text
$sel:statusDescription:Backup' :: Backup -> Maybe Text
statusDescription} -> Maybe Text
statusDescription) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:statusDescription:Backup' :: Maybe Text
statusDescription = Maybe Text
a} :: Backup)

-- | The name of the server from which the backup was made.
backup_serverName :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_serverName :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_serverName = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
serverName :: Maybe Text
$sel:serverName:Backup' :: Backup -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:serverName:Backup' :: Maybe Text
serverName = Maybe Text
a} :: Backup)

-- | The subnet IDs that are obtained from the server when the backup is
-- created.
backup_subnetIds :: Lens.Lens' Backup (Prelude.Maybe [Prelude.Text])
backup_subnetIds :: (Maybe [Text] -> f (Maybe [Text])) -> Backup -> f Backup
backup_subnetIds = (Backup -> Maybe [Text])
-> (Backup -> Maybe [Text] -> Backup)
-> Lens Backup Backup (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:Backup' :: Backup -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: Backup
s@Backup' {} Maybe [Text]
a -> Backup
s {$sel:subnetIds:Backup' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: Backup) ((Maybe [Text] -> f (Maybe [Text])) -> Backup -> f Backup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Backup
-> f Backup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The key pair that is obtained from the server when the backup is
-- created.
backup_keyPair :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_keyPair :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_keyPair = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
keyPair :: Maybe Text
$sel:keyPair:Backup' :: Backup -> Maybe Text
keyPair} -> Maybe Text
keyPair) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:keyPair:Backup' :: Maybe Text
keyPair = Maybe Text
a} :: Backup)

-- | The time stamp when the backup was created in the database. Example:
-- @2016-07-29T13:38:47.520Z@
backup_createdAt :: Lens.Lens' Backup (Prelude.Maybe Prelude.UTCTime)
backup_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Backup -> f Backup
backup_createdAt = (Backup -> Maybe POSIX)
-> (Backup -> Maybe POSIX -> Backup)
-> Lens Backup Backup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Backup' :: Backup -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Backup
s@Backup' {} Maybe POSIX
a -> Backup
s {$sel:createdAt:Backup' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Backup) ((Maybe POSIX -> f (Maybe POSIX)) -> Backup -> f Backup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Backup
-> f Backup
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 generated ID of the backup. Example:
-- @myServerName-yyyyMMddHHmmssSSS@
backup_backupId :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_backupId :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_backupId = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
backupId :: Maybe Text
$sel:backupId:Backup' :: Backup -> Maybe Text
backupId} -> Maybe Text
backupId) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:backupId:Backup' :: Maybe Text
backupId = Maybe Text
a} :: Backup)

-- | The engine type that is obtained from the server when the backup is
-- created.
backup_engine :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_engine :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_engine = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
engine :: Maybe Text
$sel:engine:Backup' :: Backup -> Maybe Text
engine} -> Maybe Text
engine) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:engine:Backup' :: Maybe Text
engine = Maybe Text
a} :: Backup)

-- | The instance type that is obtained from the server when the backup is
-- created.
backup_instanceType :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_instanceType :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_instanceType = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:Backup' :: Backup -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:instanceType:Backup' :: Maybe Text
instanceType = Maybe Text
a} :: Backup)

-- | The engine model that is obtained from the server when the backup is
-- created.
backup_engineModel :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_engineModel :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_engineModel = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
engineModel :: Maybe Text
$sel:engineModel:Backup' :: Backup -> Maybe Text
engineModel} -> Maybe Text
engineModel) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:engineModel:Backup' :: Maybe Text
engineModel = Maybe Text
a} :: Backup)

-- | The preferred maintenance period that is obtained from the server when
-- the backup is created.
backup_preferredMaintenanceWindow :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_preferredMaintenanceWindow = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:Backup' :: Backup -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:preferredMaintenanceWindow:Backup' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: Backup)

-- | The IAM user ARN of the requester for manual backups. This field is
-- empty for automated backups.
backup_userArn :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_userArn :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_userArn = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
userArn :: Maybe Text
$sel:userArn:Backup' :: Backup -> Maybe Text
userArn} -> Maybe Text
userArn) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:userArn:Backup' :: Maybe Text
userArn = Maybe Text
a} :: Backup)

-- | The preferred backup period that is obtained from the server when the
-- backup is created.
backup_preferredBackupWindow :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_preferredBackupWindow :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_preferredBackupWindow = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
preferredBackupWindow :: Maybe Text
$sel:preferredBackupWindow:Backup' :: Backup -> Maybe Text
preferredBackupWindow} -> Maybe Text
preferredBackupWindow) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:preferredBackupWindow:Backup' :: Maybe Text
preferredBackupWindow = Maybe Text
a} :: Backup)

-- | The Amazon S3 URL of the backup\'s log file.
backup_s3LogUrl :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_s3LogUrl :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_s3LogUrl = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
s3LogUrl :: Maybe Text
$sel:s3LogUrl:Backup' :: Backup -> Maybe Text
s3LogUrl} -> Maybe Text
s3LogUrl) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:s3LogUrl:Backup' :: Maybe Text
s3LogUrl = Maybe Text
a} :: Backup)

-- | This field is deprecated and is no longer used.
backup_s3DataSize :: Lens.Lens' Backup (Prelude.Maybe Prelude.Int)
backup_s3DataSize :: (Maybe Int -> f (Maybe Int)) -> Backup -> f Backup
backup_s3DataSize = (Backup -> Maybe Int)
-> (Backup -> Maybe Int -> Backup)
-> Lens Backup Backup (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Int
s3DataSize :: Maybe Int
$sel:s3DataSize:Backup' :: Backup -> Maybe Int
s3DataSize} -> Maybe Int
s3DataSize) (\s :: Backup
s@Backup' {} Maybe Int
a -> Backup
s {$sel:s3DataSize:Backup' :: Maybe Int
s3DataSize = Maybe Int
a} :: Backup)

-- | The ARN of the backup.
backup_backupArn :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_backupArn :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_backupArn = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
backupArn :: Maybe Text
$sel:backupArn:Backup' :: Backup -> Maybe Text
backupArn} -> Maybe Text
backupArn) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:backupArn:Backup' :: Maybe Text
backupArn = Maybe Text
a} :: Backup)

-- | This field is deprecated and is no longer used.
backup_s3DataUrl :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_s3DataUrl :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_s3DataUrl = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
s3DataUrl :: Maybe Text
$sel:s3DataUrl:Backup' :: Backup -> Maybe Text
s3DataUrl} -> Maybe Text
s3DataUrl) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:s3DataUrl:Backup' :: Maybe Text
s3DataUrl = Maybe Text
a} :: Backup)

-- | A user-provided description for a manual backup. This field is empty for
-- automated backups.
backup_description :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_description :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_description = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
description :: Maybe Text
$sel:description:Backup' :: Backup -> Maybe Text
description} -> Maybe Text
description) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:description:Backup' :: Maybe Text
description = Maybe Text
a} :: Backup)

-- | The backup type. Valid values are @automated@ or @manual@.
backup_backupType :: Lens.Lens' Backup (Prelude.Maybe BackupType)
backup_backupType :: (Maybe BackupType -> f (Maybe BackupType)) -> Backup -> f Backup
backup_backupType = (Backup -> Maybe BackupType)
-> (Backup -> Maybe BackupType -> Backup)
-> Lens Backup Backup (Maybe BackupType) (Maybe BackupType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe BackupType
backupType :: Maybe BackupType
$sel:backupType:Backup' :: Backup -> Maybe BackupType
backupType} -> Maybe BackupType
backupType) (\s :: Backup
s@Backup' {} Maybe BackupType
a -> Backup
s {$sel:backupType:Backup' :: Maybe BackupType
backupType = Maybe BackupType
a} :: Backup)

-- | The version of AWS OpsWorks CM-specific tools that is obtained from the
-- server when the backup is created.
backup_toolsVersion :: Lens.Lens' Backup (Prelude.Maybe Prelude.Text)
backup_toolsVersion :: (Maybe Text -> f (Maybe Text)) -> Backup -> f Backup
backup_toolsVersion = (Backup -> Maybe Text)
-> (Backup -> Maybe Text -> Backup)
-> Lens Backup Backup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Backup' {Maybe Text
toolsVersion :: Maybe Text
$sel:toolsVersion:Backup' :: Backup -> Maybe Text
toolsVersion} -> Maybe Text
toolsVersion) (\s :: Backup
s@Backup' {} Maybe Text
a -> Backup
s {$sel:toolsVersion:Backup' :: Maybe Text
toolsVersion = Maybe Text
a} :: Backup)

instance Core.FromJSON Backup where
  parseJSON :: Value -> Parser Backup
parseJSON =
    String -> (Object -> Parser Backup) -> Value -> Parser Backup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Backup"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe BackupStatus
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe BackupType
-> Maybe Text
-> Backup
Backup'
            (Maybe Text
 -> Maybe Text
 -> Maybe BackupStatus
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe BackupType
 -> Maybe Text
 -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe BackupStatus
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"EngineVersion")
            Parser
  (Maybe Text
   -> Maybe BackupStatus
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe BackupStatus
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"ServiceRoleArn")
            Parser
  (Maybe BackupStatus
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe BackupStatus)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"Status")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"InstanceProfileArn")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecurityGroupIds"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"StatusDescription")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"ServerName")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"KeyPair")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"CreatedAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"BackupId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"Engine")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"InstanceType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"EngineModel")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"PreferredMaintenanceWindow")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"UserArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"PreferredBackupWindow")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
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
"S3LogUrl")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BackupType
      -> Maybe Text
      -> Backup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3DataSize")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BackupType
   -> Maybe Text
   -> Backup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe BackupType -> Maybe Text -> Backup)
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 Text -> Maybe BackupType -> Maybe Text -> Backup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe BackupType -> Maybe Text -> Backup)
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
"S3DataUrl")
            Parser (Maybe Text -> Maybe BackupType -> Maybe Text -> Backup)
-> Parser (Maybe Text)
-> Parser (Maybe BackupType -> Maybe Text -> Backup)
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
"Description")
            Parser (Maybe BackupType -> Maybe Text -> Backup)
-> Parser (Maybe BackupType) -> Parser (Maybe Text -> Backup)
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 -> Backup)
-> Parser (Maybe Text) -> Parser Backup
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
"ToolsVersion")
      )

instance Prelude.Hashable Backup

instance Prelude.NFData Backup