{-# 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.Lightsail.Types.RelationalDatabaseSnapshot
-- 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.Lightsail.Types.RelationalDatabaseSnapshot where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describes a database snapshot.
--
-- /See:/ 'newRelationalDatabaseSnapshot' smart constructor.
data RelationalDatabaseSnapshot = RelationalDatabaseSnapshot'
  { -- | The database engine version for the database snapshot (for example,
    -- @5.7.23@).
    RelationalDatabaseSnapshot -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The state of the database snapshot.
    RelationalDatabaseSnapshot -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
    -- | The name of the source database from which the database snapshot was
    -- created.
    RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseName :: Prelude.Maybe Prelude.Text,
    -- | The Lightsail resource type.
    RelationalDatabaseSnapshot -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The blueprint ID of the database from which the database snapshot was
    -- created. A blueprint describes the major engine version of a database.
    RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseBlueprintId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the database snapshot.
    RelationalDatabaseSnapshot -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the database snapshot was created.
    RelationalDatabaseSnapshot -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The Region name and Availability Zone where the database snapshot is
    -- located.
    RelationalDatabaseSnapshot -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
    -- | The software of the database snapshot (for example, @MySQL@)
    RelationalDatabaseSnapshot -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | The name of the database snapshot.
    RelationalDatabaseSnapshot -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The size of the disk in GB (for example, @32@) for the database
    -- snapshot.
    RelationalDatabaseSnapshot -> Maybe Int
sizeInGb :: Prelude.Maybe Prelude.Int,
    -- | The support code for the database snapshot. Include this code in your
    -- email to support when you have questions about a database snapshot in
    -- Lightsail. This code enables our support team to look up your Lightsail
    -- information more easily.
    RelationalDatabaseSnapshot -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the database from which the database
    -- snapshot was created.
    RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseArn :: Prelude.Maybe Prelude.Text,
    -- | The bundle ID of the database from which the database snapshot was
    -- created.
    RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseBundleId :: Prelude.Maybe Prelude.Text,
    -- | The tag keys and optional values for the resource. For more information
    -- about tags in Lightsail, see the
    -- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
    RelationalDatabaseSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (RelationalDatabaseSnapshot -> RelationalDatabaseSnapshot -> Bool
(RelationalDatabaseSnapshot -> RelationalDatabaseSnapshot -> Bool)
-> (RelationalDatabaseSnapshot
    -> RelationalDatabaseSnapshot -> Bool)
-> Eq RelationalDatabaseSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RelationalDatabaseSnapshot -> RelationalDatabaseSnapshot -> Bool
$c/= :: RelationalDatabaseSnapshot -> RelationalDatabaseSnapshot -> Bool
== :: RelationalDatabaseSnapshot -> RelationalDatabaseSnapshot -> Bool
$c== :: RelationalDatabaseSnapshot -> RelationalDatabaseSnapshot -> Bool
Prelude.Eq, ReadPrec [RelationalDatabaseSnapshot]
ReadPrec RelationalDatabaseSnapshot
Int -> ReadS RelationalDatabaseSnapshot
ReadS [RelationalDatabaseSnapshot]
(Int -> ReadS RelationalDatabaseSnapshot)
-> ReadS [RelationalDatabaseSnapshot]
-> ReadPrec RelationalDatabaseSnapshot
-> ReadPrec [RelationalDatabaseSnapshot]
-> Read RelationalDatabaseSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RelationalDatabaseSnapshot]
$creadListPrec :: ReadPrec [RelationalDatabaseSnapshot]
readPrec :: ReadPrec RelationalDatabaseSnapshot
$creadPrec :: ReadPrec RelationalDatabaseSnapshot
readList :: ReadS [RelationalDatabaseSnapshot]
$creadList :: ReadS [RelationalDatabaseSnapshot]
readsPrec :: Int -> ReadS RelationalDatabaseSnapshot
$creadsPrec :: Int -> ReadS RelationalDatabaseSnapshot
Prelude.Read, Int -> RelationalDatabaseSnapshot -> ShowS
[RelationalDatabaseSnapshot] -> ShowS
RelationalDatabaseSnapshot -> String
(Int -> RelationalDatabaseSnapshot -> ShowS)
-> (RelationalDatabaseSnapshot -> String)
-> ([RelationalDatabaseSnapshot] -> ShowS)
-> Show RelationalDatabaseSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RelationalDatabaseSnapshot] -> ShowS
$cshowList :: [RelationalDatabaseSnapshot] -> ShowS
show :: RelationalDatabaseSnapshot -> String
$cshow :: RelationalDatabaseSnapshot -> String
showsPrec :: Int -> RelationalDatabaseSnapshot -> ShowS
$cshowsPrec :: Int -> RelationalDatabaseSnapshot -> ShowS
Prelude.Show, (forall x.
 RelationalDatabaseSnapshot -> Rep RelationalDatabaseSnapshot x)
-> (forall x.
    Rep RelationalDatabaseSnapshot x -> RelationalDatabaseSnapshot)
-> Generic RelationalDatabaseSnapshot
forall x.
Rep RelationalDatabaseSnapshot x -> RelationalDatabaseSnapshot
forall x.
RelationalDatabaseSnapshot -> Rep RelationalDatabaseSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RelationalDatabaseSnapshot x -> RelationalDatabaseSnapshot
$cfrom :: forall x.
RelationalDatabaseSnapshot -> Rep RelationalDatabaseSnapshot x
Prelude.Generic)

-- |
-- Create a value of 'RelationalDatabaseSnapshot' 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', 'relationalDatabaseSnapshot_engineVersion' - The database engine version for the database snapshot (for example,
-- @5.7.23@).
--
-- 'state', 'relationalDatabaseSnapshot_state' - The state of the database snapshot.
--
-- 'fromRelationalDatabaseName', 'relationalDatabaseSnapshot_fromRelationalDatabaseName' - The name of the source database from which the database snapshot was
-- created.
--
-- 'resourceType', 'relationalDatabaseSnapshot_resourceType' - The Lightsail resource type.
--
-- 'fromRelationalDatabaseBlueprintId', 'relationalDatabaseSnapshot_fromRelationalDatabaseBlueprintId' - The blueprint ID of the database from which the database snapshot was
-- created. A blueprint describes the major engine version of a database.
--
-- 'arn', 'relationalDatabaseSnapshot_arn' - The Amazon Resource Name (ARN) of the database snapshot.
--
-- 'createdAt', 'relationalDatabaseSnapshot_createdAt' - The timestamp when the database snapshot was created.
--
-- 'location', 'relationalDatabaseSnapshot_location' - The Region name and Availability Zone where the database snapshot is
-- located.
--
-- 'engine', 'relationalDatabaseSnapshot_engine' - The software of the database snapshot (for example, @MySQL@)
--
-- 'name', 'relationalDatabaseSnapshot_name' - The name of the database snapshot.
--
-- 'sizeInGb', 'relationalDatabaseSnapshot_sizeInGb' - The size of the disk in GB (for example, @32@) for the database
-- snapshot.
--
-- 'supportCode', 'relationalDatabaseSnapshot_supportCode' - The support code for the database snapshot. Include this code in your
-- email to support when you have questions about a database snapshot in
-- Lightsail. This code enables our support team to look up your Lightsail
-- information more easily.
--
-- 'fromRelationalDatabaseArn', 'relationalDatabaseSnapshot_fromRelationalDatabaseArn' - The Amazon Resource Name (ARN) of the database from which the database
-- snapshot was created.
--
-- 'fromRelationalDatabaseBundleId', 'relationalDatabaseSnapshot_fromRelationalDatabaseBundleId' - The bundle ID of the database from which the database snapshot was
-- created.
--
-- 'tags', 'relationalDatabaseSnapshot_tags' - The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
newRelationalDatabaseSnapshot ::
  RelationalDatabaseSnapshot
newRelationalDatabaseSnapshot :: RelationalDatabaseSnapshot
newRelationalDatabaseSnapshot =
  RelationalDatabaseSnapshot' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> RelationalDatabaseSnapshot
RelationalDatabaseSnapshot'
    { $sel:engineVersion:RelationalDatabaseSnapshot' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:RelationalDatabaseSnapshot' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fromRelationalDatabaseName:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:RelationalDatabaseSnapshot' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:fromRelationalDatabaseBlueprintId:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseBlueprintId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:RelationalDatabaseSnapshot' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:RelationalDatabaseSnapshot' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:location:RelationalDatabaseSnapshot' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:RelationalDatabaseSnapshot' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:RelationalDatabaseSnapshot' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sizeInGb:RelationalDatabaseSnapshot' :: Maybe Int
sizeInGb = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:supportCode:RelationalDatabaseSnapshot' :: Maybe Text
supportCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fromRelationalDatabaseArn:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fromRelationalDatabaseBundleId:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseBundleId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RelationalDatabaseSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | The database engine version for the database snapshot (for example,
-- @5.7.23@).
relationalDatabaseSnapshot_engineVersion :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_engineVersion :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_engineVersion = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:engineVersion:RelationalDatabaseSnapshot' :: Maybe Text
engineVersion = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The state of the database snapshot.
relationalDatabaseSnapshot_state :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_state :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_state = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
state :: Maybe Text
$sel:state:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
state} -> Maybe Text
state) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:state:RelationalDatabaseSnapshot' :: Maybe Text
state = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The name of the source database from which the database snapshot was
-- created.
relationalDatabaseSnapshot_fromRelationalDatabaseName :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_fromRelationalDatabaseName :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_fromRelationalDatabaseName = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
fromRelationalDatabaseName :: Maybe Text
$sel:fromRelationalDatabaseName:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseName} -> Maybe Text
fromRelationalDatabaseName) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:fromRelationalDatabaseName:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseName = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The Lightsail resource type.
relationalDatabaseSnapshot_resourceType :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe ResourceType)
relationalDatabaseSnapshot_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_resourceType = (RelationalDatabaseSnapshot -> Maybe ResourceType)
-> (RelationalDatabaseSnapshot
    -> Maybe ResourceType -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe ResourceType)
     (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe ResourceType
a -> RelationalDatabaseSnapshot
s {$sel:resourceType:RelationalDatabaseSnapshot' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: RelationalDatabaseSnapshot)

-- | The blueprint ID of the database from which the database snapshot was
-- created. A blueprint describes the major engine version of a database.
relationalDatabaseSnapshot_fromRelationalDatabaseBlueprintId :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_fromRelationalDatabaseBlueprintId :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_fromRelationalDatabaseBlueprintId = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
fromRelationalDatabaseBlueprintId :: Maybe Text
$sel:fromRelationalDatabaseBlueprintId:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseBlueprintId} -> Maybe Text
fromRelationalDatabaseBlueprintId) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:fromRelationalDatabaseBlueprintId:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseBlueprintId = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The Amazon Resource Name (ARN) of the database snapshot.
relationalDatabaseSnapshot_arn :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_arn :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_arn = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
arn :: Maybe Text
$sel:arn:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:arn:RelationalDatabaseSnapshot' :: Maybe Text
arn = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The timestamp when the database snapshot was created.
relationalDatabaseSnapshot_createdAt :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.UTCTime)
relationalDatabaseSnapshot_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_createdAt = (RelationalDatabaseSnapshot -> Maybe POSIX)
-> (RelationalDatabaseSnapshot
    -> Maybe POSIX -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe POSIX
a -> RelationalDatabaseSnapshot
s {$sel:createdAt:RelationalDatabaseSnapshot' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: RelationalDatabaseSnapshot) ((Maybe POSIX -> f (Maybe POSIX))
 -> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RelationalDatabaseSnapshot
-> f RelationalDatabaseSnapshot
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 Region name and Availability Zone where the database snapshot is
-- located.
relationalDatabaseSnapshot_location :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe ResourceLocation)
relationalDatabaseSnapshot_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_location = (RelationalDatabaseSnapshot -> Maybe ResourceLocation)
-> (RelationalDatabaseSnapshot
    -> Maybe ResourceLocation -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe ResourceLocation)
     (Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe ResourceLocation
a -> RelationalDatabaseSnapshot
s {$sel:location:RelationalDatabaseSnapshot' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: RelationalDatabaseSnapshot)

-- | The software of the database snapshot (for example, @MySQL@)
relationalDatabaseSnapshot_engine :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_engine :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_engine = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
engine :: Maybe Text
$sel:engine:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
engine} -> Maybe Text
engine) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:engine:RelationalDatabaseSnapshot' :: Maybe Text
engine = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The name of the database snapshot.
relationalDatabaseSnapshot_name :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_name :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_name = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
name :: Maybe Text
$sel:name:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
name} -> Maybe Text
name) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:name:RelationalDatabaseSnapshot' :: Maybe Text
name = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The size of the disk in GB (for example, @32@) for the database
-- snapshot.
relationalDatabaseSnapshot_sizeInGb :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Int)
relationalDatabaseSnapshot_sizeInGb :: (Maybe Int -> f (Maybe Int))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_sizeInGb = (RelationalDatabaseSnapshot -> Maybe Int)
-> (RelationalDatabaseSnapshot
    -> Maybe Int -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Int
sizeInGb :: Maybe Int
$sel:sizeInGb:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Int
sizeInGb} -> Maybe Int
sizeInGb) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Int
a -> RelationalDatabaseSnapshot
s {$sel:sizeInGb:RelationalDatabaseSnapshot' :: Maybe Int
sizeInGb = Maybe Int
a} :: RelationalDatabaseSnapshot)

-- | The support code for the database snapshot. Include this code in your
-- email to support when you have questions about a database snapshot in
-- Lightsail. This code enables our support team to look up your Lightsail
-- information more easily.
relationalDatabaseSnapshot_supportCode :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_supportCode :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_supportCode = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:supportCode:RelationalDatabaseSnapshot' :: Maybe Text
supportCode = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The Amazon Resource Name (ARN) of the database from which the database
-- snapshot was created.
relationalDatabaseSnapshot_fromRelationalDatabaseArn :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_fromRelationalDatabaseArn :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_fromRelationalDatabaseArn = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
fromRelationalDatabaseArn :: Maybe Text
$sel:fromRelationalDatabaseArn:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseArn} -> Maybe Text
fromRelationalDatabaseArn) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:fromRelationalDatabaseArn:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseArn = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The bundle ID of the database from which the database snapshot was
-- created.
relationalDatabaseSnapshot_fromRelationalDatabaseBundleId :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe Prelude.Text)
relationalDatabaseSnapshot_fromRelationalDatabaseBundleId :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_fromRelationalDatabaseBundleId = (RelationalDatabaseSnapshot -> Maybe Text)
-> (RelationalDatabaseSnapshot
    -> Maybe Text -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe Text
fromRelationalDatabaseBundleId :: Maybe Text
$sel:fromRelationalDatabaseBundleId:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe Text
fromRelationalDatabaseBundleId} -> Maybe Text
fromRelationalDatabaseBundleId) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe Text
a -> RelationalDatabaseSnapshot
s {$sel:fromRelationalDatabaseBundleId:RelationalDatabaseSnapshot' :: Maybe Text
fromRelationalDatabaseBundleId = Maybe Text
a} :: RelationalDatabaseSnapshot)

-- | The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
relationalDatabaseSnapshot_tags :: Lens.Lens' RelationalDatabaseSnapshot (Prelude.Maybe [Tag])
relationalDatabaseSnapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot
relationalDatabaseSnapshot_tags = (RelationalDatabaseSnapshot -> Maybe [Tag])
-> (RelationalDatabaseSnapshot
    -> Maybe [Tag] -> RelationalDatabaseSnapshot)
-> Lens
     RelationalDatabaseSnapshot
     RelationalDatabaseSnapshot
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RelationalDatabaseSnapshot' :: RelationalDatabaseSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RelationalDatabaseSnapshot
s@RelationalDatabaseSnapshot' {} Maybe [Tag]
a -> RelationalDatabaseSnapshot
s {$sel:tags:RelationalDatabaseSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RelationalDatabaseSnapshot) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> RelationalDatabaseSnapshot -> f RelationalDatabaseSnapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> RelationalDatabaseSnapshot
-> f RelationalDatabaseSnapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON RelationalDatabaseSnapshot where
  parseJSON :: Value -> Parser RelationalDatabaseSnapshot
parseJSON =
    String
-> (Object -> Parser RelationalDatabaseSnapshot)
-> Value
-> Parser RelationalDatabaseSnapshot
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RelationalDatabaseSnapshot"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> RelationalDatabaseSnapshot
RelationalDatabaseSnapshot'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ResourceType
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ResourceLocation
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Tag]
 -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ResourceType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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 Text
   -> Maybe ResourceType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ResourceType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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
"state")
            Parser
  (Maybe Text
   -> Maybe ResourceType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe ResourceType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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
"fromRelationalDatabaseName")
            Parser
  (Maybe ResourceType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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
"fromRelationalDatabaseBlueprintId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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
"arn")
            Parser
  (Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ResourceLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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 ResourceLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe ResourceLocation)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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 Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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
"name")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabaseSnapshot)
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
"sizeInGb")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe [Tag] -> RelationalDatabaseSnapshot)
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
"supportCode")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe [Tag] -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Tag] -> RelationalDatabaseSnapshot)
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
"fromRelationalDatabaseArn")
            Parser (Maybe Text -> Maybe [Tag] -> RelationalDatabaseSnapshot)
-> Parser (Maybe Text)
-> Parser (Maybe [Tag] -> RelationalDatabaseSnapshot)
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
"fromRelationalDatabaseBundleId")
            Parser (Maybe [Tag] -> RelationalDatabaseSnapshot)
-> Parser (Maybe [Tag]) -> Parser RelationalDatabaseSnapshot
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable RelationalDatabaseSnapshot

instance Prelude.NFData RelationalDatabaseSnapshot