{-# 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.RDS.Types.DBInstanceAutomatedBackupsReplication
-- 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.RDS.Types.DBInstanceAutomatedBackupsReplication where

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

-- | Automated backups of a DB instance replicated to another Amazon Web
-- Services Region. They consist of system backups, transaction logs, and
-- database instance properties.
--
-- /See:/ 'newDBInstanceAutomatedBackupsReplication' smart constructor.
data DBInstanceAutomatedBackupsReplication = DBInstanceAutomatedBackupsReplication'
  { -- | The Amazon Resource Name (ARN) of the replicated automated backups.
    DBInstanceAutomatedBackupsReplication -> Maybe Text
dbInstanceAutomatedBackupsArn :: Prelude.Maybe Prelude.Text
  }
  deriving (DBInstanceAutomatedBackupsReplication
-> DBInstanceAutomatedBackupsReplication -> Bool
(DBInstanceAutomatedBackupsReplication
 -> DBInstanceAutomatedBackupsReplication -> Bool)
-> (DBInstanceAutomatedBackupsReplication
    -> DBInstanceAutomatedBackupsReplication -> Bool)
-> Eq DBInstanceAutomatedBackupsReplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBInstanceAutomatedBackupsReplication
-> DBInstanceAutomatedBackupsReplication -> Bool
$c/= :: DBInstanceAutomatedBackupsReplication
-> DBInstanceAutomatedBackupsReplication -> Bool
== :: DBInstanceAutomatedBackupsReplication
-> DBInstanceAutomatedBackupsReplication -> Bool
$c== :: DBInstanceAutomatedBackupsReplication
-> DBInstanceAutomatedBackupsReplication -> Bool
Prelude.Eq, ReadPrec [DBInstanceAutomatedBackupsReplication]
ReadPrec DBInstanceAutomatedBackupsReplication
Int -> ReadS DBInstanceAutomatedBackupsReplication
ReadS [DBInstanceAutomatedBackupsReplication]
(Int -> ReadS DBInstanceAutomatedBackupsReplication)
-> ReadS [DBInstanceAutomatedBackupsReplication]
-> ReadPrec DBInstanceAutomatedBackupsReplication
-> ReadPrec [DBInstanceAutomatedBackupsReplication]
-> Read DBInstanceAutomatedBackupsReplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBInstanceAutomatedBackupsReplication]
$creadListPrec :: ReadPrec [DBInstanceAutomatedBackupsReplication]
readPrec :: ReadPrec DBInstanceAutomatedBackupsReplication
$creadPrec :: ReadPrec DBInstanceAutomatedBackupsReplication
readList :: ReadS [DBInstanceAutomatedBackupsReplication]
$creadList :: ReadS [DBInstanceAutomatedBackupsReplication]
readsPrec :: Int -> ReadS DBInstanceAutomatedBackupsReplication
$creadsPrec :: Int -> ReadS DBInstanceAutomatedBackupsReplication
Prelude.Read, Int -> DBInstanceAutomatedBackupsReplication -> ShowS
[DBInstanceAutomatedBackupsReplication] -> ShowS
DBInstanceAutomatedBackupsReplication -> String
(Int -> DBInstanceAutomatedBackupsReplication -> ShowS)
-> (DBInstanceAutomatedBackupsReplication -> String)
-> ([DBInstanceAutomatedBackupsReplication] -> ShowS)
-> Show DBInstanceAutomatedBackupsReplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBInstanceAutomatedBackupsReplication] -> ShowS
$cshowList :: [DBInstanceAutomatedBackupsReplication] -> ShowS
show :: DBInstanceAutomatedBackupsReplication -> String
$cshow :: DBInstanceAutomatedBackupsReplication -> String
showsPrec :: Int -> DBInstanceAutomatedBackupsReplication -> ShowS
$cshowsPrec :: Int -> DBInstanceAutomatedBackupsReplication -> ShowS
Prelude.Show, (forall x.
 DBInstanceAutomatedBackupsReplication
 -> Rep DBInstanceAutomatedBackupsReplication x)
-> (forall x.
    Rep DBInstanceAutomatedBackupsReplication x
    -> DBInstanceAutomatedBackupsReplication)
-> Generic DBInstanceAutomatedBackupsReplication
forall x.
Rep DBInstanceAutomatedBackupsReplication x
-> DBInstanceAutomatedBackupsReplication
forall x.
DBInstanceAutomatedBackupsReplication
-> Rep DBInstanceAutomatedBackupsReplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DBInstanceAutomatedBackupsReplication x
-> DBInstanceAutomatedBackupsReplication
$cfrom :: forall x.
DBInstanceAutomatedBackupsReplication
-> Rep DBInstanceAutomatedBackupsReplication x
Prelude.Generic)

-- |
-- Create a value of 'DBInstanceAutomatedBackupsReplication' 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:
--
-- 'dbInstanceAutomatedBackupsArn', 'dbInstanceAutomatedBackupsReplication_dbInstanceAutomatedBackupsArn' - The Amazon Resource Name (ARN) of the replicated automated backups.
newDBInstanceAutomatedBackupsReplication ::
  DBInstanceAutomatedBackupsReplication
newDBInstanceAutomatedBackupsReplication :: DBInstanceAutomatedBackupsReplication
newDBInstanceAutomatedBackupsReplication =
  DBInstanceAutomatedBackupsReplication' :: Maybe Text -> DBInstanceAutomatedBackupsReplication
DBInstanceAutomatedBackupsReplication'
    { $sel:dbInstanceAutomatedBackupsArn:DBInstanceAutomatedBackupsReplication' :: Maybe Text
dbInstanceAutomatedBackupsArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the replicated automated backups.
dbInstanceAutomatedBackupsReplication_dbInstanceAutomatedBackupsArn :: Lens.Lens' DBInstanceAutomatedBackupsReplication (Prelude.Maybe Prelude.Text)
dbInstanceAutomatedBackupsReplication_dbInstanceAutomatedBackupsArn :: (Maybe Text -> f (Maybe Text))
-> DBInstanceAutomatedBackupsReplication
-> f DBInstanceAutomatedBackupsReplication
dbInstanceAutomatedBackupsReplication_dbInstanceAutomatedBackupsArn = (DBInstanceAutomatedBackupsReplication -> Maybe Text)
-> (DBInstanceAutomatedBackupsReplication
    -> Maybe Text -> DBInstanceAutomatedBackupsReplication)
-> Lens
     DBInstanceAutomatedBackupsReplication
     DBInstanceAutomatedBackupsReplication
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBInstanceAutomatedBackupsReplication' {Maybe Text
dbInstanceAutomatedBackupsArn :: Maybe Text
$sel:dbInstanceAutomatedBackupsArn:DBInstanceAutomatedBackupsReplication' :: DBInstanceAutomatedBackupsReplication -> Maybe Text
dbInstanceAutomatedBackupsArn} -> Maybe Text
dbInstanceAutomatedBackupsArn) (\s :: DBInstanceAutomatedBackupsReplication
s@DBInstanceAutomatedBackupsReplication' {} Maybe Text
a -> DBInstanceAutomatedBackupsReplication
s {$sel:dbInstanceAutomatedBackupsArn:DBInstanceAutomatedBackupsReplication' :: Maybe Text
dbInstanceAutomatedBackupsArn = Maybe Text
a} :: DBInstanceAutomatedBackupsReplication)

instance
  Core.FromXML
    DBInstanceAutomatedBackupsReplication
  where
  parseXML :: [Node] -> Either String DBInstanceAutomatedBackupsReplication
parseXML [Node]
x =
    Maybe Text -> DBInstanceAutomatedBackupsReplication
DBInstanceAutomatedBackupsReplication'
      (Maybe Text -> DBInstanceAutomatedBackupsReplication)
-> Either String (Maybe Text)
-> Either String DBInstanceAutomatedBackupsReplication
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBInstanceAutomatedBackupsArn")

instance
  Prelude.Hashable
    DBInstanceAutomatedBackupsReplication

instance
  Prelude.NFData
    DBInstanceAutomatedBackupsReplication